提交 5d732dbb 编写于 作者: M Marc-André Lureau 提交者: Michal Privoznik

qemu: add qemuDomainNetworkPrivate

Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
上级 1b336f4a
...@@ -1267,6 +1267,44 @@ qemuDomainGraphicsPrivateDispose(void *obj) ...@@ -1267,6 +1267,44 @@ qemuDomainGraphicsPrivateDispose(void *obj)
} }
static virClassPtr qemuDomainNetworkPrivateClass;
static void qemuDomainNetworkPrivateDispose(void *obj);
static int
qemuDomainNetworkPrivateOnceInit(void)
{
if (!VIR_CLASS_NEW(qemuDomainNetworkPrivate, virClassForObject()))
return -1;
return 0;
}
VIR_ONCE_GLOBAL_INIT(qemuDomainNetworkPrivate);
static virObjectPtr
qemuDomainNetworkPrivateNew(void)
{
qemuDomainNetworkPrivatePtr priv;
if (qemuDomainNetworkPrivateInitialize() < 0)
return NULL;
if (!(priv = virObjectNew(qemuDomainNetworkPrivateClass)))
return NULL;
return (virObjectPtr) priv;
}
static void
qemuDomainNetworkPrivateDispose(void *obj ATTRIBUTE_UNUSED)
{
}
/* qemuDomainSecretPlainSetup: /* qemuDomainSecretPlainSetup:
* @secinfo: Pointer to secret info * @secinfo: Pointer to secret info
* @usageType: The virSecretUsageType * @usageType: The virSecretUsageType
...@@ -3479,6 +3517,7 @@ virDomainXMLPrivateDataCallbacks virQEMUDriverPrivateDataCallbacks = { ...@@ -3479,6 +3517,7 @@ virDomainXMLPrivateDataCallbacks virQEMUDriverPrivateDataCallbacks = {
.chrSourceNew = qemuDomainChrSourcePrivateNew, .chrSourceNew = qemuDomainChrSourcePrivateNew,
.vsockNew = qemuDomainVsockPrivateNew, .vsockNew = qemuDomainVsockPrivateNew,
.graphicsNew = qemuDomainGraphicsPrivateNew, .graphicsNew = qemuDomainGraphicsPrivateNew,
.networkNew = qemuDomainNetworkPrivateNew,
.parse = qemuDomainObjPrivateXMLParse, .parse = qemuDomainObjPrivateXMLParse,
.format = qemuDomainObjPrivateXMLFormat, .format = qemuDomainObjPrivateXMLFormat,
.getParseOpaque = qemuDomainObjPrivateXMLGetParseOpaque, .getParseOpaque = qemuDomainObjPrivateXMLGetParseOpaque,
......
...@@ -512,6 +512,18 @@ struct _qemuDomainGraphicsPrivate { ...@@ -512,6 +512,18 @@ struct _qemuDomainGraphicsPrivate {
}; };
#define QEMU_DOMAIN_NETWORK_PRIVATE(dev) \
((qemuDomainNetworkPrivatePtr) (dev)->privateData)
typedef struct _qemuDomainNetworkPrivate qemuDomainNetworkPrivate;
typedef qemuDomainNetworkPrivate *qemuDomainNetworkPrivatePtr;
struct _qemuDomainNetworkPrivate {
virObject parent;
bool tmp_to_be_larger_than_parent;
};
typedef enum { typedef enum {
QEMU_PROCESS_EVENT_WATCHDOG = 0, QEMU_PROCESS_EVENT_WATCHDOG = 0,
QEMU_PROCESS_EVENT_GUESTPANIC, QEMU_PROCESS_EVENT_GUESTPANIC,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册