NeoMutt
2025-12-11-1039-g550ac6
Teaching an old dog new tricks
DOXYGEN
Toggle main menu visibility
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
30
struct
ConfigSubset
;
31
35
struct
Account
36
{
37
enum
MailboxType
type
;
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
};
55
ARRAY_HEAD
(AccountArray,
struct
Account
*);
56
65
enum
NotifyAccount
66
{
67
NT_ACCOUNT_ADD
= 1,
68
NT_ACCOUNT_DELETE
,
69
NT_ACCOUNT_DELETE_ALL
,
70
NT_ACCOUNT_CHANGE
,
71
};
72
76
struct
EventAccount
77
{
78
struct
Account
*
account
;
79
};
80
81
void
account_free
(
struct
Account
**ptr);
82
bool
account_mailbox_add
(
struct
Account
*a,
struct
Mailbox
*m);
83
void
account_mailbox_remove
(
struct
Account
*a,
struct
Mailbox
*m);
84
void
account_mailboxes_free
(
struct
Account
*a);
85
struct
Account
*
account_new
(
const
char
*
name
,
struct
ConfigSubset
*
sub
);
86
87
#endif
/* MUTT_CORE_ACCOUNT_H */
ARRAY_HEAD
#define ARRAY_HEAD(name, T)
Define a named struct for arrays of elements of a certain type.
Definition
array.h:47
account_mailbox_remove
void account_mailbox_remove(struct Account *a, struct Mailbox *m)
Remove a Mailbox from an Account.
Definition
account.c:94
NotifyAccount
NotifyAccount
Types of Account Event.
Definition
account.h:66
NT_ACCOUNT_ADD
@ NT_ACCOUNT_ADD
Account has been added.
Definition
account.h:67
NT_ACCOUNT_CHANGE
@ NT_ACCOUNT_CHANGE
Account has been changed.
Definition
account.h:70
NT_ACCOUNT_DELETE
@ NT_ACCOUNT_DELETE
Account is about to be deleted.
Definition
account.h:68
NT_ACCOUNT_DELETE_ALL
@ NT_ACCOUNT_DELETE_ALL
All Accounts are about to be deleted.
Definition
account.h:69
account_new
struct Account * account_new(const char *name, struct ConfigSubset *sub)
Create a new Account.
Definition
account.c:44
account_mailboxes_free
void account_mailboxes_free(struct Account *a)
Free all the Mailboxes on an Account.
Definition
account.c:119
account_mailbox_add
bool account_mailbox_add(struct Account *a, struct Mailbox *m)
Add a Mailbox to an Account.
Definition
account.c:67
account_free
void account_free(struct Account **ptr)
Free an Account.
Definition
account.c:148
mailbox.h
Representation of a mailbox.
MailboxType
MailboxType
Supported mailbox formats.
Definition
mailbox.h:40
lib.h
Convenience wrapper for the library headers.
Account
A group of associated Mailboxes.
Definition
account.h:36
Account::type
enum MailboxType type
Type of Mailboxes this Account contains.
Definition
account.h:37
Account::name
char * name
Name of Account.
Definition
account.h:38
Account::notify
struct Notify * notify
Notifications: NotifyAccount, EventAccount.
Definition
account.h:41
Account::mailboxes
struct MailboxArray mailboxes
All Mailboxes.
Definition
account.h:40
Account::adata_free
void(* adata_free)(void **ptr)
Definition
account.h:53
Account::sub
struct ConfigSubset * sub
Inherited config items.
Definition
account.h:39
Account::adata
void * adata
Private data (for Mailbox backends).
Definition
account.h:42
ConfigSubset
A set of inherited config items.
Definition
subset.h:46
EventAccount
An Event that happened to an Account.
Definition
account.h:77
EventAccount::account
struct Account * account
The Account this Event relates to.
Definition
account.h:78
Mailbox
A mailbox.
Definition
mailbox.h:81
Notify
Notification API.
Definition
notify.c:53