NeoMutt  2019-12-07-168-gc45f47
Teaching an old dog new tricks
DOXYGEN
imap_private.h
Go to the documentation of this file.
1 
25 #ifndef MUTT_IMAP_IMAP_PRIVATE_H
26 #define MUTT_IMAP_IMAP_PRIVATE_H
27 
28 #include "config.h"
29 #include <stdbool.h>
30 #include <stdint.h>
31 #include <stdio.h>
32 #include <time.h>
33 #include "mutt/lib.h"
34 #include "config/lib.h"
35 #include "conn/lib.h"
36 #include "hcache/lib.h"
37 
38 struct Email;
39 struct Mailbox;
40 struct Message;
41 struct Progress;
42 
43 #define IMAP_PORT 143
44 #define IMAP_SSL_PORT 993
45 
46 /* logging levels */
47 #define IMAP_LOG_CMD 2
48 #define IMAP_LOG_LTRL 3
49 #define IMAP_LOG_PASS 5
50 
51 /* IMAP command responses. Used in ImapCommand.state too */
52 #define IMAP_RES_NO -2
53 #define IMAP_RES_BAD -1
54 #define IMAP_RES_OK 0
55 #define IMAP_RES_CONTINUE 1
56 #define IMAP_RES_RESPOND 2
57 #define IMAP_RES_NEW 3
58 
59 #define SEQ_LEN 16
60 #define IMAP_MAX_CMDLEN 1024
61 
62 typedef uint8_t ImapOpenFlags;
63 #define IMAP_OPEN_NO_FLAGS 0
64 #define IMAP_REOPEN_ALLOW (1 << 0)
65 #define IMAP_EXPUNGE_EXPECTED (1 << 1)
66 #define IMAP_EXPUNGE_PENDING (1 << 2)
67 #define IMAP_NEWMAIL_PENDING (1 << 3)
68 #define IMAP_FLAGS_PENDING (1 << 4)
69 
70 typedef uint8_t ImapCmdFlags;
71 #define IMAP_CMD_NO_FLAGS 0
72 #define IMAP_CMD_PASS (1 << 0)
73 #define IMAP_CMD_QUEUE (1 << 1)
74 #define IMAP_CMD_POLL (1 << 2)
75 
76 
80 {
84 };
85 
86 /* length of "DD-MMM-YYYY HH:MM:SS +ZZzz" (null-terminated) */
87 #define IMAP_DATELEN 27
88 
93 {
94  IMAP_FATAL = 1,
96 };
97 
102 {
103  /* States */
108 
109  /* and pseudo-states */
111 };
112 
118 typedef uint32_t ImapCapFlags;
119 #define IMAP_CAP_NO_FLAGS 0
120 #define IMAP_CAP_IMAP4 (1 << 0)
121 #define IMAP_CAP_IMAP4REV1 (1 << 1)
122 #define IMAP_CAP_STATUS (1 << 2)
123 #define IMAP_CAP_ACL (1 << 3)
124 #define IMAP_CAP_NAMESPACE (1 << 4)
125 #define IMAP_CAP_AUTH_CRAM_MD5 (1 << 5)
126 #define IMAP_CAP_AUTH_GSSAPI (1 << 6)
127 #define IMAP_CAP_AUTH_ANONYMOUS (1 << 7)
128 #define IMAP_CAP_AUTH_OAUTHBEARER (1 << 8)
129 #define IMAP_CAP_STARTTLS (1 << 9)
130 #define IMAP_CAP_LOGINDISABLED (1 << 10)
131 #define IMAP_CAP_IDLE (1 << 11)
132 #define IMAP_CAP_SASL_IR (1 << 12)
133 #define IMAP_CAP_ENABLE (1 << 13)
134 #define IMAP_CAP_CONDSTORE (1 << 14)
135 #define IMAP_CAP_QRESYNC (1 << 15)
136 #define IMAP_CAP_LIST_EXTENDED (1 << 16)
137 #define IMAP_CAP_COMPRESS (1 << 17)
138 #define IMAP_CAP_X_GM_EXT_1 (1 << 18)
139 
140 #define IMAP_CAP_ALL ((1 << 19) - 1)
141 
145 struct ImapList
146 {
147  char *name;
148  char delim;
149  bool noselect;
151 };
152 
157 {
158  char seq[SEQ_LEN + 1];
159  int state;
160 };
161 
168 {
169  struct Connection *conn;
171  bool closing; /* If true, we are waiting for CLOSE completion */
172  unsigned char state;
173  unsigned char status;
174  /* let me explain capstr: SASL needs the capability string (not bits).
175  * we have 3 options:
176  * 1. rerun CAPABILITY inside SASL function.
177  * 2. build appropriate CAPABILITY string by reverse-engineering from bits.
178  * 3. keep a copy until after authentication.
179  * I've chosen (3) for now. (2) might not be too bad, but it involves
180  * tracking all possible capabilities. bah. (1) I don't like because
181  * it's just no fun to get the same information twice */
182  char *capstr;
184  unsigned char seqid; /* tag sequence prefix */
185  unsigned int seqno;
186  time_t lastread;
187  char *buf;
188  size_t blen;
189 
190  bool unicode; /* If true, we can send UTF-8, and the server will use UTF8 rather than mUTF7 */
191  bool qresync; /* true, if QRESYNC is successfully ENABLE'd */
192 
193  /* if set, the response parser will store results for complicated commands
194  * here. */
196 
197  /* command queue */
198  struct ImapCommand *cmds;
199  int cmdslots;
200  int nextcmd;
201  int lastcmd;
202  struct Buffer cmdbuf;
203 
204  char delim;
205  struct Mailbox *mailbox; /* Current selected mailbox */
206  struct Account *account;
207 };
208 
215 {
216  char *name;
217  char *munge_name;
218  char *real_name;
219 
222  unsigned int new_mail_count;
223 
224  // IMAP STATUS information
225  struct ListHead flags;
226  unsigned int uid_validity;
227  unsigned int uid_next;
228  unsigned long long modseq;
229  unsigned int messages;
230  unsigned int recent;
231  unsigned int unseen;
232 
233  // Cached data used only when the mailbox is opened
234  struct Hash *uid_hash;
235  struct Email **msn_index;
236  size_t msn_index_size;
237  unsigned int max_msn;
238  struct BodyCache *bcache;
239 
241 };
242 
247 {
248  char *full_seqset;
249  char *eostr;
250  int in_range;
251  int down;
252  unsigned int range_cur;
253  unsigned int range_end;
254  char *substr_cur;
255  char *substr_end;
256 };
257 
258 /* -- private IMAP functions -- */
259 /* imap.c */
260 int imap_create_mailbox(struct ImapAccountData *adata, char *mailbox);
261 int imap_rename_mailbox(struct ImapAccountData *adata, char *oldname, const char *newname);
262 int imap_exec_msgset(struct Mailbox *m, const char *pre, const char *post,
263  int flag, bool changed, bool invert);
264 int imap_open_connection(struct ImapAccountData *adata);
265 void imap_close_connection(struct ImapAccountData *adata);
266 int imap_read_literal(FILE *fp, struct ImapAccountData *adata, unsigned long bytes, struct Progress *pbar);
267 void imap_expunge_mailbox(struct Mailbox *m);
268 int imap_login(struct ImapAccountData *adata);
269 int imap_sync_message_for_copy(struct Mailbox *m, struct Email *e, struct Buffer *cmd, enum QuadOption *err_continue);
270 bool imap_has_flag(struct ListHead *flag_list, const char *flag);
271 int imap_adata_find(const char *path, struct ImapAccountData **adata, struct ImapMboxData **mdata);
272 
273 /* auth.c */
274 int imap_authenticate(struct ImapAccountData *adata);
275 
276 /* command.c */
277 int imap_cmd_start(struct ImapAccountData *adata, const char *cmdstr);
278 int imap_cmd_step(struct ImapAccountData *adata);
279 void imap_cmd_finish(struct ImapAccountData *adata);
280 bool imap_code(const char *s);
281 const char *imap_cmd_trailer(struct ImapAccountData *adata);
282 int imap_exec(struct ImapAccountData *adata, const char *cmdstr, ImapCmdFlags flags);
283 int imap_cmd_idle(struct ImapAccountData *adata);
284 
285 /* message.c */
286 void imap_edata_free(void **ptr);
287 struct ImapEmailData *imap_edata_get(struct Email *e);
288 int imap_read_headers(struct Mailbox *m, unsigned int msn_begin, unsigned int msn_end, bool initial_download);
289 char *imap_set_flags(struct Mailbox *m, struct Email *e, char *s, bool *server_changes);
290 int imap_cache_del(struct Mailbox *m, struct Email *e);
291 int imap_cache_clean(struct Mailbox *m);
292 int imap_append_message(struct Mailbox *m, struct Message *msg);
293 
294 int imap_msg_open(struct Mailbox *m, struct Message *msg, int msgno);
295 int imap_msg_close(struct Mailbox *m, struct Message *msg);
296 int imap_msg_commit(struct Mailbox *m, struct Message *msg);
297 int imap_msg_save_hcache(struct Mailbox *m, struct Email *e);
298 
299 /* util.c */
300 struct ImapAccountData *imap_adata_get(struct Mailbox *m);
301 struct ImapMboxData *imap_mdata_get(struct Mailbox *m);
302 #ifdef USE_HCACHE
304 void imap_hcache_close(struct ImapMboxData *mdata);
305 struct Email *imap_hcache_get(struct ImapMboxData *mdata, unsigned int uid);
306 int imap_hcache_put(struct ImapMboxData *mdata, struct Email *e);
307 int imap_hcache_del(struct ImapMboxData *mdata, unsigned int uid);
308 int imap_hcache_store_uid_seqset(struct ImapMboxData *mdata);
309 int imap_hcache_clear_uid_seqset(struct ImapMboxData *mdata);
310 char *imap_hcache_get_uid_seqset(struct ImapMboxData *mdata);
311 #endif
312 
313 enum QuadOption imap_continue(const char *msg, const char *resp);
314 void imap_error(const char *where, const char *msg);
315 struct ImapAccountData *imap_adata_new(struct Account *a);
316 void imap_adata_free(void **ptr);
317 struct ImapMboxData *imap_mdata_new(struct ImapAccountData *adata, const char* name);
318 void imap_mdata_free(void **ptr);
320 char *imap_fix_path(char delim, const char *mailbox, char *path, size_t plen);
321 void imap_cachepath(char delim, const char *mailbox, struct Buffer *dest);
322 int imap_get_literal_count(const char *buf, unsigned int *bytes);
323 char *imap_get_qualifier(char *buf);
324 char *imap_next_word(char *s);
325 void imap_qualify_path(char *buf, size_t buflen, struct ConnAccount *conn_account, char *path);
326 void imap_quote_string(char *dest, size_t dlen, const char *src, bool quote_backtick);
327 void imap_unquote_string(char *s);
328 void imap_munge_mbox_name(bool unicode, char *dest, size_t dlen, const char *src);
329 void imap_unmunge_mbox_name(bool unicode, char *s);
330 struct SeqsetIterator *mutt_seqset_iterator_new(const char *seqset);
331 int mutt_seqset_iterator_next(struct SeqsetIterator *iter, unsigned int *next);
332 void mutt_seqset_iterator_free(struct SeqsetIterator **ptr);
333 bool imap_account_match(const struct ConnAccount *a1, const struct ConnAccount *a2);
334 void imap_get_parent(const char *mbox, char delim, char *buf, size_t buflen);
335 bool mutt_account_match(const struct ConnAccount *a1, const struct ConnAccount *a2);
336 
337 /* utf7.c */
338 void imap_utf_encode(bool unicode, char **s);
339 void imap_utf_decode(bool unicode, char **s);
340 void imap_allow_reopen(struct Mailbox *m);
341 void imap_disallow_reopen(struct Mailbox *m);
342 
343 #endif /* MUTT_IMAP_IMAP_PRIVATE_H */
void imap_utf_decode(bool unicode, char **s)
Decode email from UTF-8 to local charset.
Definition: utf7.c:345
struct ImapAccountData * imap_adata_new(struct Account *a)
Allocate and initialise a new ImapAccountData structure.
Definition: util.c:98
struct ImapCommand * cmds
Definition: imap_private.h:198
header_cache_t * imap_hcache_open(struct ImapAccountData *adata, struct ImapMboxData *mdata)
Open a header cache.
Definition: util.c:443
void imap_quote_string(char *dest, size_t dlen, const char *src, bool quote_backtick)
quote string according to IMAP rules
Definition: util.c:985
The envelope/body of an email.
Definition: email.h:37
void imap_disallow_reopen(struct Mailbox *m)
Disallow re-opening a folder upon expunge.
Definition: util.c:1177
struct Email ** msn_index
look up headers by (MSN-1)
Definition: imap_private.h:235
int imap_hcache_put(struct ImapMboxData *mdata, struct Email *e)
Add an entry to the header cache.
Definition: util.c:526
int imap_cmd_start(struct ImapAccountData *adata, const char *cmdstr)
Given an IMAP command, send it to the server.
Definition: command.c:1086
struct ImapEmailData * imap_edata_get(struct Email *e)
Get the private data for this Email.
Definition: message.c:100
ImapExecResult
imap_exec return code
Definition: imap_private.h:79
A Hash Table.
Definition: hash.h:61
Mailbox is selected.
Definition: imap_private.h:107
unsigned int seqno
tag sequence number, e.g. &#39;{seqid}0001&#39;
Definition: imap_private.h:185
int imap_cmd_idle(struct ImapAccountData *adata)
Enter the IDLE state.
Definition: command.c:1387
void imap_mdata_free(void **ptr)
Release and clear storage in an ImapMboxData structure.
Definition: util.c:232
void imap_unmunge_mbox_name(bool unicode, char *s)
Remove quoting from a mailbox name.
Definition: util.c:1076
static size_t plen
Length of cached packet.
Definition: pgppacket.c:39
unsigned char state
ImapState, e.g. IMAP_AUTHENTICATED.
Definition: imap_private.h:172
void imap_munge_mbox_name(bool unicode, char *dest, size_t dlen, const char *src)
Quote awkward characters in a mailbox name.
Definition: util.c:1059
void imap_qualify_path(char *buf, size_t buflen, struct ConnAccount *conn_account, char *path)
Make an absolute IMAP folder target.
Definition: util.c:968
size_t msn_index_size
allocation size
Definition: imap_private.h:236
char * imap_set_flags(struct Mailbox *m, struct Email *e, char *s, bool *server_changes)
fill the message header according to the server flags
Definition: message.c:1810
ImapOpenFlags reopen
Flags, e.g. IMAP_REOPEN_ALLOW.
Definition: imap_private.h:220
void imap_adata_free(void **ptr)
Release and clear storage in an ImapAccountData structure.
Definition: util.c:72
A group of associated Mailboxes.
Definition: account.h:36
struct SeqsetIterator * mutt_seqset_iterator_new(const char *seqset)
Create a new Sequence Set Iterator.
Definition: util.c:1223
An open network connection (socket)
Definition: connection.h:34
String manipulation buffer.
Definition: buffer.h:33
void imap_edata_free(void **ptr)
free ImapHeader structure
Definition: message.c:74
struct Mailbox * mailbox
Definition: imap_private.h:205
Items in an IMAP browser.
Definition: imap_private.h:145
int imap_hcache_del(struct ImapMboxData *mdata, unsigned int uid)
Delete an item from the header cache.
Definition: util.c:544
int imap_rename_mailbox(struct ImapAccountData *adata, char *oldname, const char *newname)
Rename a mailbox.
Definition: imap.c:622
int imap_msg_commit(struct Mailbox *m, struct Message *msg)
Save changes to an email - Implements MxOps::msg_commit()
Definition: message.c:2073
struct ImapMboxData * imap_mdata_new(struct ImapAccountData *adata, const char *name)
Allocate and initialise a new ImapMboxData structure.
Definition: util.c:171
int imap_msg_close(struct Mailbox *m, struct Message *msg)
Close an email - Implements MxOps::msg_close()
Definition: message.c:2087
char delim
Definition: imap_private.h:148
A progress bar.
Definition: progress.h:49
int imap_msg_save_hcache(struct Mailbox *m, struct Email *e)
Save message to the header cache - Implements MxOps::msg_save_hcache()
Definition: message.c:2095
int imap_open_connection(struct ImapAccountData *adata)
Open an IMAP connection.
Definition: imap.c:859
unsigned int max_msn
the largest MSN fetched so far
Definition: imap_private.h:237
Convenience wrapper for the config headers.
unsigned char seqid
Definition: imap_private.h:184
unsigned int new_mail_count
Set when EXISTS notifies of new mail.
Definition: imap_private.h:222
int imap_login(struct ImapAccountData *adata)
Open an IMAP connection.
Definition: imap.c:1962
struct BodyCache * bcache
Definition: imap_private.h:238
Imap command executed or queued successfully.
Definition: imap_private.h:81
bool imap_has_flag(struct ListHead *flag_list, const char *flag)
Does the flag exist in the list.
Definition: imap.c:974
header_cache_t * hcache
Definition: imap_private.h:240
Connection is idle.
Definition: imap_private.h:110
struct ImapMboxData * imap_mdata_get(struct Mailbox *m)
Get the Mailbox data for this mailbox.
Definition: util.c:251
Header cache multiplexor.
bool imap_account_match(const struct ConnAccount *a1, const struct ConnAccount *a2)
Compare two Accounts.
Definition: util.c:1192
int imap_create_mailbox(struct ImapAccountData *adata, char *mailbox)
Create a new mailbox.
Definition: imap.c:581
int imap_adata_find(const char *path, struct ImapAccountData **adata, struct ImapMboxData **mdata)
Find the Account data for this path.
Definition: util.c:135
unsigned int range_end
Definition: imap_private.h:253
bool imap_code(const char *s)
Was the command successful.
Definition: command.c:1221
void imap_cmd_finish(struct ImapAccountData *adata)
Attempt to perform cleanup.
Definition: command.c:1324
ImapOpenFlags check_status
Flags, e.g. IMAP_NEWMAIL_PENDING.
Definition: imap_private.h:221
IMAP command structure.
Definition: imap_private.h:156
char * imap_hcache_get_uid_seqset(struct ImapMboxData *mdata)
Get a UID Sequence Set from the header cache.
Definition: util.c:597
void imap_hcache_close(struct ImapMboxData *mdata)
Close the header cache.
Definition: util.c:480
void * mdata
Driver specific data.
Definition: mailbox.h:135
unsigned long long modseq
Definition: imap_private.h:228
uint8_t ImapOpenFlags
Flags, e.g. MUTT_THREAD_COLLAPSE.
Definition: imap_private.h:62
void imap_utf_encode(bool unicode, char **s)
Encode email from local charset to UTF-8.
Definition: utf7.c:316
void mutt_seqset_iterator_free(struct SeqsetIterator **ptr)
Free a Sequence Set Iterator.
Definition: util.c:1303
char * imap_next_word(char *s)
Find where the next IMAP word begins.
Definition: util.c:937
void imap_expunge_mailbox(struct Mailbox *m)
Purge messages from the server.
Definition: imap.c:788
ImapFlags
IMAP server responses.
Definition: imap_private.h:92
struct Account * account
Parent Account.
Definition: imap_private.h:206
A local copy of an email.
Definition: mx.h:83
A mailbox.
Definition: mailbox.h:80
#define SEQ_LEN
Definition: imap_private.h:59
struct Hash * uid_hash
Definition: imap_private.h:234
const char * imap_cmd_trailer(struct ImapAccountData *adata)
Extra information after tagged command response if any.
Definition: command.c:1232
char * name
Definition: imap_private.h:147
int imap_authenticate(struct ImapAccountData *adata)
Authenticate to an IMAP server.
Definition: auth.c:68
uint32_t ImapCapFlags
typedef ImapCapFlags - Capabilities we are interested in
Definition: imap_private.h:118
int imap_cmd_step(struct ImapAccountData *adata)
Reads server responses from an IMAP command.
Definition: command.c:1100
unsigned char status
ImapFlags, e.g. IMAP_FATAL.
Definition: imap_private.h:173
void imap_error(const char *where, const char *msg)
show an error and abort
Definition: util.c:804
void imap_unquote_string(char *s)
equally stupid unquoting routine
Definition: util.c:1022
int imap_sync_message_for_copy(struct Mailbox *m, struct Email *e, struct Buffer *cmd, enum QuadOption *err_continue)
Update server to reflect the flags of a single message.
Definition: imap.c:1101
Connection is authenticated.
Definition: imap_private.h:106
char * name
Mailbox name.
Definition: imap_private.h:216
Imap connection failure.
Definition: imap_private.h:83
struct ImapAccountData * imap_adata_get(struct Mailbox *m)
Get the Account data for this mailbox.
Definition: util.c:120
int imap_msg_open(struct Mailbox *m, struct Message *msg, int msgno)
Open an email message in a Mailbox - Implements MxOps::msg_open()
Definition: message.c:1867
struct Email * imap_hcache_get(struct ImapMboxData *mdata, unsigned int uid)
Get a header cache entry by its UID.
Definition: util.c:496
char * imap_fix_path(char delim, const char *mailbox, char *path, size_t plen)
Fix up the imap path.
Definition: util.c:823
ImapCapFlags capabilities
Definition: imap_private.h:183
time_t lastread
last time we read a command for the server
Definition: imap_private.h:186
char * imap_get_qualifier(char *buf)
Get the qualifier from a tagged response.
Definition: util.c:920
Login details for a remote server.
Definition: connaccount.h:58
bool noinferiors
Definition: imap_private.h:150
char * real_name
Original Mailbox name, e.g.: INBOX can be just \0.
Definition: imap_private.h:218
int imap_append_message(struct Mailbox *m, struct Message *msg)
Write an email back to the server.
Definition: message.c:1459
unsigned int uid_validity
Definition: imap_private.h:226
int imap_hcache_clear_uid_seqset(struct ImapMboxData *mdata)
Delete a UID Sequence Set from the header cache.
Definition: util.c:583
Local cache of email bodies.
Definition: bcache.c:49
int imap_exec_msgset(struct Mailbox *m, const char *pre, const char *post, int flag, bool changed, bool invert)
Prepare commands for all messages matching conditions.
Definition: imap.c:1023
int imap_read_literal(FILE *fp, struct ImapAccountData *adata, unsigned long bytes, struct Progress *pbar)
Read bytes bytes from server into file.
Definition: imap.c:730
IMAP-specific Account data -.
Definition: imap_private.h:167
unsigned int uid_next
Definition: imap_private.h:227
int imap_exec(struct ImapAccountData *adata, const char *cmdstr, ImapCmdFlags flags)
Execute a command and wait for the response from the server.
Definition: command.c:1270
IMAP-specific Mailbox data -.
Definition: imap_private.h:214
int state
Command state, e.g. IMAP_RES_NEW.
Definition: imap_private.h:159
int imap_get_literal_count(const char *buf, unsigned int *bytes)
write number of bytes in an IMAP literal into bytes
Definition: util.c:893
int imap_read_headers(struct Mailbox *m, unsigned int msn_begin, unsigned int msn_end, bool initial_download)
Read headers from the server.
Definition: message.c:1274
int mutt_seqset_iterator_next(struct SeqsetIterator *iter, unsigned int *next)
Get the next UID from a Sequence Set.
Definition: util.c:1244
Connection Library.
void imap_allow_reopen(struct Mailbox *m)
Allow re-opening a folder upon expunge.
Definition: util.c:1164
ImapState
IMAP connection state.
Definition: imap_private.h:101
struct ImapList * cmdresult
Definition: imap_private.h:195
Connected to server.
Definition: imap_private.h:105
IMAP-specific Email data -.
Definition: message.h:33
unsigned int unseen
Definition: imap_private.h:231
unsigned int recent
Definition: imap_private.h:230
header cache structure
Definition: lib.h:67
Convenience wrapper for the library headers.
uint8_t ImapCmdFlags
Flags for imap_exec(), e.g. IMAP_CMD_PASS.
Definition: imap_private.h:70
char * munge_name
Munged version of the mailbox name.
Definition: imap_private.h:217
Unrecoverable error occurred.
Definition: imap_private.h:94
Logged out from server.
Definition: imap_private.h:95
char * full_seqset
Definition: imap_private.h:248
void imap_mdata_cache_reset(struct ImapMboxData *mdata)
Release and clear cache data of ImapMboxData structure.
Definition: util.c:219
int imap_cache_del(struct Mailbox *m, struct Email *e)
Delete an email from the body cache.
Definition: message.c:1759
Disconnected from server.
Definition: imap_private.h:104
unsigned int range_cur
Definition: imap_private.h:252
enum QuadOption imap_continue(const char *msg, const char *resp)
display a message and ask the user if they want to go on
Definition: util.c:793
bool mutt_account_match(const struct ConnAccount *a1, const struct ConnAccount *a2)
QuadOption
Possible values for a quad-option.
Definition: quad.h:36
bool noselect
Definition: imap_private.h:149
unsigned int messages
Definition: imap_private.h:229
UID Sequence Set Iterator.
Definition: imap_private.h:246
int msgno
Number displayed to the user.
Definition: email.h:86
void imap_close_connection(struct ImapAccountData *adata)
Close an IMAP connection.
Definition: imap.c:949
int imap_cache_clean(struct Mailbox *m)
Delete all the entries in the message cache.
Definition: message.c:1778
void imap_cachepath(char delim, const char *mailbox, struct Buffer *dest)
Generate a cache path for a mailbox.
Definition: util.c:864
struct Connection * conn
Definition: imap_private.h:169
void imap_get_parent(const char *mbox, char delim, char *buf, size_t buflen)
Get an IMAP folder&#39;s parent.
Definition: util.c:265
Imap command failure.
Definition: imap_private.h:82
int imap_hcache_store_uid_seqset(struct ImapMboxData *mdata)
Store a UID Sequence Set in the header cache.
Definition: util.c:561