X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=imap%2Fimap_private.h;h=bebfc6a9def216b150895e3a99e33c72fa8f97be;hp=b61b9b2eeba8e6ba614577aaf683d8db06ff70ba;hb=819c071fa7efc8dffb4dd92f36f0111227ff692f;hpb=08fa240d29322ece4c7bceebfae6c6d3fb856f0e;ds=sidebyside diff --git a/imap/imap_private.h b/imap/imap_private.h index b61b9b2..bebfc6a 100644 --- a/imap/imap_private.h +++ b/imap/imap_private.h @@ -11,12 +11,10 @@ #ifndef _IMAP_PRIVATE_H #define _IMAP_PRIVATE_H 1 -#include - -#include +#include +#include #include "imap.h" -#include /* -- symbols -- */ #define IMAP_PORT 143 @@ -99,7 +97,7 @@ enum { /* -- data structures -- */ typedef struct { - unsigned int uid; + int uid; char *path; } IMAP_CACHE; @@ -116,10 +114,9 @@ typedef struct { /* IMAP command structure */ typedef struct { - char seq[SEQLEN + 1]; - char *buf; - unsigned int blen; int state; + char seq[SEQLEN + 1]; + buffer_t buf; } IMAP_COMMAND; typedef struct { @@ -127,6 +124,7 @@ typedef struct { CONNECTION *conn; unsigned char state; unsigned char status; + unsigned char isnew; /* let me explain capstr: SASL needs the capability string (not bits). * we have 3 options: * 1. rerun CAPABILITY inside SASL function. @@ -140,6 +138,7 @@ typedef struct { unsigned int seqno; time_t lastread; /* last time we read a command for the server */ /* who knows, one day we may run multiple commands in parallel */ + IMAP_COMMAND cmd; /* The following data is all specific to the currently SELECTED mbox */ @@ -152,11 +151,11 @@ typedef struct { unsigned int newMailCount; IMAP_CACHE cache[IMAP_CACHE_LEN]; #ifdef USE_HCACHE - unsigned long uid_validity; + long uid_validity; #endif /* all folder flags - system flags AND keywords */ - LIST *flags; + string_list_t *flags; } IMAP_DATA; /* I wish that were called IMAP_CONTEXT :( */ @@ -192,7 +191,7 @@ int imap_code (const char *s); int imap_exec (IMAP_DATA * idata, const char *cmd, int flags); /* message.c */ -void imap_add_keywords (char *s, HEADER * keywords, LIST * mailbox_flags, +void imap_add_keywords (char *s, HEADER * keywords, string_list_t * mailbox_flags, size_t slen); void imap_free_header_data (void **data); int imap_read_headers (IMAP_DATA * idata, int msgbegin, int msgend); @@ -204,7 +203,7 @@ void imap_error (const char *where, const char *msg); IMAP_DATA *imap_new_idata (void); void imap_free_idata (IMAP_DATA ** idata); char *imap_fix_path (IMAP_DATA * idata, char *mailbox, char *path, - size_t plen); + ssize_t plen); int imap_get_literal_count (const char *buf, long *bytes); char *imap_get_qualifier (char *buf); char *imap_next_word (char *s);