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 bd35c53..94930b8 100644 --- a/include/plist/plist.h +++ b/include/plist/plist.h | |||
| @@ -978,6 +978,30 @@ extern "C" | |||
| 978 | */ | 978 | */ |
| 979 | PLIST_API plist_err_t plist_to_openstep(plist_t plist, char **plist_openstep, uint32_t* length, int prettify); | 979 | PLIST_API plist_err_t plist_to_openstep(plist_t plist, char **plist_openstep, uint32_t* length, int prettify); |
| 980 | 980 | ||
| 981 | /** | ||
| 982 | * Export the #plist_t structure to OpenStep format with extended options. | ||
| 983 | * | ||
| 984 | * When \a PLIST_OPT_COMPACT is set in \a options, the resulting OpenStep output | ||
| 985 | * will be non-prettified. | ||
| 986 | * | ||
| 987 | * When \a PLIST_OPT_COERCE is set in \a options, plist types that have | ||
| 988 | * no native OpenStep representation are converted to OpenStep-compatible types | ||
| 989 | * instead of returning #PLIST_ERR_FORMAT: | ||
| 990 | * - #PLIST_BOOLEAN is serialized as a 1 or 0 | ||
| 991 | * - #PLIST_DATE is serialized as an ISO 8601 date string | ||
| 992 | * - #PLIST_NULL is serialized as string 'NULL' | ||
| 993 | * - #PLIST_UID is serialized as an integer | ||
| 994 | * | ||
| 995 | * @param plist the root node to export | ||
| 996 | * @param plist_openstep a pointer to a char* buffer. This function allocates the memory, | ||
| 997 | * caller is responsible for freeing it. | ||
| 998 | * @param length a pointer to an uint32_t variable. Represents the length of the allocated buffer. | ||
| 999 | * @param options One or more bitwise ORed values of #plist_write_options_t. | ||
| 1000 | * @return PLIST_ERR_SUCCESS on success or a #plist_err_t on failure | ||
| 1001 | * @note Use plist_mem_free() to free the allocated memory. | ||
| 1002 | */ | ||
| 1003 | PLIST_API plist_err_t plist_to_openstep_with_options(plist_t plist, char **plist_openstep, uint32_t* length, plist_write_options_t options); | ||
| 1004 | |||
| 981 | 1005 | ||
| 982 | /** | 1006 | /** |
| 983 | * Import the #plist_t structure from XML format. | 1007 | * Import the #plist_t structure from XML format. |
