summaryrefslogtreecommitdiffstats
path: root/spice1.proto
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2010-07-19 14:10:16 +0200
committerAlexander Larsson <alexl@redhat.com>2010-07-19 16:28:22 +0200
commit12b08f2c3e07cea617255bedfd97b2eedf0f180f (patch)
tree9a35ebbc31d6b61e94d3fbcd72feb70f0e9b9858 /spice1.proto
parent2962bdaea056d7069303badc3d73ed9530fdbb15 (diff)
downloadspice-12b08f2c3e07cea617255bedfd97b2eedf0f180f.tar.gz
spice-12b08f2c3e07cea617255bedfd97b2eedf0f180f.tar.xz
spice-12b08f2c3e07cea617255bedfd97b2eedf0f180f.zip
codegen: Various cleanups
Remove all uses of @end in the marshaller, instead just using the C struct array-at-end-of-struct. To make this work we also remove all use of @end for switches (making them C unions). We drop the zero member of the notify message so that we can avoid this use of @end for a primitive in the marshaller (plus its useless to send over the wire). We change the offsets and stuff in the migration messages to real pointers.
Diffstat (limited to 'spice1.proto')
-rw-r--r--spice1.proto16
1 files changed, 8 insertions, 8 deletions
diff --git a/spice1.proto b/spice1.proto
index b4012bd4..e38a2145 100644
--- a/spice1.proto
+++ b/spice1.proto
@@ -166,13 +166,13 @@ channel MainChannel : BaseChannel {
message {
uint16 port;
uint16 sport;
- uint32 host_offset;
+ uint32 host_offset @zero;
uint32 host_size;
pubkey_type pub_key_type @minor(2);
- uint32 pub_key_offset @minor(2);
+ uint32 pub_key_offset @minor(2) @zero;
uint32 pub_key_size @minor(2);
- uint8 host_data[host_size] @end @ctype(uint8_t) @zero_terminated @nomarshal;
- uint8 pub_key_data[pub_key_size] @minor(2) @end @ctype(uint8_t) @zero_terminated @nomarshal;
+ uint8 host_data[host_size] @as_ptr @zero_terminated;
+ uint8 pub_key_data[pub_key_size] @minor(2) @as_ptr @zero_terminated;
} @ctype(SpiceMsgMainMigrationBegin) migrate_begin = 101;
Empty migrate_cancel;
@@ -217,12 +217,12 @@ channel MainChannel : BaseChannel {
message {
uint16 port;
uint16 sport;
- uint32 host_offset;
+ uint32 host_offset @zero;
uint32 host_size;
- uint32 cert_subject_offset;
+ uint32 cert_subject_offset @zero;
uint32 cert_subject_size;
- uint8 host_data[host_size] @end @ctype(uint8_t) @zero_terminated;
- uint8 cert_subject_data[cert_subject_size] @end @ctype(uint8_t) @zero_terminated;
+ uint8 host_data[host_size] @as_ptr @zero_terminated;
+ uint8 cert_subject_data[cert_subject_size] @as_ptr @zero_terminated;
} @ctype(SpiceMsgMainMigrationSwitchHost) migrate_switch_host;
client: