NeoMutt  2024-11-14-34-g5aaf0d
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
edata.c
Go to the documentation of this file.
1
30#include "config.h"
31#include <stddef.h>
32#include <string.h>
33#include "mutt/lib.h"
34#include "email/lib.h"
35#include "edata.h"
36
40void imap_edata_free(void **ptr)
41{
42 if (!ptr || !*ptr)
43 return;
44
45 struct ImapEmailData *edata = *ptr;
46 /* this should be safe even if the list wasn't used */
47 FREE(&edata->flags_system);
48 FREE(&edata->flags_remote);
49
50 FREE(ptr);
51}
52
58{
59 return MUTT_MEM_CALLOC(1, struct ImapEmailData);
60}
61
68{
69 if (!e)
70 return NULL;
71 return e->edata;
72}
73
80{
81 struct ImapEmailData *dst = imap_edata_new();
82 memcpy(dst, src, sizeof(*src));
85 return dst;
86}
Structs that make up an email.
void imap_edata_free(void **ptr)
Free the private Email data - Implements Email::edata_free() -.
Definition: edata.c:40
struct ImapEmailData * imap_edata_new(void)
Create a new ImapEmailData.
Definition: edata.c:57
struct ImapEmailData * imap_edata_clone(struct ImapEmailData *src)
Clone an ImapEmailData.
Definition: edata.c:79
struct ImapEmailData * imap_edata_get(struct Email *e)
Get the private data for this Email.
Definition: edata.c:67
#define FREE(x)
Definition: memory.h:55
#define MUTT_MEM_CALLOC(n, type)
Definition: memory.h:40
Convenience wrapper for the library headers.
char * mutt_str_dup(const char *str)
Copy a string, safely.
Definition: string.c:253
Pop-specific Email data.
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