summaryrefslogtreecommitdiffstats
path: root/include/plist/plist.h
AgeCommit message (Collapse)AuthorFilesLines
2023-04-19Add plist_read_from_file() to interface, update plist_from_memory()Gravatar Nikias Bassen1-2/+21
plist_read_from_file() is a convenience function that will open a given file, checks its size, allocates a buffer large enough to hold the full contents, and reads from file to fill the buffer. Then, it calls plist_from_memory() to convert the data to plist format. A (breaking) change had to be made so that plist_from_memory() will also return the parsed format in its 4th argument (if non-NULL).
2023-04-16Add new output-only formats and Define constants for the different plist formatsGravatar Nikias Bassen1-8/+91
This commit introduces constants for the different plist formats, and adds 3 new human-readable output-only formats: - PLIST_FORMAT_PRINT: the default human-readable format - PLIST_FORMAT_LIMD: "libimobiledevice" format (used in ideviceinfo) - PLIST_FORMAT_PLUTIL: plutil-style format Also, a new set of write functions has been added: - plist_write_to_string - plist_write_to_stream - plist_write_to_file Plus a simple "dump" function: - plist_print See documentation for details.
2023-02-07Fix build without --enable-debugGravatar Nikias Bassen1-0/+1
2023-02-07Add function to interface to allow enabling/disabling error/debug output for ↵Gravatar Nikias Bassen1-0/+7
the format parses This makes the `-d` option work in plistutil that wasn't doing anything
2023-02-03Add new plist_sort() functionGravatar Nikias Bassen1-0/+8
2023-01-16Rename PLIST_UINT to PLIST_INT and add plist_new_int() and plist_get_int_val()Gravatar Nikias Bassen1-12/+67
This properly supports getting and setting signed or unsigned integer values. Also, a new helper function plist_int_val_is_negative() was added to determine if a given #PLIST_INT node has a negative value or not. The old type PLIST_UINT is defined as a macro with the value of PLIST_INT for backwards compatibility. This commit also adds int vs. uint support to the C++ interface, and the python bindings in a hopefully useful way.
2023-01-08Add support for OpenStep plist formatGravatar Nikias Bassen1-0/+24
2022-02-07docs: Fix parameter and type names for doxygenGravatar Nikias Bassen1-8/+11
2021-12-23Add support for JSON formatGravatar Nikias Bassen1-7/+36
2021-12-22Add a return value to plist_to_* and plist_from_* functionsGravatar Nikias Bassen1-5/+19
This way it can be easier determined why an import/export operation failed instead of just having a NULL result.
2021-12-19Add support for PLIST_NULL typeGravatar Nikias Bassen1-10/+20
2021-12-19Add new plist_mem_free() functionGravatar Nikias Bassen1-14/+20
Thanks to @azerg for bringing this to my attention. Instead of having multiple (internally identical) plist_*_free() functions, this commit introduces a single plist_mem_free() that can be used to free the memory allocated by plist_to_xml(), plist_to_bin(), plist_get_key_val(), plist_get_string_val(), and plist_get_data_val(). Note: This commit REMOVES plist_to_bin_free() and plist_to_xml_free().
2020-05-11Add plist_*_val_compare, plist_*_val_contains, etc. for the respective node ↵Gravatar Nikias Bassen1-0/+183
types ... except container node types like PLIST_ARRAY or PLIST_DICT.
2019-11-07Add plist_get_data_ptr() and plist_get_string_ptr() to the interfaceGravatar Nikias Bassen1-0/+26
2019-11-07Add plist_to_bin_free() and plist_to_xml_free() functions that free memory ↵Gravatar Nikias Bassen1-0/+14
allocated by plist_to_bin()/plist_to_xml()
2019-05-20Add plist_dict_item_get_key() to allow retrieving the key node for a given ↵Gravatar Nikias Bassen1-2/+10
item of a #PLIST_DICT
2019-05-19Add plist_array_item_remove() to allow removing an array's child node ↵Gravatar Nikias Bassen1-0/+8
without relying on the index
2019-05-19plist_array_get_item_index(): return UINT_MAX instead of 0 when node can't ↵Gravatar Nikias Bassen1-1/+1
be found
2019-01-21headers: Don't redefine uint*_t for newer versions of MSVCGravatar Nikias Bassen1-1/+1
2019-01-21plist: Add iterator for #PLIST_ARRAY nodesGravatar Nikias Bassen1-9/+37
Similar to #PLIST_DICT, an iterator can now be used for #PLIST_ARRAY nodes. Get an iterator with plist_array_new_iter() and use plist_array_next_item() to iterate over the elements.
2016-11-10Add new PLIST_IS_* helper macros for the different plist node typesGravatar Nikias Bassen1-0/+14
Instead of e.g.: if (plist_get_node_type(plist) == PLIST_STRING) you can now write: if (PLIST_IS_STRING(plist))
2016-10-22Remove libxml2 dependency in favor of custom XML parsingGravatar Nikias Bassen1-13/+0
2016-05-12Implement plist_from_memory()Gravatar Christophe Fergeau1-0/+11
Rather than having everyone reimplement binary/XML plist detection by looking at the first bytes of the plist content, it's better to do this detection in libplist and hide that internal detail from library users.
2016-05-12Add plist_is_binary()Gravatar Christophe Fergeau1-0/+13
It can be useful if one needs to know what type of plist a memory buffer contains.
2016-04-20Move libxml cleanup code to a plist_cleanup methodGravatar Frederik Carlier1-0/+13
2014-10-03Avoid exporting non-public symbolsGravatar Nikias Bassen1-59/+52
2014-09-26plist.h: Move deprecation marker before function declaration to make ↵Gravatar Nikias Bassen1-1/+2
non-gcc/clang compilers happy
2014-05-20Move deprecation marker after the function declaration for better compiler ↵Gravatar Nikias Bassen1-1/+1
output
2014-05-20Removed plist_set_type() as it should not be used.Gravatar Nikias Bassen1-8/+0
2014-05-20Redo PLIST_WARN_DEPRECATED macro to work with older llvm/clangGravatar Martin Szulecki1-9/+31
2014-05-20Added Doxygen comments to explicitly describe memory buffer ↵Gravatar Aaron Burghardt1-12/+17
ownership/responsibility.
2014-03-19deprecated plist_dict_insert_item in favor of plist_dict_set_itemGravatar Nikias Bassen1-1/+11
2014-03-19plist_dict_set_item: insert key/value pair if key not already presentGravatar Nikias Bassen1-4/+5
2013-12-13add new plist_dict_merge() functionGravatar Nikias Bassen1-0/+10
2012-09-16implemented handling of UID keyed encoding typeGravatar Nikias Bassen1-0/+28
2009-11-10Remove deprecated functions from API.Gravatar Jonathan Beck1-162/+0
2009-10-28Update doxygen documentation generation to be useful.Gravatar Martin Szulecki1-4/+6
2009-10-28Format sources to ANSI style using AStyle (astyle --style=ansi).Gravatar Jonathan Beck1-693/+695
2009-10-13Add path accessor util function.Gravatar Jonathan Beck1-9/+38
2009-10-11Restore plist_dict_get_size function.Gravatar Jonathan Beck1-0/+8
2009-10-11Add function to change a node's type.Gravatar Jonathan Beck1-0/+8
2009-10-10Abstract iter base type.Gravatar Jonathan Beck1-1/+1
2009-10-10Add dict iteration. Add functions to retrieve index and key from node.Gravatar Jonathan Beck1-3/+35
2009-10-10Reverse argument for dicts to make it clearer.Gravatar Jonathan Beck1-3/+2
2009-10-10Rework public API to make it more consistent.Gravatar Jonathan Beck1-87/+258
2009-07-18Add function to get parent node in API and python bindings.Gravatar Jonathan Beck1-0/+7
2009-07-08Add a deep copy function and value setters for nodes.Gravatar Jonathan Beck1-0/+80
2009-04-28Merge ascii and unicode handling in PLIST_STRING using UTF-8. Remove unicode ↵Gravatar Jonathan Beck1-23/+2
related declaration in API (breaks API&ABI)
2009-04-15Add special accessor for structured types in API.Gravatar Jonathan Beck1-0/+19
2009-03-27Use (void) instead of () in functions prototype.Gravatar Jonathan Beck1-2/+2