[Spice-devel] [PATCH 39/39] add spice-experimental.h
Gerd Hoffmann
kraxel at redhat.com
Tue May 18 08:43:16 PDT 2010
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.
Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
---
server/Makefile.am | 2 +
server/red_tunnel_worker.h | 2 -
server/reds.c | 1 +
server/spice-experimental.h | 63 +++++++++++++++++++++++++++++++++++++++++++
server/spice.h | 63 -------------------------------------------
5 files changed, 66 insertions(+), 65 deletions(-)
create mode 100644 server/spice-experimental.h
diff --git a/server/Makefile.am b/server/Makefile.am
index 102aa05..e0d4b45 100644
--- a/server/Makefile.am
+++ b/server/Makefile.am
@@ -86,6 +86,7 @@ libspice_server_la_SOURCES = \
red_channel.h \
red_channel.c \
spice.h \
+ spice-experimental.h \
$(TUNNEL_SRCS) \
$(COMMON_SRCS) \
$(NULL)
@@ -93,6 +94,7 @@ libspice_server_la_SOURCES = \
libspice_serverincludedir = $(includedir)/spice-server
libspice_serverinclude_HEADERS = \
spice.h \
+ spice-experimental.h \
$(NULL)
EXTRA_DIST = \
diff --git a/server/red_tunnel_worker.h b/server/red_tunnel_worker.h
index 42d23d1..3df4aea 100755
--- a/server/red_tunnel_worker.h
+++ b/server/red_tunnel_worker.h
@@ -22,8 +22,6 @@
#ifndef _H_RED_TUNNEL_WORKER
#define _H_RED_TUNNEL_WORKER
-#include "spice.h"
-
void *red_tunnel_attach(SpiceCoreInterface *core_interface, SpiceNetWireInstance *sin);
#endif
diff --git a/server/reds.c b/server/reds.c
index e9bf716..45946f0 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -39,6 +39,7 @@
#include <openssl/err.h>
#include "spice.h"
+#include "spice-experimental.h"
#include "reds.h"
#include <spice/protocol.h>
#include <spice/vd_agent.h>
diff --git a/server/spice-experimental.h b/server/spice-experimental.h
new file mode 100644
index 0000000..0b732bc
--- /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);
+
diff --git a/server/spice.h b/server/spice.h
index ccbae92..6c5853d 100644
--- a/server/spice.h
+++ b/server/spice.h
@@ -310,55 +310,6 @@ void spice_server_record_stop(SpiceRecordInstance *sin);
uint32_t spice_server_record_get_samples(SpiceRecordInstance *sin,
uint32_t *samples, uint32_t bufsize);
-/* 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 server setup */
typedef struct RedsState SpiceServer;
@@ -407,18 +358,4 @@ int spice_server_add_renderer(SpiceServer *s, const char *name);
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);
-/* 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);
-
#endif
--
1.6.6.1
More information about the Spice-devel
mailing list