summaryrefslogtreecommitdiff
path: root/src/cache.h
diff options
context:
space:
mode:
authorjcid <devnull@localhost>2008-03-26 15:46:46 +0100
committerjcid <devnull@localhost>2008-03-26 15:46:46 +0100
commit072933308a1128555e6e56f519fdc9603d060d0f (patch)
tree2dddc7686d2209ad5392691dfcd362f494178735 /src/cache.h
parent5763bad3e2a95553ed799e73ffd640dfaf441ac0 (diff)
- Added a_Capi_get_flags(). It requests a cache entry's status as flags.
Diffstat (limited to 'src/cache.h')
-rw-r--r--src/cache.h29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/cache.h b/src/cache.h
index f6a831ea..5dee12c1 100644
--- a/src/cache.h
+++ b/src/cache.h
@@ -19,20 +19,20 @@ extern "C" {
/*
* Flag Defines
*/
-#define CA_GotHeader (1) /* True after header is completely got */
-#define CA_GotContentType (2) /* True after Content-Type is known */
-#define CA_GotLength (4) /* True if Content-Length is known */
-#define CA_GotData (8) /* True if we have all Data in cache */
-#define CA_FreeData (16) /* Free the cache Data on close */
-#define CA_Redirect (32) /* Data actually points to a redirect */
-#define CA_ForceRedirect (64) /* Unconditional redirect */
-#define CA_TempRedirect (128) /* Temporary redirect */
-#define CA_NotFound (256) /* True if remote server didn't find the URL */
-#define CA_Stopped (512) /* True if the entry has been stopped */
-#define CA_MsgErased (1024) /* Used to erase the bw's status bar */
-#define CA_RedirectLoop (2048) /* Redirect loop */
-#define CA_InternalUrl (4096) /* URL content is generated by dillo */
-#define CA_HugeFile (8192) /* URL content is too big */
+#define CA_GotHeader 0x1 /* True after header is completely got */
+#define CA_GotContentType 0x2 /* True after Content-Type is known */
+#define CA_GotLength 0x4 /* True if Content-Length is known */
+#define CA_GotData 0x8 /* True if we have all Data in cache */
+#define CA_Redirect 0x10 /* Data actually points to a redirect */
+#define CA_ForceRedirect 0x20 /* Unconditional redirect */
+#define CA_TempRedirect 0x40 /* Temporary redirect */
+#define CA_NotFound 0x80 /* True if remote server didn't find the URL */
+#define CA_Stopped 0x100 /* True if the entry has been stopped */
+#define CA_MsgErased 0x200 /* Used to erase the bw's status bar */
+#define CA_RedirectLoop 0x400 /* Redirect loop */
+#define CA_InternalUrl 0x800 /* URL content is generated by dillo */
+#define CA_HugeFile 0x1000 /* URL content is too big */
+#define CA_IsEmpty 0x2000 /* True until a byte of content arrives */
/*
* Callback type for cache clients
@@ -59,6 +59,7 @@ struct _CacheClient {
void a_Cache_init(void);
int a_Cache_open_url(void *Web, CA_Callback_t Call, void *CbData);
int a_Cache_get_buf(const DilloUrl *Url, char **PBuf, int *BufSize);
+uint_t a_Cache_get_flags(const DilloUrl *url);
void a_Cache_process_dbuf(int Op, const char *buf, size_t buf_size,
const DilloUrl *Url);
void a_Cache_entry_inject(const DilloUrl *Url, Dstr *data_ds);