-
[pithos-ms-client] / trunk / Pithos.Interfaces / ICloudClient.cs
index 4729114..7b6b5bf 100644 (file)
@@ -4,6 +4,7 @@ using System.Diagnostics.Contracts;
 using System.IO;
 using System.Linq;
 using System.Text;
+using System.Threading.Tasks;
 
 namespace Pithos.Interfaces
 {
@@ -17,6 +18,9 @@ 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);
@@ -27,7 +31,7 @@ namespace Pithos.Interfaces
         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);
@@ -46,6 +50,8 @@ namespace Pithos.Interfaces
         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; }
 
@@ -131,13 +137,15 @@ namespace Pithos.Interfaces
             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)