diff options
author | Sean Templeton <seantempleton@outlook.com> | 2019-02-23 06:58:40 +0300 |
---|---|---|
committer | Sean Templeton <seantempleton@outlook.com> | 2019-03-04 06:43:10 +0300 |
commit | 0c122ff5506ffa94a7cb72aa857d2a6a17899f89 (patch) | |
tree | bf20110da847ea07e404278ea3ef7a444744d518 /Duplicati/Library/Interface | |
parent | 3de04da39e789438589514c25f12e5a1a54c63ff (diff) |
Change IBackend and IStreamingBackend to return Task for Put()
Diffstat (limited to 'Duplicati/Library/Interface')
-rw-r--r-- | Duplicati/Library/Interface/IBackend.cs | 6 | ||||
-rw-r--r-- | Duplicati/Library/Interface/IStreamingBackend.cs | 8 |
2 files changed, 8 insertions, 6 deletions
diff --git a/Duplicati/Library/Interface/IBackend.cs b/Duplicati/Library/Interface/IBackend.cs index ba9571e6f..82e614b07 100644 --- a/Duplicati/Library/Interface/IBackend.cs +++ b/Duplicati/Library/Interface/IBackend.cs @@ -19,7 +19,8 @@ #endregion
using System;
using System.Collections.Generic;
-using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
namespace Duplicati.Library.Interface
{
@@ -56,7 +57,8 @@ namespace Duplicati.Library.Interface /// </summary>
/// <param name="remotename">The remote filename, relative to the URL</param>
/// <param name="filename">The local filename</param>
- void Put(string remotename, string filename);
+ /// <param name="cancelToken">Token to cancel the operation.</param>
+ Task Put(string remotename, string filename, CancellationToken cancelToken);
/// <summary>
/// Downloads a file with the remote data
diff --git a/Duplicati/Library/Interface/IStreamingBackend.cs b/Duplicati/Library/Interface/IStreamingBackend.cs index 740d4a670..33b8baff2 100644 --- a/Duplicati/Library/Interface/IStreamingBackend.cs +++ b/Duplicati/Library/Interface/IStreamingBackend.cs @@ -17,9 +17,8 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
//
#endregion
-using System;
-using System.Collections.Generic;
-using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
namespace Duplicati.Library.Interface
{
@@ -35,7 +34,8 @@ namespace Duplicati.Library.Interface /// </summary>
/// <param name="remotename">The remote filename, relative to the URL</param>
/// <param name="stream">The stream to read from</param>
- void Put(string remotename, System.IO.Stream stream);
+ /// <param name="cancelToken">Token to cancel the operation.</param>
+ Task Put(string remotename, System.IO.Stream stream, CancellationToken cancelToken);
/// <summary>
/// Downloads a file with the remote data
|