NeoMutt  2022-04-29-247-gc6aae8
Teaching an old dog new tricks
DOXYGEN
edata.c File Reference

Maildir-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.

Functions

void maildir_edata_free (void **ptr)
 Free the private Email data - Implements Email::edata_free() More...
 
struct MaildirEmailDatamaildir_edata_new (void)
 Create a new MaildirEmailData object. More...
 
struct MaildirEmailDatamaildir_edata_get (struct Email *e)
 Get the private data for this Email. More...
 

Detailed Description

Maildir-specific Email data.

Authors
  • 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 http://www.gnu.org/licenses/.

Definition in file edata.c.

Function Documentation

◆ maildir_edata_free()

void maildir_edata_free ( void **  ptr)

Free the private Email data - Implements Email::edata_free()

Definition at line 38 of file edata.c.

39{
40 if (!ptr || !*ptr)
41 return;
42
43 struct MaildirEmailData *edata = *ptr;
44 FREE(&edata->maildir_flags);
45
46 FREE(ptr);
47}
#define FREE(x)
Definition: memory.h:43
void * edata
Driver-specific data.
Definition: email.h:72
Maildir-specific Email data -.
Definition: edata.h:34
+ Here is the caller graph for this function:

◆ maildir_edata_new()

struct MaildirEmailData * maildir_edata_new ( void  )

Create a new MaildirEmailData object.

Return values
ptrNew MaildirEmailData struct

Definition at line 53 of file edata.c.

54{
55 struct MaildirEmailData *edata = mutt_mem_calloc(1, sizeof(struct MaildirEmailData));
56 return edata;
57}
void * mutt_mem_calloc(size_t nmemb, size_t size)
Allocate zeroed memory on the heap.
Definition: memory.c:50
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ maildir_edata_get()

struct MaildirEmailData * maildir_edata_get ( struct Email e)

Get the private data for this Email.

Parameters
eEmail
Return values
ptrMaildirEmailData

Definition at line 64 of file edata.c.

65{
66 if (!e)
67 return NULL;
68 return e->edata;
69}
+ Here is the caller graph for this function: