summaryrefslogtreecommitdiff
path: root/vfs/UVFSCore.pas
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2008-11-17 19:16:43 +0100
committerTomas Bzatek <tbzatek@users.sourceforge.net>2008-11-17 19:16:43 +0100
commit6c77cc430b1e78bd3d0acf1cc078e60775647956 (patch)
tree3f187b66079eceb7a40656abf812d0881234bdbf /vfs/UVFSCore.pas
parent21a190555adb42a71cb6eb6a1aec5353708bc6bd (diff)
downloadtuxcmd-0.6.60.tar.xz
Implement Quick Connect featurev0.6.60
Diffstat (limited to 'vfs/UVFSCore.pas')
-rw-r--r--vfs/UVFSCore.pas15
1 files changed, 15 insertions, 0 deletions
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']);