Compare commits

...

502 Commits

Author SHA1 Message Date
jiangcuo
eeed7fccd9 Add h264 av1 h265 vaapi amf nvenc qsv 2025-09-25 06:34:54 +00:00
Michael Tokarev
7ad8fb69bd d/watch: fix .xz being part of the version by using @vars@ 2025-09-10 14:15:26 +03:00
Michael Tokarev
dcfba518f3 update changelog; upload version 0.14.5-1 to unstable 2025-09-09 22:28:15 +03:00
Michael Tokarev
034bad2f96 Update upstream source from tag 'upstream/0.14.5'
Update to upstream version '0.14.5'
with Debian dir 9744cc88de
2025-09-09 22:26:39 +03:00
Michael Tokarev
7728c50095 New upstream version 0.14.5 2025-09-09 22:26:39 +03:00
Michael Tokarev
c8dd5eb329 debian/upstream/signing-key.asc: update 2025-09-09 22:25:05 +03:00
Marc-André Lureau
c5c2f26422 Release v0.14.5
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2025-04-30 11:28:57 +04:00
correctmost
3a9e3668f1 build-sys: Fix build error when sanitizers are enabled
Re-running 'meson setup' with sanitizer flags caused the following
error: 'ERROR: Unknown options: "b_lundef, b_sanitize"'

This is a workaround for an upstream Meson issue:
https://github.com/mesonbuild/meson/issues/13651

Signed-off-by: correctmost <126085-correctmost@users.noreply.gitlab.freedesktop.org>
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
2025-04-02 06:39:27 +01:00
Qiang Yu
2117405f95 Add enum for gl scanout2 message
This message is a replacement for the original gl scanout
message which does not support multi plane and modifier.

Signed-off-by: Qiang Yu <yuq825@gmail.com>
2025-03-23 20:54:09 +08:00
Akihiko Odaki
c92b54a55f Define SPICE_ENDIAN for MSVC Arm64
It is necessary to build for Windows Arm64.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
2025-03-01 01:05:37 +09:00
Victor Toso
4f31c18536 build-sys: post-release version bump 0.14.5
Signed-off-by: Victor Toso <victortoso@redhat.com>
2022-02-10 12:13:32 +01:00
Victor Toso
6f453a775d Release 0.14.4
Signed-off-by: Victor Toso <victortoso@redhat.com>
2022-02-07 13:14:43 +00:00
Frediano Ziglio
7aaa521361 ci: Remove invalid option from rpmlint
The "-o" option is not accepted anymore by rpmlint on newer Fedora.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
2022-02-07 12:44:14 +00:00
Stefan Weil
969baca93e stream-device: Fix some typos in comments (found by codespell)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-04-09 19:03:59 +02:00
Frediano Ziglio
06aa9375ad Add some notes on how to prepare a release
That's what I did for last release.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Acked-by: Jakub Janků <jjanku@redhat.com>
2021-01-19 13:23:49 +00:00
Frediano Ziglio
ce0c4211e6 protocol: Fix enumeration deprecation for Visual Studio
Deprecation on enumeration items is not supported by Microsoft
compiler.
Define and use SPICE_GNUC_DEPRECATED_ENUMERATOR.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Acked-by: Uri Lublin <uril@redhat.com>
2020-11-04 12:14:48 +00:00
Frediano Ziglio
3c4309a517 build-sys: post-release version bump to 0.14.4
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
2020-10-01 09:49:11 +01:00
Frediano Ziglio
90b57dace4 Release 0.14.3
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2020-10-01 09:20:21 +01:00
Marc-André Lureau
6918bacfe5 vdagent: add a MonitorsMM field to VDAgentMonitorsConfig
Allow to update the physcial dimensions of the monitors,
only sent if the flag PHYSICAL_SIZE is present.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2020-09-14 09:41:01 +01:00
SimonP
cbe7b2c285 protocol: Add support for side mouse buttons
Side mouse buttons currently do not exist in the protocol, causing them
to be inexplicably ignored by VMs in virt-manager and such. This lays
the groundwork for fixing that issue.

Acked-by: Frediano Ziglio <fziglio@redhat.com>
2020-08-19 15:11:38 +01:00
Frediano Ziglio
11af68a513 build: Do not use mingw_ninja_install macro in spec file
Some distribution like RHEL 8 does not define this macro.
Use mingw_ninja instead.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Acked-by: Uri Lublin <uril@redhat.com>
2020-08-10 09:52:07 +01:00
Jakub Janků
7689b6922b vdagent: add VD_AGENT_CLIPBOARD_FILE_LIST
Signed-off-by: Jakub Janků <jjanku@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2020-07-08 15:47:41 +01:00
Jakub Janků
55ff87d93c build-sys: post-release version bump to 0.14.3
Signed-off-by: Jakub Janků <jjanku@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2020-07-08 13:29:33 +01:00
Frediano Ziglio
959717a3a2 Release 0.14.2
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2020-05-15 15:17:17 +01:00
Frediano Ziglio
dcf21aafb9 vd_agent: Add some documentation
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2020-05-15 14:32:40 +01:00
Victor Toso
5ab1474cb5 Formally deprecated celt 0.5.1 usage
Quoting git log from spice-common 72b0d60 "build: Disable celt 0.5.1
by default" in 2018-06-05 [0]

  |  build: Disable celt 0.5.1 by default
  |
  |  This version of the CELT codec has long been obsolete, and
  |  Opus support has been added nearly 5 years ago. It's time
  |  we move on and try to stop using Celt ;)
  |  This commit disables CELT by default, but since
  |  this could be an unexpected change for packagers, if CELT
  |  0.5.1 development headers are installed, it will error
  |  out unless --enable-celt051/--disable-celt051 has
  |  been explicitly specified.

[0] https://gitlab.freedesktop.org/spice/spice-common/commit/72b0d60

This change is part of spice server since f5785db1 or v0.14.1 and
spice-gtk e6e9d7a or v0.35.

It is time to formally deprecated it and remove from all  components
in favor of opus mode.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2020-04-07 10:31:57 +01:00
Kevin Pouget
896aacee50 enums: add quality_indicator messages
These messages are used to exchange Streaming Quality messages between
SPICE client and SPICE server:

- `SPICE_MSGC_MAIN_QUALITY_INDICATOR`: a client->server message on the
  Main channel. This message is used by the client to share streaming
  quality observation with the server and the adaptive streaming
  control center. The format of the string message is not specified
  yet, it will depend of the sender/receiver final implementation.

- `SPICE_MSG_DISPLAY_QUALITY_INDICATOR`: a server->client message on
  the Display channel. This message is used to inform the client about
  adaptive-streaming specific details. The client should use it to
  configure its quality-message generation algorithms. The format of
  the string message is not specified yet, it will depend of the
  sender/receiver final implementation.

As an example, a `SPICE_MSG_DISPLAY_QUALITY_INDICATOR` message can
inform the client about the requested framerate (say, 60 FPS); and the
client will send a `SPICE_MSGC_MAIN_QUALITY_INDICATOR` warning message
when the measured framerate drops below 45 FPS.

Signed-off-by: Kevin Pouget <kpouget@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2020-04-02 13:34:35 +01:00
Frediano Ziglio
2d3324b899 vd_agent: Fix incompatibility with Microsoft compiler
Do not nest a zero-size array in another zero size array.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Marek Kedzierski <mkedzier@redhat.com>
2020-04-01 12:24:57 +01:00
Frediano Ziglio
edd2bb7143 vd_agent: Add some documentation
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2020-03-26 09:31:02 +00:00
Frediano Ziglio
0ceb92087e vd_agent: Fix indentation
Use 4 spaces, not 3.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-03-20 08:55:13 +00:00
Frediano Ziglio
dfc27e60d7 vd_agent: Add structure for VD_AGENT_FILE_XFER_STATUS_NOT_ENOUGH_SPACE details
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2020-03-19 14:36:05 +00:00
Frediano Ziglio
f224422c0d vd_agent: Add a new detail for VD_AGENT_FILE_XFER_STATUS_ERROR status
This will allow the agent to send back a more detailed error code.
More comments on header file.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2020-03-19 14:35:58 +00:00
Frediano Ziglio
f79ad62a6d build-sys: Allows spec file to build MingW packages
Add MingW support. This allows to build MingW packages easily with a

  $ rpmbuild -ta spice-protocol-XXXX.tar.xz

This is base on some work by Eduardo Lima adding MingW support to SPEC
files.
Part of dependencies, description and names came from Fedora SPEC file
for mingw-spice-protocol package.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2020-03-12 15:14:42 +00:00
Victor Toso
b0891e4c79 Remove foreign-menu and controller interfaces
Both were formally deprecated and announced for 0.14.1 release and can
be removed from the codebase.

    4816ae5 "foreign-menu: mark as deprecated" in 2020-03-06
    2981f21 "controller: mark as deprecated" in 2020-03-06

Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2020-03-10 16:07:48 +00:00
Frediano Ziglio
e3dcbcb72f Package SPEC file into Meson distribution file
Put final SPEC file in GIT repository directly to avoid having
to bump Meson version to use distribution script. To avoid
having incoherent version numbers check the versions from CI.
Remove 'c' as project language, project don't need to compile
any files.
Meson however needs C compiler even if is not used so add to package
requirements.
Update CI to build RPM from package directly.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2020-03-09 19:00:42 +00:00
Eduardo Lima (Etrunko)
33946522aa Remove autotools files in favor of meson
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2020-03-09 19:00:36 +00:00
Eduardo Lima (Etrunko)
bbad3fb944 Update spec file and ci script to use meson as default
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2020-03-09 19:00:28 +00:00
Frediano Ziglio
0724605efc build-sys: post-release version bump 0.14.2
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-03-09 10:35:54 +00:00
Victor Toso
e0ec178a72 Release 0.14.1
Signed-off-by: Victor Toso <victortoso@redhat.com>
2020-03-06 17:05:07 +01:00
Frediano Ziglio
47c931ce2f build: Fix typo in SPEC file name
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-03-06 13:45:38 +00:00
Victor Toso
4816ae58d2 foreign-menu: mark as deprecated
This patch deprecates this interface and suggests to drop it in the
next release.

I don't know any user for this interface in the past 5 years. Spice
clients like remote-viewer do use oVirt API for foreign menu.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2020-03-06 10:46:00 +00:00
Victor Toso
2981f214d3 controller: mark as deprecated
This patch deprecates this interface and suggests to drop it in the
next release.

The last known user of this interface was spice-gtk, which dropped its
implementation in 2017-08-01 with

    spice-gtk@8da3378f "build-sys: remove the spice-controller library"

The commit log there has good enough justification to also drop this
in the protocol.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2020-03-06 10:45:55 +00:00
Marc-André Lureau
045a6978d6 vdagent: introduce VD_AGENT_CAP_CLIPBOARD_GRAB_SERIAL
When this capability is negoticated by both the client & the agent,
the clipboard grab messages have an associated serial counter.

The serial is reset to 0 upon client connection.

The counter is increment by 1 on each grab message, by both sides.

The sender of the message with the highest serial should be the
clipboard grab owner, and the current session serial should be
updated.

If a lower serial than the current session serial is received, the
grab should be discarded.

Whenever two grabs share the same serial, the one coming from the
client should have a higher priority and the client should gain the
clipboard ownership.

No special treatement is done for the unlikely case of overflowing the
counter. It may temporarily inverse the priority, until both side have
overflown and/or synchronized.

Note: this mechanism isn't aiming at making "the most recent" (as in
time) side gaining the ownership. One side sending subsequent grab
messages earlier will likely take the ownership over a side sending a
single message simultaneously the other way. It only clears the
situation where both side believe that the other is the current
clipboard owner, by having a global ordering and priority in case of
serial conflict.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2020-03-06 09:24:31 +01:00
Marc-André Lureau
4f397d695d vdagent: introduce VD_AGENT_CAP_CLIPBOARD_NO_RELEASE_ON_REGRAB
This capability means the peer will not send a release event between
two subsequent grabs. This helps with interaction issues with
clipboard managers which can be worked around by time-based filters at
this point. With this capability, there is no need for such filter.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2020-03-06 09:24:26 +01:00
Eduardo Lima (Etrunko)
08a3c23407 meson: generate spice-protocol.spec
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2020-03-04 12:35:35 +00:00
Victor Toso
faed1bf410 vdi_dev: remove deprecated header
Deprecated since 2d7bf3e "vdi-dev: mark as deprecated" in 2014-12-04
and version 0.12.8.

Signed-off-by: Victor Toso <victortoso@redhat.com>
2020-03-02 18:23:16 +01:00
Victor Toso
1366a78cac vd_agent: remove VD_AGENT_CLIPBOARD_MAX_SIZE_[DEFAULT ENV]
Not used since fc1e7e "Mark VD_AGENT_CLIPBOARD_MAX as deprecated" in
2013-11-14, release v0.12.7

