qemu: add qemuDomainVideoPrivate

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Marc-André Lureau 2019-09-23 14:44:36 +04:00 committed by Cole Robinson
parent 3dbf3941ad
commit ca60ecfa8c
2 changed files with 50 additions and 0 deletions

View File

@ -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,

View File

@ -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)