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

Definition of the Address Module. More...

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

Go to the source code of this file.

Functions

static bool address_config_define_types (struct NeoMutt *n, struct ConfigSet *cs)
 Set up Config Types - Implements Module::config_define_types()
 
static bool address_config_define_variables (struct NeoMutt *n, struct ConfigSet *cs)
 Define the Config Variables - Implements Module::config_define_variables()
 

Variables

const struct ConfigSetType CstAddress
 Config type representing an Email Address.
 
struct ConfigDef AddressVarsIdn []
 IDN Config definitions.
 
const struct Module ModuleAddress
 Module for the Address library.
 

Detailed Description

Definition of the Address 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

◆ address_config_define_types()

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

Set up Config Types - Implements Module::config_define_types()

Definition at line 43 of file module.c.

44{
45 return cs_register_type(cs, &CstAddress);
46}
const struct ConfigSetType CstAddress
Config type representing an Email Address.
bool cs_register_type(struct ConfigSet *cs, const struct ConfigSetType *cst)
Register a type of config item.
Definition set.c:220
+ Here is the call graph for this function:

◆ address_config_define_variables()

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

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

Definition at line 51 of file module.c.

52{
53 bool rc = true;
54
55#if defined(HAVE_LIBIDN)
57#endif
58
59 return rc;
60}
struct ConfigDef AddressVarsIdn[]
IDN Config definitions.
Definition config.c:30
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:

Variable Documentation

◆ CstAddress

const struct ConfigSetType CstAddress
extern

Config type representing an Email Address.

Definition at line 265 of file config_type.c.

265 {
267 "address",
272 NULL, // string_plus_equals
273 NULL, // string_minus_equals
277};
static void address_destroy(void *var, const struct ConfigDef *cdef)
Destroy an Address object - Implements ConfigSetType::destroy() -.
Definition config_type.c:62
static bool address_has_been_set(void *var, const struct ConfigDef *cdef)
Is the config value different to its initial value?
static intptr_t address_native_get(void *var, const struct ConfigDef *cdef, struct Buffer *err)
Get an Address object from an Address config item - Implements ConfigSetType::native_get() -.
static int address_native_set(void *var, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Set an Address config item by Address object - Implements ConfigSetType::native_set() -.
static int address_reset(void *var, const struct ConfigDef *cdef, struct Buffer *err)
Reset an Address to its initial value - Implements ConfigSetType::reset() -.
static int address_string_get(void *var, const struct ConfigDef *cdef, struct Buffer *result)
Get an Address as a string - Implements ConfigSetType::string_get() -.
static int address_string_set(void *var, struct ConfigDef *cdef, const char *value, struct Buffer *err)
Set an Address by string - Implements ConfigSetType::string_set() -.
Definition config_type.c:74
@ DT_ADDRESS
e-mail address
Definition types.h:31

◆ AddressVarsIdn

struct ConfigDef AddressVarsIdn[]
extern

IDN Config definitions.

Definition at line 30 of file config.c.

30 {
31 // clang-format off
32 { "idn_decode", DT_BOOL, true, 0, NULL,
33 "(idn) Decode international domain names"
34 },
35 { "idn_encode", DT_BOOL, true, 0, NULL,
36 "(idn) Encode international domain names"
37 },
38 { NULL },
39 // clang-format on
40};
@ DT_BOOL
boolean option
Definition types.h:32

◆ ModuleAddress

const struct Module ModuleAddress
Initial value:
= {
"address",
NULL,
NULL,
NULL,
NULL,
NULL,
}
static bool address_config_define_variables(struct NeoMutt *n, struct ConfigSet *cs)
Define the Config Variables - Implements Module::config_define_variables()
Definition module.c:51
static bool address_config_define_types(struct NeoMutt *n, struct ConfigSet *cs)
Set up Config Types - Implements Module::config_define_types()
Definition module.c:43
@ MODULE_ID_ADDRESS
ModuleAddress, Address
Definition module_api.h:47

Module for the Address library.

Definition at line 65 of file module.c.

65 {
67 "address",
68 NULL, // init
71 NULL, // commands_register
72 NULL, // gui_init
73 NULL, // gui_cleanup
74 NULL, // cleanup
75};