pacemaker  2.1.8-3980678f03
Scalable High-Availability cluster resource manager
xml_io_internal.h
Go to the documentation of this file.
1 /*
2  * Copyright 2017-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__XML_IO_INTERNAL__H
11 #define PCMK__XML_IO_INTERNAL__H
12 
13 /*
14  * Internal-only wrappers for and extensions to libxml2 I/O
15  */
16 
17 #include <stdbool.h> // bool
18 
19 #include <glib.h> // GString
20 #include <libxml/tree.h> // xmlNode
21 
22 xmlNode *pcmk__xml_read(const char *filename);
23 xmlNode *pcmk__xml_parse(const char *input);
24 
25 void pcmk__xml_string(const xmlNode *data, uint32_t options, GString *buffer,
26  int depth);
27 
28 int pcmk__xml2fd(int fd, xmlNode *cur);
29 int pcmk__xml_write_fd(const xmlNode *xml, const char *filename, int fd,
30  bool compress, unsigned int *nbytes);
31 int pcmk__xml_write_file(const xmlNode *xml, const char *filename,
32  bool compress, unsigned int *nbytes);
33 
34 #endif // PCMK__XML_IO_INTERNAL__H
char data[0]
Definition: cpg.c:58
void pcmk__xml_string(const xmlNode *data, uint32_t options, GString *buffer, int depth)
Definition: xml_io.c:488
xmlNode * pcmk__xml_parse(const char *input)
Definition: xml_io.c:244
int pcmk__xml_write_file(const xmlNode *xml, const char *filename, bool compress, unsigned int *nbytes)
Definition: xml_io.c:688
xmlNode * pcmk__xml_read(const char *filename)
Definition: xml_io.c:166
int pcmk__xml2fd(int fd, xmlNode *cur)
Definition: xml_io.c:713
xmlNode * input
int pcmk__xml_write_fd(const xmlNode *xml, const char *filename, int fd, bool compress, unsigned int *nbytes)
Definition: xml_io.c:660