Go to the documentation of this file.00001 #ifndef HEADER_CURL_COOKIE_H
00002 #define HEADER_CURL_COOKIE_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include "curl_setup.h"
00025
00026 #include <curl/curl.h>
00027
00028 struct Cookie {
00029 struct Cookie *next;
00030 char *name;
00031 char *value;
00032 char *path;
00033 char *spath;
00034 char *domain;
00035 curl_off_t expires;
00036 char *expirestr;
00037 bool tailmatch;
00038
00039
00040 char *version;
00041 char *maxage;
00042
00043 bool secure;
00044 bool livecookie;
00045 bool httponly;
00046 };
00047
00048 struct CookieInfo {
00049
00050 struct Cookie *cookies;
00051
00052 char *filename;
00053 bool running;
00054 long numcookies;
00055 bool newsession;
00056 };
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066 #define MAX_COOKIE_LINE 5000
00067 #define MAX_COOKIE_LINE_TXT "4999"
00068
00069
00070 #define MAX_NAME 1024
00071 #define MAX_NAME_TXT "1023"
00072
00073 struct Curl_easy;
00074
00075
00076
00077
00078
00079 struct Cookie *Curl_cookie_add(struct Curl_easy *data,
00080 struct CookieInfo *, bool header, char *lineptr,
00081 const char *domain, const char *path);
00082
00083 struct Cookie *Curl_cookie_getlist(struct CookieInfo *, const char *,
00084 const char *, bool);
00085 void Curl_cookie_freelist(struct Cookie *cookies);
00086 void Curl_cookie_clearall(struct CookieInfo *cookies);
00087 void Curl_cookie_clearsess(struct CookieInfo *cookies);
00088
00089 #if defined(CURL_DISABLE_HTTP) || defined(CURL_DISABLE_COOKIES)
00090 #define Curl_cookie_list(x) NULL
00091 #define Curl_cookie_loadfiles(x) Curl_nop_stmt
00092 #define Curl_cookie_init(x,y,z,w) NULL
00093 #define Curl_cookie_cleanup(x) Curl_nop_stmt
00094 #define Curl_flush_cookies(x,y) Curl_nop_stmt
00095 #else
00096 void Curl_flush_cookies(struct Curl_easy *data, int cleanup);
00097 void Curl_cookie_cleanup(struct CookieInfo *);
00098 struct CookieInfo *Curl_cookie_init(struct Curl_easy *data,
00099 const char *, struct CookieInfo *, bool);
00100 struct curl_slist *Curl_cookie_list(struct Curl_easy *data);
00101 void Curl_cookie_loadfiles(struct Curl_easy *data);
00102 #endif
00103
00104 #endif