using System.IO;
using System.Linq;
using System.Text;
+using System.Threading.Tasks;
namespace Pithos.Interfaces
{
bool UsePithos { get; set; }
void Authenticate(string userName,string apiKey);
Uri Proxy { get; set; }
+ double DownloadPercentLimit { get; set; }
+ double UploadPercentLimit { get; set; }
+
IList<ContainerInfo> ListContainers();
IList<ObjectInfo> ListObjects(string container);
void DeleteContainer(string container);
Stream GetObject(string container, string objectName);
- void PutObject(string container, string objectName, string fileName);
+ Task PutObject(string container, string objectName, string fileName, string hash = null);
void DeleteObject(string container, string objectName);
void MoveObject(string container, string oldObjectName, string newObjectName);
bool ObjectExists(string container,string objectName);
public Uri StorageUrl { get; set; }
public string Token { get; set; }
public Uri Proxy { get; set; }
+ public double DownloadPercentLimit { get; set; }
+ public double UploadPercentLimit { get; set; }
public bool UsePithos { get; set; }
return default(Stream);
}
- public void PutObject(string container, string objectName, string fileName)
+ public Task PutObject(string container, string objectName, string fileName, string hash = null)
{
Contract.Requires(!String.IsNullOrWhiteSpace(Token));
Contract.Requires(StorageUrl!=null);
Contract.Requires(!String.IsNullOrWhiteSpace(container));
Contract.Requires(!String.IsNullOrWhiteSpace(fileName));
Contract.Requires(!String.IsNullOrWhiteSpace(objectName));
+
+ return default(Task);
}
public void DeleteObject(string container, string objectName)