00001 /* -*-c++-*- */ 00002 /* 00003 * $Id: HTTPStatusHeader.h,v 1.2 2002/03/06 02:49:55 sbooth Exp $ 00004 * 00005 * Copyright (C) 1996 - 2002 Stephen F. Booth 00006 * 00007 * This library is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU Lesser General Public 00009 * License as published by the Free Software Foundation; either 00010 * version 2.1 of the License, or (at your option) any later version. 00011 * 00012 * This library is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 * Lesser General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU Lesser General Public 00018 * License along with this library; if not, write to the Free Software 00019 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00020 */ 00021 00022 #ifndef _HTTPSTATUSHEADER_H_ 00023 #define _HTTPSTATUSHEADER_H_ 1 00024 00025 #ifdef __GNUG__ 00026 # pragma interface 00027 #endif 00028 00034 #include <string> 00035 00036 #include "cgicc/HTTPHeader.h" 00037 00038 CGICC_BEGIN_NAMESPACE 00039 00040 // ============================================================ 00041 // Class HTTPStatusHeader 00042 // ============================================================ 00043 00048 class CGICC_API HTTPStatusHeader : public HTTPHeader 00049 { 00050 public: 00051 00058 HTTPStatusHeader(int status, 00059 const STDNS string& message); 00060 00062 virtual ~HTTPStatusHeader(); 00063 00068 inline int 00069 getStatusCode() const 00070 { return fStatus; } 00071 00072 00077 virtual void 00078 render(STDNS ostream& out) const; 00079 00080 private: 00081 HTTPStatusHeader(); 00082 int fStatus; 00083 }; 00084 00085 CGICC_END_NAMESPACE 00086 00087 #endif /* ! _HTTPSTATUSHEADER_H_ */