NeoMutt  2024-04-16-36-g75b6fb
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
Mailbox Private Data API

Free the private data attached to the Mailbox. More...

Functions

void imap_mdata_free (void **ptr)
 Free the private Mailbox data - Implements Mailbox::mdata_free() -.
 
void maildir_mdata_free (void **ptr)
 Free the private Mailbox data - Implements Mailbox::mdata_free() -.
 
void mh_mdata_free (void **ptr)
 Free the private Mailbox data - Implements Mailbox::mdata_free() -.
 
void nntp_mdata_free (void **ptr)
 Free the private Mailbox data - Implements Mailbox::mdata_free() -.
 
void nm_mdata_free (void **ptr)
 Free the private Mailbox data - Implements Mailbox::mdata_free() -.
 

Detailed Description

Free the private data attached to the Mailbox.

Parameters
ptrPrivate data to be freed
Precondition
ptr is not NULL
*ptr is not NULL

Function Documentation

◆ imap_mdata_free()

void imap_mdata_free ( void **  ptr)

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

Definition at line 39 of file mdata.c.

40{
41 if (!ptr || !*ptr)
42 return;
43
44 struct ImapMboxData *mdata = *ptr;
45
47 mutt_list_free(&mdata->flags);
48 FREE(&mdata->name);
49 FREE(&mdata->real_name);
50 FREE(&mdata->munge_name);
51
52 FREE(ptr);
53}
void imap_mdata_cache_reset(struct ImapMboxData *mdata)
Release and clear cache data of ImapMboxData structure.
Definition: util.c:107
void mutt_list_free(struct ListHead *h)
Free a List AND its strings.
Definition: list.c:122
#define FREE(x)
Definition: memory.h:45
IMAP-specific Mailbox data -.
Definition: mdata.h:40
void * mdata
Driver specific data.
Definition: mailbox.h:132
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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 if (!ptr || !*ptr)
40 return;
41
42 FREE(ptr);
43}
+ Here is the caller graph for this function:

◆ mh_mdata_free()

void mh_mdata_free ( void **  ptr)

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

Definition at line 37 of file mdata.c.

38{
39 if (!ptr || !*ptr)
40 return;
41
42 FREE(ptr);
43}
+ Here is the caller graph for this function:

◆ nntp_mdata_free()

void nntp_mdata_free ( void **  ptr)

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

Definition at line 38 of file mdata.c.

39{
40 struct NntpMboxData *mdata = *ptr;
41
43 mutt_bcache_close(&mdata->bcache);
44 FREE(&mdata->newsrc_ent);
45 FREE(&mdata->desc);
46 FREE(ptr);
47}
void mutt_bcache_close(struct BodyCache **ptr)
Close an Email-Body Cache.
Definition: bcache.c:164
void nntp_acache_free(struct NntpMboxData *mdata)
Remove all temporarily cache files.
Definition: newsrc.c:105
NNTP-specific Mailbox data -.
Definition: mdata.h:34
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nm_mdata_free()

void nm_mdata_free ( void **  ptr)

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

The NmMboxData struct stores global Notmuch data, such as the connection to the database. This function will close the database, free the resources and the struct itself.

Definition at line 45 of file mdata.c.

46{
47 if (!ptr || !*ptr)
48 return;
49
50 struct NmMboxData *mdata = *ptr;
51
52 mutt_debug(LL_DEBUG1, "nm: freeing context data %p\n", (void *) mdata);
53
54 url_free(&mdata->db_url);
55 FREE(&mdata->db_query);
56 progress_free(&mdata->progress);
57 FREE(ptr);
58}
#define mutt_debug(LEVEL,...)
Definition: logging2.h:89
@ LL_DEBUG1
Log at debug level 1.
Definition: logging2.h:43
void progress_free(struct Progress **ptr)
Free a Progress Bar.
Definition: progress.c:110
Notmuch-specific Mailbox data -.
Definition: mdata.h:35
void url_free(struct Url **ptr)
Free the contents of a URL.
Definition: url.c:124
+ Here is the call graph for this function:
+ Here is the caller graph for this function: