diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/plist/plist.h | 40 |
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" { | |||
| 29 | #include <stdint.h> | 29 | #include <stdint.h> |
| 30 | #include <sys/types.h> | 30 | #include <sys/types.h> |
| 31 | 31 | ||
| 32 | typedef void* plist_t; | ||
| 33 | |||
| 34 | typedef enum { | ||
| 35 | PLIST_BOOLEAN, | ||
| 36 | PLIST_UINT, | ||
| 37 | PLIST_REAL, | ||
| 38 | PLIST_STRING, | ||
| 39 | PLIST_UNICODE, | ||
| 40 | PLIST_ARRAY, | ||
| 41 | PLIST_DICT, | ||
| 42 | PLIST_DATE, | ||
| 43 | PLIST_DATA, | ||
| 44 | PLIST_KEY, | ||
| 45 | PLIST_NONE | ||
| 46 | } plist_type; | ||
| 47 | |||
| 48 | //Plist edition | ||
| 49 | void plist_new_dict(plist_t * plist); | ||
| 50 | void plist_new_array(plist_t * plist); | ||
| 51 | void plist_new_dict_in_plist(plist_t plist, plist_t * dict); | ||
| 52 | void plist_add_dict_element(plist_t dict, char *key, plist_type type, void *value, uint64_t length); | ||
| 53 | void plist_free(plist_t plist); | ||
| 54 | |||
| 55 | //plist navigation | ||
| 56 | plist_t plist_get_first_child(plist_t node); | ||
| 57 | plist_t plist_get_next_sibling(plist_t node); | ||
| 58 | plist_t plist_get_prev_sibling(plist_t node); | ||
| 59 | |||
| 60 | |||
| 61 | void plist_to_xml(plist_t plist, char **plist_xml, uint32_t * length); | ||
| 62 | void plist_to_bin(plist_t plist, char **plist_bin, uint32_t * length); | ||
| 63 | |||
| 64 | void plist_from_xml(const char *plist_xml, uint32_t length, plist_t * plist); | ||
| 65 | void plist_from_bin(const char *plist_bin, uint32_t length, plist_t * plist); | ||
| 66 | |||
| 67 | plist_t plist_find_query_node(plist_t plist, char *key, char *request); | ||
| 68 | plist_t plist_find_node(plist_t plist, plist_type type, void *value); | ||
| 69 | void plist_get_type_and_value(plist_t node, plist_type * type, void *value, uint64_t * length); | ||
| 70 | |||
| 71 | |||
| 32 | 72 | ||
| 33 | 73 | ||
| 34 | #ifdef __cplusplus | 74 | #ifdef __cplusplus |
