[Spice-devel] [PATCH 2/2] vdagent: add max-clipboard message

Marc-André Lureau marcandre.lureau at gmail.com
Wed Nov 6 12:07:22 PST 2013


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.
---
 spice/vd_agent.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/spice/vd_agent.h b/spice/vd_agent.h
index 6d1555b..c43aecd 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 {
+    uint32_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,
 };
 
-- 
1.8.3.1



More information about the Spice-devel mailing list