diff options
Diffstat (limited to 'src/plist.h')
-rw-r--r-- | src/plist.h | 41 |
1 files changed, 9 insertions, 32 deletions
diff --git a/src/plist.h b/src/plist.h index 1dc464a..ca3201a 100644 --- a/src/plist.h +++ b/src/plist.h @@ -22,6 +22,8 @@ #ifndef PLIST_H #define PLIST_H +#include "plist/plist.h" + #include <stdint.h> #include <wchar.h> @@ -31,22 +33,10 @@ #include <glib.h> -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; -struct plist_data { + +struct plist_data_s { union { char boolval; uint64_t intval; @@ -59,25 +49,12 @@ struct plist_data { plist_type type; }; +typedef struct plist_data_s* plist_data_t; +plist_t plist_new_node(plist_data_t data); +plist_data_t plist_get_data(plist_t node); +plist_data_t plist_new_plist_data(); +void plist_free_plist_data(plist_data_t node); -typedef GNode *plist_t; - - -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); - -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 xml_to_plist(const char *plist_xml, uint32_t length, plist_t * plist); -void bin_to_plist(const char *plist_bin, uint32_t length, plist_t * plist); - -plist_t find_query_node(plist_t plist, char *key, char *request); -plist_t find_node(plist_t plist, plist_type type, void *value); -void get_type_and_value(plist_t node, plist_type * type, void *value, uint64_t * length); #endif |