NeoMutt  2025-12-11-694-ga89709
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
module.c File Reference

Definition of the Autocrypt Module. More...

#include "config.h"
#include <stdbool.h>
#include <stddef.h>
#include "mutt/lib.h"
#include "config/lib.h"
#include "core/lib.h"
#include "module_data.h"
+ Include dependency graph for module.c:

Go to the source code of this file.

Functions

static bool autocrypt_init (struct NeoMutt *n)
 Initialise a Module - Implements Module::init()
 
static bool autocrypt_config_define_variables (struct NeoMutt *n, struct ConfigSet *cs)
 Define the Config Variables - Implements Module::config_define_variables()
 
static bool autocrypt_cleanup (struct NeoMutt *n)
 Clean up a Module - Implements Module::cleanup()
 

Variables

struct ConfigDef AutocryptVars []
 Config definitions for the autocrypt library.
 
const struct Module ModuleAutocrypt
 Module for the Autocrypt library.
 

Detailed Description

Definition of the Autocrypt Module.

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

Function Documentation

◆ autocrypt_init()

static bool autocrypt_init ( struct NeoMutt * n)
static

Initialise a Module - Implements Module::init()

Definition at line 42 of file module.c.

43{
44 // struct AutocryptModuleData *md = MUTT_MEM_CALLOC(1, struct AutocryptModuleData);
45 // neomutt_set_module_data(n, MODULE_ID_AUTOCRYPT, md);
46
47 return true;
48}

◆ autocrypt_config_define_variables()

static bool autocrypt_config_define_variables ( struct NeoMutt * n,
struct ConfigSet * cs )
static

Define the Config Variables - Implements Module::config_define_variables()

Definition at line 53 of file module.c.

54{
55 bool rc = false;
56
57#if defined(USE_AUTOCRYPT)
59#endif
60
61 return rc;
62}
struct ConfigDef AutocryptVars[]
Config definitions for the autocrypt library.
Definition config.c:64
bool cs_register_variables(const struct ConfigSet *cs, struct ConfigDef vars[])
Register a set of config items.
Definition set.c:290
+ Here is the call graph for this function:

◆ autocrypt_cleanup()

static bool autocrypt_cleanup ( struct NeoMutt * n)
static

Clean up a Module - Implements Module::cleanup()

Definition at line 67 of file module.c.

68{
69 // struct AutocryptModuleData *md = neomutt_get_module_data(n, MODULE_ID_AUTOCRYPT);
70 // ASSERT(md);
71
72 // FREE(&md);
73 return true;
74}

Variable Documentation

◆ AutocryptVars

struct ConfigDef AutocryptVars[]
extern

Config definitions for the autocrypt library.

Definition at line 64 of file config.c.

64 {
65 // clang-format off
66 { "autocrypt", DT_BOOL, false, 0, NULL,
67 "Enables the Autocrypt feature"
68 },
69 { "autocrypt_acct_format", DT_EXPANDO, IP "%4n %-30a %20p %10s", IP &AutocryptFormatDef, NULL,
70 "Format of the autocrypt account menu"
71 },
72 { "autocrypt_dir", DT_PATH|D_PATH_DIR, IP "~/.mutt/autocrypt", 0, NULL,
73 "Location of autocrypt files, including the GPG keyring and SQLite database"
74 },
75 { "autocrypt_reply", DT_BOOL, true, 0, NULL,
76 "Replying to an autocrypt email automatically enables autocrypt in the reply"
77 },
78 { NULL },
79 // clang-format on
80};
static const struct ExpandoDefinition AutocryptFormatDef[]
Expando definitions.
Definition config.c:47
#define IP
Definition set.h:55
#define D_PATH_DIR
Path is a directory.
Definition types.h:103
@ DT_BOOL
boolean option
Definition types.h:32
@ DT_EXPANDO
an expando
Definition types.h:34
@ DT_PATH
a path to a file/directory
Definition types.h:39

◆ ModuleAutocrypt

const struct Module ModuleAutocrypt
Initial value:
= {
"autocrypt",
NULL,
NULL,
NULL,
NULL,
}
static bool autocrypt_config_define_variables(struct NeoMutt *n, struct ConfigSet *cs)
Define the Config Variables - Implements Module::config_define_variables()
Definition module.c:53
static bool autocrypt_init(struct NeoMutt *n)
Initialise a Module - Implements Module::init()
Definition module.c:42
static bool autocrypt_cleanup(struct NeoMutt *n)
Clean up a Module - Implements Module::cleanup()
Definition module.c:67
@ MODULE_ID_AUTOCRYPT
ModuleAutocrypt, Autocrypt
Definition module_api.h:50

Module for the Autocrypt library.

Definition at line 79 of file module.c.

79 {
81 "autocrypt",
83 NULL, // config_define_types
85 NULL, // commands_register
86 NULL, // gui_init
87 NULL, // gui_cleanup
89};