NeoMutt  2021-02-05-666-ge300cd
Teaching an old dog new tricks
DOXYGEN
mdata.h
Go to the documentation of this file.
1 
23 #ifndef MUTT_IMAP_MDATA_H
24 #define MUTT_IMAP_MDATA_H
25 
26 #include <stdint.h>
27 #include "private.h" // IWYU pragma: keep
28 #include "mutt/lib.h"
29 
30 struct Mailbox;
31 struct ImapAccountData;
32 
39 {
40  char *name;
41  char *munge_name;
42  char *real_name;
43 
46  unsigned int new_mail_count;
47 
48  // IMAP STATUS information
49  struct ListHead flags;
50  uint32_t uidvalidity;
51  unsigned int uid_next;
52  unsigned long long modseq;
53  unsigned int messages;
54  unsigned int recent;
55  unsigned int unseen;
56 
57  // Cached data used only when the mailbox is opened
59  ARRAY_HEAD(MSN, struct Email *) msn;
60  struct BodyCache *bcache;
61 
63 };
64 
65 void imap_mdata_free(void **ptr);
66 struct ImapMboxData *imap_mdata_get (struct Mailbox *m);
67 struct ImapMboxData *imap_mdata_new (struct ImapAccountData *adata, const char* name);
68 
69 #endif /* MUTT_IMAP_MDATA_H */
void imap_mdata_free(void **ptr)
Free the private Mailbox data - Implements Mailbox::mdata_free()
Definition: mdata.c:40
The envelope/body of an email.
Definition: email.h:37
A Hash Table.
Definition: hash.h:87
uint32_t uidvalidity
Definition: mdata.h:50
ImapOpenFlags reopen
Flags, e.g. IMAP_REOPEN_ALLOW.
Definition: mdata.h:44
struct ImapMboxData * imap_mdata_get(struct Mailbox *m)
Get the Mailbox data for this mailbox.
Definition: mdata.c:59
header cache structure
Definition: lib.h:84
struct HeaderCache * hcache
Definition: mdata.h:62
uint8_t ImapOpenFlags
Flags, e.g. MUTT_THREAD_COLLAPSE.
Definition: private.h:64
unsigned int new_mail_count
Set when EXISTS notifies of new mail.
Definition: mdata.h:46
struct BodyCache * bcache
Definition: mdata.h:60
ImapOpenFlags check_status
Flags, e.g. IMAP_NEWMAIL_PENDING.
Definition: mdata.h:45
struct ImapMboxData * imap_mdata_new(struct ImapAccountData *adata, const char *name)
Allocate and initialise a new ImapMboxData structure.
Definition: mdata.c:72
Shared constants/structs that are private to IMAP.
unsigned long long modseq
Definition: mdata.h:52
struct HashTable * uid_hash
Definition: mdata.h:58
A mailbox.
Definition: mailbox.h:81
struct ListHead flags
Definition: mdata.h:49
char * name
Mailbox name.
Definition: mdata.h:40
char * real_name
Original Mailbox name, e.g.: INBOX can be just \0.
Definition: mdata.h:42
Local cache of email bodies.
Definition: bcache.c:50
IMAP-specific Account data -.
Definition: adata.h:39
unsigned int uid_next
Definition: mdata.h:51
IMAP-specific Mailbox data -.
Definition: mdata.h:38
unsigned int unseen
Definition: mdata.h:55
unsigned int recent
Definition: mdata.h:54
Convenience wrapper for the library headers.
char * munge_name
Munged version of the mailbox name.
Definition: mdata.h:41
ARRAY_HEAD(MSN, struct Email *) msn
look up headers by (MSN-1)
unsigned int messages
Definition: mdata.h:53