From 07d7f4cfa4b10de87a31b68191036ff446add675 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 09:45:40 +0200 Subject: Adding upstream version 2.1.7. Signed-off-by: Daniel Baumann --- include/crm/common/xml_compat.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'include/crm/common/xml_compat.h') diff --git a/include/crm/common/xml_compat.h b/include/crm/common/xml_compat.h index bb49b68..85e39ff 100644 --- a/include/crm/common/xml_compat.h +++ b/include/crm/common/xml_compat.h @@ -30,6 +30,9 @@ extern "C" { //! \deprecated Do not use (will be removed in a future release) #define XML_PARANOIA_CHECKS 0 +//! \deprecated This function will be removed in a future release +xmlDoc *getDocPtr(xmlNode *node); + //! \deprecated This function will be removed in a future release int add_node_nocopy(xmlNode * parent, const char *name, xmlNode * child); @@ -51,13 +54,23 @@ gboolean apply_xml_diff(xmlNode *old_xml, xmlNode *diff, xmlNode **new_xml); //! \deprecated Do not use (will be removed in a future release) void crm_destroy_xml(gpointer data); -//! \deprecated Use crm_xml_add() with "true" or "false" instead +//! \deprecated Check children member directly +gboolean xml_has_children(const xmlNode *root); + +//! \deprecated Use crm_xml_add() with "true" or "false" instead static inline const char * crm_xml_add_boolean(xmlNode *node, const char *name, gboolean value) { return crm_xml_add(node, name, (value? "true" : "false")); } +//! \deprecated Use name member directly +static inline const char * +crm_element_name(const xmlNode *xml) +{ + return (xml == NULL)? NULL : (const char *) xml->name; +} + #ifdef __cplusplus } #endif -- cgit v1.2.3