mailbox-list-index-private.h revision c25356d5978632df6203437e1953bcb29e0c736f
#ifndef MAILBOX_LIST_INDEX_PRIVATE_H
#define MAILBOX_LIST_INDEX_PRIVATE_H
#include "file-dotlock.h"
#include "mailbox-list-index.h"
#define MAILBOX_LIST_INDEX_MAJOR_VERSION 1
#define MAILBOX_LIST_INDEX_MINOR_VERSION 0
#define MAILBOX_LIST_COMPRESS_PERCENTAGE 10
#define MAILBOX_LIST_COMPRESS_MIN_SIZE 1024
struct mailbox_list_index_header {
/* locking required to access the fields below: */
};
struct mailbox_list_dir_record {
/* If non-zero, contains a pointer to updated directory list.
Stored using mail_index_uint32_to_offset(). */
/* Bytes used by this record, including mailbox names. */
/* The records are sorted by their name_hash */
/* struct mailbox_list_record records[count]; */
};
struct mailbox_list_record {
/* CRC32 hash of the name */
/* Set when this record has been marked as deleted. It will be removed
permanently the next time a new record is added to this directory
or on the next index compression. */
/* Points to a NUL-terminated record name */
/* the dir offset is stored using mail_index_uint32_to_offset()
since it may change while we're reading */
};
struct mailbox_list_index {
char *filepath;
char separator;
struct mail_index *mail_index;
struct file_cache *file_cache;
struct dotlock_settings dotlock_set;
int fd;
void *mmap_base;
const void *const_mmap_base;
const struct mailbox_list_index_header *hdr;
unsigned int mmap_disable:1;
};
#define MAILBOX_LIST_RECORDS(dir) \
#define MAILBOX_LIST_RECORDS_MODIFIABLE(dir) \
const char *function);
const struct mailbox_list_dir_record *dir,
const char *name,
const struct mailbox_list_record **rec_r);
const struct mailbox_list_dir_record **dir_r);
const char *str);
#endif