add some info texts, especialy for novice users to avoid some common misunderstandings. closes #46, closes #47
This commit is contained in:
@@ -28,7 +28,12 @@ namespace keepass2android.Io
|
||||
get { yield return "content"; }
|
||||
}
|
||||
|
||||
public void Delete(IOConnectionInfo ioc)
|
||||
public bool UserShouldBackup
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public void Delete(IOConnectionInfo ioc)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
@@ -59,7 +59,12 @@ namespace keepass2android.Io
|
||||
|
||||
public abstract IEnumerable<string> SupportedProtocols { get; }
|
||||
|
||||
public void Delete(IOConnectionInfo ioc)
|
||||
public bool UserShouldBackup
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public void Delete(IOConnectionInfo ioc)
|
||||
{
|
||||
//todo check if directory
|
||||
IOConnection.DeleteFile(ioc);
|
||||
|
||||
@@ -84,7 +84,12 @@ namespace keepass2android.Io
|
||||
|
||||
public IEnumerable<string> SupportedProtocols { get { return _cachedStorage.SupportedProtocols; } }
|
||||
|
||||
public void DeleteFile(IOConnectionInfo ioc)
|
||||
public bool UserShouldBackup
|
||||
{
|
||||
get { return _cachedStorage.UserShouldBackup; }
|
||||
}
|
||||
|
||||
public void DeleteFile(IOConnectionInfo ioc)
|
||||
{
|
||||
if (IsCached(ioc))
|
||||
{
|
||||
|
||||
@@ -10,7 +10,11 @@ namespace keepass2android.Io
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override bool UserShouldBackup
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
}
|
||||
|
||||
public partial class DropboxAppFolderFileStorage: JavaFileStorage
|
||||
@@ -20,8 +24,12 @@ namespace keepass2android.Io
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
public override bool UserShouldBackup
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
@@ -22,6 +22,10 @@ namespace keepass2android.Io
|
||||
}
|
||||
|
||||
|
||||
public override bool UserShouldBackup
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -46,9 +46,14 @@ namespace keepass2android.Io
|
||||
/// <summary>
|
||||
/// returns the protocol ids supported by this FileStorage. Can return pseudo-protocols like "dropbox" or real protocols like "ftp"
|
||||
/// </summary>
|
||||
IEnumerable<string> SupportedProtocols { get; }
|
||||
IEnumerable<string> SupportedProtocols { get; }
|
||||
|
||||
/// <summary>
|
||||
/// <summary>
|
||||
/// returns true if users should backup files on this file storage (if the file is important). Can be false for cloud providers with built-in versioning or backups.
|
||||
/// </summary>
|
||||
bool UserShouldBackup { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the given file or directory.
|
||||
/// </summary>
|
||||
void Delete(IOConnectionInfo ioc);
|
||||
|
||||
@@ -22,9 +22,10 @@ namespace keepass2android.Io
|
||||
protected string Protocol { get { return _jfs.ProtocolId; } }
|
||||
|
||||
public virtual IEnumerable<string> SupportedProtocols { get { yield return Protocol; } }
|
||||
public abstract bool UserShouldBackup { get; }
|
||||
|
||||
|
||||
private readonly IJavaFileStorage _jfs;
|
||||
private readonly IJavaFileStorage _jfs;
|
||||
private readonly IKp2aApp _app;
|
||||
|
||||
public JavaFileStorage(IJavaFileStorage jfs, IKp2aApp app)
|
||||
|
||||
@@ -161,7 +161,12 @@ namespace keepass2android.Io
|
||||
}
|
||||
}
|
||||
|
||||
public void Delete(IOConnectionInfo ioc)
|
||||
public bool UserShouldBackup
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public void Delete(IOConnectionInfo ioc)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -32,7 +32,12 @@ namespace keepass2android.Io
|
||||
get { return _baseStorage.SupportedProtocols; }
|
||||
}
|
||||
|
||||
public void Delete(IOConnectionInfo ioc)
|
||||
public bool UserShouldBackup
|
||||
{
|
||||
get { return _baseStorage.UserShouldBackup; }
|
||||
}
|
||||
|
||||
public void Delete(IOConnectionInfo ioc)
|
||||
{
|
||||
_baseStorage.Delete(ioc);
|
||||
}
|
||||
|
||||
@@ -33,6 +33,11 @@ namespace keepass2android.Io
|
||||
yield return "onedrive";
|
||||
}
|
||||
}
|
||||
|
||||
public override bool UserShouldBackup
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -10,7 +10,11 @@ namespace keepass2android.Io
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override bool UserShouldBackup
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -33,7 +33,12 @@ namespace keepass2android.Io
|
||||
}
|
||||
}
|
||||
|
||||
public static string Owncloud2Webdav(string owncloudUrl)
|
||||
public override bool UserShouldBackup
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public static string Owncloud2Webdav(string owncloudUrl)
|
||||
{
|
||||
string owncloudPrefix = "owncloud://";
|
||||
if (owncloudUrl.StartsWith(owncloudPrefix))
|
||||
|
||||
Reference in New Issue
Block a user