|
| 1 | +use crate::{MediaBackend, MediaType}; |
| 2 | +use std::error::Error; |
1 | 3 |
|
| 4 | +pub struct NullBackend; |
| 5 | + |
| 6 | +impl NullBackend { |
| 7 | + pub fn new() -> Self { |
| 8 | + Self |
| 9 | + } |
| 10 | +} |
| 11 | + |
| 12 | +impl MediaBackend for NullBackend { |
| 13 | + fn set_title(&self, title: &str) { |
| 14 | + unimplemented!("system-media currently only supports macOS."); |
| 15 | + } |
| 16 | + |
| 17 | + fn set_artist(&self, artist: &str) { |
| 18 | + unimplemented!("system-media currently only supports macOS."); |
| 19 | + } |
| 20 | + |
| 21 | + fn set_album(&self, album: &str) { |
| 22 | + unimplemented!("system-media currently only supports macOS."); |
| 23 | + } |
| 24 | + |
| 25 | + fn set_genre(&self, genre: &str) { |
| 26 | + unimplemented!("system-media currently only supports macOS."); |
| 27 | + } |
| 28 | + |
| 29 | + fn set_image(&self, path: &str) -> Result<(), Box<dyn Error>> { |
| 30 | + unimplemented!("system-media currently only supports macOS.") |
| 31 | + } |
| 32 | + |
| 33 | + fn set_media_type(&self, media_type: MediaType) { |
| 34 | + unimplemented!("system-media currently only supports macOS."); |
| 35 | + } |
| 36 | + |
| 37 | + fn set_playback_duration(&self, duration: f64) { |
| 38 | + unimplemented!("system-media currently only supports macOS."); |
| 39 | + } |
| 40 | + |
| 41 | + fn set_elapsed_duration(&self, duration: f64) { |
| 42 | + unimplemented!("system-media currently only supports macOS."); |
| 43 | + } |
| 44 | + |
| 45 | + fn set_playback_rate(&self, rate: f64) { |
| 46 | + unimplemented!("system-media currently only supports macOS."); |
| 47 | + } |
| 48 | + |
| 49 | + fn start_session(&self) { |
| 50 | + unimplemented!("system-media currently only supports macOS."); |
| 51 | + } |
| 52 | + |
| 53 | + fn stop_session(&self) { |
| 54 | + unimplemented!("system-media currently only supports macOS."); |
| 55 | + println!("how do we stop a session?"); |
| 56 | + } |
| 57 | +} |
0 commit comments