feat(download manager): Added generic download manager

Signed-off-by: quexeky <git@quexeky.dev>
This commit is contained in:
quexeky
2025-01-04 15:47:14 +11:00
parent 8be1dd435c
commit 6159319172
20 changed files with 363 additions and 202 deletions

View File

@ -1,5 +1,7 @@
use std::sync::Arc;
use tauri::AppHandle;
use crate::download_manager::{application_download_error::ApplicationDownloadError, download_thread_control_flag::DownloadThreadControl, downloadable::Downloadable, downloadable_metadata::DownloadableMetadata, progress_object::ProgressObject};
pub struct ToolDownloadAgent {
@ -10,7 +12,7 @@ pub struct ToolDownloadAgent {
progress: Arc<ProgressObject>,
}
impl Downloadable for ToolDownloadAgent {
fn download(&self) -> Result<bool, ApplicationDownloadError> {
fn download(&self, app_handle: &AppHandle) -> Result<bool, ApplicationDownloadError> {
todo!()
}