pacemaker  3.0.0-d8340737c4
Scalable High-Availability cluster resource manager
schemas_internal.h
Go to the documentation of this file.
1 /*
2  * Copyright 2006-2024 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_SCHEMAS_INTERNAL__H
11 #define PCMK__CRM_COMMON_SCHEMAS_INTERNAL__H
12 
13 #include <stdbool.h>
14 #include <glib.h> // GList, gboolean
15 #include <libxml/relaxng.h> // xmlRelaxNGValidityErrorFunc
16 #include <libxml/tree.h> // xmlNode
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 void pcmk__schema_init(void);
23 void pcmk__schema_cleanup(void);
24 
25 void pcmk__load_schemas_from_dir(const char *dir);
26 void pcmk__sort_schemas(void);
27 GList *pcmk__schema_files_later_than(const char *name);
28 void pcmk__build_schema_xml_node(xmlNode *parent, const char *name,
29  GList **already_included);
30 const char *pcmk__remote_schema_dir(void);
31 GList *pcmk__get_schema(const char *name);
32 const char *pcmk__highest_schema_name(void);
33 int pcmk__cmp_schemas_by_name(const char *schema1_name,
34  const char *schema2_name);
35 bool pcmk__validate_xml(xmlNode *xml_blob, const char *validation,
36  xmlRelaxNGValidityErrorFunc error_handler,
37  void *error_handler_context);
38 bool pcmk__configured_schema_validates(xmlNode *xml);
39 int pcmk__update_schema(xmlNode **xml, const char *max_schema_name,
40  bool transform, bool to_logs);
41 void pcmk__warn_if_schema_deprecated(const char *schema);
42 
43 int pcmk__update_configured_schema(xmlNode **xml, bool to_logs);
44 
45 #ifdef __cplusplus
46 }
47 #endif
48 
49 #endif // PCMK__SCHEMAS_INTERNAL__H
int pcmk__cmp_schemas_by_name(const char *schema1_name, const char *schema2_name)
Definition: schemas.c:662
const char * name
Definition: cib.c:26
int pcmk__update_configured_schema(xmlNode **xml, bool to_logs)
Update XML from its configured schema to the latest major series.
Definition: schemas.c:1159
void pcmk__schema_init(void)
Definition: schemas.c:453
void pcmk__sort_schemas(void)
Definition: schemas.c:440
bool pcmk__validate_xml(xmlNode *xml_blob, const char *validation, xmlRelaxNGValidityErrorFunc error_handler, void *error_handler_context)
Definition: schemas.c:728
GList * pcmk__get_schema(const char *name)
Definition: schemas.c:635
void pcmk__schema_cleanup(void)
Definition: schemas.c:615
int pcmk__update_schema(xmlNode **xml, const char *max_schema_name, bool transform, bool to_logs)
Update CIB XML to latest schema that validates it.
Definition: schemas.c:1047
GList * pcmk__schema_files_later_than(const char *name)
Definition: schemas.c:1284
const char * pcmk__remote_schema_dir(void)
Definition: schemas.c:1448
void pcmk__build_schema_xml_node(xmlNode *parent, const char *name, GList **already_included)
Definition: schemas.c:1429
bool pcmk__configured_schema_validates(xmlNode *xml)
Definition: schemas.c:764
void pcmk__warn_if_schema_deprecated(const char *schema)
Definition: schemas.c:1466
void pcmk__load_schemas_from_dir(const char *dir)
Definition: schemas.c:363
const char * parent
Definition: cib.c:27
const char * pcmk__highest_schema_name(void)
Definition: schemas.c:97