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 */
time_t last_mtime; /* For checking whether the room was modified... */
long *msgids;
unsigned int *flags;
- char *transmitted_message; /* for APPEND command... */
- size_t transmitted_length;
+ 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 */
char cached_bodypart[SIZ];
long cached_bodymsgnum;
char cached_body_withbody; /* 1 = body cached; 0 = only headers cached */
-};
+} citimap;
/*
* values of 'authstate'
imap_as_normal,
imap_as_expecting_username,
imap_as_expecting_password,
- imap_as_expecting_plainauth
+ imap_as_expecting_plainauth,
+ imap_as_expecting_multilineusername,
+ imap_as_expecting_multilinepassword
};
/* Flags for the above struct. Note that some of these are for internal use,
#define IMAP_RECENT 64 /* reportable but not setable */
-#define IMAP CC->IMAP
+#define IMAP ((citimap *)CC->session_specific_data)
/*
* When loading arrays of message ID's into memory, increase the buffer to