Prototype for a Autocrypt Function.
More...
Prototype for a Autocrypt Function.
- Parameters
-
menu | Menu |
op | Operation to perform, e.g. OP_AUTOCRYPT_CREATE_ACCT |
- Return values
-
◆ op_autocrypt_create_acct()
static int op_autocrypt_create_acct |
( |
struct AutocryptData * |
ad, |
|
|
int |
op |
|
) |
| |
|
static |
Create a new autocrypt account - Implements autocrypt_function_t -.
Definition at line 113 of file functions.c.
114{
117
119}
int mutt_autocrypt_account_init(bool prompt)
Create a new Autocrypt account.
@ FR_SUCCESS
Valid function - successfully performed.
bool populate_menu(struct Menu *menu)
Add the Autocrypt data to a Menu.
struct Menu * menu
Autocrypt Menu.
◆ op_autocrypt_delete_acct()
static int op_autocrypt_delete_acct |
( |
struct AutocryptData * |
ad, |
|
|
int |
op |
|
) |
| |
|
static |
Delete the current account - Implements autocrypt_function_t -.
Definition at line 124 of file functions.c.
125{
128
131 if (!pentry)
132 return 0;
133
134 char msg[128] = { 0 };
135 snprintf(msg, sizeof(msg),
136
137 _(
"Really delete account \"%s\"?"),
buf_string((*pentry)->addr->mailbox));
140
143
145}
#define ARRAY_GET(head, idx)
Return the element at index.
int mutt_autocrypt_db_account_delete(struct AutocryptAccount *acct)
Delete an Account from the Autocrypt database.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
@ FR_ERROR
Valid function - error occurred.
@ FR_NO_ACTION
Valid function - no action performed.
@ MUTT_NO
User answered 'No', or assume 'No'.
@ MUTT_YES
User answered 'Yes', or assume 'Yes'.
enum QuadOption query_yesorno(const char *prompt, enum QuadOption def)
Ask the user a Yes/No question.
An entry in the Autocrypt account Menu.
struct AccountEntryArray entries
Account Entries.
◆ op_autocrypt_toggle_active()
static int op_autocrypt_toggle_active |
( |
struct AutocryptData * |
ad, |
|
|
int |
op |
|
) |
| |
|
static |
Toggle the current account active/inactive - Implements autocrypt_function_t -.
Definition at line 150 of file functions.c.
151{
154
157 if (!pentry)
158 return 0;
159
162
164}
static void toggle_active(struct AccountEntry *entry)
Toggle whether an Autocrypt account is active.
◆ op_autocrypt_toggle_prefer()
static int op_autocrypt_toggle_prefer |
( |
struct AutocryptData * |
ad, |
|
|
int |
op |
|
) |
| |
|
static |
Toggle the current account prefer-encrypt flag - Implements autocrypt_function_t -.
Definition at line 169 of file functions.c.
170{
173
176 if (!pentry)
177 return 0;
178
181
183}
static void toggle_prefer_encrypt(struct AccountEntry *entry)
Toggle whether an Autocrypt account prefers encryption.
◆ op_exit()