From c9c2115088e0ae46bd88e42425c32e42ff0be87b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 23 Aug 2001 14:05:25 +0000 Subject: started working on a function for writing (all) cookies, made it possible to read multiple cookie files, no longer writes to the URL string passed to the _add() function. The new stuff is now conditionally compiled on the COOKIE define. Changed the _init() proto. --- lib/cookie.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'lib/cookie.h') diff --git a/lib/cookie.h b/lib/cookie.h index a3be519ca..befd54cc6 100644 --- a/lib/cookie.h +++ b/lib/cookie.h @@ -40,19 +40,23 @@ struct Cookie { char *domain; /* domain = */ time_t expires; /* expires = */ char *expirestr; /* the plain text version */ + + char field1; /* read from a cookie file, 1 => FALSE, 2=> TRUE */ /* RFC 2109 keywords. Version=1 means 2109-compliant cookie sending */ char *version; /* Version = */ char *maxage; /* Max-Age = */ bool secure; /* whether the 'secure' keyword was used */ + bool livecookie; /* updated from a server, not a stored file */ }; struct CookieInfo { - /* linked list of cookies we know of */ - struct Cookie *cookies; + /* linked list of cookies we know of */ + struct Cookie *cookies; - char *filename; /* file we read from/write to */ + char *filename; /* file we read from/write to */ + bool running; /* state info, for cookie adding information */ }; /* This is the maximum line length we accept for a cookie line */ @@ -64,7 +68,7 @@ struct CookieInfo { #define MAX_NAME_TXT "255" struct Cookie *Curl_cookie_add(struct CookieInfo *, bool, char *); -struct CookieInfo *Curl_cookie_init(char *); +struct CookieInfo *Curl_cookie_init(char *, struct CookieInfo *); struct Cookie *Curl_cookie_getlist(struct CookieInfo *, char *, char *, bool); void Curl_cookie_freelist(struct Cookie *); void Curl_cookie_cleanup(struct CookieInfo *); -- cgit v1.2.3