Commit Graph

148 Commits

Author SHA1 Message Date
Alexander Larsson
e3fadaef86 Fix 32bit failure in demarshaller
Due to a typo we always read offsets as pointers, never as SPICE_ADDRESS.
2012-03-20 15:25:46 +01:00
Alexander Larsson
f90b89d521 Update for the SpicePath.segments type change 2012-03-20 15:25:46 +01:00
Alexander Larsson
bef8a0cf19 Simplify SpiceLineAttr by removing unsed stuff
Also in new protocol don't send style data if not needed.
2012-03-20 15:25:46 +01:00
Alexander Larsson
fcb5eb4629 Automatically marshall SpiceClipRects 2012-03-20 15:25:46 +01:00
Alexander Larsson
53a7560481 Automatically marshall SpicePath 2012-03-20 15:25:46 +01:00
Alexander Larsson
930458ea50 Support @marshall to automatically marshall pointers 2012-03-20 15:25:46 +01:00
Alexander Larsson
e6eb19e752 Store SpicePath segment count rather than size
Internally and in the network protocol (for the new version) we
now store the actual number of segments rather than the size of the
full segments array in bytes. This change consists of multiple changes
to handle this:

* Make the qxl parser calculate num_segments
* Make the canvas stroke code handle the new SpicePath layout.
* Fix up is_equal_path in red_worker.c for the new layout
* replace multiple calls to spice_marshall_PathSegment with a single
  spice_marshall_Path call
* Make the byte_size() array size handling do the conversion from
  network size to number of elements when marshalling/demarshalling.
* Update the current spice protocol to send the segment count rather than
  the size
* Update the old spice protocol to use the new byte_size functionallity
  to calculate the size sent and the number of elements recieved
2012-03-20 15:25:46 +01:00
Alexander Larsson
93405abac7 Add spice_marshaller_set_uint32
With this function you can update an added uint32 after it being added.
To make this possible all the spice_marshaller_add_add_foo functions
now return a pointer that can be used as a reference when later
setting a value.
2012-03-20 15:25:46 +01:00
Alexander Larsson
eaeb65c53e Update client and protocol to support the new SpiceClipRects 2012-03-20 15:25:46 +01:00
Alexander Larsson
18a11d6be0 demarshaller: Support @c_ptr attributes for pointers
A @c_ptr pointer is stored in memory as a real pointer rather than a
SPICE_ADDRESS. This is a temporary thing that will be removed again
when all SPICE_ADDRESSes have been converted to real pointer.
2012-03-20 15:25:46 +01:00
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
Gerd Hoffmann
51c71e6883 qxl-abi: handle clip rect and path references.
red_parse_qxl.c starts to follow QXLPHYSICAL references and build up
data structures.  Can zap a bunch of get_virt calls in red_worker.c,
followed by cleanups.

(de-) marshaller needs updates to deal with that.  Also I suspect with
the get_virt() calls being gone we can offload more work to generated
marshaller code.

client doesn't build.
2012-03-20 15:25:46 +01:00
Gerd Hoffmann
908c841563 qxl abi: parse QXLCopy + QXLBlend.
Also adapt to tyops fix (s/rop_decriptor/rop_descriptor/).
2012-03-20 15:25:46 +01:00
Gerd Hoffmann
6ba331f45e qxl abi: parse QXLOpaque.
Also adapt to tyops fix (s/rop_decriptor/rop_descriptor/).
2012-03-20 15:25:45 +01:00
Gerd Hoffmann
bc1c2837f3 qxl abi: parse QXLFill.
Also adapt to tyops fix (s/rop_decriptor/rop_descriptor/).
2012-03-20 15:25:45 +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
49aeb85dc1 spice.proto: surface_create.format is of type surface_fmt 2012-03-20 15:25:45 +01:00
Alexander Larsson
fb5463fe9b Use smaller size for enums and flags on the network
This makes the protocol more compact. This was mainly done for the commonly
used types. Some seldom used ones are still 32bit for future compatibility.
2012-03-20 15:25:45 +01:00
Alexander Larsson
90193bf160 Remove support for clip by path
This is not supported currently anyway and was not generated before.
2012-03-20 15:25:45 +01:00
Alexander Larsson
2e8aecc2a5 spice.proto: No need for @ptr32 as that is now the default 2012-03-20 15:25:45 +01:00
Alexander Larsson
ee597577e1 spice.proto: Don't use @fixedsize for Brush
There is no reason to send the maximum size on the network, that is just
a waste of space most of the time.
2012-03-20 15:25:45 +01:00
Alexander Larsson
5b7fb4db45 Don't send zero data item for clips with no data 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
ce0f0032f4 Remove minor markup in unstable protocol as we're resetting minor to 0 2012-03-20 15:25:45 +01:00
Gerd Hoffmann
d217864737 fix use-after-free in spice_marshaller_reset 2012-03-20 15:25:45 +01:00
Alexander Larsson
e9d10ef1d5 Add spice1.proto describing the 0.4 version of the network protocolx 2012-03-20 15:25:44 +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
Yonit Halperin
9c906e0c2f Lossy compression of RGBA images (on WAN connection)
The RGB channels are compressed using JPEG.
The alpha channel is compressed using LZ.
2012-03-20 15:25:44 +01:00
Yonit Halperin
e48d14df78 applying zlib compression over glz on WAN connection 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
08d94f60b1 Make sound data @as_ptr to avoid copying data 2012-03-20 15:25:44 +01:00
Alexander Larsson
ebd34a4291 Make ping data @as_ptr to avoid copying data 2012-03-20 15:25:44 +01:00
Alexander Larsson
101ceba717 Make cursor data @as_ptr to avoid copying data 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
cc71d4989b Make pointer types in messages be 64bit in memory
Right now we always assume pointers are stored as SPICE_ADDRESS,
i.e. 64bit, independent on the size sent on the network.
This is required for 64bit architectures of course, but slightly overkill
on 32bit architectures, so needs fixing when all SPICE_ADDRESS elements
can be made internal.
2012-03-20 15:25:44 +01:00
Alexander Larsson
6ebdf56797 Don't pack the message structures 2012-03-20 15:25:44 +01:00
Alexander Larsson
c09f1ef5be Make all message structs internal to spice
We move all message structs from spice-protocol to spice as
we want to be able to change these as needed internally. The
on-network format is no longer defined by these structures anyway,
but rather by the spice protocol description.
2012-03-20 15:25:43 +01:00
Alexander Larsson
9a9f1b8081 Allow multiple --include args 2012-03-20 15:25:43 +01:00
Alexander Larsson
212bf0ddee Make tunnel_service_add members be of cstring array size 2012-03-20 15:25:43 +01:00
Alexander Larsson
35c482dad2 Use @ptr32 for 32bit offsets in spice.proto 2012-03-20 15:25:43 +01:00
Alexander Larsson
8065944cdb Add @nomarshal in a few places where we're marshalling manually 2012-03-20 15:25:43 +01:00
Alexander Larsson
ac49057d02 spice.proto: add @outvar markup
With this we can reference pointer member with no naming conflicts
2012-03-20 15:25:43 +01:00
Alexander Larsson
e83ff054d7 Add support for generating message and structure marshallers 2012-03-20 15:25:43 +01:00
Alexander Larsson
d6a4cad947 Add SpiceMarshaller for easy marshalling 2012-03-20 15:25:43 +01:00