summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2023-01-08 05:29:22 +0100
committerGravatar Nikias Bassen2023-01-08 05:29:22 +0100
commit60d291941fadb72b66d11502710add5899e21a2d (patch)
treea7ecccf74cd8fb7e2596fd3531fd9cccefa39dcd /include
parent3f9360e33c13c22648036da42e36f8668e29fb60 (diff)
downloadlibplist-60d291941fadb72b66d11502710add5899e21a2d.tar.gz
libplist-60d291941fadb72b66d11502710add5899e21a2d.tar.bz2
Add support for OpenStep plist format
Diffstat (limited to 'include')
-rw-r--r--include/plist/plist.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/plist/plist.h b/include/plist/plist.h
index c0eae1c..0ae8889 100644
--- a/include/plist/plist.h
+++ b/include/plist/plist.h
@@ -698,6 +698,20 @@ extern "C"
plist_err_t plist_to_json(plist_t plist, char **plist_json, uint32_t* length, int prettify);
/**
+ * Export the #plist_t structure to OpenStep format.
+ *
+ * @param plist the root node to export
+ * @param plist_openstep a pointer to a char* buffer. This function allocates the memory,
+ * caller is responsible for freeing it.
+ * @param length a pointer to an uint32_t variable. Represents the length of the allocated buffer.
+ * @param prettify pretty print the output if != 0
+ * @return PLIST_ERR_SUCCESS on success or a #plist_err_t on failure
+ * @note Use plist_mem_free() to free the allocated memory.
+ */
+ plist_err_t plist_to_openstep(plist_t plist, char **plist_openstep, uint32_t* length, int prettify);
+
+
+ /**
* Import the #plist_t structure from XML format.
*
* @param plist_xml a pointer to the xml buffer.
@@ -728,6 +742,16 @@ extern "C"
plist_err_t plist_from_json(const char *json, uint32_t length, plist_t * plist);
/**
+ * Import the #plist_t structure from OpenStep plist format.
+ *
+ * @param openstep a pointer to the OpenStep plist buffer.
+ * @param length length of the buffer to read.
+ * @param plist a pointer to the imported plist.
+ * @return PLIST_ERR_SUCCESS on success or a #plist_err_t on failure
+ */
+ plist_err_t plist_from_openstep(const char *openstep, uint32_t length, plist_t * plist);
+
+ /**
* Import the #plist_t structure from memory data.
* This method will look at the first bytes of plist_data
* to determine if plist_data contains a binary, JSON, or XML plist