#include "config.h"
#include <stdbool.h>
#include <stdint.h>
#include <sys/types.h>
#include <time.h>
#include "mutt/lib.h"
Go to the source code of this file.
Data Structures | |
struct | Mailbox |
A mailbox. More... | |
struct | MailboxNode |
List of Mailboxes. More... | |
struct | EventMailbox |
An Event that happened to a Mailbox. More... | |
Macros | |
#define | MB_NORMAL 0 |
#define | MB_HIDDEN 1 |
#define | MUTT_ACL_NO_FLAGS 0 |
No flags are set. More... | |
#define | MUTT_ACL_ADMIN (1 << 0) |
Administer the account (get/set permissions) More... | |
#define | MUTT_ACL_CREATE (1 << 1) |
Create a mailbox. More... | |
#define | MUTT_ACL_DELETE (1 << 2) |
Delete a message. More... | |
#define | MUTT_ACL_DELMX (1 << 3) |
Delete a mailbox. More... | |
#define | MUTT_ACL_EXPUNGE (1 << 4) |
Expunge messages. More... | |
#define | MUTT_ACL_INSERT (1 << 5) |
Add/copy into the mailbox (used when editing a message) More... | |
#define | MUTT_ACL_LOOKUP (1 << 6) |
Lookup mailbox (visible to 'list') More... | |
#define | MUTT_ACL_POST (1 << 7) |
Post (submit messages to the server) More... | |
#define | MUTT_ACL_READ (1 << 8) |
Read the mailbox. More... | |
#define | MUTT_ACL_SEEN (1 << 9) |
Change the 'seen' status of a message. More... | |
#define | MUTT_ACL_WRITE (1 << 10) |
Write to a message (for flagging or linking threads) More... | |
#define | MUTT_ACL_ALL ((1 << 11) - 1) |
Typedefs | |
typedef uint16_t | AclFlags |
ACL Rights - These show permission to... More... | |
Enumerations | |
enum | MailboxType { MUTT_MAILBOX_ANY = -2, MUTT_MAILBOX_ERROR = -1, MUTT_UNKNOWN = 0, MUTT_MBOX, MUTT_MMDF, MUTT_MH, MUTT_MAILDIR, MUTT_NNTP, MUTT_IMAP, MUTT_NOTMUCH, MUTT_POP, MUTT_COMPRESSED } |
Supported mailbox formats. More... | |
enum | NotifyMailbox { NT_MAILBOX_ADD = 1, NT_MAILBOX_REMOVE, NT_MAILBOX_CHANGED, NT_MAILBOX_CLOSED, NT_MAILBOX_INVALID, NT_MAILBOX_RESORT, NT_MAILBOX_SWITCH, NT_MAILBOX_UPDATE, NT_MAILBOX_UNTAG } |
Types of Mailbox Event. More... | |
Functions | |
STAILQ_HEAD (MailboxList, MailboxNode) | |
void | mailbox_changed (struct Mailbox *m, enum NotifyMailbox action) |
Notify observers of a change to a Mailbox. More... | |
struct Mailbox * | mailbox_find (const char *path) |
Find the mailbox with a given path. More... | |
struct Mailbox * | mailbox_find_name (const char *name) |
Find the mailbox with a given name. More... | |
void | mailbox_free (struct Mailbox **ptr) |
Free a Mailbox. More... | |
int | mailbox_gen (void) |
Get the next generation number. More... | |
struct Mailbox * | mailbox_new (void) |
Create a new Mailbox. More... | |
bool | mailbox_set_subset (struct Mailbox *m, struct ConfigSubset *sub) |
Set a Mailbox's Config Subset. More... | |
void | mailbox_size_add (struct Mailbox *m, const struct Email *e) |
Add an email's size to the total size of a Mailbox. More... | |
void | mailbox_size_sub (struct Mailbox *m, const struct Email *e) |
Subtract an email's size from the total size of a Mailbox. More... | |
void | mailbox_update (struct Mailbox *m) |
Get the mailbox's current size. More... | |
void | mailbox_gc_add (struct Email *e) |
Add an Email to the garbage-collection set. More... | |
void | mailbox_gc_run (void) |
static const char * | mailbox_path (const struct Mailbox *m) |
Get the Mailbox's path string. More... | |
Representation of a mailbox
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file mailbox.h.
#define MUTT_ACL_ADMIN (1 << 0) |
#define MUTT_ACL_INSERT (1 << 5) |
#define MUTT_ACL_LOOKUP (1 << 6) |
#define MUTT_ACL_POST (1 << 7) |
#define MUTT_ACL_SEEN (1 << 9) |
#define MUTT_ACL_WRITE (1 << 10) |
typedef uint16_t AclFlags |
ACL Rights - These show permission to...
Flags, e.g. MUTT_ACL_ADMIN
enum MailboxType |
Supported mailbox formats.
Enumerator | |
---|---|
MUTT_MAILBOX_ANY | Match any Mailbox type. |
MUTT_MAILBOX_ERROR | Error occurred examining Mailbox. |
MUTT_UNKNOWN | Mailbox wasn't recognised. |
MUTT_MBOX | 'mbox' Mailbox type |
MUTT_MMDF | 'mmdf' Mailbox type |
MUTT_MH | 'MH' Mailbox type |
MUTT_MAILDIR | 'Maildir' Mailbox type |
MUTT_NNTP | 'NNTP' (Usenet) Mailbox type |
MUTT_IMAP | 'IMAP' Mailbox type |
MUTT_NOTMUCH | 'Notmuch' (virtual) Mailbox type |
MUTT_POP | 'POP3' Mailbox type |
MUTT_COMPRESSED | Compressed file Mailbox type. |
Definition at line 43 of file mailbox.h.
enum NotifyMailbox |
Types of Mailbox Event.
Observers of NT_MAILBOX will be passed an EventMailbox.
Enumerator | |
---|---|
NT_MAILBOX_ADD | A new Mailbox has been created. |
NT_MAILBOX_REMOVE | A Mailbox is about to be destroyed. |
NT_MAILBOX_CHANGED | Mailbox data has changed. |
NT_MAILBOX_CLOSED | Mailbox was closed. |
NT_MAILBOX_INVALID | Email list was changed. |
NT_MAILBOX_RESORT | Email list needs resorting. |
NT_MAILBOX_SWITCH | Current Mailbox has changed. |
NT_MAILBOX_UPDATE | Update internal tables. |
NT_MAILBOX_UNTAG | Clear the 'last-tagged' pointer. |
Definition at line 164 of file mailbox.h.
STAILQ_HEAD | ( | MailboxList | , |
MailboxNode | |||
) |
void mailbox_changed | ( | struct Mailbox * | m, |
enum NotifyMailbox | action | ||
) |
struct Mailbox* mailbox_find | ( | const char * | path | ) |
struct Mailbox* mailbox_find_name | ( | const char * | name | ) |
void mailbox_free | ( | struct Mailbox ** | ptr | ) |
int mailbox_gen | ( | void | ) |
struct Mailbox* mailbox_new | ( | void | ) |
bool mailbox_set_subset | ( | struct Mailbox * | m, |
struct ConfigSubset * | sub | ||
) |
void mailbox_update | ( | struct Mailbox * | m | ) |
void mailbox_gc_add | ( | struct Email * | e | ) |
void mailbox_gc_run | ( | void | ) |
|
inlinestatic |