[Spice-devel] [PATCH] server: export spice_server_is_server_mouse predicate
Alon Levy
alevy at redhat.com
Mon Mar 26 05:47:32 PDT 2012
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(-)
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
--
1.7.9.3
More information about the Spice-devel
mailing list