提交 169ab538 编写于 作者: J Ján Tomko

conf: network: use generic XML namespace types

There is no need to copy and paste the same types pointing
to void all over the place.
Signed-off-by: NJán Tomko <jtomko@redhat.com>
Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
上级 67ecfb97
......@@ -93,7 +93,7 @@ virNetworkXMLOnceInit(void)
VIR_ONCE_GLOBAL_INIT(virNetworkXML);
virNetworkXMLOptionPtr
virNetworkXMLOptionNew(virNetworkXMLNamespacePtr xmlns)
virNetworkXMLOptionNew(virXMLNamespacePtr xmlns)
{
virNetworkXMLOptionPtr xmlopt;
......
......@@ -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,
......
......@@ -248,7 +248,7 @@ networkDnsmasqDefNamespaceHref(void)
}
virNetworkXMLNamespace networkDnsmasqXMLNamespace = {
virXMLNamespace networkDnsmasqXMLNamespace = {
.parse = networkDnsmasqDefNamespaceParse,
.free = networkDnsmasqDefNamespaceFree,
.format = networkDnsmasqDefNamespaceFormatXML,
......
......@@ -27,7 +27,7 @@
#include "virdnsmasq.h"
#include "virnetworkobj.h"
extern virNetworkXMLNamespace networkDnsmasqXMLNamespace;
extern virXMLNamespace networkDnsmasqXMLNamespace;
typedef struct _networkDnsmasqXmlNsDef networkDnsmasqXmlNsDef;
typedef networkDnsmasqXmlNsDef *networkDnsmasqXmlNsDefPtr;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册