NeoMutt
2025-12-11-1039-g550ac6
Teaching an old dog new tricks
DOXYGEN
Toggle main menu visibility
Loading...
Searching...
No Matches
edata.c
Go to the documentation of this file.
1
22
28
29
#include "config.h"
30
#include <stddef.h>
31
#include "
mutt/lib.h
"
32
#include "
email/lib.h
"
33
#include "
edata.h
"
34
41
void
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
56
struct
PopEmailData
*
pop_edata_new
(
const
char
*
uid
)
57
{
58
struct
PopEmailData
*
edata
=
MUTT_MEM_CALLOC
(1,
struct
PopEmailData
);
59
edata
->uid =
mutt_str_dup
(
uid
);
60
return
edata
;
61
}
62
68
struct
PopEmailData
*
pop_edata_get
(
struct
Email
*e)
69
{
70
if
(!e)
71
return
NULL;
72
return
e->
edata
;
73
}
lib.h
Structs that make up an email.
pop_edata_free
void pop_edata_free(void **ptr)
Free the private Email data - Implements Email::edata_free() -.
Definition
edata.c:41
FREE
#define FREE(x)
Free memory and set the pointer to NULL.
Definition
memory.h:68
MUTT_MEM_CALLOC
#define MUTT_MEM_CALLOC(n, type)
Definition
memory.h:52
lib.h
Convenience wrapper for the library headers.
mutt_str_dup
char * mutt_str_dup(const char *str)
Copy a string, safely.
Definition
string.c:257
pop_edata_new
struct PopEmailData * pop_edata_new(const char *uid)
Create a new PopEmailData for an email.
Definition
edata.c:56
pop_edata_get
struct PopEmailData * pop_edata_get(struct Email *e)
Get the private data for this Email.
Definition
edata.c:68
edata.h
Pop-specific Email data.
Email
The envelope/body of an email.
Definition
email.h:39
Email::edata
void * edata
Driver-specific data.
Definition
email.h:74
PopEmailData
POP-specific Email data -.
Definition
edata.h:32
PopEmailData::uid
const char * uid
UID of email.
Definition
edata.h:33