update cache.h to reflect changes, empty cache entries are illegal, and unknown-size is returned as 0
authorTero Marttila <terom@fixme.fi>
Sat, 09 Aug 2008 01:00:18 +0300
changeset 34 f3ab8656b6a0
parent 33 b750e8865127
child 35 020fdab3c986
update cache.h to reflect changes, empty cache entries are illegal, and unknown-size is returned as 0
cache.h
--- a/cache.h	Sat Aug 09 00:59:01 2008 +0300
+++ b/cache.h	Sat Aug 09 01:00:18 2008 +0300
@@ -119,11 +119,11 @@
 
 /*
  * Get information about the amount of data in this cache entry.
- *      size        - the total size of the cache entry. -1 if unknown
- *      offset      - how many bytes of data the cache entry contains
- *      available   - how many unread bytes are available
+ *      size        - the total size of the cache entry. 0 if unknown
+ *      offset      - how many bytes of data the cache entry contains. May be 0
+ *      available   - how many unread bytes are available. May be 0
  */
-void cache_req_available (struct cache_req *req, ssize_t *size, ssize_t *offset, ssize_t *available);
+int cache_req_available (struct cache_req *req, size_t *size, size_t *offset, size_t *available);
 
 /*
  * Prepare this cache req for writing in the data. Hint, if nonzero, is used to pre-allocate resources for the entry.