flipper-rpc 0.9.5

Rust bindings and serial transport helpers for the Flipper Zero RPC protocol.
// This file is @generated by prost-build.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartRequest {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub args: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct LockStatusRequest {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct LockStatusResponse {
    #[prost(bool, tag = "1")]
    pub locked: bool,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct AppExitRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AppLoadFileRequest {
    #[prost(string, tag = "1")]
    pub path: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AppButtonPressRequest {
    #[prost(string, tag = "1")]
    pub args: ::prost::alloc::string::String,
    #[prost(int32, tag = "2")]
    pub index: i32,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct AppButtonReleaseRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AppButtonPressReleaseRequest {
    #[prost(string, tag = "1")]
    pub args: ::prost::alloc::string::String,
    #[prost(int32, tag = "2")]
    pub index: i32,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct AppStateResponse {
    #[prost(enumeration = "AppState", tag = "1")]
    pub state: i32,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetErrorRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetErrorResponse {
    #[prost(uint32, tag = "1")]
    pub code: u32,
    #[prost(string, tag = "2")]
    pub text: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DataExchangeRequest {
    #[prost(bytes = "vec", tag = "1")]
    pub data: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AppState {
    AppClosed = 0,
    AppStarted = 1,
}
impl AppState {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::AppClosed => "APP_CLOSED",
            Self::AppStarted => "APP_STARTED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "APP_CLOSED" => Some(Self::AppClosed),
            "APP_STARTED" => Some(Self::AppStarted),
            _ => None,
        }
    }
}