diff options
Diffstat (limited to 'include/plist')
| -rw-r--r-- | include/plist/plist.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/plist/plist.h b/include/plist/plist.h index b6335f5..b496d6f 100644 --- a/include/plist/plist.h +++ b/include/plist/plist.h | |||
| @@ -52,6 +52,17 @@ plist_t plist_new_array(); | |||
| 52 | //Plist edition, create a new root if node is NULL | 52 | //Plist edition, create a new root if node is NULL |
| 53 | plist_t plist_add_sub_element( plist_t node, plist_type type, void* value, uint64_t length); | 53 | plist_t plist_add_sub_element( plist_t node, plist_type type, void* value, uint64_t length); |
| 54 | 54 | ||
| 55 | //Plist edition, only work for dict and array node | ||
| 56 | void plist_add_sub_node(plist_t node, plist_t subnode); | ||
| 57 | |||
| 58 | void plist_add_sub_key_el(plist_t node, char* val); | ||
| 59 | void plist_add_sub_string_el(plist_t node, char* val); | ||
| 60 | void plist_add_sub_bool_el(plist_t node, uint8_t val); | ||
| 61 | void plist_add_sub_uint_el(plist_t node, uint64_t val); | ||
| 62 | void plist_add_sub_real_el(plist_t node, double val); | ||
| 63 | void plist_add_sub_data_el(plist_t node, char* val, uint64_t length); | ||
| 64 | |||
| 65 | |||
| 55 | //plist free | 66 | //plist free |
| 56 | void plist_free(plist_t plist); | 67 | void plist_free(plist_t plist); |
| 57 | 68 | ||
| @@ -63,6 +74,16 @@ plist_t plist_get_prev_sibling(plist_t node); | |||
| 63 | plist_t plist_find_node(plist_t plist, plist_type type, void *value, uint64_t length); | 74 | plist_t plist_find_node(plist_t plist, plist_type type, void *value, uint64_t length); |
| 64 | void plist_get_type_and_value(plist_t node, plist_type * type, void *value, uint64_t * length); | 75 | void plist_get_type_and_value(plist_t node, plist_type * type, void *value, uint64_t * length); |
| 65 | 76 | ||
| 77 | //Plist reading | ||
| 78 | plist_type plist_get_node_type(plist_t node); | ||
| 79 | |||
| 80 | void plist_get_key_val(plist_t node, char** val); | ||
| 81 | void plist_get_string_val(plist_t node, char** val); | ||
| 82 | void plist_get_bool_val(plist_t node, uint8_t* val); | ||
| 83 | void plist_get_uint_val(plist_t node, uint64_t* val); | ||
| 84 | void plist_get_real_val(plist_t node, double* val); | ||
| 85 | void plist_get_data_val(plist_t node, char** val, uint64_t* length); | ||
| 86 | |||
| 66 | //import and export functions | 87 | //import and export functions |
| 67 | void plist_to_xml(plist_t plist, char **plist_xml, uint32_t * length); | 88 | void plist_to_xml(plist_t plist, char **plist_xml, uint32_t * length); |
| 68 | void plist_to_bin(plist_t plist, char **plist_bin, uint32_t * length); | 89 | void plist_to_bin(plist_t plist, char **plist_bin, uint32_t * length); |
