diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/plist/plist.h | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/include/plist/plist.h b/include/plist/plist.h index 49d978c..4469f06 100644 --- a/include/plist/plist.h +++ b/include/plist/plist.h @@ -45,11 +45,14 @@ typedef enum { PLIST_NONE } plist_type; -//Plist edition -void plist_new_dict(plist_t * plist); -void plist_new_array(plist_t * plist); -void plist_new_dict_in_plist(plist_t plist, plist_t * dict); -void plist_add_dict_element(plist_t dict, char *key, plist_type type, void *value, uint64_t length); +//Plist creation and edition +//utilitary functions to create root nodes (supposed to be dict or array) +plist_t plist_new_dict(); +plist_t plist_new_array(); +//Plist edition, create a new root if node is NULL +plist_t plist_add_sub_element( plist_t node, plist_type type, void* value, uint64_t length); + +//plist free void plist_free(plist_t plist); //plist navigation @@ -57,20 +60,16 @@ plist_t plist_get_first_child(plist_t node); plist_t plist_get_next_sibling(plist_t node); plist_t plist_get_prev_sibling(plist_t node); +plist_t plist_find_node(plist_t plist, plist_type type, void *value); +void plist_get_type_and_value(plist_t node, plist_type * type, void *value, uint64_t * length); +//import and export functions void plist_to_xml(plist_t plist, char **plist_xml, uint32_t * length); void plist_to_bin(plist_t plist, char **plist_bin, uint32_t * length); void plist_from_xml(const char *plist_xml, uint32_t length, plist_t * plist); void plist_from_bin(const char *plist_bin, uint32_t length, plist_t * plist); -plist_t plist_find_query_node(plist_t plist, char *key, char *request); -plist_t plist_find_node(plist_t plist, plist_type type, void *value); -void plist_get_type_and_value(plist_t node, plist_type * type, void *value, uint64_t * length); - - - - #ifdef __cplusplus } #endif |