[Spice-commits] spice/vd_agent.h

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Aug 13 09:28:53 UTC 2019


 spice/vd_agent.h |   24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

New commits:
commit 22f1b1297b3e056b50ce3cc0180710797aea270c
Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Thu Jul 11 15:10:14 2019 +0200

    protocol: Add some comments to vd_agentd.h
    
    Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/spice/vd_agent.h b/spice/vd_agent.h
index 42ec77a..e4e00a8 100644
--- a/spice/vd_agent.h
+++ b/spice/vd_agent.h
@@ -62,15 +62,34 @@ typedef struct SPICE_ATTR_PACKED VDAgentMessage {
 #define VD_AGENT_CLIPBOARD_MAX_SIZE_ENV "SPICE_CLIPBOARD_MAX_SIZE"
 #endif
 
+
+/*
+ * Messages and types for guest agent.
+ * These messages are sent through the virtio port "com.redhat.spice.0"
+ * (agent <-> server) or embedded in "agent_data" SPICE protocol message in
+ * the "MainChannel" (server <-> client)
+ */
 enum {
+    /* server -> agent */
     VD_AGENT_MOUSE_STATE = 1,
+    /* client -> agent|server.
+     * Acknowledged by the agent using VD_AGENT_REPLY.
+     * See VDAgentMonitorsConfig structure.
+     */
     VD_AGENT_MONITORS_CONFIG,
+    /* agent -> client.
+     * See VDAgentReply structure.
+     */
     VD_AGENT_REPLY,
     /* Set clipboard data (both directions).
      * Message comes with type and data.
      * See VDAgentClipboard structure.
      */
     VD_AGENT_CLIPBOARD,
+    /* client -> agent.
+     * Acknowledged by Windows agent using VD_AGENT_REPLY.
+     * See VDAgentDisplayConfig structure.
+    */
     VD_AGENT_DISPLAY_CONFIG,
     VD_AGENT_ANNOUNCE_CAPABILITIES,
     /* Asks to listen for clipboard changes (both directions).
@@ -254,7 +273,7 @@ typedef struct SPICE_ATTR_PACKED VDAgentDeviceDisplayInfo {
     uint32_t monitor_id;
     uint32_t device_display_id;
     uint32_t device_address_len;
-    uint8_t device_address[0];  // a zero-terminated string
+    uint8_t device_address[0];  /* a zero-terminated string */
 } VDAgentDeviceDisplayInfo;
 
 
@@ -270,6 +289,9 @@ typedef struct SPICE_ATTR_PACKED VDAgentGraphicsDeviceInfo {
     VDAgentDeviceDisplayInfo display_info[0];
 } VDAgentGraphicsDeviceInfo;
 
+
+/* Capabilities definitions
+ */
 enum {
     VD_AGENT_CAP_MOUSE_STATE = 0,
     VD_AGENT_CAP_MONITORS_CONFIG,


More information about the Spice-commits mailing list