#ifndef MAIL_INDEX_STRMAP_H
#define MAIL_INDEX_STRMAP_H
#include "hash2.h"
struct mail_index;
struct mail_index_view;
struct mail_index_strmap_header {
};
struct mail_index_strmap_rec {
/* unique index number for the string */
};
typedef bool
const struct mail_index_strmap_rec *rec,
void *context);
/* Returns 1 if matches, 0 if not, -1 if one of the records is expunged and
the result can't be determined */
typedef int
const struct mail_index_strmap_rec *rec2,
void *context);
/* called when string indexes are renumbered. idx_map[old_idx] = new_idx.
if new_idx is 0, the record was expunged. As a special case if count=0,
the strmap was reset. */
unsigned int old_count,
struct mail_index_strmap *
/* Returns strmap records and hash that can be used for read-only access.
The records array always terminates with a record containing zeros (but it's
not counted in the array count). */
struct mail_index_strmap_view *
struct mail_index_view *idx_view,
void *context,
const struct hash2_table **hash_r);
/* Return the highest used string index. */
/* Synchronize strmap: Caller adds missing entries, expunged messages may be
removed internally and the changes are written to disk. Note that the strmap
string indexes may be renumbered if another process had already written the
same changes as us. */
struct mail_index_strmap_view_sync *
const char *key);
#endif