diff options
author | Nikias Bassen | 2019-05-20 01:10:48 +0200 |
---|---|---|
committer | Nikias Bassen | 2019-05-20 01:10:48 +0200 |
commit | ea37ed01b8c7e05078620ed039899ddff48eac1c (patch) | |
tree | 00934c62f94a023cc2a18bf4feb601210c3f20f4 /include/plist/plist.h | |
parent | 9555e71d9887d0d5caf87341dc47d9ad313bb609 (diff) | |
download | libplist-ea37ed01b8c7e05078620ed039899ddff48eac1c.tar.gz libplist-ea37ed01b8c7e05078620ed039899ddff48eac1c.tar.bz2 |
Add plist_dict_item_get_key() to allow retrieving the key node for a given item of a #PLIST_DICT
Diffstat (limited to 'include/plist/plist.h')
-rw-r--r-- | include/plist/plist.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/plist/plist.h b/include/plist/plist.h index bba735d..7a41fb4 100644 --- a/include/plist/plist.h +++ b/include/plist/plist.h @@ -353,9 +353,9 @@ extern "C" void plist_dict_next_item(plist_t node, plist_dict_iter iter, char **key, plist_t *val); /** - * Get key associated to an item. Item must be member of a dictionary + * Get key associated key to an item. Item must be member of a dictionary. * - * @param node the node + * @param node the item * @param key a location to store the key. The caller is responsible for freeing the returned string. */ void plist_dict_get_item_key(plist_t node, char **key); @@ -371,6 +371,14 @@ extern "C" plist_t plist_dict_get_item(plist_t node, const char* key); /** + * Get key node associated to an item. Item must be member of a dictionary. + * + * @param node the item + * @return the key node of the given item, or NULL. + */ + plist_t plist_dict_item_get_key(plist_t node); + + /** * Set item identified by key in a #PLIST_DICT node. * The previous item identified by key will be freed using #plist_free. * If there is no item for the given key a new item will be inserted. |