~ubuntu-branches/ubuntu/vivid/dovecot/vivid

« back to all changes in this revision

Viewing changes to src/lib-index/mail-custom-flags.h

  • Committer: Bazaar Package Importer
  • Author(s): Jaldhar H. Vyas
  • Date: 2005-11-05 23:19:19 UTC
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20051105231919-ydujs4y7687fpor2
Tags: upstream-1.0.alpha4
ImportĀ upstreamĀ versionĀ 1.0.alpha4

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef __MAIL_CUSTOM_FLAGS_H
2
 
#define __MAIL_CUSTOM_FLAGS_H
3
 
 
4
 
/* NOTE: Contains it's own locking, unrelated to index locks. */
5
 
 
6
 
#include "mail-index.h"
7
 
 
8
 
#define CUSTOM_FLAGS_FILE_NAME ".customflags"
9
 
 
10
 
int mail_custom_flags_open_or_create(struct mail_index *index);
11
 
void mail_custom_flags_free(struct mail_custom_flags *mcf);
12
 
 
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);
20
 
 
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
24
 
   be safe. */
25
 
const char **mail_custom_flags_list_get(struct mail_custom_flags *mcf);
26
 
 
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);
30
 
 
31
 
#endif