NeoMutt  2024-02-01-23-g345d7b
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
mdata_free()

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

+ Collaboration diagram for mdata_free():

Functions

void attach_private_data_free (struct Menu *menu, void **ptr)
 Free the Attach Data - Implements Menu::mdata_free() -.
 
static void autocrypt_menu_free (struct Menu *menu, void **ptr)
 Free the Autocrypt account Menu - Implements Menu::mdata_free() -.
 
void attach_data_free (struct Menu *menu, void **ptr)
 Free the Compose Attach Data - Implements Menu::mdata_free() -.
 
static void gpgme_key_table_free (struct Menu *menu, void **ptr)
 Free the key table - Implements Menu::mdata_free() -.
 
static void pgp_key_table_free (struct Menu *menu, void **ptr)
 Free the key table - Implements Menu::mdata_free() -.
 
static void smime_key_table_free (struct Menu *menu, void **ptr)
 Free the key table - Implements Menu::mdata_free() -.
 
static void free_pattern_menu (struct Menu *menu, void **ptr)
 Free the Pattern Completion menu - Implements Menu::mdata_free() -.
 

Detailed Description

Free the private data attached to the Menu.

Parameters
menuMenu
ptrMenu data to free
Precondition
menu is not NULL
ptr is not NULL
*ptr is not NULL

Function Documentation

◆ attach_private_data_free()

void attach_private_data_free ( struct Menu menu,
void **  ptr 
)

Free the Attach Data - Implements Menu::mdata_free() -.

Parameters
menuMenu
ptrAttach Data to free

Definition at line 38 of file private_data.c.

39{
40 if (!ptr || !*ptr)
41 return;
42
43 FREE(ptr);
44}
#define FREE(x)
Definition: memory.h:45
+ Here is the caller graph for this function:

◆ autocrypt_menu_free()

static void autocrypt_menu_free ( struct Menu menu,
void **  ptr 
)
static

Free the Autocrypt account Menu - Implements Menu::mdata_free() -.

Definition at line 196 of file dlg_autocrypt.c.

197{
198 struct AccountEntry *entries = *ptr;
199
200 for (size_t i = 0; i < menu->max; i++)
201 {
203 mutt_addr_free(&entries[i].addr);
204 }
205
206 FREE(ptr);
207}
void mutt_addr_free(struct Address **ptr)
Free a single Address.
Definition: address.c:462
void mutt_autocrypt_db_account_free(struct AutocryptAccount **ptr)
Free an AutocryptAccount.
Definition: db.c:247
An entry in the Autocrypt account Menu.
Definition: private.h:45
struct Address * addr
Email address associated with the account.
Definition: private.h:48
struct AutocryptAccount * account
Account details.
Definition: private.h:47
int max
Number of entries in the menu.
Definition: lib.h:71
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ attach_data_free()

void attach_data_free ( struct Menu menu,
void **  ptr 
)

Free the Compose Attach Data - Implements Menu::mdata_free() -.

Definition at line 37 of file attach_data.c.

38{
39 if (!ptr || !*ptr)
40 return;
41
42 struct ComposeAttachData *attach_data = *ptr;
43
44 mutt_actx_free(&attach_data->actx);
45
46 FREE(ptr);
47}
void mutt_actx_free(struct AttachCtx **ptr)
Free an Attachment Context.
Definition: attach.c:198
Data to fill the Compose Attach Window.
Definition: attach_data.h:33
struct AttachCtx * actx
Set of attachments.
Definition: attach_data.h:34
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gpgme_key_table_free()

static void gpgme_key_table_free ( struct Menu menu,
void **  ptr 
)
static

Free the key table - Implements Menu::mdata_free() -.

Note
The keys are owned by the caller of the dialog

Definition at line 554 of file dlg_gpgme.c.

555{
556 FREE(ptr);
557}
+ Here is the caller graph for this function:

◆ pgp_key_table_free()

static void pgp_key_table_free ( struct Menu menu,
void **  ptr 
)
static

Free the key table - Implements Menu::mdata_free() -.

Note
The keys are owned by the caller of the dialog

Definition at line 463 of file dlg_pgp.c.

464{
465 FREE(ptr);
466}
+ Here is the caller graph for this function:

◆ smime_key_table_free()

static void smime_key_table_free ( struct Menu menu,
void **  ptr 
)
static

Free the key table - Implements Menu::mdata_free() -.

Note
The keys are owned by the caller of the dialog

Definition at line 182 of file dlg_smime.c.

183{
184 FREE(ptr);
185}
+ Here is the caller graph for this function:

◆ free_pattern_menu()

static void free_pattern_menu ( struct Menu menu,
void **  ptr 
)
static

Free the Pattern Completion menu - Implements Menu::mdata_free() -.

Definition at line 151 of file dlg_pattern.c.

152{
153 struct PatternEntry *entries = *ptr;
154
155 for (size_t i = 0; i < menu->max; i++)
156 {
157 FREE(&entries[i].tag);
158 FREE(&entries[i].expr);
159 FREE(&entries[i].desc);
160 }
161
162 FREE(ptr);
163}
A line in the Pattern Completion menu.
Definition: private.h:37
const char * desc
Description of pattern.
Definition: private.h:41
const char * tag
Copied to buffer if selected.
Definition: private.h:39
const char * expr
Displayed in the menu.
Definition: private.h:40
+ Here is the caller graph for this function: