Commit Graph

15 Commits

Author SHA1 Message Date
Alexander Larsson
2feb07a7b8 demarshaller: Don't parse @zero members
These just write zeros at the right place in the network protocol
typically for old back-compat things. We don't want to read these
back in.
2012-03-20 15:25:46 +01:00
Alexander Larsson
a45758117b Fix build error due to member "SpiceMsgEmpty" same name as type 2012-03-20 15:25:45 +01:00
Alexander Larsson
13d9b32acc Make pointers 32bit in new protocol format 2012-03-20 15:25:45 +01:00
Alexander Larsson
8b5726ecfa marshaller: Correctly determine if switches are fixed size
Switches are fixed size only if all cases have the same size *and*
it has a default case or all the valid cases are listed.
2012-03-20 15:25:45 +01:00
Alexander Larsson
21c7a6d278 Fix handling of @ptr32 network size 2012-03-20 15:25:45 +01:00
Alexander Larsson
9e8883a1f8 Add support for @virtual markup in spice protocol
This means the member is not sent on the network at all.
Instead its initialized to the attribute argument when demarshalled.

This is useful for backwards compatibility support.
2012-03-20 15:25:44 +01:00
Alexander Larsson
7022f4d248 Make internal generated marshaller functions static 2012-03-20 15:25:44 +01:00
Alexander Larsson
bcc5cc0d91 Support extra prefix in code generators
This is require when we add a new spice.proto for the old (major 1)
protocol description.
2012-03-20 15:25:44 +01:00
Alexander Larsson
0349d2249d Support creating marshallers that are called indirectly
This is needed if we want to switch marshallers depending on what
major version the remote side has.
2012-03-20 15:25:44 +01:00
Alexander Larsson
eded86ec1e Add destructor for demarshalled messages
This is required because we don't want to free messages that just
refer to the unparsed message (like SpiceMsgData).

Also, in the future we might need it for more complex demarshalling.
2012-03-20 15:25:44 +01:00
Alexander Larsson
075087b180 Make generated marshallers build on win32 2012-03-20 15:25:44 +01:00
Alexander Larsson
53f8a1a7ba Support @as_ptr in demarshaller to avoid copying data unnecessary 2012-03-20 15:25:44 +01:00
Alexander Larsson
e83ff054d7 Add support for generating message and structure marshallers 2012-03-20 15:25:43 +01:00
Alexander Larsson
e9b33a194e Add python code to automake system 2012-03-20 15:25:43 +01:00
Alexander Larsson
522dc931e8 Initial import of spice protocol description and demarshall generator
The "spice.proto" file describes in detail the networking prototcol
that spice uses and spice_codegen.py can parse this and generate
demarshallers for such network messages.
2012-03-20 15:25:43 +01:00