summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGravatar Jonathan Beck2008-12-13 16:16:58 +0100
committerGravatar Jonathan Beck2008-12-13 16:16:58 +0100
commitc39685d3a87858e7ad8ada0da2798aaf670969b4 (patch)
tree743a653c4e29209b851d9602912aa5a74e9ef687 /include
parente220e2cf08809a6a8853a8c9c7b06cef4e90cb57 (diff)
downloadlibplist-c39685d3a87858e7ad8ada0da2798aaf670969b4.tar.gz
libplist-c39685d3a87858e7ad8ada0da2798aaf670969b4.tar.bz2
Refine API and fix some warnings.
Diffstat (limited to 'include')
-rw-r--r--include/plist/plist.h23
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