Signed-off-by: Victor Toso <victortoso@redhat.com>
2020-03-02 18:15:24 +01:00
Marc-André Lureau
01f49a97bd Add a .gitpublish
Set a default profile for git-publish.
(https://github.com/stefanha/git-publish)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2020-02-29 13:22:26 +00:00
Kevin Pouget
96d7dd9eef stream-device: Define Quality Indicator messages
These messages are used to transmit streaming quality indicators from
the streaming device to SPICE Server.

The message is a variable-length, zero-terminated string.

A new capability is introduced (STREAM_CAP_QUALITY_INDICATOR) for
SPICE server and streaming agent capabilities negotiation.

Signed-off-by: Kevin Pouget <kpouget@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2019-11-08 14:35:48 +00:00
Kevin Pouget
8ee9c7822c protocol: Define an enumeration for Quality Indicator messages
These messages are used to transmit streaming quality indicators from
SPICE client to SPICE server.

The message data structure is defined in spice-common/spice.proto:

    message {
        Data data @to_ptr;
    } @declare quality_indicator;

Signed-off-by: Kevin Pouget <kpouget@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2019-11-08 14:35:44 +00:00
Denis Ollier
dbbe765a7e build-sys: remove codegen leftovers
Codegen has been removed since v0.12.11 (commit 2a6e51c7), no python
modules are used anymore by spice-protocol.

Signed-off-by: Denis Ollier <dollierp@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2019-11-04 15:48:26 +00:00
Frediano Ziglio
18c9917a71 build-sys: Provide spec file during build
Having the RPM spec file produced by the build is helpful in
different situation. Different tools like mock or code
scanners accept source RPMs as input.
Providing this file allows easily build of the source RPM (and
binaries) using a simple command like

  $ rpmbuild -ta spice-protocol-XXXX.tar.bz2

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2019-10-23 12:58:06 +01:00
Frediano Ziglio
21b06e6585 build-sys: Update URL in SPEC file
Use https instead of http, web server automatically redirects
to secure version.
Remove slash at the end, not needed.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2019-10-23 12:58:03 +01:00
Frediano Ziglio
fe0df3c546 build-sys: Import spec file from Fedora
Will be used by next commits.
The SPEC file will allow to an RPM from sources with a simple
rpmbuild command.
Package files are useful for easy deployment.
This will also be used to provide automatic package build.
This commit just contain a verbatim copy of upstream SPEC file
to make easier to see changes to it and have a start point.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2019-10-23 12:57:57 +01:00
Frediano Ziglio
7d28c75ba6 qxl_dev: Add comment to QXLQUICData->data field
Recently a bug using this structure was fixed.
The bug involved understand the usage of this field so add some
note on the field for future reference.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2019-08-22 13:30:26 +01:00
Francois Gouget
22f1b1297b protocol: Add some comments to vd_agentd.h
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2019-08-07 10:39:45 +01:00
Frediano Ziglio
81f56cf07a start-packet: Correct misleading comment
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Snir Sheriber <ssheribe@redhat.com>
2019-07-21 13:57:37 +01:00
Frediano Ziglio
2d34651f40 qxl_dev: Move QXLReleaseInfoExt out of start/end-packed.h
This structure is not declares as SPICE_ATTR_PACKED resulting it
as aligned and no packed using GCC (no MingW).
This structure is only packed under MingW or Microsoft compilers.
This structure is not technically a definition for QXL device but
is used only for spice-server QXL interface.
As said above this change could affect only MingW/Microsoft that is
only Windows ABI of spice-server (very recently added) so
following lines are really not much important.
Note that Windows does not support architectures with CPUs not
supporting unaligned access.
Under Win32 this change don't affect size so nothing much can change.
This structure is currently passed as value to release_resource
callback. Under Win64 this structure is passed like a
"const QXLReleaseInfoExt *" so even if the structure is 16 bytes instead
of 12 this is read the same way.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Snir Sheriber <ssheribe@redhat.com>
2019-07-21 09:47:20 +01:00
Frediano Ziglio
f436204ead qxl_dev: Fix alignment for QXLReleaseInfo
Do not declare the structure as aligned.
The start/end-packed.h headers affects structures without
specification only using MingW or Microsoft compilers. For other
platform SPICE_ATTR_PACKED macro should be used.  This way the
definition are the same for all compiler.
This structure is used in a lot of QXL structures which are not
aligned causing to have an aligned structure to be potentially
unaligned. Some compilers may report a warning.
As this structure has no holes this change does not make any size
change using any compiler.
The change will only change the alignment from 4/8 to 1.
This could affect structures containing this union however beside
packed structure in qxl_dev.h (which are not affected) there are no
other usages affecting ABI by spice-gtk, Qemu or spice-server.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Snir Sheriber <ssheribe@redhat.com>
2019-07-18 16:38:04 +01:00
Francois Gouget
5874495db3 macros: Remove unused SPICE_GNUC_XXX macros
We don't want to maintain more macros than necessary and these have
been unused for over two years.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2019-06-27 09:42:07 +01:00
Frediano Ziglio
fc52cac76f build-sys: post-release version bump 0.14.1
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2019-05-13 14:55:57 +01:00
Victor Toso
f72ece993a build-sys: add README.md and CHANGELOG.md to tarball
Before renaming README to README.md and NEWS to CHANGELOG.md, we were
shipping those files in the tarball.

I'm fixing this in autotools because it is a 'regression' while
meson.build never had those included.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2019-04-12 13:53:14 +00:00
Victor Toso
f8114fc266 NEWS: prepare for 0.14.0 release
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2019-04-12 13:04:38 +00:00
Victor Toso
0f6b1848d9 README: Add basic info and .md prefix
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2019-04-12 13:04:34 +00:00
Victor Toso
9bb75ff1d9 Rename NEWS to CHANGELOG.md
Uppercase + prefix to make Gitlab happy and format it properly.
This should also be the case for all other spice components in Gitlab.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2019-04-12 13:04:30 +00:00
Victor Toso
fc8f868949 ChangeLog: remove old one
Added 193c54c in 2010-02-04 by Alexander Larsson <alexl@redhat.com>
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2019-04-12 13:04:21 +00:00
Victor Toso
26ca56157c gitlab-ci: add fedora meson+autotools
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2019-04-12 13:04:17 +00:00
Victor Toso
2256fbe8f6 build-sys: automake: do not require NEWS and ChangeLog
Following patches will rename NEWS to CHANGELOG.md due Gitlab
integration and remove the currently empty ChangeLog.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2019-04-12 13:04:11 +00:00
Frediano Ziglio
0edf46218c Bump minor version to mark cleanup change
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2019-04-06 13:25:52 +01:00
Frediano Ziglio
f7ba19224d protocol: Generate enums.h again to remove old protocol definitions
spice.proto was updated to remove really old definitions,
update enums.h accordingly.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2019-03-29 16:06:32 +00:00
Frediano Ziglio
f6e4cb65da stats: Avoid holes in SpiceStat structure
The SpiceStat structure can be 20 or 24 bytes depending on alignment.
Being a memory mapped structure potentially used with lockless access,
it is not good to have it unaligned.
The only tool that we know of that reads this memory mapped file
(reds_stats) is able to detect if the structure is either 20 or 24
bytes and act accordingly so changing this structure won't affect the
behaviour (unless you have an old tool but as they are usually
packaged together this is quite improbable).
This will also help on Windows as in that system it is not possible
for reds_stats to implement the same discovery trick implemented on
Linux.  On Windows it is not possible to read the size of the file
mapping (on Windows to implement shared memory you can use a file
mapping not associated to a file).
The structure will change layout only on 32-bit architectures which is
not recommended nowadays (the 64-bit platforms that we support align
64-bit integers to 64 bits).

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2019-01-17 17:10:58 +00:00
Lukáš Hrázký
5ab9f2f7a5 Add the StreamMsgGraphicsDeviceInfo message
The message contains information about the graphics device and monitor
belonging to a particular video stream (which maps to a channel) from
the streaming agent.

Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2019-01-16 13:48:25 +00:00
Lukáš Hrázký
839cd8c1dd Add the VDAgentGraphicsDeviceInfo message
The message serves for passing the device address and device display ID
information for all display channels from SPICE server to the vd_agent.

Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2019-01-16 13:48:02 +00:00
Marc-André Lureau
578b92e635 build-sys: post-release version bump 0.12.16
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2019-01-11 21:31:05 +04:00
Marc-André Lureau
9e4414834d NEWS: prepare for 0.12.15 release
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2019-01-11 21:30:28 +04:00
Frediano Ziglio
334cef51d0 error_codes: Remove obsolete header file
This file was used by the old client to hold return error codes.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Snir Sheriber <ssheribe@redhat.com>
2019-01-02 10:00:52 +00:00
Eduardo Lima (Etrunko)
ee136f0050 meson: Add declare_dependency statement
This is required in the case another project uses this one as a subproject

Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2018-09-26 16:22:07 -03:00
Frediano Ziglio
beda5ec7a6 qxl_dev: Align QXLRam to 4 bytes
This avoids compilers detect misaligned access which can lead to
warnings.
In QEMU the structure is allocated at the beginning of a 4Kb page,
in Xspice is allocated with a calloc, so the structure will end up 4
bytes aligned as well with these users. We are not aware of other users
of QXLRam, but if there was, it's likely the struct would be at least
naturally aligned, so this change should not impact anyone.
Aligning to 4 bytes maintains the size of the structure unchanged
avoiding possible ABI changes.
clang currently generates an invalid function call if a misaligned
4 byte atomic operation is detected.

This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1565766

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2018-07-11 10:19:45 +01:00
Christophe Fergeau
dca5931a3a meson: Post-release bump to 0.12.15
This was done for configure.ac earlier, but is missing in meson.build

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2018-06-21 14:43:45 +01:00
Frediano Ziglio
dec80bfe28 Fix typo in comment
extrenal -> external

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2018-06-21 11:27:09 +01:00
Snir Sheriber
5e2001b0ed Add support for h265 video codec
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2018-06-19 15:31:32 +01:00
Victor Toso
8460b25eec build-sys: post-release bump 0.12.15
Signed-off-by: Victor Toso <victortoso@redhat.com>
2018-06-01 12:17:48 +02:00
Victor Toso
d0cfb3648c NEWS: prepare for 0.12.14 release
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2018-06-01 10:09:13 +02:00
Frediano Ziglio
ccda863268 vd_agent: Do not define structures without fields
According to C standard the size of a structure without fields is
not defined (see
https://stackoverflow.com/questions/21851930/size-of-empty-structure-in-c-and-c).
As we almost only use GCC currently these structures are of size 0.
This can became a problem if 2 sides talking a given protocol use
these structures.
To avoid such possible mismatch (for instance having one side C and
the other C++ which defines these structures as having 1 as size) add
an empty (0-size array) field.
Although a 0-size array is not considered also that portable we use
extensively this feature with different compilers never encountering
issues.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Uri Lublin <uril@redhat.com>
2018-05-31 17:20:54 +01:00
Frediano Ziglio
33b52556e5 Remove obsolete files used to help renaming some identifiers
These files were added in 2010.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2018-05-08 17:24:05 +01:00
Eduardo Lima (Etrunko)
440b515086 Add support for building with meson
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2018-05-08 10:38:22 +01:00
Victor Toso
545fbb8b11 streaming: define max of number of concurrent streams
This definition is lacking in client while in server it is hardcoded
to 50. Having a well defined limitation allow us to make the code
more robust and optimized.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2018-05-05 12:52:11 +01:00
Frediano Ziglio
87441524f4 stream-device: Define an enumeration to store capabilities constants
This will allow to define new capabilities.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe de Dinechin <dinechin@redhat.com>
2018-04-11 12:31:08 +01:00
Lukáš Hrázký
967ac4a24c stream-device.h: Remove the reference to the streaming port name
It is a duplicate information in a place where it is not necessary and
of little value.

Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2018-04-05 16:53:14 +02:00
Frediano Ziglio
235ac17349 stream-device: Specify how padding shoud be inside new structures
Depending on how structures are initialised in the code is
possible that implicit padding bytes are not initialised
causing possible information leaks as the entire structure
with all padding is sent through device/network.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe de Dinechin <dinechin@redhat.com>
2018-03-10 07:15:44 +00:00
Frediano Ziglio
bd279b1fc1 macros: Use Visual C++ built-ins for byte swapping if available
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2018-03-09 15:41:09 +00:00
Frediano Ziglio
d1dca6450c macros: Use GCC built-ins to swap bytes
GCC introduced __builtin_bswapXX intrinsics in a quite old
version.
As version 2 and 3 are no more used nowadays instead of manually
craft these functions using assembly language use the new built-ins.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2018-03-09 15:41:04 +00:00
Frediano Ziglio
4250216baf Allow to specify a surface will be streamed
This flag will allow the client to perform some optimisations
on output and buffering processing.
Old clients will ignore this additional flag.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2017-12-01 15:53:44 +00:00
Jonathon Jongsma
6371ecbcb1 Change STREAM_MSG_CAPABILITIES_MAX_BYTES
Clarify that this value specifies the size in bytes, not the number of
capabilities.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2017-11-09 11:43:00 -06:00
Jonathon Jongsma
e2176efb0e Add definition of STREAM_MSG_CAPABILITIES_MAX
This message is specified to have a size limit of 1024, so provide this
as a #define

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Christophe de Dinechin <dinechin@redhat.com>
2017-11-01 17:06:00 +01:00
Frediano Ziglio
c05cc91972 Add support for mouse movement
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe de Dinechin <cdupontd@redhat.com>
2017-09-15 18:47:04 +01:00
Frediano Ziglio
a419692ea9 Add support for setting cursor shape from guest
This allows to better support client mouse using streaming device

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe de Dinechin <cdupontd@redhat.com>
2017-09-15 18:47:04 +01:00
Frediano Ziglio
909da449e3 Add error reports from server to guest
Acked-by: Christophe de Dinechin <cdupontd@redhat.com>
2017-09-15 18:47:04 +01:00
Frediano Ziglio
02b12e66de Add a message to control guest streaming
Allows server to tell codec and start/stop the streaming

Acked-by: Christophe de Dinechin <cdupontd@redhat.com>
2017-09-15 18:47:04 +01:00
Frediano Ziglio
a1d8ccabbf Add protocol to send streams to server
This protocol allows a guest to send a video stream to the server.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe de Dinechin <cdupontd@redhat.com>
2017-09-15 18:47:04 +01:00
Michael Shigorin
6795f4edfd macros.h: s/endianess/endianness/g
A three-time typo, obviously :)

Acked-by: Frediano Ziglio <fziglio@redhat.com>
2017-09-15 18:47:01 +01:00
Michael Shigorin
ed8f30d421 macros.h: added e2k detection
Elbrus 2000 is a little-endian architecture.

Acked-by: Frediano Ziglio <fziglio@redhat.com>
2017-09-15 18:46:57 +01:00
Marc-André Lureau
40544912ab build-sys: post-release bump 0.12.14 2017-07-03 13:20:29 +02:00
Marc-André Lureau
8dda82b49d NEWS: prepare for 0.12.13 release
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2017-07-03 13:14:29 +02:00
Jakub Janků
86c53ee5bf agent: Add new file-xfer statuses
Introduce new error statuses to report more info to clients:
VD_AGENT_FILE_XFER_STATUS_SESSION_LOCKED,
VD_AGENT_FILE_XFER_STATUS_VDAGENT_NOT_CONNECTED,
VD_AGENT_FILE_XFER_STATUS_DISABLED

These are only sent to clients that feature
VD_AGENT_CAP_FILE_XFER_DETAILED_ERRORS capability.
Acked-by: Pavel Grunt <pgrunt@redhat.com>
2017-06-20 12:09:25 +02:00
Jakub Janků
8b025c4ed0 agent: Add support for reporting on free space
Agent can send VDAgentFileXferStatusMessage with result
VD_AGENT_FILE_XFER_STATUS_NOT_ENOUGH_SPACE to indicate lack of free
space. This enables more detailed error reporting, so the user knows
why the file transfer has failed.

Add VD_AGENT_CAP_FILE_XFER_DETAILED_ERRORS to ensure detailed errors
are not sent to clients that do not support it. This can be used
with more file xfer errors in the future.

Acked-by: Pavel Grunt <pgrunt@redhat.com>
2017-05-31 23:06:50 +02:00
Frediano Ziglio
068266069c Change enums.h license to MIT
This allows the header to be used in no GPL programs.
Others headers are already MIT licensed so this change do
not require additional changes to already existing
programs.

The file can be generated with

  ./spice_codegen.py -e spice.proto --license MIT enums.h

from spice-common.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
2017-05-08 09:50:59 +01:00
Pavel Grunt
3f27d410b4 agent: Add capability for disabled file transfer
Server can set it to indicate that it discards file transfer messages.

Related:
https://bugzilla.redhat.com/show_bug.cgi?id=1373725

Acked-by: Victor Toso <victortoso@redhat.com>
2017-03-10 10:43:21 +01:00
Pavel Grunt
b9bfbd2f7b agent: Add macro for clearing capability
Related:
https://bugzilla.redhat.com/show_bug.cgi?id=1373725

Acked-by: Frediano Ziglio <fziglio@redhat.com>
2017-03-03 13:00:36 +00:00
Frediano Ziglio
5410de6407 protocol: Add support for VP9 video codec
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2017-01-31 08:54:46 +00:00
Victor Toso
9da109a661 protocol: add preferred video codec message
Client might want to choose a preferred video codec for streaming for
different reasons which having hardware decoder support being the most
interest one.

This message allows the client to send a list of video codecs in a
order of preference.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2017-01-06 12:24:27 +00:00
Francois Gouget
b1cdb2756f macros: Add MSVC support to SPICE_GNUC_DEPRECATED
Based on the G_DEPRECATED GLib macro.
For projects that don't use GLib.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
2016-11-23 08:51:09 +01:00
Francois Gouget
0d7aa7579e macros: Use GLib's G_DEPRECATED macro if available
This gains us automatic support for whichever compilers GLib supports in
this macro when used in projects that use GLib.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
2016-11-23 08:51:09 +01:00
Frediano Ziglio
97ae0b1bb4 vd_agent: Add some comments to clipboard messages
Document what the messages are meant to do.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-11-11 11:52:19 +00:00
Victor Toso
82fca738a2 build-sys: post-release bump
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
2016-11-01 14:58:57 +01:00
Victor Toso
895afe1394 enums: Move auto generated SpiceDataCompressionType
This header is auto generated from spice_codegen.py tool in
spice-common repository and thus, it changes what was included
manually.

Move SpiceDataCompressionType struct to comply with spice_codegen.py.
This header was generated with:

 ./spice_codegen.py -e spice.proto ../spice-protocol/spice/enums.h

Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-10-24 14:42:47 +01:00
Francois Gouget
2eeb092204 protocol: Group the VDAgent clipboard message definitions
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-10-17 16:37:57 +01:00
Christophe Fergeau
91825a909b Update NEWS for 0.10.12 release 2016-07-07 15:20:13 +02:00
snir sheriber
73614b831a LZ4 compression is now available at the Spicevmc channel
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-06-13 23:03:13 +01:00
Marc-André Lureau
de68d1c074 build-sys: post-release bump
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-03-11 16:08:55 +01:00
Marc-André Lureau
1adb66c638 NEWS: update for 0.12.11 release
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-03-10 17:04:11 +01:00
Marc-André Lureau
2a6e51c7ee Remove codegen
Codegen generates code specific to spice-common submodule. It's not
meant as a generic protocol header or specification. See discussion and
commits about spice-common codegen re-import.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-03-10 16:57:08 +01:00
Francois Gouget
7937915d67 protocol: Add support for the VP8 and h264 video codecs
Clients that support multiple codecs must advertise the
SPICE_DISPLAY_CAP_MULTI_CODEC capability and one
SPICE_DISPLAY_CAP_CODEC_XXX per supported codec.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-03-03 17:04:44 +00:00
Frediano Ziglio
0721716bb8 macros: do not use more type safe CONTAINEROF version if not requested
This prevents incompatibility if users (like old spice-server/spice-gtk)
are not expected to have this additional restriction.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-03-02 12:05:55 +00:00
Marc-André Lureau
4707655962 codegen: simplify FdType
This patch is a left-over from the fd passing commit 267391c8fd as
suggested by Frediano Ziglio during review.

Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-01-19 14:43:23 +00:00
Marc-Andre Lureau
3fc2221e96 protocol: add unix GL scanout messages
Add 2 new messages to the display channel to stream pre-rendered GL
images of the display. This is only possible when the client supports
SPICE_DISPLAY_CAP_GL_SCANOUT capability.

The first message, SPICE_MSG_DISPLAY_GL_SCANOUT_UNIX, sends a gl image
file handle via socket ancillary data, and can be imported in a GL
context with the help of eglCreateImageKHR() (as with the 2d canvas, the
SPICE_MSG_DISPLAY_MONITORS_CONFIG will give the monitors
coordinates (x/y/w/h) within the image). There can be only one scanount
per display channel.

A SPICE_MSG_DISPLAY_GL_DRAW message is sent with the coordinate of the
region within the scanount to (re)draw on the client display. For each
draw, once the client is done with the rendering, it must acknowldge it
by sending a SPICE_MSGC_DISPLAY_GL_DRAW_DONE message, in order to
release the context (it is expected to improve this in the future with a
cross-process GL fence).

The relation with the existing display channel messages is that all
other messages are unchanged: the last drawing command received must be
displayed. However the scanout display is all or nothing. Consequently,
if a 2d canvas draw is received, the display must be switched to the
drawn canvas. In other words, if the last message received is a GL draw
the display should switch to the GL display, if it's a 2d draw message
the display should be switched to the client 2d canvas.

(there will probably be a stipped-down "gl-only" channel in the future,
or support for other streaming methods, but this protocol change should
be enough for basic virgl or other gpu-accelerated support)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-01-14 11:52:41 +00:00
Marc-Andre Lureau
267391c8fd protocol: learn to describe fd passing in messages
Add a new type, "unix_fd", used to describe file descriptor sharing via
socket ancillary data (these messages are local only).

The marshaller/demarshaller can't serialize this in memory (consume_fd
implementation is empty), so it is the responsability of the marshaller
user to handle sending and receiving the handles, which are appended at
the end of the message with an extra stream byte (because some Unix
requires sending at least a byte with ancillary data).

Even if there is no fd to send (or if the fd is invalid etc), the
receiver side expects an extra byte anyway.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-01-14 11:46:16 +00:00
Christophe Fergeau
6b86c1a510 Use gcc builtin rather than asm for memory barriers
This should make things more portable.

On my machine, __sync_synchronize() uses mfence rather than lock; addl;
Looking at the kernel memory barriers, this should be fine:
http://lxr.free-electrons.com/source/arch/x86/um/asm/barrier.h

The kernel favours using mfence, but falls back to lock; addl; when it's
not available (32 bit non-SSE machines).

https://bugs.freedesktop.org/show_bug.cgi?id=86997
2016-01-08 15:31:38 +01:00
Frediano Ziglio
cffb8baee1 macros: make SPICE_CONTAINEROF more typesafe
Check the pointer given is the same type as member pointer.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-12-04 11:15:12 +00:00
Christophe Fergeau
95b5617874 build-sys: Use $datadir for .proto files/codegen scripts
They are not arch-specific, so installing them in $libdir is not needed.
2015-10-02 12:51:51 +02:00
Jonathon Jongsma
017ddbe7a7 post-release version bump 2015-09-25 13:17:20 -05:00
Jonathon Jongsma
c9b3648f48 Update NEWS for 0.12.10 release 2015-09-22 15:30:54 -05:00
Frediano Ziglio
b397eca557 macros: fix compatibility with non-clang compilers
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-08-20 11:16:31 +01:00
Victor Toso
39be7a8fce macros: fix alignment issue reported by clang
char_device.c:131:52: warning: cast from 'uint8_t *'
(aka 'unsigned char *') to 'SpiceCharDeviceMsgToClientItem *'
(aka 'struct SpiceCharDeviceMsgToClientItem *')
increases required alignment from 1 to 8 [-Wcast-align]

 SpiceCharDeviceMsgToClientItem *msg_item = SPICE_CONTAINEROF(item,
                                            ^~~~~~~~~~~~~~~~~~~~~~~

../spice-common/spice-protocol/spice/macros.h:142:6: note: expanded
from macro 'SPICE_CONTAINEROF'

 ((struct_type *)((uint8_t *)(ptr) - SPICE_OFFSETOF(struct_type, member)))
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2015-08-20 11:05:19 +01:00
Victor Toso
fa19ebb83f macros: verify if __alloc_size__ works with clang
So we can avoid using using an attribute not supported for the compiler.

warning:
../spice-common/common/mem.h:91:80: warning: unknown attribute
'__alloc_size__' ignored [-Wunknown-attributes]

void *spice_malloc0_n(size_t n_blocks, size_t n_block_bytes)
SPICE_GNUC_MALLOC SPICE_GNUC_ALLOC_SIZE2(1,2);

../spice-common/spice-protocol/spice/macros.h:52:52: note: expanded
from macro 'SPICE_GNUC_ALLOC_SIZE2'

 #define SPICE_GNUC_ALLOC_SIZE2(x,y) __attribute__((__alloc_size__(x,y)))
                                                    ^
2015-08-20 11:00:35 +01:00
Frediano Ziglio
2cd036e9d4 Fix endianess compatibility with old GCC versions
GCC 4.4.7 does not define __BYTE_ORDER__ macros so use architecture
macro to attempt to detect endianess.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Reported-by: Swapna Krishnan <skrishna@redhat.com>
Tested-by: Swapna Krishnan <skrishna@redhat.com>
Acked-by: Uri Lublin <uril@redhat.com>
2015-08-19 15:42:10 +01:00
Christophe Fergeau
726c6520ae Use 0xffu everywhere in new SPICE_MAGIC_CONST macro
This should have been squashed in the commit introducing the macro, but
I forgot to commit this before pushing it.
2015-08-12 14:17:16 +02:00
Frediano Ziglio
295d05e733 Define and use new SPICE_MAGIC_CONST macro
This macro allow to define magic constants without using weird
memory tweacks.
This remove some possible warning from some compiler and
make code more optimized as compiler is able to compute the
constant.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-08-12 14:15:27 +02:00
Frediano Ziglio
3ab16f2dad Detects processor endianess using preprocessor
This allow to define macros based on endianess in public headers

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-08-12 14:15:27 +02:00
Christophe Fergeau
03a28f5856 build-sys: Make installed spice_codegen.py is executable
Files listed as _DATA in Makefile.am are installed without the
executable bit set, files listed as _SCRIPT do get the executable bit
set. As spice_codegen.py is meant to be run by spice-protocol users,
make sure this bit is set.
2015-08-10 18:00:45 +02:00
Christophe Fergeau
52ae5ed2c8 build-sys: Make sure aclocal picks up macros in the m4/ dir
Older aclocal version needs to have ACLOCAL_FLAGS defined in Makefile.am
in order to be able to pick up macros stored in m4/ in the source
directory.
2015-08-07 12:55:07 +02:00
Christophe Fergeau
3f0eaa717b build-sys: Add m4 file for AX_PYTHON_MODULE
This fixes a build failure on older distros (EL6) which do not have
this macro readily available.
2015-08-07 12:53:59 +02:00
Christophe Fergeau
8a3def14e3 proto: Use proper type for preferred_compression field
No need to use an uint8 typed member, we can directly use the
appropriate enum8 type here, which makes everything more explicit.
2015-08-07 12:07:26 +02:00
Christophe Fergeau
e857cd9a37 proto: Rename image_compress to image_compression
Re-using the SPICE_IMAGE_COMPRESS_ prefix in newer spice-protocol
releases is going to cause issues as there will be clashing enum members
in older spice-server releases. Using SPICE_IMAGE_COMPRESSION_ as a
prefix sidesteps these backward compability issues.
2015-08-07 12:07:26 +02:00
Christophe Fergeau
1830e216c4 build-sys: Install code generation data/scripts
spice-common generate code from these python scripts and the installed
SPICE .proto. This commit installs them during make install, and adds a
codegendir variable to the pkgconfig file so that spice-common can
locate the scripts.
2015-08-07 11:54:48 +02:00
Christophe Fergeau
2b9d15c1d3 build-sys: Add --enable-code-generator
This flag is only used for git builds, and can usually safely be
disabled.
When it's enabled, configure.ac will check that python-six and pyparsing
are available, and will use these together with the codegen python
scripts in order to automatically regenerate enums.h when the .proto
files change.
2015-08-07 11:54:47 +02:00
Christophe Fergeau
eb2e8ba0e8 build-sys: Make sure new files are dist'ed
The just added .proto files and python code generation code need to be
added to EXTRA_DIST in order to be distributed in tarballs, and
we need to recurse in the new python_modules directory.
2015-08-07 11:54:46 +02:00
Christophe Fergeau
26eb4e0f2e Merge protocol code generation bits from spice-common
The history for spice*.proto, spice_codegen.py and python_modules/ was
extracted from spice-common using git filter-branch:

git filter-branch \
    --prune-empty \
    --index-filter '
        git ls-tree -z -r --name-only --full-tree $GIT_COMMIT \
        | grep -z -v "^python_modules/" \
        | grep -z -v "^spice.proto" \
        | grep -z -v "^spice1.proto" \
        | grep -z -v "^spice_codegen.py" \
        | xargs -0 -r git rm -f --cached -r
    ' \
    -- \
    --all

git filter-branch --force \
    --prune-empty \
    --index-filter '
        git rm -f spice-protocol --cached  --ignore-unmatch
    ' \
    -- \
    --all
2015-08-07 11:52:25 +02:00
Sandy Stutsman
666b5c5780 Add VD_AGENT_CAP_MONITORS_CONFIG_POSITION capability to client.
This indicates the client's ability to handle multi-monitor
configurations that are not multi-head.

This commit addresses:
https://bugzilla.redhat.com/show_bug.cgi?id=1248196
https://bugzilla.redhat.com/show_bug.cgi?id=1248189
2015-08-06 11:52:00 +02:00
Uri Lublin
1d026b9a71 codegen: ptypes.py: keep attribute names in sets
This patch changes the type of 'valid_attributes' and
'attributes_with_arguments'.
Both of them are list of different strings and are kept in sets.

This was the intention of the original code, but this patch
use a specific set([ strings ]) format, instead of { strings }.

This fixes the build for me on RHEL-6 (python-2.6.6).
Build error is:

File "/home/ulublin/git/spice/spice-common/python_modules/ptypes.py",
line 67
      'end',
           ^
SyntaxError: invalid syntax
2015-08-04 20:10:22 +03:00
Christophe Fergeau
246825477f Post-release version bump 2015-07-29 17:46:59 +02:00
Christophe Fergeau
715c007eb0 Release 0.12.9 2015-07-29 17:44:07 +02:00
Christophe Fergeau
cd78176038 Rename SpiceImageCompress constants
Having these constants use the same name as the ones in spice-server
0.12.5 causes compilation issues for spice-server users when using
spice-server 0.12.5 or older, and spice-protocol 0.12.8.
2015-07-23 16:22:56 +02:00
Frediano Ziglio
de1286ad80 codegen: Allow to specify C type for index variable
This is to prepare to generate the wireshark dissector which uses
glib types instead of the newer C ones (for compatibility with some
compilers).

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-07-23 11:22:11 +02:00
Frediano Ziglio
08384ac7fb codegen: Check we don't pop too many indexes 2015-07-23 11:22:11 +02:00
Frediano Ziglio
f6506a2563 codegen: Remove old ptr32 attribute
This attribute is not used in code.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-07-23 11:22:11 +02:00
Frediano Ziglio
25c48ddd2c codegen: Do some checks on attributes
Verify that the attribute is known. This could help for instance to
avoid some future typo mistakes.
We also now have a list of attributes that we can comment for
documentation purpose.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-07-23 11:20:19 +02:00
Frediano Ziglio
6f729cb32c codegen: Reuse code to fix attribute from prototype file
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-07-23 11:11:47 +02:00
Frediano Ziglio
13aabda256 codegen: Remove duplicate variable initialization
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-07-23 11:11:44 +02:00
Frediano Ziglio
553be71067 codegen: Optimize code indentation and avoid a loop
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-07-23 11:11:18 +02:00
Frediano Ziglio
233c463e34 codegen: Fix typo in variable name
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-07-23 11:11:16 +02:00
Frediano Ziglio
5bad231e80 codegen: Simplify if/else blocks
Blocks were mainly the same, this reduces the amount of code.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-07-23 11:11:03 +02:00
Frediano Ziglio
4a2a996674 codegen: Import six module before first use
The module is used in the initial try/except so make sure it is
already imported.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-07-23 11:10:57 +02:00
Christophe Fergeau
9625b45edb codegen: Fix enums.h generation with python3
Trying to generate enums.h with python3 results in
Traceback (most recent call last):
  File "./spice_codegen.py", line 217, in <module>
    write_enums(writer, options.generate_dissector)
  File "./spice_codegen.py", line 99, in write_enums
    write_channel_enums(writer, c, False, False)
  File "./spice_codegen.py", line 17, in write_channel_enums
    if len(messages) == 0:
TypeError: object of type 'filter' has no len()

filter() returns an enumerator object in python3 while it used to return
a list in python2. Using list(filter()) instead fixes that error.
I've checked that the generated enums.h is identical with python2 and
python3.
2015-07-23 10:29:10 +02:00
Christophe Fergeau
5adcb1c340 proto: Remove space before tab
There are 3 lines in spice.proto/spice1.proto which start with spaces
and then contain a tab. This commit removes the spaces and only keep the
tab.
2015-07-20 20:55:47 +02:00
Christophe Fergeau
4ba5072b28 Post-release version bump 2015-06-30 16:55:48 +02:00
Christophe Fergeau
4a4ab47db5 Prepare for spice-protocol 0.12.8 release 2015-06-30 16:31:31 +02:00
Sandy Stutsman
e93fdd47ef Add QXL_ESCAPE_MONITOR_CONFIG enum
New escape for sending monitor position information from guest to client
2015-06-30 16:23:42 +02:00
Javier Celaya
12ab27180b Proto: Add preferred compression message and constants.
When accessing a virtual desktop from different devices, some may have
different image compression requirements, e.g. slow devices may prefer
the faster LZ4 over GLZ. This message instructs the server to switch the
image compression algorithm. This patch also promotes the
SPICE_IMAGE_COMPRESS_* constants so that they are available from both
the server and the client.
2015-06-22 19:54:30 +02:00
Javier Celaya
67fb3306f8 Add a preferred compression capability 2015-06-01 17:21:44 +02:00
Javier Celaya
da3cf3369a Update enums.h for preferred compression message 2015-06-01 17:21:44 +02:00
Christophe Fergeau
83dd73ba88 Post-release version bump
This allows spice-protocol users to depend on the git version.
spice-vdagent.git needs a spice-protocol version newer than the latest
release for the volume synchronization work or it won't build.
2015-05-27 12:43:07 +02:00
Victor Toso
9acfaa66df add volume synchronization to protocol
With VD_AGENT_AUDIO_VOLUME_SYNC the client can send volume and mute
values to be set in the guest for input or output devices.
Currently this is done once after the agent send its capabilities.

Related: https://bugzilla.redhat.com/show_bug.cgi?id=1012868
2015-04-14 16:11:03 +02:00
Christophe Fergeau
3cc9566a00 codegen: Use six.PY3 rather than six.PY2
Older versions of python-six (at least 1.3.0) defined six.PY3 but not
six.PY2. six.PY2 is only used twice in straightforward tests so it's
easy to use six.PY3 instead.
2015-04-14 16:08:43 +02:00
Alexander Wauck
e919337980 Make spice_codegen.py work on both Python 2 and 3
This is a new version of my previous patch that does not include six.py.
It's still kind of big, but at least it's all spice-common changes now.
There are also a few other fixes that Christophe brought to my attention.
Note that six now needs to be installed on the system (python-six on
Fedora and Debian, six on PyPI).

This *should* be enough to make spice_codegen.py work on both Python 2
and Python 3.  The major changes are as follows:

 * cStringIO.StringIO -> io.StringIO
 * str vs. unicode updates (io.StringIO doesn't like str)
 * integer division
 * foo.has_key(bar) -> bar in foo
 * import internal_thing -> from . import internal_thing
 * removed from __future__ import with_statement
   (might break Python 2.5?)
 * changed some lambdas to list comprehensions (done by 2to3)
 * cast some_dict.keys() to list where needed (e.g. for sorting)
 * use normal type names with isinstance instead of types.WhateverType

Signed-off-by: Alexander Wauck <awauck@codeweavers.com>
2015-04-01 13:39:03 +02:00
Marc-André Lureau
fb50e86680 build-sys: simplify autogen
Use autoreconf, allow out of tree autogen.sh run.
2014-12-04 17:41:01 +01:00
Marc-André Lureau
2d7bf3ed7f vdi-dev: mark as deprecated
This interface has long been deprecated, and I don't know of any user.
Perhaps the header could even be removed from spice-protocol?
2014-12-04 17:39:08 +01:00
Javier Celaya
77ce36426f Add LZ4 image compression support.
- Add a new LZ4 image type to spice.proto.
- Add canvas_get_lz4() to common_canvas_base, to get a pixmap from an
  lz4 image.
- Add an enable-lz4 switch to the configure script, disabled by default.
2014-12-02 19:23:53 +01:00
Javier Celaya
7566c5b3ad Add LZ4 compression display capability. 2014-12-02 19:08:59 +01:00
Fabiano Fidêncio
cb37de3520 python: Fix -Wsign-compare
The return of the get_array_size() is used as a limit in a loop,
being compared with an unsigned index (indexes are always unsigned).
To avoid the -Wsign-compare warning, let's cast the return of the
get_array_size() to unsigned and make GCC happier.
2014-09-18 13:13:30 +02:00
Fabiano Fidêncio
744675b424 python: Fix -Wunused-parameter
Although the most part of the parameters marked as unused are actually
being used for a few functions, a bunch of warnings can be seen when
the code is compiled with "-Wall -Wextra". As adding the unused attribute
means that the variable/parameter is meant to be *possibly* unused, we're
safe adding it in the generated code, even for used variables/parameters.
2014-09-18 13:13:27 +02:00
Christophe Fergeau
1f6f9097c3 Release 0.12.7 2014-05-19 11:54:34 +02:00
Marc-André Lureau
3916b9d813 demarshal: prefix variable name with parent names
Avoid naming clash if parent structures have the same name

https://bugzilla.redhat.com/show_bug.cgi?id=1021995
2014-05-15 14:21:48 +02:00
Christophe Fergeau
06a99ce30b marshaller: Use #include <> for headers in $srcdir/common
Since the (de)marshallers are now generated in $builddir and not in
$srcdir, when these generated files include a file located in
$srcdir/common, the compiler will find them thanks to a -I directive, so it
makes more sense to use <> rather than "" when including them.
2014-04-16 16:47:55 +02:00
Christophe Fergeau
ef14521ac5 Use #include "common/..." in (de)marshallers
Now that they are created in $builddir, their includes will need to refer
to files in $srcdir, which can be different. It's cleaner to add
-I $(top_srcdir)/spice-common/ to modules using spice-common rather than
having -I $(top_srcdir)/spice-common/common which would could create header
collisions.
2014-04-16 16:47:55 +02:00
Marc-André Lureau
58c1b4aeb8 Update enums.h for webdav channel 2014-03-19 17:55:23 +01:00
Marc-André Lureau
6e5ea8d802 spice.proto: add webdav channel
This channel provides a webdav server (rfc4918). This allows various
guest or remote system that support webdav to access a folder shared by
the client (some agent can be used to proxy the requests on a local port
for example). The webdav server may also be accessed by an hypervisor as
a remote filesystem interface, which can then be accessed by the guest
via other means (fs/fat emulation, mtp device, etc)

Due to the usage of a single channel stream and the need for concurrent
requests, webdav clients streams are multiplexed. Each client stream is
framed within 64k max messages (in little-endian)

 int64    client_id
 uint16   size
 char     data[size]

A new client_id indicates a new connection. A new communication stream
with the webdav server should be started. A client stream message of
size 0 indicates a disconnection of client_id. This multiplexed
communication happens over the channel "data" message.

Only when the port is opened may the communication be started.
A closed port event should close all currently known multiplexed
connections.

Why WebDAV?

webdav is supported natively by various OS for a long time (circa
Windows XP). It has several open-source implementations and a variety of
tools exist. A webdav implementation can be tested and used without a
Spice server or any virtualization (this also permit sharing the
implementation with other projects in the future, such as GNOME). It is
an IETF open standard and thus thoroughly specified.

The basic requirements for an efficient remote filesystem are provided
by the standard (pipelining, concurrency, caching, copy/move, partial
io, compression, locking ...) While other features are easily possible
via extensions to the protocol (common ones are executable attributes,
or searching for example).

Given the requirements, and the popularity of http/webdav, I believe it
is the best candidate for Spice remote filesystem support.

Other alternatives (adhoc, p9, smb2, sftp) have been studied and
discarded so far since they do not match in term of features or
requirements.
2014-03-19 14:47:04 +01:00
Jeremy White
ee94b6b5f2 Add support for the Opus codec.
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
2014-01-02 12:28:21 +01:00
Jeremy White
2575626fb6 Add support for the Opus codec
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
2014-01-02 12:24:02 +01:00
Marc-André Lureau
5ff3fa7080 vdagent: add max-clipboard message
Add an optional message sent by the client to ask the agent not to send
clipboard data bigger than a certain size, in bytes.  The message can be
sent if the agent supports the capability MAX_CLIPBOARD, at any time.

The agent is free to ignore or forget the value after a restart or a
disconnection, but a bigger message might be discarded when received on
client side, resulting in bandwidth waste.
2013-11-14 16:16:39 +01:00
Marc-André Lureau
9fc1e7e3d5 Mark VD_AGENT_CLIPBOARD_MAX as deprecated
There is no use for those 2 values, and the default limit would be quite
wrong.

Put them in a deprecated block. If someone uses them, he will have to
add -DSPICE_DEPRECATED, or just fix the code.
2013-11-14 16:14:22 +01:00
Jonathon Jongsma
960a360f8a Be explicit about spice-common license
Use same license as spice-gtk and spice modules (LGPL 2.1) since those licenses
applied to the spice-common submodule in the past.  This makes it more clear
that if you use spice-common separately, the license is still LGPL.  Also
mention license and copyright in generated files.
2013-10-23 11:41:43 -05:00
Jonathon Jongsma
f3a47cc903 codegen: Add a --generate-wireshark-dissector option
The wireshark protocol dissector is a bit out-of-date. Several new channel types
and enums have been added.  It would be nice if these values (and the
translation between the value and the name) could be automatically generated so
that updating the dissector was a slightly less manual process.  This patch adds
a commandline switch which generates both the enums and value-name lists in the
format that wireshark expects.
2013-10-23 11:41:43 -05:00
Marc-André Lureau
8b436f8a3e macros: remove INLINE
This macro isn't used in the protocol headers, and clashes with other
define from qemu.
2013-10-04 12:36:24 +02:00
Marc-André Lureau
ba2192f1ea enums: add SPICE_MSG_BASE_LAST
Make it explicit that 100 is the last value of the base channel
messages. This allows clients to use the generated enum value too.
(see spice.proto)
2013-09-12 13:51:39 +02:00
Marc-André Lureau
23fe54f112 proto: add fake last message in base channel
Make it explicit that 100 is the last value of the base channel
messages. This allows clients to use the generated enum value too.
2013-09-12 13:49:25 +02:00
Marc-André Lureau
5dad55f008 proto: comment future surface flags usage 2013-09-12 13:49:25 +02:00
Yonit Halperin
784407f248 Release 0.12.6 2013-06-26 14:02:40 -04:00
Hans de Goede
7be0e88e7e vd_agent: Add caps for the agent to signal the guest line-ending (rhbz#752350)
When copy and pasting between a Linux guest and a Windows client or visa
versa, the line-endings of the text will usually be wrong for the other side,
so it is desirable to do automatic conversion.

However sometimes it is possible for text in the clipboard on Linux to have
MSDOS (CRLF) style line-endings, when copy and pasting from Linux to Linux
it is undesirable to automatically convert these, since this would not happen
when the apps were running directly on the same machine.

So we want to do automatic conversion only if the client and guest native
line-endings differ. This means that we cannot simply define one standard
line-ending for VD_AGENT_CLIPBOARD_UTF8_TEXT data.

Given the above it makes sense to only do conversion on one end. This
patch adds new capabilities which allow the guest-agent to advertise what
is the native line-ending of the guest.

This should be used by the client in the following way:
1) Check if the guest-agent advertises any line-ending type at all, if not
the guest line-ending is unknown -> do not convert
2) If the guest's native line-ending matches that of the platform the client
is running on, then do no not convert
3) If the guest's native line-ending is different from the client platform,
then convert received clipboard data into the client platform's native
line-ending, and convert clipboard data which will be send to the guest-agent
into the guest's native line-ending.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-06-05 14:23:52 +02:00
Yonit Halperin
bd3f609b34 add SPICE_MSG_PLAYBACK_LATENCY
SPICE_MSG_PLAYBACK_LATENCY is intended for adjusting the
latency of the audio playback. It is used for synchronizing
the audio and video playback.
The corresponding capability is SPICE_PLAYBACK_CAP_LATENCY.
2013-04-22 11:34:49 -04:00
Yonit Halperin
1f603c09b8 add stream report messages
If the server & client support SPICE_DISPLAY_CAP_STREAM_REPORT,
the server first sends SPICE_MSG_DISPLAY_STREAM_ACTIVATE_REPORT. Then,
the client periodically sends SPICE_MSGC_DISPLAY_STREAM_REPORT
messages that supply the server details about the current quality of
the video streaming on the client side. The server analyses the
report and adjust the stream parameters accordingly.
2013-04-22 11:34:20 -04:00
Yonit Halperin
4f868cc354 add SPICE_MSG_PLAYBACK_LATENCY
SPICE_MSG_PLAYBACK_LATENCY is intended for adjusting the latency
of the audio playback. It is used for synchronizing the audio and video
playback.
The corresponding capability is SPICE_PLAYBACK_CAP_LATENCY.
2013-04-22 11:30:49 -04:00
Yonit Halperin
a04cc68ba1 add SPICE_MSGC_DISPLAY_STREAM_REPORT
If the server & client support SPICE_DISPLAY_CAP_STREAM_REPORT,
the server first sends SPICE_MSG_DISPLAY_STREAM_ACTIVATE_REPORT. Then,
the client periodically sends SPICE_MSGC_DISPLAY_STREAM_REPORT
messages that supply the server details about the current quality of
the video streaming on the client side. The server analyses the
report and adjust the stream parameters accordingly.
2013-04-22 11:30:49 -04:00
Colin Walters
f3579abb3a autogen.sh: Honor NOCONFIGURE=1
See http://people.gnome.org/~walters/docs/build-api.txt
2013-03-21 23:01:34 +01:00
Hans de Goede
df6bc6269e Prepare for a 0.12.5 release
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-03-06 16:19:56 +01:00
Hans de Goede
c0808ab884 vd_agent: Add a new VD_AGENT_CLIENT_DISCONNECTED message
Client -> agent messages can spawn multiple VDIChunks. When this happens
the agent re-assembles the chunks into a complete VDAgentMessage before
processing it. The server only guarentees coherency at the chunk level,
so it is not possible for a partial chunk to get delivered to the agent.

But it is possible for some chunks of a VDAgentMessage to be delivered to
the agent followed by a client to disconnect without the rest of the
VDAgentMessage being delivered!

This will leave the agent in a wrong state, and the first messages send to it
by the next client to connect will get seen as the rest of the VDAgentMessage
from the previous client.

This patch introduces a new VD_AGENT_CLIENT_DISCONNECTED message which the
server will send from the VDP_SERVER_PORT on client disconnect, on which the
agent can then reset its VDP_CLIENT_PORT state.

Note that no capability is added for this, since capabilities are tracked
between the client and the agent only. The server will simply always send
this message on client disconnect, relying on older agents discarding the
message since it has an unknown type (which both the windows and linux agents
already do).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-03-05 14:41:09 +01:00
Hans de Goede
4fde54a2c6 vd_agent: Add a VD_AGENT_FILE_XFER_STATUS_SUCCESS result value
Currently the sender of a file xfer assumes success on having send the
last data bytes. But the transfer may still fail on the other side.

This commits adds a VD_AGENT_FILE_XFER_STATUS_SUCCESS result value instead.

Since we have not done an agent release with file-xfer support yet, the client
code can simply assume that it will always get *a* VD_AGENT_FILE_XFER_STATUS_
message for a transfer now. As for the existing spice-gtk release with
file-xfer support, if it talks to an agent sending this message, this will
trigger a g_return_if_fail, which is not really pretty, but has no negative
side-effects other then an error message being logged.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-02-28 14:02:18 +01:00
Marc-André Lureau
cf9600ad6e Post-release bump 2013-02-01 04:34:54 +01:00
Marc-André Lureau
6fd73785bb Release 0.12.4 2013-01-30 14:58:02 +01:00
Marc-André Lureau
720af3dff7 controller: add proxy message
Add a new string message for sending proxy details.
CONTROLLER_PROXY (ControllerData, string)

The value must be of the form [protocol://]<host>[:port]

The proxy string may be specified with a protocol:// prefix to specify
alternative proxy protocols.

If no protocol is specified in the proxy string or if the string
doesn't match a supported one, the proxy will be treated as a HTTP
proxy.
2013-01-28 14:29:15 +01:00
Hans de Goede
19198574ad vd_agent.h: add a VD_AGENT_CAP_SPARSE_MONITORS_CONFIG capability (rhbz#881072)
Currently the agent expect a monitor config to be continuous. If the user has
3 monitors (3 spice display windows) open and tries to disable the 2nd one,
then instead of the 2nd one being closed, the 3th one ends up closed.

To be able to fix this we need to be able to send a sparse monitor config
to the agent. A monitor being disabled in such a sparse config is simply
represented by its width and height being 0 in its VDAgentMonConfig.

Since old versions of the agent won't be capable of dealing with such a
0x0 sized monitor, this patch adds a new VD_AGENT_CAP_SPARSE_MONITORS_CONFIG
capability to signal to the client that the agent understands this, and
the client should only send sparse monitor configs to agents with this
capability.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-01-18 11:53:00 +01:00
Marc-André Lureau
2c010feeff build-sys: post-release bump 2013-01-16 13:51:10 +01:00
Dunrong Huang
a484ca8095 vd_agent.h: add file copy support
At present, Vmware and Virtualbox has supported file drag&drop feature,
I think it's a good feature for users, so we want qemu/spice to
supports it.

This patch first adds communication protocol between client and guest,
we must make the agent protocol stable before coding, this is what we
want this patch to do.

This feature has been discussed on spice mailing list.

The more details are available at following pages:
http://lists.freedesktop.org/archives/spice-devel/2012-November/011400.html
and
http://lists.freedesktop.org/archives/spice-devel/2012-November/011485.html

Signed-off-by: Dunrong Huang <riegamaths@gmail.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Alon Levy <alevy@redhat.com>
Cc: Uri Lublin <uril@redhat.com>
2013-01-11 21:55:31 +01:00
Hans de Goede
544b8ef187 Release 0.12.3 2012-12-20 15:49:10 +01:00
Marc-André Lureau
f188fb7a89 Add a "port" channel
A Spice port channel carry arbitrary data between the Spice client and
the Spice server. It may be used to provide additional services on top
of a Spice connection. For example, a channel can be associated with
the qemu monitor for the client to interact with it, just like any
qemu chardev. Or it may be used with various protocols, such as the
Spice Controller.

A port kind is identified simply by its fqdn, such as org.qemu.monitor,
org.spice.spicy.test or org.ovirt.controller...

The channel is based on Spicevmc which simply tunnels data between
client and server. A few messages have been added:

SPICE_MSG_PORT_INIT: Describes the port state and fqdn name, should be
sent only once when the client connects.

SPICE_MSG_PORT_EVENT: Server port event. SPICE_PORT_EVENT_OPENED and
SPICE_PORT_EVENT_CLOSED are typical values when the chardev is opened
or closed.

SPICE_MSGC_PORT_EVENT: Client port event.
2012-12-05 11:24:05 +01:00
Marc-André Lureau
52ac6053a7 Add port channel enum values
The channel is based on Spicevmc which simply tunnels data between
client and server. A few messages have been added:

SPICE_MSG_PORT_INIT: Describes the port state and fqdn name, should be
sent only once when the client connects.

SPICE_MSG_PORT_EVENT: Server port event. SPICE_PORT_EVENT_OPENED and
SPICE_PORT_EVENT_CLOSED are typical values when the chardev is opened
or closed.

SPICE_MSGC_PORT_EVENT: Client port event.

(See related spice.proto change in spice-common)
2012-11-30 13:41:55 +01:00
Christophe Fergeau
5b6127b207 Update git.mk to latest version
This way it will be in sync with spice-common and spice-gtk
2012-09-21 15:48:39 +02:00
Alon Levy
8c4e68701e update NEWS for release 0.12.2 2012-09-15 20:34:34 +03:00
Alon Levy
431ca865df Release 0.12.2
New in this release:
 display channel: A8 surface capability
 qxl: client present, client capabilities and client monitors configuration.
2012-09-12 16:54:11 +03:00
Alon Levy
d1a6f3dfd8 qxl_dev.h: add client monitors configuration notification to guest
So far we have used the agent to notify the guest of a request to change
the monitors configurations (heads) on the qxl device. This patch introduces
a new interrupt and new fields in the qxl rom to notify the guest about
a new request, similarly to how physical hardware notifies the driver.

We compute crc over the monitors configuration to avoid host-write from a
following update while guest-read corruption. The update protocol is:

qemu:
  (2) fill QXLRom::client_monitors_config
  (3) raise QXL_INTERRUPT_CLIENT_MONITORS_CONFIG

guest:
  (1) clear QXL_INTERRUPT_CLIENT_MONITORS_CONFIG bit in irq status
  (2) read QXLRom::client_monitors_config
  (3) (verify-crc)? done : goto 2

If the interrupt mask is ~0 or 0, or does not have
QXL_INTERRUPT_CLIENT_MONITORS_CONFIG set, we also assume it doesn't support
this interrupt.
2012-09-12 16:54:08 +03:00
Søren Sandmann Pedersen
361fd166b2 Add new client_present and client capabilities fields to QXLRom
The client_present field is a byte that is set of non-zero when a
client is connected and to zero when no client is connected.

The client_capabilities[58] array contains 464 bits that indicate the
capabilities of the client. Each bit corresponds to a
SPICE_DISPLAY_CAP_* capability. In particular, if the client has
capability C, then bit (C % 8) in byte (C / 8) is set. The capability
bits only have a defined meaning when a client is connected, ie., when
client_present is non-zero. The number 58 was chosen to fill out a
cache line in QXLRom.

A new QXL_INTERRUPT_CLIENT interrupt is defined, which will be raised
whenever a client connects or disconnects.
2012-09-02 15:15:29 -04:00
Søren Sandmann Pedersen
8459b35ec0 Add A8 surface capability
Even though the ability to handle a8 surfaces was added at the same
time as the composite command, they are logically separate, so add a
capability bit to indicate the presence of a8 surfaces.
2012-09-02 15:14:56 -04:00
Alon Levy
6e42db2750 Release 0.12.1 2012-09-02 21:18:38 +03:00
Marc-André Lureau
911dac9d60 inputs: add a INPUTS_KEY_SCANCODE message
Add a new arbitrary keyboard scancodes message.

For now, it will be used to avoid unwanted key repeatition when there
is jitter in the network and too much time between DOWN and UP
messages, instead the client will send the press & release scancode in
a sequence.

See also: https://bugzilla.redhat.com/show_bug.cgi?id=812347
2012-08-27 17:12:07 +02:00
Marc-André Lureau
3b619bd9c1 inputs: add an INPUTS_KEY_SCANCODE message
Add a new arbitrary keyboard scancodes message.

For now, it will be used to avoid unwanted key repeatition when there
is jitter in the network and too much time between DOWN and UP
messages, instead the client will send the press & release scancode in
a sequence from a single message.

If the server doesn't support INPUTS_CAP_KEY_SCANCODE, the client is
responsible to handle a fallback mode with the exisiting KEY_DOWN and
KEY_UP messages.

See also: https://bugzilla.redhat.com/show_bug.cgi?id=812347
2012-08-27 17:10:48 +02:00
Yonit Halperin
76712d6afa support seamless migration
see spice-protocol for more details
commit 3838ad140a
2012-08-27 09:06:26 +03:00
Yonit Halperin
6838a4fed0 add SPICE_MSG_MAIN_AGENT_CONNECTED_TOKENS
The msg is used for setting the number of allocated client tokens when
we notify the client that the agent is attached.
2012-08-27 09:02:05 +03:00
Yonit Halperin
3838ad140a seamless migration support
The main difference between semi-seamless and seamless migration is that
while in semi-seamless migration the state of all the channels is
being completely reset after migration is complete, in seamless migration
the essential parts of the state are restored on the server side, and
are left the same on the client side. semi-seamless migration is
equivalent to having the client disconnect from the src and connected
from scratch to the dest, with the exception, that the handshake with
the dest server occurs before the client has disconnected from the src.
In semi-seamless migration in-flight data gets lost, e.g., a file
transfer to a usb device might be disrupted.

=======================
===protocol details====
=======================

Let s1, s2, and c be the src server, dest server and client, respectively.

Semi-Seamless migration protocol
================================

pre-migration phase:
--------------------
(1) s1->c: SPICE_MSG_MAIN_MIGRATE_BEGIN
    In response, c tries to establish a connection to s2. After the connection is
    established, it is inactive (the client doesn't attempt to read or
    write messages from/to it)
(2) c->s1: SPICE_MSGC_MAIN_MIGRATE_CONNECTED or
           SPICE_MSGC_MAIN_MIGRATE_CONNECT_ERROR

post migration phase:
---------------------
(1) s1->c: SPICE_MSG_MAIN_MIGRATE_END or
           SPICE_MSG_MAIN_MIGRATE_CANCEL
    In case of the former, c disconnects from s1, resets all its
    channels states and switches to an active connection with s2.
(2) c->s2: SPICE_MSGC_MAIN_MIGRATE_END
    The msg signals that all the channels have been migrated successfully to s2.

Seamless migration protocol
===========================

pre-migration phase:
--------------------
In case qemu/libvirt/client do not support seamless migration,
s1 takes the semi-seamless pathway for migration. Otherwise:

(1) s1->c: SPICE_MSG_MAIN_MIGRATE_BEGIN_SEAMLESS (*New*)
    The msg includes the version of the migration protocol
    of s1.
    In response c tries to establish a connection to s2.
(2)
    If the connection fails:
    (2.1) c->s1: SPICE_MSGC_MAIN_MIGRATE_CONNECT_ERROR

    If s2 supports SPICE_MAIN_CAP_SEAMLESS_MIGRATE:
    (2.2) c->s2: SPICE_MSGC_MAIN_MIGRATE_DST_DO_SEAMLESS (*New*)
          The msg includes the version of the migration protocol
          of s1. The msg is used for querying s2 if seamless migration
          is possible, given the migration protocol version of s1.

      (2.2.1) s2->c: SPICE_MSG_MAIN_MIGRATE_DST_SEAMLESS_ACK/NACK (*New*)
      (2.2.2) c->s1: SPICE_MSGC_MAIN_MIGRATE_CONNECTED_SEAMLESS (*New*) or
                     SPICE_MSGC_MAIN_MIGRATE_CONNECTED
              The latter is sent when c receives SEAMLESS_NACK, and
              indicates s1 to apply semi-seamless protocol on post
              migraion phase.

    If s2 does not support SPICE_MAIN_CAP_SEMI_SEAMLESS_MIGRATE:
    (2.3) c->s1: SPICE_MSGC_MAIN_MIGRATE_CONNECTED
          (see 2.2.2)

post migration phase:
---------------------
While the pre migration phase was conducted by the main channel, this
phase's protocol occurs in all the migrated channels.

(1) s1->c: SPICE_MSG_MIGRATE
    The msg marks the client that the connection is paused from s1 side, and
    next to this msg, the only possible msg s1 can send is
    SPICE_MSG_MIGRATE_DATA

    msg optional flags:
    (a) MIGRATE_FLUSH_MARK
        This flag is required for finalizing the channel connection
        without losing any in-flight data.
        This flag indicates that s1 expects SPICE_MSGC_MIGRATE_FLUSH_MARK,
        for signaling that c will pause the connection and not send any more messages
        to s1.
    (b) MIGRATE_DATA
        The flag indicates that c should receive from s1
        SPICE_MSG_MIGRATE_DATA
(2) c->s1: SPICE_MSGC_MIGRATE_FLUSH_MARK (if required)
    c pushes the msg to the head of its output msg queue,
    and sends it before all its other pending msgs - they will be sent to s2
    later.
(3) s1->c: SPICE_MSG_MIGRATE_DATA (if required)
    The msg contains all the data that the server requires for restoring
    the channel's state on s2 side correctly.
(4) c disconnects the channel from s1 and switches to an active connection
    with s2.
(4) c->s2: SPICE_MSGC_MIGRATE_DATA
2012-08-27 08:59:46 +03:00
Yonit Halperin
c20bc58c4e add SPICE_MSG_MAIN_AGENT_CONNECTED_TOKENS
Similarly to SPICE_MSG_AGENT_CONNECTED, the msg notifies the main
channel about attaching an agent. In addition the msg also contains the
number of tokens allocated to the client.
2012-08-27 08:59:46 +03:00
Søren Sandmann Pedersen
b3eba427bf Add support for A8 images to the LZ routines
This format is needed to add Render support to the X driver, so we
need the ability to compress and decompress it.
2012-08-24 13:37:51 -04:00
Søren Sandmann Pedersen
473a14b39f Add support for QXLComposite to the Spice protocol headers
This new command is intended to be used for implementing the Composite
request from the Render X extension. See

   http://www.x.org/releases/current/doc/renderproto/renderproto.txt

for a description of the Render extension.

Composite has three fields: src, mask and destination, of which mask
is optional (can be NULL). There are also two pointers to
transformations, one for each of src and mask.

The command also has 32 bits of flags which indicates

- which compositing operator to use
- which filters to apply when sampling source and mask
- which repeat mode to apply when sampling source and mask
- whether the mask should be considered to have 'component alpha'
- whether the alpha channel of any of the images should be ignored.

The last one of these features is necessary because in the X protocol
an offscreen surface is simply a collection of bits with no visual
interpretation. In order for Render to use these bits, a wrapper
object is used that contains the pixel format. Since one offscreen
surface can be wrapped by multple objects, there is not a one-to-one
correspondence between pixel formats and surfaces.

In SPICE surfaces do have an associated pixel format, which means the
above feature of Render cannot be supported without adding a similar
concept to the wrapper object to the SPICE protocol. However, the most
common use for having multiple wrappers for one offscreen surface is
to interpret an alpha surface as not having an alpha channel or vice
versa.
2012-08-22 10:58:17 -04:00
Søren Sandmann Pedersen
1d65b9016f Add an 8BIT_A format
This format corresponds to a sequence of bytes, each of which
represents an alpha value.
2012-08-13 10:42:49 -04:00
Marc-André Lureau
1e378a1049 Release 0.12.0 2012-07-16 18:32:25 +02:00
Alon Levy
e85c454a1e support multiple monitors in single display channel
See spice-protocol commit for details:
 da908f89b5
 support multiple monitors on a single display channel
2012-07-12 19:50:40 +03:00
Alon Levy
da908f89b5 support multiple monitors on a single display channel
Adds on device:

RAM
 Header
  monitors_config - pointer

 QXLMonitorsConfig
  count == n
  max_allowed = N >= 0
  QXLHead 1
  ...
  QXLHead n
   id, surface_id, x, y, width, height, flags

IO:
 QXL_IO_MONITORS_CONFIG
  server flushes command ring, then calls server callback for changing monitors config.

New revision to let the driver know about the new io:
 QXL_REVISION_STABLE_V12=0x04,

Adds server/client capability:
 SPICE_DISPLAY_CAP_MONITORS_CONFIG

Server message will be added in spice-server and spice-common.

Version is bumped to 0.12.0 to indicate new IO and structs
2012-06-27 16:57:05 +03:00
Alon Levy
86eb1a334e enums.h: update for smartcard updated spice.proto 2012-06-22 17:20:51 +03:00
Alon Levy
8738ce1c5e smartcard: build fixes for spice server
Define different enums that have a SPICE_ prefix to not conflict with same
value enums from libcacard/vsccard_common.h, and continue to use the same
SPICE_MSG_SMARTCARD_DATA and SPICE_MSGC_SMARTCARD_DATA enum that is used by the
server and clients (spice-gtk, spicec) alike.
2012-06-14 13:53:46 +03:00
Alon Levy
341f33cbdb python_modules/ptypes.py/EnumBaseType.c_enumname: add missing return to fix broken enums generation
Fixes the resulting enums.h from the invocation of:
./spice_codegen.py --generate-enums spice.proto spice-protocol/spice/enums.h

Right now any enum will contain None as the enum members, with this fix
it will contain the real enum members, i.e. SPICE_FOO.
2012-06-14 13:53:46 +03:00
Marc-André Lureau
26cd1946a5 Add QXL_ESCAPE_SET_CUSTOM_DISPLAY
QXL_ESCAPE_SET_CUSTOM_DISPLAY is Windows specific message
to tell the display & miniport driver to update the mode
table with a custom resolution.

The mode table needs to be forcefully refreshed after
setting a custom display, it can be done by querying an
invalid/unknown mode:

EnumDisplaySettings(dev_name, 0xffffff, &tempDevMode);
2012-05-11 18:19:25 +02:00
Alon Levy
0d01de3108 Release 0.10.3 2012-05-08 18:23:02 +03:00
Yonit Halperin
543faaf796 video streaming: add support for frames of different sizes
rhbz #813826, #815426

Add SPICE_MSG_DISPLAY_STREAM_DATA_SIZED, for stream_data message
that also contains the size and destination box of the data.
The server can send such messages only to clients with
SPICE_DISPLAY_CAP_SIZED_STREAM.
2012-05-02 14:47:29 +03:00
Yonit Halperin
bf0daeb3a3 video streaming: add support for frames of different sizes
rhbz #815422

Add SPICE_MSG_DISPLAY_STREAM_DATA_SIZED, for stream_data message
that in addition to the mjpeg data, also contains the
(1) width and height of the compressed frame.
(2) the destination box of the frame.
The server can send such messages only to clients with
SPICE_DISPLAY_CAP_SIZED_STREAM.

When playing a youtube video on Windows guest, the driver sometimes sends
images which contain the video frames, but also other parts of the
screen (e.g., the youtube process bar). In order to prevent glitches, we send these
images as part of the stream, using SPICE_MSG_DISPLAY_STREAM_DATA_SIZED.
2012-04-24 08:25:28 +03:00
Alon Levy
8a20378425 qxl_dev: fix const cast warning for QXL_R[AO]M_MAGIC 2012-04-09 20:05:10 +03:00
Christophe Fergeau
725b5a9b53 demarshall: add missing parens in BE read_xxx functions
The missing parens causes build to fail on big-endian machines
2012-04-06 15:32:02 +02:00
Christophe Fergeau
2d24f61aae Add controller messages for USB redirection
This adds 3 new controller messages:

CONTROLLER_ENABLE_USB (ControllerValue, boolean)
CONTROLLER_ENABLE_USB_AUTOSHARE (ControllerValue, boolean)
CONTROLLER_USB_FILTER (ControllerData, string)

This fixes rhbz #807295
2012-04-03 10:31:57 +02:00
Christophe Fergeau
f799ed89e8 Fix typo in comment 2012-04-03 10:31:29 +02:00
Yonit Halperin
8cf92f0423 controller: add COLOR_DEPTH and DISABLE_EFFECTS messages
rhbz #787447

Signed-off-by: Yonit Halperin <yhalperi@redhat.com>
2012-04-02 10:12:57 +03:00
Marc-André Lureau
534d35cc32 build-sys: make it a seperately buildable spice-common library
- autotoolize
- fix headers inclusion
- generate gitignores
- workaround serverSMARTCARD support with dirty hack...
2012-03-22 20:21:05 +01:00
Marc-André Lureau
15dba2901b spice.proto: fix demarshaller crash with name message
It turned out the demarshaller wasn't allocating enough space to
memcpy the name. In order to take into account the size of a variable
array, it needs to be marked with the @end tag so that the
"extra_size" is added to the allocated memory.

It would be nice if the demarshaller would somehow fail if this wasn't
set explicitly, or do the right thing by default.

@end the name so that demarshaller
2012-03-21 13:24:17 +01:00
Marc-André Lureau
3215ddd6cd codegen: ifdef/endif function declaration too
Compile out part that we are not supporting.  In the future, we might
want to declare a fake type and an empty function to keep API
compatibility
2012-03-21 13:24:17 +01:00
Marc-André Lureau
055c68ccdd codegen: include headers locally 2012-03-21 13:24:17 +01:00
Marc-André Lureau
ecce70452f codegen: struct marshallers are not current function helper
This solves the issue of struct_marshallers being included within the
current ifdef/endif body, although they are independant functions.
2012-03-21 13:24:16 +01:00
Christophe Fergeau
94a46ebc2a use new @ifdef directive for smartcard messages
We don't want to conditionally compile the smartcard messages
depending on whether USE_SMARTCARD is set or not, we can now use
the @ifdef attribute for that.
2012-03-20 15:31:30 +01:00
Christophe Fergeau
617b0adac3 add smartcard bits to spice.proto 2012-03-20 15:31:30 +01:00
Hans de Goede
ca57afda34 spice_codegen: Always write a channels entry for an ifdef-ed channel
Before this patch, if a channel is defined conditionally in spice.proto
(because it depends on external headers like the smartcard channel),
spice_codegen would write an entry to the channels array in
spice_get_*_channel_parser which would only take up a place in the array
if the ifdef condition is true, thus moving up all other intializers
one place when it is not true. This was causing issues (crashes) when building
spice-gtk with the combination of usbredir support enabled and smartcard
support disabled.

This patch fixes this by adding #else { NULL, 0 }, to the generated code.

Thanks to coolper chen <lixin.chen@saicocch.com> for reporting this!

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-03-20 15:31:30 +01:00
Christophe Fergeau
12a5ce3dc5 handle @ifdef on messages and channels 2012-03-20 15:31:30 +01:00
Christophe Fergeau
0067c31bad allow attributes on channel elements in .proto files
We want to be able to add an @ifdef annotation to optional messages
For example, we want to compile in the smartcard messages only if
libcacard is available
2012-03-20 15:31:30 +01:00
Christophe Fergeau
d8975877c6 add ifdef/endif methods to spice code generator
These methods will be needed to be able to make some fields optional
in spice.proto
2012-03-20 15:31:30 +01:00
Christophe Fergeau
7f23ab54aa fix copy & paste error in ptypes.py 2012-03-20 15:31:30 +01:00
Marc-André Lureau
7220080972 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
Marc-André Lureau
36ea49b686 demarshal: fixed-size array are missing __nelements
A message with a fixed-size array, such as uint8 uuid[16] will
generate an invalid code, missing the __nelements variable. Make sure
that variable is defined.
2012-03-20 15:25:56 +01:00
Daniel P. Berrange
ce59cc1416 Remove trailing blank lines
Remove any blank lines at the end of all source files
2012-03-20 15:25:55 +01:00
Yonit Halperin
b444b76655 spice.proto: add SPICE_MSG_LIST to base channel 2012-03-20 15:25:54 +01:00
Hans de Goede
cdb54a8fa5 codegen: Fix enums.h generation
With the new usbredir code we have the new concept of the abstract /
generic spicevmc channel type (which just tunnels data from a qemu chardev),
and we've the usbredir channel, which is the only current user of this.

This was reflected in the protocols enum in spice-protocol.h by a manual
edit done by me, my bad. This patch teaches spice.proto about the relation
between the abstract spicevmc channel and the usbredir channel and
modifies codegen to deal with this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-03-20 15:25:54 +01:00
Yonit Halperin
f74d9176a7 spice.proto: add SPICE_MSG_MAIN_MIGRATE_END & SPICE_MSGC_MAIN_MIGRATE_END
(cherry picked from commit cfbd07710562e522179ae5a7085a789489a821bb branch 0.8)
2012-03-20 15:25:54 +01:00
Yonit Halperin
b530ce7ea2 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
Alon Levy
40ef2d5459 spice.proto: add comment for origin of STYLED and START_WITH_GAP 2012-03-20 15:25:54 +01:00
Hans de Goede
85da46bacd server: Add a usbredir channel 2012-03-20 15:25:54 +01:00
Christophe Fergeau
4b6598dc02 don't #include config.h in generated header files
7e30572ab adds a #include <config.h> to the beginning of generated
files. It also does this for generated headers and enums files,
which is not wanted, especially if it's an installed file. This
commit only adds this include for the non-header non-enum case
(hopefully, enums are only generated for use in a .h file).
2012-03-20 15:25:53 +01:00
Christophe Fergeau
a11615f713 add check for pyparsing
Check both in configure.ac (after checking if we need to rebuild
the marshalling files) and in the python script using pyparsing
(for people modifying .proto files in tarballs)
2012-03-20 15:25:53 +01:00
Marc-André Lureau
da5cad88e3 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
Marc-André Lureau
bbd93cdb6b python: remove c-ism trailing ; 2012-03-20 15:25:53 +01:00
Marc-André Lureau
d14c99b84f codegen: typedef the protocol enums
Commit 9d5ef9beec in spice-protocol
introduced a typedef manually in the generated enums.h header.

This patch adds them automatically to all enums during enums.h generation.
2012-03-20 15:25:53 +01:00
Christophe Fergeau
12be0ad2ae add comment to beginning of autogenerated files 2012-03-20 15:25:52 +01:00
Christophe Fergeau
975ebc9b7d add config.h to autogenerated files too
Modify the python (de)marshaller generator to add #include
<config.h> at the beginning of the C files it generates
2012-03-20 15:25:52 +01:00
Alon Levy
fbead3281f spice.proto: Fill.rop_descriptor type s/uint16/ropd (10x atiti) 2012-03-20 15:25:51 +01:00
Alon Levy
f7986c2b0d python_modules/codegen.py: fix indent error in an unused function 2012-03-20 15:25:51 +01:00
Uri Lublin
a2257eff31 spice-client migration: fix minor for old migration support.
For not too old spice-migration, minor is 1.
For older (ancient) spice-migration, minor is 0.

Affects only VM migration while a spice client is connected.
2012-03-20 15:25:51 +01:00
Alon Levy
3a6de6d6fb demarshaller/marshaller fix gcc 4.6.0
python_modules/demarshal.py and marshal.py fixes for gcc 4.6.0
warning about set but unused variables. The fixes disable creating
of variables mem_size when they are not used (demarshall) and
declaring a src variable when the message doesn't use it (marshal).

You need to touch *.proto after applying this (should add a Makefile
dependency).
2012-03-20 15:25:50 +01:00
Alon Levy
d6f198b3f4 codegen: avoid creating out if not used (fix gcc 4.6.0 warning) 2012-03-20 15:25:50 +01:00
Alon Levy
11269608a7 mingw32 build: python_modules/marshal: use unsigned for for_loop index variable 2012-03-20 15:25:50 +01:00
Alon Levy
8a40c89280 smartcard: add to spice.proto 2012-03-20 15:25:50 +01:00
Alon Levy
005ecaa7d6 spice codegen: fix copy-o, no such variable value 2012-03-20 15:25:50 +01:00
Alon Levy
aa7a086933 support python 2.5.4+ for marshaller/demarshallers
Patch adds a "from __future__" import that doesn't affect newer python's but
allows python 2.5.4 to run the code (tested under scratchbox, n900 build environment)
2012-03-20 15:25:49 +01:00
Alexander Larsson
aae971c6ab demarshaller: Fix palette marshalling
It turns out that using base + sizeof(struct) is not a good way to
access an array at the end of a struct. For SpicePalette sizeof is 16, but
offset of ents is 12. Using this calculation in the demarshaller breaks
things badly, so now we use the actual array member.
2012-03-20 15:25:49 +01:00
Alexander Larsson
7861ba0921 Don't send padding over the network with video data 2012-03-20 15:25:49 +01:00
Alexander Larsson
12bc82da5c Fix uninitialized variable warnings 2012-03-20 15:25:49 +01:00
Alexander Larsson
4702feb5b1 Don't send CursorHeader if cursor_flags is NONE 2012-03-20 15:25:49 +01:00
Alexander Larsson
f3d92c736b Send Clip.rects inline rather than using a pointer 2012-03-20 15:25:49 +01:00
Alexander Larsson
f008b7605d codegen: Allow @to_ptr to make inline structs demarshal as pointers 2012-03-20 15:25:49 +01:00
Alexander Larsson
d9629ca4e7 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
373993f32c codegen: Pass member to SubMarshallingSource rather than name
This way we can check attributes on the member.
2012-03-20 15:25:48 +01:00
Alexander Larsson
e6240ee0b0 codegen: Remove unused methos has_pointer() 2012-03-20 15:25:48 +01:00
Alexander Larsson
9e2e061bea Don't marshall bitmap data as pointer, instead send inline 2012-03-20 15:25:48 +01:00
Alexander Larsson
42c5286ca6 Make distcheck work 2012-03-20 15:25:48 +01:00
Alexander Larsson
adce65685f 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
a09be53ea8 Fix inclusion of common files, no need for common/ part 2012-03-20 15:25:48 +01:00
Alexander Larsson
74f9cd9f73 codegen: No SPICE_ADDRESS types left, drop @c_ptr 2012-03-20 15:25:47 +01:00
Alexander Larsson
2952d5bd9a Properly parse QXLLineAttrs.style 2012-03-20 15:25:47 +01:00
Gerd Hoffmann
0ed056da99 Properly parse QXLImage to the new-world SpiceImage
SpiceImage now replaces RedImage and has all image types in it.
All image data are now chunked (and as such not copied when demarshalling).
2012-03-20 15:25:47 +01:00
Alexander Larsson
4a12b9c0dd codegen: support @chunk on non-pointer arrays
This is similar to @as_ptr, but generates a single chunk of data.
2012-03-20 15:25:47 +01:00
Alexander Larsson
1b432de3b9 Add support for @chunk 2012-03-20 15:25:47 +01:00
Alexander Larsson
5492b3ccae marshaller: Make get_nw_offset() handle deep member references 2012-03-20 15:25:47 +01:00
Alexander Larsson
6ca5b39e6f Convert SpicePath.segments to a pointer array 2012-03-20 15:25:47 +01:00
Alexander Larsson
bb1d862989 Handle extra size for switch and array the right way
Even for is_extra_size() we should calculate the mem_size for
arrays, its just that the parent type (in this case switch) should
request mem_size if the type is_extra_size.
2012-03-20 15:25:47 +01:00
Alexander Larsson
daaf4865d8 marshaller: Add some docs describing the types of sizes 2012-03-20 15:25:47 +01:00
Alexander Larsson
32481bf381 marshaller: Make @nonnull a propagated attribute
This cleans up some stuff
2012-03-20 15:25:47 +01:00
Alexander Larsson
f22381505d marshaller: Make @c_ptr a propagated attribute
This simplifies some code
2012-03-20 15:25:47 +01:00
Alexander Larsson
fefc89c6c4 marshaller: Add generic way to handle propagating attributes
Also switches @ptr_array to use this
2012-03-20 15:25:47 +01:00
Gerd Hoffmann
6228ae633e Properly parse and marshall SpiceString 2012-03-20 15:25:46 +01:00
Alexander Larsson
8ec1247dbe 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
6d38c4817f 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
68e29d0d19 Automatically marshall SpiceClipRects 2012-03-20 15:25:46 +01:00
Alexander Larsson
e191e47238 Automatically marshall SpicePath 2012-03-20 15:25:46 +01:00
Alexander Larsson
02a429e46e Support @marshall to automatically marshall pointers 2012-03-20 15:25:46 +01:00
Alexander Larsson
e42c910b5c 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
140cf2aa79 Update client and protocol to support the new SpiceClipRects 2012-03-20 15:25:46 +01:00
Alexander Larsson
13f8149daf 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
dcaba909d3 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
f2d7fbdb19 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
54fc0642e1 qxl abi: parse QXLOpaque.
Also adapt to tyops fix (s/rop_decriptor/rop_descriptor/).
2012-03-20 15:25:45 +01:00
Gerd Hoffmann
435b1515a7 qxl abi: parse QXLFill.
Also adapt to tyops fix (s/rop_decriptor/rop_descriptor/).
2012-03-20 15:25:45 +01:00
Alexander Larsson
144b2fbd75 Fix build error due to member "SpiceMsgEmpty" same name as type 2012-03-20 15:25:45 +01:00
Alexander Larsson
302788f147 spice.proto: surface_create.format is of type surface_fmt 2012-03-20 15:25:45 +01:00
Alexander Larsson
8b4ab9026d 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
7578be4a23 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
fc30c38a94 spice.proto: No need for @ptr32 as that is now the default 2012-03-20 15:25:45 +01:00
Alexander Larsson
baa0718cec 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
31fd48e773 Don't send zero data item for clips with no data 2012-03-20 15:25:45 +01:00
Alexander Larsson
1d5d5272e2 Make pointers 32bit in new protocol format 2012-03-20 15:25:45 +01:00
Alexander Larsson
db5b8fa673 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
32dbd8a6a5 Fix handling of @ptr32 network size 2012-03-20 15:25:45 +01:00
Alexander Larsson
2ef7116925 Remove minor markup in unstable protocol as we're resetting minor to 0 2012-03-20 15:25:45 +01:00
Alexander Larsson
fbf883085f Add spice1.proto describing the 0.4 version of the network protocolx 2012-03-20 15:25:44 +01:00
Alexander Larsson
ee944c8314 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
9f3a36f3f9 Make internal generated marshaller functions static 2012-03-20 15:25:44 +01:00
Alexander Larsson
2523cec8c4 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
38412df9aa 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
f9610c1a65 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
1f3c193ceb 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
e8ee21132b applying zlib compression over glz on WAN connection 2012-03-20 15:25:44 +01:00
Alexander Larsson
b49b77d8e9 Make generated marshallers build on win32 2012-03-20 15:25:44 +01:00
Alexander Larsson
a0a1907716 Make sound data @as_ptr to avoid copying data 2012-03-20 15:25:44 +01:00
Alexander Larsson
4b670111a0 Make ping data @as_ptr to avoid copying data 2012-03-20 15:25:44 +01:00
Alexander Larsson
98d3b1d5c3 Make cursor data @as_ptr to avoid copying data 2012-03-20 15:25:44 +01:00
Alexander Larsson
41c07b938b Support @as_ptr in demarshaller to avoid copying data unnecessary 2012-03-20 15:25:44 +01:00
Alexander Larsson
405900c4a2 Allow multiple --include args 2012-03-20 15:25:43 +01:00
Alexander Larsson
d802d7e7f8 Make tunnel_service_add members be of cstring array size 2012-03-20 15:25:43 +01:00
Alexander Larsson
3114699378 Use @ptr32 for 32bit offsets in spice.proto 2012-03-20 15:25:43 +01:00
Alexander Larsson
27238241f0 Add @nomarshal in a few places where we're marshalling manually 2012-03-20 15:25:43 +01:00
Alexander Larsson
a4cb48f1ba 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
79bd3284c6 Add support for generating message and structure marshallers 2012-03-20 15:25:43 +01:00
Alexander Larsson
809524ac5d Add python code to automake system 2012-03-20 15:25:43 +01:00
Alexander Larsson
b1dc7fae2a 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
Marc-André Lureau
32da251a65 build-sys: use git.mk 2012-03-19 21:12:18 +01:00
Marc-André Lureau
1a3b563171 Add name & uuid messages on main channel
This allows a client to identify a Spice server. This can be useful to
associate data/configuration with this particular server.

The corresponding main channel messages are:

    message {
	uint8 uuid[16];
    } uuid;

    message {
	uint32 name_len;
	uint8 name[name_len] @end @nomarshal; \* \0 terminated *\
    } name;

Those messages are sent by the server only if the capability
SPICE_MAIN_CAP_NAME_AND_UUID is available on the client, and the
server has the relevant data.
2012-03-05 18:12:42 +01:00
Marc-André Lureau
d5edafd28a build: include spice/types.h in foreign_menu_prot.h
The header uses some types only defined in stdint.h. Apparently, the
rest of the headers include types.h for that.
2012-02-23 22:18:34 +01:00
Marc-André Lureau
cda88623d0 build: clean up build to not be dirty after autogen 2012-02-22 15:37:58 +01:00
Marc-André Lureau
d9de9213f2 Add controller message ENABLE_SMARTCARD
The sent message must be a ControllerValue whose value is either '0'
disabled, or '1' enabled.
2012-02-17 17:39:22 +01:00
Yonit Halperin
54ef19ea33 Release 0.10.1 2012-01-12 16:29:02 +02:00
Yonit Halperin
49e2069467 Add support for mini header: an header without sub list & without serial
-Add SpiceMiniDataHeader.
-Introduce capability SPICE_COMMON_CAP_MINI_HEADER.

The advantage of using a header without sub list is to spare the 4 bytes that were sent
for a lot of messages without sublist.
Instead, messages that previously contained sub lists, will be split to two msgs.
The first one will be SPICE_MSG_LIST, holding the sub list, and the second will be the
main msg.
When most of the messages do not contain sub lists, the overhead of the additional 10 bytes
for the header of SPICE_MSG_LIST is negligible. In addition, if there is
only one message in the list, it can be sent independently.

Instead of sending the serial number of the messages, the client and
the server will increment local counters upon sending/receiving a
message.
2012-01-12 16:29:01 +02:00
Yonit Halperin
96ffd16e8a enums.h: add SPICE_MSG_LIST
- enums.h was generated from spice.proto
  * as a result SPICE_CHANNEL_USER_DEFINED_START, which was added
    manually, was removed. It is not used yet. If it is going to be used it
    can be added to protocol.h in the future.
- The new msg body is SpiceSubMessageList
2012-01-12 16:26:12 +02:00
Nahum Shalman
fee5c141ab Fix SPICE_STAT_SHM_NAME to be portable
From SHM_OPEN(3):
   For portable use, a shared memory object should be identified by a name
   of the  form  /somename; that is, a null-terminated string of up to
   NAME_MAX (i.e., 255) characters consisting of an initial slash,
   followed by one or more characters, none of which are slashes.
2012-01-08 13:44:20 +02:00
Alon Levy
7fcef3ed30 Release 0.10.0 2011-11-10 18:16:52 +02:00
Alon Levy
05a8178398 autogen.sh: handle ORIGDIR with spaces 2011-11-10 15:46:27 +02:00
Yonit Halperin
dbe61d9320 Release 0.9.1
Cherry-pick of abfdf4d8abf95d003678af5df814f3b1be1fd092 (Release 0.8.2)

semi-seamless migration RHBZ 738262

Conflicts:

	NEWS
	configure.ac
2011-10-02 12:17:47 +02:00
Hans de Goede
b1f84f219f Release 0.9.0 2011-08-25 14:08:41 +02:00
Hans de Goede
80cae9e1e4 NEWS: sync with 0.8 branch 2011-08-25 14:06:03 +02:00
Hans de Goede
72b225b9fc Change usbredir messages to spicevmc messages
While discussing various things with Alon in Vancouver, it came up that
having a channel which simply passes through data coming out of a qemu
chardev frontend unmodified, like the usbredir channel does, can be used
for a lot of other cases too. To facilitate this the usbredir channel code
will be turned into a generic spicevmc channel, which is just a passthrough
to the client, from the spicevmc chardev.

This patch renames the msg types to make clear that they are not usbredir
specific, but instead are generic spicevmc data passthrough messages. The
usbredir channel id is unmodified by this, although the same code and
messages can now be used for multiple purposes, we still need unique ids
for each purpose, so that the client knows how to interpret / represent the
passed through data.

Some examples of why having a generic spicevmc pass through is good:
1) We could add a monitor channel, allowing access to the qemu monitor from
the spice client, since the monitor is a chardev frontend we could re-use
the generic spicevmc channel server code, so all that is needed to add this
(server side) would be reserving a new channel id for this.

2) We could allow users to come up with new channels of their own, without
requiring qemu or server modification. The idea is to allow doing something
like this on the qemu startup cmdline:
-chardev spicevmc,name=generic,channelid=128

To ensure these new "generic" channels cannot conflict with newly added
official types, the must start at the SPICE_CHANNEL_USER_DEFINED_START value
this patch adds (128 or higher).

These new user defined channels could then either be used with a special
modified client, with client plugins (if we add support for those), or
by exporting them on the client side for use by an external ap, see below.

3) We could also add support to the client to make user-defined channels
end in a unix socket / pipe, allowing handling of the data by an external app,
we could for example have a new spice client cmdline argument like this:
--custom-channel unixsocket=/tmp/mysocket,channelid=128

This would allow for something like:
$random app on guest -> virtio-serial -> spicevmc chardev ->
 -> spicevmc channel -> unix socket -> $random app on client

4) On hind sight this could also have been used for the smartcard stuff,
with a 1 channel / reader model, rather then the current multiplexing code
where we've our own multiplexing protocol wrapper over the libcacard
smartcard protocol.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2011-08-25 11:12:34 +02:00
Hans de Goede
7dbb456c36 Add definitions and enums for usbredir channel
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2011-08-13 09:13:21 +02:00
Alon Levy
2d7dde5a3f bump version to 0.8.1 for qxl_dev.h changes 2011-07-17 13:20:53 +03:00
Alon Levy
af687a1457 qxl_dev: add third revision V10
The driver will check for this revision or higher to know that the device
supports async io, the two S3 related ios, and the interrupts IO_CMD and ERROR.
2011-07-17 13:19:48 +03:00
Alon Levy
e80cd6b8f9 qxl_dev: add QXL_INTERRUPT_ERROR
The interrupt is used to notify the guest driver it did an error in
the last io operation. It can be left unhandled.
2011-07-17 13:19:43 +03:00
Alon Levy
fbf2cfb145 add QXL_IO_FLUSH_{SURFACES,RELEASE} for sleep (S3) support
related RHBZ: 688883

Guest initiated sleep looks like this:

 Guest:
  (0) stop putting new commands into the rings
  (1) QXL_IO_FLUSH_SURFACES
      qxl calls flush_surfaces(), spice-server flushes command rings and
      renders all surfaces, thereby flushing state to device memory.
  (2) QXL_IO_DESTROY_ALL_SURFACES
      zap surfaces
  (3) QXL_IO_FLUSH_RELEASE
      push release queue head into the release ring, so the guest
      will see it and can release everything.
  (4) tell acpi to reset
 Qemu:
  (5) qxl_reset_handler
 Guest:
  (6) sends surface create commands

The QXL_IO_FLUSH_SURFACES is an optimization, to reduce vmexits. It is used to
 flush both command rings and update all surfaces at once (equivalent to
 UPDATE_AREA X NUM_ACTIVE_SURFACES)

 destroy all surfaces to release resources but not destroy the guest side surfaces
 get device to flush all server released resources to the release ring (could use multiple
  calls to OOM - but this is not well defined, would need to loop)
 After (1) there will be no memory allocated on the pci bars.
2011-07-17 13:19:36 +03:00
Gerd Hoffmann
7e30df2a8a Add async I/O commands.
Add async versions of the I/O commands which do not block and instead
raise the new QXL_INTERRUPT_IO_CMD when done.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-17 13:18:15 +03:00
Marc-André Lureau
f4d8de5bdf protocol: add SPICE_{PLAYBACK,RECORD}_CAP_VOLUME caps
These changes the protocol the following way:

When the client announces it has SPICE_PLAYBACK_CAP_VOLUME, the server
can send PlaybackChannel.{volume,mute} messages to notify of volume
changes (respectively for RECORD).

If the client doesn't implement SPICE_PLAYBACK_CAP_VOLUME, the server can
handle the volume changes the way it prefers, for example, ignoring them or
applying volume effect on the server side etc..
2011-06-22 12:01:10 +02:00
Marc-André Lureau
ec027d44b6 spice: enums.h regenerated 2011-06-22 11:55:11 +02:00
Arnon Gilboa
5bb6ff4fa6 macros: define INLINE
needed for spice/common files used by the client, server & qxl driver.
in windows _inline works for both c/c++, while inline is c++ only.
compiling the client with mixed c/c++ code required this define.
2011-05-12 11:45:58 +03:00
Christophe Fergeau
b95f8e77a5 protocol: set version number to 0.8.0
spice-protocol 0.8.0 has been released, but for some reason the
version number in the master branch was still at 0.6.3
2011-04-18 12:48:41 +02:00
Christophe Fergeau
8adf6bcf90 protocol: use packed-start/end to pack structures
spice-protocol comes with 2 headers to handle structure packing,
but controller_prot.h and foreign_menu_prot were both using their
own preprocessor definitions to handle packing. It's better to have
structure packing macros centralized since how it's done varies
between compilers, so it may need to change over time.
2011-04-11 13:01:57 +02:00
Marc-André Lureau
2ffbca2100 controller: add missing spice/types include 2011-04-11 12:44:28 +02:00
Hans de Goede
db3961d831 vd_agent.h: Add a VDP_END_PORT to the chunk port enum 2011-03-24 11:28:51 +01:00
Alon Levy
1a69e2bd75 qxl_dev: introduce defines for rings sizes 2011-03-07 20:46:58 +02:00
Alon Levy
a3b37c6a02 Merge branch 'master' of git://git.freedesktop.org/git/spice/spice-protocol 2011-03-03 11:42:03 +02:00
Marc-André Lureau
6eabd3f5fb protocol: add clipboard selection capability
Add a new capability VD_AGENT_CAP_CLIPBOARD_SELECTION.

When both client and servers have this capability, the
VDAgentClipboard* messages MUST be prepended with a uint8_t indicating
which clipboard selection to operate + 3 bytes stuffing for alignment
that could be used for future capabilities or extensions.

A few clipboard selection are defined according to X11/Gtk scheme:

- VD_AGENT_CLIPBOARD_SELECTION_CLIPBOARD: the default clipboard,
  implemented by most OS to deal with explicit Copy/Paste operations.

- VD_AGENT_CLIPBOARD_SELECTION_PRIMARY: the PRIMARY clipboard, used
  for mouse selections.

- VD_AGENT_CLIPBOARD_SELECTION_SECONDARY: the SECONDARY clipboard.

See also:
http://www.freedesktop.org/wiki/Specifications/ClipboardsWiki

https://bugs.freedesktop.org/show_bug.cgi?id=34833
2011-02-28 14:51:32 +01:00
Marc-André Lureau
7300282977 protocol: add common channel caps for AUTH mechanism selection
Current version 2.0 of the SPICE protocol describes how the client
reply to the server SpiceLinkReply message with a RSA_public_encrypt()
of the password.

Instead of using the current Spice AUTH mechanism, we would like to
offer different AUTH mechanisms, in particular SASL, which is a
framework allowing different underlying mechanisms such as
GSSAPI/Kerberos v5 (and optionally adding a data security layer).

We could bump the protocol version, but that would make this feature
mandatory for the implementer of the protocol. By using the channel
caps, the client and server are left to negotiate and alter the AUTH
part of the protocol as follows:

- SPICE_COMMON_CAP_PROTOCOL_AUTH_SELECTION, if set, the authentication
  mechanism can be chosen during link phase. If both client and server
  have this cap, the client MUST reply to SpiceLinkReply with a
  SpiceLinkAuthMechanism message, with the value of the CAP_AUTH
  mechanism choosen (a uint32 auth_mechanism). The following
  authentication steps are described by the selected authentication
  mechanism.

The differents mechanisms selectable via
SPICE_COMMON_CAP_PROTOCOL_AUTH_SELECTION are also specified as part of
the common channel caps. They can be used only if both client and
server offer them.

Ex: no AUTH selection
C: SpiceLinkMess
S: SpiceLinkReply, CAP_PROTOCOL_AUTH_SELECTION not in common caps
- The client can't choose AUTH, and fallback on Spice RSA mechanism

Ex: AUTH selection
C: SpiceLinkMess, CAP_PROTOCOL_AUTH_SELECTION in common caps
S: SpiceLinkReply, CAP_PROTOCOL_AUTH_SELECTION in common caps
- The client MUST reply with SpiceLinkAuthMechanism
C: SpiceLinkAuthMechanism (with a matching CAP_AUTH)

- SPICE_COMMON_CAP_AUTH_SPICE, the following steps and authentication
  mechanism are the same as with version 2.0: a RSA_public_encrypt()
  of the password is sent.

  This mechanism MUST be implemented in both client and server to
  comply with the SPICE protocol.

- SPICE_COMMON_CAP_AUTH_SASL, the authentication exchange follows
  SASL protocol has defined in RFC 2222.

  This mechanism is OPTIONAL in both client and servers.

Ex: AUTH selection, followed by SASL authentication

AUTH Selection:
C: SpiceLinkMess, CAP_PROTOCOL_AUTH_SELECTION + CAP_AUTH_SASL in common caps
S: SpiceLinkReply, CAP_PROTOCOL_AUTH_SELECTION + CAP_AUTH_SASL in common caps
- The client MUST reply with SpiceLinkAuthMechanism
C: SpiceLinkAuthMechanism CAP_AUTH_SASL

Init:
S:  u32 mechlist-length
    u8-array mechlist-string

Start:
C:  u32 mechname-length
    u8-array mechname-string
    u32 clientout-length
    u8-array clientout-string
S:  u32 serverin-length
    u8-array serverin-string
    u8 continue

Step: (while continue)
C:  u32 clientout-length
    u8-array clientout-string
S:  u32 serverin-length
    u8-array serverin-string
    u8 continue

See also VNC SASL protocol description, which uses the same protocol:

http://sourceforge.net/mailarchive/forum.php?thread_name=20100719125155.GA14166%40evileye.atkac.brq.redhat.com&forum_name=tigervnc-rfbproto

Updated since v1 of this commit:
 - renamed s/SPICE_CHANNEL_CAP/SPICE_COMMON_CAP
 - added some note about mandatory vs optional mechanisms.
2011-02-23 17:55:58 +02:00
Marc-André Lureau
0386da3be4 protocol: add common channel caps for AUTH mechanism selection
Current version 2.0 of the SPICE protocol describes how the client
reply to the server SpiceLinkReply message with a RSA_public_encrypt()
of the password.

Instead of using the current Spice AUTH mechanism, we would like to
offer different AUTH mechanisms, in particular SASL, which is a
framework allowing different underlying mechanisms such as
GSSAPI/Kerberos v5 (and optionally adding a data security layer).

We could bump the protocol version, but that would make this feature
mandatory for the implementer of the protocol. By using the channel
caps, the client and server are left to negotiate and alter the AUTH
part of the protocol as follows:

- SPICE_COMMON_CAP_PROTOCOL_AUTH_SELECTION, if set, the authentication
  mechanism can be chosen during link phase. If both client and server
  have this cap, the client MUST reply to SpiceLinkReply with a
  SpiceLinkAuthMechanism message, with the value of the CAP_AUTH
  mechanism choosen (a uint32 auth_mechanism). The following
  authentication steps are described by the selected authentication
  mechanism.

The differents mechanisms selectable via
SPICE_COMMON_CAP_PROTOCOL_AUTH_SELECTION are also specified as part of
the common channel caps. They can be used only if both client and
server offer them.

Ex: no AUTH selection
C: SpiceLinkMess
S: SpiceLinkReply, CAP_PROTOCOL_AUTH_SELECTION not in common caps
- The client can't choose AUTH, and fallback on Spice RSA mechanism

Ex: AUTH selection
C: SpiceLinkMess, CAP_PROTOCOL_AUTH_SELECTION in common caps
S: SpiceLinkReply, CAP_PROTOCOL_AUTH_SELECTION in common caps
- The client MUST reply with SpiceLinkAuthMechanism
C: SpiceLinkAuthMechanism (with a matching CAP_AUTH)

- SPICE_COMMON_CAP_AUTH_SPICE, the following steps and authentication
  mechanism are the same as with version 2.0: a RSA_public_encrypt()
  of the password is sent.

  This mechanism MUST be implemented in both client and server to
  comply with the SPICE protocol.

- SPICE_COMMON_CAP_AUTH_SASL, the authentication exchange follows
  SASL protocol has defined in RFC 2222.

  This mechanism is OPTIONAL in both client and servers.

Ex: AUTH selection, followed by SASL authentication

AUTH Selection:
C: SpiceLinkMess, CAP_PROTOCOL_AUTH_SELECTION + CAP_AUTH_SASL in common caps
S: SpiceLinkReply, CAP_PROTOCOL_AUTH_SELECTION + CAP_AUTH_SASL in common caps
- The client MUST reply with SpiceLinkAuthMechanism
C: SpiceLinkAuthMechanism CAP_AUTH_SASL

Init:
S:  u32 mechlist-length
    u8-array mechlist-string

Start:
C:  u32 mechname-length
    u8-array mechname-string
    u32 clientout-length
    u8-array clientout-string
S:  u32 serverin-length
    u8-array serverin-string
    u8 continue

Step: (while continue)
C:  u32 clientout-length
    u8-array clientout-string
S:  u32 serverin-length
    u8-array serverin-string
    u8 continue

See also VNC SASL protocol description, which uses the same protocol:

http://sourceforge.net/mailarchive/forum.php?thread_name=20100719125155.GA14166%40evileye.atkac.brq.redhat.com&forum_name=tigervnc-rfbproto

Updated since v1 of this commit:
 - renamed s/SPICE_CHANNEL_CAP/SPICE_COMMON_CAP
 - added some note about mandatory vs optional mechanisms.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2011-02-23 16:50:46 +01:00
Alon Levy
9d5ef9beec enums: typedefy SpiceBitmapFmt 2011-02-10 20:11:11 +02:00
Alon Levy
f5689c14cf qxl_dev.h: make QXLEffectType an enum instead of defines 2011-02-10 15:43:09 +02:00
Alon Levy
07aa808a21 qxl_dev.h: make QXLBitmapFlags a typedef 2011-02-10 15:43:09 +02:00
Alon Levy
6e719d6fcc qxl_dev.h: make QXLSurfaceCmdType a typedef 2011-02-10 15:43:06 +02:00
Alon Levy
3b67b660b6 qxl_dev.h: name QXL_IMAGE_* flags as type and enum QXLImageFlags 2011-02-10 15:43:02 +02:00
Alon Levy
dbe9402bc2 qxl_dev.h: make QXLCmdType enum also a typedef 2011-02-10 15:42:59 +02:00
Arnon Gilboa
d529c7d830 define spice_mb MemoryBarrier for WIN64
__asm is not supported on _WIN64, so use macro instead
required for Windows x64 guest display driver (qxldd.dll)
2011-02-02 11:34:19 +02:00
Hans de Goede
0b953e03ba Update license header for spice/macros.h
This one mistakenly had a GPL header rather then an LGPL header.
2011-01-21 15:39:09 +01:00
Marc-André Lureau
45f954aadb mingw32: specify packing alignment to 1 byte, to override -mms-bitfield
Ex: G_STRUCT_OFFSET(SpiceLinkReply, num_channel_caps) is 172 bytes
when compiled with -mms-bitfield, and 170 bytes without.

GLib/Gtk are compiled with -mms-bitfield, and it is necessary to
compile with the same option for compatibility. The pack pragma
for MINGW32 corrects the structure alignement.

We could use the pack pragma for GNUC unconditionally, that could help
to ensure struct binary compatibility between different compiled
flavours.
2010-12-29 16:13:55 +01:00
Alon Levy
c3822ca59b smartcard: add channel 2010-10-25 14:51:42 +02:00
Hans de Goede
d63c0072b4 controller: Make all text utf-8
We are making all text send over the controller socket utf-8, rather then
having somethings as 8 bit (hostname) and others unicode16.

Adjust the CONTROLLER_MENU_*_DELIMITER defines for this.
2010-10-21 16:47:12 +02:00
Hans de Goede
254b8803f9 Release 0.6.3 2010-10-18 15:10:14 +02:00
Arnon Gilboa
6e499cf69e Add controller protocol 2010-10-18 10:08:45 +02:00
Arnon Gilboa
8e1e17755e Add foreign menu protocol 2010-10-18 10:02:11 +02:00
Hans de Goede
7e66782a76 Add clipboard data types for images 2010-10-12 13:52:40 +02:00
Hans de Goede
55bdae1179 VD_AGENT_CLIPBOARD_GRAB takes a list of types rather then a single type
This way the grabbing side can indicate when the clipboard owning app
can provide the clipboard contents in multiple formats, ie plain text
and html.

Also drop the VD_AGENT_CLIPBOARD_BITMAP type until we have a clear
cross platform definition of the contents to send for bitmap type
clipboard data.
2010-10-04 16:54:00 +02:00
Arnon Gilboa
016cdb0b1d vd_agent: add VD_AGENT_CAP_CLIPBOARD_BY_DEMAND capability enum
VD_AGENT_CLIPBOARD_NONE for unsupported clipboard types
2010-10-04 16:48:27 +02:00
Arnon Gilboa
5fdd0ba665 vd_agent: add protocol messages for clipboard/selection-owner model
-VD_AGENT_CLIPBOARD_GRAB(type) - tell the other side that an application in our side ("we") got ownership of the clipboard.
-VD_AGENT_CLIPBOARD_REQUEST(type) - after we know the other side owns the clipboard (GRAB received), we notify the os we are the owner. when we are asked by the os/app for the clipboard data, we send this REQUEST msg to the other side.
-VD_AGENT_CLIPBOARD(type, data) - the existing message for sending the clipboard, is now sent only in response to REQUEST.
-VD_AGENT_CLIPBOARD_RELEASE - tell the other side that we are no longer the owner of the clipboard (e.g. the owner app was closed).

this patch will be followed by agent & client patches handling the above messages.
2010-10-04 16:48:27 +02:00
Alexander Larsson
57872d7887 Bump version to 0.6.1 2010-09-29 18:16:07 +02:00
Alexander Larsson
2884c98787 Update for release 2010-09-29 18:16:00 +02:00
Gerd Hoffmann
527d52ae25 add compat flag for 16bpp mode
spice 0.6 uses 32bpp values unconditionally for brush and palette
colors.

spice 0.4 used to use 16 bpp or 32 bpp depending on the video mode.
The qxl parser needs to know the guest video mode depth to correctly
interpret these values in spice 0.4 compat mode.  Add a flag to pass
on this informartion.
2010-09-14 10:08:28 +02:00
Alexander Larsson
3eae24f83d Bump version to 0.6.0 2010-08-31 14:28:44 +02:00
Alexander Larsson
068e6362d3 Update NEWS for release 2010-08-31 14:26:39 +02:00
Alon Levy
31d502522a add vd_agent announce capabilities message 2010-08-31 11:08:33 +03:00
Alon Levy
2335032d3b Merge commit 'e27cb334cf70409c7e32be6f061921b4b317be17' 2010-08-30 16:13:58 +03:00
Alon Levy
e27cb334cf move pipe header defines from reds.c to spice-protocol 2010-08-30 13:25:44 +03:00
Alexander Larsson
ae739ac541 Update NEWS for release 2010-08-29 20:17:36 +03:00
Alexander Larsson
5200cb0cd1 Update version to 0.5.3 2010-08-29 20:17:36 +03:00
Alexander Larsson
ca700d1fa7 Change major to 2 to declare network protocol stable 2010-08-29 20:17:36 +03:00
Yonit Halperin
3f63e04881 vdagent protocol: add display setting 2010-08-29 20:17:36 +03:00
Arnon Gilboa
b0f61eba25 client/agent: add clipboard max size limit for sending to/from the guest agent
define default & env variable for overriding it
2010-07-21 17:41:13 +03:00
Alexander Larsson
03498833d7 Update NEWS for release 2010-07-20 18:05:15 +02:00
Alexander Larsson
4f38933a08 Update version to 0.5.3 2010-07-20 18:03:35 +02:00
Alexander Larsson
d8b1b6afb2 Change major to 2 to declare network protocol stable 2010-07-20 15:52:05 +02:00
Yonit Halperin
1509b51bef vdagent protocol: add display setting 2010-07-19 08:34:33 +03:00
Alon Levy
a94a5b171a clipboard agent message added 2010-07-11 12:09:31 +03:00
Alexander Larsson
a9bbc090a5 Update NEWS for release 2010-07-08 20:47:06 +02:00
Alexander Larsson
8ba4939810 Fix misspellings
SpicedSubMessage -> SpiceSubMessage
QXLAlphaBlnd -> QXLAlphaBlend
2010-07-08 18:22:41 +02:00
Gerd Hoffmann
3bc42870d0 place pkgconfig file in /usr/share 2010-07-08 16:59:47 +02:00
Alexander Larsson
4cc9675ef5 Include enums.h from qxl_dev.h
This makes stuff keep building as before when draw.h included enum.h
2010-07-08 15:56:14 +02:00
Alexander Larsson
8deadab956 List all the PCI ids and revisions instead of just the latest/current 2010-07-08 15:16:22 +02:00
Alexander Larsson
a65d4b5d09 Move spice/draw.h to spice 2010-07-08 13:36:40 +02:00
Alexander Larsson
b25441f26b Add QXLCursorHeader and use instead of SpiceCursorHeader in qxl 2010-07-08 13:23:28 +02:00
Alexander Larsson
17b34b0032 Make SpiceLineAttr.style a normal pointer 2010-07-08 12:42:15 +02:00
Alexander Larsson
77927cec02 Use QXLFIXED, not SPICE_FIXED28_4 in qxl_dev.h 2010-07-08 12:41:47 +02:00
Gerd Hoffmann
3f1e240574 qxl abi: Add QXLImage and & co
Also, this changes the SpiceImage types to be more useful
as internal types, with real typed pointers. It also
adds a SpiceChunk iovec type for easy representation of
chunked data.
2010-07-07 22:46:26 +02:00
Alexander Larsson
1d74c91701 Update SpicePath.segments to a pointer array 2010-07-05 20:46:47 +02:00
Gerd Hoffmann
92c6782209 Update SpiceString to use an array of pointers for glyphs 2010-07-02 16:47:28 +02:00
Alexander Larsson
a1262cc611 Don't make SpicePath.segment a SpicePathSeg
The MS compiler doesn't like arrays of structures with an array
of length zero at the end, so we have to manually cast this when
using it.
2010-07-01 16:05:25 +02:00
Alexander Larsson
4cf3b18f62 Simplify SpiceLineAttr by removing unused elements and enums 2010-06-30 16:46:48 +02:00
Alexander Larsson
36126f5ee3 Change SpicePath.size to SpicePath.num_segments
We now track the number of segments rather than the memory size
of the path internally.
2010-06-29 21:26:34 +02:00
Gerd Hoffmann
eb96d4ec74 make SpiceRect compatible with pixman_box32 2010-06-29 16:25:42 +02:00
Gerd Hoffmann
65f9bef4fe qxl abi: zap SPICE_ADDRESS for clip rects and paths. 2010-06-29 13:11:57 +02:00
Gerd Hoffmann
5938ace152 qxl abi: add QXLRect 2010-06-29 12:29:45 +02:00
Gerd Hoffmann
36bdfe2f47 qxl abi: add QXLPoint & friends 2010-06-29 12:29:45 +02:00
Gerd Hoffmann
f433459af1 qxl abi: add QXLClip 2010-06-29 12:29:45 +02:00
Gerd Hoffmann
d0d9c32ed9 qxl abi: add QXLLineAttr 2010-06-29 12:29:45 +02:00
Gerd Hoffmann
900f532cc2 qxl abi: add QXLPattern 2010-06-29 12:29:45 +02:00
Gerd Hoffmann
772fa958a7 qxl abi: add QXLBrush 2010-06-29 12:29:45 +02:00
Gerd Hoffmann
30f1ed5dc6 qxl abi: add QXLQMask 2010-06-29 12:29:45 +02:00
Gerd Hoffmann
faa60f1c6d qxl abi: add QXLBlackness+QXLInvers+QXLWhiteness 2010-06-29 12:29:45 +02:00
Gerd Hoffmann
e4dedcdcc3 qxl abi: add QXLText 2010-06-29 12:29:45 +02:00
Gerd Hoffmann
34d776cebc qxl abi: add QXLStroke 2010-06-29 12:29:45 +02:00
Gerd Hoffmann
7851c98a4f qxl abi: add QXLRop3 2010-06-29 12:29:41 +02:00
Gerd Hoffmann
38a8c668dd qxl abi: add QXLTransparent 2010-06-29 12:29:41 +02:00
Gerd Hoffmann
28b990c0d9 qxl abi: add Copy+Blend.
Add QXLCopy and QXlBlend, also fix tyops (s/rop_decriptor/rop_descriptor/).
2010-06-29 12:29:41 +02:00
Gerd Hoffmann
b64d99aea3 qxl abi: add Opaque.
Add QXLOpaque, also fix tyops (s/rop_decriptor/rop_descriptor/).
2010-06-29 12:29:35 +02:00
Gerd Hoffmann
de94076219 qxl abi: add Fill.
Add QXLFill, also fix tyops (s/rop_decriptor/rop_descriptor/).
2010-06-29 12:29:04 +02:00
Gerd Hoffmann
201ef133fa qxl abi: add AlphaBlnd.
Add QXLAlphaBlnd and QXLCompatAlphaBlnd types.
2010-06-29 12:29:04 +02:00
Alexander Larsson
a5be505ff4 Remove SPICE_CLIP_TYPE_PATH enum.
Clip by path has not been supported since the pixman change, and
the win32 drivers were neutered to never produce it a while ago. Also,
even before that neutering it happened extremely seldom (never seen in
real life).
2010-06-24 14:25:45 +02:00
Alexander Larsson
9837b4596c Reset minor to 0 as we're bumping major 2010-06-23 11:50:26 +02:00
Yonit Halperin
99f2665776 add image type for RGBA bitmaps that were compressed by a combination of JPEG (RGB) and LZ (alpha channel). 2010-06-21 15:13:56 +02:00
Yonit Halperin
63f1c6c01a add image type for images that are compressed by zlib after they have been compressed by glz 2010-06-21 14:55:59 +02:00
Alexander Larsson
1f37a974bf Remove duplicated enums for keyboard modifiers 2010-06-18 16:29:49 +02:00
Alexander Larsson
23850b5fce Move all message structs to spice
We want to make these structures internal so we're free to change them.
The actual on-network ABI is now defined by the spice protocol
description rather than the c structures anyway.
2010-06-18 14:04:37 +02:00
Alexander Larsson
8a13061677 Move all enums and flags to generated header file 2010-06-18 13:21:59 +02:00
Alexander Larsson
d58376dc57 Add some types needed by the demarshalling work 2010-06-14 15:42:29 +02:00
Yonit Halperin
ed14a2ab2e cache support for replacing images that were compressed using jpeg with lossless images 2010-06-09 11:21:22 +02:00
Yonit Halperin
ace7d06a7b add image type for jpeg 2010-06-09 11:21:22 +02:00
Alexander Larsson
9e73c41877 Fix some misspelled identifiers
severty -> severity
SpiceResorceID -> SpiceResourceID
SpiceResorceList -> SpiceResourceList
resorces -> resources
ped_size -> pad_size
postition -> position
2010-05-21 11:09:22 +02:00
Alexander Larsson
55b440f9c4 Add byteswapping macros 2010-05-19 16:02:40 +02:00
Gerd Hoffmann
73b175849c add QXL_SURF_FLAG_KEEP_DATA 2010-05-18 17:26:47 +02:00
Alexander Larsson
b07c09ca17 Add image flag for "all high bits are set to one"
This lets us send rgba images with all high bytes 0xff as rgb, which
is not all that uncommon.
2010-04-28 15:40:12 +02:00
Gerd Hoffmann
445a96d029 make unstable qxl compatible with 0.4 qxl
Add SET_MODE IO port back in.
Add QXLRom offset fields back in.

I/O ports, RAM and ROM layout are binary compatible now.

With these changes merged it should be possible to create *one* qxl
device which supports *both* 0.4 and unstable spice commands.

Everything the guest touches before entering native mode is binary
compatible.  Old (0.4) guests drivers enter native mode via SET_MODE,
new (unstqable) guest drivers enter native mode using CREATE_PRIMARY,
so when we see spice commands from the guest come in we know
whenever we have to interpret them as 0.4 or unstable ones.

Added commends to structs which need care wrt. compatibility when
updating.

Added some QXLCompat* structs for the 0.4 struct versions.

Added a flags field to QXLCommandEx so qxl can signal whenever commands
are compat or not.

Moved QXLRom->n_surfaces to make QXLRom->flags 64bit aligned.

Add padding to QXLRom to ensure future elements are 32bit aligned.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2010-04-26 15:48:54 +02:00
Alexander Larsson
797d4c1ca8 Add source/dest alpha information to AlphaBlend 2010-04-23 11:07:27 +02:00
Alexander Larsson
916f3818d8 Pass format when creating surfaces rather than depth 2010-04-19 15:47:48 +02:00
Alexander Larsson
8ef80db4ac Add some comment describing the bitmap formats 2010-04-19 15:47:43 +02:00
Alexander Larsson
32541ac871 Add surface type enum
This is used to specify how pixels map to colors in surfaces.
2010-04-19 15:46:10 +02:00
Alexander Larsson
f50ca498cc Make pci id be 0x1ff rev 1, for unstable work
We will switch back to 0x101 when things settle down and we guarantee
backwards compatibility. For now we will keep breaking it, bumping
revision each time this happens.
2010-04-06 12:29:52 +02:00
Izik Eidus
98fd8921a9 spice-protocol off screens supports
Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-03 05:41:20 +03:00
Izik Eidus
14db228e81 spice-protocl: add spice_msg_display_surface_create/destroy
protocol commands to create/destroy surface on the client.

i removed spice_msg_display_mode as it now not needed

Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-03 05:40:50 +03:00
Alexander Larsson
d9f01c38ee Bump minor to 3
There is some confusion in the different branches on what the minors
mean. We expect minor == 2 to mean support for
SPICE_MSG_MAIN_MIGRATE_SWITCH_HOST and SpiceMsgMainMigrationBegin
with added public key info. All other additions like tunneling are
for minor 3 (although we might not do a release with minor 3, but
rather the bump major).
2010-03-24 16:11:59 +01:00
Alexander Larsson
a668cb38e2 Add SPICE_MSG_MAIN_MIGRATE_SWITCH_HOST message
This is a simpler form of migration
2010-03-24 16:11:59 +01:00
Alexander Larsson
6314aee92d Use int32, not int in protocol defining structure
"int" is not of a welldefined size, fortunally all existing uses
are 32bit.
2010-03-22 20:25:48 +01:00
Alexander Larsson
cac2bc7984 Add a bunch of generically useful macros
This is largely based on gmacros.h from glib with a few
custom macros that were repeated in the spice codebase.
2010-03-09 11:53:59 +01:00
Alexander Larsson
df85c9d314 Disable warning about our use of pragma pack in include file
Without this we can't build the driver
2010-03-05 16:25:05 +01:00
Alexander Larsson
60178205ad Add includes.sed file to handle include renaming 2010-02-04 18:12:07 +01:00
Alexander Larsson
b49e090269 fix up reames 2010-02-04 18:11:09 +01:00
Alexander Larsson
15359ed269 Fix up SPICE_SPICE typo 2010-02-04 18:10:50 +01:00
Alexander Larsson
fa94dbba3f Add gitignore file 2010-02-04 16:47:32 +01:00
Alexander Larsson
193c54c0da Add autoconf and pkg-config setup 2010-02-04 16:47:27 +01:00
Alexander Larsson
e625b1a1fb Always include using <spice/foo.h> style 2010-02-04 16:47:23 +01:00
Alexander Larsson
966d67a251 Hide internal macros with _SPICE prefix 2010-02-04 16:47:19 +01:00
Alexander Larsson
49fccfefc8 Clean up and standardize header guards 2010-02-04 16:47:14 +01:00
Alexander Larsson
430b3b036d Clean up header names, removing references to "red"
red_error_codes.h -> spice/error_codes.h
 red.h -> spice/protocol.h
 reds_stat.h -> spice/stats.h
2010-02-04 16:47:07 +01:00
Alexander Larsson
90352580a0 Rename all identifiers
This is just the result of running:
./rename-identifiers.sh renames spice/*.h
2010-02-04 16:46:27 +01:00
Alexander Larsson
b0188a46d1 Clean up all network protocol names to start with Spice/SPICE_
This makes use have a consistent namespace for the core network protocol.
The PCI devices each have their own namespaces.
2010-02-04 16:43:24 +01:00
Alexander Larsson
cb5909696b Add utility script to do C identifier renaming 2010-02-04 16:43:24 +01:00
Alexander Larsson
9032d5235b Use <spice/barrier.h> memory barrier 2010-02-04 16:43:24 +01:00
Alexander Larsson
590e21bc57 Add standard memory barrier header 2010-02-04 16:43:24 +01:00
Alexander Larsson
7050ae14a4 Add standard header for structure packing 2010-02-04 16:43:15 +01:00
Alexander Larsson
c2852f6b5f Use spice/types.h and its types
There is a standard for integer types (i.e. uint32_t) which we're using
at some places, but not others. Lets use it everywhere.
2010-02-04 16:40:42 +01:00
Alexander Larsson
a5d25ea987 Add standard header for defining core types
Initially we only do what is necessary to get the stdint types like
uint32_t, etc.
2010-02-04 16:23:31 +01:00
Alexander Larsson
3988329f11 Add MIT style COPYING file 2010-02-04 16:23:24 +01:00
Alexander Larsson
e0f9912933 Import all protocol headers from spice/common 2010-02-04 16:18:44 +01:00
13 changed files with 181 additions and 182 deletions

26
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,26 @@
image: fedora:latest
variables:
DEPS_COMMON: git gcc redhat-rpm-config
meson ninja-build gtk-doc glib2-devel
gettext gettext-devel bzip2 rpmlint rpm-build
mingw32-filesystem mingw64-filesystem
mingw32-gcc mingw64-gcc
before_script:
- dnf install -y $DEPS_COMMON
fedora:
script:
# build project and distribution
- meson --buildtype=release build-default
- ninja -C build-default
- ninja -C build-default dist
# check SPEC file
- rpmlint spice-protocol.spec
# check the SPEC version and project (in meson.build) are the same
- "VER_SPEC=$(sed '/^Version:/!d; s/.*: \\+//' < spice-protocol.spec)"
- "VER_PROJECT=$(sed '/version/ { s/.*'\\''\\(.*\\)'\\''.*/\\1/; q }; d' < meson.build)"
- "test \"x$VER_SPEC\" = \"x$VER_PROJECT\""
# build RPM from tarball generate
- rpmbuild -ta build-default/meson-dist/spice-protocol*.tar.xz

4
.gitpublish Normal file
View File

@ -0,0 +1,4 @@
[gitpublishprofile "default"]
to = spice-devel@lists.freedesktop.org
prefix = PATCH spice-protocol
signoff = true

View File

@ -1,3 +1,13 @@
Major changes in 0.14.5
=======================
* Add SPICE_MSG_DISPLAY_GL_SCANOUT2_UNIX
* Fix for Windows Arm64 build
Major changes in 0.14.4
=======================
* Fix enum deprecation warning for visual studio
* Fix documentation typos in stream-device.h
Major changes in 0.14.3
=======================
* Add VD_AGENT_CLIPBOARD_FILE_LIST to support copy/paste of files with

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
spice-protocol (0.14.5-1) unstable; urgency=medium
* new upstream release
-- Michael Tokarev <mjt@tls.msk.ru> Tue, 09 Sep 2025 22:27:05 +0300
spice-protocol (0.14.3-1) unstable; urgency=medium
* New upstream version 0.14.3 (Closes: #976333)

View File

@ -1,176 +1,64 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFa5ySkBEADDffQIuepO3Qz6JQj9IDTMtSLWx0cY8J5KrjvtWBuWaDo7ixaj
NxymDQTscIm7PJ7AmmyQWyVRU7YmaUEN79g+wvN69bDyXxHQmwts020bq/ICMpi7
6K3dgmiM31oqysOYOEXyRDr1XIrFMnmdSBm+Ac1zPYzc6RT6nS76hSRe6koQbgwC
lt9G4uwncbuW76IrNR3Lc3h3iquWpncNJWTTe+eDvXuWQDksiYS4VGLpXLHDuUTi
8mSWCDhW9gPkM6NmuZesRgqms4GRM+6u6sEIKfhp9NOfGuSR2sT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gqAhsMAAoJENro4Ql1lpzlbs0QALXaS3FpT/W1p0B/Ywl++MFq1ibVBevj
m7cRGZSAzwiRzd9Ga/S3Mpk3+lJ4VrNZNl0AlpAgAyjTYWXFMAwpvYHAB0pNu4IO
3g/fNr/rNjkrr2G2bX9+AmzNAjS6bsfvdXOn39i6sZZPlfXJk39TY8lkjCITu07e
lvnqZvmfNvWxY7rXOCBEOb7bLNN3T0id/mjhxC2dAs8PYN9pYLnQ4kBrsZC+XxFp
6xnnfKEyiQy3Q4a39MdXUqht70NrjkjlunVr2QAHIbfMnefKA9txzNAfhzA+Bd8n
Aw2XQiQWyKVnfJ8NuoPNxLk7WzgAET7fAB1D/KIBjDqG7gQY3SfXkCbazg3ZTjXR
NuvVQ5VOTKVoc67BfeyiuvVmD1QRuHoRdNRjgiiZThqeE3noC8kUAoGuY8tYmwga
nm2iav1Pk5HyE/kOy5hLZXf+XwqEe/fJlZyEcyBiUq78EJmMoM8ixqCg8TdW0R5g
pu7XeB0fQZ5NyKcA67l6oii1S5+QJmp/NgZrbQmkofjvjWDpUJxD5cYnpPXjldwc
VjWyTnjpIWGluM22xljvVcBVKltEVyRy5ElmJWieDGdBw2pzjwVqKm6UM47PNI1p
ZPXaYwviPN2YaVoDtzdlplMGig1ujmUkGw+BcEIEP4Ftj75ts4pfGqX9qLOAkoZp
huNqSF9Wu2NJ
=j4dw
-----END PGP PUBLIC KEY BLOCK-----

2
debian/watch vendored
View File

@ -1,3 +1,3 @@
version=4
opts=pgpsigurlmangle=s/$/.sig/ \
https://www.spice-space.org/download/releases/spice-protocol-(\d+\.\d*[02468]\.\d+)\.tar\.(bz2|xz)
https://www.spice-space.org/download/releases/@PACKAGE@-@ANY_VERSION@@ARCHIVE_EXT@

27
docs/how_to_release.md Normal file
View File

@ -0,0 +1,27 @@
How to do a SPICE protocol release
==================================
Some notes to prepare a release, not really strict but better to have in order
to avoid forgetting something.
* Check `meson.build` and `spice-protocol.spec` for release number
* Update `CHANGELOG.md` with list of changes done since last release
* Send a merge request with such changes, handle the review
* Build distribution file with `meson dist`
* Try to build an RPM package from `meson dist` output
* `git push` for the above MR
* Create a git tag (like `git tag -a v0.14.3 -m 'Release v0.14.3'`)
* `git push` for the version tag created (for instance you can use
`git push origin v0.14.3` or `git push --tags`)
* Sign generated tarball (to create a detached signature run
`gpg2 -sb spice-protocol-RELEASE.tar.xz`)
* On Gitlab update tags (https://gitlab.freedesktop.org/spice/spice-protocol/-/tags)
* Add ChangeLog information
* Upload tarball and relative signature
* Upload tarball and relative signature and sha256sum to
https://www.spice-space.org/download/releases/ (sftp to
`spice-uploader@spice-web.osci.io:/var/www/www.spice-space.org/download/releases/`)
* Update file `download.rst` in
https://gitlab.freedesktop.org/spice/spice-space-pages
* Send an email to spice-devel mailing list
* Bump version post release and send a new MR

View File

@ -2,7 +2,8 @@
# project definition
#
project('spice-protocol',
version : '0.14.3',
'c',
version : '0.14.5',
license : 'BSD',
meson_version : '>= 0.41.0')

View File

@ -1,5 +1,5 @@
Name: spice-protocol
Version: 0.14.3
Version: 0.14.5
Release: 1%{?dist}
Summary: Spice protocol header files
Group: Development/Libraries

View File

@ -147,10 +147,23 @@ typedef enum SpicePathFlags {
typedef enum SpiceVideoCodecType {
SPICE_VIDEO_CODEC_TYPE_MJPEG = 1,
SPICE_VIDEO_CODEC_TYPE_VP8,
SPICE_VIDEO_CODEC_TYPE_MJPEG_NVJPG,
SPICE_VIDEO_CODEC_TYPE_MJPEG_VAAPI,
SPICE_VIDEO_CODEC_TYPE_H264,
SPICE_VIDEO_CODEC_TYPE_VP9,
SPICE_VIDEO_CODEC_TYPE_H265,
SPICE_VIDEO_CODEC_TYPE_H264_NVENC,
SPICE_VIDEO_CODEC_TYPE_H264_AMF,
SPICE_VIDEO_CODEC_TYPE_H264_QSV,
SPICE_VIDEO_CODEC_TYPE_H264_VAAPI,
SPICE_VIDEO_CODEC_TYPE_H265_NVENC,
SPICE_VIDEO_CODEC_TYPE_H265_AMF,
SPICE_VIDEO_CODEC_TYPE_H265_QSV,
SPICE_VIDEO_CODEC_TYPE_H265_VAAPI,
SPICE_VIDEO_CODEC_TYPE_AV1_NVENC,
SPICE_VIDEO_CODEC_TYPE_AV1_AMF,
SPICE_VIDEO_CODEC_TYPE_AV1_QSV,
SPICE_VIDEO_CODEC_TYPE_AV1_VAAPI,
SPICE_VIDEO_CODEC_TYPE_ENUM_END
} SpiceVideoCodecType;
@ -377,7 +390,7 @@ typedef enum SpiceCursorFlags {
typedef enum SpiceAudioDataMode {
SPICE_AUDIO_DATA_MODE_INVALID,
SPICE_AUDIO_DATA_MODE_RAW,
SPICE_AUDIO_DATA_MODE_CELT_0_5_1 SPICE_GNUC_DEPRECATED,
SPICE_AUDIO_DATA_MODE_CELT_0_5_1 SPICE_GNUC_DEPRECATED_ENUMERATOR,
SPICE_AUDIO_DATA_MODE_OPUS,
SPICE_AUDIO_DATA_MODE_ENUM_END
@ -516,6 +529,7 @@ enum {
SPICE_MSG_DISPLAY_GL_SCANOUT_UNIX,
SPICE_MSG_DISPLAY_GL_DRAW,
SPICE_MSG_DISPLAY_QUALITY_INDICATOR,
SPICE_MSG_DISPLAY_GL_SCANOUT2_UNIX,
SPICE_MSG_END_DISPLAY
};

View File

@ -72,6 +72,14 @@
#define SPICE_GNUC_DEPRECATED
#endif
#if ((defined(__GNUC__) && (__GNUC__ > 6 || (__GNUC__ == 6 && __GNUC_MINOR__ >= 1))) || \
(defined(__clang_major__) && (__clang_major__ > 3 || \
(__clang_major__ == 3 && __clang_minor__ >= 0))))
#define SPICE_GNUC_DEPRECATED_ENUMERATOR SPICE_GNUC_DEPRECATED
#else
#define SPICE_GNUC_DEPRECATED_ENUMERATOR
#endif
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
# define SPICE_GNUC_MAY_ALIAS __attribute__((may_alias))
#else
@ -290,7 +298,7 @@
#if !defined(SPICE_ENDIAN) && defined(_MSC_VER)
/* Windows support only little endian arm */
# if defined(_M_IX86) || defined(_M_AMD64) || defined(_M_X64) \
|| defined(_M_ARM)
|| defined(_M_ARM) || defined(_M_ARM64)
# define SPICE_ENDIAN SPICE_ENDIAN_LITTLE
# endif
#endif

View File

@ -150,6 +150,21 @@ enum {
SPICE_DISPLAY_CAP_PREF_VIDEO_CODEC_TYPE,
SPICE_DISPLAY_CAP_CODEC_VP9,
SPICE_DISPLAY_CAP_CODEC_H265,
SPICE_DISPLAY_CAP_GL_SCANOUT2,
SPICE_DISPLAY_CAP_CODEC_MJPEG_NVJPG,
SPICE_DISPLAY_CAP_CODEC_MJPEG_VAAPI,
SPICE_DISPLAY_CAP_CODEC_H264_NVENC,
SPICE_DISPLAY_CAP_CODEC_H264_AMF,
SPICE_DISPLAY_CAP_CODEC_H264_QSV,
SPICE_DISPLAY_CAP_CODEC_H264_VAAPI,
SPICE_DISPLAY_CAP_CODEC_H265_NVENC,
SPICE_DISPLAY_CAP_CODEC_H265_AMF,
SPICE_DISPLAY_CAP_CODEC_H265_QSV,
SPICE_DISPLAY_CAP_CODEC_H265_VAAPI,
SPICE_DISPLAY_CAP_CODEC_AV1_NVENC,
SPICE_DISPLAY_CAP_CODEC_AV1_AMF,
SPICE_DISPLAY_CAP_CODEC_AV1_QSV,
SPICE_DISPLAY_CAP_CODEC_AV1_VAAPI,
};
enum {

View File

@ -176,10 +176,10 @@ typedef struct StreamMsgDeviceDisplayInfo {
} StreamMsgDeviceDisplayInfo;
/* This message contains a quality indicator string, generated by the
* streaming agent. It is indended to be used by a module running of
* the server to ajust the streaming quality.
* streaming agent. It is intended to be used by a module running of
* the server to adjust the streaming quality.
*
* The format of the string message is not specificied because
* The format of the string message is not specified because
* module-specific.
*
* This message is sent by the guest to the host.