NeoMutt  2021-02-05-89-gabe350
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 
31 struct ConfigSubset;
32 
36 struct Account
37 {
39  char *name;
40  struct ConfigSubset *sub;
41  struct MailboxList mailboxes;
42  struct Notify *notify;
43  void *adata;
44 
49  void (*adata_free)(void **ptr);
50 
51  TAILQ_ENTRY(Account) entries;
52 };
53 TAILQ_HEAD(AccountList, Account);
54 
61 {
65 };
66 
71 {
72  struct Account *account;
73 };
74 
75 void account_free (struct Account **ptr);
76 bool account_mailbox_add (struct Account *a, struct Mailbox *m);
77 bool account_mailbox_remove(struct Account *a, struct Mailbox *m);
78 struct Account *account_new (const char *name, struct ConfigSubset *sub);
79 
80 #endif /* MUTT_CORE_ACCOUNT_H */
account_mailbox_remove
bool account_mailbox_remove(struct Account *a, struct Mailbox *m)
Remove a Mailbox from an Account.
Definition: account.c:94
Mailbox
A mailbox.
Definition: mailbox.h:81
Account::type
enum MailboxType type
Type of Mailboxes this Account contains.
Definition: account.h:38
Account::name
char * name
Name of Account.
Definition: account.h:39
EventAccount
An Event that happened to an Account.
Definition: account.h:70
mailbox.h
Account::adata_free
void(* adata_free)(void **ptr)
Free the private data attached to the Account.
Definition: account.h:49
lib.h
Account
A group of associated Mailboxes.
Definition: account.h:36
Account::mailboxes
struct MailboxList mailboxes
List of Mailboxes.
Definition: account.h:41
Account::TAILQ_ENTRY
TAILQ_ENTRY(Account) entries
Linked list of Accounts.
account_mailbox_add
bool account_mailbox_add(struct Account *a, struct Mailbox *m)
Add a Mailbox to an Account.
Definition: account.c:66
EventAccount::account
struct Account * account
The Account this Event relates to.
Definition: account.h:72
NT_ACCOUNT_CHANGED
@ NT_ACCOUNT_CHANGED
An Account has changed.
Definition: account.h:64
TAILQ_HEAD
TAILQ_HEAD(AccountList, Account)
NT_ACCOUNT_REMOVE
@ NT_ACCOUNT_REMOVE
An Account is about to be destroyed.
Definition: account.h:63
Notify
Notification API.
Definition: notify.c:39
Account::adata
void * adata
Private data (for Mailbox backends)
Definition: account.h:43
MailboxType
MailboxType
Supported mailbox formats.
Definition: mailbox.h:43
account_new
struct Account * account_new(const char *name, struct ConfigSubset *sub)
Create a new Account.
Definition: account.c:43
account_free
void account_free(struct Account **ptr)
Free an Account.
Definition: account.c:125
NT_ACCOUNT_ADD
@ NT_ACCOUNT_ADD
A new Account has been created.
Definition: account.h:62
ConfigSubset
A set of inherited config items.
Definition: subset.h:46
Account::notify
struct Notify * notify
Notifications handler.
Definition: account.h:42
NotifyAccount
NotifyAccount
Types of Account Event.
Definition: account.h:60
Account::sub
struct ConfigSubset * sub
Inherited config items.
Definition: account.h:40