Commit Graph

62 Commits

Author SHA1 Message Date
Alon Levy
4b8dd71917 spice.h: bump SPICE_SERVER_VERSION for release 0.11.0
(cherry picked from commit dd5c995c32)
2012-06-27 17:29:55 +03:00
Alon Levy
343b3b43b3 Revert "spice.h: bump SPICE_SERVER_VERSION for release 0.11.0"
This reverts commit dd5c995c32.
2012-06-27 17:12:03 +03:00
Alon Levy
dd5c995c32 spice.h: bump SPICE_SERVER_VERSION for release 0.11.0 2012-06-21 16:08:04 +03:00
Alon Levy
70c706e0b5 server/spice.h: s/Pleaes/Please/ 2012-06-05 15:44:36 +03:00
Alon Levy
5dd5b70223 server: export spice_server_is_server_mouse predicate
To be used by qemu query-spice / info spice commands.
2012-03-26 14:41:03 +02:00
Nahum Shalman
198ffb92d4 server: listen on a pre-opened file descriptor
Allow applications to pre-open a file descriptor and have spice listen
on it.

Thanks to Daniel Berrange for his comments
2012-03-12 12:33:20 +01:00
Marc-André Lureau
36d8da6283 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-05 18:19:07 +01:00
Yonit Halperin
5868c99da6 server: support IPV6 addresses in channel events sent to qemu
RHBZ #788444

CC: Gerd Hoffmann <kraxel@redhat.com>

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Yonit Halperin <yhalperi@redhat.com>
2012-02-12 13:15:18 +02:00
Hans de Goede
8817549795 Release 0.10.1 2012-01-23 15:58:13 +01:00
Daniel P. Berrange
bd07dde530 Allow auth to be skipped when attaching to pre-accepted clients
When an applications passes in a pre-accepted socket for a
client, they may well have already performed suitable authentication
out of band. They should thus have the option to request that any
spice authentication is skipped.

* server/reds.c, spice.h: Add flag for skipping auth

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-01-09 18:57:57 +01:00
Daniel P. Berrange
d55b68b6b4 Add APIs for injecting a client connection socket
Allow applications to pass a pre-accepted client socket file
descriptor in. The new APIs are spice_server_add_ssl_client
and spice_server_add_client

* server/reds.c: Implement new APIs
* server/spice.h: Define new APIs

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-01-09 18:57:57 +01:00
Yonit Halperin
cd402151de server/spice.h: semi-seamless migration interface, RHBZ #738266
semi-seamless migration details:

migration source side
---------------------
(1) spice_server_migrate_connect (*): tell client to link
    to the target side - send SPICE_MSG_MAIN_MIGRATE_BEGIN.
    This should be called upon client_migrate_info cmd.
    client_migrate_info is asynchronous.
(2) Complete spice_server_migrate_connect only when the client has been connected
    to the target - wait for SPICE_MSGC_MAIN_MIGRATE_(CONNECTED|CONNECT_ERROR) or a timeout.
(3) spice_server_migrate_end: tell client migration it can switch to the target - send
    SPICE_MSG_MAIN_MIGRATE_END.
(4) client cleans up all data related to the connection to the source and switches to the target.
    It sends SPICE_MSGC_MAIN_MIGRATE_END.

migration target side
---------------------
(1) the server identifies itself as a migraiton target since the client is linked with (connection_id != 0)
(2) server doesn't start the channels' logic (channel->link) till it receives SPICE_MSGC_MAIN_MIGRATE_END
    from the client.

*   After migration starts, the target qemu is blocked and cannot accept new spice client
    connections. Thus, we trigger the connection to the target upon client_migrate_info
    command.
(cherry picked from commit 6e56bea67c branch 0.8)

Conflicts:

	server/spice.h
2011-11-02 11:20:08 +02:00
Alon Levy
0410cccde3 server: add public spice_server_get_num_clients 2011-08-23 18:29:21 +03:00
Hans de Goede
608713b9ac Bump version in server/spice,h to 0.9.1
It is a bit early to bump, since a 0.9.1 release is not happening yet,
but this allows me to test if the vdagent SpiceCharInterface state callback
fixes are present or not in qemu code, and thus disabling the ugly vdagent
specific workaround from spice-qemu-char.c when compiling against a new
enough spice-server.
2011-07-26 14:16:07 +02:00
Alon Levy
3be08d68c0 server/spice.h: bump QXL_MINOR because of QXLWorker and QXLInterface changes 2011-07-20 16:00:19 +03:00
Alon Levy
2a4d97fb78 server: add QXLWorker.flush_surfaces_async for S3/S4 support
This does the following, all to remove any referenced memory on the pci bars:
    flush_all_qxl_commands(worker);
    flush_all_surfaces(worker);
    red_wait_outgoing_item((RedChannel *)worker->display_channel);
    red_wait_outgoing_item((RedChannel *)worker->cursor_channel);

