First version of Dropbox-Support (not yet really functional - no possible to select the file to open)

This commit is contained in:
Philipp Crocoll
2013-09-15 20:08:14 +02:00
parent 042ee03f56
commit fbd3aafe71
60 changed files with 2175 additions and 306 deletions

View File

@@ -19,6 +19,17 @@ namespace keepass2android.Io
{
public class BuiltInFileStorage: IFileStorage
{
public IEnumerable<string> SupportedProtocols
{
get
{
yield return "file";
yield return "ftp";
yield return "http";
yield return "https";
}
}
public void DeleteFile(IOConnectionInfo ioc)
{
IOConnection.DeleteFile(ioc);
@@ -78,6 +89,8 @@ namespace keepass2android.Io
return new BuiltInFileTransaction(ioc, useFileTransaction);
}
public IFileStorageSetup RequiredSetup { get { return null; } }
public class BuiltInFileTransaction : IWriteTransaction
{
private readonly FileTransactionEx _transaction;
@@ -119,5 +132,10 @@ namespace keepass2android.Io
UrlUtil.GetFileName(ioc.Path));
}
public bool RequiresCredentials(IOConnectionInfo ioc)
{
return (!ioc.IsLocalFile()) && (ioc.CredSaveMode != IOCredSaveMode.SaveCred);
}
}
}