mirror of
https://github.com/djibux/BoilR.git
synced 2026-09-01 05:53:41 +02:00
31 lines
677 B
Rust
31 lines
677 B
Rust
use crate::platform::Platform;
|
|
|
|
use super::{
|
|
get_egs_manifests, get_manifests::EpicGamesManifestsError, EpicGamesLauncherSettings,
|
|
ManifestItem,
|
|
};
|
|
|
|
pub struct EpicPlatform {
|
|
settings: EpicGamesLauncherSettings,
|
|
}
|
|
|
|
impl EpicPlatform {
|
|
pub fn new(settings: EpicGamesLauncherSettings) -> Self {
|
|
EpicPlatform { settings }
|
|
}
|
|
}
|
|
|
|
impl Platform<ManifestItem, EpicGamesManifestsError> for EpicPlatform {
|
|
fn enabled(&self) -> bool {
|
|
self.settings.enabled
|
|
}
|
|
|
|
fn name(&self) -> &str {
|
|
"EGS"
|
|
}
|
|
|
|
fn get_shortcuts(&self) -> Result<Vec<ManifestItem>, EpicGamesManifestsError> {
|
|
get_egs_manifests(&self.settings)
|
|
}
|
|
}
|