rdt-client/server/RdtClient.Service/Services/Downloaders/IDownloader.cs
2021-10-09 20:35:03 -06:00

25 lines
632 B
C#

using System;
using System.Threading.Tasks;
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();
}
}