25 lines
632 B
C#
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();
|
|
}
|
|
}
|