[Spice-devel] [PATCH spice-html5] Report SPICE_MAIN_CAP_AGENT_CONNECTED_TOKENS capability

Pavel Grunt pgrunt at redhat.com
Thu Jan 8 07:38:09 PST 2015


We should report that we handle the connected tokens message
by setting the SPICE_MAIN_CAP_AGENT_CONNECTED_TOKENS capability.
---
Depends on http://lists.freedesktop.org/archives/spice-devel/2015-January/018538.html
---
 enums.js     | 5 +++++
 spiceconn.js | 4 ++++
 2 files changed, 9 insertions(+)

diff --git a/enums.js b/enums.js
index fe08d42..07aa343 100644
--- a/enums.js
+++ b/enums.js
@@ -166,6 +166,11 @@ var SPICE_PLAYBACK_CAP_VOLUME           = 1;
 var SPICE_PLAYBACK_CAP_LATENCY          = 2;
 var SPICE_PLAYBACK_CAP_OPUS             = 3;
 
+var SPICE_MAIN_CAP_SEMI_SEAMLESS_MIGRATE  = 0;
+var SPICE_MAIN_CAP_NAME_AND_UUID          = 1;
+var SPICE_MAIN_CAP_AGENT_CONNECTED_TOKENS = 2;
+var SPICE_MAIN_CAP_SEAMLESS_MIGRATE       = 3;
+
 var SPICE_AUDIO_DATA_MODE_INVALID       = 0;
 var SPICE_AUDIO_DATA_MODE_RAW           = 1;
 var SPICE_AUDIO_DATA_MODE_CELT_0_5_1    = 2;
diff --git a/spiceconn.js b/spiceconn.js
index ceebd5d..ec42d8d 100644
--- a/spiceconn.js
+++ b/spiceconn.js
@@ -129,6 +129,10 @@ SpiceConn.prototype =
             msg.channel_caps.push(
                 (1 << SPICE_PLAYBACK_CAP_OPUS)
             );
+        else if (msg.channel_type == SPICE_CHANNEL_MAIN)
+            msg.channel_caps.push(
+                (1 << SPICE_MAIN_CAP_AGENT_CONNECTED_TOKENS)
+            );
 
         hdr.size = msg.buffer_size();
 
-- 
1.9.3



More information about the Spice-devel mailing list