aboutsummaryrefslogtreecommitdiff
path: root/lib/imap.h
diff options
context:
space:
mode:
authorJiri Hruska <jirka@fud.cz>2013-02-23 10:29:40 +0100
committerSteve Holme <steve_holme@hotmail.com>2013-02-23 11:27:02 +0000
commit2476b34b95596ec16aab09c85133bc7eddd8ca53 (patch)
tree6aa1ba076d4ac7bf58999b1c3197d3ab9b672222 /lib/imap.h
parent3906353b415a1dd82baf9d6513f46b18308966d8 (diff)
imap: Introduced a custom IMAP structure for per-request data
Created a new IMAP structure and changed the type of the imap proto variable in connectdata from FTP* to the new IMAP*. Moved the mailbox variable from the per-connection struct imap_conn to the new per-request struct and fixed references accordingly.
Diffstat (limited to 'lib/imap.h')
-rw-r--r--lib/imap.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/imap.h b/lib/imap.h
index 31888529a..acec210b0 100644
--- a/lib/imap.h
+++ b/lib/imap.h
@@ -23,6 +23,7 @@
***************************************************************************/
#include "pingpong.h"
+#include "ftp.h"
/****************************************************************************
* IMAP unique setup
@@ -51,11 +52,22 @@ typedef enum {
IMAP_LAST /* never used */
} imapstate;
+/* This IMAP struct is used in the SessionHandle. All IMAP data that is
+ connection-oriented must be in imap_conn to properly deal with the fact that
+ perhaps the SessionHandle is changed between the times the connection is
+ used. */
+struct IMAP {
+ curl_off_t *bytecountp;
+ char *user; /* User name string */
+ char *passwd; /* Password string */
+ curl_ftptransfer transfer;
+ char *mailbox; /* Mailbox to select */
+};
+
/* imap_conn is used for struct connection-oriented data in the connectdata
struct */
struct imap_conn {
struct pingpong pp;
- char *mailbox; /* Mailbox to select */
unsigned int authmechs; /* Accepted authentication mechanisms */
unsigned int authused; /* Auth mechanism used for the connection */
imapstate state; /* Always use imap.c:state() to change state! */