Generate automatically most C message declarations

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
This commit is contained in:
Frediano Ziglio 2019-02-21 09:30:54 +00:00
parent 5f1f369e41
commit bd75d3f934
2 changed files with 102 additions and 585 deletions

View File

@ -42,10 +42,6 @@
SPICE_BEGIN_DECLS
typedef struct SpiceMsgData {
uint8_t data[0];
} SpiceMsgData;
typedef struct SpiceMsgCompressedData {
uint8_t type;
uint32_t uncompressed_size;
@ -53,438 +49,8 @@ typedef struct SpiceMsgCompressedData {
uint8_t *compressed_data;
} SpiceMsgCompressedData;
typedef struct SpiceMsgEmpty {
uint8_t padding;
} SpiceMsgEmpty;
typedef struct SpiceMsgInputsInit {
uint32_t keyboard_modifiers;
} SpiceMsgInputsInit;
typedef struct SpiceMsgInputsKeyModifiers {
uint32_t modifiers;
} SpiceMsgInputsKeyModifiers;
typedef struct SpiceMsgMainMultiMediaTime {
uint32_t time;
} SpiceMsgMainMultiMediaTime;
typedef struct SpiceMigrationDstInfo {
uint16_t port;
uint16_t sport;
uint32_t host_size;
uint8_t *host_data;
uint32_t cert_subject_size;
uint8_t *cert_subject_data;
} SpiceMigrationDstInfo;
typedef struct SpiceMsgMainMigrationBegin {
SpiceMigrationDstInfo dst_info;
} SpiceMsgMainMigrationBegin;
typedef struct SpiceMsgMainMigrateBeginSeamless {
SpiceMigrationDstInfo dst_info;
uint32_t src_mig_version;
} SpiceMsgMainMigrateBeginSeamless;
typedef struct SpiceMsgcMainMigrateDstDoSeamless {
uint32_t src_version;
} SpiceMsgcMainMigrateDstDoSeamless;
typedef struct SpiceMsgMainMigrationSwitchHost {
uint16_t port;
uint16_t sport;
uint32_t host_size;
uint8_t *host_data;
uint32_t cert_subject_size;
uint8_t *cert_subject_data;
} SpiceMsgMainMigrationSwitchHost;
typedef struct SpiceMsgMigrate {
uint32_t flags;
} SpiceMsgMigrate;
typedef struct SpiceResourceID {
uint8_t type;
uint64_t id;
} SpiceResourceID;
typedef struct SpiceResourceList {
uint16_t count;
SpiceResourceID resources[0];
} SpiceResourceList;
typedef struct SpiceMsgSetAck {
uint32_t generation;
uint32_t window;
} SpiceMsgSetAck;
typedef struct SpiceMsgcAckSync {
uint32_t generation;
} SpiceMsgcAckSync;
typedef struct SpiceWaitForChannel {
uint8_t channel_type;
uint8_t channel_id;
uint64_t message_serial;
} SpiceWaitForChannel;
typedef struct SpiceMsgWaitForChannels {
uint8_t wait_count;
SpiceWaitForChannel wait_list[0];
} SpiceMsgWaitForChannels;
typedef struct SpiceChannelId {
uint8_t type;
uint8_t id;
} SpiceChannelId;
typedef struct SpiceMsgMainInit {
uint32_t session_id;
uint32_t display_channels_hint;
uint32_t supported_mouse_modes;
uint32_t current_mouse_mode;
uint32_t agent_connected;
uint32_t agent_tokens;
uint32_t multi_media_time;
uint32_t ram_hint;
} SpiceMsgMainInit;
typedef struct SpiceMsgDisconnect {
uint64_t time_stamp;
uint32_t reason; // SPICE_ERR_?
} SpiceMsgDisconnect;
typedef struct SpiceMsgNotify {
uint64_t time_stamp;
uint32_t severity;
uint32_t visibilty;
uint32_t what;
uint32_t message_len;
uint8_t message[0];
} SpiceMsgNotify;
typedef struct SpiceMsgChannels {
uint32_t num_of_channels;
SpiceChannelId channels[0];
} SpiceMsgChannels;
typedef struct SpiceMsgMainName {
uint32_t name_len;
uint8_t name[0];
} SpiceMsgMainName;
typedef struct SpiceMsgMainUuid {
uint8_t uuid[16];
} SpiceMsgMainUuid;
typedef struct SpiceMsgMainMouseMode {
uint32_t supported_modes;
uint32_t current_mode;
} SpiceMsgMainMouseMode;
typedef struct SpiceMsgPing {
uint32_t id;
uint64_t timestamp;
void *data;
uint32_t data_len;
} SpiceMsgPing;
typedef struct SpiceMsgMainAgentDisconnect {
uint32_t error_code; // SPICE_ERR_?
} SpiceMsgMainAgentDisconnect;
#define SPICE_AGENT_MAX_DATA_SIZE 2048
typedef struct SpiceMsgMainAgentTokens {
uint32_t num_tokens;
} SpiceMsgMainAgentTokens, SpiceMsgcMainAgentTokens, SpiceMsgcMainAgentStart;
typedef struct SpiceMsgMainAgentTokens SpiceMsgMainAgentConnectedTokens;
typedef struct SpiceMsgcClientInfo {
uint64_t cache_size;
} SpiceMsgcClientInfo;
typedef struct SpiceMsgcMainMouseModeRequest {
uint32_t mode;
} SpiceMsgcMainMouseModeRequest;
typedef struct SpiceCursor {
uint32_t flags;
SpiceCursorHeader header;
uint32_t data_size;
uint8_t *data;
} SpiceCursor;
typedef struct SpiceMsgDisplayMode {
uint32_t x_res;
uint32_t y_res;
uint32_t bits;
} SpiceMsgDisplayMode;
typedef struct SpiceMsgSurfaceCreate {
uint32_t surface_id;
uint32_t width;
uint32_t height;
uint32_t format;
uint32_t flags;
} SpiceMsgSurfaceCreate;
typedef struct SpiceMsgSurfaceDestroy {
uint32_t surface_id;
} SpiceMsgSurfaceDestroy;
typedef struct SpiceMsgDisplayBase {
uint32_t surface_id;
SpiceRect box;
SpiceClip clip;
} SpiceMsgDisplayBase;
typedef struct SpiceMsgDisplayDrawFill {
SpiceMsgDisplayBase base;
SpiceFill data;
} SpiceMsgDisplayDrawFill;
typedef struct SpiceMsgDisplayDrawOpaque {
SpiceMsgDisplayBase base;
SpiceOpaque data;
} SpiceMsgDisplayDrawOpaque;
typedef struct SpiceMsgDisplayDrawCopy {
SpiceMsgDisplayBase base;
SpiceCopy data;
} SpiceMsgDisplayDrawCopy;
typedef struct SpiceMsgDisplayDrawTransparent {
SpiceMsgDisplayBase base;
SpiceTransparent data;
} SpiceMsgDisplayDrawTransparent;
typedef struct SpiceMsgDisplayDrawAlphaBlend {
SpiceMsgDisplayBase base;
SpiceAlphaBlend data;
} SpiceMsgDisplayDrawAlphaBlend;
typedef struct SpiceMsgDisplayDrawComposite {
SpiceMsgDisplayBase base;
SpiceComposite data;
} SpiceMsgDisplayDrawComposite;
typedef struct SpiceMsgDisplayCopyBits {
SpiceMsgDisplayBase base;
SpicePoint src_pos;
} SpiceMsgDisplayCopyBits;
typedef SpiceMsgDisplayDrawCopy SpiceMsgDisplayDrawBlend;
typedef struct SpiceMsgDisplayDrawRop3 {
SpiceMsgDisplayBase base;
SpiceRop3 data;
} SpiceMsgDisplayDrawRop3;
typedef struct SpiceMsgDisplayDrawBlackness {
SpiceMsgDisplayBase base;
SpiceBlackness data;
} SpiceMsgDisplayDrawBlackness;
typedef struct SpiceMsgDisplayDrawWhiteness {
SpiceMsgDisplayBase base;
SpiceWhiteness data;
} SpiceMsgDisplayDrawWhiteness;
typedef struct SpiceMsgDisplayDrawInvers {
SpiceMsgDisplayBase base;
SpiceInvers data;
} SpiceMsgDisplayDrawInvers;
typedef struct SpiceMsgDisplayDrawStroke {
SpiceMsgDisplayBase base;
SpiceStroke data;
} SpiceMsgDisplayDrawStroke;
typedef struct SpiceMsgDisplayDrawText {
SpiceMsgDisplayBase base;
SpiceText data;
} SpiceMsgDisplayDrawText;
typedef struct SpiceMsgDisplayInvalOne {
uint64_t id;
} SpiceMsgDisplayInvalOne;
typedef struct SpiceMsgDisplayStreamCreate {
uint32_t surface_id;
uint32_t id; /* Any number from 0 to SPICE_MAX_NUM_STREAMS - 1 */
uint32_t flags;
uint32_t codec_type;
uint64_t stamp;
uint32_t stream_width;
uint32_t stream_height;
uint32_t src_width;
uint32_t src_height;
SpiceRect dest;
SpiceClip clip;
} SpiceMsgDisplayStreamCreate;
typedef struct SpiceStreamDataHeader {
uint32_t id;
uint32_t multi_media_time;
} SpiceStreamDataHeader;
typedef struct SpiceMsgDisplayStreamData {
SpiceStreamDataHeader base;
uint32_t data_size;
uint8_t data[0];
} SpiceMsgDisplayStreamData;
typedef struct SpiceMsgDisplayStreamDataSized {
SpiceStreamDataHeader base;
uint32_t width;
uint32_t height;
SpiceRect dest;
uint32_t data_size;
uint8_t data[0];
} SpiceMsgDisplayStreamDataSized;
typedef struct SpiceMsgDisplayStreamClip {
uint32_t id;
SpiceClip clip;
} SpiceMsgDisplayStreamClip;
typedef struct SpiceMsgDisplayStreamDestroy {
uint32_t id;
} SpiceMsgDisplayStreamDestroy;
typedef struct SpiceMsgDisplayStreamActivateReport {
uint32_t stream_id;
uint32_t unique_id;
uint32_t max_window_size;
uint32_t timeout_ms;
} SpiceMsgDisplayStreamActivateReport;
typedef struct SpiceMsgcDisplayStreamReport {
uint32_t stream_id;
uint32_t unique_id;
uint32_t start_frame_mm_time;
uint32_t end_frame_mm_time;
uint32_t num_frames;
uint32_t num_drops;
int32_t last_frame_delay;
uint32_t audio_delay;
} SpiceMsgcDisplayStreamReport;
typedef struct SpiceMsgcDisplayGlDrawDone {
} SpiceMsgcDisplayGlDrawDone;
typedef struct SpiceMsgCursorInit {
SpicePoint16 position;
uint16_t trail_length;
uint16_t trail_frequency;
uint8_t visible;
SpiceCursor cursor;
} SpiceMsgCursorInit;
typedef struct SpiceMsgCursorSet {
SpicePoint16 position;
uint8_t visible;
SpiceCursor cursor;
} SpiceMsgCursorSet;
typedef struct SpiceMsgCursorMove {
SpicePoint16 position;
} SpiceMsgCursorMove;
typedef struct SpiceMsgCursorTrail {
uint16_t length;
uint16_t frequency;
} SpiceMsgCursorTrail;
typedef struct SpiceMsgcDisplayInit {
uint8_t pixmap_cache_id;
int64_t pixmap_cache_size; //in pixels
uint8_t glz_dictionary_id;
int32_t glz_dictionary_window_size; // in pixels
} SpiceMsgcDisplayInit;
typedef struct SpiceMsgcKeyDown {
uint32_t code;
} SpiceMsgcKeyDown;
typedef struct SpiceMsgcKeyUp {
uint32_t code;
} SpiceMsgcKeyUp;
typedef struct SpiceMsgcKeyModifiers {
uint32_t modifiers;
} SpiceMsgcKeyModifiers;
typedef struct SpiceMsgcMouseMotion {
int32_t dx;
int32_t dy;
uint32_t buttons_state;
} SpiceMsgcMouseMotion;
typedef struct SpiceMsgcMousePosition {
uint32_t x;
uint32_t y;
uint32_t buttons_state;
uint8_t display_id;
} SpiceMsgcMousePosition;
typedef struct SpiceMsgcMousePress {
int32_t button;
int32_t buttons_state;
} SpiceMsgcMousePress;
typedef struct SpiceMsgcMouseRelease {
int32_t button;
int32_t buttons_state;
} SpiceMsgcMouseRelease;
typedef struct SpiceMsgAudioVolume {
uint8_t nchannels;
uint16_t volume[0];
} SpiceMsgAudioVolume;
typedef struct SpiceMsgAudioMute {
uint8_t mute;
} SpiceMsgAudioMute;
typedef struct SpiceMsgPlaybackMode {
uint32_t time;
uint32_t mode; //SPICE_AUDIO_DATA_MODE_?
uint8_t *data;
uint32_t data_size;
} SpiceMsgPlaybackMode, SpiceMsgcRecordMode;
typedef struct SpiceMsgPlaybackStart {
uint32_t channels;
uint32_t format; //SPICE_AUDIO_FMT_?
uint32_t frequency;
uint32_t time;
} SpiceMsgPlaybackStart;
typedef struct SpiceMsgPlaybackPacket {
uint32_t time;
uint8_t *data;
uint32_t data_size;
} SpiceMsgPlaybackPacket, SpiceMsgcRecordPacket;
typedef struct SpiceMsgPlaybackLatency {
uint32_t latency_ms;
} SpiceMsgPlaybackLatency;
typedef struct SpiceMsgRecordStart {
uint32_t channels;
uint32_t format; //SPICE_AUDIO_FMT_?
uint32_t frequency;
} SpiceMsgRecordStart;
typedef struct SpiceMsgcRecordStartMark {
uint32_t time;
} SpiceMsgcRecordStartMark;
#ifdef USE_SMARTCARD
typedef struct SpiceMsgSmartcard {
VSCMsgType type;
@ -503,63 +69,14 @@ typedef struct SpiceMsgcSmartcard {
} SpiceMsgcSmartcard;
#endif
typedef struct SpiceMsgDisplayHead {
uint32_t monitor_id;
uint32_t surface_id;
uint32_t width;
uint32_t height;
uint32_t x;
uint32_t y;
uint32_t flags;
} SpiceHead;
typedef struct SpiceMsgDisplayMonitorsConfig {
uint16_t count;
uint16_t max_allowed;
SpiceHead heads[0];
} SpiceMsgDisplayMonitorsConfig;
typedef struct SpiceMsgPortInit {
uint32_t name_size;
uint8_t *name;
uint8_t opened;
} SpiceMsgPortInit;
typedef struct SpiceMsgPortEvent {
uint8_t event;
} SpiceMsgPortEvent;
typedef struct SpiceMsgcPortEvent {
uint8_t event;
} SpiceMsgcPortEvent;
typedef struct SpiceMsgcDisplayPreferredVideoCodecType {
uint8_t num_of_codecs;
uint8_t codecs[0];
} SpiceMsgcDisplayPreferredVideoCodecType;
typedef struct SpiceMsgcDisplayPreferredCompression {
uint8_t image_compression;
} SpiceMsgcDisplayPreferredCompression;
typedef struct SpiceMsgDisplayGlScanoutUnix {
int drm_dma_buf_fd;
uint32_t width;
uint32_t height;
uint32_t stride;
uint32_t drm_fourcc_format;
uint32_t flags;
} SpiceMsgDisplayGlScanoutUnix;
typedef struct SpiceMsgDisplayGlDraw {
uint32_t x;
uint32_t y;
uint32_t w;
uint32_t h;
} SpiceMsgDisplayGlDraw;
#include <common/generated_messages.h>
typedef SpiceMsgMainAgentTokens SpiceMsgcMainAgentTokens;
typedef SpiceMsgMainAgentTokens SpiceMsgcMainAgentStart;
typedef SpiceMsgDisplayDrawCopy SpiceMsgDisplayDrawBlend;
typedef SpiceMsgPlaybackMode SpiceMsgcRecordMode;
typedef SpiceMsgPlaybackPacket SpiceMsgcRecordPacket;
SPICE_END_DECLS
#endif // H_SPICE_COMMON_MESSAGES

View File

@ -106,11 +106,11 @@ flags16 mouse_mode {
};
message Empty {
};
} @declare;
message Data {
uint8 data[] @end @ctype(uint8_t);
} @nocopy;
} @nocopy @declare;
enum8 data_compression_type {
NONE,
@ -138,36 +138,36 @@ struct ChannelWait {
uint8 channel_type;
uint8 channel_id;
uint64 message_serial;
} @ctype(SpiceWaitForChannel);
} @ctype(SpiceWaitForChannel) @declare;
channel BaseChannel {
server:
message {
migrate_flags flags;
} migrate;
} @declare migrate;
Data migrate_data;
message {
uint32 generation;
uint32 window;
} set_ack;
} @declare set_ack;
message {
uint32 id;
uint64 timestamp;
uint8 data[] @ctype(uint8_t) @as_ptr(data_len);
} ping;
} @declare ping;
message {
uint8 wait_count;
ChannelWait wait_list[wait_count] @end;
} wait_for_channels;
} @declare wait_for_channels;
message {
uint64 time_stamp;
link_err reason;
} @ctype(SpiceMsgDisconnect) disconnecting;
} @ctype(SpiceMsgDisconnect) @declare disconnecting;
message {
uint64 time_stamp;
@ -176,7 +176,7 @@ channel BaseChannel {
uint32 what; /* error_code/warn_code/info_code */
uint32 message_len;
uint8 message[message_len] @end @nomarshal;
} notify;
} @declare notify;
Data list; /* the msg body is SpiceSubMessageList */
@ -185,7 +185,7 @@ channel BaseChannel {
client:
message {
uint32 generation;
} ack_sync;
} @declare ack_sync;
Empty ack;
@ -207,7 +207,7 @@ channel BaseChannel {
struct ChannelId {
uint8 type;
uint8 id;
};
} @declare;
struct DstInfo {
uint16 port;
@ -216,13 +216,13 @@ struct DstInfo {
uint8 *host_data[host_size] @zero_terminated @marshall @nonnull;
uint32 cert_subject_size;
uint8 *cert_subject_data[cert_subject_size] @zero_terminated @marshall;
} @ctype(SpiceMigrationDstInfo);
} @ctype(SpiceMigrationDstInfo) @declare;
channel MainChannel : BaseChannel {
server:
message {
DstInfo dst_info;
} @ctype(SpiceMsgMainMigrationBegin) migrate_begin = 101;
} @ctype(SpiceMsgMainMigrationBegin) @declare migrate_begin = 101;
Empty migrate_cancel;
@ -235,33 +235,33 @@ channel MainChannel : BaseChannel {
uint32 agent_tokens;
uint32 multi_media_time;
uint32 ram_hint;
} init;
} @declare init;
message {
uint32 num_of_channels;
ChannelId channels[num_of_channels] @end;
} @ctype(SpiceMsgChannels) channels_list;
} @ctype(SpiceMsgChannels) @declare channels_list;
message {
mouse_mode supported_modes;
mouse_mode current_mode @unique_flag;
} mouse_mode;
} @declare mouse_mode;
message {
uint32 time;
} @ctype(SpiceMsgMainMultiMediaTime) multi_media_time;
} @ctype(SpiceMsgMainMultiMediaTime) @declare multi_media_time;
Empty agent_connected;
message {
link_err error_code;
} @ctype(SpiceMsgMainAgentDisconnect) agent_disconnected;
} @ctype(SpiceMsgMainAgentDisconnect) @declare agent_disconnected;
Data agent_data;
message {
uint32 num_tokens;
} @ctype(SpiceMsgMainAgentTokens) agent_token;
} @ctype(SpiceMsgMainAgentTokens) @declare agent_token;
message {
uint16 port;
@ -270,27 +270,27 @@ channel MainChannel : BaseChannel {
uint8 *host_data[host_size] @zero_terminated @marshall;
uint32 cert_subject_size;
uint8 *cert_subject_data[cert_subject_size] @zero_terminated @marshall;
} @ctype(SpiceMsgMainMigrationSwitchHost) migrate_switch_host;
} @ctype(SpiceMsgMainMigrationSwitchHost) @declare migrate_switch_host;
Empty migrate_end;
message {
uint32 name_len;
uint8 name[name_len] @end;
} name;
} @declare name;
message {
uint8 uuid[16];
} uuid;
} @declare uuid;
message {
uint32 num_tokens;
} agent_connected_tokens;
} @declare agent_connected_tokens;
message {
DstInfo dst_info;
uint32 src_mig_version;
} migrate_begin_seamless;
} @declare migrate_begin_seamless;
Empty migrate_dst_seamless_ack;
Empty migrate_dst_seamless_nack;
@ -298,7 +298,7 @@ channel MainChannel : BaseChannel {
client:
message {
uint64 cache_size;
} @ctype(SpiceMsgcClientInfo) client_info = 101;
} @ctype(SpiceMsgcClientInfo) @declare client_info = 101;
Empty migrate_connected;
@ -308,23 +308,23 @@ channel MainChannel : BaseChannel {
message {
mouse_mode mode;
} mouse_mode_request;
} @declare mouse_mode_request;
message {
uint32 num_tokens;
} agent_start;
} @ctype(SpiceMsgMainAgentTokens) @declare agent_start;
Data agent_data;
message {
uint32 num_tokens;
} @ctype(SpiceMsgcMainAgentTokens) agent_token;
} @ctype(SpiceMsgMainAgentTokens) @declare agent_token;
Empty migrate_end;
message {
uint32 src_version;
} migrate_dst_do_seamless;
} @declare migrate_dst_do_seamless;
Empty migrate_connected_seamless;
};
@ -519,18 +519,18 @@ struct DisplayBase {
uint32 surface_id;
Rect box;
Clip clip;
} @ctype(SpiceMsgDisplayBase);
} @ctype(SpiceMsgDisplayBase) @declare;
struct ResourceID {
uint8 type; /* resource_type */
uint64 id;
};
} @declare;
struct WaitForChannel {
uint8 channel_type;
uint8 channel_id;
uint64 message_serial;
};
} @declare;
struct Palette {
uint64 unique;
@ -693,7 +693,7 @@ struct String {
struct StreamDataHeader {
stream_id_t id;
uint32 multi_media_time;
};
} @declare;
struct Head {
uint32 monitor_id;
@ -703,7 +703,7 @@ struct Head {
uint32 x;
uint32 y;
uint32 flags;
};
} @declare;
flags32 gl_scanout_flags {
Y0TOP
@ -715,19 +715,19 @@ channel DisplayChannel : BaseChannel {
uint32 x_res;
uint32 y_res;
uint32 bits;
} mode = 101;
} @declare mode = 101;
Empty mark;
Empty reset;
message {
DisplayBase base;
Point src_pos;
} copy_bits;
} @declare copy_bits;
message {
uint16 count;
ResourceID resources[count] @end;
} @ctype(SpiceResourceList) inval_list;
} @ctype(SpiceResourceList) @declare inval_list;
/* This message is used to invalidate the complete image cache
* on the client.
@ -739,11 +739,11 @@ channel DisplayChannel : BaseChannel {
message {
uint8 wait_count;
WaitForChannel wait_list[wait_count] @end;
} @ctype(SpiceMsgWaitForChannels) inval_all_pixmaps;
} @ctype(SpiceMsgWaitForChannels) @declare inval_all_pixmaps;
message {
uint64 id;
} @ctype(SpiceMsgDisplayInvalOne) inval_palette;
} @ctype(SpiceMsgDisplayInvalOne) @declare inval_palette;
Empty inval_all_palettes;
@ -759,22 +759,22 @@ channel DisplayChannel : BaseChannel {
uint32 src_height;
Rect dest;
Clip clip;
} stream_create = 122;
} @declare stream_create = 122;
message {
StreamDataHeader base;
uint32 data_size;
uint8 data[data_size] @end @nomarshal;
} stream_data;
} @declare stream_data;
message {
stream_id_t id;
Clip clip;
} stream_clip;
} @declare stream_clip;
message {
stream_id_t id;
} stream_destroy;
} @declare stream_destroy;
Empty stream_destroy_all;
@ -785,7 +785,7 @@ channel DisplayChannel : BaseChannel {
ropd rop_descriptor;
QMask mask @outvar(mask);
} data;
} draw_fill = 302;
} @declare draw_fill = 302;
message {
DisplayBase base;
@ -797,7 +797,7 @@ channel DisplayChannel : BaseChannel {
image_scale_mode scale_mode;
QMask mask @outvar(mask);
} data;
} draw_opaque;
} @declare draw_opaque;
message {
DisplayBase base;
@ -808,7 +808,7 @@ channel DisplayChannel : BaseChannel {
image_scale_mode scale_mode;
QMask mask @outvar(mask);
} data;
} draw_copy;
} @declare draw_copy;
message {
DisplayBase base;
@ -819,28 +819,28 @@ channel DisplayChannel : BaseChannel {
image_scale_mode scale_mode;
QMask mask @outvar(mask);
} @ctype(SpiceCopy) data;
} draw_blend;
} @ctype(SpiceMsgDisplayDrawCopy) draw_blend;
message {
DisplayBase base;
struct Blackness {
QMask mask @outvar(mask);
} data;
} draw_blackness;
} @declare draw_blackness;
message {
DisplayBase base;
struct Whiteness {
QMask mask @outvar(mask);
} data;
} draw_whiteness;
} @declare draw_whiteness;
message {
DisplayBase base;
struct Invers {
QMask mask @outvar(mask);
} data;
} draw_invers;
} @declare draw_invers;
message {
DisplayBase base;
@ -852,7 +852,7 @@ channel DisplayChannel : BaseChannel {
image_scale_mode scale_mode;
QMask mask @outvar(mask);
} data;
} draw_rop3;
} @declare draw_rop3;
message {
DisplayBase base;
@ -863,7 +863,7 @@ channel DisplayChannel : BaseChannel {
uint16 fore_mode;
uint16 back_mode;
} data;
} draw_stroke;
} @declare draw_stroke;
message {
DisplayBase base;
@ -875,7 +875,7 @@ channel DisplayChannel : BaseChannel {
uint16 fore_mode;
uint16 back_mode;
} data;
} draw_text;
} @declare draw_text;
message {
DisplayBase base;
@ -885,7 +885,7 @@ channel DisplayChannel : BaseChannel {
uint32 src_color;
uint32 true_color;
} data;
} draw_transparent;
} @declare draw_transparent;
message {
DisplayBase base;
@ -895,7 +895,7 @@ channel DisplayChannel : BaseChannel {
Image *src_bitmap;
Rect src_area;
} data;
} draw_alpha_blend;
} @declare draw_alpha_blend;
message {
uint32 surface_id;
@ -903,11 +903,11 @@ channel DisplayChannel : BaseChannel {
uint32 height;
surface_fmt format;
surface_flags flags;
} @ctype(SpiceMsgSurfaceCreate) surface_create;
} @ctype(SpiceMsgSurfaceCreate) @declare surface_create;
message {
uint32 surface_id;
} @ctype(SpiceMsgSurfaceDestroy) surface_destroy;
} @ctype(SpiceMsgSurfaceDestroy) @declare surface_destroy;
message {
StreamDataHeader base;
@ -916,13 +916,13 @@ channel DisplayChannel : BaseChannel {
Rect dest;
uint32 data_size;
uint8 data[data_size] @end @nomarshal;
} stream_data_sized;
} @declare stream_data_sized;
message {
uint16 count;
uint16 max_allowed;
Head heads[count] @end;
} monitors_config;
} @declare monitors_config;
message {
DisplayBase base;
@ -944,14 +944,14 @@ channel DisplayChannel : BaseChannel {
Point16 src_origin;
Point16 mask_origin;
} data;
} draw_composite;
} @declare draw_composite;
message {
stream_id_t stream_id;
uint32 unique_id;
uint32 max_window_size;
uint32 timeout_ms;
} stream_activate_report;
} @declare stream_activate_report;
message {
unix_fd drm_dma_buf_fd;
@ -961,14 +961,14 @@ channel DisplayChannel : BaseChannel {
/* specifies the format of drm_dma_buf_fd defined in drm_fourcc.h */
uint32 drm_fourcc_format;
gl_scanout_flags flags;
} gl_scanout_unix;
} @declare gl_scanout_unix;
message {
uint32 x;
uint32 y;
uint32 w;
uint32 h;
} gl_draw;
} @declare gl_draw;
client:
message {
@ -976,7 +976,7 @@ channel DisplayChannel : BaseChannel {
int64 pixmap_cache_size; //in pixels
uint8 glz_dictionary_id;
int32 glz_dictionary_window_size; // in pixels
} init = 101;
} @declare init = 101;
message {
stream_id_t stream_id;
@ -1000,19 +1000,19 @@ channel DisplayChannel : BaseChannel {
// the latency of the audio playback
// If there is no audio playback, set it to 0xffffffffu
uint32 audio_delay;
} stream_report;
} @declare stream_report;
message {
image_compression image_compression;
} preferred_compression;
} @declare preferred_compression;
message {
} gl_draw_done;
} @declare gl_draw_done;
message {
uint8 num_of_codecs;
video_codec_type codecs[num_of_codecs] @end;
} preferred_video_codec_type;
} @declare preferred_video_codec_type;
};
flags16 keyboard_modifier_flags {
@ -1040,15 +1040,15 @@ channel InputsChannel : BaseChannel {
client:
message {
uint32 code;
} @ctype(SpiceMsgcKeyDown) key_down = 101;
} @ctype(SpiceMsgcKeyDown) @declare key_down = 101;
message {
uint32 code;
} @ctype(SpiceMsgcKeyUp) key_up;
} @ctype(SpiceMsgcKeyUp) @declare key_up;
message {
keyboard_modifier_flags modifiers;
} @ctype(SpiceMsgcKeyModifiers) key_modifiers;
} @ctype(SpiceMsgcKeyModifiers) @declare key_modifiers;
Data key_scancode;
@ -1056,33 +1056,33 @@ channel InputsChannel : BaseChannel {
int32 dx;
int32 dy;
mouse_button_mask buttons_state;
} @ctype(SpiceMsgcMouseMotion) mouse_motion = 111;
} @ctype(SpiceMsgcMouseMotion) @declare mouse_motion = 111;
message {
uint32 x;
uint32 y;
mouse_button_mask buttons_state;
uint8 display_id;
} @ctype(SpiceMsgcMousePosition) mouse_position;
} @ctype(SpiceMsgcMousePosition) @declare mouse_position;
message {
mouse_button button;
mouse_button_mask buttons_state;
} @ctype(SpiceMsgcMousePress) mouse_press;
} @ctype(SpiceMsgcMousePress) @declare mouse_press;
message {
mouse_button button;
mouse_button_mask buttons_state;
} @ctype(SpiceMsgcMouseRelease) mouse_release;
} @ctype(SpiceMsgcMouseRelease) @declare mouse_release;
server:
message {
keyboard_modifier_flags keyboard_modifiers;
} init = 101;
} @declare init = 101;
message {
keyboard_modifier_flags modifiers;
} key_modifiers;
} @declare key_modifiers;
Empty mouse_motion_ack = 111;
};
@ -1119,7 +1119,7 @@ struct Cursor {
CursorHeader header;
} u @anon;
uint8 data[] @as_ptr(data_size);
};
} @declare;
channel CursorChannel : BaseChannel {
server:
@ -1129,7 +1129,7 @@ channel CursorChannel : BaseChannel {
uint16 trail_frequency;
uint8 visible;
Cursor cursor;
} init = 101;
} @declare init = 101;
Empty reset;
@ -1137,22 +1137,22 @@ channel CursorChannel : BaseChannel {
Point16 position;
uint8 visible;
Cursor cursor;
} set;
} @declare set;
message {
Point16 position;
} move;
} @declare move;
Empty hide;
message {
uint16 length;
uint16 frequency;
} trail;
} @declare trail;
message {
uint64 id;
} @ctype(SpiceMsgDisplayInvalOne) inval_one;
} @ctype(SpiceMsgDisplayInvalOne) @declare inval_one;
Empty inval_all;
};
@ -1172,31 +1172,31 @@ enum16 audio_fmt {
message AudioVolume {
uint8 nchannels;
uint16 volume[nchannels] @end;
};
} @declare;
message AudioMute {
uint8 mute;
};
} @declare;
channel PlaybackChannel : BaseChannel {
server:
message {
uint32 time;
uint8 data[] @as_ptr(data_size);
} @ctype(SpiceMsgPlaybackPacket) data = 101;
} @ctype(SpiceMsgPlaybackPacket) @declare data = 101;
message {
uint32 time;
audio_data_mode mode;
uint8 data[] @as_ptr(data_size);
} mode;
} @declare mode;
message {
uint32 channels;
audio_fmt format;
uint32 frequency;
uint32 time;
} start;
} @declare start;
Empty stop;
AudioVolume volume;
@ -1204,7 +1204,7 @@ channel PlaybackChannel : BaseChannel {
message {
uint32 latency_ms;
} latency;
} @declare latency;
};
channel RecordChannel : BaseChannel {
@ -1213,7 +1213,7 @@ channel RecordChannel : BaseChannel {
uint32 channels;
audio_fmt format;
uint32 frequency;
} start = 101;
} @declare start = 101;
Empty stop;
AudioVolume volume;
@ -1222,17 +1222,17 @@ channel RecordChannel : BaseChannel {
message {
uint32 time;
uint8 data[] @nomarshal @as_ptr(data_size);
} @ctype(SpiceMsgcRecordPacket) data = 101;
} @ctype(SpiceMsgcPlaybackPacket) @declare data = 101;
message {
uint32 time;
audio_data_mode mode;
uint8 data[] @as_ptr(data_size);
} mode;
} @ctype(SpiceMsgPlaybackMode) @declare mode;
message {
uint32 time;
} start_mark;
} @declare start_mark;
};
channel TunnelChannel {
@ -1338,16 +1338,16 @@ channel PortChannel : SpicevmcChannel {
client:
message {
uint8 event;
} event = 201;
} @declare event = 201;
server:
message {
uint32 name_size;
uint8 *name[name_size] @zero_terminated @marshall @nonnull;
uint8 opened;
} init = 201;
} @declare init = 201;
message {
uint8 event;
} event;
} @declare event;
};
channel WebDAVChannel : PortChannel {