[Spice-commits] 2 commits - common/client_marshallers.h common/messages.h spice.proto spice-protocol

Marc-André Lureau elmarco at kemper.freedesktop.org
Wed Dec 5 02:24:17 PST 2012


 common/client_marshallers.h |    1 +
 common/messages.h           |   14 ++++++++++++++
 spice-protocol              |    2 +-
 spice.proto                 |   17 +++++++++++++++++
 4 files changed, 33 insertions(+), 1 deletion(-)

New commits:
commit b46d36bc1c01ca17a64262e157022fd21ad1e795
Author: Marc-André Lureau <marcandre.lureau at gmail.com>
Date:   Fri Nov 30 01:25:44 2012 +0100

    Add a "port" channel
    
    A Spice port channel carry arbitrary data between the Spice client and
    the Spice server. It may be used to provide additional services on top
    of a Spice connection. For example, a channel can be associated with
    the qemu monitor for the client to interact with it, just like any
    qemu chardev. Or it may be used with various protocols, such as the
    Spice Controller.
    
    A port kind is identified simply by its fqdn, such as org.qemu.monitor,
    org.spice.spicy.test or org.ovirt.controller...
    
    The channel is based on Spicevmc which simply tunnels data between
    client and server. A few messages have been added:
    
    SPICE_MSG_PORT_INIT: Describes the port state and fqdn name, should be
    sent only once when the client connects.
    
    SPICE_MSG_PORT_EVENT: Server port event. SPICE_PORT_EVENT_OPENED and
    SPICE_PORT_EVENT_CLOSED are typical values when the chardev is opened
    or closed.
    
    SPICE_MSGC_PORT_EVENT: Client port event.

diff --git a/common/client_marshallers.h b/common/client_marshallers.h
index 1da7ff9..9a2385d 100644
--- a/common/client_marshallers.h
+++ b/common/client_marshallers.h
@@ -70,6 +70,7 @@ typedef struct {
     void (*msgc_smartcard_data)(SpiceMarshaller *m, SpiceMsgcSmartcard *msg, SpiceMarshaller **reader_name_out);
     void (*msgc_smartcard_reader_add)(SpiceMarshaller *m, VSCMsgReaderAdd *msg);
 #endif
+    void (*msgc_port_event)(SpiceMarshaller *m, SpiceMsgcPortEvent *msg);
 } SpiceMessageMarshallers;
 
 SpiceMessageMarshallers *spice_message_marshallers_get(void);
diff --git a/common/messages.h b/common/messages.h
index 95549c8..b145cfc 100644
--- a/common/messages.h
+++ b/common/messages.h
@@ -594,6 +594,20 @@ typedef struct SpiceMsgDisplayMonitorsConfig {
     SpiceHead heads[0];
 } SpiceMsgDisplayMonitorsConfig;
 
+typedef struct SpiceMsgPortInit {
+    uint32_t name_size;
+    uint8_t *name;
+    uint8_t opened;
+} SpiceMsgPortInit;
+
+typedef struct SpiceMsgPortEvent {
+    uint8_t event;
+} SpiceMsgPortEvent;
+
+typedef struct SpiceMsgcPortEvent {
+    uint8_t event;
+} SpiceMsgcPortEvent;
+
 SPICE_END_DECLS
 
 #endif /* _H_SPICE_PROTOCOL */
diff --git a/spice.proto b/spice.proto
index 315ab91..655352a 100644
--- a/spice.proto
+++ b/spice.proto
@@ -1309,6 +1309,22 @@ client:
 channel UsbredirChannel : SpicevmcChannel {
 };
 
+channel PortChannel : SpicevmcChannel {
+ client:
+    message {
+	uint8 event;
+    } event = 201;
+ server:
+    message {
+	uint32 name_size;
+	uint8 *name[name_size] @zero_terminated @marshall @nonnull;
+	uint8 opened;
+    } init = 201;
+    message {
+	uint8 event;
+    } event;
+};
+
 protocol Spice {
     MainChannel main = 1;
     DisplayChannel display;
@@ -1319,4 +1335,5 @@ protocol Spice {
     TunnelChannel tunnel;
     SmartcardChannel smartcard;
     UsbredirChannel usbredir;
+    PortChannel port;
 };
commit 5f2e99c3daf8e7ebcd3b1de6ca8d9ec30e11b59e
Author: Marc-André Lureau <marcandre.lureau at gmail.com>
Date:   Wed Dec 5 11:23:09 2012 +0100

    update spice-protocol

diff --git a/spice-protocol b/spice-protocol
index 5b6127b..52ac605 160000
--- a/spice-protocol
+++ b/spice-protocol
@@ -1 +1 @@
-Subproject commit 5b6127b20750c377f000c73f8c8d4ea3f07e7cbf
+Subproject commit 52ac6053a714554fb61d5166478e351feddd1f8c


More information about the Spice-commits mailing list