NeoMutt  2024-11-14-34-g5aaf0d
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 ConfigSet *cs, 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 ConfigSet *cs, 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 ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
 Validate the "header_cache_compress_level" config variable - Implements ConfigDef::validator() -.
 
bool config_init_hcache (struct ConfigSet *cs)
 Register hcache config variables - Implements module_init_config_t -.
 

Variables

static struct ConfigDef HcacheVars []
 Config definitions for the Header Cache.
 
static struct ConfigDef HcacheVarsComp []
 Config definitions for the Header Cache Compression.
 
static struct ConfigDef HcacheVarsComp2 []
 Deprecated Config definitions for the Header Cache Compression.
 
static struct ConfigDef HcacheVarsPage []
 Deprecated Config definitions for the Header Cache.
 

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[]
static
Initial value:
= {
{ "header_cache", DT_PATH, 0, 0, NULL,
"(hcache) Directory/file for the header cache database"
},
{ "header_cache_backend", DT_STRING, 0, 0, hcache_validator,
"(hcache) Header cache backend to use"
},
{ NULL },
}
static int hcache_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Validate the "header_cache_backend" config variable - Implements ConfigDef::validator() -.
Definition: config.c:44
@ DT_STRING
a string
Definition: types.h:45
@ DT_PATH
a path to a file/directory
Definition: types.h:40

Config definitions for the Header Cache.

Definition at line 126 of file config.c.

◆ HcacheVarsComp

struct ConfigDef HcacheVarsComp[]
static
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_level_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Validate the "header_cache_compress_level" config variable - Implements ConfigDef::validator() -.
Definition: config.c:90
static int compress_method_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Validate the "header_cache_compress_method" config variable - Implements ConfigDef::validator() -.
Definition: config.c:67
@ DT_NUMBER
a number
Definition: types.h:39
#define D_INTEGER_NOT_NEGATIVE
Negative numbers are not allowed.
Definition: types.h:101

Config definitions for the Header Cache Compression.

Definition at line 142 of file config.c.

◆ HcacheVarsComp2

struct ConfigDef HcacheVarsComp2[]
static
Initial value:
= {
{ "header_cache_compress", D_INTERNAL_DEPRECATED|DT_BOOL, 0, IP "2020-03-25" },
{ NULL },
}
#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

Deprecated Config definitions for the Header Cache Compression.

Definition at line 160 of file config.c.

◆ HcacheVarsPage

struct ConfigDef HcacheVarsPage[]
static
Initial value:
= {
{ "header_cache_pagesize", D_INTERNAL_DEPRECATED|DT_LONG, 0, IP "2020-03-25" },
{ NULL },
}
@ DT_LONG
a number (long)
Definition: types.h:36

Deprecated Config definitions for the Header Cache.

Definition at line 172 of file config.c.