1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#[derive(Debug, Copy, Clone, PartialEq)]
pub enum PlaybackStatus {
    Playing,
    Paused,
    Stopped,
}

impl PlaybackStatus {
    pub fn value(&self) -> String {
        match *self {
            PlaybackStatus::Playing => "Playing".to_string(),
            PlaybackStatus::Paused => "Paused".to_string(),
            PlaybackStatus::Stopped => "Stopped".to_string(),
        }
    }
}

#[derive(Debug, Copy, Clone, PartialEq)]
pub enum LoopStatus {
    None,
    Track,
    Playlist,
}

impl LoopStatus {
    pub fn value(&self) -> String {
        match *self {
            LoopStatus::None => "None".to_string(),
            LoopStatus::Track => "Track".to_string(),
            LoopStatus::Playlist => "Playlist".to_string(),
        }
    }
}