1 /* 2 HTTP Request Handling 3 Copyright (C) 1999-2002, Joe Orton <joe@manyfish.co.uk> 4 5 This library is free software; you can redistribute it and/or 6 modify it under the terms of the GNU Library General Public 7 License as published by the Free Software Foundation; either 8 version 2 of the License, or (at your option) any later version. 9 10 This library is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 Library General Public License for more details. 14 15 You should have received a copy of the GNU Library General Public 16 License along with this library; if not, write to the Free 17 Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, 18 MA 02111-1307, USA 19 20 */ 21 22 #ifndef NE_COOKIES_H 23 #define NE_COOKIES_H 24 25 #include "ne_request.h" 26 #include "ne_defs.h" 27 28 BEGIN_NEON_DECLS 29 30 struct ne_cookie_s; 31 typedef struct ne_cookie_s ne_cookie; 32 33 struct ne_cookie_s { 34 char *name, *value; 35 unsigned int secure:1; 36 unsigned int discard:1; 37 char *domain, *path; 38 time_t expiry; /* time at which the cookie expires */ 39 ne_cookie *next; 40 }; 41 42 typedef struct { 43 ne_cookie *cookies; 44 } ne_cookie_cache; 45 46 /* Register cookie handling for given session using given cache. */ 47 void ne_cookie_register(ne_session *sess, ne_cookie_cache *cache); 48 49 END_NEON_DECLS 50 51 #endif /* NE_COOKIES_H */ 52