NeoMutt  2024-04-25-97-g7d2481
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
config.c
Go to the documentation of this file.
1
29#include "config.h"
30#include <stdbool.h>
31#include <stddef.h>
32#include "private.h"
33#include "config/lib.h"
34#include "expando/lib.h"
35
36// clang-format off
37char *AutocryptSignAs = NULL;
38char *AutocryptDefaultKey = NULL;
39// clang-format on
40
47static const struct ExpandoDefinition AutocryptFormatDef[] = {
48 // clang-format off
52 { "a", "address", ED_AUTOCRYPT, ED_AUT_ADDRESS, E_TYPE_STRING, NULL },
53 { "k", "keyid", ED_AUTOCRYPT, ED_AUT_KEYID, E_TYPE_STRING, NULL },
54 { "n", "number", ED_AUTOCRYPT, ED_AUT_NUMBER, E_TYPE_NUMBER, NULL },
55 { "p", "prefer-encrypt", ED_AUTOCRYPT, ED_AUT_PREFER_ENCRYPT, E_TYPE_STRING, NULL },
56 { "s", "enabled", ED_AUTOCRYPT, ED_AUT_ENABLED, E_TYPE_STRING, NULL },
57 { NULL, NULL, 0, -1, -1, NULL }
58 // clang-format on
59};
60
64static struct ConfigDef AutocryptVars[] = {
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};
81
86{
87 bool rc = false;
88
89#if defined(USE_AUTOCRYPT)
91#endif
92
93 return rc;
94}
char * AutocryptSignAs
Autocrypt Key id to sign as.
Definition: config.c:37
static const struct ExpandoDefinition AutocryptFormatDef[]
Expando definitions.
Definition: config.c:47
char * AutocryptDefaultKey
Autocrypt default key id (used for postponing messages)
Definition: config.c:38
static struct ConfigDef AutocryptVars[]
Config definitions for the autocrypt library.
Definition: config.c:64
@ ED_AUT_ADDRESS
AccountEntry.addr.
Definition: private.h:60
@ ED_AUT_KEYID
AutocryptAccount.keyid.
Definition: private.h:59
@ ED_AUT_NUMBER
AccountEntry.num.
Definition: private.h:61
@ ED_AUT_ENABLED
AutocryptAccount.enabled.
Definition: private.h:58
@ ED_AUT_PREFER_ENCRYPT
AutocryptAccount.prefer_encrypt.
Definition: private.h:62
Convenience wrapper for the config headers.
bool cs_register_variables(const struct ConfigSet *cs, struct ConfigDef vars[])
Register a set of config items.
Definition: set.c:281
#define IP
Definition: set.h:54
@ E_TYPE_STRING
Data is a string.
Definition: definition.h:37
@ E_TYPE_NUMBER
Data is numeric.
Definition: definition.h:38
@ ED_AUTOCRYPT
Autocrypt ED_AUT_ ExpandoDataAutocrypt.
Definition: domain.h:37
@ ED_GLOBAL
Global ED_GLO_ ExpandoDataGlobal.
Definition: domain.h:44
Parse Expando string.
bool config_init_autocrypt(struct ConfigSet *cs)
Register autocrypt config variables - Implements module_init_config_t -.
Definition: config.c:85
struct ExpandoNode * node_padding_parse(const char *str, const char **parsed_until, int did, int uid, ExpandoParserFlags flags, struct ExpandoParseError *error)
Parse a Padding Expando - Implements ExpandoDefinition::parse() -.
Definition: node_padding.c:232
GUI display the mailboxes in a side panel.
Definition: set.h:64
Container for lots of config items.
Definition: set.h:252
Definition of a format string.
Definition: definition.h:52
#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:40
@ ED_GLO_PADDING_EOL
Padding to end-of-line.
Definition: uid.h:36
@ ED_GLO_PADDING_HARD
Hard Padding.
Definition: uid.h:37
@ ED_GLO_PADDING_SOFT
Soft Padding.
Definition: uid.h:38