diff options
author | Rune Henriksen <ruju@itu.dk> | 2018-02-18 02:18:44 +0300 |
---|---|---|
committer | Rune Henriksen <ruju@itu.dk> | 2018-02-18 02:18:44 +0300 |
commit | 00292953c327412643d84c6c95ce3f63ff28ed8a (patch) | |
tree | e277f375c8206ba95c2ae84df9f52e042629d332 /Duplicati/Library | |
parent | 6adff7e8f5a970bb9ef99c8f2c68833fe3e6bd19 (diff) |
added DNSName getter on Backend interface and added NotImplementedException methods on each backend class
Diffstat (limited to 'Duplicati/Library')
23 files changed, 64 insertions, 15 deletions
diff --git a/Duplicati/Library/Backend/AlternativeFTP/AlternativeFTPBackend.cs b/Duplicati/Library/Backend/AlternativeFTP/AlternativeFTPBackend.cs index b6543a6e1..873d69642 100644 --- a/Duplicati/Library/Backend/AlternativeFTP/AlternativeFTPBackend.cs +++ b/Duplicati/Library/Backend/AlternativeFTP/AlternativeFTPBackend.cs @@ -450,6 +450,8 @@ namespace Duplicati.Library.Backend.AlternativeFTP }
}
+ public string DNSName => throw new NotImplementedException();
+
private static System.IO.Stream StringToStream(string str)
{
var stream = new System.IO.MemoryStream();
diff --git a/Duplicati/Library/Backend/AmazonCloudDrive/AmzCD.cs b/Duplicati/Library/Backend/AmazonCloudDrive/AmzCD.cs index 520d9a06c..cbb8d6143 100644 --- a/Duplicati/Library/Backend/AmazonCloudDrive/AmzCD.cs +++ b/Duplicati/Library/Backend/AmazonCloudDrive/AmzCD.cs @@ -457,6 +457,8 @@ namespace Duplicati.Library.Backend.AmazonCloudDrive return Strings.AmzCD.Description;
}
}
+
+ public string DNSName => throw new NotImplementedException();
#endregion
#region IDisposable implementation
public void Dispose()
diff --git a/Duplicati/Library/Backend/AzureBlob/AzureBlobBackend.cs b/Duplicati/Library/Backend/AzureBlob/AzureBlobBackend.cs index d55eb17b0..2ec816b49 100644 --- a/Duplicati/Library/Backend/AzureBlob/AzureBlobBackend.cs +++ b/Duplicati/Library/Backend/AzureBlob/AzureBlobBackend.cs @@ -157,8 +157,10 @@ namespace Duplicati.Library.Backend.AzureBlob { return Strings.AzureBlobBackend.Description_v2; } - } - + }
+
+ public string DNSName => throw new NotImplementedException();
+
public void Test() { this.TestList(); diff --git a/Duplicati/Library/Backend/Backblaze/B2.cs b/Duplicati/Library/Backend/Backblaze/B2.cs index 35ec87393..046bd5207 100644 --- a/Duplicati/Library/Backend/Backblaze/B2.cs +++ b/Duplicati/Library/Backend/Backblaze/B2.cs @@ -422,6 +422,8 @@ namespace Duplicati.Library.Backend.Backblaze get { return Strings.B2.Description; }
}
+ public string DNSName => throw new NotImplementedException();
+
public void Dispose()
{
}
diff --git a/Duplicati/Library/Backend/Box/BoxBackend.cs b/Duplicati/Library/Backend/Box/BoxBackend.cs index b20b259c7..217fdd72a 100644 --- a/Duplicati/Library/Backend/Box/BoxBackend.cs +++ b/Duplicati/Library/Backend/Box/BoxBackend.cs @@ -337,6 +337,8 @@ namespace Duplicati.Library.Backend.Box }
}
+ public string DNSName => throw new NotImplementedException();
+
#endregion
#region IDisposable implementation
diff --git a/Duplicati/Library/Backend/CloudFiles/CloudFiles.cs b/Duplicati/Library/Backend/CloudFiles/CloudFiles.cs index 82793def0..6c0b4c00b 100644 --- a/Duplicati/Library/Backend/CloudFiles/CloudFiles.cs +++ b/Duplicati/Library/Backend/CloudFiles/CloudFiles.cs @@ -290,6 +290,8 @@ namespace Duplicati.Library.Backend get { return true; }
}
+ public string DNSName => throw new NotImplementedException();
+
public void Get(string remotename, System.IO.Stream stream)
{
var req = CreateRequest("/" + remotename, "");
diff --git a/Duplicati/Library/Backend/Dropbox/Dropbox.cs b/Duplicati/Library/Backend/Dropbox/Dropbox.cs index 281395868..f94cb102f 100644 --- a/Duplicati/Library/Backend/Dropbox/Dropbox.cs +++ b/Duplicati/Library/Backend/Dropbox/Dropbox.cs @@ -136,6 +136,8 @@ namespace Duplicati.Library.Backend public string Description { get { return Strings.Dropbox.Description; } }
+ public string DNSName => throw new NotImplementedException();
+
public void Test()
{
this.TestList();
diff --git a/Duplicati/Library/Backend/FTP/FTPBackend.cs b/Duplicati/Library/Backend/FTP/FTPBackend.cs index e09bd165e..7e4018890 100644 --- a/Duplicati/Library/Backend/FTP/FTPBackend.cs +++ b/Duplicati/Library/Backend/FTP/FTPBackend.cs @@ -355,6 +355,8 @@ namespace Duplicati.Library.Backend }
}
+ public string DNSName => throw new NotImplementedException();
+
public void Test()
{
this.TestList();
diff --git a/Duplicati/Library/Backend/File/FileBackend.cs b/Duplicati/Library/Backend/File/FileBackend.cs index 343234e13..86cc6d553 100644 --- a/Duplicati/Library/Backend/File/FileBackend.cs +++ b/Duplicati/Library/Backend/File/FileBackend.cs @@ -351,6 +351,8 @@ namespace Duplicati.Library.Backend }
}
+ public string DNSName => throw new NotImplementedException();
+
public void Rename(string oldname, string newname)
{
var source = GetRemoteName(oldname);
diff --git a/Duplicati/Library/Backend/GoogleServices/GoogleCloudStorage.cs b/Duplicati/Library/Backend/GoogleServices/GoogleCloudStorage.cs index 1d8bc335c..e367d873c 100644 --- a/Duplicati/Library/Backend/GoogleServices/GoogleCloudStorage.cs +++ b/Duplicati/Library/Backend/GoogleServices/GoogleCloudStorage.cs @@ -260,6 +260,8 @@ namespace Duplicati.Library.Backend.GoogleCloudStorage {
get { return Strings.GoogleCloudStorage.Description; }
}
+
+ public string DNSName => throw new NotImplementedException();
#endregion
public void Put(string remotename, System.IO.Stream stream)
diff --git a/Duplicati/Library/Backend/GoogleServices/GoogleDrive.cs b/Duplicati/Library/Backend/GoogleServices/GoogleDrive.cs index 29bf82b3e..b95be11a5 100644 --- a/Duplicati/Library/Backend/GoogleServices/GoogleDrive.cs +++ b/Duplicati/Library/Backend/GoogleServices/GoogleDrive.cs @@ -346,6 +346,8 @@ namespace Duplicati.Library.Backend.GoogleDrive }
}
}
+
+ public string DNSName => throw new NotImplementedException();
#endregion
#region IRenameEnabledBackend implementation
diff --git a/Duplicati/Library/Backend/Jottacloud/Jottacloud.cs b/Duplicati/Library/Backend/Jottacloud/Jottacloud.cs index 46f797351..39a541ea7 100644 --- a/Duplicati/Library/Backend/Jottacloud/Jottacloud.cs +++ b/Duplicati/Library/Backend/Jottacloud/Jottacloud.cs @@ -316,8 +316,10 @@ namespace Duplicati.Library.Backend public bool SupportsStreaming { get { return true; } - } - + }
+
+ public string DNSName => throw new NotImplementedException();
+
public void Get(string remotename, System.IO.Stream stream) { // Downloading from Jottacloud: Will only succeed if the file has a completed revision, diff --git a/Duplicati/Library/Backend/Mega/MegaBackend.cs b/Duplicati/Library/Backend/Mega/MegaBackend.cs index e9261717f..51836e04e 100644 --- a/Duplicati/Library/Backend/Mega/MegaBackend.cs +++ b/Duplicati/Library/Backend/Mega/MegaBackend.cs @@ -260,6 +260,8 @@ namespace Duplicati.Library.Backend.Mega }
}
+ public string DNSName => throw new NotImplementedException();
+
#endregion
#region IDisposable implementation
diff --git a/Duplicati/Library/Backend/OneDrive/OneDrive.cs b/Duplicati/Library/Backend/OneDrive/OneDrive.cs index ff432b6b1..6c0da40a9 100644 --- a/Duplicati/Library/Backend/OneDrive/OneDrive.cs +++ b/Duplicati/Library/Backend/OneDrive/OneDrive.cs @@ -500,7 +500,9 @@ namespace Duplicati.Library.Backend }
}
- #endregion
+ public string DNSName => throw new NotImplementedException();
+
+ #endregion
#region IStreamingBackend Members
diff --git a/Duplicati/Library/Backend/OpenStack/OpenStackStorage.cs b/Duplicati/Library/Backend/OpenStack/OpenStackStorage.cs index ed4f88cba..4dd8e7f88 100644 --- a/Duplicati/Library/Backend/OpenStack/OpenStackStorage.cs +++ b/Duplicati/Library/Backend/OpenStack/OpenStackStorage.cs @@ -422,6 +422,8 @@ namespace Duplicati.Library.Backend.OpenStack return Strings.OpenStack.Description;
}
}
+
+ public string DNSName => throw new NotImplementedException();
#endregion
#region IDisposable implementation
public void Dispose()
diff --git a/Duplicati/Library/Backend/Rclone/Rclone.cs b/Duplicati/Library/Backend/Rclone/Rclone.cs index 6d7596948..d78f6df48 100644 --- a/Duplicati/Library/Backend/Rclone/Rclone.cs +++ b/Duplicati/Library/Backend/Rclone/Rclone.cs @@ -282,8 +282,10 @@ namespace Duplicati.Library.Backend { return Strings.Rclone.Description; } - } - + }
+
+ public string DNSName => throw new NotImplementedException();
+
public void Test() { this.TestList(); diff --git a/Duplicati/Library/Backend/S3/S3Backend.cs b/Duplicati/Library/Backend/S3/S3Backend.cs index 4d3e9ddf6..60d4632fe 100644 --- a/Duplicati/Library/Backend/S3/S3Backend.cs +++ b/Duplicati/Library/Backend/S3/S3Backend.cs @@ -474,6 +474,8 @@ namespace Duplicati.Library.Backend get { return m_wrapper; }
}
+ public string DNSName => throw new NotImplementedException();
+
private string GetFullKey(string name)
{
//AWS SDK encodes the filenames correctly
diff --git a/Duplicati/Library/Backend/SSHv2/SSHv2Backend.cs b/Duplicati/Library/Backend/SSHv2/SSHv2Backend.cs index c91b0d6a5..75a18c700 100644 --- a/Duplicati/Library/Backend/SSHv2/SSHv2Backend.cs +++ b/Duplicati/Library/Backend/SSHv2/SSHv2Backend.cs @@ -368,5 +368,7 @@ namespace Duplicati.Library.Backend return m_con;
}
}
+
+ public string DNSName => throw new NotImplementedException();
}
}
diff --git a/Duplicati/Library/Backend/SharePoint/SharePointBackend.cs b/Duplicati/Library/Backend/SharePoint/SharePointBackend.cs index 1b86574ae..2d99ca84d 100644 --- a/Duplicati/Library/Backend/SharePoint/SharePointBackend.cs +++ b/Duplicati/Library/Backend/SharePoint/SharePointBackend.cs @@ -113,12 +113,14 @@ namespace Duplicati.Library.Backend new CommandLineArgument("chunk-size", CommandLineArgument.ArgumentType.Size, Strings.SharePoint.DescriptionChunkSizeShort, Strings.SharePoint.DescriptionChunkSizeLong, "4mb"), }); } - } - + }
+
+ public string DNSName => throw new NotImplementedException();
+
#endregion - +
#region [Constructors] - +
public SharePointBackend() { } diff --git a/Duplicati/Library/Backend/Sia/Sia.cs b/Duplicati/Library/Backend/Sia/Sia.cs index 2839682d4..f00bd94f8 100644 --- a/Duplicati/Library/Backend/Sia/Sia.cs +++ b/Duplicati/Library/Backend/Sia/Sia.cs @@ -438,12 +438,14 @@ namespace Duplicati.Library.Backend.Sia { return Strings.Sia.Description; } - } - + }
+
+ public string DNSName => throw new NotImplementedException();
+
#endregion - +
#region IDisposable Members - +
public void Dispose() { diff --git a/Duplicati/Library/Backend/TahoeLAFS/TahoeBackend.cs b/Duplicati/Library/Backend/TahoeLAFS/TahoeBackend.cs index 274f56ffd..7689268a5 100644 --- a/Duplicati/Library/Backend/TahoeLAFS/TahoeBackend.cs +++ b/Duplicati/Library/Backend/TahoeLAFS/TahoeBackend.cs @@ -254,6 +254,8 @@ namespace Duplicati.Library.Backend get { return Strings.TahoeBackend.Description; }
}
+ public string DNSName => throw new NotImplementedException();
+
#endregion
#region IDisposable Members
diff --git a/Duplicati/Library/Backend/WEBDAV/WEBDAV.cs b/Duplicati/Library/Backend/WEBDAV/WEBDAV.cs index 7e203394b..0a1efd061 100644 --- a/Duplicati/Library/Backend/WEBDAV/WEBDAV.cs +++ b/Duplicati/Library/Backend/WEBDAV/WEBDAV.cs @@ -311,6 +311,8 @@ namespace Duplicati.Library.Backend get { return Strings.WEBDAV.Description; }
}
+ public string DNSName => throw new NotImplementedException();
+
public void Test()
{
this.List();
diff --git a/Duplicati/Library/Interface/IBackend.cs b/Duplicati/Library/Interface/IBackend.cs index 8281a9372..709006e54 100644 --- a/Duplicati/Library/Interface/IBackend.cs +++ b/Duplicati/Library/Interface/IBackend.cs @@ -82,6 +82,11 @@ namespace Duplicati.Library.Interface string Description { get; }
/// <summary>
+ /// The DNS name used to resolve the IP address for this backend
+ /// </summary>
+ string DNSName { get; }
+
+ /// <summary>
/// The purpose of this method is to test the connection to the remote backend.
/// If any problem is encountered, this method should throw an exception.
/// If the encountered problem is a missing target "folder",
|