From: Marc-André Lureau <marcandre.lureau(a)redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau(a)redhat.com>
---
src/qemu/qemu_domain.c | 38 ++++++++++++++++++++++++++++++++++++++
src/qemu/qemu_domain.h | 12 ++++++++++++
2 files changed, 50 insertions(+)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 24292b88bf..9437694940 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -1309,6 +1309,43 @@ qemuDomainNetworkPrivateDispose(void *obj ATTRIBUTE_UNUSED)
}
+static virClassPtr qemuDomainVideoPrivateClass;
+static void qemuDomainVideoPrivateDispose(void *obj);
+
+
+static int
+qemuDomainVideoPrivateOnceInit(void)
+{
+ if (!VIR_CLASS_NEW(qemuDomainVideoPrivate, virClassForObject()))
+ return -1;
+
+ return 0;
+}
+
+VIR_ONCE_GLOBAL_INIT(qemuDomainVideoPrivate);
+
+
+static virObjectPtr
+qemuDomainVideoPrivateNew(void)
+{
+ qemuDomainVideoPrivatePtr priv;
+
+ if (qemuDomainVideoPrivateInitialize() < 0)
+ return NULL;
+
+ if (!(priv = virObjectNew(qemuDomainVideoPrivateClass)))
+ return NULL;
+
+ return (virObjectPtr) priv;
+}
+
+
+static void
+qemuDomainVideoPrivateDispose(void *obj ATTRIBUTE_UNUSED)
+{
+}
+
+
/* qemuDomainSecretPlainSetup:
* @secinfo: Pointer to secret info
* @usageType: The virSecretUsageType
@@ -3668,6 +3705,7 @@ virDomainXMLPrivateDataCallbacks virQEMUDriverPrivateDataCallbacks =
{
.vsockNew = qemuDomainVsockPrivateNew,
.graphicsNew = qemuDomainGraphicsPrivateNew,
.networkNew = qemuDomainNetworkPrivateNew,
+ .videoNew = qemuDomainVideoPrivateNew,
.parse = qemuDomainObjPrivateXMLParse,
.format = qemuDomainObjPrivateXMLFormat,
.getParseOpaque = qemuDomainObjPrivateXMLGetParseOpaque,
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index 3e87e75c3a..89bd77b3c0 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -501,6 +501,18 @@ struct _qemuDomainVsockPrivate {
};
+#define QEMU_DOMAIN_VIDEO_PRIVATE(dev) \
+ ((qemuDomainVideoPrivatePtr) (dev)->privateData)
+
+typedef struct _qemuDomainVideoPrivate qemuDomainVideoPrivate;
+typedef qemuDomainVideoPrivate *qemuDomainVideoPrivatePtr;
+struct _qemuDomainVideoPrivate {
+ virObject parent;
+
+ bool tmp_to_remove;
+};
+
+
#define QEMU_DOMAIN_GRAPHICS_PRIVATE(dev) \
((qemuDomainGraphicsPrivatePtr) (dev)->privateData)
--
2.23.0