NeoMutt
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
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
52 void (*adata_free)(void **ptr);
53
55};
56TAILQ_HEAD(AccountList, Account);
57
67{
72};
73
78{
79 struct Account *account;
80};
81
82void account_free (struct Account **ptr);
83bool account_mailbox_add (struct Account *a, struct Mailbox *m);
84bool account_mailbox_remove(struct Account *a, struct Mailbox *m);
85struct Account *account_new (const char *name, struct ConfigSubset *sub);
86
87#endif /* MUTT_CORE_ACCOUNT_H */
bool account_mailbox_remove(struct Account *a, struct Mailbox *m)
Remove a Mailbox from an Account.
Definition: account.c:97
NotifyAccount
Types of Account Event.
Definition: account.h:67
@ NT_ACCOUNT_ADD
Account has been added.
Definition: account.h:68
@ NT_ACCOUNT_CHANGE
Account has been changed.
Definition: account.h:71
@ NT_ACCOUNT_DELETE
Account is about to be deleted.
Definition: account.h:69
@ NT_ACCOUNT_DELETE_ALL
All Accounts are about to be deleted.
Definition: account.h:70
struct Account * account_new(const char *name, struct ConfigSubset *sub)
Create a new Account.
Definition: account.c:43
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:142
Representation of a mailbox.
MailboxType
Supported mailbox formats.
Definition: mailbox.h:41
Convenience wrapper for the library headers.
#define TAILQ_HEAD(name, type)
Definition: queue.h:623
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.
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:52
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:78
struct Account * account
The Account this Event relates to.
Definition: account.h:79
A mailbox.
Definition: mailbox.h:79
Notification API.
Definition: notify.c:53