summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2010-03-04 10:57:06 +0100
committerAlexander Larsson <alexl@redhat.com>2010-03-09 14:33:24 +0100
commitd60d3eda889756e080ebe3271cae73488442ca2c (patch)
treee4bcc652989080abaaa6fb15beab2e94acaa0fc6
parent505f7d8832a961d44ca2bb477c36d5bf8c4e1e7b (diff)
downloadspice-d60d3eda889756e080ebe3271cae73488442ca2c.tar.gz
spice-d60d3eda889756e080ebe3271cae73488442ca2c.tar.xz
spice-d60d3eda889756e080ebe3271cae73488442ca2c.zip
new libspice api: add spice_server_{get, set}_image_compression()
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r--server/reds.c14
-rw-r--r--server/spice.h4
2 files changed, 18 insertions, 0 deletions
diff --git a/server/reds.c b/server/reds.c
index 68718244..aae8c13c 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -5633,6 +5633,20 @@ int spice_server_set_tls(SpiceServer *s, int port,
return 0;
}
+int spice_server_set_image_compression(SpiceServer *s,
+ spice_image_compression_t comp)
+{
+ ASSERT(reds == s);
+ set_image_compression(comp);
+ return 0;
+}
+
+spice_image_compression_t spice_server_get_image_compression(SpiceServer *s)
+{
+ ASSERT(reds == s);
+ return image_compression;
+}
+
int spice_server_add_interface(SpiceServer *s, VDInterface *interface)
{
ASSERT(reds == s);
diff --git a/server/spice.h b/server/spice.h
index 39fadc96..cda462f4 100644
--- a/server/spice.h
+++ b/server/spice.h
@@ -59,4 +59,8 @@ typedef enum {
SPICE_IMAGE_COMPRESS_LZ = 6,
} spice_image_compression_t;
+int spice_server_set_image_compression(SpiceServer *s,
+ spice_image_compression_t comp);
+spice_image_compression_t spice_server_get_image_compression(SpiceServer *s);
+
#endif