The added api is specifically async, i.e. it calls async_complete
when done.
2011-07-20 16:00:19 +03:00
Alon Levy
b26f0532c1 server: add QXLInterface::update_area_complete callback
when update_area_async is called update_area_complete will be called with
the surfaces dirty rectangle list.
2011-07-20 16:00:19 +03:00
Alon Levy
096f49afbf server: add async io support
The new _ASYNC io's in qxl_dev listed at the end get six new api
functions, and an additional callback function "async_complete". When
the async version of a specific io is used, completion is notified by
calling async_complete, and no READY message is written or expected by
the dispatcher.

update_area has been changed to push QXLRects to the worker thread, where
the conversion to SpiceRect takes place.

A cookie has been added to each async call to QXLWorker, and is passed back via
async_complete.

Added api:

QXLWorker:
    update_area_async
    add_memslot_async
    destroy_surfaces_async
    destroy_primary_surface_async
    create_primary_surface_async
    destroy_surface_wait_async

QXLInterface:
    async_complete
2011-07-20 16:00:19 +03:00
Alon Levy
c04d60631e server: api: add spice_qxl_* calls based on QXLWorker contents
For each callback in QXLWorker, for example QXLWorker::update_area, add
a direct call named spice_qxl_update_area.

This will (a) remove the pointless indirection and (b) make shared
library versioning alot easier as we'll get new linker symbols which
we can tag with the version they appeared in the shared library.
2011-07-20 16:00:17 +03:00
Marc-André Lureau
d1758b3288 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
2011-06-22 12:12:26 +02:00
Marc-André Lureau
148dabdf62 server: bump SPICE_SERVER_VERSION to 0.9.0
SASL functions will be released with 0.9.0
2011-05-08 19:05:41 +02:00
Hans de Goede
bcf9a60aa9 server: Make copy paste support configurable
Also bump SPICE_SERVER_VERSION to 0x000801 as 0.8.1 will be the
first version with the new API for this, and we need to be able to
detect the presence of this API in qemu.
2011-03-24 17:30:03 +01:00
Marc-André Lureau
8f9cbd19db server: add SASL support
We introduce 2 public functions to integrate with the library user.

spice_server_set_sasl() - turn on SASL
spice_server_set_sasl_appname() - specify the name of the app (It is
used for where to find the default configuration file)

The patch for QEMU is on its way.

https://bugs.freedesktop.org/show_bug.cgi?id=34795
2011-02-28 16:36:35 +01:00
Hans de Goede
c86fa96924 server: Update SPICE_SERVER_VERSION 2010-12-17 14:15:47 +01:00
Hans de Goede
a96cea646a server: Update SPICE_SERVER_VERSION 2010-12-17 13:52:17 +01:00
Gerd Hoffmann
7bbc2ba090 move chardevs out of experimental
While we are at it:  There is no reason for chardev
support to stay in the experimental area, so move it out.
qemu should not need the "spice-experimental.h" file.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2010-12-16 09:16:10 +01:00
Gerd Hoffmann
6acb817071 move switch-host migration out of experimental
seamless stays in the experimental area.
comments updates too.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2010-12-16 09:16:10 +01:00
Hans de Goede
023d9c0d91 Release 0.6.3 2010-10-18 14:52:43 +02:00
Hans de Goede
bbc079955a Bump version to 0.6.2 2010-10-18 11:22:19 +02:00
Gerd Hoffmann
97f33fa86a server: add channel notifications.
This patch adds a channel event callback to the spice core interface.
This new callback will be called for three events:

  (1) A new connection has been established.
  (2) The channel is ready (i.e. authentication is done,
      link message verification passed all tests, channel
      is ready to use).
  (3) Channel was disconnected.

Qemu will use this to send notifications to the management app.
2010-10-12 11:11:26 +02:00
Alexander Larsson
0c6d654c2f Add API to turn on backwards compatibility mode
When upgrading a cluster of machines you typically do this by
upgrading a set of machines at a time, making the new machines run
the new software version, but in a fashion compatible with the old
versions (in terms of e.g. migration). Then when all machines are
upgrades, any new features in the new version can be enabled.

This API allows qemu to limit the set of features that spice uses to
those compatible with an older version, in order to do an upgrade like
this. Right now it doesn't really do much, since we don't keep compat
with 0.4.0 atm (although that may be added later).

There is no guarantee that any future version of spice support
being compatible with any previous version. However, we will always
support compatibility with the previous major version so that clusters
can be upgraded step by step.
2010-09-02 10:22:41 +02:00
Gerd Hoffmann
b718f59d46 Bump versions.
Update #define in server/spice.h in preparation for the 0.6.0 release.
We also got some new functions, thus we have to increate the shared
lib minor number for spice-server.
2010-08-30 16:12:25 +02:00
Gerd Hoffmann
9681ebb671 Add config functions.
A bunch of configuration functions where never ported forward from
rhel-6 to upstream.  Add them so we can add qemu config options for
these settings.
2010-08-30 16:12:25 +02:00
Gerd Hoffmann
cc5b59e0f3 add SPICE_SERVER_VERSION
Allow to ifdef features which depend on a certain libspice-server release.
2010-07-14 19:01:41 +02:00
Yonit Halperin
c90183da94 server: enabling/disabling jpeg and zlib-over-glz via spice command line args 2010-07-14 12:16:23 +03:00
Alexander Larsson
4f54596e01 server: Remove unnecessary pci id/rev checks
There is no need to check the pci ids or revisions. Thats a contract
between qemu and the driver, and spice need not care, as long as
we get the right data from qemu.
2010-07-08 15:18:43 +02:00
Gerd Hoffmann
fe4f90210f remove QXLInterface->has_command()
Not used any more, zap it before rolling up a release tarball.
2010-07-08 11:56:30 +02:00
Gerd Hoffmann
58c23b6686 qxl abi: parse QXLRect. 2010-06-29 12:30:20 +02:00
Gerd Hoffmann
9204a5903a add spice-experimental.h
Supposed to be used for work-in-progress bits,
where interfaces are not finalized yet.

Moved over vdi port interface, tunnel interface
and spice client migration functions.
2010-05-19 11:22:08 +02:00
Gerd Hoffmann
981abd3fee zap vd_interface.h
move over content to spice.h
2010-05-19 11:22:07 +02:00
Gerd Hoffmann
cb5f500aa6 migration: new api
Add new API for migration, based on what RHEL-6 has.
2010-05-19 11:22:07 +02:00
Gerd Hoffmann
3cffcf98a1 kill spice_server_set_mouse_absolute
Not needed.  Just register/unregister the tablet interface instead.
2010-05-19 11:22:07 +02:00
Gerd Hoffmann
d3735feea6 QXL: redesign. 2010-05-19 11:22:06 +02:00
Gerd Hoffmann
4461c74918 KeyboardInterface: redesign.
This is the direction I wanna take with all interfaces:  Clearly
separate interface (aka version information and function pointers)
and state information.  SpiceKbdInterface defines the interface,
SpiceKbdInstance maintains per-instance state information.  Keyboard
hasn't much beside a pointer to SpiceKbdInterface, for other
interfaces this very likely will be different.
2010-05-19 11:22:06 +02:00
Gerd Hoffmann
10e6d8b53c s/CoreInterface/SpiceCoreInterface/ 2010-05-19 11:22:06 +02:00
Gerd Hoffmann
30c740201d VDInterface: redesign.
VDInterface has been renamed to SpiceBaseInterface. Dropped base_version
element, shlib versioning should be used instead.  Dropped id element,
it is passed to spice_server_add_interface() instead.  Now
SpiceBaseInterface has static information only, multiple interface
instances can share it.

Added SpiceBaseInstance struct for maintaining per-instance state
information.  Adapted spice_server_{add,remove}_interface() functions
to the new world.
2010-05-19 11:22:06 +02:00
Gerd Hoffmann
43caec519e channel security cleanup
- drop spice_channel_name_t enum, use spice-protocol defines instead.
- switch spice_server_set_channel_security() channel parameter from
  enum to string.
- drop spice_server_set_default_channel_security(), use
  spice_server_set_channel_security with channel == NULL instead.
2010-05-19 11:22:05 +02:00
Gerd Hoffmann
edc1af5f67 zap spice_parse_args + spice_usage_str
First step to throw out the old interface.
2010-05-19 11:22:05 +02:00
Alexander Larsson
c97116aeb9 Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
Gerd Hoffmann
b5f25486ef new libspice api: spice_server_add_get_{sock, peer}_info() 2010-03-18 10:26:01 +01:00