diff options
Diffstat (limited to 'include/plist')
| -rw-r--r-- | include/plist/plist.h | 24 |
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" | |||
| 698 | plist_err_t plist_to_json(plist_t plist, char **plist_json, uint32_t* length, int prettify); | 698 | plist_err_t plist_to_json(plist_t plist, char **plist_json, uint32_t* length, int prettify); |
| 699 | 699 | ||
| 700 | /** | 700 | /** |
| 701 | * Export the #plist_t structure to OpenStep format. | ||
| 702 | * | ||
| 703 | * @param plist the root node to export | ||
| 704 | * @param plist_openstep a pointer to a char* buffer. This function allocates the memory, | ||
| 705 | * caller is responsible for freeing it. | ||
| 706 | * @param length a pointer to an uint32_t variable. Represents the length of the allocated buffer. | ||
| 707 | * @param prettify pretty print the output if != 0 | ||
| 708 | * @return PLIST_ERR_SUCCESS on success or a #plist_err_t on failure | ||
| 709 | * @note Use plist_mem_free() to free the allocated memory. | ||
| 710 | */ | ||
| 711 | plist_err_t plist_to_openstep(plist_t plist, char **plist_openstep, uint32_t* length, int prettify); | ||
| 712 | |||
| 713 | |||
| 714 | /** | ||
| 701 | * Import the #plist_t structure from XML format. | 715 | * Import the #plist_t structure from XML format. |
| 702 | * | 716 | * |
| 703 | * @param plist_xml a pointer to the xml buffer. | 717 | * @param plist_xml a pointer to the xml buffer. |
| @@ -728,6 +742,16 @@ extern "C" | |||
| 728 | plist_err_t plist_from_json(const char *json, uint32_t length, plist_t * plist); | 742 | plist_err_t plist_from_json(const char *json, uint32_t length, plist_t * plist); |
| 729 | 743 | ||
| 730 | /** | 744 | /** |
| 745 | * Import the #plist_t structure from OpenStep plist format. | ||
| 746 | * | ||
| 747 | * @param openstep a pointer to the OpenStep plist buffer. | ||
| 748 | * @param length length of the buffer to read. | ||
| 749 | * @param plist a pointer to the imported plist. | ||
| 750 | * @return PLIST_ERR_SUCCESS on success or a #plist_err_t on failure | ||
| 751 | */ | ||
| 752 | plist_err_t plist_from_openstep(const char *openstep, uint32_t length, plist_t * plist); | ||
| 753 | |||
| 754 | /** | ||
| 731 | * Import the #plist_t structure from memory data. | 755 | * Import the #plist_t structure from memory data. |
| 732 | * This method will look at the first bytes of plist_data | 756 | * This method will look at the first bytes of plist_data |
| 733 | * to determine if plist_data contains a binary, JSON, or XML plist | 757 | * to determine if plist_data contains a binary, JSON, or XML plist |
