[Spice-commits] 5 commits - cursor.js display.js enums.js main.js playback.js spiceconn.js

Pavel Grunt pgrunt at kemper.freedesktop.org
Wed Sep 9 00:06:54 PDT 2015


 cursor.js    |   18 +++++++++++
 display.js   |   93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 enums.js     |    2 +
 main.js      |   62 ++++++++++++++++++++++++++++++++++++++-
 playback.js  |   18 +++++++++++
 spiceconn.js |   18 ++++++++++-
 6 files changed, 206 insertions(+), 5 deletions(-)

New commits:
commit 789071cbfa68e1ccb13f2811bdfa39009f52499a
Author: Pavel Grunt <pgrunt at redhat.com>
Date:   Mon Sep 7 15:34:21 2015 +0200

    Set nonhandled messages as not implemented
    
    Avoid spamming log

diff --git a/cursor.js b/cursor.js
index 71e941d..296fbde 100644
--- a/cursor.js
+++ b/cursor.js
@@ -73,6 +73,12 @@ SpiceCursorConn.prototype.process_channel_message = function(msg)
         return true;
     }
 
+    if (msg.type == SPICE_MSG_CURSOR_MOVE)
+    {
+        this.known_unimplemented(msg.type, "Cursor Move");
+        return true;
+    }
+
     if (msg.type == SPICE_MSG_CURSOR_HIDE)
     {
         DEBUG > 1 && console.log("SpiceMsgCursorHide");
@@ -80,6 +86,12 @@ SpiceCursorConn.prototype.process_channel_message = function(msg)
         return true;
     }
 
+    if (msg.type == SPICE_MSG_CURSOR_TRAIL)
+    {
+        this.known_unimplemented(msg.type, "Cursor Trail");
+        return true;
+    }
+
     if (msg.type == SPICE_MSG_CURSOR_RESET)
     {
         DEBUG > 1 && console.log("SpiceMsgCursorReset");
@@ -87,6 +99,12 @@ SpiceCursorConn.prototype.process_channel_message = function(msg)
         return true;
     }
 
