mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-31 11:28:31 +00:00
vd_interface.h cleanups.
Drop leftover bits which are not used any more. Rename DrawArea to QXLDrawArea.
This commit is contained in:
parent
5b0bc279c9
commit
3f4d6c6ad6
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user