[Spice-commits] 2 commits - spice/vd_agent.h
Marc-André Lureau
elmarco at kemper.freedesktop.org
Fri Nov 15 12:59:01 PST 2013
spice/vd_agent.h | 9 +++++++++
1 file changed, 9 insertions(+)
New commits:
commit 5ff3fa7080bd08392fc011175657264d57dddcec
Author: Marc-André Lureau <marcandre.lureau at gmail.com>
Date: Wed Nov 6 20:59:51 2013 +0100
vdagent: add max-clipboard message
Add an optional message sent by the client to ask the agent not to send
clipboard data bigger than a certain size, in bytes. The message can be
sent if the agent supports the capability MAX_CLIPBOARD, at any time.
The agent is free to ignore or forget the value after a restart or a
disconnection, but a bigger message might be discarded when received on
client side, resulting in bandwidth waste.
diff --git a/spice/vd_agent.h b/spice/vd_agent.h
index 6d1555b..7464661 100644
--- a/spice/vd_agent.h
+++ b/spice/vd_agent.h
@@ -76,6 +76,7 @@ enum {
VD_AGENT_FILE_XFER_STATUS,
VD_AGENT_FILE_XFER_DATA,
VD_AGENT_CLIENT_DISCONNECTED,
+ VD_AGENT_MAX_CLIPBOARD,
VD_AGENT_END_MESSAGE,
};
@@ -201,6 +202,10 @@ typedef struct SPICE_ATTR_PACKED VDAgentClipboardRelease {
#endif
} VDAgentClipboardRelease;
+typedef struct SPICE_ATTR_PACKED VDAgentMaxClipboard {
+ int32_t max;
+} VDAgentMaxClipboard;
+
enum {
VD_AGENT_CAP_MOUSE_STATE = 0,
VD_AGENT_CAP_MONITORS_CONFIG,
@@ -212,6 +217,7 @@ enum {
VD_AGENT_CAP_SPARSE_MONITORS_CONFIG,
VD_AGENT_CAP_GUEST_LINEEND_LF,
VD_AGENT_CAP_GUEST_LINEEND_CRLF,
+ VD_AGENT_CAP_MAX_CLIPBOARD,
VD_AGENT_END_CAP,
};
commit 9fc1e7e3d5289950ce74398ec9627e7ae9981b09
Author: Marc-André Lureau <marcandre.lureau at gmail.com>
Date: Wed Nov 6 20:59:28 2013 +0100
Mark VD_AGENT_CLIPBOARD_MAX as deprecated
There is no use for those 2 values, and the default limit would be quite
wrong.
Put them in a deprecated block. If someone uses them, he will have to
add -DSPICE_DEPRECATED, or just fix the code.
diff --git a/spice/vd_agent.h b/spice/vd_agent.h
index c331d84..6d1555b 100644
--- a/spice/vd_agent.h
+++ b/spice/vd_agent.h
@@ -56,8 +56,11 @@ typedef struct SPICE_ATTR_PACKED VDAgentMessage {
#define VD_AGENT_PROTOCOL 1
#define VD_AGENT_MAX_DATA_SIZE 2048
+
+#ifdef SPICE_DEPRECATED
#define VD_AGENT_CLIPBOARD_MAX_SIZE_DEFAULT 1024
#define VD_AGENT_CLIPBOARD_MAX_SIZE_ENV "SPICE_CLIPBOARD_MAX_SIZE"
+#endif
enum {
VD_AGENT_MOUSE_STATE = 1,
More information about the Spice-commits
mailing list