Google
Web alhem.net

Cookies.h

Go to the documentation of this file.
00001 // Cookies.h
00002 /*
00003 Copyright (C) 2003  Anders Hedstrom
00004 
00005 This program is free software; you can redistribute it and/or
00006 modify it under the terms of the GNU General Public License
00007 as published by the Free Software Foundation; either version 2
00008 of the License, or (at your option) any later version.
00009 
00010 This program is distributed in the hope that it will be useful,
00011 but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 GNU General Public License for more details.
00014 
00015 You should have received a copy of the GNU General Public License
00016 along with this program; if not, write to the Free Software
00017 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00018 */
00019 
00020 #ifndef _COOKIES_H
00021 #define _COOKIES_H
00022 
00023 #ifdef _WIN32
00024 #define STL_USING_LIST
00025 #include <stlhelper.h>
00026 #else
00027 #include <list>
00028 #endif
00029 
00030 namespace Cgi {
00031 
00033 
00034 typedef struct cookiestruct
00035 {
00036 //      struct cookiestruct *next; //!< Linked list ptr to next in list 
00037         char *name; 
00038         char *value; 
00039 } COOKIE;
00040 typedef std::list<COOKIE *> cookie_v;
00041 
00043 
00044 class Cookies {
00045 public:
00050         Cookies(void);
00057         Cookies(char *query_string);
00061         ~Cookies(void);
00062         int getvalue(char *,char *,short); // (name, buffer, length)
00063         void replacevalue(char *,char *);
00064         void replacevalue(char *,long);
00065         void replacevalue(char *,int);
00066         int getlength(char *);
00067         void setcookie(char *,char *,char *,char *);
00068         void setcookie(char *,char *,char *,long);
00069         void setcookie(char *,char *,char *,int);
00070         void expiredatetime(char *);
00071 
00072         cookie_v& GetCookies() { return m_cookies; }
00073 
00074 private:
00075 //      COOKIE *cookiebase;
00076         cookie_v m_cookies;
00077 };
00078 
00079 } // namespace
00080 #endif // _COOKIES_H

Generated for cgi++ by doxygen 1.3.7

Page, code, and content Copyright (C) 2004 by Anders Hedström