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",
|
"always",
|
||||||
);
|
);
|
||||||
|
|
||||||
VIR_ENUM_IMPL(virDomainGraphicsSpiceMouseMode,
|
VIR_ENUM_IMPL(virDomainMouseMode,
|
||||||
VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_LAST,
|
VIR_DOMAIN_MOUSE_MODE_LAST,
|
||||||
"default",
|
"default",
|
||||||
"server",
|
"server",
|
||||||
"client",
|
"client",
|
||||||
@ -12703,7 +12703,7 @@ virDomainGraphicsDefParseXMLSpice(virDomainGraphicsDef *def,
|
|||||||
|
|
||||||
if ((cur = virXPathNode("./mouse", ctxt))) {
|
if ((cur = virXPathNode("./mouse", ctxt))) {
|
||||||
if (virXMLPropEnum(cur, "mode",
|
if (virXMLPropEnum(cur, "mode",
|
||||||
virDomainGraphicsSpiceMouseModeTypeFromString,
|
virDomainMouseModeTypeFromString,
|
||||||
VIR_XML_PROP_REQUIRED | VIR_XML_PROP_NONZERO,
|
VIR_XML_PROP_REQUIRED | VIR_XML_PROP_NONZERO,
|
||||||
&def->data.spice.mousemode) < 0)
|
&def->data.spice.mousemode) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
@ -26616,7 +26616,7 @@ virDomainGraphicsDefFormat(virBuffer *buf,
|
|||||||
virDomainGraphicsSpiceStreamingModeTypeToString(def->data.spice.streaming));
|
virDomainGraphicsSpiceStreamingModeTypeToString(def->data.spice.streaming));
|
||||||
if (def->data.spice.mousemode)
|
if (def->data.spice.mousemode)
|
||||||
virBufferAsprintf(buf, "<mouse mode='%s'/>\n",
|
virBufferAsprintf(buf, "<mouse mode='%s'/>\n",
|
||||||
virDomainGraphicsSpiceMouseModeTypeToString(def->data.spice.mousemode));
|
virDomainMouseModeTypeToString(def->data.spice.mousemode));
|
||||||
if (def->data.spice.copypaste)
|
if (def->data.spice.copypaste)
|
||||||
virBufferAsprintf(buf, "<clipboard copypaste='%s'/>\n",
|
virBufferAsprintf(buf, "<clipboard copypaste='%s'/>\n",
|
||||||
virTristateBoolTypeToString(def->data.spice.copypaste));
|
virTristateBoolTypeToString(def->data.spice.copypaste));
|
||||||
|
@ -1846,12 +1846,12 @@ typedef enum {
|
|||||||
} virDomainGraphicsSpiceZlibCompression;
|
} virDomainGraphicsSpiceZlibCompression;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_DEFAULT = 0,
|
VIR_DOMAIN_MOUSE_MODE_DEFAULT = 0,
|
||||||
VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_SERVER,
|
VIR_DOMAIN_MOUSE_MODE_SERVER,
|
||||||
VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_CLIENT,
|
VIR_DOMAIN_MOUSE_MODE_CLIENT,
|
||||||
|
|
||||||
VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_LAST
|
VIR_DOMAIN_MOUSE_MODE_LAST
|
||||||
} virDomainGraphicsSpiceMouseMode;
|
} virDomainMouseMode;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
VIR_DOMAIN_GRAPHICS_SPICE_STREAMING_MODE_DEFAULT = 0,
|
VIR_DOMAIN_GRAPHICS_SPICE_STREAMING_MODE_DEFAULT = 0,
|
||||||
@ -1930,7 +1930,7 @@ struct _virDomainGraphicsDef {
|
|||||||
int tlsPort;
|
int tlsPort;
|
||||||
bool portReserved;
|
bool portReserved;
|
||||||
bool tlsPortReserved;
|
bool tlsPortReserved;
|
||||||
virDomainGraphicsSpiceMouseMode mousemode;
|
virDomainMouseMode mousemode;
|
||||||
char *keymap;
|
char *keymap;
|
||||||
virDomainGraphicsAuthDef auth;
|
virDomainGraphicsAuthDef auth;
|
||||||
bool autoport;
|
bool autoport;
|
||||||
@ -3996,7 +3996,7 @@ VIR_ENUM_DECL(virDomainGraphicsSpiceImageCompression);
|
|||||||
VIR_ENUM_DECL(virDomainGraphicsSpiceJpegCompression);
|
VIR_ENUM_DECL(virDomainGraphicsSpiceJpegCompression);
|
||||||
VIR_ENUM_DECL(virDomainGraphicsSpiceZlibCompression);
|
VIR_ENUM_DECL(virDomainGraphicsSpiceZlibCompression);
|
||||||
VIR_ENUM_DECL(virDomainGraphicsSpiceStreamingMode);
|
VIR_ENUM_DECL(virDomainGraphicsSpiceStreamingMode);
|
||||||
VIR_ENUM_DECL(virDomainGraphicsSpiceMouseMode);
|
VIR_ENUM_DECL(virDomainMouseMode);
|
||||||
VIR_ENUM_DECL(virDomainGraphicsVNCSharePolicy);
|
VIR_ENUM_DECL(virDomainGraphicsVNCSharePolicy);
|
||||||
VIR_ENUM_DECL(virDomainHyperv);
|
VIR_ENUM_DECL(virDomainHyperv);
|
||||||
VIR_ENUM_DECL(virDomainKVM);
|
VIR_ENUM_DECL(virDomainKVM);
|
||||||
|
@ -444,8 +444,6 @@ virDomainGraphicsSpiceImageCompressionTypeFromString;
|
|||||||
virDomainGraphicsSpiceImageCompressionTypeToString;
|
virDomainGraphicsSpiceImageCompressionTypeToString;
|
||||||
virDomainGraphicsSpiceJpegCompressionTypeFromString;
|
virDomainGraphicsSpiceJpegCompressionTypeFromString;
|
||||||
virDomainGraphicsSpiceJpegCompressionTypeToString;
|
virDomainGraphicsSpiceJpegCompressionTypeToString;
|
||||||
virDomainGraphicsSpiceMouseModeTypeFromString;
|
|
||||||
virDomainGraphicsSpiceMouseModeTypeToString;
|
|
||||||
virDomainGraphicsSpiceStreamingModeTypeFromString;
|
virDomainGraphicsSpiceStreamingModeTypeFromString;
|
||||||
virDomainGraphicsSpiceStreamingModeTypeToString;
|
virDomainGraphicsSpiceStreamingModeTypeToString;
|
||||||
virDomainGraphicsSpiceZlibCompressionTypeFromString;
|
virDomainGraphicsSpiceZlibCompressionTypeFromString;
|
||||||
@ -519,6 +517,8 @@ virDomainMemoryModelTypeToString;
|
|||||||
virDomainMemoryRemove;
|
virDomainMemoryRemove;
|
||||||
virDomainMemorySourceTypeFromString;
|
virDomainMemorySourceTypeFromString;
|
||||||
virDomainMemorySourceTypeToString;
|
virDomainMemorySourceTypeToString;
|
||||||
|
virDomainMouseModeTypeFromString;
|
||||||
|
virDomainMouseModeTypeToString;
|
||||||
virDomainNetAllocateActualDevice;
|
virDomainNetAllocateActualDevice;
|
||||||
virDomainNetAppendIPAddress;
|
virDomainNetAppendIPAddress;
|
||||||
virDomainNetARPInterfaces;
|
virDomainNetARPInterfaces;
|
||||||
|
@ -1645,14 +1645,14 @@ libxlMakeBuildInfoVfb(virPortAllocatorRange *graphicsports,
|
|||||||
|
|
||||||
switch (l_vfb->data.spice.mousemode) {
|
switch (l_vfb->data.spice.mousemode) {
|
||||||
/* client mouse mode is default in xl.cfg */
|
/* client mouse mode is default in xl.cfg */
|
||||||
case VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_DEFAULT:
|
case VIR_DOMAIN_MOUSE_MODE_DEFAULT:
|
||||||
case VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_CLIENT:
|
case VIR_DOMAIN_MOUSE_MODE_CLIENT:
|
||||||
libxl_defbool_set(&b_info->u.hvm.spice.agent_mouse, true);
|
libxl_defbool_set(&b_info->u.hvm.spice.agent_mouse, true);
|
||||||
break;
|
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);
|
libxl_defbool_set(&b_info->u.hvm.spice.agent_mouse, false);
|
||||||
break;
|
break;
|
||||||
case VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_LAST:
|
case VIR_DOMAIN_MOUSE_MODE_LAST:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -361,11 +361,9 @@ xenParseXLSpice(virConf *conf, virDomainDef *def)
|
|||||||
&val, 0) < 0)
|
&val, 0) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
if (val) {
|
if (val) {
|
||||||
graphics->data.spice.mousemode =
|
graphics->data.spice.mousemode = VIR_DOMAIN_MOUSE_MODE_CLIENT;
|
||||||
VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_CLIENT;
|
|
||||||
} else {
|
} else {
|
||||||
graphics->data.spice.mousemode =
|
graphics->data.spice.mousemode = VIR_DOMAIN_MOUSE_MODE_SERVER;
|
||||||
VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_SERVER;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xenConfigGetBool(conf, "spice_clipboard_sharing", &val, 0) < 0)
|
if (xenConfigGetBool(conf, "spice_clipboard_sharing", &val, 0) < 0)
|
||||||
@ -1691,11 +1689,11 @@ xenFormatXLSpice(virConf *conf, virDomainDef *def)
|
|||||||
|
|
||||||
if (graphics->data.spice.mousemode) {
|
if (graphics->data.spice.mousemode) {
|
||||||
switch (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)
|
if (xenConfigSetInt(conf, "spiceagent_mouse", 0) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
break;
|
break;
|
||||||
case VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_CLIENT:
|
case VIR_DOMAIN_MOUSE_MODE_CLIENT:
|
||||||
if (xenConfigSetInt(conf, "spiceagent_mouse", 1) < 0)
|
if (xenConfigSetInt(conf, "spiceagent_mouse", 1) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
/*
|
/*
|
||||||
@ -1705,11 +1703,11 @@ xenFormatXLSpice(virConf *conf, virDomainDef *def)
|
|||||||
if (xenConfigSetInt(conf, "spicevdagent", 1) < 0)
|
if (xenConfigSetInt(conf, "spicevdagent", 1) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
break;
|
break;
|
||||||
case VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_DEFAULT:
|
case VIR_DOMAIN_MOUSE_MODE_DEFAULT:
|
||||||
break;
|
break;
|
||||||
case VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_LAST:
|
case VIR_DOMAIN_MOUSE_MODE_LAST:
|
||||||
default:
|
default:
|
||||||
virReportEnumRangeError(virDomainGraphicsSpiceMouseMode,
|
virReportEnumRangeError(virDomainMouseMode,
|
||||||
graphics->data.spice.mousemode);
|
graphics->data.spice.mousemode);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -8405,17 +8405,17 @@ qemuBuildGraphicsSPICECommandLine(virQEMUDriverConfig *cfg,
|
|||||||
|
|
||||||
if (graphics->data.spice.mousemode) {
|
if (graphics->data.spice.mousemode) {
|
||||||
switch (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,");
|
virBufferAddLit(&opt, "agent-mouse=off,");
|
||||||
break;
|
break;
|
||||||
case VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_CLIENT:
|
case VIR_DOMAIN_MOUSE_MODE_CLIENT:
|
||||||
virBufferAddLit(&opt, "agent-mouse=on,");
|
virBufferAddLit(&opt, "agent-mouse=on,");
|
||||||
break;
|
break;
|
||||||
case VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_DEFAULT:
|
case VIR_DOMAIN_MOUSE_MODE_DEFAULT:
|
||||||
break;
|
break;
|
||||||
case VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_LAST:
|
case VIR_DOMAIN_MOUSE_MODE_LAST:
|
||||||
default:
|
default:
|
||||||
virReportEnumRangeError(virDomainGraphicsSpiceMouseMode,
|
virReportEnumRangeError(virDomainMouseMode,
|
||||||
graphics->data.spice.mousemode);
|
graphics->data.spice.mousemode);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user