Implement structs for clientState
Including engineCommandManager and its engineConnection
This commit is contained in:
@ -27,6 +27,8 @@ pub trait CoreDump: Clone {
|
||||
|
||||
async fn get_webrtc_stats(&self) -> Result<WebrtcStats>;
|
||||
|
||||
async fn get_client_state(&self) -> Result<ClientState>;
|
||||
|
||||
/// Return a screenshot of the app.
|
||||
async fn screenshot(&self) -> Result<String>;
|
||||
|
||||
@ -109,6 +111,9 @@ pub struct AppInfo {
|
||||
|
||||
/// Engine pool the client is connected to.
|
||||
pub pool: String,
|
||||
|
||||
/// The client state (singletons and xstate)
|
||||
pub client_state: ClientState,
|
||||
}
|
||||
|
||||
impl AppInfo {
|
||||
@ -197,3 +202,23 @@ pub struct WebrtcStats {
|
||||
/// Packet jitter for this synchronizing source, measured in seconds.
|
||||
pub jitter: f32,
|
||||
}
|
||||
|
||||
/// Client State Structure
|
||||
#[derive(Default, Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema)]
|
||||
#[ts(export)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub struct ClientState {
|
||||
pub engine_command_manager: EngineCommandManager,
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema)]
|
||||
#[ts(export)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub struct EngineCommandManager {
|
||||
pub engine_connection: EngineConnection,
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema)]
|
||||
#[ts(export)]
|
||||
pub struct EngineConnection {
|
||||
}
|
||||
Reference in New Issue
Block a user