summaryrefslogtreecommitdiffstats
path: root/include/plist
diff options
context:
space:
mode:
authorGravatar Jonathan Beck2008-12-13 13:56:55 +0100
committerGravatar Jonathan Beck2008-12-13 13:56:55 +0100
commite220e2cf08809a6a8853a8c9c7b06cef4e90cb57 (patch)
tree51472b19b56c5816fc050fcac6273a5931f9f4f6 /include/plist
parent3fdd24aea06a9bf38d9d34fb8bccbb7023ed3100 (diff)
downloadlibplist-e220e2cf08809a6a8853a8c9c7b06cef4e90cb57.tar.gz
libplist-e220e2cf08809a6a8853a8c9c7b06cef4e90cb57.tar.bz2
Add plutil and do some cleaning.
Diffstat (limited to 'include/plist')
-rw-r--r--include/plist/plist.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/include/plist/plist.h b/include/plist/plist.h
index a67075c..49d978c 100644
--- a/include/plist/plist.h
+++ b/include/plist/plist.h
@@ -29,6 +29,46 @@ extern "C" {
#include <stdint.h>
#include <sys/types.h>
+typedef void* plist_t;
+
+typedef enum {
+ PLIST_BOOLEAN,
+ PLIST_UINT,
+ PLIST_REAL,
+ PLIST_STRING,
+ PLIST_UNICODE,
+ PLIST_ARRAY,
+ PLIST_DICT,
+ PLIST_DATE,
+ PLIST_DATA,
+ PLIST_KEY,
+ 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);
+void plist_free(plist_t plist);
+
+//plist navigation
+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);
+
+
+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