1 #ifndef EL__COOKIES_COOKIES_H
2 #define EL__COOKIES_COOKIES_H
4 #include "main/module.h"
5 #include "main/object.h"
6 #include "protocol/uri.h"
7 #include "util/string.h"
18 struct cookie_server
{
19 OBJECT_HEAD(struct cookie_server
);
21 struct listbox_item
*box_item
;
22 unsigned char host
[1]; /* Must be at end of struct. */
26 OBJECT_HEAD(struct cookie
);
28 unsigned char *name
, *value
;
29 unsigned char *path
, *domain
;
31 struct cookie_server
*server
; /* The host the cookie originated from */
32 time_t expires
; /* Expiration time. Zero means undefined */
33 int secure
; /* Did it have 'secure' attribute */
35 /* This is indeed maintained by cookies.c, not dialogs.c; much easier
37 struct listbox_item
*box_item
;
40 void accept_cookie(struct cookie
*);
41 void done_cookie(struct cookie
*);
42 void delete_cookie(struct cookie
*);
43 void set_cookie(struct uri
*, unsigned char *);
44 void load_cookies(void);
45 void save_cookies(void);
46 void set_cookies_dirty(void);
48 /* Note that the returned value points to a static structure and thus the
49 * string will be overwritten at the next call time. The string source
50 * itself is dynamically allocated, though. */
51 struct string
*send_cookies(struct uri
*uri
);
53 extern struct module cookies_module
;