[Spice-commits] python_modules/ptypes.py spice.proto
Hans de Goede
jwrdegoede at kemper.freedesktop.org
Thu Jan 12 05:45:03 PST 2012
python_modules/ptypes.py | 4 +++-
spice.proto | 5 ++++-
2 files changed, 7 insertions(+), 2 deletions(-)
New commits:
commit 5ea8687843dd3493c3c31f52ba23393c6c9d3fcf
Author: Hans de Goede <hdegoede at redhat.com>
Date: Thu Jan 12 13:24:52 2012 +0100
codegen: Fix enums.h generation
With the new usbredir code we have the new concept of the abstract /
generic spicevmc channel type (which just tunnels data from a qemu chardev),
and we've the usbredir channel, which is the only current user of this.
This was reflected in the protocols enum in spice-protocol.h by a manual
edit done by me, my bad. This patch teaches spice.proto about the relation
between the abstract spicevmc channel and the usbredir channel and
modifies codegen to deal with this.
Signed-off-by: Hans de Goede <hdegoede at redhat.com>
diff --git a/python_modules/ptypes.py b/python_modules/ptypes.py
index f12a2f3..4585949 100644
--- a/python_modules/ptypes.py
+++ b/python_modules/ptypes.py
@@ -947,6 +947,9 @@ class ChannelType(Type):
server_messages_byname = self.base.server_messages_byname.copy()
client_messages = self.base.client_messages[:]
client_messages_byname = self.base.client_messages_byname.copy()
+
+ # Set default member_name, FooChannel -> foo
+ self.member_name = self.name[:-7].lower()
else:
server_messages = []
server_messages_byname = {}
@@ -998,7 +1001,6 @@ class ProtocolMember:
def resolve(self, protocol):
self.channel_type = self.channel_type.resolve()
- assert(self.channel_type.member_name == None)
self.channel_type.member_name = self.name
return self
diff --git a/spice.proto b/spice.proto
index 266e03a..4d0731b 100644
--- a/spice.proto
+++ b/spice.proto
@@ -1112,13 +1112,16 @@ client:
Data data = 101;
};
-channel UsbredirChannel : BaseChannel {
+channel SpicevmcChannel : BaseChannel {
server:
Data data = 101;
client:
Data data = 101;
};
+channel UsbredirChannel : SpicevmcChannel {
+};
+
protocol Spice {
MainChannel main = 1;
DisplayChannel display;
More information about the Spice-commits
mailing list