summaryrefslogtreecommitdiffstats
path: root/server/spice.h
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2010-10-11 16:30:58 +0200
committerGerd Hoffmann <kraxel@redhat.com>2010-10-12 11:11:26 +0200
commit97f33fa86aa6edd25111b173dc0d9599ac29f879 (patch)
tree66411081e1141b853de82195ecf06ec6a23998b0 /server/spice.h
parentf8c6e1c42a16d6b00f058389ee79baef7c0ff5d4 (diff)
downloadspice-97f33fa86aa6edd25111b173dc0d9599ac29f879.tar.gz
spice-97f33fa86aa6edd25111b173dc0d9599ac29f879.tar.xz
spice-97f33fa86aa6edd25111b173dc0d9599ac29f879.zip
server: add channel notifications.
This patch adds a channel event callback to the spice core interface. This new callback will be called for three events: (1) A new connection has been established. (2) The channel is ready (i.e. authentication is done, link message verification passed all tests, channel is ready to use). (3) Channel was disconnected. Qemu will use this to send notifications to the management app.
Diffstat (limited to 'server/spice.h')
-rw-r--r--server/spice.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/server/spice.h b/server/spice.h
index 6f4c7820..e6304020 100644
--- a/server/spice.h
+++ b/server/spice.h
@@ -42,18 +42,34 @@ struct SpiceBaseInstance {
#define SPICE_INTERFACE_CORE "core"
#define SPICE_INTERFACE_CORE_MAJOR 1
-#define SPICE_INTERFACE_CORE_MINOR 2
+#define SPICE_INTERFACE_CORE_MINOR 3
typedef struct SpiceCoreInterface SpiceCoreInterface;
#define SPICE_WATCH_EVENT_READ (1 << 0)
#define SPICE_WATCH_EVENT_WRITE (1 << 1)
+#define SPICE_CHANNEL_EVENT_CONNECTED 1
+#define SPICE_CHANNEL_EVENT_INITIALIZED 2
+#define SPICE_CHANNEL_EVENT_DISCONNECTED 3
+
+#define SPICE_CHANNEL_EVENT_FLAG_TLS (1 << 0)
+
typedef struct SpiceWatch SpiceWatch;
typedef void (*SpiceWatchFunc)(int fd, int event, void *opaque);
typedef struct SpiceTimer SpiceTimer;
typedef void (*SpiceTimerFunc)(void *opaque);
+typedef struct SpiceChannelEventInfo {
+ int connection_id;
+ int type;
+ int id;
+ int flags;
+ struct sockaddr laddr;
+ struct sockaddr paddr;
+ socklen_t llen, plen;
+} SpiceChannelEventInfo;
+
struct SpiceCoreInterface {
SpiceBaseInterface base;
@@ -66,6 +82,7 @@ struct SpiceCoreInterface {
void (*watch_update_mask)(SpiceWatch *watch, int event_mask);
void (*watch_remove)(SpiceWatch *watch);
+ void (*channel_event)(int event, SpiceChannelEventInfo *info);
};
/* qxl interface */