23#ifndef MUTT_CONFIG_SUBSET_H
24#define MUTT_CONFIG_SUBSET_H
int elem_list_sort(const void *a, const void *b, void *sdata)
Compare two HashElem pointers to config - Implements sort_t -.
String manipulation buffer.
Container for lots of config items.
A set of inherited config items.
struct Notify * notify
Notifications: NotifyConfig, EventConfig.
const char * name
Scope name of Subset.
struct ConfigSet * cs
Parent ConfigSet.
struct ConfigSubset * parent
Parent Subset.
enum ConfigScope scope
Scope of Subset, e.g. SET_SCOPE_ACCOUNT.
const struct ConfigSubset * sub
Config Subset.
const char * name
Name of config item that changed.
struct HashElem * he
Config item that changed.
The item stored in a Hash Table.
int cs_subset_he_string_minus_equals(const struct ConfigSubset *sub, struct HashElem *he, const char *value, struct Buffer *err)
Remove from a config item by string.
int cs_subset_he_string_get(const struct ConfigSubset *sub, struct HashElem *he, struct Buffer *result)
Get a config item as a string.
NotifyConfig
Config notification types.
@ NT_CONFIG_DELETED
Config item has been deleted.
@ NT_CONFIG_RESET
Config item has been reset to initial, or parent, value.
@ NT_CONFIG_SET
Config item has been set.
int cs_subset_he_native_set(const struct ConfigSubset *sub, struct HashElem *he, intptr_t value, struct Buffer *err)
Natively set the value of a HashElem config item.
int cs_subset_str_native_set(const struct ConfigSubset *sub, const char *name, intptr_t value, struct Buffer *err)
Natively set the value of a string config item.
intptr_t cs_subset_he_native_get(const struct ConfigSubset *sub, struct HashElem *he, struct Buffer *err)
Natively get the value of a HashElem config item.
int cs_subset_he_delete(const struct ConfigSubset *sub, struct HashElem *he, struct Buffer *err)
Delete config item from a config.
struct HashElem ** get_elem_list(struct ConfigSet *cs)
Create a sorted list of all config items.
int cs_subset_he_reset(const struct ConfigSubset *sub, struct HashElem *he, struct Buffer *err)
Reset a config item to its initial value.
int cs_subset_str_string_get(const struct ConfigSubset *sub, const char *name, struct Buffer *result)
Get a config item as a string.
int cs_subset_he_string_set(const struct ConfigSubset *sub, struct HashElem *he, const char *value, struct Buffer *err)
Set a config item by string.
int cs_subset_str_string_set(const struct ConfigSubset *sub, const char *name, const char *value, struct Buffer *err)
Set a config item by string.
struct HashElem * cs_subset_create_inheritance(const struct ConfigSubset *sub, const char *name)
Create a Subset config item (inherited)
struct ConfigSubset * cs_subset_new(const char *name, struct ConfigSubset *sub_parent, struct Notify *not_parent)
Create a new Config Subset.
void cs_subset_free(struct ConfigSubset **ptr)
Free a Config Subset.
ConfigScope
Who does this Config belong to?
@ SET_SCOPE_MAILBOX
This Config is Mailbox-specific.
@ SET_SCOPE_NEOMUTT
This Config is NeoMutt-specific (global)
@ SET_SCOPE_ACCOUNT
This Config is Account-specific.
int cs_subset_he_string_plus_equals(const struct ConfigSubset *sub, struct HashElem *he, const char *value, struct Buffer *err)
Add to a config item by string.
struct HashElem * cs_subset_lookup(const struct ConfigSubset *sub, const char *name)
Find an inherited config item.
void cs_subset_notify_observers(const struct ConfigSubset *sub, struct HashElem *he, enum NotifyConfig ev)
Notify all observers of an event.