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

Config used by libhcache. More...

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

Go to the source code of this file.

Functions

static int hcache_validator (const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
 Validate the "header_cache" config variable - Implements ConfigDef::validator() -.
 
static int hcache_backend_validator (const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
 Validate the "header_cache_backend" config variable - Implements ConfigDef::validator() -.
 
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() -.
 
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() -.
 

Variables

struct ConfigDef HcacheVars []
 Config definitions for the Header Cache.
 
struct ConfigDef HcacheVarsComp []
 Config definitions for the Header Cache Compression.
 

Detailed Description

Config used by libhcache.

Authors
  • Louis Brauer
  • 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 config.c.

Variable Documentation

◆ HcacheVars

struct ConfigDef HcacheVars[]
Initial value:
= {
{ "header_cache", DT_PATH, 0, 0, hcache_validator,
"(hcache) Directory/file for the header cache database"
},
{ "header_cache_backend", DT_STRING, 0, 0, hcache_backend_validator,
"(hcache) Header cache backend to use"
},
{ NULL },
}
static int hcache_validator(const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Validate the "header_cache" config variable - Implements ConfigDef::validator() -.
Definition config.c:44
static int hcache_backend_validator(const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Validate the "header_cache_backend" config variable - Implements ConfigDef::validator() -.
Definition config.c:62
@ DT_STRING
a string
Definition types.h:44
@ DT_PATH
a path to a file/directory
Definition types.h:39

Config definitions for the Header Cache.

Definition at line 169 of file config.c.

169 {
170 // clang-format off
171 { "header_cache", DT_PATH, 0, 0, hcache_validator,
172 "(hcache) Directory/file for the header cache database"
173 },
174 { "header_cache_backend", DT_STRING, 0, 0, hcache_backend_validator,
175 "(hcache) Header cache backend to use"
176 },
177 { NULL },
178 // clang-format on
179};

◆ HcacheVarsComp

struct ConfigDef HcacheVarsComp[]
Initial value:
= {
{ "header_cache_compress_method", DT_STRING, 0, 0, compress_method_validator,
"(hcache) Enable generic hcache database compression"
},
{ "header_cache_compress_level", DT_NUMBER|D_INTEGER_NOT_NEGATIVE, 1, 0, compress_level_validator,
"(hcache) Level of compression for method"
},
{ NULL },
}
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:96
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:133
@ DT_NUMBER
a number
Definition types.h:38
#define D_INTEGER_NOT_NEGATIVE
Negative numbers are not allowed.
Definition types.h:101

Config definitions for the Header Cache Compression.

Definition at line 185 of file config.c.

185 {
186 // clang-format off
187 // These two are not in alphabetical order because `level`s validator depends on `method`
188 { "header_cache_compress_method", DT_STRING, 0, 0, compress_method_validator,
189 "(hcache) Enable generic hcache database compression"
190 },
191 { "header_cache_compress_level", DT_NUMBER|D_INTEGER_NOT_NEGATIVE, 1, 0, compress_level_validator,
192 "(hcache) Level of compression for method"
193 },
194 { NULL },
195 // clang-format on
196};