use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct Sink {
pub name: String,
pub id: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub session: Option<String>,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct EnableParams {
#[serde(
rename = "presentationUrl",
default,
skip_serializing_if = "Option::is_none"
)]
pub presentation_url: Option<String>,
}
impl crate::typed::Command for EnableParams {
const METHOD: &'static str = "Cast.enable";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DisableParams {}
impl crate::typed::Command for DisableParams {
const METHOD: &'static str = "Cast.disable";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SetSinkToUseParams {
#[serde(rename = "sinkName")]
pub sink_name: String,
}
impl crate::typed::Command for SetSinkToUseParams {
const METHOD: &'static str = "Cast.setSinkToUse";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct StartDesktopMirroringParams {
#[serde(rename = "sinkName")]
pub sink_name: String,
}
impl crate::typed::Command for StartDesktopMirroringParams {
const METHOD: &'static str = "Cast.startDesktopMirroring";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct StartTabMirroringParams {
#[serde(rename = "sinkName")]
pub sink_name: String,
}
impl crate::typed::Command for StartTabMirroringParams {
const METHOD: &'static str = "Cast.startTabMirroring";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct StopCastingParams {
#[serde(rename = "sinkName")]
pub sink_name: String,
}
impl crate::typed::Command for StopCastingParams {
const METHOD: &'static str = "Cast.stopCasting";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SinksUpdatedEvent {
pub sinks: Vec<Sink>,
}
impl crate::typed::Event for SinksUpdatedEvent {
const METHOD: &'static str = "Cast.sinksUpdated";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct IssueUpdatedEvent {
#[serde(rename = "issueMessage")]
pub issue_message: String,
}
impl crate::typed::Event for IssueUpdatedEvent {
const METHOD: &'static str = "Cast.issueUpdated";
}