]> code.citadel.org Git - citadel.git/blobdiff - citadel/serv_imap.h
* Killed off CtdlGetDynamicSymbol() and just put all the symbols in server.h
[citadel.git] / citadel / serv_imap.h
index 217b62f6f9ccd05a522071d7e6d918f249b7465d..b5a536129454d17a58f444ecd9bc5585722be4d0 100644 (file)
@@ -1,22 +1,25 @@
 /* $Id$ 
  */
 
-extern long SYM_IMAP;
-
 
 void imap_cleanup_function(void);
 void imap_greeting(void);
 void imap_command_loop(void);
+int imap_grabroom(char *returned_roomname, char *foldername);
+void imap_free_transmitted_message(void);
+
 
 
 struct citimap {
        int authstate;
-       char authseq[256];
+       char authseq[SIZ];
        int selected;           /* set to 1 if in the SELECTED state */
        int readonly;           /* mailbox is open read only */
        int num_msgs;           /* Number of messages being mapped */
        long *msgids;
        unsigned int *flags;
+       char *transmitted_message;      /* for APPEND command... */
+       size_t transmitted_length;
 };
 
 /*
@@ -31,12 +34,22 @@ enum {
 /* Flags for the above struct.  Note that some of these are for internal use,
  * and are not to be reported to IMAP clients.
  */
-#define IMAP_ANSWERED  1
-#define IMAP_FLAGGED   2
-#define IMAP_DELETED   4
-#define IMAP_DRAFT     8
-#define IMAP_SEEN      16
-#define IMAP_FETCHED   32      /* internal */
+#define IMAP_ANSWERED          1
+#define IMAP_FLAGGED           2
+#define IMAP_DELETED           4
+#define IMAP_DRAFT             8
+#define IMAP_SEEN              16
+
+#define IMAP_MASK_SETABLE      0x1f
+#define IMAP_MASK_SYSTEM       0xe0
+
+#define IMAP_SELECTED          32      /* internal */
 
 
 #define IMAP ((struct citimap *)CtdlGetUserData(SYM_IMAP))
+
+/*
+ * When loading arrays of message ID's into memory, increase the buffer to
+ * hold this many additional messages instead of calling realloc() each time.
+ */
+#define REALLOC_INCREMENT 100