librespot/core/src/config.rs

24 lines
508 B
Rust
Raw Normal View History

2022-01-05 20:15:19 +00:00
use std::path::PathBuf;
use url::Url;
2018-02-11 11:37:08 +00:00
#[derive(Clone, Debug)]
2017-08-03 18:58:44 +00:00
pub struct SessionConfig {
pub device_id: String,
pub proxy: Option<Url>,
pub ap_port: Option<u16>,
2021-12-17 19:58:05 +00:00
pub tmp_dir: PathBuf,
2017-08-03 18:58:44 +00:00
}
impl Default for SessionConfig {
fn default() -> SessionConfig {
let device_id = uuid::Uuid::new_v4().to_hyphenated().to_string();
SessionConfig {
device_id,
proxy: None,
ap_port: None,
2021-12-17 19:58:05 +00:00
tmp_dir: std::env::temp_dir(),
}
}
}