From 6c77cc430b1e78bd3d0acf1cc078e60775647956 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Mon, 17 Nov 2008 19:16:43 +0100 Subject: Implement Quick Connect feature --- vfs/UVFSCore.pas | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'vfs/UVFSCore.pas') diff --git a/vfs/UVFSCore.pas b/vfs/UVFSCore.pas index 7531e9c..6cd1114 100644 --- a/vfs/UVFSCore.pas +++ b/vfs/UVFSCore.pas @@ -38,6 +38,7 @@ type FVFSListClose: TVFSListClose; FVFSChangeDir: TVFSChangeDir; FVFSGetPath: TVFSGetPath; + FVFSGetPathURI: TVFSGetPathURI; FVFSGetPrefix: TVFSGetPrefix; FVFSGetFileSystemSize: TVFSGetFileSystemSize; FVFSGetFileSystemFree: TVFSGetFileSystemFree; @@ -93,6 +94,7 @@ type Password: string; PasswordUsed: boolean; RemoveFileOnClose: string; + OpenedFromQuickConnect: boolean; constructor Create(SourcePlugin: TVFSPlugin); function VFSOpenURI(URI: string; AskQuestionCallback: PVFSAskQuestionCallback; AskPasswordCallback: PVFSAskPasswordCallback; ProgressCallback: PVFSProgressCallback; CallbackData: Pointer): boolean; function VFSOpenEx(OpenFile: string; AskQuestionCallback: PVFSAskQuestionCallback; AskPasswordCallback: PVFSAskPasswordCallback; ProgressCallback: PVFSProgressCallback; CallbackData: Pointer): TVFSResult; @@ -132,6 +134,7 @@ type function GetPath: string; override; procedure SetPath(Value: string); override; function GetPrefix: string; override; + function GetPathURI: string; function GetBlockSize: Cardinal; override; procedure SetBlockSize(Value: Cardinal); override; @@ -195,6 +198,7 @@ begin @FVFSListNext := dlsym(ModuleHandle, 'VFSListNext'); @FVFSListClose := dlsym(ModuleHandle, 'VFSListClose'); @FVFSGetPath := dlsym(ModuleHandle, 'VFSGetPath'); + @FVFSGetPathURI := dlsym(ModuleHandle, 'VFSGetPathURI'); @FVFSChangeDir := dlsym(ModuleHandle, 'VFSChangeDir'); @FVFSGetPrefix := dlsym(ModuleHandle, 'VFSGetPrefix'); @FVFSGetFileSystemSize := dlsym(ModuleHandle, 'VFSGetFileSystemSize'); @@ -296,6 +300,7 @@ begin Password := ''; PasswordUsed := False; RemoveFileOnClose := ''; + OpenedFromQuickConnect := False; if @FSourcePlugin.FVFSNew <> nil then FGlobs := FSourcePlugin.FVFSNew(@VFSLogFunc); end; @@ -506,6 +511,16 @@ begin else Result := '/'; end; +function TVFSEngine.GetPathURI: string; +var x: PChar; +begin + Result := ''; + if (FGlobs <> nil) and (@FSourcePlugin.FVFSGetPathURI <> nil) then begin + x := FSourcePlugin.FVFSGetPathURI(FGlobs); + if x <> nil then Result := string(x); + end; +end; + function TVFSEngine.ChangeDir(const NewPath: string): integer; begin DebugMsg(['^^VFS (II): ChangeDir begin']); -- cgit v1.2.3