root/include/crm/common/xml_compat.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


DEFINITIONS

This source file includes following definitions.
  1. crm_xml_add_boolean
  2. crm_element_name

   1 /*
   2  * Copyright 2004-2023 the Pacemaker project contributors
   3  *
   4  * The version control history for this file may have further details.
   5  *
   6  * This source code is licensed under the GNU Lesser General Public License
   7  * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
   8  */
   9 
  10 #ifndef PCMK__CRM_COMMON_XML_COMPAT__H
  11 #  define PCMK__CRM_COMMON_XML_COMPAT__H
  12 
  13 #include <glib.h>               // gboolean
  14 #include <libxml/tree.h>        // xmlNode
  15 #include <crm/common/xml.h>     // crm_xml_add()
  16 
  17 #ifdef __cplusplus
  18 extern "C" {
  19 #endif
  20 
  21 /**
  22  * \file
  23  * \brief Deprecated Pacemaker XML API
  24  * \ingroup core
  25  * \deprecated Do not include this header directly. The XML APIs in this
  26  *             header, and the header itself, will be removed in a future
  27  *             release.
  28  */
  29 
  30 //! \deprecated Do not use (will be removed in a future release)
  31 #define XML_PARANOIA_CHECKS 0
  32 
  33 //! \deprecated This function will be removed in a future release
  34 xmlDoc *getDocPtr(xmlNode *node);
  35 
  36 //! \deprecated This function will be removed in a future release
  37 int add_node_nocopy(xmlNode * parent, const char *name, xmlNode * child);
  38 
  39 //! \deprecated This function will be removed in a future release
  40 xmlNode *find_entity(xmlNode *parent, const char *node_name, const char *id);
  41 
  42 //! \deprecated This function will be removed in a future release
  43 char *xml_get_path(const xmlNode *xml);
  44 
  45 //! \deprecated This function will be removed in a future release
  46 void xml_log_changes(uint8_t level, const char *function, const xmlNode *xml);
  47 
  48 //! \deprecated This function will be removed in a future release
  49 void xml_log_patchset(uint8_t level, const char *function, const xmlNode *xml);
  50 
  51 //!  \deprecated Use xml_apply_patchset() instead
  52 gboolean apply_xml_diff(xmlNode *old_xml, xmlNode *diff, xmlNode **new_xml);
  53 
  54 //! \deprecated Do not use (will be removed in a future release)
  55 void crm_destroy_xml(gpointer data);
  56 
  57 //! \deprecated Check children member directly
  58 gboolean xml_has_children(const xmlNode *root);
  59 
  60 //! \deprecated Use crm_xml_add() with "true" or "false" instead
  61 static inline const char *
  62 crm_xml_add_boolean(xmlNode *node, const char *name, gboolean value)
     /* [previous][next][first][last][top][bottom][index][help] */
  63 {
  64     return crm_xml_add(node, name, (value? "true" : "false"));
  65 }
  66 
  67 //! \deprecated Use name member directly
  68 static inline const char *
  69 crm_element_name(const xmlNode *xml)
     /* [previous][next][first][last][top][bottom][index][help] */
  70 {
  71     return (xml == NULL)? NULL : (const char *) xml->name;
  72 }
  73 
  74 #ifdef __cplusplus
  75 }
  76 #endif
  77 
  78 #endif // PCMK__CRM_COMMON_XML_COMPAT__H

/* [previous][next][first][last][top][bottom][index][help] */