#[derive(Debug,serde::Deserialize)]
pub struct ServerState {
	pub free_space_on_disk: u64,
}

#[derive(Clone,Debug,serde::Deserialize)]
pub struct TorrentFile {
	pub size: u64,
}

pub trait Qbt: Send + Sync {
	fn logout(self)
		-> impl std::future::Future<Output=anyhow::Result<()>> + Send;
	fn server_state(&self)
		-> impl std::future::Future<Output=anyhow::Result<ServerState>> + Send;
	fn torrents_info(&self)
		-> impl std::future::Future<Output=anyhow::Result<Vec<crate::Torrent>>> + Send;
	fn torrent_files(&self, hash: crate::InfoHash)
		-> impl std::future::Future<Output=anyhow::Result<Vec<TorrentFile>>> + Send;
	fn torrent_trackers(&self, hash: crate::InfoHash)
		-> impl std::future::Future<Output=anyhow::Result<Vec<crate::Tracker>>> + Send;
	fn delete_torrents(&self, hashes: &[crate::InfoHash])
		-> impl std::future::Future<Output=anyhow::Result<()>> + Send;
}
