summaryrefslogtreecommitdiff
path: root/lib/cookie.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-08-23 14:05:25 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-08-23 14:05:25 +0000
commitc9c2115088e0ae46bd88e42425c32e42ff0be87b (patch)
tree94930727696714415de25a943348005034f52eef /lib/cookie.h
parentd73d28a75b0de3ee26e731812545a1dcf9759848 (diff)
downloadcurl-c9c2115088e0ae46bd88e42425c32e42ff0be87b.tar.gz
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.
Diffstat (limited to 'lib/cookie.h')
-rw-r--r--lib/cookie.h12
1 files changed, 8 insertions, 4 deletions
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 = <this> */
time_t expires; /* expires = <this> */
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 = <value> */
char *maxage; /* Max-Age = <value> */
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 *);