2003-06-30 16:44:03 +04:00
|
|
|
/*
|
|
|
|
* This file is part of NetSurf, http://netsurf.sourceforge.net/
|
|
|
|
* Licensed under the GNU General Public License,
|
|
|
|
* http://www.opensource.org/licenses/gpl-license
|
|
|
|
* Copyright 2003 James Bursa <bursa@users.sourceforge.net>
|
2002-11-03 01:28:05 +03:00
|
|
|
*/
|
|
|
|
|
2003-09-08 01:08:13 +04:00
|
|
|
/** \file
|
|
|
|
* Caching of converted contents (interface).
|
|
|
|
*
|
|
|
|
* The cache contains a ::content structure for each url. If a structure is not
|
2003-06-17 23:24:21 +04:00
|
|
|
* in state CONTENT_STATUS_DONE, then loading and converting must be actively
|
|
|
|
* in progress, so that when a not done content is retrieved no action needs
|
|
|
|
* to be taken to load it.
|
2002-11-03 01:28:05 +03:00
|
|
|
*
|
2003-09-08 01:08:13 +04:00
|
|
|
* Each content in the cache is either freeable or non-freeable. If an entry
|
|
|
|
* is freeable, the cache may destroy it through content_destroy() at any time.
|
2003-06-17 23:24:21 +04:00
|
|
|
*
|
2003-09-08 01:08:13 +04:00
|
|
|
* The cache uses the cache element of struct content.
|
2002-11-03 01:28:05 +03:00
|
|
|
*/
|
|
|
|
|
2003-02-09 15:58:15 +03:00
|
|
|
#ifndef _NETSURF_DESKTOP_CACHE_H_
|
|
|
|
#define _NETSURF_DESKTOP_CACHE_H_
|
|
|
|
|
|
|
|
struct content;
|
|
|
|
struct cache_entry;
|
2002-11-03 01:28:05 +03:00
|
|
|
|
|
|
|
void cache_init(void);
|
|
|
|
void cache_quit(void);
|
2003-03-04 14:59:36 +03:00
|
|
|
struct content * cache_get(const char * const url);
|
2003-02-09 15:58:15 +03:00
|
|
|
void cache_put(struct content * content);
|
2003-06-17 23:24:21 +04:00
|
|
|
void cache_freeable(struct content * content);
|
|
|
|
void cache_destroy(struct content * content);
|
2003-02-09 15:58:15 +03:00
|
|
|
void cache_dump(void);
|
2002-11-03 01:28:05 +03:00
|
|
|
|
2003-02-09 15:58:15 +03:00
|
|
|
#endif
|