NeoMutt  2019-12-07-168-gc45f47
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  void (*free_adata)(void **);
45  TAILQ_ENTRY(Account) entries;
46 };
47 TAILQ_HEAD(AccountList, Account);
48 
53 {
54  struct Account *account;
55 };
56 
61 {
64 };
65 
66 void account_free (struct Account **ptr);
67 bool account_mailbox_add (struct Account *a, struct Mailbox *m);
68 bool account_mailbox_remove(struct Account *a, struct Mailbox *m);
69 struct Account *account_new (const char *name, struct ConfigSubset *sub);
70 
71 #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 handler.
Definition: account.h:42
struct MailboxList mailboxes
List of Mailboxes.
Definition: account.h:41
A group of associated Mailboxes.
Definition: account.h:36
An Event that happened to an Account.
Definition: account.h:52
A set of inherited config items.
Definition: subset.h:44
A mailbox.
Definition: mailbox.h:80
enum MailboxType magic
Type of Mailboxes this Account contains.
Definition: account.h:38
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:67
TAILQ_HEAD(AccountList, Account)
An Account is about to be destroyed.
Definition: account.h:63
Notification API.
Definition: notify.c:40
Representation of a mailbox.
MailboxType
Supported mailbox formats.
Definition: mailbox.h:42
struct ConfigSubset * sub
Inherited config items.
Definition: account.h:40
A new Account has been created.
Definition: account.h:62
NotifyAccount
Types of Account Event.
Definition: account.h:60
struct Account * account_new(const char *name, struct ConfigSubset *sub)
Create a new Account.
Definition: account.c:43
Convenience wrapper for the library headers.
void(* free_adata)(void **)
Callback function to free private data.
Definition: account.h:44
void account_free(struct Account **ptr)
Free an Account.
Definition: account.c:126
struct Account * account
The Account this Event relates to.
Definition: account.h:54
TAILQ_ENTRY(Account) entries
Linked list of Accounts.