NeoMutt  2021-02-05-666-ge300cd
Teaching an old dog new tricks
DOXYGEN
edata.c File Reference

Imap-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 imap_edata_free (void **ptr)
 Free the private Email data - Implements Email::edata_free() More...
 
struct ImapEmailDataimap_edata_new (void)
 Create a new ImapEmailData. More...
 
struct ImapEmailDataimap_edata_get (struct Email *e)
 Get the private data for this Email. More...
 

Detailed Description

Imap-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

◆ imap_edata_free()

void imap_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 ImapEmailData *edata = *ptr;
44  /* this should be safe even if the list wasn't used */
45  FREE(&edata->flags_system);
46  FREE(&edata->flags_remote);
47  FREE(ptr);
48 }
char * flags_remote
Definition: edata.h:48
char * flags_system
Definition: edata.h:47
void * edata
Driver-specific data.
Definition: email.h:111
#define FREE(x)
Definition: memory.h:40
IMAP-specific Email data -.
Definition: edata.h:33
+ Here is the caller graph for this function:

◆ imap_edata_new()

struct ImapEmailData* imap_edata_new ( void  )

Create a new ImapEmailData.

Return values
ptrNew ImapEmailData

Definition at line 54 of file edata.c.

55 {
56  return mutt_mem_calloc(1, sizeof(struct ImapEmailData));
57 }
void * mutt_mem_calloc(size_t nmemb, size_t size)
Allocate zeroed memory on the heap.
Definition: memory.c:50
IMAP-specific Email data -.
Definition: edata.h:33
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ imap_edata_get()

struct ImapEmailData* imap_edata_get ( struct Email e)

Get the private data for this Email.

Parameters
eEmail
Return values
ptrPrivate Email data

Definition at line 64 of file edata.c.

65 {
66  if (!e)
67  return NULL;
68  return e->edata;
69 }
void * edata
Driver-specific data.
Definition: email.h:111
+ Here is the caller graph for this function: