NeoMutt  2025-12-11-58-g09398d
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
account.h
Go to the documentation of this file.
1
22
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 MailboxArray mailboxes;
41 struct Notify *notify;
42 void *adata;
43
53 void (*adata_free)(void **ptr);
54};
55ARRAY_HEAD(AccountArray, struct Account *);
56
72
77{
78 struct Account *account;
79};
80
81void account_free (struct Account **ptr);
82bool account_mailbox_add (struct Account *a, struct Mailbox *m);
83void account_mailbox_remove(struct Account *a, struct Mailbox *m);
84void account_mailboxes_free(struct Account *a);
85struct Account *account_new (const char *name, struct ConfigSubset *sub);
86
87#endif /* MUTT_CORE_ACCOUNT_H */
#define ARRAY_HEAD(name, type)
Define a named struct for arrays of elements of a certain type.
Definition array.h:47
void account_mailbox_remove(struct Account *a, struct Mailbox *m)
Remove a Mailbox from an Account.
Definition account.c:94
NotifyAccount
Types of Account Event.
Definition account.h:66
@ NT_ACCOUNT_ADD
Account has been added.
Definition account.h:67
@ NT_ACCOUNT_CHANGE
Account has been changed.
Definition account.h:70
@ NT_ACCOUNT_DELETE
Account is about to be deleted.
Definition account.h:68
@ NT_ACCOUNT_DELETE_ALL
All Accounts are about to be deleted.
Definition account.h:69
struct Account * account_new(const char *name, struct ConfigSubset *sub)
Create a new Account.
Definition account.c:44
void account_mailboxes_free(struct Account *a)
Free all the Mailboxes on an Account.
Definition account.c:119
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:148
Representation of a mailbox.
MailboxType
Supported mailbox formats.
Definition mailbox.h:41
Convenience wrapper for the library headers.
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
struct Notify * notify
Notifications: NotifyAccount, EventAccount.
Definition account.h:41
struct MailboxArray mailboxes
All Mailboxes.
Definition account.h:40
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
A set of inherited config items.
Definition subset.h:46
An Event that happened to an Account.
Definition account.h:77
struct Account * account
The Account this Event relates to.
Definition account.h:78
A mailbox.
Definition mailbox.h:79
Notification API.
Definition notify.c:53