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

Alon Levy alon at kemper.freedesktop.org
Mon Jul 16 00:10:33 PDT 2012


 common/Makefile.am |    5 ++++-
 common/messages.h  |   16 ++++++++++++++++
 spice-protocol     |    2 +-
 spice.proto        |   16 ++++++++++++++++
 4 files changed, 37 insertions(+), 2 deletions(-)

New commits:
commit 7eba850ad562f3c5a29621af09d93535a76ff99c
Author: Alon Levy <alevy at redhat.com>
Date:   Thu Jun 7 15:04:08 2012 +0300

    support multiple monitors in single display channel
    
    See spice-protocol commit for details:
     da908f89b581fd4725da997fdaea209f8e6548f6
     support multiple monitors on a single display channel

diff --git a/common/messages.h b/common/messages.h
index e3677d1..2b6d68a 100644
--- a/common/messages.h
+++ b/common/messages.h
@@ -558,6 +558,22 @@ typedef struct SpiceMsgcSmartcard {
 } SpiceMsgcSmartcard;
 #endif
 
+typedef struct SpiceMsgDisplayHead {
+    uint32_t id;
+    uint32_t surface_id;
+    uint32_t width;
+    uint32_t height;
+    uint32_t x;
+    uint32_t y;
+    uint32_t flags;
+} SpiceHead;
+
+typedef struct SpiceMsgDisplayMonitorsConfig {
+    uint16_t count;
+    uint16_t max_allowed;
+    SpiceHead heads[0];
+} SpiceMsgDisplayMonitorsConfig;
+
 SPICE_END_DECLS
 
 #endif /* _H_SPICE_PROTOCOL */
diff --git a/spice-protocol b/spice-protocol
index 86eb1a3..da908f8 160000
--- a/spice-protocol
+++ b/spice-protocol
@@ -1 +1 @@
-Subproject commit 86eb1a334ebef63a43df9a267cfa42e4128966ae
+Subproject commit da908f89b581fd4725da997fdaea209f8e6548f6
diff --git a/spice.proto b/spice.proto
index a86bfa7..1fdead9 100644
--- a/spice.proto
+++ b/spice.proto
@@ -596,6 +596,16 @@ struct StreamDataHeader {
 	uint32 multi_media_time;
 };
 
+struct Head {
+    uint32 id;
+    uint32 surface_id;
+    uint32 width;
+    uint32 height;
+    uint32 x;
+    uint32 y;
+    uint32 flags;
+};
+
 channel DisplayChannel : BaseChannel {
  server:
     message {
@@ -798,6 +808,12 @@ channel DisplayChannel : BaseChannel {
 	uint8 data[data_size] @end @nomarshal;
     } stream_data_sized;
 
+    message {
+	uint16 count;
+    uint16 max_allowed;
+	Head heads[count] @end;
+    } monitors_config;
+
  client:
     message {
 	uint8 pixmap_cache_id;
commit b49c4794ee23b0e31cde1ba8c7a34a1f27f2f98f
Author: Alon Levy <alevy at redhat.com>
Date:   Thu Jun 14 12:15:44 2012 +0300

    spice-protocol/spice/enums.h: rebuild from spice.proto
    
    This file was hand generated until now, resulting in the wierd situation where
    it is different for spice-gtk and spice-server even though they both use the
    same spice-common and spice-protocol (or at least close) versions.
    
    This patch generates the enums.h files from spice-common. While that file is
    actually in the spice-protocol submodule, it cannot be generated from
    spice-protocol since it lacks access to spice.proto and spice_codegen.py. So in
    affect whenvever it will differ the spice-protocol module will become dirty and
    hence hopefully commited with the new enums.h.
    
    enums.h is generated from spice.proto is a superset of that generated from spice1.proto.

diff --git a/common/Makefile.am b/common/Makefile.am
index 08c4b83..3210fc8 100644
--- a/common/Makefile.am
+++ b/common/Makefile.am
@@ -14,7 +14,7 @@ SERVER_MARSHALLERS =					\
 	$(srcdir)/generated_server_marshallers.h	\
 	$(NULL)
 
-BUILT_SOURCES = $(CLIENT_MARSHALLERS) $(SERVER_MARSHALLERS)
+BUILT_SOURCES = $(CLIENT_MARSHALLERS) $(SERVER_MARSHALLERS) $(top_srcdir)/spice-protocol/spice/enums.h
 
 noinst_LTLIBRARIES = libspice-common.la libspice-common-server.la libspice-common-client.la
 libspice_common_la_SOURCES =		\
@@ -122,6 +122,9 @@ generated_server_marshallers.c: $(top_srcdir)/spice.proto $(MARSHALLERS_DEPS)
 generated_server_marshallers.h: $(top_srcdir)/spice.proto $(MARSHALLERS_DEPS)
 	$(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-marshallers $(STRUCTS) --server --include messages.h -H $< $@ >/dev/null
 
+$(top_srcdir)/spice-protocol/spice/enums.h: $(top_srcdir)/spice.proto $(MARSHALLERS_DEPS)
+	$(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-enums $< $@ >/dev/null
+
 EXTRA_DIST =				\
 	$(CLIENT_MARSHALLERS)		\
 	$(SERVER_MARSHALLERS)		\


More information about the Spice-commits mailing list