Revision 2341c603 trunk/Pithos.Network/ICloudClient.cs
b/trunk/Pithos.Network/ICloudClient.cs | ||
---|---|---|
43 | 43 |
using System.Collections.Generic; |
44 | 44 |
using System.Diagnostics.Contracts; |
45 | 45 |
using System.Net; |
46 |
using System.Threading; |
|
46 | 47 |
using System.Threading.Tasks; |
47 | 48 |
using Pithos.Interfaces; |
48 | 49 |
|
... | ... | |
77 | 78 |
#endregion |
78 | 79 |
|
79 | 80 |
#region Object operations |
80 |
Task GetObject(string account, string container, string objectName, string fileName); |
|
81 |
Task GetObject(string account, string container, string objectName, string fileName,CancellationToken cancellationToken);
|
|
81 | 82 |
Task PutObject(string account, string container, string objectName, string fileName, string hash = null, string contentType = "application/octet-stream"); |
82 | 83 |
void DeleteObject(string account, string container, string objectName); |
83 | 84 |
//void DeleteObject(string container, string objectName, string account = null); |
... | ... | |
91 | 92 |
Task<TreeHash> GetHashMap(string account, string container, string objectName); |
92 | 93 |
Task<IList<string>> PutHashMap(string account, string container, string objectName, TreeHash hash); |
93 | 94 |
Task PostBlock(string account, string container, byte[] block, int offset, int count); |
94 |
Task<byte[]> GetBlock(string account, string container, Uri relativeUrl, long start, long? end); |
|
95 |
Task<byte[]> GetBlock(string account, string container, Uri relativeUrl, long start, long? end,CancellationToken cancellationToken);
|
|
95 | 96 |
#endregion |
96 | 97 |
|
97 | 98 |
#region Sharing operations |
... | ... | |
247 | 248 |
Contract.Requires(!String.IsNullOrWhiteSpace(container)); |
248 | 249 |
} |
249 | 250 |
|
250 |
public Task GetObject(string account, string container, string objectName, string fileName) |
|
251 |
public Task GetObject(string account, string container, string objectName, string fileName,CancellationToken cancellationToken)
|
|
251 | 252 |
{ |
252 | 253 |
|
253 | 254 |
Contract.Requires(!String.IsNullOrWhiteSpace(Token)); |
... | ... | |
360 | 361 |
return default(Task); |
361 | 362 |
} |
362 | 363 |
|
363 |
public Task<byte[]> GetBlock(string account, string container, Uri relativeUrl, long start, long? end) |
|
364 |
public Task<byte[]> GetBlock(string account, string container, Uri relativeUrl, long start, long? end,CancellationToken cancellationToken)
|
|
364 | 365 |
{ |
365 | 366 |
|
366 | 367 |
Contract.Requires(!String.IsNullOrWhiteSpace(Token)); |
Also available in: Unified diff