31#include "docs/makedoc_defs.h"
55 {
"create-account", OP_AUTOCRYPT_CREATE_ACCT },
56 {
"delete-account", OP_AUTOCRYPT_DELETE_ACCT },
58 {
"toggle-active", OP_AUTOCRYPT_TOGGLE_ACTIVE },
59 {
"toggle-prefer-encrypt", OP_AUTOCRYPT_TOGGLE_PREFER },
69 { OP_AUTOCRYPT_CREATE_ACCT,
"c" },
70 { OP_AUTOCRYPT_DELETE_ACCT,
"D" },
71 { OP_AUTOCRYPT_TOGGLE_ACTIVE,
"a" },
72 { OP_AUTOCRYPT_TOGGLE_PREFER,
"p" },
135 char msg[128] = { 0 };
136 snprintf(msg,
sizeof(msg),
138 _(
"Really delete account \"%s\"?"),
buf_string((*pentry)->addr->mailbox));
218 if (!dlg || !dlg->
wdata)
#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.
int mutt_autocrypt_db_account_update(struct AutocryptAccount *acct)
Update Account info in the Autocrypt database.
static void toggle_active(struct AccountEntry *entry)
Toggle whether an Autocrypt account is active.
const struct MenuFuncOp OpAutocrypt[]
Functions for the Autocrypt Account.
static const struct AutocryptFunction AutocryptFunctions[]
All the NeoMutt functions that the Autocrypt supports.
const struct MenuOpSeq AutocryptDefaultBindings[]
Key bindings for the Autocrypt Account.
static void toggle_prefer_encrypt(struct AccountEntry *entry)
Toggle whether an Autocrypt account prefers encryption.
int mutt_autocrypt_account_init(bool prompt)
Create a new Autocrypt account.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
Convenience wrapper for the config headers.
Convenience wrapper for the core headers.
struct MuttWindow * dialog_find(struct MuttWindow *win)
Find the parent Dialog of a Window.
const char * dispatcher_get_retval_name(int rv)
Get the name of a return value.
@ FR_SUCCESS
Valid function - successfully performed.
@ FR_UNKNOWN
Unknown function.
@ FR_ERROR
Valid function - error occurred.
@ FR_NO_ACTION
Valid function - no action performed.
bool populate_menu(struct Menu *menu)
Add the Autocrypt data to a Menu.
static int op_exit(struct AliasMenuData *mdata, int op)
exit this menu - Implements alias_function_t -
static int op_autocrypt_toggle_prefer(struct AutocryptData *ad, int op)
Toggle the current account prefer-encrypt flag - Implements autocrypt_function_t -.
static int op_autocrypt_delete_acct(struct AutocryptData *ad, int op)
Delete the current account - Implements autocrypt_function_t -.
static int op_autocrypt_toggle_active(struct AutocryptData *ad, int op)
Toggle the current account active/inactive - Implements autocrypt_function_t -.
static int op_autocrypt_create_acct(struct AutocryptData *ad, int op)
Create a new autocrypt account - Implements autocrypt_function_t -.
int autocrypt_function_dispatcher(struct MuttWindow *win, int op)
Perform a Autocrypt function - Implements function_dispatcher_t -.
#define mutt_debug(LEVEL,...)
Convenience wrapper for the gui headers.
@ LL_DEBUG1
Log at debug level 1.
Convenience wrapper for the library headers.
const char * opcodes_get_name(int op)
Get the name of an opcode.
@ 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 AutocryptAccount * account
Account details.
bool enabled
Is this account enabled.
bool prefer_encrypt
false = nopref, true = mutual
Data to pass to the Autocrypt Functions.
bool done
Should we close the Dialog?
struct Menu * menu
Autocrypt Menu.
struct AccountEntryArray entries
Account Entries.
autocrypt_function_t function
Function to call.
int op
Op code, e.g. OP_AUTOCRYPT_CREATE_ACCT.
void * wdata
Private data.