diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2010-12-14 12:56:15 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2010-12-16 09:16:10 +0100 |
commit | 7bbc2ba090788d844573e044041480ff6e3cba7b (patch) | |
tree | 5168e1f1f5c521ab0dbc22c32a99246f137bc9bd /server/spice.h | |
parent | 6acb817071daa13b8389bfce12cac6221997cebe (diff) | |
download | spice-7bbc2ba090788d844573e044041480ff6e3cba7b.tar.gz spice-7bbc2ba090788d844573e044041480ff6e3cba7b.tar.xz spice-7bbc2ba090788d844573e044041480ff6e3cba7b.zip |
move chardevs out of experimental
While we are at it: There is no reason for chardev
support to stay in the experimental area, so move it out.
qemu should not need the "spice-experimental.h" file.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'server/spice.h')
-rw-r--r-- | server/spice.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/server/spice.h b/server/spice.h index 87303ab9..f6a4fe04 100644 --- a/server/spice.h +++ b/server/spice.h @@ -322,6 +322,32 @@ void spice_server_record_stop(SpiceRecordInstance *sin); uint32_t spice_server_record_get_samples(SpiceRecordInstance *sin, uint32_t *samples, uint32_t bufsize); +/* char device interfaces */ + +#define SPICE_INTERFACE_CHAR_DEVICE "char_device" +#define SPICE_INTERFACE_CHAR_DEVICE_MAJOR 1 +#define SPICE_INTERFACE_CHAR_DEVICE_MINOR 1 +typedef struct SpiceCharDeviceInterface SpiceCharDeviceInterface; +typedef struct SpiceCharDeviceInstance SpiceCharDeviceInstance; +typedef struct SpiceCharDeviceState SpiceCharDeviceState; + +struct SpiceCharDeviceInterface { + SpiceBaseInterface base; + + 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); +}; + +struct SpiceCharDeviceInstance { + SpiceBaseInstance base; + const char* subtype; + SpiceCharDeviceState *st; +}; + +void spice_server_char_device_wakeup(SpiceCharDeviceInstance *sin); +const char** spice_server_char_device_recognized_subtypes(void); + /* spice server setup */ /* Don't use features incompatible with a specific spice |