mail-cache-private.h revision 763f83d3cc47bce05cbc396419c4db2b71dd8e68
132N/A/* Drop fields that haven't been accessed for n seconds */ 132N/A/* Never compress the file if it's smaller than this */ 132N/A/* Don't bother remembering holes smaller than this */ 132N/A/* Compress the file when deleted space reaches n% of total size */ 132N/A/* Compress the file when n% of rows contain continued rows. 132N/A 200% means that there's 2 continued rows per record. */ 132N/A/* Compress the file when we need to follow more than n next_offsets to find 132N/A the latest cache header. */ 132N/A/* Initial size for the file */ 132N/A/* When more space is needed, grow the file n% larger than the previous size */ 132N/A/* When allocating space for transactions, don't use blocks larger than this. */ 132N/A /* version is increased only when you can't have backwards 132N/A /* last time the field was accessed. not updated more often than 132N/A /* (uint32_t)-1 for variable sized fields */ 132N/A /* enum mail_cache_field_type */ 132N/A /* enum mail_cache_decision_type */ 132N/A /* NUL-separated list of field names */ 741N/A /* array of { uint32_t field; [ uint32_t size; ] { .. } } */ 704N/A /* make sure we notice if we're treating hole as mail_cache_record. 704N/A magic is a large number so if it's treated as size field, it'll 487N/A point outside the file */ 341N/A /* Unused fields aren't written to cache file */ 320N/A /* mail_cache_map() increases this always. */ 132N/A /* mmap_disable=no: hdr points to data / NULL when cache is invalid. 671N/A mmap_disable=yes: hdr points to hdr_ro_copy. this is needed because 671N/A cache invalidation can zero the data any time */ 132N/A /* hdr_copy gets updated when cache is locked and written when 132N/A unlocking and hdr_modified=TRUE */ 132N/A /* 0 is no need for compression, otherwise the file sequence number 132N/A which we want compressed. */ 230N/A /* we're looping if size_sum > (max_offset-min_offset) */ 230N/A /* if cached_exists_buf[field] == cached_exists_value, it's cached. 230N/A this allows us to avoid constantly clearing the whole buffer. 230N/A it needs to be cleared only when cached_exists_value is wrapped. */ 213N/A/* Explicitly lock the cache file. Returns -1 if error / timed out, 213N/A/* Returns -1 if cache is / just got corrupted, 0 if ok. */ 211N/A Returns FALSE if the area may or may not have been tracked before, 211N/A but we don't know for sure yet. */ 246N/A/* Iterate through a message's cached fields. */ 213N/A/* Returns 1 if field was returned, 0 if end of fields, or -1 if error */ 144N/A/* Update new_offset's prev_offset field to old_offset. */ 144N/A/* Mark record in given offset to be deleted. */ 260N/A/* Notify the decision handling code that field was looked up for seq. 260N/A This should be called even for fields that aren't currently in cache file */