Go to the documentation of this file.
108 for (
size_t i = 0; list[i]; i++)
134 struct Notify *not_parent)
141 sub->
cs = sub_parent->
cs;
148 if (sub_parent && sub_parent->
name)
175 snprintf(scope,
sizeof(scope),
"%s:%s", sub->
name, name);
208 snprintf(scope,
sizeof(scope),
"%s:%s", sub->
name, name);
271 intptr_t value,
struct Buffer *err)
293 intptr_t value,
struct Buffer *err)
374 const char *value,
struct Buffer *err)
396 const char *value,
struct Buffer *err)
412 const char *value,
struct Buffer *err)
434 const char *value,
struct Buffer *err)
450 const char *value,
struct Buffer *err)
472 const char *value,
struct Buffer *err)
int mutt_istr_cmp(const char *a, const char *b)
Compare two strings ignoring case, safely.
struct HashElem * cs_subset_lookup(const struct ConfigSubset *sub, const char *name)
Find an inherited config item.
void * mutt_mem_calloc(size_t nmemb, size_t size)
Allocate zeroed memory on the heap.
int cs_subset_str_reset(const struct ConfigSubset *sub, const char *name, struct Buffer *err)
Reset a config item to its initial value.
union HashKey key
Key representing the data.
struct HashElem * cs_inherit_variable(const struct ConfigSet *cs, struct HashElem *parent, const char *name)
Create in inherited config item.
@ NT_CONFIG
Config has changed, NotifyConfig, EventConfig.
String manipulation buffer.
NotifyConfig
Config notification types.
#define CSR_SUCCESS
Action completed successfully.
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_he_string_get(const struct ConfigSet *cs, struct HashElem *he, struct Buffer *result)
Get a config item as a string.
#define CSR_SUC_NO_CHANGE
The value hasn't changed.
void cs_subset_notify_observers(const struct ConfigSubset *sub, struct HashElem *he, enum NotifyConfig ev)
Notify all observers of an event.
struct HashTable * hash
HashTable storing the config items.
char * mutt_str_dup(const char *str)
Copy a string, safely.
struct ConfigSubset * parent
Parent Subset.
intptr_t cs_he_native_get(const struct ConfigSet *cs, struct HashElem *he, struct Buffer *err)
Natively get the value of a HashElem config item.
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.
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_native_set(const struct ConfigSubset *sub, const char *name, intptr_t value, struct Buffer *err)
Natively set the value of a string config item.
bool notify_send(struct Notify *notify, enum NotifyType event_type, int event_subtype, void *event_data)
Send out a notification message.
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.
struct HashElem ** get_elem_list(struct ConfigSet *cs)
Create a sorted list of all config items.
struct Notify * notify_new(void)
Create a new notifications handler.
@ NT_CONFIG_SET
Config item has been set.
void cs_subset_free(struct ConfigSubset **ptr)
Free a Config Subset.
int cs_he_reset(const struct ConfigSet *cs, struct HashElem *he, struct Buffer *err)
Reset a config item to its initial value.
const char * strkey
String key.
struct HashElem * cs_subset_create_inheritance(const struct ConfigSubset *sub, const char *name)
Create a Subset config item (inherited)
intptr_t cs_subset_str_native_get(const struct ConfigSubset *sub, const char *name, struct Buffer *err)
Natively get the value of a string config item.
const char * name
Scope name of Subset.
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.
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.
struct ConfigSet * cs
Parent ConfigSet.
struct HashElem * he
Config item that changed.
int cs_subset_str_string_minus_equals(const struct ConfigSubset *sub, const char *name, const char *value, struct Buffer *err)
Remove from a config item by string.
struct HashElem * mutt_hash_walk(const struct HashTable *table, struct HashWalkState *state)
Iterate through all the HashElem's in a Hash Table.
int cs_he_string_plus_equals(const struct ConfigSet *cs, struct HashElem *he, const char *value, struct Buffer *err)
Add to a config item by string.
struct HashElem * cs_get_base(struct HashElem *he)
Find the root Config Item.
struct ConfigSubset * cs_subset_new(const char *name, struct ConfigSubset *sub_parent, struct Notify *not_parent)
Create a new Config Subset.
int cs_he_string_set(const struct ConfigSet *cs, struct HashElem *he, const char *value, struct Buffer *err)
Set a config item by string.
Cursor to iterate through a Hash Table.
#define CSR_ERR_CODE
Problem with the code.
The item stored in a Hash Table.
int cs_he_string_minus_equals(const struct ConfigSet *cs, struct HashElem *he, const char *value, struct Buffer *err)
Remove from a config item by string.
struct Notify * notify
Notifications system.
const struct ConfigSubset * sub
Config Subset.
const char * name
Name of config item that changed.
int cs_subset_he_string_get(const struct ConfigSubset *sub, struct HashElem *he, struct Buffer *result)
Get a config item as a string.
void notify_free(struct Notify **ptr)
Free a notification handler.
Container for lots of config items.
int cs_subset_str_string_get(const struct ConfigSubset *sub, const char *name, struct Buffer *result)
Get a config item as a string.
enum ConfigScope scope
Scope of Subset, e.g. SET_SCOPE_ACCOUNT.
@ NT_CONFIG_RESET
Config item has been reset to initial, or parent, value.
int elem_list_sort(const void *a, const void *b)
Sort two HashElem pointers to config.
int cs_subset_str_string_plus_equals(const struct ConfigSubset *sub, const char *name, const char *value, struct Buffer *err)
Add to a config item by string.
void notify_set_parent(struct Notify *notify, struct Notify *parent)
Set the parent notification handler.
struct HashElem * cs_get_elem(const struct ConfigSet *cs, const char *name)
Get the HashElem representing a config item.
A set of inherited config items.
size_t mutt_str_startswith(const char *str, const char *prefix)
Check whether a string starts with a prefix.
void cs_uninherit_variable(const struct ConfigSet *cs, const char *name)
Remove an inherited config item.
int cs_he_native_set(const struct ConfigSet *cs, struct HashElem *he, intptr_t value, struct Buffer *err)
Natively set the value of a HashElem 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.
size_t mutt_str_copy(char *dest, const char *src, size_t dsize)
Copy a string into a buffer (guaranteeing NUL-termination)