NeoMutt  2025-09-05-55-g97fc89
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
edata.c
Go to the documentation of this file.
1
23
29
30#include "config.h"
31#include <string.h>
32#include "mutt/lib.h"
33#include "email/lib.h"
34#include "edata.h"
35
39void imap_edata_free(void **ptr)
40{
41 if (!ptr || !*ptr)
42 return;
43
44 struct ImapEmailData *edata = *ptr;
45 /* this should be safe even if the list wasn't used */
46 FREE(&edata->flags_system);
47 FREE(&edata->flags_remote);
48
49 FREE(ptr);
50}
51
57{
58 return MUTT_MEM_CALLOC(1, struct ImapEmailData);
59}
60
67{
68 if (!e)
69 return NULL;
70 return e->edata;
71}
72
79{
80 struct ImapEmailData *dst = imap_edata_new();
81 memcpy(dst, src, sizeof(*src));
84 return dst;
85}
Structs that make up an email.
void imap_edata_free(void **ptr)
Free the private Email data - Implements Email::edata_free() -.
Definition edata.c:39
struct ImapEmailData * imap_edata_new(void)
Create a new ImapEmailData.
Definition edata.c:56
struct ImapEmailData * imap_edata_clone(struct ImapEmailData *src)
Clone an ImapEmailData.
Definition edata.c:78
struct ImapEmailData * imap_edata_get(struct Email *e)
Get the private data for this Email.
Definition edata.c:66
Imap-specific Email data.
#define FREE(x)
Definition memory.h:62
#define MUTT_MEM_CALLOC(n, type)
Definition memory.h:47
Convenience wrapper for the library headers.
char * mutt_str_dup(const char *str)
Copy a string, safely.
Definition string.c:255
The envelope/body of an email.
Definition email.h:39
void * edata
Driver-specific data.
Definition email.h:74
IMAP-specific Email data -.
Definition edata.h:35
char * flags_remote
Definition edata.h:49
char * flags_system
Definition edata.h:48