summaryrefslogtreecommitdiff
path: root/content/urldb.h
diff options
context:
space:
mode:
authorRichard Wilson <rjw@netsurf-browser.org>2006-07-13 12:46:02 +0000
committerRichard Wilson <rjw@netsurf-browser.org>2006-07-13 12:46:02 +0000
commita836591435736b1d72eced1e6f643341422a7d82 (patch)
treea59b3ee676015de1aed644b5f251544ea0a008d6 /content/urldb.h
parentd4331fa64ff98da55943ae5c0a40694005223066 (diff)
downloadnetsurf-a836591435736b1d72eced1e6f643341422a7d82.tar.gz
netsurf-a836591435736b1d72eced1e6f643341422a7d82.tar.bz2
Add basic cookie viewer, make trees use textarea components for UTF8 editing, trim headers, fix tree redraw issues.
svn path=/trunk/netsurf/; revision=2739
Diffstat (limited to 'content/urldb.h')
-rw-r--r--content/urldb.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/content/urldb.h b/content/urldb.h
index 04a8b5d2f..ec08bb2b1 100644
--- a/content/urldb.h
+++ b/content/urldb.h
@@ -16,6 +16,12 @@
#include <time.h>
#include "netsurf/content/content_type.h"
+typedef enum {
+ COOKIE_NETSCAPE = 0,
+ COOKIE_RFC2109 = 1,
+ COOKIE_RFC2965 = 2
+} cookie_version;
+
struct url_data {
const char *title; /**< Resource title */
unsigned int visits; /**< Visit count */
@@ -23,6 +29,25 @@ struct url_data {
content_type type; /**< Type of resource */
};
+struct cookie_data {
+ const char *name; /**< Cookie name */
+ const char *value; /**< Cookie value */
+ const char *comment; /**< Cookie comment */
+ const bool domain_from_set; /**< Domain came from Set-Cookie: header */
+ const char *domain; /**< Domain */
+ const bool path_from_set; /**< Path came from Set-Cookie: header */
+ const char *path; /**< Path */
+ const time_t expires; /**< Expiry timestamp, or 1 for session */
+ const time_t last_used; /**< Last used time */
+ const bool secure; /**< Only send for HTTPS requests */
+ cookie_version version; /**< Specification compliance */
+ const bool no_destroy; /**< Never destroy this cookie,
+ * unless it's expired */
+
+ const struct cookie_data *prev; /**< Previous in list */
+ const struct cookie_data *next; /**< Next in list */
+};
+
struct bitmap;
/* Persistence support */
@@ -62,6 +87,7 @@ void urldb_iterate_partial(const char *prefix,
/* Iteration */
void urldb_iterate_entries(bool (*callback)(const char *url,
const struct url_data *data));
+void urldb_iterate_cookies(bool (*callback)(const struct cookie_data *cookie));
/* Debug */
void urldb_dump(void);