NeoMutt  2024-10-02-37-gfa9146
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
adata.h File Reference

Notmuch-specific Account data. More...

#include <notmuch.h>
#include <stdbool.h>
+ Include dependency graph for adata.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  NmAccountData
 Notmuch-specific Account data -. More...
 

Functions

void nm_adata_free (void **ptr)
 Free the private Account data - Implements Account::adata_free() -.
 
struct NmAccountDatanm_adata_get (struct Mailbox *m)
 Get the Notmuch Account data.
 
struct NmAccountDatanm_adata_new (void)
 Allocate and initialise a new NmAccountData structure.
 

Detailed Description

Notmuch-specific Account data.

Authors
  • Richard Russon

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 adata.h.

Function Documentation

◆ nm_adata_get()

struct NmAccountData * nm_adata_get ( struct Mailbox m)

Get the Notmuch Account data.

Parameters
mMailbox
Return values
ptrSuccess
NULLFailure, not a Notmuch mailbox

Definition at line 71 of file adata.c.

72{
73 if (!m || (m->type != MUTT_NOTMUCH))
74 return NULL;
75
76 struct Account *a = m->account;
77 if (!a)
78 return NULL;
79
80 return a->adata;
81}
@ MUTT_NOTMUCH
'Notmuch' (virtual) Mailbox type
Definition: mailbox.h:51
A group of associated Mailboxes.
Definition: account.h:36
void * adata
Private data (for Mailbox backends)
Definition: account.h:42
enum MailboxType type
Mailbox type.
Definition: mailbox.h:102
struct Account * account
Account that owns this Mailbox.
Definition: mailbox.h:127
+ Here is the caller graph for this function:

◆ nm_adata_new()

struct NmAccountData * nm_adata_new ( void  )

Allocate and initialise a new NmAccountData structure.

Return values
ptrNew NmAccountData

Definition at line 58 of file adata.c.

59{
60 struct NmAccountData *adata = mutt_mem_calloc(1, sizeof(struct NmAccountData));
61
62 return adata;
63}
void * mutt_mem_calloc(size_t nmemb, size_t size)
Allocate zeroed memory on the heap.
Definition: memory.c:51
Notmuch-specific Account data -.
Definition: adata.h:35
+ Here is the call graph for this function:
+ Here is the caller graph for this function: