NeoMutt  2021-02-05-666-ge300cd
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 
53  void (*adata_free)(void **ptr);
54 
55  TAILQ_ENTRY(Account) entries;
56 };
57 TAILQ_HEAD(AccountList, Account);
58 
68 {
73 };
74 
79 {
80  struct Account *account;
81 };
82 
83 void account_free (struct Account **ptr);
84 bool account_mailbox_add (struct Account *a, struct Mailbox *m);
85 bool account_mailbox_remove(struct Account *a, struct Mailbox *m);
86 struct 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:95
char * name
Name of Account.
Definition: account.h:39
struct Notify * notify
Notifications: NotifyAccount, EventAccount.
Definition: account.h:42
struct MailboxList mailboxes
List of Mailboxes.
Definition: account.h:41
A group of associated Mailboxes.
Definition: account.h:36
Account has been changed.
Definition: account.h:72
enum MailboxType type
Type of Mailboxes this Account contains.
Definition: account.h:38
An Event that happened to an Account.
Definition: account.h:78
void(* adata_free)(void **ptr)
Free the private data attached to the Account.
Definition: account.h:53
A set of inherited config items.
Definition: subset.h:46
A mailbox.
Definition: mailbox.h:81
void * adata
Private data (for Mailbox backends)
Definition: account.h:43
bool account_mailbox_add(struct Account *a, struct Mailbox *m)
Add a Mailbox to an Account.
Definition: account.c:65
TAILQ_HEAD(AccountList, Account)
Notification API.
Definition: notify.c:50
Representation of a mailbox.
All Accounts are about to be deleted.
Definition: account.h:71
MailboxType
Supported mailbox formats.
Definition: mailbox.h:43
struct ConfigSubset * sub
Inherited config items.
Definition: account.h:40
Account has been added.
Definition: account.h:69
Account is about to be deleted.
Definition: account.h:70
NotifyAccount
Types of Account Event.
Definition: account.h:67
struct Account * account_new(const char *name, struct ConfigSubset *sub)
Create a new Account.
Definition: account.c:42
Convenience wrapper for the library headers.
void account_free(struct Account **ptr)
Free an Account.
Definition: account.c:131
struct Account * account
The Account this Event relates to.
Definition: account.h:80
TAILQ_ENTRY(Account) entries
Linked list of Accounts.