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

Definition of the Hcache 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 hcache_config_define_variables (struct NeoMutt *n, struct ConfigSet *cs)
 Define the Config Variables - Implements Module::config_define_variables()
 

Variables

struct ConfigDef HcacheVars []
 Config definitions for the Header Cache.
 
struct ConfigDef HcacheVarsComp []
 Config definitions for the Header Cache Compression.
 
struct ConfigDef HcacheVarsComp2 []
 Deprecated Config definitions for the Header Cache Compression.
 
struct ConfigDef HcacheVarsPage []
 Deprecated Config definitions for the Header Cache.
 
const struct Module ModuleHcache
 Module for the Hcache library.
 

Detailed Description

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

◆ hcache_config_define_variables()

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

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

Definition at line 43 of file module.c.

44{
45 bool rc = true;
46
47#if defined(USE_HCACHE)
49#endif
50
51#if defined(USE_HCACHE_COMPRESSION)
53#endif
54
55#if defined(HAVE_QDBM) && defined(HAVE_TC) && defined(HAVE_KC)
57#endif
58
59#if defined(HAVE_GDBM) && defined(HAVE_BDB)
61#endif
62
63 return rc;
64}
bool cs_register_variables(const struct ConfigSet *cs, struct ConfigDef vars[])
Register a set of config items.
Definition set.c:290
struct ConfigDef HcacheVarsPage[]
Deprecated Config definitions for the Header Cache.
Definition config.c:169
struct ConfigDef HcacheVars[]
Config definitions for the Header Cache.
Definition config.c:123
struct ConfigDef HcacheVarsComp[]
Config definitions for the Header Cache Compression.
Definition config.c:139
struct ConfigDef HcacheVarsComp2[]
Deprecated Config definitions for the Header Cache Compression.
Definition config.c:157
+ Here is the call graph for this function:

Variable Documentation

◆ HcacheVars

struct ConfigDef HcacheVars[]
extern

Config definitions for the Header Cache.

Definition at line 123 of file config.c.

123 {
124 // clang-format off
125 { "header_cache", DT_PATH, 0, 0, NULL,
126 "(hcache) Directory/file for the header cache database"
127 },
128 { "header_cache_backend", DT_STRING, 0, 0, hcache_validator,
129 "(hcache) Header cache backend to use"
130 },
131 { NULL },
132 // clang-format on
133};
static int hcache_validator(const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Validate the "header_cache_backend" config variable - Implements ConfigDef::validator() -.
Definition config.c:43
@ DT_STRING
a string
Definition types.h:44
@ DT_PATH
a path to a file/directory
Definition types.h:39

◆ HcacheVarsComp

struct ConfigDef HcacheVarsComp[]
extern

Config definitions for the Header Cache Compression.

Definition at line 139 of file config.c.

139 {
140 // clang-format off
141 // These two are not in alphabetical order because `level`s validator depends on `method`
142 { "header_cache_compress_method", DT_STRING, 0, 0, compress_method_validator,
143 "(hcache) Enable generic hcache database compression"
144 },
145 { "header_cache_compress_level", DT_NUMBER|D_INTEGER_NOT_NEGATIVE, 1, 0, compress_level_validator,
146 "(hcache) Level of compression for method"
147 },
148 { NULL },
149 // clang-format on
150};
static int compress_method_validator(const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Validate the "header_cache_compress_method" config variable - Implements ConfigDef::validator() -.
Definition config.c:65
static int compress_level_validator(const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Validate the "header_cache_compress_level" config variable - Implements ConfigDef::validator() -.
Definition config.c:87
@ DT_NUMBER
a number
Definition types.h:38
#define D_INTEGER_NOT_NEGATIVE
Negative numbers are not allowed.
Definition types.h:101

◆ HcacheVarsComp2

struct ConfigDef HcacheVarsComp2[]
extern

Deprecated Config definitions for the Header Cache Compression.

Definition at line 157 of file config.c.

157 {
158 // clang-format off
159 { "header_cache_compress", D_INTERNAL_DEPRECATED|DT_BOOL, 0, IP "2020-03-25" },
160 { NULL },
161 // clang-format on
162};
#define IP
Definition set.h:54
#define D_INTERNAL_DEPRECATED
Config item shouldn't be used any more.
Definition types.h:88
@ DT_BOOL
boolean option
Definition types.h:32

◆ HcacheVarsPage

struct ConfigDef HcacheVarsPage[]
extern

Deprecated Config definitions for the Header Cache.

Definition at line 169 of file config.c.

169 {
170 // clang-format off
171 { "header_cache_pagesize", D_INTERNAL_DEPRECATED|DT_LONG, 0, IP "2020-03-25" },
172 { NULL },
173 // clang-format on
174};
@ DT_LONG
a number (long)
Definition types.h:35

◆ ModuleHcache

const struct Module ModuleHcache
Initial value:
= {
"hcache",
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
}
static bool hcache_config_define_variables(struct NeoMutt *n, struct ConfigSet *cs)
Define the Config Variables - Implements Module::config_define_variables()
Definition module.c:43
@ MODULE_ID_HCACHE
ModuleHcache, Email Header Cache
Definition module_api.h:67

Module for the Hcache library.

Definition at line 69 of file module.c.

69 {
71 "hcache",
72 NULL, // init
73 NULL, // config_define_types
75 NULL, // commands_register
76 NULL, // gui_init
77 NULL, // gui_cleanup
78 NULL, // cleanup
79};