From 810e1a5936867a9f2c9f07df3a33a9d02fc03466 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Sun, 19 Dec 2021 16:13:07 +0100 Subject: Add support for PLIST_NULL type --- include/plist/plist.h | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) (limited to 'include') diff --git a/include/plist/plist.h b/include/plist/plist.h index 67050ee..0f69d40 100644 --- a/include/plist/plist.h +++ b/include/plist/plist.h @@ -103,17 +103,18 @@ extern "C" */ typedef enum { - PLIST_BOOLEAN, /**< Boolean, scalar type */ - PLIST_UINT, /**< Unsigned integer, scalar type */ - PLIST_REAL, /**< Real, scalar type */ - PLIST_STRING, /**< ASCII string, scalar type */ - PLIST_ARRAY, /**< Ordered array, structured type */ - PLIST_DICT, /**< Unordered dictionary (key/value pair), structured type */ - PLIST_DATE, /**< Date, scalar type */ - PLIST_DATA, /**< Binary data, scalar type */ - PLIST_KEY, /**< Key in dictionaries (ASCII String), scalar type */ + PLIST_BOOLEAN, /**< Boolean, scalar type */ + PLIST_UINT, /**< Unsigned integer, scalar type */ + PLIST_REAL, /**< Real, scalar type */ + PLIST_STRING, /**< ASCII string, scalar type */ + PLIST_ARRAY, /**< Ordered array, structured type */ + PLIST_DICT, /**< Unordered dictionary (key/value pair), structured type */ + PLIST_DATE, /**< Date, scalar type */ + PLIST_DATA, /**< Binary data, scalar type */ + PLIST_KEY, /**< Key in dictionaries (ASCII String), scalar type */ PLIST_UID, /**< Special type used for 'keyed encoding' */ - PLIST_NONE /**< No type */ + PLIST_NULL, /**< NULL type */ + PLIST_NONE /**< No type */ } plist_type; @@ -204,6 +205,15 @@ extern "C" */ plist_t plist_new_uid(uint64_t val); + /** + * Create a new plist_t type #PLIST_NULL + * @return the created item + * @sa #plist_type + * @note This type is not valid for all formats, e.g. the XML format + * does not support it. + */ + plist_t plist_new_null(void); + /** * Destruct a plist_t node and all its children recursively * -- cgit v1.1-32-gdbae