NeoMutt  2024-04-25-89-g194907
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
config.c File Reference

Config used by libautocrypt. More...

#include "config.h"
#include <stdbool.h>
#include <stddef.h>
#include "private.h"
#include "config/lib.h"
#include "expando/lib.h"
+ Include dependency graph for config.c:

Go to the source code of this file.

Functions

bool config_init_autocrypt (struct ConfigSet *cs)
 Register autocrypt config variables - Implements module_init_config_t -.
 

Variables

char * AutocryptSignAs = NULL
 Autocrypt Key id to sign as.
 
char * AutocryptDefaultKey = NULL
 Autocrypt default key id (used for postponing messages)
 
static const struct ExpandoDefinition AutocryptFormatDef []
 Expando definitions.
 
static struct ConfigDef AutocryptVars []
 Config definitions for the autocrypt library.
 

Detailed Description

Config used by libautocrypt.

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

Variable Documentation

◆ AutocryptSignAs

char* AutocryptSignAs = NULL

Autocrypt Key id to sign as.

Definition at line 37 of file config.c.

◆ AutocryptDefaultKey

char* AutocryptDefaultKey = NULL

Autocrypt default key id (used for postponing messages)

Definition at line 38 of file config.c.

◆ AutocryptFormatDef

const struct ExpandoDefinition AutocryptFormatDef[]
static
Initial value:
= {
{ "a", "address", ED_AUTOCRYPT, ED_AUT_ADDRESS, E_TYPE_STRING, NULL },
{ "k", "keyid", ED_AUTOCRYPT, ED_AUT_KEYID, E_TYPE_STRING, NULL },
{ "n", "number", ED_AUTOCRYPT, ED_AUT_NUMBER, E_TYPE_NUMBER, NULL },
{ "p", "prefer-encrypt", ED_AUTOCRYPT, ED_AUT_PREFER_ENCRYPT, E_TYPE_STRING, NULL },
{ "s", "enabled", ED_AUTOCRYPT, ED_AUT_ENABLED, E_TYPE_STRING, NULL },
{ NULL, NULL, 0, -1, -1, NULL }
}
@ 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
@ 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
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
@ 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

Expando definitions.

Config:

  • $autocrypt_acct_format

Definition at line 47 of file config.c.

◆ AutocryptVars

struct ConfigDef AutocryptVars[]
static
Initial value:
= {
{ "autocrypt", DT_BOOL, false, 0, NULL,
"Enables the Autocrypt feature"
},
{ "autocrypt_acct_format", DT_EXPANDO, IP "%4n %-30a %20p %10s", IP &AutocryptFormatDef, NULL,
"Format of the autocrypt account menu"
},
{ "autocrypt_dir", DT_PATH|D_PATH_DIR, IP "~/.mutt/autocrypt", 0, NULL,
"Location of autocrypt files, including the GPG keyring and SQLite database"
},
{ "autocrypt_reply", DT_BOOL, true, 0, NULL,
"Replying to an autocrypt email automatically enables autocrypt in the reply"
},
{ NULL },
}
static const struct ExpandoDefinition AutocryptFormatDef[]
Expando definitions.
Definition: config.c:47
#define IP
Definition: set.h:54
#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

Config definitions for the autocrypt library.

Definition at line 64 of file config.c.