NeoMutt  2021-10-29-220-g2b1eec
Teaching an old dog new tricks
Go to the documentation of this file.
23 #ifndef MUTT_IMAP_ADATA_H
24 #define MUTT_IMAP_ADATA_H
26 #include <stdbool.h>
27 #include <time.h>
28 #include "private.h" // IWYU pragma: keep
29 #include "mutt/lib.h"
31 struct Account;
32 struct Mailbox;
40 {
41  struct Connection *conn;
42  bool recovering;
43  bool closing;
44  unsigned char state;
45  unsigned char status;
46  /* let me explain capstr: SASL needs the capability string (not bits).
47  * we have 3 options:
48  * 1. rerun CAPABILITY inside SASL function.
49  * 2. build appropriate CAPABILITY string by reverse-engineering from bits.
50  * 3. keep a copy until after authentication.
51  * I've chosen (3) for now. (2) might not be too bad, but it involves
52  * tracking all possible capabilities. bah. (1) I don't like because
53  * it's just no fun to get the same information twice */
54  char *capstr;
56  unsigned char seqid;
57  unsigned int seqno;
58  time_t lastread;
59  char *buf;
60  size_t blen;
62  bool unicode;
63  bool qresync;
65  // if set, the response parser will store results for complicated commands here
68  /* command queue */
69  struct ImapCommand *cmds;
70  int cmdslots;
71  int nextcmd;
72  int lastcmd;
73  struct Buffer cmdbuf;
75  char delim;
76  struct Mailbox *mailbox;
78  struct Account *account;
79 };
81 void imap_adata_free(void **ptr);
82 struct ImapAccountData *imap_adata_get (struct Mailbox *m);
83 struct ImapAccountData *imap_adata_new (struct Account *a);
85 #endif /* MUTT_IMAP_ADATA_H */
struct ImapAccountData * imap_adata_get(struct Mailbox *m)
Get the Account data for this mailbox.
Definition: adata.c:90
void imap_adata_free(void **ptr)
Free the private Account data - Implements Account::adata_free()
Definition: adata.c:40
struct ImapAccountData * imap_adata_new(struct Account *a)
Allocate and initialise a new ImapAccountData structure.
Definition: adata.c:66
uint32_t ImapCapFlags
Capabilities we are interested in.
Definition: private.h:121
Convenience wrapper for the library headers.
GUI display the mailboxes in a side panel.
A group of associated Mailboxes.
Definition: account.h:37
String manipulation buffer.
Definition: buffer.h:34
IMAP-specific Account data -.
Definition: adata.h:40
char delim
Path delimiter.
Definition: adata.h:75
struct Mailbox * prev_mailbox
Previously selected mailbox.
Definition: adata.h:77
bool qresync
true, if QRESYNC is successfully ENABLE'd
Definition: adata.h:63
struct ImapList * cmdresult
Definition: adata.h:66
int lastcmd
Last command in the queue.
Definition: adata.h:72
bool closing
If true, we are waiting for CLOSE completion.
Definition: adata.h:43
time_t lastread
last time we read a command for the server
Definition: adata.h:58
unsigned char seqid
tag sequence prefix
Definition: adata.h:56
bool unicode
If true, we can send UTF-8, and the server will use UTF8 rather than mUTF7.
Definition: adata.h:62
ImapCapFlags capabilities
Capability flags.
Definition: adata.h:55
struct Account * account
Parent Account.
Definition: adata.h:78
size_t blen
Definition: adata.h:60
int nextcmd
Next command to be sent.
Definition: adata.h:71
unsigned char state
Definition: adata.h:44
struct Mailbox * mailbox
Current selected mailbox.
Definition: adata.h:76
char * capstr
Capability string from the server.
Definition: adata.h:54
struct ImapCommand * cmds
Queue of commands for the server.
Definition: adata.h:69
unsigned char status
ImapFlags, e.g. IMAP_FATAL.
Definition: adata.h:45
int cmdslots
Size of the command queue.
Definition: adata.h:70
char * buf
Definition: adata.h:59
unsigned int seqno
tag sequence number, e.g. '{seqid}0001'
Definition: adata.h:57
bool recovering
Definition: adata.h:42
struct Connection * conn
Connection to IMAP server.
Definition: adata.h:41
struct Buffer cmdbuf
Definition: adata.h:73
IMAP command structure.
Definition: private.h:161
Items in an IMAP browser.
Definition: private.h:150
A mailbox.
Definition: mailbox.h:82