+    if (msg.type == SPICE_MSG_CURSOR_INVAL_ONE)
+    {
+        this.known_unimplemented(msg.type, "Cursor Inval One");
+        return true;
+    }
+
     if (msg.type == SPICE_MSG_CURSOR_INVAL_ALL)
     {
         DEBUG > 1 && console.log("SpiceMsgCursorInvalAll");
diff --git a/display.js b/display.js
index 00f2903..819f8bc 100644
--- a/display.js
+++ b/display.js
@@ -62,6 +62,12 @@ function SpiceDisplayConn()
 SpiceDisplayConn.prototype = Object.create(SpiceConn.prototype);
 SpiceDisplayConn.prototype.process_channel_message = function(msg)
 {
+    if (msg.type == SPICE_MSG_DISPLAY_MODE)
+    {
+        this.known_unimplemented(msg.type, "Display Mode");
+        return true;
+    }
+
     if (msg.type == SPICE_MSG_DISPLAY_MARK)
     {
         // FIXME - DISPLAY_MARK not implemented (may be hard or impossible)
@@ -364,6 +370,60 @@ SpiceDisplayConn.prototype.process_channel_message = function(msg)
         return true;
     }
 
+    if (msg.type == SPICE_MSG_DISPLAY_DRAW_OPAQUE)
+    {
+        this.known_unimplemented(msg.type, "Display Draw Opaque");
+        return true;
+    }
+
+    if (msg.type == SPICE_MSG_DISPLAY_DRAW_BLEND)
+    {
+        this.known_unimplemented(msg.type, "Display Draw Blend");
+        return true;
+    }
+
+    if (msg.type == SPICE_MSG_DISPLAY_DRAW_BLACKNESS)
+    {
+        this.known_unimplemented(msg.type, "Display Draw Blackness");
+        return true;
+    }
+
+    if (msg.type == SPICE_MSG_DISPLAY_DRAW_WHITENESS)
+    {
+        this.known_unimplemented(msg.type, "Display Draw Whiteness");
+        return true;
+    }
+
+    if (msg.type == SPICE_MSG_DISPLAY_DRAW_INVERS)
+    {
+        this.known_unimplemented(msg.type, "Display Draw Invers");
+        return true;
+    }
+
+    if (msg.type == SPICE_MSG_DISPLAY_DRAW_ROP3)
+    {
+        this.known_unimplemented(msg.type, "Display Draw ROP3");
+        return true;
+    }
+
+    if (msg.type == SPICE_MSG_DISPLAY_DRAW_STROKE)
+    {
+        this.known_unimplemented(msg.type, "Display Draw Stroke");
+        return true;
+    }
+
+    if (msg.type == SPICE_MSG_DISPLAY_DRAW_TRANSPARENT)
+    {
+        this.known_unimplemented(msg.type, "Display Draw Transparent");
+        return true;
+    }
+
+    if (msg.type == SPICE_MSG_DISPLAY_DRAW_ALPHA_BLEND)
+    {
+        this.known_unimplemented(msg.type, "Display Draw Alpha Blend");
+        return true;
+    }
+
     if (msg.type == SPICE_MSG_DISPLAY_COPY_BITS)
     {
         var copy_bits = new SpiceMsgDisplayCopyBits(msg.data);
@@ -400,6 +460,18 @@ SpiceDisplayConn.prototype.process_channel_message = function(msg)
         return true;
     }
 
+    if (msg.type == SPICE_MSG_DISPLAY_INVAL_ALL_PIXMAPS)
+    {
+        this.known_unimplemented(msg.type, "Display Inval All Pixmaps");
+        return true;
+    }
+
+    if (msg.type == SPICE_MSG_DISPLAY_INVAL_PALETTE)
+    {
+        this.known_unimplemented(msg.type, "Display Inval Palette");
+        return true;
+    }
+
     if (msg.type == SPICE_MSG_DISPLAY_INVAL_ALL_PALETTES)
     {
         this.known_unimplemented(msg.type, "Inval All Palettes");
@@ -532,6 +604,13 @@ SpiceDisplayConn.prototype.process_channel_message = function(msg)
         this.streams[m.id] = undefined;
         return true;
     }
+
+    if (msg.type == SPICE_MSG_DISPLAY_STREAM_DESTROY_ALL)
+    {
+        this.known_unimplemented(msg.type, "Display Stream Destroy All");
+        return true;
+    }
+
     if (msg.type == SPICE_MSG_DISPLAY_INVAL_LIST)
     {
         var m = new SpiceMsgDisplayInvalList(msg.data);
@@ -543,6 +622,18 @@ SpiceDisplayConn.prototype.process_channel_message = function(msg)
         return true;
     }
 
+    if (msg.type == SPICE_MSG_DISPLAY_MONITORS_CONFIG)
+    {
+        this.known_unimplemented(msg.type, "Display Monitors Config");
+        return true;
+    }
+
+    if (msg.type == SPICE_MSG_DISPLAY_DRAW_COMPOSITE)
+    {
+        this.known_unimplemented(msg.type, "Display Draw Composite");
+        return true;
+    }
+
     return false;
 }
 
diff --git a/main.js b/main.js
index be8ad2e..3d9b13f 100644
--- a/main.js
+++ b/main.js
@@ -64,6 +64,18 @@ function SpiceMainConn()
 SpiceMainConn.prototype = Object.create(SpiceConn.prototype);
 SpiceMainConn.prototype.process_channel_message = function(msg)
 {
+    if (msg.type == SPICE_MSG_MAIN_MIGRATE_BEGIN)
+    {
+        this.known_unimplemented(msg.type, "Main Migrate Begin");
+        return true;
+    }
+
+    if (msg.type == SPICE_MSG_MAIN_MIGRATE_CANCEL)
+    {
+        this.known_unimplemented(msg.type, "Main Migrate Cancel");
+        return true;
+    }
+
     if (msg.type == SPICE_MSG_MAIN_INIT)
     {
         this.log_info("Connected to " + this.ws.url);
@@ -110,6 +122,12 @@ SpiceMainConn.prototype.process_channel_message = function(msg)
         return true;
     }
 
+    if (msg.type == SPICE_MSG_MAIN_MULTI_MEDIA_TIME)
+    {
+        this.known_unimplemented(msg.type, "Main Multi Media Time");
+        return true;
+    }
+
     if (msg.type == SPICE_MSG_MAIN_CHANNELS_LIST)
     {
         var i;
@@ -204,6 +222,48 @@ SpiceMainConn.prototype.process_channel_message = function(msg)
         return false;
     }
 
+    if (msg.type == SPICE_MSG_MAIN_MIGRATE_SWITCH_HOST)
+    {
+        this.known_unimplemented(msg.type, "Main Migrate Switch Host");
+        return true;
+    }
+
+    if (msg.type == SPICE_MSG_MAIN_MIGRATE_END)
+    {
+        this.known_unimplemented(msg.type, "Main Migrate End");
+        return true;
+    }
+
+    if (msg.type == SPICE_MSG_MAIN_NAME)
+    {
+        this.known_unimplemented(msg.type, "Main Name");
+        return true;
+    }
+
+    if (msg.type == SPICE_MSG_MAIN_UUID)
+    {
+        this.known_unimplemented(msg.type, "Main UUID");
+        return true;
+    }
+
+    if (msg.type == SPICE_MSG_MAIN_MIGRATE_BEGIN_SEAMLESS)
+    {
+        this.known_unimplemented(msg.type, "Main Migrate Begin Seamless");
+        return true;
+    }
+
+    if (msg.type == SPICE_MSG_MAIN_MIGRATE_DST_SEAMLESS_ACK)
+    {
+        this.known_unimplemented(msg.type, "Main Migrate Dst Seamless ACK");
+        return true;
+    }
+
+    if (msg.type == SPICE_MSG_MAIN_MIGRATE_DST_SEAMLESS_NACK)
+    {
+        this.known_unimplemented(msg.type, "Main Migrate Dst Seamless NACK");
+        return true;
+    }
+
     return false;
 }
 
diff --git a/playback.js b/playback.js
index 7209fbe..9659381 100644
--- a/playback.js
+++ b/playback.js
@@ -159,6 +159,24 @@ SpicePlaybackConn.prototype.process_channel_message = function(msg)
         return true;
     }
 
+    if (msg.type == SPICE_MSG_PLAYBACK_VOLUME)
+    {
+        this.known_unimplemented(msg.type, "Playback Volume");
+        return true;
+    }
+
+    if (msg.type == SPICE_MSG_PLAYBACK_MUTE)
+    {
+        this.known_unimplemented(msg.type, "Playback Mute");
+        return true;
+    }
+
+    if (msg.type == SPICE_MSG_PLAYBACK_LATENCY)
+    {
+        this.known_unimplemented(msg.type, "Playback Latency");
+        return true;
+    }
+
     return false;
 }
 
commit bd5d261a377e51aa18bf282899215b940d29949f
Author: Pavel Grunt <pgrunt at redhat.com>
Date:   Mon Sep 7 14:20:05 2015 +0200

    Use name of channel instead of number
    
    For unknown channel types the type number is still used, e.g.:
     "Channel type unknown-12 not implemented"

diff --git a/main.js b/main.js
index 99b2274..be8ad2e 100644
--- a/main.js
+++ b/main.js
@@ -138,10 +138,10 @@ SpiceMainConn.prototype.process_channel_message = function(msg)
                 this.cursor = new SpicePlaybackConn(conn);
             else
             {
-                this.log_err("Channel type " + chans.channels[i].type + " unknown.");
                 if (! ("extra_channels" in this))
                     this.extra_channels = [];
                 this.extra_channels[i] = new SpiceConn(conn);
+                this.log_err("Channel type " + this.extra_channels[i].channel_type() + " not implemented");
             }
 
         }
diff --git a/spiceconn.js b/spiceconn.js
index 70437be..903f3b0 100644
--- a/spiceconn.js
+++ b/spiceconn.js
@@ -342,10 +342,10 @@ SpiceConn.prototype =
             {
                 rc = this.process_channel_message(msg);
                 if (! rc)
-                    this.log_warn(this.type + ": Unknown message type " + msg.type + "!");
+                    this.log_warn(this.channel_type() + ": Unknown message type " + msg.type + "!");
             }
             else
-                this.log_err(this.type + ": No message handlers for this channel; message " + msg.type);
+                this.log_err(this.channel_type() + ": No message handlers for this channel; message " + msg.type);
         }
 
         if (this.msgs_until_ack !== undefined && this.ack_window)
commit 289a76037111a904ee4de794a8e68d8ec6d88aa7
Author: Pavel Grunt <pgrunt at redhat.com>
Date:   Mon Sep 7 14:31:05 2015 +0200

    spiceconn.js: Add missing channel names

diff --git a/spiceconn.js b/spiceconn.js
index f19b109..70437be 100644
--- a/spiceconn.js
+++ b/spiceconn.js
@@ -374,6 +374,20 @@ SpiceConn.prototype =
             return "inputs";
         else if (this.type == SPICE_CHANNEL_CURSOR)
             return "cursor";
+        else if (this.type == SPICE_CHANNEL_PLAYBACK)
+            return "playback";
+        else if (this.type == SPICE_CHANNEL_RECORD)
+            return "record";
+        else if (this.type == SPICE_CHANNEL_TUNNEL)
+            return "tunnel";
+        else if (this.type == SPICE_CHANNEL_SMARTCARD)
+            return "smartcard";
+        else if (this.type == SPICE_CHANNEL_USBREDIR)
+            return "usbredir";
+        else if (this.type == SPICE_CHANNEL_PORT)
+            return "port";
+        else if (this.type == SPICE_CHANNEL_WEBDAV)
+            return "webdav";
         return "unknown-" + this.type;
 
     },
commit 4023af088b8a6413ac2caaac37e75ab0d589888e
Author: Pavel Grunt <pgrunt at redhat.com>
Date:   Mon Sep 7 14:24:59 2015 +0200

    enums.js: Update for new channels

diff --git a/enums.js b/enums.js
index 6e94025..bca463a 100644
--- a/enums.js
+++ b/enums.js
@@ -200,6 +200,8 @@ var SPICE_CHANNEL_RECORD                = 6;
 var SPICE_CHANNEL_TUNNEL                = 7;
 var SPICE_CHANNEL_SMARTCARD             = 8;
 var SPICE_CHANNEL_USBREDIR              = 9;
+var SPICE_CHANNEL_PORT                  = 10;
+var SPICE_CHANNEL_WEBDAV                = 11;
 
 var SPICE_SURFACE_FLAGS_PRIMARY = (1 << 0);
 
commit 302b782e7742f571ab7e9de4df2cf964b2c74c8c
Author: Pavel Grunt <pgrunt at redhat.com>
Date:   Mon Sep 7 14:13:26 2015 +0200

    display.js: Remove unreachable return

diff --git a/display.js b/display.js
index 7938527..00f2903 100644
--- a/display.js
+++ b/display.js
@@ -171,8 +171,6 @@ SpiceDisplayConn.prototype.process_channel_message = function(msg)
                       has_alpha: this.surfaces[draw_copy.data.src_bitmap.surface_id].format == SPICE_SURFACE_FMT_32_xRGB ? false : true,
                       descriptor : draw_copy.data.src_bitmap.descriptor
                     });
-
-                return true;
             }
             else if (draw_copy.data.src_bitmap.descriptor.type == SPICE_IMAGE_TYPE_JPEG)
             {


More information about the Spice-commits mailing list