NeoMutt
2025-12-11-1039-g550ac6
Teaching an old dog new tricks
DOXYGEN
Toggle main menu visibility
Loading...
Searching...
No Matches
mdata.h
Go to the documentation of this file.
1
22
23
#ifndef MUTT_IMAP_MDATA_H
24
#define MUTT_IMAP_MDATA_H
25
26
#include <stdint.h>
27
#include <time.h>
28
#include "
private.h
"
29
#include "
mutt/lib.h
"
30
31
struct
Mailbox
;
32
struct
ImapAccountData
;
33
39
struct
ImapMboxData
40
{
41
char
*
name
;
42
char
*
munge_name
;
43
char
*
real_name
;
44
45
ImapOpenFlags
reopen
;
46
ImapOpenFlags
check_status
;
47
unsigned
int
new_mail_count
;
48
49
// IMAP STATUS information
50
struct
ListHead
flags
;
51
uint32_t
uidvalidity
;
52
unsigned
int
uid_next
;
53
unsigned
long
long
modseq
;
54
unsigned
int
messages
;
55
unsigned
int
recent
;
56
unsigned
int
unseen
;
57
58
// Cached data used only when the mailbox is opened
59
struct
HashTable
*
uid_hash
;
60
ARRAY_HEAD
(MSNArray,
struct
Email
*) msn;
61
struct
BodyCache
*
bcache
;
62
63
struct
HeaderCache
*
hcache
;
64
struct
timespec
mtime
;
65
};
66
67
void
imap_mdata_free
(
void
**ptr);
68
struct
ImapMboxData
*
imap_mdata_get
(
struct
Mailbox
*m);
69
struct
ImapMboxData
*
imap_mdata_new
(
struct
ImapAccountData
*adata,
const
char
*
name
);
70
71
#endif
/* MUTT_IMAP_MDATA_H */
imap_mdata_free
void imap_mdata_free(void **ptr)
Free the private Mailbox data - Implements Mailbox::mdata_free() -.
Definition
mdata.c:40
imap_mdata_new
struct ImapMboxData * imap_mdata_new(struct ImapAccountData *adata, const char *name)
Allocate and initialise a new ImapMboxData structure.
Definition
mdata.c:74
imap_mdata_get
struct ImapMboxData * imap_mdata_get(struct Mailbox *m)
Get the Mailbox data for this mailbox.
Definition
mdata.c:61
private.h
Shared constants/structs that are private to IMAP.
ImapOpenFlags
uint8_t ImapOpenFlags
Definition
private.h:75
lib.h
Convenience wrapper for the library headers.
BodyCache
Local cache of email bodies.
Definition
bcache.c:49
Email
The envelope/body of an email.
Definition
email.h:39
HashTable
A Hash Table.
Definition
hash.h:99
HeaderCache
Header Cache.
Definition
lib.h:87
ImapAccountData
IMAP-specific Account data -.
Definition
adata.h:40
ImapMboxData
IMAP-specific Mailbox data -.
Definition
mdata.h:40
ImapMboxData::reopen
ImapOpenFlags reopen
Flags, e.g. IMAP_REOPEN_ALLOW.
Definition
mdata.h:45
ImapMboxData::ARRAY_HEAD
ARRAY_HEAD(MSNArray, struct Email *) msn
look up headers by (MSN-1)
ImapMboxData::uid_next
unsigned int uid_next
Next UID for new message.
Definition
mdata.h:52
ImapMboxData::messages
unsigned int messages
Number of messages.
Definition
mdata.h:54
ImapMboxData::hcache
struct HeaderCache * hcache
Email header cache.
Definition
mdata.h:63
ImapMboxData::flags
struct ListHead flags
List of permanent flags.
Definition
mdata.h:50
ImapMboxData::real_name
char * real_name
Original Mailbox name, e.g.: INBOX can be just \0.
Definition
mdata.h:43
ImapMboxData::bcache
struct BodyCache * bcache
Email body cache.
Definition
mdata.h:61
ImapMboxData::recent
unsigned int recent
Number of recent messages.
Definition
mdata.h:55
ImapMboxData::new_mail_count
unsigned int new_mail_count
Set when EXISTS notifies of new mail.
Definition
mdata.h:47
ImapMboxData::uid_hash
struct HashTable * uid_hash
Hash Table: "uid" -> Email.
Definition
mdata.h:59
ImapMboxData::mtime
struct timespec mtime
Time Mailbox was last changed.
Definition
mdata.h:64
ImapMboxData::modseq
unsigned long long modseq
Modification sequence number.
Definition
mdata.h:53
ImapMboxData::check_status
ImapOpenFlags check_status
Flags, e.g. IMAP_NEWMAIL_PENDING.
Definition
mdata.h:46
ImapMboxData::munge_name
char * munge_name
Munged version of the mailbox name.
Definition
mdata.h:42
ImapMboxData::uidvalidity
uint32_t uidvalidity
UID validity.
Definition
mdata.h:51
ImapMboxData::name
char * name
Mailbox name.
Definition
mdata.h:41
ImapMboxData::unseen
unsigned int unseen
Number of unseen messages.
Definition
mdata.h:56
Mailbox
A mailbox.
Definition
mailbox.h:81