33 #ifndef SWITCH_XML_CONFIG_H
34 #define SWITCH_XML_CONFIG_H
113 #define SWITCH_CONFIG_ITEM(_key, _type, _flags, _ptr, _defaultvalue, _data, _syntax, _helptext) { _key, _type, _flags, _ptr, (void*)_defaultvalue, (void*)_data, NULL, _syntax, _helptext }
114 #define SWITCH_CONFIG_ITEM_STRING_STRDUP(_key, _flags, _ptr, _defaultvalue, _syntax, _helptext) { (_key), SWITCH_CONFIG_STRING, (_flags), (_ptr), ((void*)_defaultvalue), (NULL), (NULL), (_syntax), (_helptext) }
115 #define SWITCH_CONFIG_ITEM_CALLBACK(_key, _type, _flags, _ptr, _defaultvalue, _function, _functiondata, _syntax, _helptext) { _key, _type, _flags, _ptr, (void*)_defaultvalue, _functiondata, _function, _syntax, _helptext }
116 #define SWITCH_CONFIG_ITEM_END() { NULL, SWITCH_CONFIG_LAST, 0, NULL, NULL, NULL, NULL, NULL, NULL }
118 #define SWITCH_CONFIG_SET_ITEM(_item, _key, _type, _flags, _ptr, _defaultvalue, _data, _syntax, _helptext) switch_config_perform_set_item(&(_item), _key, _type, _flags, _ptr, (void*)(_defaultvalue), _data, NULL, _syntax, _helptext)
119 #define SWITCH_CONFIG_SET_ITEM_CALLBACK(_item, _key, _type, _flags, _ptr, _defaultvalue, _data, _function, _syntax, _helptext) switch_config_perform_set_item(&(_item), _key, _type, _flags, _ptr, (void*)(_defaultvalue), _data, _function, _syntax, _helptext)
123 const
char *helptext);
switch_size_t switch_event_import_xml(switch_xml_t xml, const char *keyname, const char *valuename, switch_event_t **event)
Parses a list of xml elements into an event.
switch_memory_pool_t * pool
switch_status_t switch_xml_config_enum_str2int(switch_xml_config_enum_item_t *enum_options, const char *value, int *out)
Gets the int representation of an enum.
#define SWITCH_END_EXTERN_C
switch_bool_t enforce_min
Representation of an event.
A representation of an XML tree.
switch_xml_config_type_t type
A configuration instruction read by switch_xml_config_parse.
switch_status_t switch_xml_config_parse_module_settings(const char *file, switch_bool_t reload, switch_xml_config_item_t *instructions)
Parses a module's settings.
switch_bool_t enforce_min
switch_xml_config_type_t
Type of value to parse.
void switch_xml_config_cleanup(switch_xml_config_item_t *instructions)
Free any memory allocated by the configuration.
switch_bool_t enforce_max
void switch_config_perform_set_item(switch_xml_config_item_t *item, const char *key, switch_xml_config_type_t type, int flags, void *ptr, const void *defaultvalue, void *data, switch_xml_config_callback_t function, const char *syntax, const char *helptext)
switch_status_t switch_xml_config_parse_event(switch_event_t *event, int count, switch_bool_t reload, switch_xml_config_item_t *instructions)
Parses all of an event's elements, following a ruleset defined by an array of switch_xml_config_item_...
switch_status_t
Common return values.
void switch_xml_config_item_print_doc(int level, switch_xml_config_item_t *item)
Prints out an item's documentation on the console.
switch_xml_config_string_options_t switch_config_string_strdup
struct apr_pool_t switch_memory_pool_t
switch_status_t switch_xml_config_parse(switch_xml_t xml, switch_bool_t reload, switch_xml_config_item_t *instructions)
Parses all the xml elements, following a ruleset defined by an array of switch_xml_config_item_t.
const char * switch_xml_config_enum_int2str(switch_xml_config_enum_item_t *enum_options, int value)
Gets the string representation of an enum.
switch_bool_t enforce_max
const void * defaultvalue
switch_status_t(* switch_xml_config_callback_t)(switch_xml_config_item_t *item, const char *newvalue, switch_config_callback_type_t callback_type, switch_bool_t changed)
switch_config_callback_type_t
#define SWITCH_BEGIN_EXTERN_C