Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/duplicati/duplicati.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTyler Gill <tyler.gill@byu.net>2017-09-26 08:19:38 +0300
committerTyler Gill <tyler.gill@byu.net>2017-09-26 08:19:38 +0300
commit44c53d3eb17793386bd9593dfb7cd52f3c7b4c00 (patch)
treea0a53a5a7def0ba34adde22c6de5be6b41f2be51 /Duplicati/Library/Interface
parentb3a3911d98c8e4c4f99a16fd2d531f8e58952b83 (diff)
parent9141ccfd4155b18aa6a760da4a4cd3f39fa00c03 (diff)
Merge branch 'master' of https://github.com/duplicati/duplicati into fix/list-ienumerable
Diffstat (limited to 'Duplicati/Library/Interface')
-rw-r--r--Duplicati/Library/Interface/Duplicati.Library.Interface.csproj2
-rw-r--r--Duplicati/Library/Interface/IQuotaEnabledBackend.cs14
-rw-r--r--Duplicati/Library/Interface/IQuotaInfo.cs24
-rw-r--r--Duplicati/Library/Interface/QuotaInfo.cs21
4 files changed, 51 insertions, 10 deletions
diff --git a/Duplicati/Library/Interface/Duplicati.Library.Interface.csproj b/Duplicati/Library/Interface/Duplicati.Library.Interface.csproj
index 59d5026e0..8d9cd26f4 100644
--- a/Duplicati/Library/Interface/Duplicati.Library.Interface.csproj
+++ b/Duplicati/Library/Interface/Duplicati.Library.Interface.csproj
@@ -55,9 +55,11 @@
<Compile Include="IGenericSourceModule.cs" />
<Compile Include="IGenericModule.cs" />
<Compile Include="IQuotaEnabledBackend.cs" />
+ <Compile Include="IQuotaInfo.cs" />
<Compile Include="IStreamingBackend.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="IGenericCallbackModule.cs" />
+ <Compile Include="QuotaInfo.cs" />
<Compile Include="ResultInterfaces.cs" />
<Compile Include="IWebModule.cs" />
<Compile Include="IConnectionModule.cs" />
diff --git a/Duplicati/Library/Interface/IQuotaEnabledBackend.cs b/Duplicati/Library/Interface/IQuotaEnabledBackend.cs
index 57964f5d6..a813c1f85 100644
--- a/Duplicati/Library/Interface/IQuotaEnabledBackend.cs
+++ b/Duplicati/Library/Interface/IQuotaEnabledBackend.cs
@@ -11,16 +11,10 @@ namespace Duplicati.Library.Interface
public interface IQuotaEnabledBackend : IBackend
{
/// <summary>
- /// The total number of bytes available on the backend,
- /// may return -1 if the particular host implementation
- /// does not support quotas, but the backend does
+ /// Gets information about the quota on this backend.
+ /// This may return null if the particular host implementation
+ /// does not support quotas, but the backend does.
/// </summary>
- long TotalQuotaSpace { get; }
- /// <summary>
- /// The total number of unused bytes on the backend,
- /// may return -1 if the particular host implementation
- /// does not support quotas, but the backend does
- /// </summary>
- long FreeQuotaSpace { get; }
+ IQuotaInfo Quota { get; }
}
}
diff --git a/Duplicati/Library/Interface/IQuotaInfo.cs b/Duplicati/Library/Interface/IQuotaInfo.cs
new file mode 100644
index 000000000..81eb48153
--- /dev/null
+++ b/Duplicati/Library/Interface/IQuotaInfo.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Duplicati.Library.Interface
+{
+ public interface IQuotaInfo
+ {
+ /// <summary>
+ /// The total number of bytes available on the backend,
+ /// This may return -1 if the particular host implementation
+ /// does not support quotas, but the backend does
+ /// </summary>
+ long TotalQuotaSpace { get; }
+ /// <summary>
+ /// The total number of unused bytes on the backend,
+ /// This may return -1 if the particular host implementation
+ /// does not support quotas, but the backend does
+ /// </summary>
+ long FreeQuotaSpace { get; }
+ }
+}
diff --git a/Duplicati/Library/Interface/QuotaInfo.cs b/Duplicati/Library/Interface/QuotaInfo.cs
new file mode 100644
index 000000000..6158e1c7c
--- /dev/null
+++ b/Duplicati/Library/Interface/QuotaInfo.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Duplicati.Library.Interface
+{
+ public class QuotaInfo : IQuotaInfo
+ {
+ public QuotaInfo(long totalSpace, long freeSpace)
+ {
+ this.TotalQuotaSpace = totalSpace;
+ this.FreeQuotaSpace = freeSpace;
+ }
+
+ public long TotalQuotaSpace { get; private set; }
+
+ public long FreeQuotaSpace { get; private set; }
+ }
+}