summaryrefslogtreecommitdiffstats
path: root/server/spice-experimental.h
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2010-05-18 15:32:35 +0200
committerGerd Hoffmann <kraxel@redhat.com>2010-05-19 11:22:08 +0200
commit9204a5903ab7a2cc39f1c078ce503d337a815be0 (patch)
tree5204865baefd62bdfd03a6e9f459db9b437ac849 /server/spice-experimental.h
parent981abd3fee93efb4578e1ae6442ea4b320a710a9 (diff)
downloadspice-9204a5903ab7a2cc39f1c078ce503d337a815be0.tar.gz
spice-9204a5903ab7a2cc39f1c078ce503d337a815be0.tar.xz
spice-9204a5903ab7a2cc39f1c078ce503d337a815be0.zip
add spice-experimental.h
Supposed to be used for work-in-progress bits, where interfaces are not finalized yet. Moved over vdi port interface, tunnel interface and spice client migration functions.
Diffstat (limited to 'server/spice-experimental.h')
-rw-r--r--server/spice-experimental.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/server/spice-experimental.h b/server/spice-experimental.h
new file mode 100644
index 00000000..0b732bc8
--- /dev/null
+++ b/server/spice-experimental.h
@@ -0,0 +1,63 @@
+/* vdi port interface */
+
+#define SPICE_INTERFACE_VDI_PORT "vdi_port"
+#define SPICE_INTERFACE_VDI_PORT_MAJOR 1
+#define SPICE_INTERFACE_VDI_PORT_MINOR 1
+typedef struct SpiceVDIPortInterface SpiceVDIPortInterface;
+typedef struct SpiceVDIPortInstance SpiceVDIPortInstance;
+typedef struct SpiceVDIPortState SpiceVDIPortState;
+
+struct SpiceVDIPortInterface {
+ SpiceBaseInterface base;
+
+ void (*state)(SpiceVDIPortInstance *sin, int connected);
+ int (*write)(SpiceVDIPortInstance *sin, const uint8_t *buf, int len);
+ int (*read)(SpiceVDIPortInstance *sin, uint8_t *buf, int len);
+};
+
+struct SpiceVDIPortInstance {
+ SpiceBaseInstance base;
+ SpiceVDIPortState *st;
+};
+
+void spice_server_vdi_port_wakeup(SpiceVDIPortInstance *sin);
+
+/* tunnel interface */
+
+#define SPICE_INTERFACE_NET_WIRE "net_wire"
+#define SPICE_INTERFACE_NET_WIRE_MAJOR 1
+#define SPICE_INTERFACE_NET_WIRE_MINOR 1
+typedef struct SpiceNetWireInterface SpiceNetWireInterface;
+typedef struct SpiceNetWireInstance SpiceNetWireInstance;
+typedef struct SpiceNetWireState SpiceNetWireState;
+
+struct NetWireInterface {
+ SpiceBaseInterface base;
+
+ struct in_addr (*get_ip)(SpiceNetWireInterface *sin);
+ int (*can_send_packet)(SpiceNetWireInterface *sin);
+ void (*send_packet)(SpiceNetWireInterface *sin, const uint8_t *pkt, int len);
+};
+
+struct SpiceNetWireInstance {
+ SpiceBaseInstance base;
+ SpiceNetWireState *st;
+};
+
+void spice_server_net_wire_recv_packet(SpiceNetWireInstance *sin,
+ const uint8_t *pkt, int len);
+
+/* spice client migration */
+
+enum {
+ SPICE_MIGRATE_CLIENT_NONE = 1,
+ SPICE_MIGRATE_CLIENT_WAITING,
+ SPICE_MIGRATE_CLIENT_READY,
+};
+
+int spice_server_migrate_info(SpiceServer *s, const char* dest, int port, int secure_port,
+ const char* cert_subject);
+int spice_server_migrate_start(SpiceServer *s);
+int spice_server_migrate_client_state(SpiceServer *s);
+int spice_server_migrate_end(SpiceServer *s, int completed);
+