NeoMutt  2022-04-29-249-gaae397
Teaching an old dog new tricks
DOXYGEN
account.h
Go to the documentation of this file.
1
24#ifndef MUTT_CORE_ACCOUNT_H
25#define MUTT_CORE_ACCOUNT_H
26
27#include <stdbool.h>
28#include "mutt/lib.h"
29#include "mailbox.h"
30
31struct ConfigSubset;
32
36struct Account
37{
39 char *name;
40 struct ConfigSubset *sub;
41 struct MailboxList mailboxes;
42 struct Notify *notify;
43 void *adata;
44
53 void (*adata_free)(void **ptr);
54
56};
57TAILQ_HEAD(AccountList, Account);
58
68{
73};
74
79{
80 struct Account *account;
81};
82
83void account_free (struct Account **ptr);
84bool account_mailbox_add (struct Account *a, struct Mailbox *m);
85bool account_mailbox_remove(struct Account *a, struct Mailbox *m);
86struct Account *account_new (const char *name, struct ConfigSubset *sub);
87
88#endif /* MUTT_CORE_ACCOUNT_H */
bool account_mailbox_remove(struct Account *a, struct Mailbox *m)
Remove a Mailbox from an Account.
Definition: account.c:96
NotifyAccount
Types of Account Event.
Definition: account.h:68
@ NT_ACCOUNT_ADD
Account has been added.
Definition: account.h:69
@ NT_ACCOUNT_CHANGE
Account has been changed.
Definition: account.h:72
@ NT_ACCOUNT_DELETE
Account is about to be deleted.
Definition: account.h:70
@ NT_ACCOUNT_DELETE_ALL
All Accounts are about to be deleted.
Definition: account.h:71
struct Account * account_new(const char *name, struct ConfigSubset *sub)
Create a new Account.
Definition: account.c:43
TAILQ_HEAD(AccountList, Account)
bool account_mailbox_add(struct Account *a, struct Mailbox *m)
Add a Mailbox to an Account.
Definition: account.c:66
void account_free(struct Account **ptr)
Free an Account.
Definition: account.c:141
Representation of a mailbox.
MailboxType
Supported mailbox formats.
Definition: mailbox.h:41
Convenience wrapper for the library headers.
A group of associated Mailboxes.
Definition: account.h:37
enum MailboxType type
Type of Mailboxes this Account contains.
Definition: account.h:38
char * name
Name of Account.
Definition: account.h:39
TAILQ_ENTRY(Account) entries
Linked list of Accounts.
struct Notify * notify
Notifications: NotifyAccount, EventAccount.
Definition: account.h:42
void(* adata_free)(void **ptr)
Free the private data attached to the Account.
Definition: account.h:53
struct ConfigSubset * sub
Inherited config items.
Definition: account.h:40
void * adata
Private data (for Mailbox backends)
Definition: account.h:43
struct MailboxList mailboxes
List of Mailboxes.
Definition: account.h:41
A set of inherited config items.
Definition: subset.h:47
An Event that happened to an Account.
Definition: account.h:79
struct Account * account
The Account this Event relates to.
Definition: account.h:80
A mailbox.
Definition: mailbox.h:79
Notification API.
Definition: notify.c:51