refactor(download manager): Renamed GameDonwloadError to ApplicationDownloadError and moved

Signed-off-by: quexeky <git@quexeky.dev>
This commit is contained in:
quexeky
2024-12-31 12:12:17 +11:00
parent 881fcc6abe
commit aed58e49bc
7 changed files with 98 additions and 77 deletions

View File

@ -1,17 +1,14 @@
use std::sync::Arc;
use crate::downloads::download_agent::GameDownloadError;
use super::{
download_thread_control_flag::DownloadThreadControl,
progress_object::ProgressObject,
application_download_error::ApplicationDownloadError, download_thread_control_flag::DownloadThreadControl, progress_object::ProgressObject
};
pub trait Downloadable: Sync {
fn get_progress_object(&self) -> Arc<ProgressObject>;
fn version(&self) -> String;
fn id(&self) -> String;
fn download(&mut self) -> Result<(), GameDownloadError>;
fn download(&mut self) -> Result<(), ApplicationDownloadError>;
fn progress(&self) -> Arc<ProgressObject>;
fn control_flag(&self) -> DownloadThreadControl;
fn install_dir(&self) -> String;