NeoMutt  2024-12-12-19-ge4b57e
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 40 of file mdata.c.

41{
42 if (!ptr || !*ptr)
43 return;
44
45 struct ImapMboxData *mdata = *ptr;
46
48 mutt_list_free(&mdata->flags);
49 FREE(&mdata->name);
50 FREE(&mdata->real_name);
51 FREE(&mdata->munge_name);
52
53 FREE(ptr);
54}
void imap_mdata_cache_reset(struct ImapMboxData *mdata)
Release and clear cache data of ImapMboxData structure.
Definition: util.c:109
void mutt_list_free(struct ListHead *h)
Free a List AND its strings.
Definition: list.c:123
#define FREE(x)
Definition: memory.h:55
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:167
void nntp_acache_free(struct NntpMboxData *mdata)
Remove all temporarily cache files.
Definition: newsrc.c:104
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: