summaryrefslogtreecommitdiff
path: root/spicemsg.js
diff options
context:
space:
mode:
authorOliver Gutierrez <ogutierrez@redhat.com>2016-10-03 14:09:58 +0200
committerPavel Grunt <pgrunt@redhat.com>2016-10-10 13:52:41 +0200
commitfc0a664e7e80fe6dcbbad96f88277bef5a390c06 (patch)
tree70881ce538e553a90a4669501e68ce5bfb1a4d61 /spicemsg.js
parent9468cf2a9b7c6a5f4a91429bdd1d1ffbf4b99417 (diff)
Basic SPICE port implementation
Diffstat (limited to 'spicemsg.js')
-rw-r--r--spicemsg.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/spicemsg.js b/spicemsg.js
index 0321cc7..3619996 100644
--- a/spicemsg.js
+++ b/spicemsg.js
@@ -1278,3 +1278,21 @@ SpiceMsgDisplayInvalList.prototype =
}
},
}
+
+function SpiceMsgPortInit(a, at)
+{
+ this.from_buffer(a,at);
+};
+
+SpiceMsgPortInit.prototype =
+{
+ from_buffer: function (a, at)
+ {
+ at = at || 0;
+ var dv = new SpiceDataView(a);
+ var namesize = dv.getUint32(at, true); at += 4;
+ var offset = dv.getUint32(at, true); at += 4;
+ this.opened = dv.getUint8(at, true); at += 1;
+ this.name = a.slice(offset, offset + namesize - 1);
+ }
+}