]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/imap/serv_imap.h
* imap_fetch_rfc822(): migrate to strbuf
[citadel.git] / citadel / modules / imap / serv_imap.h
index ee7d683084cecfe6ce8988ef7af41db2b07b930d..5d96ea95d77c37ee952025e3b991cb64553443fd 100644 (file)
@@ -8,13 +8,14 @@
 void imap_cleanup_function(void);
 void imap_greeting(void);
 void imap_command_loop(void);
-int imap_grabroom(char *returned_roomname, char *foldername, int zapped_ok);
+int imap_grabroom(char *returned_roomname, const char *foldername, int zapped_ok);
 void imap_free_transmitted_message(void);
 int imap_do_expunge(void);
 void imap_rescan_msgids(void);
 
 
-struct citimap {
+
+typedef struct __citimap {
        int authstate;
        char authseq[SIZ];
        int selected;                   /* set to 1 if in the SELECTED state */
@@ -26,10 +27,11 @@ struct citimap {
        unsigned int *flags;
        StrBuf *TransmittedMessage;     /* for APPEND command... */
 
+       citimap_command Cmd;            /* our current commandline */
+
        /* Cache most recent RFC822 FETCH because client might load in pieces */
-       char *cached_rfc822_data;
+       StrBuf *cached_rfc822;
        long cached_rfc822_msgnum;
-       size_t cached_rfc822_len;
        char cached_rfc822_withbody;    /* 1 = body cached; 0 = only headers cached */
 
        /* Cache most recent BODY FETCH because client might load in pieces */
@@ -38,7 +40,7 @@ struct citimap {
        char cached_bodypart[SIZ];
        long cached_bodymsgnum;
        char cached_body_withbody;      /* 1 = body cached; 0 = only headers cached */
-};
+} citimap;
 
 /*
  * values of 'authstate'
@@ -68,7 +70,7 @@ enum {
 #define IMAP_RECENT            64      /* reportable but not setable */
 
 
-#define IMAP ((struct citimap *)CC->session_specific_data)
+#define IMAP ((citimap *)CC->session_specific_data)
 
 /*
  * When loading arrays of message ID's into memory, increase the buffer to