NeoMutt  2024-12-12-14-g7b49f7
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
edata.c File Reference

Imap-specific Email data. More...

#include "config.h"
#include <stddef.h>
#include <string.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() -.
 
struct ImapEmailDataimap_edata_new (void)
 Create a new ImapEmailData.
 
struct ImapEmailDataimap_edata_get (struct Email *e)
 Get the private data for this Email.
 
struct ImapEmailDataimap_edata_clone (struct ImapEmailData *src)
 Clone an ImapEmailData.
 

Detailed Description

Imap-specific Email data.

Authors
  • Richard Russon
  • Pietro Cerutti

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_new()

struct ImapEmailData * imap_edata_new ( void  )

Create a new ImapEmailData.

Return values
ptrNew ImapEmailData

Definition at line 57 of file edata.c.

58{
59 return MUTT_MEM_CALLOC(1, struct ImapEmailData);
60}
#define MUTT_MEM_CALLOC(n, type)
Definition: memory.h:40
IMAP-specific Email data -.
Definition: edata.h:35
+ 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 67 of file edata.c.

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

◆ imap_edata_clone()

struct ImapEmailData * imap_edata_clone ( struct ImapEmailData src)

Clone an ImapEmailData.

Parameters
srcThe source ImapEmailData to clone
Return values
ptrNew ImapEmailData

Definition at line 79 of file edata.c.

80{
81 struct ImapEmailData *dst = imap_edata_new();
82 memcpy(dst, src, sizeof(*src));
85 return dst;
86}
struct ImapEmailData * imap_edata_new(void)
Create a new ImapEmailData.
Definition: edata.c:57
char * mutt_str_dup(const char *str)
Copy a string, safely.
Definition: string.c:253
char * flags_remote
Definition: edata.h:49
char * flags_system
Definition: edata.h:48
+ Here is the call graph for this function:
+ Here is the caller graph for this function: