Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

HTTPHeader.h

Go to the documentation of this file.
00001 /* -*-c++-*- */
00002 /*
00003  *  $Id: HTTPHeader.h,v 1.4 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 _HTTPHEADER_H_
00023 #define _HTTPHEADER_H_ 1
00024 
00025 #ifdef __GNUG__
00026 #  pragma interface
00027 #endif
00028 
00034 #include <string>
00035 #include <vector>
00036 
00037 #include "cgicc/MStreamable.h"
00038 #include "cgicc/HTTPCookie.h"
00039 
00040 CGICC_BEGIN_NAMESPACE
00041   
00042 // ============================================================
00043 // Class HTTPHeader
00044 // ============================================================
00045 
00050 class CGICC_API HTTPHeader : public MStreamable 
00051 {
00052 public:
00053     
00056 
00061   HTTPHeader(const STDNS string& data);
00062 
00067   HTTPHeader(const HTTPHeader& header);
00068     
00073   virtual ~HTTPHeader();
00075 
00076   // ============================================================
00077 
00080 
00085   inline HTTPHeader&
00086   setCookie(const HTTPCookie& cookie)
00087   { fCookies.push_back(cookie); return *this; }
00088 
00093   inline const STDNS vector<HTTPCookie>&
00094   getCookies()                                  const
00095   { return fCookies; }
00097 
00098   // ============================================================
00099 
00102 
00107   inline STDNS string 
00108   getData()                                     const
00109     { return fData; }
00111 
00112   // ============================================================
00113 
00116 
00123   virtual void 
00124   render(STDNS ostream& out)                    const = 0;
00126     
00127 private:
00128   HTTPHeader();
00129 
00130   STDNS string fData;
00131   STDNS vector<HTTPCookie> fCookies;
00132 };
00133 
00134 CGICC_END_NAMESPACE
00135 
00136 #endif /* ! _HTTPHEADER_H_ */

GNU cgicc - A C++ class library for writing CGI applications
Copyright © 1996 - 2002 Stephen F. Booth
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front Cover Texts, and with no Back-Cover Texts.
Documentation generated Sun Mar 17 16:40:57 2002 for cgicc by doxygen 1.2.13.1