NeoMutt  2024-11-14-34-g5aaf0d
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
account.h
Go to the documentation of this file.
1
23#ifndef MUTT_CORE_ACCOUNT_H
24#define MUTT_CORE_ACCOUNT_H
25
26#include <stdbool.h>
27#include "mutt/lib.h"
28#include "mailbox.h"
29
30struct ConfigSubset;
31
35struct Account
36{
38 char *name;
39 struct ConfigSubset *sub;
40 struct MailboxList mailboxes;
41 struct Notify *notify;
42 void *adata;
43
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:98
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:44
bool account_mailbox_add(struct Account *a, struct Mailbox *m)
Add a Mailbox to an Account.
Definition: account.c:67
void account_free(struct Account **ptr)
Free an Account.
Definition: account.c:143
MailboxType
Supported mailbox formats.
Definition: mailbox.h:41
Maildir Mailbox.
Convenience wrapper for the library headers.
#define TAILQ_HEAD(name, type)
Definition: queue.h:623
A group of associated Mailboxes.
Definition: account.h:36
enum MailboxType type
Type of Mailboxes this Account contains.
Definition: account.h:37
char * name
Name of Account.
Definition: account.h:38
TAILQ_ENTRY(Account) entries
Linked list.
struct Notify * notify
Notifications: NotifyAccount, EventAccount.
Definition: account.h:41
void(* adata_free)(void **ptr)
Definition: account.h:53
struct ConfigSubset * sub
Inherited config items.
Definition: account.h:39
void * adata
Private data (for Mailbox backends)
Definition: account.h:42
struct MailboxList mailboxes
List of Mailboxes.
Definition: account.h:40
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:53