summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--UMain.pas1
-rw-r--r--vfs/UVFSCore.pas10
-rw-r--r--vfs/uVFSprototypes.pas6
3 files changed, 17 insertions, 0 deletions
diff --git a/UMain.pas b/UMain.pas
index e4e8c54..119e7cc 100644
--- a/UMain.pas
+++ b/UMain.pas
@@ -6381,6 +6381,7 @@ begin
if Password <> nil then begin
TVFSEngine(Engine).Password := string(Password);
TVFSEngine(Engine).PasswordUsed := False;
+ TVFSEngine(Engine).ResetPassword;
g_free(Password);
end;
except
diff --git a/vfs/UVFSCore.pas b/vfs/UVFSCore.pas
index 8bba788..a514512 100644
--- a/vfs/UVFSCore.pas
+++ b/vfs/UVFSCore.pas
@@ -66,6 +66,7 @@ type
FVFSGetServices: TVFSGetServices;
FVFSGetPasswordRequired: TVFSGetPasswordRequired;
FVFSSetCallbacks: TVFSSetCallbacks;
+ FVFSResetPassword: TVFSResetPassword;
public
ModuleHandle: Pointer;
FullPath: string; // module path
@@ -143,6 +144,7 @@ type
function TwoSameFiles(const Path1, Path2: string): boolean; override;
function GetPasswordRequired: boolean;
+ procedure ResetPassword;
published
property Path: string read GetPath write SetPath;
property BlockSize: Cardinal read GetBlockSize write SetBlockSize;
@@ -221,6 +223,7 @@ begin
@FVFSGetServices := dlsym(ModuleHandle, 'VFSGetServices');
@FVFSGetPasswordRequired := dlsym(ModuleHandle, 'VFSGetPasswordRequired');
@FVFSSetCallbacks := dlsym(ModuleHandle, 'VFSSetCallbacks');
+ @FVFSResetPassword := dlsym(ModuleHandle, 'VFSResetPassword');
// Initialize the extensions list
SetLength(Extensions, 0);
SetLength(Services, 0);
@@ -921,6 +924,13 @@ begin
else Result := False;
end;
+procedure TVFSEngine.ResetPassword;
+begin
+ if @FSourcePlugin.FVFSResetPassword <> nil then
+ FSourcePlugin.FVFSResetPassword(FGlobs);
+end;
+
+
(********************************************************************************************************************************)
(********************************************************************************************************************************)
function GetBinaryPath: string;
diff --git a/vfs/uVFSprototypes.pas b/vfs/uVFSprototypes.pas
index 43190a4..4ccde33 100644
--- a/vfs/uVFSprototypes.pas
+++ b/vfs/uVFSprototypes.pas
@@ -287,6 +287,12 @@ type
TVFSGetPasswordRequired = function (g:TVFSGlobs): LongBool; cdecl;
+
+ // Reset stored session password in the plugin
+ TVFSResetPassword = procedure (g: TVFSGlobs); cdecl;
+
+
+
/// pridat neco jako set_loglevel ??
//// pridat typ pluginu - jestli archive nebo protocol - prip. jeste pridat ktery protokoly je to schopno handlovat