summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/plist/plist.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/include/plist/plist.h b/include/plist/plist.h
index ac15568..c0eae1c 100644
--- a/include/plist/plist.h
+++ b/include/plist/plist.h
@@ -117,6 +117,9 @@ extern "C"
117 PLIST_NONE /**< No type */ 117 PLIST_NONE /**< No type */
118 } plist_type; 118 } plist_type;
119 119
120 /**
121 * libplist error values
122 */
120 typedef enum 123 typedef enum
121 { 124 {
122 PLIST_ERR_SUCCESS = 0, /**< operation successful */ 125 PLIST_ERR_SUCCESS = 0, /**< operation successful */
@@ -664,7 +667,7 @@ extern "C"
664 * @param plist_xml a pointer to a C-string. This function allocates the memory, 667 * @param plist_xml a pointer to a C-string. This function allocates the memory,
665 * caller is responsible for freeing it. Data is UTF-8 encoded. 668 * caller is responsible for freeing it. Data is UTF-8 encoded.
666 * @param length a pointer to an uint32_t variable. Represents the length of the allocated buffer. 669 * @param length a pointer to an uint32_t variable. Represents the length of the allocated buffer.
667 * @return PLIST_ERR_SUCCESS on success or a #plist_error on failure 670 * @return PLIST_ERR_SUCCESS on success or a #plist_err_t on failure
668 * @note Use plist_mem_free() to free the allocated memory. 671 * @note Use plist_mem_free() to free the allocated memory.
669 */ 672 */
670 plist_err_t plist_to_xml(plist_t plist, char **plist_xml, uint32_t * length); 673 plist_err_t plist_to_xml(plist_t plist, char **plist_xml, uint32_t * length);
@@ -676,7 +679,7 @@ extern "C"
676 * @param plist_bin a pointer to a char* buffer. This function allocates the memory, 679 * @param plist_bin a pointer to a char* buffer. This function allocates the memory,
677 * caller is responsible for freeing it. 680 * caller is responsible for freeing it.
678 * @param length a pointer to an uint32_t variable. Represents the length of the allocated buffer. 681 * @param length a pointer to an uint32_t variable. Represents the length of the allocated buffer.
679 * @return PLIST_ERR_SUCCESS on success or a #plist_error on failure 682 * @return PLIST_ERR_SUCCESS on success or a #plist_err_t on failure
680 * @note Use plist_mem_free() to free the allocated memory. 683 * @note Use plist_mem_free() to free the allocated memory.
681 */ 684 */
682 plist_err_t plist_to_bin(plist_t plist, char **plist_bin, uint32_t * length); 685 plist_err_t plist_to_bin(plist_t plist, char **plist_bin, uint32_t * length);
@@ -685,11 +688,11 @@ extern "C"
685 * Export the #plist_t structure to JSON format. 688 * Export the #plist_t structure to JSON format.
686 * 689 *
687 * @param plist the root node to export 690 * @param plist the root node to export
688 * @param json a pointer to a char* buffer. This function allocates the memory, 691 * @param plist_json a pointer to a char* buffer. This function allocates the memory,
689 * caller is responsible for freeing it. 692 * caller is responsible for freeing it.
690 * @param length a pointer to an uint32_t variable. Represents the length of the allocated buffer. 693 * @param length a pointer to an uint32_t variable. Represents the length of the allocated buffer.
691 * @param prettify pretty print the output if != 0 694 * @param prettify pretty print the output if != 0
692 * @return PLIST_ERR_SUCCESS on success or a #plist_error on failure 695 * @return PLIST_ERR_SUCCESS on success or a #plist_err_t on failure
693 * @note Use plist_mem_free() to free the allocated memory. 696 * @note Use plist_mem_free() to free the allocated memory.
694 */ 697 */
695 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);
@@ -700,7 +703,7 @@ extern "C"
700 * @param plist_xml a pointer to the xml buffer. 703 * @param plist_xml a pointer to the xml buffer.
701 * @param length length of the buffer to read. 704 * @param length length of the buffer to read.
702 * @param plist a pointer to the imported plist. 705 * @param plist a pointer to the imported plist.
703 * @return PLIST_ERR_SUCCESS on success or a #plist_error on failure 706 * @return PLIST_ERR_SUCCESS on success or a #plist_err_t on failure
704 */ 707 */
705 plist_err_t plist_from_xml(const char *plist_xml, uint32_t length, plist_t * plist); 708 plist_err_t plist_from_xml(const char *plist_xml, uint32_t length, plist_t * plist);
706 709
@@ -710,7 +713,7 @@ extern "C"
710 * @param plist_bin a pointer to the xml buffer. 713 * @param plist_bin a pointer to the xml buffer.
711 * @param length length of the buffer to read. 714 * @param length length of the buffer to read.
712 * @param plist a pointer to the imported plist. 715 * @param plist a pointer to the imported plist.
713 * @return PLIST_ERR_SUCCESS on success or a #plist_error on failure 716 * @return PLIST_ERR_SUCCESS on success or a #plist_err_t on failure
714 */ 717 */
715 plist_err_t plist_from_bin(const char *plist_bin, uint32_t length, plist_t * plist); 718 plist_err_t plist_from_bin(const char *plist_bin, uint32_t length, plist_t * plist);
716 719
@@ -720,7 +723,7 @@ extern "C"
720 * @param json a pointer to the JSON buffer. 723 * @param json a pointer to the JSON buffer.
721 * @param length length of the buffer to read. 724 * @param length length of the buffer to read.
722 * @param plist a pointer to the imported plist. 725 * @param plist a pointer to the imported plist.
723 * @return PLIST_ERR_SUCCESS on success or a #plist_error on failure 726 * @return PLIST_ERR_SUCCESS on success or a #plist_err_t on failure
724 */ 727 */
725 plist_err_t plist_from_json(const char *json, uint32_t length, plist_t * plist); 728 plist_err_t plist_from_json(const char *json, uint32_t length, plist_t * plist);
726 729
@@ -738,7 +741,7 @@ extern "C"
738 * @param plist_data a pointer to the memory buffer containing plist data. 741 * @param plist_data a pointer to the memory buffer containing plist data.
739 * @param length length of the buffer to read. 742 * @param length length of the buffer to read.
740 * @param plist a pointer to the imported plist. 743 * @param plist a pointer to the imported plist.
741 * @return PLIST_ERR_SUCCESS on success or a #plist_error on failure 744 * @return PLIST_ERR_SUCCESS on success or a #plist_err_t on failure
742 */ 745 */
743 plist_err_t plist_from_memory(const char *plist_data, uint32_t length, plist_t * plist); 746 plist_err_t plist_from_memory(const char *plist_data, uint32_t length, plist_t * plist);
744 747