NeoMutt  2025-12-11-435-g4ac674
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 "gui/lib.h"
#include "key/lib.h"
#include "menu/lib.h"
#include "ncrypt/lib.h"
+ Include dependency graph for functions.c:

Go to the source code of this file.

Functions

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

Variables

struct MenuDefinitionMdPgp = NULL
 Pgp Menu Definition.
 
struct MenuDefinitionMdSmime = NULL
 Smime Menu Definition.
 
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 SubMenu * sm_generic)

Initialise the PGP Keybindings - Implements ::init_keys_api.

Definition at line 91 of file functions.c.

92{
93 struct MenuDefinition *md = NULL;
94 struct SubMenu *sm = NULL;
95
97 md = km_register_menu(MENU_PGP, "pgp");
98 km_menu_add_submenu(md, sm);
99 km_menu_add_submenu(md, sm_generic);
101
102 MdPgp = md;
103
105 md = km_register_menu(MENU_SMIME, "smime");
106 km_menu_add_submenu(md, sm);
107 km_menu_add_submenu(md, sm_generic);
109
110 MdSmime = md;
111}
void km_menu_add_submenu(struct MenuDefinition *md, struct SubMenu *sm)
Add a SubMenu to a Menu Definition.
Definition init.c:123
struct SubMenu * km_register_submenu(const struct MenuFuncOp functions[])
Register a submenu.
Definition init.c:91
struct MenuDefinition * km_register_menu(int menu, const char *name)
Register a menu.
Definition init.c:107
void km_menu_add_bindings(struct MenuDefinition *md, const struct MenuOpSeq bindings[])
Add Keybindings to a Menu.
Definition init.c:136
struct MenuDefinition * MdPgp
Pgp Menu Definition.
Definition functions.c:37
static const struct MenuFuncOp OpSmime[]
Functions for the Smime Menu.
Definition functions.c:56
static const struct MenuFuncOp OpPgp[]
Functions for the Pgp Menu.
Definition functions.c:46
static const struct MenuOpSeq PgpDefaultBindings[]
Key bindings for the Pgp Menu.
Definition functions.c:68
static const struct MenuOpSeq SmimeDefaultBindings[]
Key bindings for the Smime Menu.
Definition functions.c:78
struct MenuDefinition * MdSmime
Smime Menu Definition.
Definition functions.c:40
Functions for a Dialog or Window.
Definition menu.h:80
Collection of related functions.
Definition menu.h:68
@ MENU_PGP
PGP encryption menu.
Definition type.h:46
@ MENU_SMIME
SMIME encryption menu.
Definition type.h:50
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ MdPgp

struct MenuDefinition* MdPgp = NULL

Pgp Menu Definition.

Definition at line 37 of file functions.c.

◆ MdSmime

struct MenuDefinition* MdSmime = NULL

Smime Menu Definition.

Definition at line 40 of file functions.c.

◆ 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 46 of file functions.c.

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

◆ 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 56 of file functions.c.

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

◆ 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 68 of file functions.c.

68 { /* map: pgp */
69 { OP_EXIT, "q" },
70 { OP_VERIFY_KEY, "c" },
71 { OP_VIEW_ID, "%" },
72 { 0, NULL },
73};

◆ 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 78 of file functions.c.

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