[Spice-devel] [RFC] [PATCH spice-protocol] DND: Add VD_AGENT_DND_*

Dunrong Huang riegamaths at gmail.com
Mon Nov 5 01:01:59 PST 2012


For now, there are two types of DND messages

1) VD_AGENT_DND_START: when user drags a file and drop to spice
    client, spice client will send this message to notify guest agent
    to prepare for receiving file.

2) VD_AGENT_DND_DATA: is used to transfer file content.

Signed-off-by: Dunrong Huang <riegamaths at gmail.com>
---
 spice/vd_agent.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/spice/vd_agent.h b/spice/vd_agent.h
index 2b9884e..3bb81ed 100644
--- a/spice/vd_agent.h
+++ b/spice/vd_agent.h
@@ -69,6 +69,8 @@ enum {
     VD_AGENT_CLIPBOARD_GRAB,
     VD_AGENT_CLIPBOARD_REQUEST,
     VD_AGENT_CLIPBOARD_RELEASE,
+    VD_AGENT_DND_START,
+    VD_AGENT_DND_DATA,
     VD_AGENT_END_MESSAGE,
 };
 
@@ -166,6 +168,11 @@ typedef struct SPICE_ATTR_PACKED VDAgentClipboardRelease {
 #endif
 } VDAgentClipboardRelease;
 
+typedef struct SPICE_ATTR_PACKED VDAgentDndMessage{
+    uint64_t file_size;
+    uint8_t file_name[0];
+} VDAgentDndMessage;
+
 enum {
     VD_AGENT_CAP_MOUSE_STATE = 0,
     VD_AGENT_CAP_MONITORS_CONFIG,
-- 
1.7.12.4



More information about the Spice-devel mailing list