NeoMutt  2025-12-11-276-g10b23b
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
adata.h
Go to the documentation of this file.
1
22
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"
29#include "mutt/lib.h"
30
31struct Account;
32struct Mailbox;
33
40{
41 struct Connection *conn;
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 time_t last_success;
60 char *buf;
61 size_t blen;
62
63 bool unicode;
64 bool qresync;
65
66 /* Reconnection state */
67 unsigned char retry_count;
68
70
71 /* command queue */
72 struct ImapCommand *cmds;
74 int nextcmd;
75 int lastcmd;
76 struct Buffer cmdbuf;
77
78 char delim;
79 struct Mailbox *mailbox;
81 struct Account *account;
82};
83
84void imap_adata_free(void **ptr);
85struct ImapAccountData *imap_adata_get (struct Mailbox *m);
86struct ImapAccountData *imap_adata_new (struct Account *a);
87
88#endif /* MUTT_IMAP_ADATA_H */
void imap_adata_free(void **ptr)
Free the private Account data - Implements Account::adata_free() -.
Definition adata.c:69
struct ImapAccountData * imap_adata_new(struct Account *a)
Allocate and initialise a new ImapAccountData structure.
Definition adata.c:98
struct ImapAccountData * imap_adata_get(struct Mailbox *m)
Get the Account data for this mailbox.
Definition adata.c:123
Shared constants/structs that are private to IMAP.
uint32_t ImapCapFlags
Capabilities we are interested in.
Definition private.h:119
Convenience wrapper for the library headers.
A group of associated Mailboxes.
Definition account.h:36
String manipulation buffer.
Definition buffer.h:36
IMAP-specific Account data -.
Definition adata.h:40
char delim
Path delimiter.
Definition adata.h:78
struct Mailbox * prev_mailbox
Previously selected mailbox.
Definition adata.h:80
bool qresync
true, if QRESYNC is successfully ENABLE'd
Definition adata.h:64
struct ImapList * cmdresult
Resuls of complicated commands.
Definition adata.h:69
int lastcmd
Last command in the queue.
Definition adata.h:75
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:63
ImapCapFlags capabilities
Capability flags.
Definition adata.h:55
struct Account * account
Parent Account.
Definition adata.h:81
size_t blen
Command buffer length.
Definition adata.h:61
int nextcmd
Next command to be sent.
Definition adata.h:74
unsigned char state
ImapState, e.g. IMAP_AUTHENTICATED.
Definition adata.h:44
struct Mailbox * mailbox
Current selected mailbox.
Definition adata.h:79
char * capstr
Capability string from the server.
Definition adata.h:54
struct ImapCommand * cmds
Queue of commands for the server.
Definition adata.h:72
unsigned char status
ImapFlags, e.g. IMAP_FATAL.
Definition adata.h:45
unsigned char retry_count
Number of consecutive reconnection attempts.
Definition adata.h:67
time_t last_success
last time a command completed successfully
Definition adata.h:59
int cmdslots
Size of the command queue.
Definition adata.h:73
char * buf
Command buffer.
Definition adata.h:60
unsigned int seqno
tag sequence number, e.g. '{seqid}0001'
Definition adata.h:57
bool recovering
Recovering after a fatal error.
Definition adata.h:42
struct Connection * conn
Connection to IMAP server.
Definition adata.h:41
struct Buffer cmdbuf
Command queue.
Definition adata.h:76
IMAP command structure.
Definition private.h:160
Items in an IMAP browser.
Definition private.h:149
A mailbox.
Definition mailbox.h:78