NeoMutt  2024-11-14-34-g5aaf0d
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
autocrypt_data.h File Reference

Private Autocrypt Data. More...

#include <stdbool.h>
#include "mutt/lib.h"
#include "private.h"
+ Include dependency graph for autocrypt_data.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  AutocryptData
 Data to pass to the Autocrypt Functions. More...
 

Functions

struct AutocryptDataautocrypt_data_new (void)
 Create new Autocrypt Data.
 
void autocrypt_data_free (struct Menu *menu, void **ptr)
 Free Autocrypt Data - Implements Menu::mdata_free() -.
 
void account_entry_array_clear (struct AccountEntryArray *entries)
 Clear an AccountEntry array.
 

Detailed Description

Private Autocrypt 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 autocrypt_data.h.

Function Documentation

◆ autocrypt_data_new()

struct AutocryptData * autocrypt_data_new ( void  )

Create new Autocrypt Data.

Return values
ptrNew Autocrypt Data

Definition at line 38 of file autocrypt_data.c.

39{
40 struct AutocryptData *ad = MUTT_MEM_CALLOC(1, struct AutocryptData);
41
42 ARRAY_INIT(&ad->entries);
43
44 return ad;
45}
#define ARRAY_INIT(head)
Initialize an array.
Definition: array.h:65
#define MUTT_MEM_CALLOC(n, type)
Definition: memory.h:40
Data to pass to the Autocrypt Functions.
struct AccountEntryArray entries
Account Entries.
+ Here is the caller graph for this function:

◆ account_entry_array_clear()

void account_entry_array_clear ( struct AccountEntryArray *  entries)

Clear an AccountEntry array.

Parameters
entriesArray to clear
Note
The array itself will not be freed

Definition at line 53 of file autocrypt_data.c.

54{
55 struct AccountEntry **pe = NULL;
56 ARRAY_FOREACH(pe, entries)
57 {
58 struct AccountEntry *e = *pe;
61 FREE(pe);
62 }
63
64 ARRAY_FREE(entries);
65}
void mutt_addr_free(struct Address **ptr)
Free a single Address.
Definition: address.c:462
#define ARRAY_FOREACH(elem, head)
Iterate over all elements of the array.
Definition: array.h:212
#define ARRAY_FREE(head)
Release all memory.
Definition: array.h:204
void mutt_autocrypt_db_account_free(struct AutocryptAccount **ptr)
Free an AutocryptAccount.
Definition: db.c:246
#define FREE(x)
Definition: memory.h:55
An entry in the Autocrypt account Menu.
Definition: private.h:47
struct Address * addr
Email address associated with the account.
Definition: private.h:50
struct AutocryptAccount * account
Account details.
Definition: private.h:49
+ Here is the call graph for this function:
+ Here is the caller graph for this function: