diff options
author | Jonathan Beck | 2009-01-29 22:20:48 +0100 |
---|---|---|
committer | Jonathan Beck | 2009-01-29 22:20:48 +0100 |
commit | ff1fa73f33e9223e69cbb71e70b084e3482dce3f (patch) | |
tree | fdd756e97501a62f1229044e1fe6233447a0fb23 /include | |
parent | 7bb672f801c3a245b38535f5a33f9fffa88c683c (diff) | |
download | libplist-ff1fa73f33e9223e69cbb71e70b084e3482dce3f.tar.gz libplist-ff1fa73f33e9223e69cbb71e70b084e3482dce3f.tar.bz2 |
Fix indent.
Diffstat (limited to 'include')
-rw-r--r-- | include/plist/plist.h | 93 |
1 files changed, 47 insertions, 46 deletions
diff --git a/include/plist/plist.h b/include/plist/plist.h index 2c0df11..9f82cb8 100644 --- a/include/plist/plist.h +++ b/include/plist/plist.h @@ -39,24 +39,27 @@ extern "C" { /** * The basic plist abstract data type. */ -typedef void* plist_t; + typedef void *plist_t; /** * The enumeration of plist node types. */ -typedef enum { - PLIST_BOOLEAN, /**< Boolean, scalar type */ - PLIST_UINT, /**< Unsigned integer, scalar type */ - PLIST_REAL, /**< Real, scalar type */ - PLIST_STRING, /**< ASCII string, scalar type */ - PLIST_UNICODE, /**< Unicode strin, scalar type */ - PLIST_ARRAY, /**< Ordered array, structured type */ - PLIST_DICT, /**< Unordered dictionary (key/value pair), structured type */ - PLIST_DATE, /**< Date, scalar type */ - PLIST_DATA, /**< Binary data, scalar type */ - PLIST_KEY, /**< Key in dictionaries (ASCII String), scalar type */ - PLIST_NONE /**< No type */ -} plist_type; + typedef enum { + PLIST_BOOLEAN, + /**< Boolean, scalar type */ + PLIST_UINT, /**< Unsigned integer, scalar type */ + PLIST_REAL, /**< Real, scalar type */ + PLIST_STRING, + /**< ASCII string, scalar type */ + PLIST_UNICODE, + /**< Unicode strin, scalar type */ + PLIST_ARRAY,/**< Ordered array, structured type */ + PLIST_DICT, /**< Unordered dictionary (key/value pair), structured type */ + PLIST_DATE, /**< Date, scalar type */ + PLIST_DATA, /**< Binary data, scalar type */ + PLIST_KEY, /**< Key in dictionaries (ASCII String), scalar type */ + PLIST_NONE /**< No type */ + } plist_type; /******************************************** @@ -71,7 +74,7 @@ typedef enum { * @return the created plist * @sa #plist_type */ -plist_t plist_new_dict(); + plist_t plist_new_dict(); /** * Create a new root plist_t type #PLIST_ARRAY @@ -79,14 +82,14 @@ plist_t plist_new_dict(); * @return the created plist * @sa #plist_type */ -plist_t plist_new_array(); + plist_t plist_new_array(); /** * Destruct a plist_t node and all its children recursively * * @param plist the plist to free */ -void plist_free(plist_t plist); + void plist_free(plist_t plist); /******************************************** * * @@ -99,7 +102,7 @@ void plist_free(plist_t plist); * * @param node the first child */ -plist_t plist_get_first_child(plist_t node); + plist_t plist_get_first_child(plist_t node); /** @@ -107,7 +110,7 @@ plist_t plist_get_first_child(plist_t node); * * @param node the next sibling */ -plist_t plist_get_next_sibling(plist_t node); + plist_t plist_get_next_sibling(plist_t node); /** @@ -115,7 +118,7 @@ plist_t plist_get_next_sibling(plist_t node); * * @param node the previous sibling */ -plist_t plist_get_prev_sibling(plist_t node); + plist_t plist_get_prev_sibling(plist_t node); /******************************************** * * @@ -131,7 +134,7 @@ plist_t plist_get_prev_sibling(plist_t node); * @param node the node to add a children to * @param subnode the children node */ -void plist_add_sub_node(plist_t node, plist_t subnode); + void plist_add_sub_node(plist_t node, plist_t subnode); /** * Add a subnode of type #PLIST_KEY to a node. The node must be of a structured type @@ -140,7 +143,7 @@ void plist_add_sub_node(plist_t node, plist_t subnode); * @param node the node to add a children to * @param val the key value encoded as an ASCII string (must be null terminated) */ -void plist_add_sub_key_el(plist_t node, const char* val); + void plist_add_sub_key_el(plist_t node, const char *val); /** * Add a subnode of type #PLIST_STRING to a node. The node must be of a structured type @@ -149,7 +152,7 @@ void plist_add_sub_key_el(plist_t node, const char* val); * @param node the node to add a children to * @param val the string value encoded as an ASCII string (must be null terminated) */ -void plist_add_sub_string_el(plist_t node, const char* val); + void plist_add_sub_string_el(plist_t node, const char *val); /** * Add a subnode of type #PLIST_BOOLEAN to a node. The node must be of a structured type @@ -158,7 +161,7 @@ void plist_add_sub_string_el(plist_t node, const char* val); * @param node the node to add a children to * @param val the boolean value (TRUE or FALSE) */ -void plist_add_sub_bool_el(plist_t node, uint8_t val); + void plist_add_sub_bool_el(plist_t node, uint8_t val); /** * Add a subnode of type #PLIST_UINT to a node. The node must be of a structured type @@ -167,7 +170,7 @@ void plist_add_sub_bool_el(plist_t node, uint8_t val); * @param node the node to add a children to * @param val the unsigned integer value */ -void plist_add_sub_uint_el(plist_t node, uint64_t val); + void plist_add_sub_uint_el(plist_t node, uint64_t val); /** * Add a subnode of type #PLIST_REAL to a node. The node must be of a structured type @@ -176,7 +179,7 @@ void plist_add_sub_uint_el(plist_t node, uint64_t val); * @param node the node to add a children to * @param val the real value */ -void plist_add_sub_real_el(plist_t node, double val); + void plist_add_sub_real_el(plist_t node, double val); /** * Add a subnode of type #PLIST_DATA to a node. The node must be of a structured type @@ -186,7 +189,7 @@ void plist_add_sub_real_el(plist_t node, double val); * @param val the binary buffer * @param length the length of the buffer */ -void plist_add_sub_data_el(plist_t node, const char* val, uint64_t length); + void plist_add_sub_data_el(plist_t node, const char *val, uint64_t length); /** * Add a subnode of type #PLIST_UNICODE to a node. The node must be of a structured type @@ -195,7 +198,7 @@ void plist_add_sub_data_el(plist_t node, const char* val, uint64_t length); * @param node the node to add a children to * @param val the unicode string encoded in UTF-8 (must be null terminated) */ -void plist_add_sub_unicode_el(plist_t node, const char* val); + void plist_add_sub_unicode_el(plist_t node, const char *val); /** * Add a subnode of type #PLIST_DATE to a node. The node must be of a structured type @@ -205,7 +208,7 @@ void plist_add_sub_unicode_el(plist_t node, const char* val); * @param sec the number of seconds since 01/01/2001 * @param usec the number of microseconds */ -void plist_add_sub_date_el(plist_t node, int32_t sec, int32_t usec); + void plist_add_sub_date_el(plist_t node, int32_t sec, int32_t usec); /******************************************** @@ -220,7 +223,7 @@ void plist_add_sub_date_el(plist_t node, int32_t sec, int32_t usec); * @param node the node * @return the type of the node */ -plist_type plist_get_node_type(plist_t node); + plist_type plist_get_node_type(plist_t node); /** * Get the value of a #PLIST_KEY node. @@ -230,7 +233,7 @@ plist_type plist_get_node_type(plist_t node); * @param val a pointer to a C-string. This function allocates the memory, * caller is responsible for freeing it. */ -void plist_get_key_val(plist_t node, char** val); + void plist_get_key_val(plist_t node, char **val); /** * Get the value of a #PLIST_STRING node. @@ -240,7 +243,7 @@ void plist_get_key_val(plist_t node, char** val); * @param val a pointer to a C-string. This function allocates the memory, * caller is responsible for freeing it. */ -void plist_get_string_val(plist_t node, char** val); + void plist_get_string_val(plist_t node, char **val); /** * Get the value of a #PLIST_BOOLEAN node. @@ -249,7 +252,7 @@ void plist_get_string_val(plist_t node, char** val); * @param node the node * @param val a pointer to a uint8_t variable. */ -void plist_get_bool_val(plist_t node, uint8_t* val); + void plist_get_bool_val(plist_t node, uint8_t * val); /** * Get the value of a #PLIST_UINT node. @@ -258,7 +261,7 @@ void plist_get_bool_val(plist_t node, uint8_t* val); * @param node the node * @param val a pointer to a uint64_t variable. */ -void plist_get_uint_val(plist_t node, uint64_t* val); + void plist_get_uint_val(plist_t node, uint64_t * val); /** * Get the value of a #PLIST_REAL node. @@ -267,7 +270,7 @@ void plist_get_uint_val(plist_t node, uint64_t* val); * @param node the node * @param val a pointer to a double variable. */ -void plist_get_real_val(plist_t node, double* val); + void plist_get_real_val(plist_t node, double *val); /** * Get the value of a #PLIST_DATA node. @@ -277,7 +280,7 @@ void plist_get_real_val(plist_t node, double* val); * @param val a pointer to an unallocated char buffer. This function allocates the memory, * caller is responsible for freeing it. */ -void plist_get_data_val(plist_t node, char** val, uint64_t* length); + void plist_get_data_val(plist_t node, char **val, uint64_t * length); /** * Get the value of a #PLIST_UNICODE node. @@ -287,7 +290,7 @@ void plist_get_data_val(plist_t node, char** val, uint64_t* length); * @param val a pointer to a C-string. This function allocates the memory, * caller is responsible for freeing it. Data is UTF-8 encoded. */ -void plist_get_unicode_val(plist_t node, char** val); + void plist_get_unicode_val(plist_t node, char **val); /** * Get the value of a #PLIST_DATE node. @@ -297,7 +300,7 @@ void plist_get_unicode_val(plist_t node, char** val); * @param sec a pointer to an int32_t variable. Represents the number of seconds since 01/01/2001. * @param usec a pointer to an int32_t variable. Represents the number of microseconds */ -void plist_get_date_val(plist_t node, int32_t* sec, int32_t* usec); + void plist_get_date_val(plist_t node, int32_t * sec, int32_t * usec); @@ -315,7 +318,7 @@ void plist_get_date_val(plist_t node, int32_t* sec, int32_t* usec); * caller is responsible for freeing it. Data is UTF-8 encoded. * @param length a pointer to an uint32_t variable. Represents the length of the allocated buffer. */ -void plist_to_xml(plist_t plist, char **plist_xml, uint32_t * length); + void plist_to_xml(plist_t plist, char **plist_xml, uint32_t * length); /** * Export the #plist_t structure to binary format. @@ -325,7 +328,7 @@ void plist_to_xml(plist_t plist, char **plist_xml, uint32_t * length); * caller is responsible for freeing it. * @param length a pointer to an uint32_t variable. Represents the length of the allocated buffer. */ -void plist_to_bin(plist_t plist, char **plist_bin, uint32_t * length); + void plist_to_bin(plist_t plist, char **plist_bin, uint32_t * length); /** * Import the #plist_t structure from XML format. @@ -334,7 +337,7 @@ void plist_to_bin(plist_t plist, char **plist_bin, uint32_t * length); * @param length length of the buffer to read. * @param plist a pointer to the imported plist. */ -void plist_from_xml(const char *plist_xml, uint32_t length, plist_t * plist); + void plist_from_xml(const char *plist_xml, uint32_t length, plist_t * plist); /** * Import the #plist_t structure from binary format. @@ -343,7 +346,7 @@ void plist_from_xml(const char *plist_xml, uint32_t length, plist_t * plist); * @param length length of the buffer to read. * @param plist a pointer to the imported plist. */ -void plist_from_bin(const char *plist_bin, uint32_t length, plist_t * plist); + void plist_from_bin(const char *plist_bin, uint32_t length, plist_t * plist); @@ -360,7 +363,7 @@ void plist_from_bin(const char *plist_bin, uint32_t length, plist_t * plist); * @param plist the root node of the plist structure. * @param value the ASCII Key to match. */ -plist_t plist_find_node_by_key(plist_t plist, const char *value); + plist_t plist_find_node_by_key(plist_t plist, const char *value); /** * Find the first encountered #PLIST_STRING node mathing that string. @@ -369,7 +372,7 @@ plist_t plist_find_node_by_key(plist_t plist, const char *value); * @param plist the root node of the plist structure. * @param value the ASCII String to match. */ -plist_t plist_find_node_by_string(plist_t plist, const char *value); + plist_t plist_find_node_by_string(plist_t plist, const char *value); /*@}*/ @@ -378,6 +381,4 @@ plist_t plist_find_node_by_string(plist_t plist, const char *value); #ifdef __cplusplus } #endif - #endif - |