NeoMutt  2024-12-12-14-g7b49f7
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 69 of file adata.c.

70{
71 if (!m || (m->type != MUTT_NOTMUCH))
72 return NULL;
73
74 struct Account *a = m->account;
75 if (!a)
76 return NULL;
77
78 return a->adata;
79}
@ 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 return MUTT_MEM_CALLOC(1, struct NmAccountData);
61}
#define MUTT_MEM_CALLOC(n, type)
Definition: memory.h:40
Notmuch-specific Account data -.
Definition: adata.h:35
+ Here is the caller graph for this function: