#include "types.h"
/**
- * address_destroy - Destroy an Address object
- * @param cs Config items
- * @param var Variable to destroy
- * @param cdef Variable definition
+ * address_destroy - Destroy an Address object - Implements ::cst_destroy
*/
static void address_destroy(const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef)
{
}
/**
- * address_string_set - Set an Address by string
- * @param cs Config items
- * @param var Variable to set
- * @param cdef Variable definition
- * @param value Value to set
- * @param err Buffer for error messages
- * @retval int Result, e.g. #CSR_SUCCESS
- *
- * If var is NULL, then the config item's initial value will be set.
+ * address_string_set - Set an Address by string - Implements ::cst_string_set
*/
static int address_string_set(const struct ConfigSet *cs, void *var, struct ConfigDef *cdef,
const char *value, struct Buffer *err)
}
/**
- * address_string_get - Get an Address as a string
- * @param cs Config items
- * @param var Variable to get
- * @param cdef Variable definition
- * @param result Buffer for results or error messages
- * @retval int Result, e.g. #CSR_SUCCESS
- *
- * If var is NULL, then the config item's initial value will be returned.
+ * address_string_get - Get an Address as a string - Implements ::cst_string_get
*/
static int address_string_get(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, struct Buffer *result)
}
/**
- * address_native_set - Set an Address config item by Address object
- * @param cs Config items
- * @param var Variable to set
- * @param cdef Variable definition
- * @param value Address pointer
- * @param err Buffer for error messages
- * @retval int Result, e.g. #CSR_SUCCESS
+ * address_native_set - Set an Address config item by Address object - Implements ::cst_native_set
*/
static int address_native_set(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, intptr_t value,
}
/**
- * address_native_get - Get an Address object from an Address config item
- * @param cs Config items
- * @param var Variable to get
- * @param cdef Variable definition
- * @param err Buffer for error messages
- * @retval intptr_t Address pointer
+ * address_native_get - Get an Address object from an Address config item - Implements ::cst_native_get
*/
static intptr_t address_native_get(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, struct Buffer *err)
}
/**
- * address_reset - Reset an Address to its initial value
- * @param cs Config items
- * @param var Variable to reset
- * @param cdef Variable definition
- * @param err Buffer for error messages
- * @retval int Result, e.g. #CSR_SUCCESS
+ * address_reset - Reset an Address to its initial value - Implements ::cst_regex
*/
static int address_reset(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, struct Buffer *err)
};
/**
- * bool_string_set - Set a Bool by string
- * @param cs Config items
- * @param var Variable to set
- * @param cdef Variable definition
- * @param value Value to set
- * @param err Buffer for error messages
- * @retval int Result, e.g. #CSR_SUCCESS
- *
- * If var is NULL, then the config item's initial value will be set.
+ * bool_string_set - Set a Bool by string - Implements ::cst_string_set
*/
static int bool_string_set(const struct ConfigSet *cs, void *var, struct ConfigDef *cdef,
const char *value, struct Buffer *err)
}
/**
- * bool_string_get - Get a Bool as a string
- * @param cs Config items
- * @param var Variable to get
- * @param cdef Variable definition
- * @param result Buffer for results or error messages
- * @retval int Result, e.g. #CSR_SUCCESS
- *
- * If var is NULL, then the config item's initial value will be returned.
+ * bool_string_get - Get a Bool as a string - Implements ::cst_string_get
*/
static int bool_string_get(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, struct Buffer *result)
}
/**
- * bool_native_set - Set a Bool config item by bool
- * @param cs Config items
- * @param var Variable to set
- * @param cdef Variable definition
- * @param value Bool value
- * @param err Buffer for error messages
- * @retval int Result, e.g. #CSR_SUCCESS
+ * bool_native_set - Set a Bool config item by bool - Implements ::cst_native_set
*/
static int bool_native_set(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
}
/**
- * bool_native_get - Get a bool from a Bool config item
- * @param cs Config items
- * @param var Variable to get
- * @param cdef Variable definition
- * @param err Buffer for error messages
- * @retval intptr_t Bool
+ * bool_native_get - Get a bool from a Bool config item - Implements ::cst_native_get
*/
static intptr_t bool_native_get(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, struct Buffer *err)
}
/**
- * bool_reset - Reset a Bool to its initial value
- * @param cs Config items
- * @param var Variable to reset
- * @param cdef Variable definition
- * @param err Buffer for error messages
- * @retval int Result, e.g. #CSR_SUCCESS
+ * bool_reset - Reset a Bool to its initial value - Implements ::cst_regex
*/
static int bool_reset(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, struct Buffer *err)
#include "types.h"
/**
- * long_string_set - Set a Long by string
- * @param cs Config items
- * @param var Variable to set
- * @param cdef Variable definition
- * @param value Value to set
- * @param err Buffer for error messages
- * @retval int Result, e.g. #CSR_SUCCESS
- *
- * If var is NULL, then the config item's initial value will be set.
+ * long_string_set - Set a Long by string - Implements ::cst_string_set
*/
static int long_string_set(const struct ConfigSet *cs, void *var, struct ConfigDef *cdef,
const char *value, struct Buffer *err)
}
/**
- * long_string_get - Get a Long as a string
- * @param cs Config items
- * @param var Variable to get
- * @param cdef Variable definition
- * @param result Buffer for results or error messages
- * @retval int Result, e.g. #CSR_SUCCESS
- *
- * If var is NULL, then the config item's initial value will be returned.
+ * long_string_get - Get a Long as a string - Implements ::cst_string_get
*/
static int long_string_get(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, struct Buffer *result)
}
/**
- * long_native_set - Set a Long config item by int
- * @param cs Config items
- * @param var Variable to set
- * @param cdef Variable definition
- * @param value Long
- * @param err Buffer for error messages
- * @retval int Result, e.g. #CSR_SUCCESS
+ * long_native_set - Set a Long config item by int - Implements ::cst_native_set
*/
static int long_native_set(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
}
/**
- * long_native_get - Get an int from a Long config item
- * @param cs Config items
- * @param var Variable to get
- * @param cdef Variable definition
- * @param err Buffer for error messages
- * @retval intptr_t Long
+ * long_native_get - Get an int from a Long config item - Implements ::cst_native_get
*/
static intptr_t long_native_get(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, struct Buffer *err)
}
/**
- * long_reset - Reset a Long to its initial value
- * @param cs Config items
- * @param var Variable to reset
- * @param cdef Variable definition
- * @param err Buffer for error messages
- * @retval int Result, e.g. #CSR_SUCCESS
+ * long_reset - Reset a Long to its initial value - Implements ::cst_regex
*/
static int long_reset(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, struct Buffer *err)
};
/**
- * magic_string_set - Set a Mailbox Magic by string
- * @param cs Config items
- * @param var Variable to set
- * @param cdef Variable definition
- * @param value Value to set
- * @param err Buffer for error messages
- * @retval int Result, e.g. #CSR_SUCCESS
- *
- * If var is NULL, then the config item's initial value will be set.
+ * magic_string_set - Set a Mailbox Magic by string - Implements ::cst_string_set
*/
static int magic_string_set(const struct ConfigSet *cs, void *var, struct ConfigDef *cdef,
const char *value, struct Buffer *err)
}
/**
- * magic_string_get - Get a Mailbox Magic as a string
- * @param cs Config items
- * @param var Variable to get
- * @param cdef Variable definition
- * @param result Buffer for results or error messages
- * @retval int Result, e.g. #CSR_SUCCESS
- *
- * If var is NULL, then the config item's initial value will be returned.
+ * magic_string_get - Get a Mailbox Magic as a string - Implements ::cst_string_get
*/
static int magic_string_get(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, struct Buffer *result)
}
/**
- * magic_native_set - Set a Mailbox Magic config item by int
- * @param cs Config items
- * @param var Variable to set
- * @param cdef Variable definition
- * @param value Mailbox magic
- * @param err Buffer for error messages
- * @retval int Result, e.g. #CSR_SUCCESS
+ * magic_native_set - Set a Mailbox Magic config item by int - Implements ::cst_native_set
*/
static int magic_native_set(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
}
/**
- * magic_native_get - Get an int from a Mailbox Magic config item
- * @param cs Config items
- * @param var Variable to get
- * @param cdef Variable definition
- * @param err Buffer for error messages
- * @retval intptr_t Mailbox magic
+ * magic_native_get - Get an int from a Mailbox Magic config item - Implements ::cst_native_get
*/
static intptr_t magic_native_get(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, struct Buffer *err)
}
/**
- * magic_reset - Reset a Mailbox Magic to its initial value
- * @param cs Config items
- * @param var Variable to reset
- * @param cdef Variable definition
- * @param err Buffer for error messages
- * @retval int Result, e.g. #CSR_SUCCESS
+ * magic_reset - Reset a Mailbox Magic to its initial value - Implements ::cst_regex
*/
static int magic_reset(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, struct Buffer *err)
}
/**
- * mbtable_destroy - Destroy an MbTable object
- * @param cs Config items
- * @param var Variable to destroy
- * @param cdef Variable definition
+ * mbtable_destroy - Destroy an MbTable object - Implements ::cst_destroy
*/
static void mbtable_destroy(const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef)
{
}
/**
- * mbtable_string_set - Set a MbTable by string
- * @param cs Config items
- * @param var Variable to set
- * @param cdef Variable definition
- * @param value Value to set
- * @param err Buffer for error messages
- * @retval int Result, e.g. #CSR_SUCCESS
- *
- * If var is NULL, then the config item's initial value will be set.
+ * mbtable_string_set - Set a MbTable by string - Implements ::cst_string_set
*/
static int mbtable_string_set(const struct ConfigSet *cs, void *var, struct ConfigDef *cdef,
const char *value, struct Buffer *err)
}
/**
- * mbtable_string_get - Get a MbTable as a string
- * @param cs Config items
- * @param var Variable to get
- * @param cdef Variable definition
- * @param result Buffer for results or error messages
- * @retval int Result, e.g. #CSR_SUCCESS
- *
- * If var is NULL, then the config item's initial value will be returned.
+ * mbtable_string_get - Get a MbTable as a string - Implements ::cst_string_get
*/
static int mbtable_string_get(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, struct Buffer *result)
}
/**
- * mbtable_native_set - Set a MbTable config item by MbTable object
- * @param cs Config items
- * @param var Variable to set
- * @param cdef Variable definition
- * @param value MbTable pointer
- * @param err Buffer for error messages
- * @retval int Result, e.g. #CSR_SUCCESS
+ * mbtable_native_set - Set a MbTable config item by MbTable object - Implements ::cst_native_set
*/
static int mbtable_native_set(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, intptr_t value,
}
/**
- * mbtable_native_get - Get an MbTable object from a MbTable config item
- * @param cs Config items
- * @param var Variable to get
- * @param cdef Variable definition
- * @param err Buffer for error messages
- * @retval intptr_t MbTable pointer
+ * mbtable_native_get - Get an MbTable object from a MbTable config item - Implements ::cst_native_get
*/
static intptr_t mbtable_native_get(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, struct Buffer *err)
}
/**
- * mbtable_reset - Reset an MbTable to its initial value
- * @param cs Config items
- * @param var Variable to reset
- * @param cdef Variable definition
- * @param err Buffer for error messages
- * @retval int Result, e.g. #CSR_SUCCESS
+ * mbtable_reset - Reset an MbTable to its initial value - Implements ::cst_regex
*/
static int mbtable_reset(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, struct Buffer *err)
#include "types.h"
/**
- * number_string_set - Set a Number by string
- * @param cs Config items
- * @param var Variable to set
- * @param cdef Variable definition
- * @param value Value to set
- * @param err Buffer for error messages
- * @retval int Result, e.g. #CSR_SUCCESS
- *
- * If var is NULL, then the config item's initial value will be set.
+ * number_string_set - Set a Number by string - Implements ::cst_string_set
*/
static int number_string_set(const struct ConfigSet *cs, void *var, struct ConfigDef *cdef,
const char *value, struct Buffer *err)
}
/**
- * number_string_get - Get a Number as a string
- * @param cs Config items
- * @param var Variable to get
- * @param cdef Variable definition
- * @param result Buffer for results or error messages
- * @retval int Result, e.g. #CSR_SUCCESS
- *
- * If var is NULL, then the config item's initial value will be returned.
+ * number_string_get - Get a Number as a string - Implements ::cst_string_get
*/
static int number_string_get(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, struct Buffer *result)
}
/**
- * number_native_set - Set a Number config item by int
- * @param cs Config items
- * @param var Variable to set
- * @param cdef Variable definition
- * @param value Number
- * @param err Buffer for error messages
- * @retval int Result, e.g. #CSR_SUCCESS
+ * number_native_set - Set a Number config item by int - Implements ::cst_native_set
*/
static int number_native_set(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, intptr_t value,
}
/**
- * number_native_get - Get an int from a Number config item
- * @param cs Config items
- * @param var Variable to get
- * @param cdef Variable definition
- * @param err Buffer for error messages
- * @retval intptr_t Number
+ * number_native_get - Get an int from a Number config item - Implements ::cst_native_get
*/
static intptr_t number_native_get(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, struct Buffer *err)
}
/**
- * number_reset - Reset a Number to its initial value
- * @param cs Config items
- * @param var Variable to reset
- * @param cdef Variable definition
- * @param err Buffer for error messages
- * @retval int Result, e.g. #CSR_SUCCESS
+ * number_reset - Reset a Number to its initial value - Implements ::cst_regex
*/
static int number_reset(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, struct Buffer *err)
#include "types.h"
/**
- * path_destroy - Destroy a Path
- * @param cs Config items
- * @param var Variable to destroy
- * @param cdef Variable definition
+ * path_destroy - Destroy a Path - Implements ::cst_destroy
*/
static void path_destroy(const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef)
{
}
/**
- * path_string_set - Set a Path by string
- * @param cs Config items
- * @param var Variable to set
- * @param cdef Variable definition
- * @param value Value to set
- * @param err Buffer for error messages
- * @retval int Result, e.g. #CSR_SUCCESS
- *
- * If var is NULL, then the config item's initial value will be set.
+ * path_string_set - Set a Path by string - Implements ::cst_string_set
*/
static int path_string_set(const struct ConfigSet *cs, void *var, struct ConfigDef *cdef,
const char *value, struct Buffer *err)
}
/**
- * path_string_get - Get a Path as a string
- * @param cs Config items
- * @param var Variable to get
- * @param cdef Variable definition
- * @param result Buffer for results or error messages
- * @retval int Result, e.g. #CSR_SUCCESS
- *
- * If var is NULL, then the config item's initial value will be returned.
+ * path_string_get - Get a Path as a string - Implements ::cst_string_get
*/
static int path_string_get(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, struct Buffer *result)
}
/**
- * path_native_set - Set a Path config item by string
- * @param cs Config items
- * @param var Variable to set
- * @param cdef Variable definition
- * @param value Native pointer/value to set
- * @param err Buffer for error messages
- * @retval int Result, e.g. #CSR_SUCCESS
+ * path_native_set - Set a Path config item by string - Implements ::cst_native_set
*/
static int path_native_set(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
}
/**
- * path_native_get - Get a string from a Path config item
- * @param cs Config items
- * @param var Variable to get
- * @param cdef Variable definition
- * @param err Buffer for error messages
- * @retval intptr_t Path string
+ * path_native_get - Get a string from a Path config item - Implements ::cst_native_get
*/
static intptr_t path_native_get(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, struct Buffer *err)
}
/**
- * path_reset - Reset a Path to its initial value
- * @param cs Config items
- * @param var Variable to reset
- * @param cdef Variable definition
- * @param err Buffer for error messages
- * @retval int Result, e.g. #CSR_SUCCESS
+ * path_reset - Reset a Path to its initial value - Implements ::cst_regex
*/
static int path_reset(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, struct Buffer *err)
};
/**
- * quad_string_set - Set a Quad-option by string
- * @param cs Config items
- * @param var Variable to set
- * @param cdef Variable definition
- * @param value Value to set
- * @param err Buffer for error messages
- * @retval int Result, e.g. #CSR_SUCCESS
- *
- * If var is NULL, then the config item's initial value will be set.
+ * quad_string_set - Set a Quad-option by string - Implements ::cst_string_set
*/
static int quad_string_set(const struct ConfigSet *cs, void *var, struct ConfigDef *cdef,
const char *value, struct Buffer *err)
}
/**
- * quad_string_get - Get a Quad-option as a string
- * @param cs Config items
- * @param var Variable to get
- * @param cdef Variable definition
- * @param result Buffer for results or error messages
- * @retval int Result, e.g. #CSR_SUCCESS
- *
- * If var is NULL, then the config item's initial value will be returned.
+ * quad_string_get - Get a Quad-option as a string - Implements ::cst_string_get
*/
static int quad_string_get(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, struct Buffer *result)
}
/**
- * quad_native_set - Set a Quad-option config item by int
- * @param cs Config items
- * @param var Variable to set
- * @param cdef Variable definition
- * @param value Quad-option value
- * @param err Buffer for error messages
- * @retval int Result, e.g. #CSR_SUCCESS
+ * quad_native_set - Set a Quad-option config item by int - Implements ::cst_native_set
*/
static int quad_native_set(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
}
/**
- * quad_native_get - Get an int object from a Quad-option config item
- * @param cs Config items
- * @param var Variable to get
- * @param cdef Variable definition
- * @param err Buffer for error messages
- * @retval intptr_t Quad-option value
+ * quad_native_get - Get an int object from a Quad-option config item - Implements ::cst_native_get
*/
static intptr_t quad_native_get(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, struct Buffer *err)
}
/**
- * quad_reset - Reset a Quad-option to its initial value
- * @param cs Config items
- * @param var Variable to reset
- * @param cdef Variable definition
- * @param err Buffer for error messages
- * @retval int Result, e.g. #CSR_SUCCESS
+ * quad_reset - Reset a Quad-option to its initial value - Implements ::cst_regex
*/
static int quad_reset(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, struct Buffer *err)
#include "types.h"
/**
- * regex_destroy - Destroy a Regex object
- * @param cs Config items
- * @param var Variable to destroy
- * @param cdef Variable definition
+ * regex_destroy - Destroy a Regex object - Implements ::cst_destroy
*/
static void regex_destroy(const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef)
{
}
/**
- * regex_string_set - Set a Regex by string
- * @param cs Config items
- * @param var Variable to set
- * @param cdef Variable definition
- * @param value Value to set
- * @param err Buffer for error messages
- * @retval int Result, e.g. #CSR_SUCCESS
- *
- * If var is NULL, then the config item's initial value will be set.
+ * regex_string_set - Set a Regex by string - Implements ::cst_string_set
*/
static int regex_string_set(const struct ConfigSet *cs, void *var, struct ConfigDef *cdef,
const char *value, struct Buffer *err)
}
/**
- * regex_string_get - Get a Regex as a string
- * @param cs Config items
- * @param var Variable to get
- * @param cdef Variable definition
- * @param result Buffer for results or error messages
- * @retval int Result, e.g. #CSR_SUCCESS
- *
- * If var is NULL, then the config item's initial value will be returned.
+ * regex_string_get - Get a Regex as a string - Implements ::cst_string_get
*/
static int regex_string_get(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, struct Buffer *result)
}
/**
- * regex_native_set - Set a Regex config item by Regex object
- * @param cs Config items
- * @param var Variable to set
- * @param cdef Variable definition
- * @param value Regex pointer
- * @param err Buffer for error messages
- * @retval int Result, e.g. #CSR_SUCCESS
+ * regex_native_set - Set a Regex config item by Regex object - Implements ::cst_native_set
*/
static int regex_native_set(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
}
/**
- * regex_native_get - Get a Regex object from a Regex config item
- * @param cs Config items
- * @param var Variable to get
- * @param cdef Variable definition
- * @param err Buffer for error messages
- * @retval intptr_t Regex pointer
+ * regex_native_get - Get a Regex object from a Regex config item - Implements ::cst_native_get
*/
static intptr_t regex_native_get(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, struct Buffer *err)
}
/**
- * regex_reset - Reset a Regex to its initial value
- * @param cs Config items
- * @param var Variable to reset
- * @param cdef Variable definition
- * @param err Buffer for error messages
- * @retval int Result, e.g. #CSR_SUCCESS
+ * regex_reset - Reset a Regex to its initial value - Implements ::cst_regex
*/
static int regex_reset(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, struct Buffer *err)
*/
typedef int (*cs_validator) (const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err);
+/**
+ * cst_string_set - Set a config item by string
+ * @param cs Config items
+ * @param var Variable to set
+ * @param cdef Variable definition
+ * @param value Value to set
+ * @param err Buffer for error messages
+ * @retval int Result, e.g. #CSR_SUCCESS
+ *
+ * If var is NULL, then the config item's initial value will be set.
+ */
typedef int (*cst_string_set)(const struct ConfigSet *cs, void *var, struct ConfigDef *cdef, const char *value, struct Buffer *err);
+/**
+ * cst_string_get - Get a config item as a string
+ * @param cs Config items
+ * @param var Variable to get
+ * @param cdef Variable definition
+ * @param result Buffer for results or error messages
+ * @retval int Result, e.g. #CSR_SUCCESS
+ *
+ * If var is NULL, then the config item's initial value will be returned.
+ */
typedef int (*cst_string_get)(const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *result);
+/**
+ * cst_native_set - Set a config item by string
+ * @param cs Config items
+ * @param var Variable to set
+ * @param cdef Variable definition
+ * @param value Native pointer/value to set
+ * @param err Buffer for error messages
+ * @retval int Result, e.g. #CSR_SUCCESS
+ */
typedef int (*cst_native_set)(const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err);
+/**
+ * cst_native_get - Get a string from a config item
+ * @param cs Config items
+ * @param var Variable to get
+ * @param cdef Variable definition
+ * @param err Buffer for error messages
+ * @retval intptr_t Config item string
+ */
typedef intptr_t(*cst_native_get)(const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *err);
+/**
+ * cst_reset - Reset a config item to its initial value
+ * @param cs Config items
+ * @param var Variable to reset
+ * @param cdef Variable definition
+ * @param err Buffer for error messages
+ * @retval int Result, e.g. #CSR_SUCCESS
+ */
typedef int (*cst_reset) (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *err);
+/**
+ * cst_destroy - Destroy a config item
+ * @param cs Config items
+ * @param var Variable to destroy
+ * @param cdef Variable definition
+ */
typedef void (*cst_destroy) (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef);
#define IP (intptr_t)
// clang-format on
/**
- * sort_string_set - Set a Sort by string
- * @param cs Config items
- * @param var Variable to set
- * @param cdef Variable definition
- * @param value Value to set
- * @param err Buffer for error messages
- * @retval int Result, e.g. #CSR_SUCCESS
- *
- * If var is NULL, then the config item's initial value will be set.
+ * sort_string_set - Set a Sort by string - Implements ::cst_string_set
*/
static int sort_string_set(const struct ConfigSet *cs, void *var, struct ConfigDef *cdef,
const char *value, struct Buffer *err)
}
/**
- * sort_string_get - Get a Sort as a string
- * @param cs Config items
- * @param var Variable to get
- * @param cdef Variable definition
- * @param result Buffer for results or error messages
- * @retval int Result, e.g. #CSR_SUCCESS
- *
- * If var is NULL, then the config item's initial value will be returned.
+ * sort_string_get - Get a Sort as a string - Implements ::cst_string_get
*/
static int sort_string_get(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, struct Buffer *result)
}
/**
- * sort_native_set - Set a Sort config item by int
- * @param cs Config items
- * @param var Variable to set
- * @param cdef Variable definition
- * @param value Sort value
- * @param err Buffer for error messages
- * @retval int Result, e.g. #CSR_SUCCESS
+ * sort_native_set - Set a Sort config item by int - Implements ::cst_native_set
*/
static int sort_native_set(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
}
/**
- * sort_native_get - Get an int from a Sort config item
- * @param cs Config items
- * @param var Variable to get
- * @param cdef Variable definition
- * @param err Buffer for error messages
- * @retval intptr_t Sort ID
+ * sort_native_get - Get an int from a Sort config item - Implements ::cst_native_get
*/
static intptr_t sort_native_get(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, struct Buffer *err)
}
/**
- * sort_reset - Reset a Sort to its initial value
- * @param cs Config items
- * @param var Variable to reset
- * @param cdef Variable definition
- * @param err Buffer for error messages
- * @retval int Result, e.g. #CSR_SUCCESS
+ * sort_reset - Reset a Sort to its initial value - Implements ::cst_regex
*/
static int sort_reset(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, struct Buffer *err)
#include "types.h"
/**
- * string_destroy - Destroy a String
- * @param cs Config items
- * @param var Variable to destroy
- * @param cdef Variable definition
+ * string_destroy - Destroy a String - Implements ::cst_destroy
*/
static void string_destroy(const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef)
{
}
/**
- * string_string_set - Set a String by string
- * @param cs Config items
- * @param var Variable to set
- * @param cdef Variable definition
- * @param value Value to set
- * @param err Buffer for error messages
- * @retval int Result, e.g. #CSR_SUCCESS
- *
- * If var is NULL, then the config item's initial value will be set.
+ * string_string_set - Set a String by string - Implements ::cst_string_set
*/
static int string_string_set(const struct ConfigSet *cs, void *var, struct ConfigDef *cdef,
const char *value, struct Buffer *err)
}
/**
- * string_string_get - Get a String as a string
- * @param cs Config items
- * @param var Variable to get
- * @param cdef Variable definition
- * @param result Buffer for results or error messages
- * @retval int Result, e.g. #CSR_SUCCESS
- *
- * If var is NULL, then the config item's initial value will be returned.
+ * string_string_get - Get a String as a string - Implements ::cst_string_get
*/
static int string_string_get(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, struct Buffer *result)
}
/**
- * string_native_set - Set a String config item by string
- * @param cs Config items
- * @param var Variable to set
- * @param cdef Variable definition
- * @param value Native pointer/value to set
- * @param err Buffer for error messages
- * @retval int Result, e.g. #CSR_SUCCESS
+ * string_native_set - Set a String config item by string - Implements ::cst_native_set
*/
static int string_native_set(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, intptr_t value,
}
/**
- * string_native_get - Get a string from a String config item
- * @param cs Config items
- * @param var Variable to get
- * @param cdef Variable definition
- * @param err Buffer for error messages
- * @retval intptr_t String pointer
+ * string_native_get - Get a string from a String config item - Implements ::cst_native_get
*/
static intptr_t string_native_get(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, struct Buffer *err)
}
/**
- * string_reset - Reset a String to its initial value
- * @param cs Config items
- * @param var Variable to reset
- * @param cdef Variable definition
- * @param err Buffer for error messages
- * @retval int Result, e.g. #CSR_SUCCESS
+ * string_reset - Reset a String to its initial value - Implements ::cst_regex
*/
static int string_reset(const struct ConfigSet *cs, void *var,
const struct ConfigDef *cdef, struct Buffer *err)