24 lines
805 B
Rust
24 lines
805 B
Rust
//! Messages between the launcher and the core daemon (newline-delimited JSON
|
|
//! over a unix socket). The core daemon itself comes in phase 3.
|
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
#[serde(tag = "type", rename_all = "snake_case")]
|
|
pub enum LauncherRequest {
|
|
Launch { app_id: String },
|
|
/// Bring the launcher back to the front (freezes the foreground app).
|
|
GoHome,
|
|
SetSetting { key: String, value: String },
|
|
}
|
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
#[serde(tag = "type", rename_all = "snake_case")]
|
|
pub enum CoreEvent {
|
|
AppStarted { app_id: String },
|
|
AppStopped { app_id: String },
|
|
/// Something connected over DIAL/AirPlay/Miracast.
|
|
CastConnected { app_id: String, device: String },
|
|
Toast { text: String },
|
|
}
|