#include <stddef.h>
#include <stdbool.h>
#include "account.h"
#include "mailbox.h"
Go to the source code of this file.
Container for Accounts, Notifications
- Authors
-
- Copyright
- This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file neomutt.h.
◆ NotifyGlobal
Events not associated with an object.
Enumerator |
---|
NT_GLOBAL_STARTUP | NeoMutt is initialised.
|
NT_GLOBAL_SHUTDOWN | NeoMutt is about to close.
|
NT_GLOBAL_TIMEOUT | A timer has elapsed.
|
Definition at line 48 of file neomutt.h.
◆ neomutt_account_add()
Add an Account to the global list.
- Parameters
-
- Return values
-
Definition at line 84 of file neomutt.c.
◆ neomutt_account_remove()
bool neomutt_account_remove |
( |
struct NeoMutt * |
n, |
|
|
struct Account * |
a |
|
) |
| |
Remove an Account from the global list.
- Parameters
-
- Return values
-
- Note
- If a is NULL, all the Accounts will be removed
Definition at line 105 of file neomutt.c.
◆ neomutt_free()
void neomutt_free |
( |
struct NeoMutt ** |
ptr | ) |
|
◆ neomutt_new()
Create the main NeoMutt object.
- Parameters
-
- Return values
-
Definition at line 44 of file neomutt.c.
◆ neomutt_mailboxlist_clear()
void neomutt_mailboxlist_clear |
( |
struct MailboxList * |
ml | ) |
|
Free a Mailbox List.
- Parameters
-
- Note
- The Mailboxes aren't freed
Definition at line 137 of file neomutt.c.
◆ neomutt_mailboxlist_get_all()
size_t neomutt_mailboxlist_get_all |
( |
struct MailboxList * |
head, |
|
|
struct NeoMutt * |
n, |
|
|
enum MailboxType |
type |
|
) |
| |
Get a List of all Mailboxes.
- Parameters
-
- Return values
-
num | Number of Mailboxes in the List |
- Note
- If type is MUTT_MAILBOX_ANY then all Mailbox types will be matched
Definition at line 160 of file neomutt.c.
◆ NeoMutt
void * mutt_mem_calloc(size_t nmemb, size_t size)
Allocate zeroed memory on the heap.
struct AccountList accounts
List of all Accounts.
enum MailboxType type
Type of Mailboxes this Account contains.
@ NT_GLOBAL_STARTUP
NeoMutt is initialised.
#define STAILQ_REMOVE(head, elm, type, field)
struct Notify * notify
Notifications handler.
#define TAILQ_FOREACH(var, head, field)
An Event that happened to an Account.
@ NT_GLOBAL_TIMEOUT
A timer has elapsed.
#define TAILQ_INSERT_TAIL(head, elm, field)
struct Mailbox * mailbox
Mailbox in the list.
#define STAILQ_FOREACH(var, head, field)
bool notify_send(struct Notify *notify, enum NotifyType event_type, int event_subtype, void *event_data)
Send out a notification message.
struct Notify * notify_new(void)
Create a new notifications handler.
void cs_subset_free(struct ConfigSubset **ptr)
Free a Config Subset.
#define TAILQ_REMOVE(head, elm, field)
@ NT_GLOBAL_SHUTDOWN
NeoMutt is about to close.
void account_free(struct Account **ptr)
Free an Account.
A group of associated Mailboxes.
struct MailboxList mailboxes
List of Mailboxes.
struct ConfigSet * cs
Parent ConfigSet.
@ MUTT_UNKNOWN
Mailbox wasn't recognised.
#define TAILQ_FOREACH_SAFE(var, head, field, tvar)
struct ConfigSubset * cs_subset_new(const char *name, struct ConfigSubset *sub_parent, struct Notify *not_parent)
Create a new Config Subset.
#define STAILQ_FOREACH_SAFE(var, head, field, tvar)
@ NT_ACCOUNT_REMOVE
An Account is about to be destroyed.
bool neomutt_account_remove(struct NeoMutt *n, struct Account *a)
Remove an Account from the global list.
@ SET_SCOPE_NEOMUTT
This Config is NeoMutt-specific (global)
#define STAILQ_INSERT_TAIL(head, elm, field)
Container for Accounts, Notifications.
void notify_free(struct Notify **ptr)
Free a notification handler.
enum ConfigScope scope
Scope of Subset, e.g. SET_SCOPE_ACCOUNT.
struct ConfigSubset * sub
Inherited config items.
void notify_set_parent(struct Notify *notify, struct Notify *parent)
Set the parent notification handler.
@ NT_ACCOUNT_ADD
A new Account has been created.
struct Notify * notify
Notifications handler.
@ NT_ACCOUNT
Account has changed, NotifyAccount, EventAccount.