From 529fbd9a94fc1c87fe5198066c2ecf34004af356 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Mon, 30 Nov 2009 22:54:46 +0100 Subject: Foundation of VFS capabilities --- vfs/UVFSCore.pas | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'vfs/UVFSCore.pas') diff --git a/vfs/UVFSCore.pas b/vfs/UVFSCore.pas index 3e14618..cf3e36a 100644 --- a/vfs/UVFSCore.pas +++ b/vfs/UVFSCore.pas @@ -68,6 +68,7 @@ type FVFSResetPassword: TVFSResetPassword; FVFSStartCopyOperation: TVFSStartCopyOperation; FVFSStopCopyOperation: TVFSStopCopyOperation; + FVFSGetCapabilities: TVFSGetCapabilities; function GetHandlesArchives: boolean; function GetHandlesNetwork: boolean; public @@ -98,6 +99,7 @@ type FArchivePath: string; function GetPluginID: string; function GetDataItemFromVFSItem(P: PVFSItem): PDataItem; + function GetArchiveStreamingType: boolean; public Password: string; PasswordUsed: boolean; @@ -160,11 +162,10 @@ type function CopyFileInEx(Sender: Pointer; const SourceFile, DestFile: string; ErrorFunc: TEngineErrorFunc; Append: boolean): boolean; function CopyFileOutEx(Sender: Pointer; const SourceFile, DestFile: string; ErrorFunc: TEngineErrorFunc; Append: boolean): boolean; published - property Path: string read GetPath write SetPath; - property BlockSize: Cardinal read GetBlockSize write SetBlockSize; property PluginID: string read GetPluginID; property ArchiveMode: boolean read FArchiveMode; property ArchivePath: string read FArchivePath; + property ArchiveStreamingType: boolean read GetArchiveStreamingType; end; @@ -246,6 +247,7 @@ begin @FVFSResetPassword := dlsym(ModuleHandle, 'VFSResetPassword'); @FVFSStartCopyOperation := dlsym(ModuleHandle, 'VFSStartCopyOperation'); @FVFSStopCopyOperation := dlsym(ModuleHandle, 'VFSStopCopyOperation'); + @FVFSGetCapabilities := dlsym(ModuleHandle, 'VFSGetCapabilities'); // Initialize the extensions list SetLength(Extensions, 0); @@ -917,6 +919,13 @@ begin else Result := ''; end; +function TVFSEngine.GetArchiveStreamingType: boolean; +begin + Result := False; + if (@FSourcePlugin.FVFSGetCapabilities <> nil) then + Result := (FSourcePlugin.FVFSGetCapabilities() and VFS_CAP_ARCHIVE_STREAMING) = VFS_CAP_ARCHIVE_STREAMING; +end; + (********************************************************************************************************************************) (********************************************************************************************************************************) function GetBinaryPath: string; -- cgit v1.2.3