NeoMutt  2022-04-29-215-gc12b98
Teaching an old dog new tricks
DOXYGEN
edata.c
Go to the documentation of this file.
1
29#include "config.h"
30#include <stddef.h>
31#include "mutt/lib.h"
32#include "email/lib.h"
33#include "edata.h"
34
38void maildir_edata_free(void **ptr)
39{
40 if (!ptr || !*ptr)
41 return;
42
43 struct MaildirEmailData *edata = *ptr;
44 FREE(&edata->maildir_flags);
45
46 FREE(ptr);
47}
48
54{
55 struct MaildirEmailData *edata = mutt_mem_calloc(1, sizeof(struct MaildirEmailData));
56 return edata;
57}
58
65{
66 if (!e)
67 return NULL;
68 return e->edata;
69}
Structs that make up an email.
struct MaildirEmailData * maildir_edata_get(struct Email *e)
Get the private data for this Email.
Definition: edata.c:64
void maildir_edata_free(void **ptr)
Free the private Email data - Implements Email::edata_free()
Definition: edata.c:38
struct MaildirEmailData * maildir_edata_new(void)
Create a new MaildirEmailData object.
Definition: edata.c:53
void * mutt_mem_calloc(size_t nmemb, size_t size)
Allocate zeroed memory on the heap.
Definition: memory.c:50
#define FREE(x)
Definition: memory.h:43
Convenience wrapper for the library headers.
Pop-specific Email data.
The envelope/body of an email.
Definition: email.h:37
void * edata
Driver-specific data.
Definition: email.h:72
Maildir-specific Email data -.
Definition: edata.h:34