summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2010-03-30 11:28:50 +0200
committerGerd Hoffmann <kraxel@redhat.com>2010-05-19 11:22:06 +0200
commit10e6d8b53cf89b9e7c58b0696f078d18af21827e (patch)
treefd1c50faa573c34737f601dc7f607659f9fb32a5 /server
parent30c740201d1b111ca28e7881ddbcc91f259b8a11 (diff)
downloadspice-10e6d8b53cf89b9e7c58b0696f078d18af21827e.tar.gz
spice-10e6d8b53cf89b9e7c58b0696f078d18af21827e.tar.xz
spice-10e6d8b53cf89b9e7c58b0696f078d18af21827e.zip
s/CoreInterface/SpiceCoreInterface/
Diffstat (limited to 'server')
-rw-r--r--server/red_channel.c3
-rw-r--r--server/red_channel.h5
-rw-r--r--server/red_tunnel_worker.c5
-rwxr-xr-xserver/red_tunnel_worker.h2
-rw-r--r--server/reds.c14
-rw-r--r--server/reds.h2
-rw-r--r--server/spice.h5
-rw-r--r--server/vd_interface.h17
8 files changed, 20 insertions, 33 deletions
diff --git a/server/red_channel.c b/server/red_channel.c
index 3f461477..9f02822a 100644
--- a/server/red_channel.c
+++ b/server/red_channel.c
@@ -228,7 +228,8 @@ static void red_channel_peer_on_out_msg_done(void *opaque)
}
}
-RedChannel *red_channel_create(int size, RedsStreamContext *peer, CoreInterface *core,
+RedChannel *red_channel_create(int size, RedsStreamContext *peer,
+ SpiceCoreInterface *core,
int migrate, int handle_acks,
channel_configure_socket_proc config_socket,
channel_disconnect_proc disconnect,
diff --git a/server/red_channel.h b/server/red_channel.h
index e222f634..1fc92e5f 100644
--- a/server/red_channel.h
+++ b/server/red_channel.h
@@ -101,7 +101,7 @@ typedef void (*channel_release_pipe_item_proc)(RedChannel *channel,
struct RedChannel {
RedsStreamContext *peer;
- CoreInterface *core;
+ SpiceCoreInterface *core;
int migrate;
int handle_acks;
@@ -141,7 +141,8 @@ struct RedChannel {
/* if one of the callbacks should cause disconnect, use red_channel_shutdown and don't
explicitly destroy the channel */
-RedChannel *red_channel_create(int size, RedsStreamContext *peer, CoreInterface *core,
+RedChannel *red_channel_create(int size, RedsStreamContext *peer,
+ SpiceCoreInterface *core,
int migrate, int handle_acks,
channel_configure_socket_proc config_socket,
channel_disconnect_proc disconnect,
diff --git a/server/red_tunnel_worker.c b/server/red_tunnel_worker.c
index cf1f3179..d4da0b3b 100644
--- a/server/red_tunnel_worker.c
+++ b/server/red_tunnel_worker.c
@@ -534,7 +534,7 @@ struct TunnelWorker {
Channel channel_interface; // for reds
TunnelChannel *channel;
- CoreInterface *core_interface;
+ SpiceCoreInterface *core_interface;
NetWireInterface *vlan_interface;
RedSlirpNetworkInterface tunnel_interface;
RedSlirpNetworkInterface null_interface;
@@ -970,7 +970,8 @@ static void tunnel_send_packet(void *opaque_tunnel, const uint8_t *pkt, int pkt_
net_slirp_input(pkt, pkt_len);
}
-void *red_tunnel_attach(CoreInterface *core_interface, NetWireInterface *vlan_interface)
+void *red_tunnel_attach(SpiceCoreInterface *core_interface,
+ NetWireInterface *vlan_interface)
{
TunnelWorker *worker = spice_new0(TunnelWorker, 1);
diff --git a/server/red_tunnel_worker.h b/server/red_tunnel_worker.h
index 606c9dd3..9f3a61ca 100755
--- a/server/red_tunnel_worker.h
+++ b/server/red_tunnel_worker.h
@@ -24,6 +24,6 @@
#include "vd_interface.h"
-void *red_tunnel_attach(CoreInterface *core_interface, NetWireInterface *vlan_interface);
+void *red_tunnel_attach(SpiceCoreInterface *core_interface, NetWireInterface *vlan_interface);
#endif
diff --git a/server/reds.c b/server/reds.c
index b81e0b35..740de361 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -54,7 +54,7 @@
#include "red_tunnel_worker.h"
#endif
-CoreInterface *core = NULL;
+SpiceCoreInterface *core = NULL;
static MigrationInterface *mig = NULL;
static KeyboardInterface *keyboard = NULL;
static MouseInterface *mouse = NULL;
@@ -4267,11 +4267,11 @@ static void init_vd_agent_resources()
const char *version_string = VERSION;
-static void do_spice_init(CoreInterface *core_interface)
+static void do_spice_init(SpiceCoreInterface *core_interface)
{
red_printf("starting %s", version_string);
- if (core_interface->base.major_version != VD_INTERFACE_CORE_MAJOR) {
+ if (core_interface->base.major_version != SPICE_INTERFACE_CORE_MAJOR) {
red_error("bad core interface version");
}
core = core_interface;
@@ -4335,12 +4335,6 @@ static void do_spice_init(CoreInterface *core_interface)
atexit(reds_exit);
}
-__visible__ void spice_init(CoreInterface *core_interface)
-{
- spice_server_new();
- do_spice_init(core_interface);
-}
-
/* new interface */
__visible__ SpiceServer *spice_server_new(void)
{
@@ -4351,7 +4345,7 @@ __visible__ SpiceServer *spice_server_new(void)
return reds;
}
-__visible__ int spice_server_init(SpiceServer *s, CoreInterface *core)
+__visible__ int spice_server_init(SpiceServer *s, SpiceCoreInterface *core)
{
ASSERT(reds == s);
do_spice_init(core);
diff --git a/server/reds.h b/server/reds.h
index 60eef4a5..9a171f63 100644
--- a/server/reds.h
+++ b/server/reds.h
@@ -67,7 +67,7 @@ void reds_set_client_mouse_allowed(int is_client_mouse_allowed,
void reds_register_channel(Channel *channel);
void reds_unregister_channel(Channel *channel);
-extern struct CoreInterface *core;
+extern struct SpiceCoreInterface *core;
extern uint64_t bitrate_per_sec;
#define IS_LOW_BANDWIDTH() (bitrate_per_sec < 10 * 1024 * 1024)
diff --git a/server/spice.h b/server/spice.h
index 5b768ef2..caf2830f 100644
--- a/server/spice.h
+++ b/server/spice.h
@@ -21,13 +21,10 @@
#include <sys/socket.h>
#include "vd_interface.h"
-/* old interface */
-void spice_init(CoreInterface *core);
-
/* new interface */
typedef struct RedsState SpiceServer;
SpiceServer *spice_server_new(void);
-int spice_server_init(SpiceServer *s, CoreInterface *core);
+int spice_server_init(SpiceServer *s, SpiceCoreInterface *core);
void spice_server_destroy(SpiceServer *s);
#define SPICE_ADDR_FLAG_IPV4_ONLY (1 << 0)
diff --git a/server/vd_interface.h b/server/vd_interface.h
index 6b86dc89..abfe088d 100644
--- a/server/vd_interface.h
+++ b/server/vd_interface.h
@@ -50,14 +50,10 @@ struct SpiceBaseInstance {
SpiceBaseInterface *sif;
};
-#define VD_INTERFACE_CORE "core"
-#define VD_INTERFACE_CORE_MAJOR 1
-#define VD_INTERFACE_CORE_MINOR 2
-typedef struct CoreInterface CoreInterface;
-typedef enum {
- VD_INTERFACE_ADDING,
- VD_INTERFACE_REMOVING,
-} SpiceBaseInterfaceChangeType;
+#define SPICE_INTERFACE_CORE "core"
+#define SPICE_INTERFACE_CORE_MAJOR 1
+#define SPICE_INTERFACE_CORE_MINOR 2
+typedef struct SpiceCoreInterface SpiceCoreInterface;
typedef enum {
VD_LOG_ERROR = 1,
@@ -65,9 +61,6 @@ typedef enum {
VD_LOG_INFO,
} LogLevel;
-typedef void (*vd_interface_change_notifier_t)(void *opaque, SpiceBaseInterface *interface,
- SpiceBaseInterfaceChangeType change);
-
#define SPICE_WATCH_EVENT_READ (1 << 0)
#define SPICE_WATCH_EVENT_WRITE (1 << 1)
@@ -77,7 +70,7 @@ typedef void (*SpiceWatchFunc)(int fd, int event, void *opaque);
typedef struct SpiceTimer SpiceTimer;
typedef void (*SpiceTimerFunc)(void *opaque);
-struct CoreInterface {
+struct SpiceCoreInterface {
SpiceBaseInterface base;
SpiceTimer *(*timer_add)(SpiceTimerFunc func, void *opaque);