mpris_player2/
status.rs

1#[derive(Debug, Copy, Clone)]
2pub enum PlaybackStatus{
3    Playing,
4    Paused,
5    Stopped,
6}
7
8impl PlaybackStatus {
9    pub fn value(&self) -> String {
10        match *self {
11            PlaybackStatus::Playing => "Playing".to_string(),
12            PlaybackStatus::Paused => "Paused".to_string(),
13            PlaybackStatus::Stopped => "Stopped".to_string(),
14        }
15    }
16}
17
18
19#[derive(Debug, Copy, Clone)]
20pub enum LoopStatus{
21    None,
22    Track,
23    Playlist,
24}
25
26impl LoopStatus {
27    pub fn value(&self) -> String {
28        match *self {
29            LoopStatus::None => "None".to_string(),
30            LoopStatus::Track => "Track".to_string(),
31            LoopStatus::Playlist => "Playlist".to_string(),
32        }
33    }
34}