#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScreenFrame {
#[prost(bytes = "vec", tag = "1")]
pub data: ::prost::alloc::vec::Vec<u8>,
#[prost(enumeration = "ScreenOrientation", tag = "2")]
pub orientation: i32,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct StartScreenStreamRequest {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct StopScreenStreamRequest {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SendInputEventRequest {
#[prost(enumeration = "InputKey", tag = "1")]
pub key: i32,
#[prost(enumeration = "InputType", tag = "2")]
pub r#type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartVirtualDisplayRequest {
#[prost(message, optional, tag = "1")]
pub first_frame: ::core::option::Option<ScreenFrame>,
#[prost(bool, tag = "2")]
pub send_input: bool,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct StopVirtualDisplayRequest {}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum InputKey {
Up = 0,
Down = 1,
Right = 2,
Left = 3,
Ok = 4,
Back = 5,
}
impl InputKey {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Up => "UP",
Self::Down => "DOWN",
Self::Right => "RIGHT",
Self::Left => "LEFT",
Self::Ok => "OK",
Self::Back => "BACK",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UP" => Some(Self::Up),
"DOWN" => Some(Self::Down),
"RIGHT" => Some(Self::Right),
"LEFT" => Some(Self::Left),
"OK" => Some(Self::Ok),
"BACK" => Some(Self::Back),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum InputType {
Press = 0,
Release = 1,
Short = 2,
Long = 3,
Repeat = 4,
}
impl InputType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Press => "PRESS",
Self::Release => "RELEASE",
Self::Short => "SHORT",
Self::Long => "LONG",
Self::Repeat => "REPEAT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PRESS" => Some(Self::Press),
"RELEASE" => Some(Self::Release),
"SHORT" => Some(Self::Short),
"LONG" => Some(Self::Long),
"REPEAT" => Some(Self::Repeat),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ScreenOrientation {
Horizontal = 0,
HorizontalFlip = 1,
Vertical = 2,
VerticalFlip = 3,
}
impl ScreenOrientation {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Horizontal => "HORIZONTAL",
Self::HorizontalFlip => "HORIZONTAL_FLIP",
Self::Vertical => "VERTICAL",
Self::VerticalFlip => "VERTICAL_FLIP",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"HORIZONTAL" => Some(Self::Horizontal),
"HORIZONTAL_FLIP" => Some(Self::HorizontalFlip),
"VERTICAL" => Some(Self::Vertical),
"VERTICAL_FLIP" => Some(Self::VerticalFlip),
_ => None,
}
}
}