[Spice-devel] [RFC spice-vdagent 5/8] vdagentd-proto: specify new SELECTION messages
Jakub Janků
janku.jakub.jj at gmail.com
Thu May 31 20:52:22 UTC 2018
---
src/vdagentd-proto-strings.h | 10 ++++++++++
src/vdagentd-proto.h | 17 +++++++++++++++++
2 files changed, 27 insertions(+)
diff --git a/src/vdagentd-proto-strings.h b/src/vdagentd-proto-strings.h
index 6e7bcee..e76decc 100644
--- a/src/vdagentd-proto-strings.h
+++ b/src/vdagentd-proto-strings.h
@@ -22,6 +22,11 @@
#ifndef __VDAGENTD_PROTO_STRINGS_H
#define __VDAGENTD_PROTO_STRINGS_H
+static const char * const vdagentd_clipboard_protocols[] = {
+ "compatibility",
+ "selection",
+};
+
static const char * const vdagentd_messages[] = {
"guest xorg resolution",
"monitors config",
@@ -29,6 +34,11 @@ static const char * const vdagentd_messages[] = {
"clipboard request",
"clipboard data",
"clipboard release",
+ "clipboard protocol",
+ "selection grab",
+ "selection request",
+ "selection data",
+ "selection release",
"version",
"audio volume sync",
"file xfer start",
diff --git a/src/vdagentd-proto.h b/src/vdagentd-proto.h
index f72a890..fc56689 100644
--- a/src/vdagentd-proto.h
+++ b/src/vdagentd-proto.h
@@ -27,6 +27,18 @@
#define DEFAULT_VIRTIO_PORT_PATH "/dev/virtio-ports/com.redhat.spice.0"
+/* vdagentd sends VDAGENTD_CLIPBOARD_PROTOCOL message to vdagent
+ * specifying the protocol to be used to transfer clipboard data.
+ * If client features VD_AGENT_CAP_SELECTION_DATA capability,
+ * CLIPBOARD_PROTOCOL_SELECTION is used.
+ */
+enum {
+ /* Use old VDAGENTD_CLIPBOARD_* messages */
+ CLIPBOARD_PROTOCOL_COMPATIBILITY,
+ /* Use new VDAGENTD_SELECTION_* messages */
+ CLIPBOARD_PROTOCOL_SELECTION
+};
+
enum {
VDAGENTD_GUEST_XORG_RESOLUTION, /* client -> daemon, arg1: overall width,
arg2: overall height, data: array of
@@ -37,6 +49,11 @@ enum {
VDAGENTD_CLIPBOARD_REQUEST, /* arg1: selection, arg 2 = type */
VDAGENTD_CLIPBOARD_DATA, /* arg1: sel, arg 2: type, data: data */
VDAGENTD_CLIPBOARD_RELEASE, /* arg1: selection */
+ VDAGENTD_CLIPBOARD_PROTOCOL,/* daemon -> client, arg1: CLIPBOARD_PROTOCOL_* */
+ VDAGENTD_SELECTION_GRAB, /* arg1: sel, data: list of targets */
+ VDAGENTD_SELECTION_REQUEST, /* arg1: sel, data: target */
+ VDAGENTD_SELECTION_DATA, /* arg1: sel, arg 2: format, data: type + NULL + data */
+ VDAGENTD_SELECTION_RELEASE, /* arg1: sel */
VDAGENTD_VERSION, /* daemon -> client, data: version string */
VDAGENTD_AUDIO_VOLUME_SYNC,
VDAGENTD_FILE_XFER_START,
--
2.17.0
More information about the Spice-devel
mailing list