Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libplist
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pwn
libplist
Commits
7b59a04d
Commit
7b59a04d
authored
Apr 22, 2014
by
Aaron Burghardt
Committed by
Nikias Bassen
May 20, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Doxygen comments to explicitly describe memory buffer ownership/responsibility.
parent
b3cbcc25
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
12 deletions
+17
-12
plist.h
include/plist/plist.h
+17
-12
No files found.
include/plist/plist.h
View file @
7b59a04d
...
...
@@ -235,7 +235,7 @@ extern "C"
* The previous item at index n will be freed using #plist_free
*
* @param node the node of type #PLIST_ARRAY
* @param item the new item at index n
* @param item the new item at index n
. The array is responsible for freeing item when it is no longer needed.
* @param n the index of the item to get. Range is [0, array_size[. Assert if n is not in range.
*/
PLIST_API
void
plist_array_set_item
(
plist_t
node
,
plist_t
item
,
uint32_t
n
);
...
...
@@ -244,7 +244,7 @@ extern "C"
* Append a new item at the end of a #PLIST_ARRAY node.
*
* @param node the node of type #PLIST_ARRAY
* @param item the new item
* @param item the new item
. The array is responsible for freeing item when it is no longer needed.
*/
PLIST_API
void
plist_array_append_item
(
plist_t
node
,
plist_t
item
);
...
...
@@ -252,14 +252,14 @@ extern "C"
* Insert a new item at position n in a #PLIST_ARRAY node.
*
* @param node the node of type #PLIST_ARRAY
* @param item the new item to insert
* @param item the new item to insert
. The array is responsible for freeing item when it is no longer needed.
* @param n The position at which the node will be stored. Range is [0, array_size[. Assert if n is not in range.
*/
PLIST_API
void
plist_array_insert_item
(
plist_t
node
,
plist_t
item
,
uint32_t
n
);
/**
* Remove an existing position in a #PLIST_ARRAY node.
* Removed position will be freed using #plist_free
* Removed position will be freed using #plist_free
.
*
* @param node the node of type #PLIST_ARRAY
* @param n The position to remove. Range is [0, array_size[. Assert if n is not in range.
...
...
@@ -281,8 +281,8 @@ extern "C"
PLIST_API
uint32_t
plist_dict_get_size
(
plist_t
node
);
/**
* Create iterator of a #PLIST_DICT node.
* The allocated iterator shoul
t be freed with tandard free function
* Create
an
iterator of a #PLIST_DICT node.
* The allocated iterator shoul
d be freed with the standard free function.
*
* @param node the node of type #PLIST_DICT
* @param iter iterator of the #PLIST_DICT node
...
...
@@ -294,8 +294,10 @@ extern "C"
*
* @param node the node of type #PLIST_DICT
* @param iter iterator of the dictionary
* @param key a location to store the key, or NULL.
* @param val a location to store the value, or NULL.
* @param key a location to store the key, or NULL. The caller is responsible
* for freeing the the returned string.
* @param val a location to store the value, or NULL. The caller should *not*
* free the returned value.
*/
PLIST_API
void
plist_dict_next_item
(
plist_t
node
,
plist_dict_iter
iter
,
char
**
key
,
plist_t
*
val
);
...
...
@@ -303,7 +305,7 @@ extern "C"
* Get key associated to an item. Item must be member of a dictionary
*
* @param node the node
* @param key a location to store the key.
* @param key a location to store the key.
The caller is responsible for freeing the returned string.
*/
PLIST_API
void
plist_dict_get_item_key
(
plist_t
node
,
char
**
key
);
...
...
@@ -312,7 +314,8 @@ extern "C"
*
* @param node the node of type #PLIST_DICT
* @param key the identifier of the item to get.
* @return the item or NULL if node is not of type #PLIST_DICT
* @return the item or NULL if node is not of type #PLIST_DICT. The caller should not free
* the returned node.
*/
PLIST_API
plist_t
plist_dict_get_item
(
plist_t
node
,
const
char
*
key
);
...
...
@@ -485,7 +488,8 @@ extern "C"
* Forces type of node to #PLIST_STRING
*
* @param node the node
* @param val the string value
* @param val the string value. The string is copied when set and will be
* freed by the node.
*/
PLIST_API
void
plist_set_string_val
(
plist_t
node
,
const
char
*
val
);
...
...
@@ -521,7 +525,8 @@ extern "C"
* Forces type of node to #PLIST_DATA
*
* @param node the node
* @param val the binary buffer
* @param val the binary buffer. The buffer is copied when set and will
* be freed by the node.
* @param length the length of the buffer
*/
PLIST_API
void
plist_set_data_val
(
plist_t
node
,
const
char
*
val
,
uint64_t
length
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment