Revision b5061ac8 trunk/Pithos.Interfaces/ICloudClient.cs
b/trunk/Pithos.Interfaces/ICloudClient.cs | ||
---|---|---|
4 | 4 |
using System.IO; |
5 | 5 |
using System.Linq; |
6 | 6 |
using System.Text; |
7 |
using System.Threading.Tasks; |
|
7 | 8 |
|
8 | 9 |
namespace Pithos.Interfaces |
9 | 10 |
{ |
... | ... | |
17 | 18 |
bool UsePithos { get; set; } |
18 | 19 |
void Authenticate(string userName,string apiKey); |
19 | 20 |
Uri Proxy { get; set; } |
21 |
double DownloadPercentLimit { get; set; } |
|
22 |
double UploadPercentLimit { get; set; } |
|
23 |
|
|
20 | 24 |
|
21 | 25 |
IList<ContainerInfo> ListContainers(); |
22 | 26 |
IList<ObjectInfo> ListObjects(string container); |
... | ... | |
27 | 31 |
void DeleteContainer(string container); |
28 | 32 |
|
29 | 33 |
Stream GetObject(string container, string objectName); |
30 |
void PutObject(string container, string objectName, string fileName);
|
|
34 |
Task PutObject(string container, string objectName, string fileName, string hash = null);
|
|
31 | 35 |
void DeleteObject(string container, string objectName); |
32 | 36 |
void MoveObject(string container, string oldObjectName, string newObjectName); |
33 | 37 |
bool ObjectExists(string container,string objectName); |
... | ... | |
46 | 50 |
public Uri StorageUrl { get; set; } |
47 | 51 |
public string Token { get; set; } |
48 | 52 |
public Uri Proxy { get; set; } |
53 |
public double DownloadPercentLimit { get; set; } |
|
54 |
public double UploadPercentLimit { get; set; } |
|
49 | 55 |
|
50 | 56 |
public bool UsePithos { get; set; } |
51 | 57 |
|
... | ... | |
131 | 137 |
return default(Stream); |
132 | 138 |
} |
133 | 139 |
|
134 |
public void PutObject(string container, string objectName, string fileName)
|
|
140 |
public Task PutObject(string container, string objectName, string fileName, string hash = null)
|
|
135 | 141 |
{ |
136 | 142 |
Contract.Requires(!String.IsNullOrWhiteSpace(Token)); |
137 | 143 |
Contract.Requires(StorageUrl!=null); |
138 | 144 |
Contract.Requires(!String.IsNullOrWhiteSpace(container)); |
139 | 145 |
Contract.Requires(!String.IsNullOrWhiteSpace(fileName)); |
140 | 146 |
Contract.Requires(!String.IsNullOrWhiteSpace(objectName)); |
147 |
|
|
148 |
return default(Task); |
|
141 | 149 |
} |
142 | 150 |
|
143 | 151 |
public void DeleteObject(string container, string objectName) |
Also available in: Unified diff