rdt-client/server/RdtClient.Service/Services/Downloaders/IDownloader.cs
2022-05-13 18:51:04 -06:00

23 lines
No EOL
557 B
C#

namespace RdtClient.Service.Services.Downloaders;
public class DownloadCompleteEventArgs
{
public String? Error { get; set; }
}
public class DownloadProgressEventArgs
{
public Int64 Speed { get; set; }
public Int64 BytesDone { get; set; }
public Int64 BytesTotal { get; set; }
}
public interface IDownloader
{
event EventHandler<DownloadCompleteEventArgs>? DownloadComplete;
event EventHandler<DownloadProgressEventArgs>? DownloadProgress;
Task<String?> Download();
Task Cancel();
Task Pause();
Task Resume();
}