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

Definition of the Compmbox Module. More...

#include "config.h"
#include <stdbool.h>
#include <stddef.h>
#include "mutt/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 compmbox_init (struct NeoMutt *n)
 Initialise a Module - Implements Module::init()
 
static bool compmbox_commands_register (struct NeoMutt *n, struct CommandArray *ca)
 Register NeoMutt Commands - Implements Module::commands_register()
 
static bool compmbox_cleanup (struct NeoMutt *n)
 Clean up a Module - Implements Module::cleanup()
 

Variables

const struct Command CompCommands []
 Compression Commands.
 
const struct Module ModuleCompmbox
 Module for the Compmbox library.
 

Detailed Description

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

◆ compmbox_init()

static bool compmbox_init ( struct NeoMutt * n)
static

Initialise a Module - Implements Module::init()

Definition at line 41 of file module.c.

42{
43 // struct CompmboxModuleData *md = MUTT_MEM_CALLOC(1, struct CompmboxModuleData);
44 // neomutt_set_module_data(n, MODULE_ID_COMPMBOX, md);
45
46 return true;
47}

◆ compmbox_commands_register()

static bool compmbox_commands_register ( struct NeoMutt * n,
struct CommandArray * ca )
static

Register NeoMutt Commands - Implements Module::commands_register()

Definition at line 52 of file module.c.

53{
55}
const struct Command CompCommands[]
Compression Commands.
Definition compress.c:62
bool commands_register(struct CommandArray *ca, const struct Command *cmds)
Add commands to Commands array.
Definition command.c:51
+ Here is the call graph for this function:

◆ compmbox_cleanup()

static bool compmbox_cleanup ( struct NeoMutt * n)
static

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

Definition at line 60 of file module.c.

61{
62 // struct CompmboxModuleData *md = neomutt_get_module_data(n, MODULE_ID_COMPMBOX);
63 // ASSERT(md);
64
65 // FREE(&md);
66 return true;
67}

Variable Documentation

◆ CompCommands

const struct Command CompCommands[]
extern

Compression Commands.

Definition at line 62 of file compress.c.

62 {
63 // clang-format off
64 { "append-hook", CMD_APPEND_HOOK, parse_compress_hook,
65 N_("Define command to append to a compressed mailbox"),
66 N_("append-hook <regex> <shell-command>"),
67 "optionalfeatures.html#append-hook" },
68 { "close-hook", CMD_CLOSE_HOOK, parse_compress_hook,
69 N_("Define command to close a compressed mailbox"),
70 N_("close-hook <regex> <shell-command>"),
71 "optionalfeatures.html#close-hook" },
72 { "open-hook", CMD_OPEN_HOOK, parse_compress_hook,
73 N_("Define command to open a compressed mailbox"),
74 N_("open-hook <regex> <shell-command>"),
75 "optionalfeatures.html#open-hook" },
76
77 { NULL, CMD_NONE, NULL, NULL, NULL, NULL, CF_NO_FLAGS },
78 // clang-format on
79};
#define CF_NO_FLAGS
No flags are set.
Definition command.h:48
@ CMD_CLOSE_HOOK
:close-hook
Definition command.h:70
@ CMD_NONE
No Command.
Definition command.h:59
@ CMD_OPEN_HOOK
:open-hook
Definition command.h:100
@ CMD_APPEND_HOOK
:append-hook
Definition command.h:64
enum CommandResult parse_compress_hook(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
Parse compress hook commands - Implements Command::parse() -.
Definition parse.c:914
#define N_(a)
Definition message.h:32

◆ ModuleCompmbox

const struct Module ModuleCompmbox
Initial value:
= {
"compmbox",
NULL,
NULL,
NULL,
NULL,
}
static bool compmbox_commands_register(struct NeoMutt *n, struct CommandArray *ca)
Register NeoMutt Commands - Implements Module::commands_register()
Definition module.c:52
static bool compmbox_cleanup(struct NeoMutt *n)
Clean up a Module - Implements Module::cleanup()
Definition module.c:60
static bool compmbox_init(struct NeoMutt *n)
Initialise a Module - Implements Module::init()
Definition module.c:41
@ MODULE_ID_COMPMBOX
ModuleCompmbox, Compressed Mailbox
Definition module_api.h:56

Module for the Compmbox library.

Definition at line 72 of file module.c.

72 {
74 "compmbox",
76 NULL, // config_define_types
77 NULL, // config_define_variables
79 NULL, // gui_init
80 NULL, // gui_cleanup
82};