diff options
author | James Bursa <james@netsurf-browser.org> | 2004-06-21 15:09:59 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2004-06-21 15:09:59 +0000 |
commit | b4723c1d05819d4e47fc59254f5ad8c9d6d62db3 (patch) | |
tree | 4242fc6b5d7c9f3649140f0e86b1b39b338e9459 /content/content.h | |
parent | 6e5d77e894d9b76d9bd9ed19b6d506dc8f26d454 (diff) | |
download | netsurf-b4723c1d05819d4e47fc59254f5ad8c9d6d62db3.tar.gz netsurf-b4723c1d05819d4e47fc59254f5ad8c9d6d62db3.tar.bz2 |
[project @ 2004-06-21 15:09:58 by bursa]
Merge memory cache into content module.
svn path=/import/netsurf/; revision=986
Diffstat (limited to 'content/content.h')
-rw-r--r-- | content/content.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/content/content.h b/content/content.h index 478e16b9e..16ad6f764 100644 --- a/content/content.h +++ b/content/content.h @@ -92,11 +92,8 @@ #ifndef _NETSURF_DESKTOP_CONTENT_H_ #define _NETSURF_DESKTOP_CONTENT_H_ -#include "libxml/HTMLparser.h" #include "netsurf/utils/config.h" -#include "netsurf/content/cache.h" #include "netsurf/content/content_type.h" -#include "netsurf/content/fetch.h" #include "netsurf/css/css.h" #include "netsurf/render/box.h" #include "netsurf/render/font.h" @@ -121,6 +118,9 @@ #endif +struct fetch; + + /** Used in callbacks to indicate what has occurred. */ typedef enum { CONTENT_MSG_LOADING, /**< fetching or converting */ @@ -211,8 +211,12 @@ struct content { #endif } data; - struct cache_entry *cache; /**< Used by cache, 0 if not cached. */ - unsigned long size; /**< Estimated size of all data + /** This content may be given to new users. Indicates that the content + * was fetched using a simple GET, has not expired, and may be + * shared between users. */ + bool fresh; + + unsigned int size; /**< Estimated size of all data associated with this content. */ char *title; /**< Title for browser window. */ unsigned int active; /**< Number of child fetches or @@ -225,8 +229,6 @@ struct content { unsigned long source_size; /**< Amount of data fetched so far. */ unsigned long total_size; /**< Total data size, 0 if unknown. */ - int lock; /**< Content in use, do not destroy. */ - bool destroy_pending; /**< Destroy when lock returns to 0. */ bool no_error_pages; /**< Used by fetchcache(). */ /** Array of first n rendering errors or warnings. */ @@ -250,6 +252,7 @@ struct browser_window; content_type content_lookup(const char *mime_type); struct content * content_create(const char *url); +struct content * content_get(const char *url); bool content_set_type(struct content *c, content_type type, const char *mime_type, const char *params[]); void content_set_status(struct content *c, const char *status_message, ...); @@ -257,7 +260,6 @@ bool content_process_data(struct content *c, char *data, unsigned int size); void content_convert(struct content *c, int width, int height); void content_reformat(struct content *c, int width, int height); void content_clean(void); -void content_destroy(struct content *c); void content_reset(struct content *c); void content_redraw(struct content *c, int x, int y, int width, int height, |