NeoMutt  2021-02-05-666-ge300cd
Teaching an old dog new tricks
DOXYGEN
adata.h
Go to the documentation of this file.
1 
23 #ifndef MUTT_IMAP_ADATA_H
24 #define MUTT_IMAP_ADATA_H
25 
26 #include <stdbool.h>
27 #include <time.h>
28 #include "private.h" // IWYU pragma: keep
29 #include "mutt/lib.h"
30 
31 struct Account;
32 struct Mailbox;
33 
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;
61 
62  bool unicode;
63  bool qresync;
64 
65  // if set, the response parser will store results for complicated commands here
67 
68  /* command queue */
69  struct ImapCommand *cmds;
70  int cmdslots;
71  int nextcmd;
72  int lastcmd;
73  struct Buffer cmdbuf;
74 
75  char delim;
76  struct Mailbox *mailbox;
78  struct Account *account;
79 };
80 
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);
84 
85 #endif /* MUTT_IMAP_ADATA_H */
struct ImapCommand * cmds
Definition: adata.h:69
unsigned int seqno
tag sequence number, e.g. &#39;{seqid}0001&#39;
Definition: adata.h:57
unsigned char state
ImapState, e.g. IMAP_AUTHENTICATED.
Definition: adata.h:44
int lastcmd
Definition: adata.h:72
A group of associated Mailboxes.
Definition: account.h:36
String manipulation buffer.
Definition: buffer.h:33
struct Mailbox * mailbox
Current selected mailbox.
Definition: adata.h:76
char * capstr
Definition: adata.h:54
Items in an IMAP browser.
Definition: private.h:148
size_t blen
Definition: adata.h:60
unsigned char seqid
tag sequence prefix
Definition: adata.h:56
int nextcmd
Definition: adata.h:71
struct Buffer cmdbuf
Definition: adata.h:73
struct Mailbox * prev_mailbox
Previously selected mailbox.
Definition: adata.h:77
IMAP command structure.
Definition: private.h:159
char delim
Definition: adata.h:75
Shared constants/structs that are private to IMAP.
struct ImapAccountData * imap_adata_new(struct Account *a)
Allocate and initialise a new ImapAccountData structure.
Definition: adata.c:66
bool closing
If true, we are waiting for CLOSE completion.
Definition: adata.h:43
struct Account * account
Parent Account.
Definition: adata.h:78
A mailbox.
Definition: mailbox.h:81
int cmdslots
Definition: adata.h:70
unsigned char status
ImapFlags, e.g. IMAP_FATAL.
Definition: adata.h:45
bool qresync
true, if QRESYNC is successfully ENABLE&#39;d
Definition: adata.h:63
ImapCapFlags capabilities
Definition: adata.h:55
time_t lastread
last time we read a command for the server
Definition: adata.h:58
void imap_adata_free(void **ptr)
Free the private Account data - Implements Account::adata_free()
Definition: adata.c:40
uint32_t ImapCapFlags
Capabilities we are interested in.
Definition: private.h:121
IMAP-specific Account data -.
Definition: adata.h:39
char * buf
Definition: adata.h:59
bool recovering
Definition: adata.h:42
struct ImapAccountData * imap_adata_get(struct Mailbox *m)
Get the Account data for this mailbox.
Definition: adata.c:90
struct ImapList * cmdresult
Definition: adata.h:66
Convenience wrapper for the library headers.
bool unicode
If true, we can send UTF-8, and the server will use UTF8 rather than mUTF7.
Definition: adata.h:62
struct Connection * conn
Definition: adata.h:41