[Spice-devel] [PATCH 37/39] vd_interface.h cleanups.
Gerd Hoffmann
kraxel at redhat.com
Tue May 18 08:43:14 PDT 2010
Drop leftover bits which are not used any more.
Rename DrawArea to QXLDrawArea.
Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
---
server/reds.c | 16 ----------------
server/snd_worker.c | 2 --
server/vd_interface.h | 39 +++------------------------------------
3 files changed, 3 insertions(+), 54 deletions(-)
diff --git a/server/reds.c b/server/reds.c
index 4fc0392..e9bf716 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -254,7 +254,6 @@ typedef struct RedsState {
VDIPortState agent_state;
InputsState *inputs_state;
- VDObjectRef mig_notifier;
int mig_wait_connect;
int mig_wait_disconnect;
int mig_inprogress;
@@ -372,21 +371,6 @@ static int default_channel_security =
static RedSSLParameters ssl_parameters;
-static int args_is_empty(const VDICmdArg* args)
-{
- return !args || args[0].descriptor.type == ARG_TYPE_INVALID;
-}
-
-const int args_is_string(const VDICmdArg* args)
-{
- return !args_is_empty(args) && args->descriptor.type == ARG_TYPE_STRING;
-}
-
-const int args_is_int(const VDICmdArg* args)
-{
- return !args_is_empty(args) && args->descriptor.type == ARG_TYPE_INT;
-}
-
static ChannelSecurityOptions *find_channel_security(int id)
{
ChannelSecurityOptions *now = channels_security;
diff --git a/server/snd_worker.c b/server/snd_worker.c
index 6a08e92..c43ef2d 100644
--- a/server/snd_worker.c
+++ b/server/snd_worker.c
@@ -121,7 +121,6 @@ struct AudioFrame {
typedef struct PlaybackChannel {
SndChannel base;
AudioFrame frames[3];
- VDObjectRef plug_ref;
AudioFrame *free_frames;
AudioFrame *in_progress;
AudioFrame *pending_frame;
@@ -172,7 +171,6 @@ typedef struct __attribute__ ((__packed__)) RecordMigrateMessage {
typedef struct RecordChannel {
SndChannel base;
- VDObjectRef plug_ref;
uint32_t samples[RECORD_SAMPLES_SIZE];
uint32_t write_pos;
uint32_t read_pos;
diff --git a/server/vd_interface.h b/server/vd_interface.h
index aaa1ca8..fc81a24 100644
--- a/server/vd_interface.h
+++ b/server/vd_interface.h
@@ -33,10 +33,6 @@
#include <stdint.h>
-#define VM_INTERFACE_VERSION 1
-typedef unsigned long VDObjectRef;
-#define INVALID_VD_OBJECT_REF 0
-
typedef struct SpiceBaseInterface SpiceBaseInterface;
typedef struct SpiceBaseInstance SpiceBaseInstance;
@@ -55,12 +51,6 @@ struct SpiceBaseInstance {
#define SPICE_INTERFACE_CORE_MINOR 2
typedef struct SpiceCoreInterface SpiceCoreInterface;
-typedef enum {
- VD_LOG_ERROR = 1,
- VD_LOG_WARN,
- VD_LOG_INFO,
-} LogLevel;
-
#define SPICE_WATCH_EVENT_READ (1 << 0)
#define SPICE_WATCH_EVENT_WRITE (1 << 1)
@@ -121,14 +111,14 @@ struct QXLWorker {
void (*loadvm_commands)(QXLWorker *worker, struct QXLCommandExt *ext, uint32_t count);
};
-typedef struct DrawArea {
+typedef struct QXLDrawArea {
uint8_t *buf;
uint32_t size;
uint8_t *line_0;
uint32_t width;
uint32_t heigth;
int stride;
-} DrawArea;
+} QXLDrawArea;
typedef struct QXLDevInfo {
uint32_t x_res;
@@ -136,7 +126,7 @@ typedef struct QXLDevInfo {
uint32_t bits;
uint32_t use_hardware_cursor;
- DrawArea draw_area;
+ QXLDrawArea draw_area;
uint32_t ram_size;
} QXLDevInfo;
@@ -264,29 +254,6 @@ struct SpiceTabletInstance {
SpiceTabletState *st;
};
-enum VDIArgType{
- ARG_TYPE_INVALID,
- ARG_TYPE_INT,
- ARG_TYPE_STRING,
-};
-
-typedef struct VDIArgDescriptor {
- char* name;
- int type;
- int optional;
-} VDIArgDescriptor;
-
-typedef struct VDICmdArg {
- VDIArgDescriptor descriptor;
- union {
- uint64_t int_val;
- const char *string_val;
- };
-} VDICmdArg;
-
-typedef void (*VDICmdHandler)(const VDICmdArg* args);
-typedef void (*VDIInfoCmdHandler)(void);
-
#define SPICE_INTERFACE_PLAYBACK "playback"
#define SPICE_INTERFACE_PLAYBACK_MAJOR 1
#define SPICE_INTERFACE_PLAYBACK_MINOR 1
--
1.6.6.1
More information about the Spice-devel
mailing list