NeoMutt
2025-12-11-949-g4870ee
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
module.c
Go to the documentation of this file.
1
22
28
29
#include "config.h"
30
#include <stdbool.h>
31
#include <stddef.h>
32
#include "
mutt/lib.h
"
33
#include "
config/lib.h
"
34
#include "
core/lib.h
"
35
#include "
module_data.h
"
36
37
extern
struct
ConfigDef
MlistVars
[];
38
42
static
bool
mlist_init
(
struct
NeoMutt
*n)
43
{
44
struct
MlistModuleData
*mod_data =
MUTT_MEM_CALLOC
(1,
struct
MlistModuleData
);
45
neomutt_set_module_data
(n,
MODULE_ID_MLIST
, mod_data);
46
47
return
true
;
48
}
49
53
static
bool
mlist_cleanup
(
struct
NeoMutt
*n,
void
*data)
54
{
55
struct
MlistModuleData
*mod_data = data;
56
57
FREE
(&mod_data);
58
return
true
;
59
}
60
64
const
struct
Module
ModuleMlist
= {
65
MODULE_ID_MLIST
,
66
"mlist"
,
67
mlist_init
,
68
NULL,
// config_define_types
69
NULL,
// config_define_variables
70
NULL,
// commands_register
71
NULL,
// gui_init
72
NULL,
// gui_cleanup
73
mlist_cleanup
,
74
};
lib.h
Convenience wrapper for the config headers.
lib.h
Convenience wrapper for the core headers.
ModuleMlist
const struct Module ModuleMlist
Module for the Mlist library.
Definition
module.c:64
FREE
#define FREE(x)
Free memory and set the pointer to NULL.
Definition
memory.h:68
MUTT_MEM_CALLOC
#define MUTT_MEM_CALLOC(n, type)
Definition
memory.h:52
mlist_cleanup
static bool mlist_cleanup(struct NeoMutt *n, void *data)
Clean up a Module - Implements Module::cleanup()
Definition
module.c:53
mlist_init
static bool mlist_init(struct NeoMutt *n)
Initialise a Module - Implements Module::init()
Definition
module.c:42
MlistVars
struct ConfigDef MlistVars[]
module_data.h
Mlist private Module data.
MODULE_ID_MLIST
@ MODULE_ID_MLIST
ModuleMlist, Mailing-list
Definition
module_api.h:80
lib.h
Convenience wrapper for the library headers.
neomutt_set_module_data
void neomutt_set_module_data(struct NeoMutt *n, enum ModuleId id, void *data)
Set the private data for a Module.
Definition
neomutt.c:680
ConfigDef
Definition
set.h:65
MlistModuleData
Mlist private Module data.
Definition
module_data.h:32
Module
Definition
module_api.h:104
NeoMutt
Container for Accounts, Notifications.
Definition
neomutt.h:41