summaryrefslogtreecommitdiffstats
path: root/server/spice.h
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2012-11-30 13:47:55 +0100
committerMarc-André Lureau <marcandre.lureau@redhat.com>2012-12-05 11:46:28 +0100
commit069270f641b617538c17b64d4bebfd4ccb51c6dc (patch)
treef59ef0ed4e1d672396f8fefa59810a42218baaea /server/spice.h
parent616eee84c11939ebe3a28b6134fe819720426f05 (diff)
downloadspice-069270f641b617538c17b64d4bebfd4ccb51c6dc.tar.gz
spice-069270f641b617538c17b64d4bebfd4ccb51c6dc.tar.xz
spice-069270f641b617538c17b64d4bebfd4ccb51c6dc.zip
server: add "port" channel support
A Spice port channel carry arbitrary data between the Spice client and the Spice server. It may be used to provide additional services on top of a Spice connection. For example, a channel can be associated with the qemu monitor for the client to interact with it, just like any qemu chardev. Or it may be used with various protocols, such as the Spice Controller. A port kind is identified simply by its fqdn, such as org.qemu.monitor, org.spice.spicy.test or org.ovirt.controller... The channel is based on Spicevmc which simply tunnels data between client and server, with a few additional messages. See the description of the channel protocol in spice-common history.
Diffstat (limited to 'server/spice.h')
-rw-r--r--server/spice.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/spice.h b/server/spice.h
index aabc9098..45b7408c 100644
--- a/server/spice.h
+++ b/server/spice.h
@@ -388,7 +388,7 @@ void spice_server_record_set_mute(SpiceRecordInstance *sin, uint8_t mute);
#define SPICE_INTERFACE_CHAR_DEVICE "char_device"
#define SPICE_INTERFACE_CHAR_DEVICE_MAJOR 1
-#define SPICE_INTERFACE_CHAR_DEVICE_MINOR 1
+#define SPICE_INTERFACE_CHAR_DEVICE_MINOR 2
typedef struct SpiceCharDeviceInterface SpiceCharDeviceInterface;
typedef struct SpiceCharDeviceInstance SpiceCharDeviceInstance;
typedef struct SpiceCharDeviceState SpiceCharDeviceState;
@@ -399,15 +399,18 @@ struct SpiceCharDeviceInterface {
void (*state)(SpiceCharDeviceInstance *sin, int connected);
int (*write)(SpiceCharDeviceInstance *sin, const uint8_t *buf, int len);
int (*read)(SpiceCharDeviceInstance *sin, uint8_t *buf, int len);
+ void (*event)(SpiceCharDeviceInstance *sin, uint8_t event);
};
struct SpiceCharDeviceInstance {
SpiceBaseInstance base;
const char* subtype;
SpiceCharDeviceState *st;
+ const char* portname;
};
void spice_server_char_device_wakeup(SpiceCharDeviceInstance *sin);
+void spice_server_port_event(SpiceCharDeviceInstance *char_device, uint8_t event);
const char** spice_server_char_device_recognized_subtypes(void);
/* spice server setup */