xml.h 1.6 KB
Newer Older
1
/*
2
 * xml.h: internal definitions used for XML parsing routines.
3 4 5 6 7
 */

#ifndef __VIR_XML_H__
#define __VIR_XML_H__

8
#include "libvirt/libvirt.h"
9
#include "internal.h"
10
#include "buf.h"
11

12 13 14
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <libxml/xpath.h>
15 16 17 18
#ifdef __cplusplus
extern "C" {
#endif

19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
int		virXPathBoolean	(const char *xpath,
				 xmlXPathContextPtr ctxt);
char *		virXPathString	(const char *xpath,
				 xmlXPathContextPtr ctxt);
int		virXPathNumber	(const char *xpath,
				 xmlXPathContextPtr ctxt,
				 double *value);
int		virXPathLong	(const char *xpath,
				 xmlXPathContextPtr ctxt,
				 long *value);
xmlNodePtr	virXPathNode	(const char *xpath,
				 xmlXPathContextPtr ctxt);
int		virXPathNodeSet	(const char *xpath,
				 xmlXPathContextPtr ctxt,
				 xmlNodePtr **list);

35 36 37 38 39 40 41 42 43
int		virParseXenCpuTopology(virConnectPtr conn,
				 virBufferPtr xml,
				 const char *str,
				 int maxcpu);
int		virParseCpuSet	(virConnectPtr conn,
				 const char **str,
				 char sep,
				 char *cpuset,
				 int maxcpu);
44 45 46 47 48 49
char *          virSaveCpuSet	(virConnectPtr conn,
				 char *cpuset,
				 int maxcpu);
char *		virConvertCpuSet(virConnectPtr conn,
				 const char *str,
				 int maxcpu);
50 51 52 53 54 55 56 57 58 59 60 61 62
char *		virDomainParseXMLDesc(virConnectPtr conn,
				 const char *xmldesc,
				 char **name,
				 int xendConfigVersion);
char *		virParseXMLDevice(virConnectPtr conn,
				 const char *xmldesc,
				 int hvm,
				 int xendConfigVersion);
int		virDomainXMLDevID(virDomainPtr domain,
				 const char *xmldesc,
				 char *class,
				 char *ref,
				 int ref_len);
63 64 65

#ifdef __cplusplus
}
66 67
#endif                          /* __cplusplus */
#endif                          /* __VIR_XML_H__ */