22#define CA_GotHeader 0x1
23#define CA_GotContentType 0x2
24#define CA_GotLength 0x4
25#define CA_InProgress 0x8
26#define CA_Redirect 0x10
27#define CA_ForceRedirect 0x20
28#define CA_TempRedirect 0x40
29#define CA_NotFound 0x80
30#define CA_Aborted 0x100
31#define CA_MsgErased 0x200
32#define CA_RedirectLoop 0x400
33#define CA_InternalUrl 0x800
34#define CA_HugeFile 0x1000
35#define CA_IsEmpty 0x2000
36#define CA_KeepAlive 0x4000
int a_Cache_get_buf(const DilloUrl *Url, char **PBuf, int *BufSize)
Get the pointer to the URL document, and its size, from the cache entry.
CacheClient_t * a_Cache_client_get_if_unique(int Key)
Last Client for this entry?
uint_t a_Cache_get_flags_with_redirection(const DilloUrl *url)
Get cache entry status (following redirections).
void(* CA_Callback_t)(int Op, CacheClient_t *Client)
Callback type for cache clients.
const char * a_Cache_set_content_type(const DilloUrl *url, const char *ctype, const char *from)
Change Content-Type for cache entry found by url.
void a_Cache_unref_buf(const DilloUrl *Url)
Unreference the data buffer when no longer using it.
const char * a_Cache_get_content_type(const DilloUrl *url)
Get current Content-Type for cache entry found by URL.
void a_Cache_entry_remove_by_url(DilloUrl *url)
Wrapper for capi.
bool_t a_Cache_process_dbuf(int Op, const char *buf, size_t buf_size, const DilloUrl *Url)
Receive new data, update the reception buffer (for next read), update the cache, and service the clie...
int a_Cache_download_enabled(const DilloUrl *url)
Check whether a URL scheme is downloadable.
int a_Cache_open_url(void *Web, CA_Callback_t Call, void *CbData)
Try finding the url in the cache.
void a_Cache_init(void)
Initialize cache data.
void a_Cache_freeall(void)
Memory deallocator (only called at exit time)
uint_t a_Cache_get_flags(const DilloUrl *url)
Get cache entry status.
void a_Cache_stop_client(int Key)
Remove a client from the client queue TODO: notify the dicache and upper layers.
Data structure for cache clients.
CA_Callback_t Callback
Client function.
const DilloUrl * Url
Pointer to a cache entry Url.
int Key
Primary Key for this client.
int Version
Dicache version of this Url (0 if not used)
void * CbData
Client function data.
uint_t BufSize
Valid size of cache-data.
void * Buf
Pointer to cache-data.
void * Web
Pointer to the Web structure of our client.
Parse and normalize all URL's inside Dillo.