NeoMutt  2025-12-11-911-gd8d604
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
functions.c File Reference

PGP/Smime functions. More...

#include "config.h"
#include <stddef.h>
#include "mutt/lib.h"
#include "core/lib.h"
#include "gui/lib.h"
#include "key/lib.h"
#include "menu/lib.h"
#include "ncrypt/lib.h"
#include "module_data.h"
+ Include dependency graph for functions.c:

Go to the source code of this file.

Functions

void pgp_init_keys (struct NeoMutt *n, struct SubMenu *sm_generic)
 Initialise the PGP Keybindings - Implements ::init_keys_api.
 

Variables

static const struct MenuFuncOp OpPgp []
 Functions for the Pgp Menu.
 
static const struct MenuFuncOp OpSmime []
 Functions for the Smime Menu.
 
static const struct MenuOpSeq PgpDefaultBindings []
 Key bindings for the Pgp Menu.
 
static const struct MenuOpSeq SmimeDefaultBindings []
 Key bindings for the Smime Menu.
 

Detailed Description

PGP/Smime functions.

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 functions.c.

Function Documentation

◆ pgp_init_keys()

void pgp_init_keys ( struct NeoMutt * n,
struct SubMenu * sm_generic )

Initialise the PGP Keybindings - Implements ::init_keys_api.

Definition at line 88 of file functions.c.

89{
90 struct MenuDefinition *md = NULL;
91 struct SubMenu *sm = NULL;
92
94 md = km_register_menu(MENU_PGP, "pgp");
95 km_menu_add_submenu(md, sm);
96 km_menu_add_submenu(md, sm_generic);
98
100 ASSERT(mod_data);
101 mod_data->menu_pgp = md;
102
104 md = km_register_menu(MENU_SMIME, "smime");
105 km_menu_add_submenu(md, sm);
106 km_menu_add_submenu(md, sm_generic);
108
109 mod_data->menu_smime = md;
110}
void km_menu_add_submenu(struct MenuDefinition *md, struct SubMenu *sm)
Add a SubMenu to a Menu Definition.
Definition init.c:121
struct SubMenu * km_register_submenu(const struct MenuFuncOp functions[])
Register a submenu.
Definition init.c:87
struct MenuDefinition * km_register_menu(int menu, const char *name)
Register a menu.
Definition init.c:104
void km_menu_add_bindings(struct MenuDefinition *md, const struct MenuOpSeq bindings[])
Add Keybindings to a Menu.
Definition init.c:134
@ MODULE_ID_NCRYPT
ModuleNcrypt, Ncrypt
Definition module_api.h:80
static const struct MenuFuncOp OpSmime[]
Functions for the Smime Menu.
Definition functions.c:53
static const struct MenuFuncOp OpPgp[]
Functions for the Pgp Menu.
Definition functions.c:43
static const struct MenuOpSeq PgpDefaultBindings[]
Key bindings for the Pgp Menu.
Definition functions.c:65
static const struct MenuOpSeq SmimeDefaultBindings[]
Key bindings for the Smime Menu.
Definition functions.c:75
void * neomutt_get_module_data(struct NeoMutt *n, enum ModuleId id)
Get the private data for a Module.
Definition neomutt.c:663
#define ASSERT(COND)
Definition signal2.h:59
Functions for a Dialog or Window.
Definition menu.h:77
Ncrypt private Module data.
Definition module_data.h:38
struct MenuDefinition * menu_smime
S/MIME menu definition.
Definition module_data.h:41
struct MenuDefinition * menu_pgp
PGP menu definition.
Definition module_data.h:40
Collection of related functions.
Definition menu.h:65
@ MENU_PGP
PGP encryption menu.
Definition type.h:47
@ MENU_SMIME
SMIME encryption menu.
Definition type.h:51
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ OpPgp

const struct MenuFuncOp OpPgp[]
static
Initial value:
= {
{ "exit", OP_EXIT },
{ "verify-key", OP_VERIFY_KEY },
{ "view-name", OP_VIEW_ID },
{ NULL, 0 },
}

Functions for the Pgp Menu.

Definition at line 43 of file functions.c.

43 { /* map: pgp */
44 { "exit", OP_EXIT },
45 { "verify-key", OP_VERIFY_KEY },
46 { "view-name", OP_VIEW_ID },
47 { NULL, 0 },
48};

◆ OpSmime

const struct MenuFuncOp OpSmime[]
static
Initial value:
= {
{ "exit", OP_EXIT },
{ "verify-key", OP_VERIFY_KEY },
{ "view-name", OP_VIEW_ID },
{ NULL, 0 },
}

Functions for the Smime Menu.

Definition at line 53 of file functions.c.

53 { /* map: smime */
54 { "exit", OP_EXIT },
55#ifdef CRYPT_BACKEND_GPGME
56 { "verify-key", OP_VERIFY_KEY },
57 { "view-name", OP_VIEW_ID },
58#endif
59 { NULL, 0 },
60};

◆ PgpDefaultBindings

const struct MenuOpSeq PgpDefaultBindings[]
static
Initial value:
= {
{ OP_EXIT, "q" },
{ OP_VERIFY_KEY, "c" },
{ OP_VIEW_ID, "%" },
{ 0, NULL },
}

Key bindings for the Pgp Menu.

Definition at line 65 of file functions.c.

65 { /* map: pgp */
66 { OP_EXIT, "q" },
67 { OP_VERIFY_KEY, "c" },
68 { OP_VIEW_ID, "%" },
69 { 0, NULL },
70};

◆ SmimeDefaultBindings

const struct MenuOpSeq SmimeDefaultBindings[]
static
Initial value:
= {
{ OP_EXIT, "q" },
{ OP_VERIFY_KEY, "c" },
{ OP_VIEW_ID, "%" },
{ 0, NULL },
}

Key bindings for the Smime Menu.

Definition at line 75 of file functions.c.

75 { /* map: smime */
76 { OP_EXIT, "q" },
77#ifdef CRYPT_BACKEND_GPGME
78 { OP_VERIFY_KEY, "c" },
79 { OP_VIEW_ID, "%" },
80#endif
81 { 0, NULL },
82};