summaryrefslogtreecommitdiffstats
path: root/include/plist
diff options
context:
space:
mode:
authorGravatar Jonathan Beck2009-04-15 22:35:56 +0200
committerGravatar Jonathan Beck2009-04-15 22:35:56 +0200
commit21e389bca01794aeca1e79c92a86fc060549b835 (patch)
treea116561eb9c682b31e1d560d5b1eb75f28ff6d8e /include/plist
parent2abf518f8e92957df0dd74c06c49a5eb17845865 (diff)
downloadlibplist-21e389bca01794aeca1e79c92a86fc060549b835.tar.gz
libplist-21e389bca01794aeca1e79c92a86fc060549b835.tar.bz2
Add special accessor for structured types in API.
Diffstat (limited to 'include/plist')
-rw-r--r--include/plist/plist.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/plist/plist.h b/include/plist/plist.h
index 7bdd00a..b7b0fa4 100644
--- a/include/plist/plist.h
+++ b/include/plist/plist.h
@@ -140,6 +140,25 @@ extern "C" {
*/
PLIST_API plist_t plist_get_prev_sibling(plist_t node);
+/**
+ * Get the nth child of a #PLIST_ARRAY node.
+ *
+ * @param node the node of type #PLIST_ARRAY
+ * @param n the index of the child to get. Range is [0, array_size[
+ * @return the nth children or NULL if node is not of type #PLIST_ARRAY
+ */
+ PLIST_API plist_t plist_get_array_nth_el(plist_t node, uint32_t n);
+
+/**
+ * Get the child of a #PLIST_DICT node from the associated key value.
+ *
+ * @param node the node of type #PLIST_DICT
+ * @param key the key associated to the requested value
+ * @return the key associated value or NULL if node is not of type #PLIST_DICT
+ */
+ PLIST_API plist_t plist_get_dict_el_from_key(plist_t node, const char *key);
+
+
/********************************************
* *
* Setters *