make proto compatible to c++
This commit is contained in:
parent
02cbc0d407
commit
92a1bb04e9
@ -202,6 +202,7 @@ message Clipboard {
|
|||||||
}
|
}
|
||||||
|
|
||||||
enum FileType {
|
enum FileType {
|
||||||
|
UnknownFileType = 0;
|
||||||
Dir = 1;
|
Dir = 1;
|
||||||
DirLink = 2;
|
DirLink = 2;
|
||||||
DirDrive = 3;
|
DirDrive = 3;
|
||||||
@ -313,13 +314,14 @@ message SwitchDisplay {
|
|||||||
int32 height = 5;
|
int32 height = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum Permission {
|
|
||||||
Keyboard = 1;
|
|
||||||
Clipboard = 2;
|
|
||||||
Audio = 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
message PermissionInfo {
|
message PermissionInfo {
|
||||||
|
enum Permission {
|
||||||
|
Unknown = 0;
|
||||||
|
Keyboard = 1;
|
||||||
|
Clipboard = 2;
|
||||||
|
Audio = 3;
|
||||||
|
}
|
||||||
|
|
||||||
Permission permission = 1;
|
Permission permission = 1;
|
||||||
bool enabled = 2;
|
bool enabled = 2;
|
||||||
}
|
}
|
||||||
@ -331,13 +333,12 @@ enum ImageQuality {
|
|||||||
Best = 4;
|
Best = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum BoolOption {
|
|
||||||
NotSet = 0;
|
|
||||||
No = 1;
|
|
||||||
Yes = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
message OptionMessage {
|
message OptionMessage {
|
||||||
|
enum BoolOption {
|
||||||
|
NotSet = 0;
|
||||||
|
No = 1;
|
||||||
|
Yes = 2;
|
||||||
|
}
|
||||||
ImageQuality image_quality = 1;
|
ImageQuality image_quality = 1;
|
||||||
BoolOption lock_after_session_end = 2;
|
BoolOption lock_after_session_end = 2;
|
||||||
BoolOption show_remote_cursor = 3;
|
BoolOption show_remote_cursor = 3;
|
||||||
|
@ -59,6 +59,7 @@ message RegisterPk {
|
|||||||
|
|
||||||
message RegisterPkResponse {
|
message RegisterPkResponse {
|
||||||
enum Result {
|
enum Result {
|
||||||
|
UNKNOWN = 0;
|
||||||
OK = 1;
|
OK = 1;
|
||||||
UUID_MISMATCH = 2;
|
UUID_MISMATCH = 2;
|
||||||
ID_EXISTS = 3;
|
ID_EXISTS = 3;
|
||||||
@ -74,6 +75,7 @@ message PunchHoleResponse {
|
|||||||
bytes socket_addr = 1;
|
bytes socket_addr = 1;
|
||||||
bytes pk = 2;
|
bytes pk = 2;
|
||||||
enum Failure {
|
enum Failure {
|
||||||
|
UNKNOWN = 0;
|
||||||
ID_NOT_EXIST = 1;
|
ID_NOT_EXIST = 1;
|
||||||
OFFLINE = 2;
|
OFFLINE = 2;
|
||||||
LICENSE_MISMATCH = 3;
|
LICENSE_MISMATCH = 3;
|
||||||
|
@ -10,7 +10,7 @@ use hbb_common::{
|
|||||||
bail,
|
bail,
|
||||||
config::{Config, PeerConfig, PeerInfoSerde, CONNECT_TIMEOUT, RELAY_PORT, RENDEZVOUS_TIMEOUT},
|
config::{Config, PeerConfig, PeerInfoSerde, CONNECT_TIMEOUT, RELAY_PORT, RENDEZVOUS_TIMEOUT},
|
||||||
log,
|
log,
|
||||||
message_proto::*,
|
message_proto::{option_message::BoolOption, *},
|
||||||
protobuf::Message as _,
|
protobuf::Message as _,
|
||||||
rendezvous_proto::*,
|
rendezvous_proto::*,
|
||||||
socket_client,
|
socket_client,
|
||||||
|
@ -4,6 +4,7 @@ use hbb_common::{
|
|||||||
config::Config,
|
config::Config,
|
||||||
fs,
|
fs,
|
||||||
futures::{SinkExt, StreamExt},
|
futures::{SinkExt, StreamExt},
|
||||||
|
message_proto::{option_message::BoolOption, permission_info::Permission},
|
||||||
sleep, timeout,
|
sleep, timeout,
|
||||||
tokio::{
|
tokio::{
|
||||||
net::TcpStream,
|
net::TcpStream,
|
||||||
|
@ -7,7 +7,7 @@ use hbb_common::{
|
|||||||
allow_err,
|
allow_err,
|
||||||
config::{self, Config, PeerConfig},
|
config::{self, Config, PeerConfig},
|
||||||
fs, log,
|
fs, log,
|
||||||
message_proto::*,
|
message_proto::{permission_info::Permission, *},
|
||||||
protobuf::Message as _,
|
protobuf::Message as _,
|
||||||
rendezvous_proto::ConnType,
|
rendezvous_proto::ConnType,
|
||||||
sleep,
|
sleep,
|
||||||
@ -1705,6 +1705,7 @@ impl Remote {
|
|||||||
self.handler
|
self.handler
|
||||||
.call("setPermission", &make_args!("audio", p.enabled));
|
.call("setPermission", &make_args!("audio", p.enabled));
|
||||||
}
|
}
|
||||||
|
_ => {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Some(misc::Union::switch_display(s)) => {
|
Some(misc::Union::switch_display(s)) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user