Patchwork server: export spice_server_is_server_mouse predicate

login
register
mail settings
Submitter Alon Levy
Date March 26, 2012, 12:47 p.m.
Message ID <1332766053-9063-2-git-send-email-alevy@redhat.com>
Download mbox | patch
Permalink /patch/148735/
State New
Headers show

Comments

Alon Levy - March 26, 2012, 12:47 p.m.
To be used by qemu query-spice / info spice commands.
---
 server/reds.c            |    6 ++++++
 server/spice-server.syms |    4 ++++
 server/spice.h           |    4 +++-
 3 files changed, 13 insertions(+), 1 deletion(-)

Patch

diff --git a/server/reds.c b/server/reds.c
index 27e7ea2..bf26864 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -4006,6 +4006,12 @@  SPICE_GNUC_VISIBLE int spice_server_get_peer_info(SpiceServer *s, struct sockadd
     return 0;
 }
 
+SPICE_GNUC_VISIBLE int spice_server_is_server_mouse(SpiceServer *s)
+{
+    spice_assert(reds == s);
+    return reds->mouse_mode == SPICE_MOUSE_MODE_SERVER;
+}
+
 SPICE_GNUC_VISIBLE int spice_server_add_renderer(SpiceServer *s, const char *name)
 {
     spice_assert(reds == s);
diff --git a/server/spice-server.syms b/server/spice-server.syms
index 4b842a3..99a7271 100644
--- a/server/spice-server.syms
+++ b/server/spice-server.syms
@@ -108,3 +108,7 @@  global:
     spice_server_set_uuid;
     spice_server_set_listen_socket_fd;
 } SPICE_SERVER_0.10.1;
+
+SPICE_SERVER_0.10.3 {
+    spice_server_is_server_mouse;
+} SPICE_SERVER_0.10.2;
diff --git a/server/spice.h b/server/spice.h
index 8dd1c3d..77aec92 100644
--- a/server/spice.h
+++ b/server/spice.h
@@ -22,7 +22,7 @@ 
 #include <sys/socket.h>
 #include <spice/qxl_dev.h>
 
-#define SPICE_SERVER_VERSION 0x000a02 /* release 0.10.2 */
+#define SPICE_SERVER_VERSION 0x000a03 /* release 0.10.3 */
 
 /* interface base type */
 
@@ -485,6 +485,8 @@  int spice_server_set_agent_copypaste(SpiceServer *s, int enable);
 int spice_server_get_sock_info(SpiceServer *s, struct sockaddr *sa, socklen_t *salen);
 int spice_server_get_peer_info(SpiceServer *s, struct sockaddr *sa, socklen_t *salen);
 
+int spice_server_is_server_mouse(SpiceServer *s);
+
 /* migration interface */
 #define SPICE_INTERFACE_MIGRATION "migration"
 #define SPICE_INTERFACE_MIGRATION_MAJOR 1