mirror of
https://github.com/lwch/natpass.git
synced 2024-04-21 12:41:54 +00:00
78 lines
1.4 KiB
Protocol Buffer
78 lines
1.4 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package vncnetwork;
|
|
option go_package="./;vncnetwork";
|
|
|
|
message image_data {
|
|
bool ok = 1;
|
|
string msg = 2;
|
|
uint32 bits = 3;
|
|
uint32 width = 4;
|
|
uint32 height = 5;
|
|
bytes data = 6;
|
|
}
|
|
|
|
enum status {
|
|
unset_st = 0;
|
|
down = 1;
|
|
up = 2;
|
|
}
|
|
|
|
message mouse_data {
|
|
enum button {
|
|
unset_btn = 0;
|
|
left = 1;
|
|
middle = 2;
|
|
right = 3;
|
|
}
|
|
status type = 1;
|
|
button btn = 2;
|
|
uint32 x = 3;
|
|
uint32 y = 4;
|
|
}
|
|
|
|
message keyboard_data {
|
|
status type = 1;
|
|
string key = 2;
|
|
}
|
|
|
|
message scroll_data {
|
|
int32 x = 1;
|
|
int32 y = 2;
|
|
}
|
|
|
|
message clipboard_data {
|
|
enum type {
|
|
unset_type = 0;
|
|
text = 1;
|
|
image = 2;
|
|
file = 3;
|
|
}
|
|
bool set = 1;
|
|
type _type = 2;
|
|
oneof payload {
|
|
string data = 10; // text data
|
|
// TODO
|
|
}
|
|
}
|
|
|
|
message vnc_msg {
|
|
enum type {
|
|
capture_req = 0;
|
|
capture_data = 1;
|
|
mouse_event = 2;
|
|
keyboard_event = 3;
|
|
set_cursor = 4;
|
|
scroll_event = 5;
|
|
clipboard_event = 6;
|
|
}
|
|
type _type = 1;
|
|
oneof payload {
|
|
image_data data = 2;
|
|
mouse_data mouse = 3;
|
|
keyboard_data keyboard = 4;
|
|
bool show_cursor = 5;
|
|
scroll_data scroll = 6;
|
|
clipboard_data clipboard = 7;
|
|
}
|
|
} |