NeoMutt  2025-12-11-694-ga89709
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 "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 address_init (struct NeoMutt *n)
 Initialise a Module - Implements Module::init()
 
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()
 
static bool address_cleanup (struct NeoMutt *n)
 Clean up a Module - Implements Module::cleanup()
 

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_init()

static bool address_init ( struct NeoMutt * n)
static

Initialise a Module - Implements Module::init()

Definition at line 45 of file module.c.

46{
47 // struct AddressModuleData *md = MUTT_MEM_CALLOC(1, struct AddressModuleData);
48 // neomutt_set_module_data(n, MODULE_ID_ADDRESS, md);
49
50 return true;
51}

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

57{
58 return cs_register_type(cs, &CstAddress);
59}
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 64 of file module.c.

65{
66 bool rc = true;
67
68#if defined(HAVE_LIBIDN)
70#endif
71
72 return rc;
73}
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:

◆ address_cleanup()

static bool address_cleanup ( struct NeoMutt * n)
static

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

Definition at line 78 of file module.c.

79{
80 // struct AddressModuleData *md = neomutt_get_module_data(n, MODULE_ID_ADDRESS);
81 // ASSERT(md);
82
83 // FREE(&md);
84 return true;
85}

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,
}
static bool address_config_define_variables(struct NeoMutt *n, struct ConfigSet *cs)
Define the Config Variables - Implements Module::config_define_variables()
Definition module.c:64
static bool address_cleanup(struct NeoMutt *n)
Clean up a Module - Implements Module::cleanup()
Definition module.c:78
static bool address_config_define_types(struct NeoMutt *n, struct ConfigSet *cs)
Set up Config Types - Implements Module::config_define_types()
Definition module.c:56
static bool address_init(struct NeoMutt *n)
Initialise a Module - Implements Module::init()
Definition module.c:45
@ MODULE_ID_ADDRESS
ModuleAddress, Address
Definition module_api.h:47

Module for the Address library.

Definition at line 90 of file module.c.

90 {
92 "address",
96 NULL, // commands_register
97 NULL, // gui_init
98 NULL, // gui_cleanup
100};