summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorJavier Celaya <javier.celaya@flexvm.es>2015-04-27 10:01:00 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2015-06-22 19:54:30 +0200
commit127a76a3b8ddd949ffc56ff70db470ed1c17be39 (patch)
treef51be42bb9f8c0c9814a2a5c5eb4d049d434f96b /common
parent1b5edbe49e5c36c4f35453de448b54f770e1c1be (diff)
downloadspice-common-127a76a3b8ddd949ffc56ff70db470ed1c17be39.tar.gz
spice-common-127a76a3b8ddd949ffc56ff70db470ed1c17be39.tar.xz
spice-common-127a76a3b8ddd949ffc56ff70db470ed1c17be39.zip
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.
Diffstat (limited to 'common')
-rw-r--r--common/client_marshallers.h1
-rw-r--r--common/messages.h4
2 files changed, 5 insertions, 0 deletions
diff --git a/common/client_marshallers.h b/common/client_marshallers.h
index 85051a0..522f620 100644
--- a/common/client_marshallers.h
+++ b/common/client_marshallers.h
@@ -72,6 +72,7 @@ typedef struct {
void (*msgc_smartcard_reader_add)(SpiceMarshaller *m, VSCMsgReaderAdd *msg);
#endif
void (*msgc_port_event)(SpiceMarshaller *m, SpiceMsgcPortEvent *msg);
+ void (*msgc_display_preferred_compression)(SpiceMarshaller *m, SpiceMsgcDisplayPreferredCompression *msg);
} SpiceMessageMarshallers;
SpiceMessageMarshallers *spice_message_marshallers_get(void);
diff --git a/common/messages.h b/common/messages.h
index a8a0eee..5f5de54 100644
--- a/common/messages.h
+++ b/common/messages.h
@@ -630,6 +630,10 @@ typedef struct SpiceMsgcPortEvent {
uint8_t event;
} SpiceMsgcPortEvent;
+typedef struct SpiceMsgcDisplayPreferredCompression {
+ uint8_t image_compression;
+} SpiceMsgcDisplayPreferredCompression;
+
SPICE_END_DECLS
#endif /* _H_SPICE_PROTOCOL */