There is no need to copy and paste the same types pointing
to void all over the place.
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
src/conf/network_conf.c | 2 +-
src/conf/network_conf.h | 25 ++++---------------------
src/network/bridge_driver.c | 2 +-
src/network/bridge_driver.h | 2 +-
4 files changed, 7 insertions(+), 24 deletions(-)
diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
index f55b9e5409..2c3a11fb10 100644
--- a/src/conf/network_conf.c
+++ b/src/conf/network_conf.c
@@ -93,7 +93,7 @@ virNetworkXMLOnceInit(void)
VIR_ONCE_GLOBAL_INIT(virNetworkXML);
virNetworkXMLOptionPtr
-virNetworkXMLOptionNew(virNetworkXMLNamespacePtr xmlns)
+virNetworkXMLOptionNew(virXMLNamespacePtr xmlns)
{
virNetworkXMLOptionPtr xmlopt;
diff --git a/src/conf/network_conf.h b/src/conf/network_conf.h
index b167b57e85..d5dd8480db 100644
--- a/src/conf/network_conf.h
+++ b/src/conf/network_conf.h
@@ -23,10 +23,6 @@
#define DNS_RECORD_LENGTH_SRV (512 - 30) /* Limit minus overhead as mentioned in
RFC-2782 */
-#include <libxml/parser.h>
-#include <libxml/tree.h>
-#include <libxml/xpath.h>
-
#include "internal.h"
#include "virthread.h"
#include "virsocketaddr.h"
@@ -40,25 +36,12 @@
#include "virobject.h"
#include "virmacmap.h"
#include "virenum.h"
-
-typedef int (*virNetworkDefNamespaceParse)(xmlXPathContextPtr, void **);
-typedef void (*virNetworkDefNamespaceFree)(void *);
-typedef int (*virNetworkDefNamespaceXMLFormat)(virBufferPtr, void *);
-typedef const char *(*virNetworkDefNamespaceHref)(void);
-
-typedef struct _virNetworkXMLNamespace virNetworkXMLNamespace;
-typedef virNetworkXMLNamespace *virNetworkXMLNamespacePtr;
-struct _virNetworkXMLNamespace {
- virNetworkDefNamespaceParse parse;
- virNetworkDefNamespaceFree free;
- virNetworkDefNamespaceXMLFormat format;
- virNetworkDefNamespaceHref href;
-};
+#include "virxml.h"
struct _virNetworkXMLOption {
virObject parent;
- virNetworkXMLNamespace ns;
+ virXMLNamespace ns;
};
typedef struct _virNetworkXMLOption virNetworkXMLOption;
typedef virNetworkXMLOption *virNetworkXMLOptionPtr;
@@ -295,7 +278,7 @@ struct _virNetworkDef {
/* Network specific XML namespace data */
void *namespaceData;
- virNetworkXMLNamespace ns;
+ virXMLNamespace ns;
};
typedef enum {
@@ -317,7 +300,7 @@ enum {
};
virNetworkXMLOptionPtr
-virNetworkXMLOptionNew(virNetworkXMLNamespacePtr xmlns);
+virNetworkXMLOptionNew(virXMLNamespacePtr xmlns);
virNetworkDefPtr
virNetworkDefCopy(virNetworkDefPtr def,
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 9059296e55..b34b742bfa 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -248,7 +248,7 @@ networkDnsmasqDefNamespaceHref(void)
}
-virNetworkXMLNamespace networkDnsmasqXMLNamespace = {
+virXMLNamespace networkDnsmasqXMLNamespace = {
.parse = networkDnsmasqDefNamespaceParse,
.free = networkDnsmasqDefNamespaceFree,
.format = networkDnsmasqDefNamespaceFormatXML,
diff --git a/src/network/bridge_driver.h b/src/network/bridge_driver.h
index b095388a0b..d35850d293 100644
--- a/src/network/bridge_driver.h
+++ b/src/network/bridge_driver.h
@@ -27,7 +27,7 @@
#include "virdnsmasq.h"
#include "virnetworkobj.h"
-extern virNetworkXMLNamespace networkDnsmasqXMLNamespace;
+extern virXMLNamespace networkDnsmasqXMLNamespace;
typedef struct _networkDnsmasqXmlNsDef networkDnsmasqXmlNsDef;
typedef networkDnsmasqXmlNsDef *networkDnsmasqXmlNsDefPtr;
--
2.19.2