NeoMutt  2024-12-12-14-g7b49f7
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
edata.h File Reference

Notmuch-specific Email data. More...

#include "core/lib.h"
+ Include dependency graph for edata.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  NmEmailData
 Notmuch-specific Email data -. More...
 

Functions

void nm_edata_free (void **ptr)
 Free data attached to an Email.
 
struct NmEmailDatanm_edata_get (struct Email *e)
 Get the Notmuch Email data.
 
struct NmEmailDatanm_edata_new (void)
 Create a new NmEmailData for an email.
 

Detailed Description

Notmuch-specific Email 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 edata.h.

Function Documentation

◆ nm_edata_free()

void nm_edata_free ( void **  ptr)

Free data attached to an Email.

Parameters
[out]ptrEmail data

Each email has an attached NmEmailData, which contains things like the tags (labels).

Definition at line 42 of file edata.c.

43{
44 if (!ptr || !*ptr)
45 return;
46
47 struct NmEmailData *edata = *ptr;
48
49 mutt_debug(LL_DEBUG2, "nm: freeing email %p\n", (void *) edata);
50 FREE(&edata->folder);
51 FREE(&edata->oldpath);
52 FREE(&edata->virtual_id);
53
54 FREE(ptr);
55}
#define mutt_debug(LEVEL,...)
Definition: logging2.h:89
@ LL_DEBUG2
Log at debug level 2.
Definition: logging2.h:44
#define FREE(x)
Definition: memory.h:55
void * edata
Driver-specific data.
Definition: email.h:74
Notmuch-specific Email data -.
Definition: edata.h:34

◆ nm_edata_get()

struct NmEmailData * nm_edata_get ( struct Email e)

Get the Notmuch Email data.

Parameters
eEmail
Return values
ptrSuccess
NULLError

Definition at line 72 of file edata.c.

73{
74 if (!e)
75 return NULL;
76
77 return e->nm_edata;
78}
void * nm_edata
Notmuch private data.
Definition: email.h:93
+ Here is the caller graph for this function:

◆ nm_edata_new()

struct NmEmailData * nm_edata_new ( void  )

Create a new NmEmailData for an email.

Return values
ptrNew NmEmailData struct

Definition at line 61 of file edata.c.

62{
63 return MUTT_MEM_CALLOC(1, struct NmEmailData);
64}
#define MUTT_MEM_CALLOC(n, type)
Definition: memory.h:40
+ Here is the caller graph for this function: