NeoMutt  2021-02-05-666-ge300cd
Teaching an old dog new tricks
DOXYGEN
mdata.c
Go to the documentation of this file.
1 
29 #include "config.h"
30 #include "mutt/lib.h"
31 #include "core/lib.h"
32 #include "mdata.h"
33 
37 void maildir_mdata_free(void **ptr)
38 {
39  // struct MaildirMboxData *mdata = *ptr;
40  FREE(ptr);
41 }
42 
48 {
49  struct MaildirMboxData *mdata = mutt_mem_calloc(1, sizeof(struct MaildirMboxData));
50  return mdata;
51 }
52 
59 {
60  if (!m || ((m->type != MUTT_MAILDIR) && (m->type != MUTT_MH)))
61  return NULL;
62  return m->mdata;
63 }
void maildir_mdata_free(void **ptr)
Free the private Mailbox data - Implements Mailbox::mdata_free()
Definition: mdata.c:37
enum MailboxType type
Mailbox type.
Definition: mailbox.h:105
void * mutt_mem_calloc(size_t nmemb, size_t size)
Allocate zeroed memory on the heap.
Definition: memory.c:50
Maildir-specific Mailbox data.
Convenience wrapper for the core headers.
void * mdata
Driver specific data.
Definition: mailbox.h:136
'Maildir' Mailbox type
Definition: mailbox.h:51
A mailbox.
Definition: mailbox.h:81
'MH' Mailbox type
Definition: mailbox.h:50
#define FREE(x)
Definition: memory.h:40
struct MaildirMboxData * maildir_mdata_new(void)
Create a new MaildirMboxData object.
Definition: mdata.c:47
Convenience wrapper for the library headers.
Maildir-specific Mailbox data -.
Definition: mdata.h:34
struct MaildirMboxData * maildir_mdata_get(struct Mailbox *m)
Get the private data for this Mailbox.
Definition: mdata.c:58