]> code.citadel.org Git - citadel.git/blob - citadel/serv_imap.h
* Started working on part fetches
[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
11
12 struct citimap {
13         int authstate;
14         char authseq[256];
15         int selected;           /* set to 1 if in the SELECTED state */
16         int readonly;           /* mailbox is open read only */
17         int num_msgs;           /* Number of messages being mapped */
18         long *msgids;
19         unsigned int *flags;
20         char desired_part[256]; /* for part fetches */
21 };
22
23 /*
24  * values of 'authstate'
25  */
26 enum {
27         imap_as_normal,
28         imap_as_expecting_username,
29         imap_as_expecting_password
30 };
31
32 /* Flags for the above struct.  Note that some of these are for internal use,
33  * and are not to be reported to IMAP clients.
34  */
35 #define IMAP_ANSWERED   1
36 #define IMAP_FLAGGED    2
37 #define IMAP_DELETED    4
38 #define IMAP_DRAFT      8
39 #define IMAP_SEEN       16
40 #define IMAP_FETCHED    32      /* internal */
41
42
43 #define IMAP ((struct citimap *)CtdlGetUserData(SYM_IMAP))