NeoMutt  2024-04-25-85-g27bab4
Teaching an old dog new tricks
No Matches
edata.c File Reference

Pop-specific Email data. More...

#include "config.h"
#include <stddef.h>
#include "mutt/lib.h"
#include "email/lib.h"
#include "edata.h"
+ Include dependency graph for edata.c:

Go to the source code of this file.


void pop_edata_free (void **ptr)
 Free the private Email data - Implements Email::edata_free() -.
struct PopEmailDatapop_edata_new (const char *uid)
 Create a new PopEmailData for an email.
struct PopEmailDatapop_edata_get (struct Email *e)
 Get the private data for this Email.

Detailed Description

Pop-specific Email data.

  • Richard Russon

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see

Definition in file edata.c.

Function Documentation

◆ pop_edata_new()

struct PopEmailData * pop_edata_new ( const char *  uid)

Create a new PopEmailData for an email.

uidEmail UID
Return values
ptrNew PopEmailData struct

Definition at line 56 of file edata.c.

58 struct PopEmailData *edata = mutt_mem_calloc(1, sizeof(struct PopEmailData));
59 edata->uid = mutt_str_dup(uid);
60 return edata;
void * mutt_mem_calloc(size_t nmemb, size_t size)
Allocate zeroed memory on the heap.
Definition: memory.c:51
char * mutt_str_dup(const char *str)
Copy a string, safely.
Definition: string.c:253
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
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pop_edata_get()

struct PopEmailData * pop_edata_get ( struct Email e)

Get the private data for this Email.

Return values
ptrPrivate Email data

Definition at line 68 of file edata.c.

70 if (!e)
71 return NULL;
72 return e->edata;
+ Here is the caller graph for this function: