]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
OCD - going to bed
authorMathieu Rene <mrene@avgs.ca>
Thu, 5 Mar 2009 06:08:45 +0000 (06:08 +0000)
committerMathieu Rene <mrene@avgs.ca>
Thu, 5 Mar 2009 06:08:45 +0000 (06:08 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12456 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/include/switch_xml_config.h

index 2c7557fcb7b45276dafbf2754a0c33db4ca06885..8d0f15f57bcafd72423d603beb199f6ec893cbc0 100644 (file)
 
 /*! \brief Type of value to parse */
 typedef enum {
-       SWITCH_CONFIG_INT,                      /*< (ptr=int* default=int data=NULL) Integer */
-       SWITCH_CONFIG_STRING,           /*< (ptr=[char* or char ** (for alloc)] default=char* data=switch_xml_config_string_options_t*) Zero-terminated C-string */
-       SWITCH_CONFIG_YESNO,            /*< (ptr=switch_bool_t* default=switch_bool_t data=NULL) Yes and no */
-       SWITCH_CONFIG_CUSTOM,           /*< (ptr=<custom function data> default=<custom function data> data=switch_xml_config_callback_t) Custom, get value through function pointer  */
-       SWITCH_CONFIG_ENUM,             /*< (ptr=int* default=int data=switch_xml_config_enum_item_t*) */
-       SWITCH_CONFIG_FLAG,                     /*< (ptr=int32_t* default=switch_bool_t data=int (flag index) */
-       SWITCH_CONFIG_FLAGARRAY,        /*< (ptr=int8_t* default=switch_bool_t data=int (flag index) */
+       SWITCH_CONFIG_INT,                              /*< (ptr=int* default=int data=NULL) Integer */
+       SWITCH_CONFIG_STRING,                   /*< (ptr=[char* or char ** (for alloc)] default=char* data=switch_xml_config_string_options_t*) Zero-terminated C-string */
+       SWITCH_CONFIG_YESNO,                    /*< (ptr=switch_bool_t* default=switch_bool_t data=NULL) Yes and no */
+       SWITCH_CONFIG_CUSTOM,                   /*< (ptr=<custom function data> default=<custom function data> data=switch_xml_config_callback_t) Custom, get value through function pointer  */
+       SWITCH_CONFIG_ENUM,                     /*< (ptr=int* default=int data=switch_xml_config_enum_item_t*) */
+       SWITCH_CONFIG_FLAG,                             /*< (ptr=int32_t* default=switch_bool_t data=int (flag index) */
+       SWITCH_CONFIG_FLAGARRAY,                /*< (ptr=int8_t* default=switch_bool_t data=int (flag index) */
        
        /* No more past that line */
        SWITCH_CONFIG_LAST
 } switch_xml_config_type_t;
 
-typedef struct {
-       char *key;                                      /*< The item's key or NULL if this is the last one in the list */
-       int value;              /*< The item's value */
+typedef struct {                       
+       char *key;                                              /*< The item's key or NULL if this is the last one in the list */
+       int value;                                              /*< The item's value */
 } switch_xml_config_enum_item_t;
 
 typedef struct {
-       switch_memory_pool_t *pool; /*< If set, the string will be allocated on the pool (unless the length param is > 0, then you misread this file)*/
-       switch_size_t length;                                   /*< Length of the char array, or 0 if memory has to be allocated dynamically*/
+       switch_memory_pool_t *pool;     /*< If set, the string will be allocated on the pool (unless the length param is > 0, then you misread this file)*/
+       switch_size_t length;                   /*< Length of the char array, or 0 if memory has to be allocated dynamically*/
 } switch_xml_config_string_options_t;
 
 struct switch_xml_config_item;
@@ -66,14 +66,14 @@ typedef switch_status_t (*switch_xml_config_callback_t)(switch_xml_config_item_t
  * \brief A configuration instruction read by switch_xml_config_parse 
 */
 struct switch_xml_config_item {
-       char *key;                                              /*< The key of the element, or NULL to indicate the end of the list */
-       switch_xml_config_type_t type;  /*< The type of variable */
-       switch_bool_t reloadable;               /*< True if the var can be changed on reload */
-       void *ptr;                                              /*< Ptr to the var to be changed */
-       void *defaultvalue;                     /*< Default value */
-       void *data;                                     /*< Custom data (depending on the type) */
+       char *key;                                                              /*< The key of the element, or NULL to indicate the end of the list */
+       switch_xml_config_type_t type;                  /*< The type of variable */
+       switch_bool_t reloadable;                               /*< True if the var can be changed on reload */
+       void *ptr;                                                              /*< Ptr to the var to be changed */
+       void *defaultvalue;                                     /*< Default value */
+       void *data;                                                     /*< Custom data (depending on the type) */
        switch_xml_config_callback_t function;  /*< Callback to be called after the var is parsed */
-       void *functiondata;                             /*< Custom data passed to the callback */
+       void *functiondata;                                             /*< Custom data passed to the callback */
 } ;
 
 
@@ -85,7 +85,7 @@ struct switch_xml_config_item {
  * \brief Parses all the xml elements, following a ruleset defined by an array of switch_xml_config_item_t 
  * \param xml The first element of the list to parse
  * \param reload true to skip all non-reloadable options
- * \param options instrutions on how to parse the elements
+ * \param instructions instrutions on how to parse the elements
  * \see switch_xml_config_item_t
  */
 SWITCH_DECLARE(switch_status_t) switch_xml_config_parse(switch_xml_t xml, int reload, switch_xml_config_item_t *instructions);