started working on FTP(S) implementation using netftp and introduction of "server accounts"
This commit is contained in:
@@ -255,6 +255,11 @@ namespace keepass2android.Io
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void ResolveAccount(IOConnectionInfo ioc)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class AndroidContentWriteTransaction : IWriteTransaction
|
||||
|
||||
@@ -395,6 +395,11 @@ namespace keepass2android.Io
|
||||
return false;
|
||||
}
|
||||
|
||||
public void ResolveAccount(IOConnectionInfo ioc)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private bool IsLocalFileFlaggedReadOnly(IOConnectionInfo ioc)
|
||||
{
|
||||
try
|
||||
|
||||
@@ -563,6 +563,11 @@ namespace keepass2android.Io
|
||||
return _cachedStorage.IsReadOnly(ioc, reason);
|
||||
}
|
||||
|
||||
public void ResolveAccount(IOConnectionInfo ioc)
|
||||
{
|
||||
_cachedStorage.ResolveAccount(ioc);
|
||||
}
|
||||
|
||||
private void StoreFilePath(IOConnectionInfo folderPath, string filename, IOConnectionInfo res)
|
||||
{
|
||||
File.WriteAllText(CachedFilePath(GetPseudoIoc(folderPath, filename)) + ".filepath", res.Path);
|
||||
|
||||
@@ -177,7 +177,12 @@ namespace keepass2android.Io
|
||||
/// </summary>
|
||||
bool IsReadOnly(IOConnectionInfo ioc, OptionalOut<UiStringKey> reason = null );
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// if the ioc.Path contains a string which refers to a stored account (like FTP account with specific settings),
|
||||
/// this method resolves the path so that it is a path which can be consumed by the file storage "operational" methods (=all other methods)
|
||||
/// </summary>
|
||||
/// <param name="ioc"></param>
|
||||
void ResolveAccount(IOConnectionInfo ioc);
|
||||
}
|
||||
|
||||
public interface IPermissionRequestingFileStorage
|
||||
|
||||
@@ -294,6 +294,11 @@ namespace keepass2android.Io
|
||||
return false; //TODO implement. note, however, that we MAY return false even if it's read-only
|
||||
}
|
||||
|
||||
public void ResolveAccount(IOConnectionInfo ioc)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void OnCreate(IFileStorageSetupActivity activity, Bundle savedInstanceState)
|
||||
{
|
||||
_jfs.OnCreate(((IJavaFileStorageFileStorageSetupActivity)activity), savedInstanceState);
|
||||
|
||||
@@ -181,6 +181,11 @@ namespace keepass2android.Io
|
||||
return _baseStorage.IsReadOnly(ioc, reason);
|
||||
}
|
||||
|
||||
public void ResolveAccount(IOConnectionInfo ioc)
|
||||
{
|
||||
_baseStorage.ResolveAccount(ioc);
|
||||
}
|
||||
|
||||
public void OnRequestPermissionsResult(IFileStorageSetupActivity fileStorageSetupActivity, int requestCode,
|
||||
string[] permissions, Permission[] grantResults)
|
||||
{
|
||||
|
||||
@@ -86,6 +86,7 @@
|
||||
<Compile Include="Io\IFileStorage.cs" />
|
||||
<Compile Include="Io\IoUtil.cs" />
|
||||
<Compile Include="Io\JavaFileStorage.cs" />
|
||||
<Compile Include="Io\NetFtpFileStorage.cs" />
|
||||
<Compile Include="Io\OfflineSwitchableFileStorage.cs" />
|
||||
<Compile Include="Io\SftpFileStorage.cs" />
|
||||
<Compile Include="Io\SkyDriveFileStorage.cs" />
|
||||
@@ -133,6 +134,10 @@
|
||||
<Project>{70D3844A-D9FA-4A64-B205-A84C6A822196}</Project>
|
||||
<Name>KP2AKdbLibraryBinding</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\netftpandroid\System.Net.FtpClient\System.Net.FtpClient.Android.csproj">
|
||||
<Project>{146FD497-BA03-4740-B6C5-5C84EA8FCDE2}</Project>
|
||||
<Name>System.Net.FtpClient.Android</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\TwofishCipher\TwofishCipher.csproj">
|
||||
<Project>{5CF675A5-9BEE-4720-BED9-D5BF14A2EBF9}</Project>
|
||||
<Name>TwofishCipher</Name>
|
||||
|
||||
Reference in New Issue
Block a user