mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 19:41:16 +00:00
Rename virDomainGraphicsSpiceMouseMode to virDomainMouseMode
This enumeration will be useful for vnc with the upcoming qemu-vdagent device so make the name more generic. Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
parent
b6dfb216c9
commit
f135fdabab
@ -997,8 +997,8 @@ VIR_ENUM_IMPL(virDomainGraphicsSpiceZlibCompression,
|
||||
"always",
|
||||
);
|
||||
|
||||
VIR_ENUM_IMPL(virDomainGraphicsSpiceMouseMode,
|
||||
VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_LAST,
|
||||
VIR_ENUM_IMPL(virDomainMouseMode,
|
||||
VIR_DOMAIN_MOUSE_MODE_LAST,
|
||||
"default",
|
||||
"server",
|
||||
"client",
|
||||
@ -12703,7 +12703,7 @@ virDomainGraphicsDefParseXMLSpice(virDomainGraphicsDef *def,
|
||||
|
||||
if ((cur = virXPathNode("./mouse", ctxt))) {
|
||||
if (virXMLPropEnum(cur, "mode",
|
||||
virDomainGraphicsSpiceMouseModeTypeFromString,
|
||||
virDomainMouseModeTypeFromString,
|
||||
VIR_XML_PROP_REQUIRED | VIR_XML_PROP_NONZERO,
|
||||
&def->data.spice.mousemode) < 0)
|
||||
return -1;
|
||||
@ -26616,7 +26616,7 @@ virDomainGraphicsDefFormat(virBuffer *buf,
|
||||
virDomainGraphicsSpiceStreamingModeTypeToString(def->data.spice.streaming));
|
||||
if (def->data.spice.mousemode)
|
||||
virBufferAsprintf(buf, "<mouse mode='%s'/>\n",
|
||||
virDomainGraphicsSpiceMouseModeTypeToString(def->data.spice.mousemode));
|
||||
virDomainMouseModeTypeToString(def->data.spice.mousemode));
|
||||
if (def->data.spice.copypaste)
|
||||
virBufferAsprintf(buf, "<clipboard copypaste='%s'/>\n",
|
||||
virTristateBoolTypeToString(def->data.spice.copypaste));
|
||||
|
@ -1846,12 +1846,12 @@ typedef enum {
|
||||
} virDomainGraphicsSpiceZlibCompression;
|
||||
|
||||
typedef enum {
|
||||
VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_DEFAULT = 0,
|
||||
VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_SERVER,
|
||||
VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_CLIENT,
|
||||
VIR_DOMAIN_MOUSE_MODE_DEFAULT = 0,
|
||||
VIR_DOMAIN_MOUSE_MODE_SERVER,
|
||||
VIR_DOMAIN_MOUSE_MODE_CLIENT,
|
||||
|
||||
VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_LAST
|
||||
} virDomainGraphicsSpiceMouseMode;
|
||||
VIR_DOMAIN_MOUSE_MODE_LAST
|
||||
} virDomainMouseMode;
|
||||
|
||||
typedef enum {
|
||||
VIR_DOMAIN_GRAPHICS_SPICE_STREAMING_MODE_DEFAULT = 0,
|
||||
@ -1930,7 +1930,7 @@ struct _virDomainGraphicsDef {
|
||||
int tlsPort;
|
||||
bool portReserved;
|
||||
bool tlsPortReserved;
|
||||
virDomainGraphicsSpiceMouseMode mousemode;
|
||||
virDomainMouseMode mousemode;
|
||||
char *keymap;
|
||||
virDomainGraphicsAuthDef auth;
|
||||
bool autoport;
|
||||
@ -3996,7 +3996,7 @@ VIR_ENUM_DECL(virDomainGraphicsSpiceImageCompression);
|
||||
VIR_ENUM_DECL(virDomainGraphicsSpiceJpegCompression);
|
||||
VIR_ENUM_DECL(virDomainGraphicsSpiceZlibCompression);
|
||||
VIR_ENUM_DECL(virDomainGraphicsSpiceStreamingMode);
|
||||
VIR_ENUM_DECL(virDomainGraphicsSpiceMouseMode);
|
||||
VIR_ENUM_DECL(virDomainMouseMode);
|
||||
VIR_ENUM_DECL(virDomainGraphicsVNCSharePolicy);
|
||||
VIR_ENUM_DECL(virDomainHyperv);
|
||||
VIR_ENUM_DECL(virDomainKVM);
|
||||
|
@ -444,8 +444,6 @@ virDomainGraphicsSpiceImageCompressionTypeFromString;
|
||||
virDomainGraphicsSpiceImageCompressionTypeToString;
|
||||
virDomainGraphicsSpiceJpegCompressionTypeFromString;
|
||||
virDomainGraphicsSpiceJpegCompressionTypeToString;
|
||||
virDomainGraphicsSpiceMouseModeTypeFromString;
|
||||
virDomainGraphicsSpiceMouseModeTypeToString;
|
||||
virDomainGraphicsSpiceStreamingModeTypeFromString;
|
||||
virDomainGraphicsSpiceStreamingModeTypeToString;
|
||||
virDomainGraphicsSpiceZlibCompressionTypeFromString;
|
||||
@ -519,6 +517,8 @@ virDomainMemoryModelTypeToString;
|
||||
virDomainMemoryRemove;
|
||||
virDomainMemorySourceTypeFromString;
|
||||
virDomainMemorySourceTypeToString;
|
||||
virDomainMouseModeTypeFromString;
|
||||
virDomainMouseModeTypeToString;
|
||||
virDomainNetAllocateActualDevice;
|
||||
virDomainNetAppendIPAddress;
|
||||
virDomainNetARPInterfaces;
|
||||
|
@ -1645,14 +1645,14 @@ libxlMakeBuildInfoVfb(virPortAllocatorRange *graphicsports,
|
||||
|
||||
switch (l_vfb->data.spice.mousemode) {
|
||||
/* client mouse mode is default in xl.cfg */
|
||||
case VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_DEFAULT:
|
||||
case VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_CLIENT:
|
||||
case VIR_DOMAIN_MOUSE_MODE_DEFAULT:
|
||||
case VIR_DOMAIN_MOUSE_MODE_CLIENT:
|
||||
libxl_defbool_set(&b_info->u.hvm.spice.agent_mouse, true);
|
||||
break;
|
||||
case VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_SERVER:
|
||||
case VIR_DOMAIN_MOUSE_MODE_SERVER:
|
||||
libxl_defbool_set(&b_info->u.hvm.spice.agent_mouse, false);
|
||||
break;
|
||||
case VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_LAST:
|
||||
case VIR_DOMAIN_MOUSE_MODE_LAST:
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -361,11 +361,9 @@ xenParseXLSpice(virConf *conf, virDomainDef *def)
|
||||
&val, 0) < 0)
|
||||
goto cleanup;
|
||||
if (val) {
|
||||
graphics->data.spice.mousemode =
|
||||
VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_CLIENT;
|
||||
graphics->data.spice.mousemode = VIR_DOMAIN_MOUSE_MODE_CLIENT;
|
||||
} else {
|
||||
graphics->data.spice.mousemode =
|
||||
VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_SERVER;
|
||||
graphics->data.spice.mousemode = VIR_DOMAIN_MOUSE_MODE_SERVER;
|
||||
}
|
||||
|
||||
if (xenConfigGetBool(conf, "spice_clipboard_sharing", &val, 0) < 0)
|
||||
@ -1691,11 +1689,11 @@ xenFormatXLSpice(virConf *conf, virDomainDef *def)
|
||||
|
||||
if (graphics->data.spice.mousemode) {
|
||||
switch (graphics->data.spice.mousemode) {
|
||||
case VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_SERVER:
|
||||
case VIR_DOMAIN_MOUSE_MODE_SERVER:
|
||||
if (xenConfigSetInt(conf, "spiceagent_mouse", 0) < 0)
|
||||
return -1;
|
||||
break;
|
||||
case VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_CLIENT:
|
||||
case VIR_DOMAIN_MOUSE_MODE_CLIENT:
|
||||
if (xenConfigSetInt(conf, "spiceagent_mouse", 1) < 0)
|
||||
return -1;
|
||||
/*
|
||||
@ -1705,11 +1703,11 @@ xenFormatXLSpice(virConf *conf, virDomainDef *def)
|
||||
if (xenConfigSetInt(conf, "spicevdagent", 1) < 0)
|
||||
return -1;
|
||||
break;
|
||||
case VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_DEFAULT:
|
||||
case VIR_DOMAIN_MOUSE_MODE_DEFAULT:
|
||||
break;
|
||||
case VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_LAST:
|
||||
case VIR_DOMAIN_MOUSE_MODE_LAST:
|
||||
default:
|
||||
virReportEnumRangeError(virDomainGraphicsSpiceMouseMode,
|
||||
virReportEnumRangeError(virDomainMouseMode,
|
||||
graphics->data.spice.mousemode);
|
||||
return -1;
|
||||
}
|
||||
|
@ -8405,17 +8405,17 @@ qemuBuildGraphicsSPICECommandLine(virQEMUDriverConfig *cfg,
|
||||
|
||||
if (graphics->data.spice.mousemode) {
|
||||
switch (graphics->data.spice.mousemode) {
|
||||
case VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_SERVER:
|
||||
case VIR_DOMAIN_MOUSE_MODE_SERVER:
|
||||
virBufferAddLit(&opt, "agent-mouse=off,");
|
||||
break;
|
||||
case VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_CLIENT:
|
||||
case VIR_DOMAIN_MOUSE_MODE_CLIENT:
|
||||
virBufferAddLit(&opt, "agent-mouse=on,");
|
||||
break;
|
||||
case VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_DEFAULT:
|
||||
case VIR_DOMAIN_MOUSE_MODE_DEFAULT:
|
||||
break;
|
||||
case VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_LAST:
|
||||
case VIR_DOMAIN_MOUSE_MODE_LAST:
|
||||
default:
|
||||
virReportEnumRangeError(virDomainGraphicsSpiceMouseMode,
|
||||
virReportEnumRangeError(virDomainMouseMode,
|
||||
graphics->data.spice.mousemode);
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user