Skip to main content

computer_protocol/
desktop.rs

1use serde::{Deserialize, Serialize};
2
3/// Body of `POST /sessions/{id}/open`.
4#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
5pub struct OpenPathRequest {
6    /// An http(s) URL, or a file path that starts at the session's working folder.
7    pub path: String,
8}
9
10/// Body of `POST /sessions/{id}/launch`.
11#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
12pub struct LaunchAppRequest {
13    /// Application name, such as `browser`, `terminal`, a `.desktop` entry, or a program on `PATH`.
14    pub application: String,
15    /// Page or file the application opens, when it takes one.
16    pub uri: Option<String>,
17}