提交 126ac61e 编写于 作者: J Ján Tomko

conf: domain: use generic XML namespace types

Now that virDomainXMLNamespace matches virXMLNamespace,
we no longer need to keep both around.
Signed-off-by: NJán Tomko <jtomko@redhat.com>
Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
上级 5f617627
......@@ -273,7 +273,7 @@ bhyveDomainDefNamespaceHref(void)
return "xmlns:bhyve='" BHYVE_NAMESPACE_HREF "'";
}
virDomainXMLNamespace virBhyveDriverDomainXMLNamespace = {
virXMLNamespace virBhyveDriverDomainXMLNamespace = {
.parse = bhyveDomainDefNamespaceParse,
.free = bhyveDomainDefNamespaceFree,
.format = bhyveDomainDefNamespaceFormatXML,
......
......@@ -38,6 +38,6 @@ virDomainXMLOptionPtr virBhyveDriverCreateXMLConf(bhyveConnPtr);
extern virDomainXMLPrivateDataCallbacks virBhyveDriverPrivateDataCallbacks;
extern virDomainDefParserConfig virBhyveDriverDomainDefParserConfig;
extern virDomainXMLNamespace virBhyveDriverDomainXMLNamespace;
extern virXMLNamespace virBhyveDriverDomainXMLNamespace;
bool bhyveDomainDefNeedsISAController(virDomainDefPtr def);
......@@ -182,18 +182,6 @@ struct _virCapsStoragePool {
};
typedef int (*virDomainDefNamespaceParse)(xmlXPathContextPtr, void **);
typedef void (*virDomainDefNamespaceFree)(void *);
typedef int (*virDomainDefNamespaceXMLFormat)(virBufferPtr, void *);
typedef const char *(*virDomainDefNamespaceHref)(void);
struct _virDomainXMLNamespace {
virDomainDefNamespaceParse parse;
virDomainDefNamespaceFree free;
virDomainDefNamespaceXMLFormat format;
virDomainDefNamespaceHref href;
};
struct _virCaps {
virObject parent;
......
......@@ -79,7 +79,7 @@ struct _virDomainXMLOption {
virDomainXMLPrivateDataCallbacks privateData;
/* XML namespace callbacks */
virDomainXMLNamespace ns;
virXMLNamespace ns;
/* ABI stability callbacks */
virDomainABIStability abi;
......@@ -1385,7 +1385,7 @@ virDomainKeyWrapDefParseXML(virDomainDefPtr def, xmlXPathContextPtr ctxt)
virDomainXMLOptionPtr
virDomainXMLOptionNew(virDomainDefParserConfigPtr config,
virDomainXMLPrivateDataCallbacksPtr priv,
virDomainXMLNamespacePtr xmlns,
virXMLNamespacePtr xmlns,
virDomainABIStabilityPtr abi,
virSaveCookieCallbacksPtr saveCookie)
{
......@@ -1435,7 +1435,7 @@ virDomainXMLOptionNew(virDomainDefParserConfigPtr config,
* Returns a pointer to the stored namespace structure.
* The lifetime of the pointer is equal to @xmlopt;
*/
virDomainXMLNamespacePtr
virXMLNamespacePtr
virDomainXMLOptionGetNamespace(virDomainXMLOptionPtr xmlopt)
{
return &xmlopt->ns;
......
......@@ -2491,7 +2491,7 @@ struct _virDomainDef {
virDomainVsockDefPtr vsock;
void *namespaceData;
virDomainXMLNamespace ns;
virXMLNamespace ns;
virDomainKeyWrapDefPtr keywrap;
......@@ -2731,7 +2731,7 @@ struct _virDomainABIStability {
virDomainXMLOptionPtr virDomainXMLOptionNew(virDomainDefParserConfigPtr config,
virDomainXMLPrivateDataCallbacksPtr priv,
virDomainXMLNamespacePtr xmlns,
virXMLNamespacePtr xmlns,
virDomainABIStabilityPtr abi,
virSaveCookieCallbacksPtr saveCookie);
......@@ -2747,7 +2747,7 @@ int virDomainXMLOptionRunMomentPostParse(virDomainXMLOptionPtr xmlopt,
void virDomainNetGenerateMAC(virDomainXMLOptionPtr xmlopt, virMacAddrPtr mac);
virDomainXMLNamespacePtr
virXMLNamespacePtr
virDomainXMLOptionGetNamespace(virDomainXMLOptionPtr xmlopt)
ATTRIBUTE_NONNULL(1);
......
......@@ -342,9 +342,6 @@ typedef virDomainVsockDef *virDomainVsockDefPtr;
typedef struct _virDomainWatchdogDef virDomainWatchdogDef;
typedef virDomainWatchdogDef *virDomainWatchdogDefPtr;
typedef struct _virDomainXMLNamespace virDomainXMLNamespace;
typedef virDomainXMLNamespace *virDomainXMLNamespacePtr;
typedef struct _virDomainXMLOption virDomainXMLOption;
typedef virDomainXMLOption *virDomainXMLOptionPtr;
......
......@@ -317,7 +317,7 @@ lxcDomainDefNamespaceHref(void)
}
virDomainXMLNamespace virLXCDriverDomainXMLNamespace = {
virXMLNamespace virLXCDriverDomainXMLNamespace = {
.parse = lxcDomainDefNamespaceParse,
.free = lxcDomainDefNamespaceFree,
.format = lxcDomainDefNamespaceFormatXML,
......
......@@ -91,7 +91,7 @@ struct _virLXCDomainObjPrivate {
struct virLXCDomainJobObj job;
};
extern virDomainXMLNamespace virLXCDriverDomainXMLNamespace;
extern virXMLNamespace virLXCDriverDomainXMLNamespace;
extern virDomainXMLPrivateDataCallbacks virLXCDriverPrivateDataCallbacks;
extern virDomainDefParserConfig virLXCDriverDomainDefParserConfig;
......
......@@ -3728,7 +3728,7 @@ qemuDomainDefNamespaceHref(void)
}
virDomainXMLNamespace virQEMUDriverDomainXMLNamespace = {
virXMLNamespace virQEMUDriverDomainXMLNamespace = {
.parse = qemuDomainDefNamespaceParse,
.free = qemuDomainDefNamespaceFree,
.format = qemuDomainDefNamespaceFormatXML,
......
......@@ -854,7 +854,7 @@ void qemuDomainCleanupRun(virQEMUDriverPtr driver,
void qemuDomainObjPrivateDataClear(qemuDomainObjPrivatePtr priv);
extern virDomainXMLPrivateDataCallbacks virQEMUDriverPrivateDataCallbacks;
extern virDomainXMLNamespace virQEMUDriverDomainXMLNamespace;
extern virXMLNamespace virQEMUDriverDomainXMLNamespace;
extern virDomainDefParserConfig virQEMUDriverDomainDefParserConfig;
extern virDomainABIStability virQEMUDriverDomainABIStability;
extern virSaveCookieCallbacks virQEMUDriverDomainSaveCookie;
......
......@@ -426,7 +426,7 @@ testDomainObjPrivateFree(void *data)
static testDriverPtr
testDriverNew(void)
{
virDomainXMLNamespace ns = {
virXMLNamespace ns = {
.parse = testDomainDefNamespaceParse,
.free = testDomainDefNamespaceFree,
};
......
......@@ -603,7 +603,7 @@ virVMXDomainDefNamespaceHref(void)
return "xmlns:vmware='http://libvirt.org/schemas/domain/vmware/1.0'";
}
static virDomainXMLNamespace virVMXDomainXMLNamespace = {
static virXMLNamespace virVMXDomainXMLNamespace = {
.parse = NULL,
.free = virVMXDomainDefNamespaceFree,
.format = virVMXDomainDefNamespaceFormatXML,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册