NeoMutt  2022-04-29-249-gaae397
Teaching an old dog new tricks
DOXYGEN
mdata.h File Reference

Maildir-specific Mailbox data. More...

#include <sys/types.h>
#include <time.h>
+ Include dependency graph for mdata.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  MaildirMboxData
 Maildir-specific Mailbox data -. More...
 

Functions

void maildir_mdata_free (void **ptr)
 Free the private Mailbox data - Implements Mailbox::mdata_free() More...
 
struct MaildirMboxDatamaildir_mdata_get (struct Mailbox *m)
 Get the private data for this Mailbox. More...
 
struct MaildirMboxDatamaildir_mdata_new (void)
 Create a new MaildirMboxData object. More...
 

Detailed Description

Maildir-specific Mailbox 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 mdata.h.

Function Documentation

◆ maildir_mdata_free()

void maildir_mdata_free ( void **  ptr)

Free the private Mailbox data - Implements Mailbox::mdata_free()

Definition at line 37 of file mdata.c.

38{
39 // struct MaildirMboxData *mdata = *ptr;
40 FREE(ptr);
41}
#define FREE(x)
Definition: memory.h:43
+ Here is the caller graph for this function:

◆ maildir_mdata_get()

struct MaildirMboxData * maildir_mdata_get ( struct Mailbox m)

Get the private data for this Mailbox.

Parameters
mMailbox
Return values
ptrMaildirMboxData

Definition at line 58 of file mdata.c.

59{
60 if (!m || ((m->type != MUTT_MAILDIR) && (m->type != MUTT_MH)))
61 return NULL;
62 return m->mdata;
63}
@ MUTT_MH
'MH' Mailbox type
Definition: mailbox.h:47
@ MUTT_MAILDIR
'Maildir' Mailbox type
Definition: mailbox.h:48
enum MailboxType type
Mailbox type.
Definition: mailbox.h:102
void * mdata
Driver specific data.
Definition: mailbox.h:132
+ Here is the caller graph for this function:

◆ maildir_mdata_new()

struct MaildirMboxData * maildir_mdata_new ( void  )

Create a new MaildirMboxData object.

Return values
ptrNew MaildirMboxData struct

Definition at line 47 of file mdata.c.

48{
49 struct MaildirMboxData *mdata = mutt_mem_calloc(1, sizeof(struct MaildirMboxData));
50 return mdata;
51}
void * mutt_mem_calloc(size_t nmemb, size_t size)
Allocate zeroed memory on the heap.
Definition: memory.c:50
Maildir-specific Mailbox data -.
Definition: mdata.h:35
+ Here is the call graph for this function:
+ Here is the caller graph for this function: