summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-04-14proto: Use proper type for preferred_compression field0.12Christophe Fergeau1-1/+1
No need to use an uint8 typed member, we can directly use the appropriate enum8 type here, which makes everything more explicit. (cherry picked from spice-protocol commit 8a3def14e35039753097094ba356e85e8fc2d128) Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-04-14proto: Rename image_compress to image_compressionChristophe Fergeau1-1/+1
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. (cherry picked from spice-protocol commit e857cd9a378cdf56805b64284491a12af93a7cbf) Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-04-14Revert "Remove files moved to spice-protocol"Marc-André Lureau14-33/+6023
This reverts commit 7665dcf1bb2fa0b16b3d0015b28d7f5912664c3f. Also revert the related build-sys changes to fix the build. codegen generated code depends on spice-common code (marshaller, messages etc), it makes more sense to keep the generator along this. Otherwise a newer protocol release will fail to build older projects. *.proto files are required as well, since it generates code that parent modules depend on unconditionnaly. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-01-07ring: use NULL instead of 0 for null pointersFrediano Ziglio1-1/+1
This is consistent with the rest of the code making clear fields are pointers. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Uri Lublin <uril@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
2016-01-07Remove headers that are included in spice_common.hVictor Toso9-27/+5
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-12-18m4: Add macro for --with-saslPavel Grunt1-0/+27
It is not used by spice-common, but both server and client can use it. Compared to current checks in spice-gtk and spice server this macro only supports libsasl2. Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2015-12-18Remove trailing whitespaceLukas Venhoda5-18/+18
2015-12-17ppc: Fix alpha state checking on BE machinesLukas Venhoda1-0/+3
The surface before conversion can be either LE or BE on a BE machine. Check against both BE and LE color order on BE machine.
2015-12-17ppc: Fix colors on ppc when using jpegLukas Venhoda1-2/+2
Fixes color order on PowerPC when using jpeg compression.
2015-12-17ppc: Fix colors on ppc when using LZ4Lukas Venhoda1-3/+3
Fixes color order on PowerPC when using LZ4 image compression.
2015-12-17ppc: Fix colors on ppc when using LZLukas Venhoda1-3/+3
Fixes color order on PowerPC when using LZ image compression.
2015-12-17ppc: Fix colors on ppc when using QUICLukas Venhoda1-3/+3
Fixes color order on PowerPC when using QUIC image compression.
2015-12-17ppc: Add support for bigendian color byte orderLukas Venhoda1-0/+14
On LE machine, color order when creating surface will always be A/XRGB. On BE machines the color order will sometimes be ARGB and sometimes BGRA/X. This is because we actually create the surface two times on BE machines. Once with BE order, and then again with LE order. Copying data inbetween theese two surfaces will byteswap the colors automatically. This change introduces cases for BGRA/X color byte orders on BE machines.
2015-12-17pixman_utils: Use PIXMAN_LE_ constants in spice_bitmap_try_as_pixman()Lukas Venhoda1-15/+3
After the previous commit, spice_bitmap_try_as_pixman() can be simplified as its #ifdef WORDS_BIGENDIAN exactly match what the PIXMAN_LE_ constants do.
2015-12-17pixman_utils: Add macros for color byte orderingLukas Venhoda1-0/+10
When using image compression on PowerPC architecture, colors are in wrong order ARGB -> BGRA. This commit introduces macros, that will change the color order according to machine endianness. Theese macros are similar to QEMU macros in qemu-pixman.h
2015-12-16test: Use _LDADD rather than _LDFLAGSChristophe Fergeau1-1/+1
This allows libtool/automake to correctly add a dependency from libspice-common.la to test_marshallers. With _LDFLAGS, the binary won't automatically get rebuilt/relinked when the lib changes.
2015-12-14m4: Fix SPICE_WARNING on el6Christophe Fergeau1-1/+1
autogen.sh fails on el6 unless the second argument to AC_DEFUN([SPICE_WARNING]) is enclosed in []
2015-11-27ssl-verify: Don't leak GInetAddressChristophe Fergeau1-2/+8
GInetAddress is a GObject, so we must unref anything we create with g_inet_address_new_*
2015-11-27ssl-verify: Handle NULL return from g_inet_address_new_from_string()Christophe Fergeau1-2/+6
It will return NULL if the string we pass it cannot be parsed.
2015-11-25Use new libcacard.h if possibleMarc-André Lureau2-2/+12
libcacard.h requires 2.5.1. Keep compatibility for older versions until the transition in distros to the standalone version is done. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> [ Christophe: add < 2.5.1 fallback ] Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
2015-11-25Fix make distcheckMarc-André Lureau3-4/+5
Fix make distcheck both with standalone spice-common and with spice server. Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
2015-11-24canvas_base: Remove redundant switch case blockLukas Venhoda1-4/+1
2015-11-16build-sys: Add SPICE_CHECK_GSTREAMER_ELEMENTS()Francois Gouget1-0/+36
This makes it possible to warn the developer that the GStreamer elements needed at runtime are missing and give him a hint on how to fix the issue. Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
2015-11-04build-sys: Add SPICE_CHECK_GSTREAMER()Francois Gouget1-0/+20
This simplifies checking for GStreamer modules by setting all the variables we normally need. Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
2015-11-04build-sys: Add the SPICE_WARNING() and SPICE_PRINT_MESSAGES m4 macrosFrancois Gouget1-0/+21
A call to SPICE_WARNING() anywhere in the configure file results in the warning being printed at the end of the configure run where it will be be visible. This makes it possible to keep the SPICE_WARNING() calls together with the related feature checks instead of having to put a separate AC_MSG_WARN() call near the end. Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
2015-11-02build-sys: Add missing # to commentChristophe Fergeau1-1/+1
SPICE_CHECK_SMARTCARD documentation ends with a '-------' comment, but the # to start the comment is missing, causing a warning message when running configure.
2015-10-23build-sys: Rename SUPPORT_GL to HAVE_GLChristophe Fergeau2-3/+3
The other conditionals are using the HAVE_ prefix, using HAVE_GL rather than SUPPORT_GL improves consistency.
2015-10-23build-sys: Set automake conditional in SPICE_CHECK_SMARTCARDChristophe Fergeau1-2/+4
spice-server will use this.
2015-10-23build-sys: Fix error in SPICE_CHECK_LZ4 descriptionChristophe Fergeau1-1/+1
This macro does not define a SUPPORT_LZ4 automake conditional.
2015-10-23build-sys: Add gio-2.0 to SPICE_CHECK_GLIB2Christophe Fergeau1-1/+1
GInetAddress is defined in gio, not glib. Not checking for gio-2.0 in SPICE_CHECK_GLIB2 means gio won't be in GLIB2_LIBS, which causes link errors when trying to build spice-server.
2015-10-23ssl-verify: Changed IPv4 hostname to IPv6Lukas Venhoda1-24/+21
Change inet_aton function to glib functions. inet_aton only supported IPv4 addresses, and wasn't available on windows machines. GInetAddress functions support IPv6 natively, and requires less boilerplate code then IPv6 gettaddrinfo().
2015-10-23m4: Require glib version >= 2.22Lukas Venhoda1-1/+1
This is required by the GInetAddress functions.
2015-10-23ssl-verify: Only check addr length when using IP addrLukas Venhoda1-7/+8
Only check for address length, when connecting through IP address. It is not used, when connecting through DNS hostname.
2015-10-13build-sys: Rework SPICE_CHECK_* m4 macrosChristophe Fergeau2-56/+40
These macros were automatically appending the needed CFLAGS/LIBS to variables passed as arguments. This is how spice-common uses them, but now how spice-gtk/spice want to use them, and is making the macros more complicated than they could (in particular this makes them use AS_VAR_APPEND). This is also not flexible enough as spice-gtk uses libcacard libraries, while spice-common does not need them. If SPICE_CHECK_SMARTCARD unconditionnally libcacard libraries to the variable spice-common passes it as an argument, we'll end up linking with an unneeded library. This commit removes this automatic appending from the SPICE_CHECK_* macros and moves it to spice-common as it's the only one which needs it.
2015-10-07build-sys: Use ${PKG_CONFIG} rather than pkg-configChristophe Fergeau1-1/+1
In mingw builds, this will be set to mingw-pkg-config rather than the host system one. This is fixing a build failure on mingw when spice-protocol is only installed in the mingw prefix and not system-wide.
2015-09-15Add marshaller test caseChristophe Fergeau5-0/+111
This allows to test the spice_marshaller_linearize() fix which was sent recently.
2015-09-15Fix linearization of several marshallers with one itemJavier Celaya1-1/+1
The linearization optimization that avoids copying only one item must check that there are no further marshallers in the chain. Just to be clear, we are trying to marshall a message like this: message { uint32 data_size; uint64 *data[data_size] @marshall; } SomeData; Where the data field points to an array in dynamic memory. Marshalling and demarshalling functions look good. The marshalling function creates a submarshaller for the data field and links it to the root marshaller. But when it comes to sending the data through the wire, only the data_size field gets sent. We have observed that, in spice_marshaller_linearize, execution enters into the optimization that avoids copying the data when the root marshaller only has one item, but it ignores the following marshallers in the list. Checking if there are more marshallers fixes the problem.
2015-08-14common: Fix typo in commentFrediano Ziglio1-1/+1
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-08-14build-sys: Remove code generation files from EXTRA_DISTChristophe Fergeau1-8/+0
This breaks make distcheck otherwise since commit 7665dcf1 removed these files.
2015-08-11Remove files moved to spice-protocolFrediano Ziglio13-5987/+1
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-08-11Use installed spice-protocol for code generationChristophe Fergeau3-30/+27
Now that spice-protocol ships the needed .proto files as well as the corresponding python scripts, spice-common can use these in order to generate the C code for the SPICE (de)marshallers.
2015-08-11Remove spice-protocol submoduleChristophe Fergeau4-7/+1
spice-protocol is a separate project which is having releases, so there is no need to have a private spice-protocol copy in each spice-common user, especially as after installation, the system-wide spice-protocol copy will be used instead of the private one the module was built against.
2015-08-04codegen: ptypes.py: keep attribute names in setsUri Lublin1-4/+4
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-07-29Update spice-protocol submoduleChristophe Fergeau1-0/+0
Christophe Fergeau (3): Prepare for spice-protocol 0.12.8 release Post-release version bump Rename SpiceImageCompress constants Sandy Stutsman (1): Add QXL_ESCAPE_MONITOR_CONFIG enum
2015-07-23codegen: Allow to specify C type for index variableFrediano Ziglio1-1/+3
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-23codegen: Check we don't pop too many indexesFrediano Ziglio1-0/+1
2015-07-23codegen: Remove old ptr32 attributeFrediano Ziglio1-4/+0
This attribute is not used in code. Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-07-23codegen: Do some checks on attributesFrediano Ziglio1-0/+72
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-23codegen: Reuse code to fix attribute from prototype fileFrediano Ziglio1-16/+16
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-07-23codegen: Remove duplicate variable initializationFrediano Ziglio1-1/+0
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>