00001 /* 00002 00003 Copyright (C) 2005-2007 by Peter Dimov. 00004 00005 This file is part of Calitko (http://www.calitko.org). 00006 00007 Calitko is free software; you can redistribute it and/or modify 00008 it under the terms of the GNU General Public License as published by 00009 the Free Software Foundation; either version 2 of the License, or 00010 (at your option) any later version. 00011 00012 Calitko 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 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with Calitko; if not, write to the Free Software 00019 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00020 00021 */ 00022 00023 #ifndef HTTP__RESPONSE_HEADER_H 00024 #define HTTP__RESPONSE_HEADER_H 00025 00026 #include "Header.h" 00027 00028 // Open containing namespaces: 00029 namespace Http { 00031 00032 class ResponseHeaderPrivate; 00034 00052 class ResponseHeader : public Header 00053 { 00054 00055 00056 public: 00057 ResponseHeader(); 00058 ResponseHeader (const QString &str); 00059 ResponseHeader (int statusCode, 00060 const QString &reasonPhrase = QString(), 00061 int majorVer = 1, 00062 int minorVer = 1); 00063 ResponseHeader (const ResponseHeader &header); 00064 ~ResponseHeader(); 00065 00066 ResponseHeader & operator= (const ResponseHeader &header); 00067 00068 void setStatusLine (int statusCode, 00069 const QString &reasonPhrase = QString(), 00070 int majorVer = 1, 00071 int minorVer = 1); 00072 00073 int statusCode() const; 00074 QString reasonPhrase() const; 00075 int majorVersion() const; 00076 int minorVersion() const; 00077 00078 QString toString() const; 00079 00080 protected: 00081 bool parseLine(const QString &line, int number); 00082 00083 private: 00084 auto_ptr <ResponseHeaderPrivate> d; 00085 }; 00086 00087 // Close containing namespaces: 00088 } // namespace Http 00090 00091 #endif // HTTP__RESPONSE_HEADER_H