use std::collections::HashMap;
use super::device::Device;
use super::track::FullTrack;
use super::PlayingItem;
use crate::senum::{CurrentlyPlayingType, DisallowKey, RepeatState, Type};
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct Context {
pub uri: String,
pub href: String,
pub external_urls: HashMap<String, String>,
#[serde(rename = "type")]
pub _type: Type,
}
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct FullPlayingContext {
pub device: Device,
pub repeat_state: RepeatState,
pub shuffle_state: bool,
pub context: Option<Context>,
pub timestamp: u64,
pub progress_ms: Option<u32>,
pub is_playing: bool,
pub item: Option<FullTrack>,
}
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct SimplifiedPlayingContext {
pub context: Option<Context>,
pub timestamp: u64,
pub progress_ms: Option<u32>,
pub is_playing: bool,
pub item: Option<FullTrack>,
}
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct CurrentlyPlayingContext {
pub context: Option<Context>,
pub timestamp: u64,
pub progress_ms: Option<u32>,
pub is_playing: bool,
pub item: Option<PlayingItem>,
pub currently_playing_type: CurrentlyPlayingType,
pub actions: Actions,
}
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct CurrentlyPlaybackContext {
pub device: Device,
pub repeat_state: RepeatState,
pub shuffle_state: bool,
pub context: Option<Context>,
pub timestamp: u64,
pub progress_ms: Option<u32>,
pub is_playing: bool,
pub item: Option<PlayingItem>,
pub currently_playing_type: CurrentlyPlayingType,
pub actions: Actions,
}
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct Actions {
pub disallows: HashMap<DisallowKey, bool>,
}