1
#ifndef __MAIL_CUSTOM_FLAGS_H
2
#define __MAIL_CUSTOM_FLAGS_H
4
/* NOTE: Contains it's own locking, unrelated to index locks. */
6
#include "mail-index.h"
8
#define CUSTOM_FLAGS_FILE_NAME ".customflags"
10
int mail_custom_flags_open_or_create(struct mail_index *index);
11
void mail_custom_flags_free(struct mail_custom_flags *mcf);
13
/* Change custom flags so that they reflect the real flag numbers in
14
the file. Initially flags contains the custom flags in the order of the
15
specified list, it's modified to reflect the actual list. Returns 1 if ok,
16
0 if number of custom flags exceeded or -1 if error */
17
int mail_custom_flags_fix_list(struct mail_custom_flags *mcf,
18
enum mail_flags *flags,
19
const char *custom_flags[], unsigned int count);
21
/* Returns a pointer to list of flags. Note that calls to
22
mail_cutom_flags_fix_list() may modify the flags in the returned list.
23
It can modify only the flags that aren't in use anywhere, so this should
25
const char **mail_custom_flags_list_get(struct mail_custom_flags *mcf);
27
/* Returns TRUE if there's been any changes since this function was
28
called last time, or since open if this is the first call. */
29
int mail_custom_flags_has_changes(struct mail_custom_flags *mcf);