]> code.citadel.org Git - citadel.git/blob - citadel/serv_imap.h
* Probable completion of STATUS, COPY, STORE, and EXPUNGE commands in IMAP
[citadel.git] / citadel / serv_imap.h
1 /* $Id$ 
2  */
3
4 extern long SYM_IMAP;
5
6
7 void imap_cleanup_function(void);
8 void imap_greeting(void);
9 void imap_command_loop(void);
10 int imap_grabroom(char *returned_roomname, char *foldername);
11
12
13
14 struct citimap {
15         int authstate;
16         char authseq[SIZ];
17         int selected;           /* set to 1 if in the SELECTED state */
18         int readonly;           /* mailbox is open read only */
19         int num_msgs;           /* Number of messages being mapped */
20         long *msgids;
21         unsigned int *flags;
22 };
23
24 /*
25  * values of 'authstate'
26  */
27 enum {
28         imap_as_normal,
29         imap_as_expecting_username,
30         imap_as_expecting_password
31 };
32
33 /* Flags for the above struct.  Note that some of these are for internal use,
34  * and are not to be reported to IMAP clients.
35  */
36 #define IMAP_ANSWERED           1
37 #define IMAP_FLAGGED            2
38 #define IMAP_DELETED            4
39 #define IMAP_DRAFT              8
40 #define IMAP_SEEN               16
41
42 #define IMAP_MASK_SETABLE       0x1f
43 #define IMAP_MASK_SYSTEM        0xe0
44
45 #define IMAP_SELECTED           32      /* internal */
46
47
48 #define IMAP ((struct citimap *)CtdlGetUserData(SYM_IMAP))