Commit Graph

15 Commits

Author SHA1 Message Date
Marc-André Lureau
1a9f61dd17 Send name & uuid to capable clients
Add spice_server_set_name() and spice_server_set_uuid() that allows
the client to identify a Spice server (useful to associate settings
with a particular server)

The SPICE_MSG_MAIN_NAME and SPICE_MSG_MAIN_UUID messages are only sent
to capable clients, announcing SPICE_MAIN_CAP_NAME_AND_UUID.
2012-03-20 15:25:56 +01:00
Yonit Halperin
9cf6d39b36 server,proto: tell the clients to connect to the migration target before migraton starts
(1) send SPICE_MSG_MAIN_MIGRATE_BEGIN upon spice_server_migrate_connect
    (to all the clients that support it)
(2) wait for SPICE_MSGC_MAIN_MIGRATE_(CONNECTED|CONNECT_ERROR) from all the relevant clients,
    or a timeout, in order to complete client_migrate_info monitor command
(cherry picked from commit 5560c56ef05c74da5e0e0825dc1f134019593cad branch 0.8;
 Was modified to support the separation of main channel from reds, and multiple clients)

Conflicts:

	server/reds.c
2012-03-20 15:25:54 +01:00
Marc-André Lureau
85a49d512a sndworker: add AudioVolume/AudioMute messages
These messages allow the guest to send the audio device volume to the
client. It uses an arbitrary scale of 16bits, which works good enough
for now.

Save VolumeState in {Playback,Record}State, so that we can send the
current volume on channel connection.

Note about future improvements:
- add exact dB support
- add client to guest volume change

Updated since v2:
- bumped record and playback interface minor version to allow
  conditional compilation
Updated since v1:
- sync record volume on connection too
2012-03-20 15:25:53 +01:00
Christophe Fergeau
c15c5050af common: add extern "C" guards to headers
Since some spice C++ code is using code from common/, the C
functions need to be marked as such for the C++ compiler, otherwise
we'll get linkage issues.
2012-03-20 15:25:51 +01:00
Alexander Larsson
68d204f649 Don't send padding over the network with video data 2012-03-20 15:25:49 +01:00
Alexander Larsson
bdcfb2c83d 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.
2012-03-20 15:25:48 +01:00
Alexander Larsson
f6735d7d9f Fix various misspellings
letancy -> latency
compund -> compound
SpicedSubMessage -> SpiceSubMessage
modifaiers -> modifiers
massage -> message
outgoiong -> outgoing
AlphaBlnd -> AlphaBlend
remoth -> remote
modifires -> modifiers
secore -> secure
2012-03-20 15:25:48 +01:00
Alexander Larsson
24c2e3c85f Fix inclusion of common files, no need for common/ part 2012-03-20 15:25:48 +01:00
Alexander Larsson
c471990a9f Move in spice/draw.h from spice-protocol to common/ 2012-03-20 15:25:48 +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
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