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
29#include "config.h"
30#include <stddef.h>
31#include "mutt/lib.h"
32#include "email/lib.h"
33#include "edata.h"
34
41void pop_edata_free(void **ptr)
42{
43 if (!ptr || !*ptr)
44 return;
45
46 struct PopEmailData *edata = *ptr;
47 FREE(&edata->uid);
48 FREE(ptr);
49}
50
56struct PopEmailData *pop_edata_new(const char *uid)
57{
59 edata->uid = mutt_str_dup(uid);
60 return edata;
61}
62
69{
70 if (!e)
71 return NULL;
72 return e->edata;
73}
Structs that make up an email.
void pop_edata_free(void **ptr)
Free the private Email data - Implements Email::edata_free() -.
Definition: edata.c:41
#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
struct PopEmailData * pop_edata_new(const char *uid)
Create a new PopEmailData for an email.
Definition: edata.c:56
struct PopEmailData * pop_edata_get(struct Email *e)
Get the private data for this Email.
Definition: edata.c:68
Pop-specific Email data.
The envelope/body of an email.
Definition: email.h:39
void * edata
Driver-specific data.
Definition: email.h:74
POP-specific Email data -.
Definition: edata.h:32
const char * uid
UID of email.
Definition: edata.h:33