From 579d8ff0b630ab194c4a3eb7772bcc268cd3f455 Mon Sep 17 00:00:00 2001 From: Richard Wilson Date: Sat, 31 Dec 2005 04:27:53 +0000 Subject: [project @ 2005-12-31 04:27:53 by rjw] Store more URL data centrally. svn path=/import/netsurf/; revision=1907 --- content/url_store.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'content/url_store.h') diff --git a/content/url_store.h b/content/url_store.h index 412aef438..8dfc5b9aa 100644 --- a/content/url_store.h +++ b/content/url_store.h @@ -13,14 +13,25 @@ #define _NETSURF_CONTENT_URLSTORE_H_ #include "netsurf/image/bitmap.h" +#include "netsurf/content/content_type.h" +struct hostname_data { + char *hostname; /** Hostname (lowercase) */ + int hostname_length; /** Length of hostname */ + struct url_data *url; /** URLs for this host */ + struct hostname_data *previous; /** Previous hostname */ + struct hostname_data *next; /** Next hostname */ +}; + struct url_content { struct bitmap *thumbnail; /** Thumbnail, or NULL */ char *url; /** URL (including hostname) */ + char *title; /** Page title */ int url_length; /** Length of URL (including hostname) */ int visits; /** Number of times visited */ - int requests; /** Number of times requested */ + int last_visit; /** The time() of the last visit */ + content_type type; /** The content type */ }; struct url_data { @@ -30,6 +41,7 @@ struct url_data { struct hostname_data *parent; /** Parent hostname data */ }; +extern struct hostname_data *url_store_hostnames; struct url_content *url_store_find(const char *url); char *url_store_match(const char *url, struct url_data **reference); @@ -41,6 +53,6 @@ struct bitmap *url_store_get_thumbnail(const char *url); void url_store_load(const char *file); void url_store_save(const char *file); -void url_store_dump(void); +int url_store_compare_last_visit(const void *, const void *); #endif -- cgit v1.2.3