NeoMutt  2024-03-23-23-gec7045
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
mdata.c File Reference

Maildir-specific Mailbox data. More...

#include "config.h"
#include "mutt/lib.h"
#include "core/lib.h"
#include "mdata.h"
+ Include dependency graph for mdata.c:

Go to the source code of this file.

Functions

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

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

Function Documentation

◆ maildir_mdata_new()

struct MaildirMboxData * maildir_mdata_new ( void  )

Create a new MaildirMboxData object.

Return values
ptrNew MaildirMboxData struct

Definition at line 49 of file mdata.c.

50{
51 struct MaildirMboxData *mdata = mutt_mem_calloc(1, sizeof(struct MaildirMboxData));
52 return mdata;
53}
void * mutt_mem_calloc(size_t nmemb, size_t size)
Allocate zeroed memory on the heap.
Definition: memory.c:50
void * mdata
Driver specific data.
Definition: mailbox.h:132
Maildir-specific Mailbox data -.
Definition: mdata.h:35
+ Here is the call graph for this function:
+ 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 60 of file mdata.c.

61{
62 if (m && (m->type == MUTT_MAILDIR))
63 return m->mdata;
64
65 return NULL;
66}
@ MUTT_MAILDIR
'Maildir' Mailbox type
Definition: mailbox.h:48
enum MailboxType type
Mailbox type.
Definition: mailbox.h:102
+ Here is the caller graph for this function: