Стартовый пул
This commit is contained in:
48
Abbrevia/source/COM/Abbrevia.dpr
Normal file
48
Abbrevia/source/COM/Abbrevia.dpr
Normal file
@@ -0,0 +1,48 @@
|
||||
(* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is TurboPower Abbrevia
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* TurboPower Software
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** *)
|
||||
|
||||
library Abbrevia;
|
||||
|
||||
uses
|
||||
ComServ,
|
||||
_ZipKit in '_ZipKit.pas',
|
||||
_ZipItem in '_ZipItem.pas',
|
||||
_GZipItem in '_GZipItem.pas',
|
||||
_TarItem in '_TarItem.pas',
|
||||
Abbrevia_TLB in 'Abbrevia_TLB.pas';
|
||||
|
||||
exports
|
||||
DllGetClassObject,
|
||||
DllCanUnloadNow,
|
||||
DllRegisterServer,
|
||||
DllUnregisterServer,
|
||||
DllInstall;
|
||||
|
||||
{$R *.TLB}
|
||||
|
||||
{$R *.RES}
|
||||
|
||||
begin
|
||||
end.
|
183
Abbrevia/source/COM/Abbrevia.dproj
Normal file
183
Abbrevia/source/COM/Abbrevia.dproj
Normal file
@@ -0,0 +1,183 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{EDA07E3C-7B07-4B14-9B53-64A70EF3F00A}</ProjectGuid>
|
||||
<MainSource>Abbrevia.dpr</MainSource>
|
||||
<Base>True</Base>
|
||||
<Config Condition="'$(Config)'==''">Release</Config>
|
||||
<TargetedPlatforms>3</TargetedPlatforms>
|
||||
<AppType>Library</AppType>
|
||||
<FrameworkType>None</FrameworkType>
|
||||
<ProjectVersion>13.4</ProjectVersion>
|
||||
<Platform Condition="'$(Platform)'==''">Win32</Platform>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
|
||||
<Base_Win64>true</Base_Win64>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
|
||||
<Base_Win32>true</Base_Win32>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''">
|
||||
<Cfg_1>true</Cfg_1>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win64)'!=''">
|
||||
<Cfg_1_Win64>true</Cfg_1_Win64>
|
||||
<CfgParent>Cfg_1</CfgParent>
|
||||
<Cfg_1>true</Cfg_1>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''">
|
||||
<Cfg_1_Win32>true</Cfg_1_Win32>
|
||||
<CfgParent>Cfg_1</CfgParent>
|
||||
<Cfg_1>true</Cfg_1>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''">
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win64)'!=''">
|
||||
<Cfg_2_Win64>true</Cfg_2_Win64>
|
||||
<CfgParent>Cfg_2</CfgParent>
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
|
||||
<Cfg_2_Win32>true</Cfg_2_Win32>
|
||||
<CfgParent>Cfg_2</CfgParent>
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base)'!=''">
|
||||
<DCC_ExeOutput>.\$(Platform)</DCC_ExeOutput>
|
||||
<DCC_UnitSearchPath>..\;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
|
||||
<Manifest_File>None</Manifest_File>
|
||||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||
<VerInfo_MajorVer>5</VerInfo_MajorVer>
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<DCC_E>false</DCC_E>
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=Abbrevia COM components;FileVersion=5.0.0.0;InternalName=;LegalCopyright=Copyright (c) Abbrevia Group 2011;LegalTrademarks=;OriginalFilename=;ProductName=Abbrevia;ProductVersion=5.0;Comments=</VerInfo_Keys>
|
||||
<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;System.Win;Winapi;Vcl;$(DCC_Namespace)</DCC_Namespace>
|
||||
<DCC_ImageBase>00400000</DCC_ImageBase>
|
||||
<DCC_S>false</DCC_S>
|
||||
<GenDll>true</GenDll>
|
||||
<DCC_N>false</DCC_N>
|
||||
<DCC_F>false</DCC_F>
|
||||
<DCC_K>false</DCC_K>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win64)'!=''">
|
||||
<DCC_Namespace>Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||
<Icon_MainIcon>Abbrevia_Icon.ico</Icon_MainIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win32)'!=''">
|
||||
<Debugger_RunParams>/i:user /n Abbrevia.dll</Debugger_RunParams>
|
||||
<Debugger_HostApplication>C:\Windows\System32\regsvr32.exe</Debugger_HostApplication>
|
||||
<DCC_Namespace>Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_1)'!=''">
|
||||
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
|
||||
<DCC_DebugInformation>false</DCC_DebugInformation>
|
||||
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
|
||||
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=Abbrevia COM components;FileVersion=5.0;InternalName=;LegalCopyright=Copyright (c) 2011 Abbrevia Group;LegalTrademarks=;OriginalFilename=Abbrevia.dll;ProductName=Abbrevia;ProductVersion=5.0;Comments=http://tpabbrevia.sourceforge.net/</VerInfo_Keys>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=Abbrevia COM components;FileVersion=5.0;InternalName=;LegalCopyright=Copyright (c) 2011 Abbrevia Group;LegalTrademarks=;OriginalFilename=Abbrevia.dll;ProductName=Abbrevia;ProductVersion=5.0;Comments=http://tpabbrevia.sourceforge.net/</VerInfo_Keys>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2)'!=''">
|
||||
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
|
||||
<DCC_Optimize>false</DCC_Optimize>
|
||||
<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
|
||||
<DCC_RemoteDebug>true</DCC_RemoteDebug>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
|
||||
<DCC_DebugDCUs>true</DCC_DebugDCUs>
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=5.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<DelphiCompile Include="$(MainSource)">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="_ZipKit.pas"/>
|
||||
<DCCReference Include="_ZipItem.pas"/>
|
||||
<DCCReference Include="_GZipItem.pas"/>
|
||||
<DCCReference Include="_TarItem.pas"/>
|
||||
<DCCReference Include="Abbrevia_TLB.pas"/>
|
||||
<RidlCompile Include="Abbrevia.ridl"/>
|
||||
<BuildConfiguration Include="Debug">
|
||||
<Key>Cfg_2</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
</BuildConfiguration>
|
||||
<BuildConfiguration Include="Base">
|
||||
<Key>Base</Key>
|
||||
</BuildConfiguration>
|
||||
<BuildConfiguration Include="Release">
|
||||
<Key>Cfg_1</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
</BuildConfiguration>
|
||||
</ItemGroup>
|
||||
<ProjectExtensions>
|
||||
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
|
||||
<Borland.ProjectType/>
|
||||
<BorlandProject>
|
||||
<Delphi.Personality>
|
||||
<Source>
|
||||
<Source Name="MainSource">Abbrevia.dpr</Source>
|
||||
</Source>
|
||||
<VersionInfo>
|
||||
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
|
||||
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
|
||||
<VersionInfo Name="MajorVer">1</VersionInfo>
|
||||
<VersionInfo Name="MinorVer">0</VersionInfo>
|
||||
<VersionInfo Name="Release">0</VersionInfo>
|
||||
<VersionInfo Name="Build">0</VersionInfo>
|
||||
<VersionInfo Name="Debug">False</VersionInfo>
|
||||
<VersionInfo Name="PreRelease">False</VersionInfo>
|
||||
<VersionInfo Name="Special">False</VersionInfo>
|
||||
<VersionInfo Name="Private">False</VersionInfo>
|
||||
<VersionInfo Name="DLL">False</VersionInfo>
|
||||
<VersionInfo Name="Locale">1033</VersionInfo>
|
||||
<VersionInfo Name="CodePage">1252</VersionInfo>
|
||||
</VersionInfo>
|
||||
<VersionInfoKeys>
|
||||
<VersionInfoKeys Name="CompanyName"/>
|
||||
<VersionInfoKeys Name="FileDescription"/>
|
||||
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="InternalName"/>
|
||||
<VersionInfoKeys Name="LegalCopyright"/>
|
||||
<VersionInfoKeys Name="LegalTrademarks"/>
|
||||
<VersionInfoKeys Name="OriginalFilename"/>
|
||||
<VersionInfoKeys Name="ProductName"/>
|
||||
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="Comments"/>
|
||||
</VersionInfoKeys>
|
||||
</Delphi.Personality>
|
||||
<Platforms>
|
||||
<Platform value="Win64">True</Platform>
|
||||
<Platform value="OSX32">False</Platform>
|
||||
<Platform value="Win32">True</Platform>
|
||||
</Platforms>
|
||||
<ActiveXProjectInfo>
|
||||
<version>1</version>
|
||||
</ActiveXProjectInfo>
|
||||
</BorlandProject>
|
||||
<ProjectFileVersion>12</ProjectFileVersion>
|
||||
</ProjectExtensions>
|
||||
<Import Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')" Project="$(BDS)\Bin\CodeGear.Delphi.Targets"/>
|
||||
<Import Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')" Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj"/>
|
||||
</Project>
|
671
Abbrevia/source/COM/Abbrevia.ridl
Normal file
671
Abbrevia/source/COM/Abbrevia.ridl
Normal file
@@ -0,0 +1,671 @@
|
||||
// ************************************************************************ //
|
||||
// WARNING
|
||||
// -------
|
||||
// This file is generated by the Type Library importer or Type Libary Editor.
|
||||
// Barring syntax errors, the Editor will parse modifications made to the file.
|
||||
// However, when applying changes via the Editor this file will be regenerated
|
||||
// and comments or formatting changes will be lost.
|
||||
// ************************************************************************ //
|
||||
// File generated on 12/6/2011 11:22:23 AM (- $Rev: 12980 $, 51698824).
|
||||
|
||||
[
|
||||
uuid(AF804E20-4043-499E-BB14-237B9F26F89F),
|
||||
version(3.0),
|
||||
helpstring("TurboPower Abbrevia Compression Library v3.03"),
|
||||
helpfile("C:\\Abbrevia\\COM\\abrv-com.hlp"),
|
||||
helpcontext(0x00000001)
|
||||
|
||||
]
|
||||
library Abbrevia
|
||||
{
|
||||
|
||||
importlib("stdole2.tlb");
|
||||
|
||||
interface IZipItem;
|
||||
interface IGZipItem;
|
||||
interface ITarItem;
|
||||
interface IZipKit;
|
||||
dispinterface IZipKitEvents;
|
||||
coclass ZipItem;
|
||||
coclass GZipItem;
|
||||
coclass TarItem;
|
||||
coclass ZipKit;
|
||||
|
||||
|
||||
[
|
||||
uuid(6CABD61B-653C-4CEB-807C-C80E8DE8163D),
|
||||
version(3.0)
|
||||
]
|
||||
enum TArchiveAction
|
||||
{
|
||||
aaFailed = 0,
|
||||
aaNone = 1,
|
||||
aaAdd = 2,
|
||||
aaDelete = 3,
|
||||
aaFreshen = 4,
|
||||
aaMove = 5,
|
||||
aaStreamAdd = 6
|
||||
};
|
||||
|
||||
[
|
||||
uuid(148F84A1-2B70-4A63-B561-FF0EE49E74B3),
|
||||
version(3.0)
|
||||
]
|
||||
enum TArchiveStatus
|
||||
{
|
||||
asInvalid = 0,
|
||||
asIdle = 1,
|
||||
asBusy = 2
|
||||
};
|
||||
|
||||
[
|
||||
uuid(5D495174-DB09-4C59-A26D-FEBDE3EAE100),
|
||||
version(3.0)
|
||||
]
|
||||
enum TErrorClass
|
||||
{
|
||||
eclAbbrevia = 0,
|
||||
eclInOutError = 1,
|
||||
eclFileError = 2,
|
||||
eclFileCreateError = 3,
|
||||
eclFileOpenError = 4,
|
||||
eclOther = 5
|
||||
};
|
||||
|
||||
[
|
||||
uuid(6A4738B9-69F1-4717-8393-681FF21E8DB7),
|
||||
version(3.0)
|
||||
]
|
||||
enum TFileAttributes
|
||||
{
|
||||
faReadOnly = 1,
|
||||
faHidden = 2,
|
||||
faSysFile = 4,
|
||||
faVolumeID = 8,
|
||||
faDirectory = 16,
|
||||
faArchive = 32
|
||||
};
|
||||
|
||||
[
|
||||
uuid(F77BBE04-0859-4F18-9DEA-B2887C1F6AF7),
|
||||
version(3.0)
|
||||
]
|
||||
enum TProcessType
|
||||
{
|
||||
ptAdd = 0,
|
||||
ptDelete = 1,
|
||||
ptExtract = 2,
|
||||
ptFreshen = 3,
|
||||
ptMove = 4,
|
||||
ptReplace = 5
|
||||
};
|
||||
|
||||
[
|
||||
uuid(D78287A7-65FA-4391-8F5A-C7D3A11E9970),
|
||||
version(3.0)
|
||||
]
|
||||
enum TStoreOptions
|
||||
{
|
||||
soStripDrive = 1,
|
||||
soStripPath = 2,
|
||||
soRemoveDots = 4,
|
||||
soRecurse = 8,
|
||||
soFreshen = 16,
|
||||
soReplace = 32
|
||||
};
|
||||
|
||||
[
|
||||
uuid(192C6697-A38D-4F48-B32B-F33500460E62),
|
||||
version(3.0)
|
||||
]
|
||||
enum TZipCompressionMethod
|
||||
{
|
||||
cmStored = 0,
|
||||
cmShrunk = 1,
|
||||
cmReduced1 = 2,
|
||||
cmReduced2 = 3,
|
||||
cmReduced3 = 4,
|
||||
cmReduced4 = 5,
|
||||
cmImploded = 6,
|
||||
cmTokenized = 7,
|
||||
cmDeflated = 8,
|
||||
cmEnhancedDeflated = 9,
|
||||
cmDCLImploded = 10,
|
||||
cmBestMethod = 11
|
||||
};
|
||||
|
||||
[
|
||||
uuid(800F8CDC-2F0F-4020-BCBB-FEDA82D0EFEF),
|
||||
version(3.0)
|
||||
]
|
||||
enum TZipDeflateOption
|
||||
{
|
||||
doInvalid = 0,
|
||||
doNormal = 1,
|
||||
doMaximum = 2,
|
||||
doFast = 3,
|
||||
doSuperFast = 4
|
||||
};
|
||||
|
||||
[
|
||||
uuid(D697ED2A-F088-409F-962A-57D8324EEDD6),
|
||||
version(3.0)
|
||||
]
|
||||
enum TZipDictionarySize
|
||||
{
|
||||
dsInvalid = 0,
|
||||
ds4K = 1,
|
||||
ds8K = 2
|
||||
};
|
||||
|
||||
[
|
||||
uuid(B9889806-26F9-47E7-AC1F-906AA161B078),
|
||||
version(3.0)
|
||||
]
|
||||
enum TZipExtractOptions
|
||||
{
|
||||
eoCreateDirs = 0,
|
||||
eoRestorePath = 1
|
||||
};
|
||||
|
||||
[
|
||||
uuid(D40E0708-AE71-4A44-A6C8-430EDF760DE2),
|
||||
version(3.0)
|
||||
]
|
||||
enum TZipSupportMethod
|
||||
{
|
||||
smStored = 0,
|
||||
smDeflated = 1,
|
||||
smBestMethod = 2
|
||||
};
|
||||
|
||||
[
|
||||
uuid(EFD2C909-BF04-4C54-9ACB-38D872B95C9F),
|
||||
version(3.0)
|
||||
]
|
||||
enum TErrorCode
|
||||
{
|
||||
ecDuplicateName = 0,
|
||||
ecInvalidPassword = 1,
|
||||
ecNoSuchDirectory = 2,
|
||||
ecUnknownCompressionMethod = 3,
|
||||
ecUserAbort = 4,
|
||||
ecZipBadCRC = 5,
|
||||
ecZipVersionNumber = 6,
|
||||
ecSpannedItemNotFound = 7
|
||||
};
|
||||
|
||||
[
|
||||
uuid(44EB05F9-CED9-46D0-84E2-BD3362977437),
|
||||
version(3.0)
|
||||
]
|
||||
enum TArchiveType
|
||||
{
|
||||
atUnknown = 0,
|
||||
atZip = 1,
|
||||
atSelfExtZip = 2,
|
||||
atTar = 3,
|
||||
atGZip = 4,
|
||||
atGZippedTar = 5,
|
||||
atCab = 6
|
||||
};
|
||||
|
||||
[
|
||||
uuid(36568A72-3B4B-41C4-8E34-19931A8EAF63),
|
||||
version(3.0)
|
||||
]
|
||||
enum TFileSystem
|
||||
{
|
||||
fsFAT = 0,
|
||||
fsAmiga = 1,
|
||||
fsVMS = 2,
|
||||
fsUnix = 3,
|
||||
fsVM_CMS = 4,
|
||||
fsAtariTOS = 5,
|
||||
fsHPFS = 6,
|
||||
fsMacintosh = 7,
|
||||
fsZSystem = 8,
|
||||
fsCP_M = 9,
|
||||
fsTOPS20 = 10,
|
||||
fsNTFS = 11,
|
||||
fsQDOS = 12,
|
||||
fsAcornRISCOS = 13,
|
||||
fsUnknown = 14,
|
||||
fsUndefined = 15
|
||||
};
|
||||
|
||||
[
|
||||
uuid(851699A1-422A-4C65-8E08-D0499ACDD834),
|
||||
version(3.0),
|
||||
helpstring("Dispatch interface for ZipItem Object"),
|
||||
helpcontext(0x00000005),
|
||||
dual,
|
||||
oleautomation
|
||||
]
|
||||
interface IZipItem: IDispatch
|
||||
{
|
||||
[propget, id(0x00000001)]
|
||||
HRESULT _stdcall Action([out, retval] enum TArchiveAction* Value);
|
||||
[propget, id(0x00000002)]
|
||||
HRESULT _stdcall CompressedSize([out, retval] long* Value);
|
||||
[propget, id(0x00000003)]
|
||||
HRESULT _stdcall CRC32([out, retval] long* Value);
|
||||
[propget, id(0x00000004)]
|
||||
HRESULT _stdcall DiskFileName([out, retval] BSTR* Value);
|
||||
[propget, id(0x00000005)]
|
||||
HRESULT _stdcall DiskPath([out, retval] BSTR* Value);
|
||||
[propget, id(0x00000006)]
|
||||
HRESULT _stdcall ExternalFileAttributes([out, retval] enum TFileAttributes* Value);
|
||||
[propput, id(0x00000006)]
|
||||
HRESULT _stdcall ExternalFileAttributes([in] enum TFileAttributes Value);
|
||||
[propget, id(0x00000007)]
|
||||
HRESULT _stdcall FileName([out, retval] BSTR* Value);
|
||||
[propput, id(0x00000007)]
|
||||
HRESULT _stdcall FileName([in] BSTR Value);
|
||||
[propget, id(0x00000008)]
|
||||
HRESULT _stdcall IsEncrypted([out, retval] VARIANT_BOOL* Value);
|
||||
[propget, id(0x00000009)]
|
||||
HRESULT _stdcall LastModFileDateTime([out, retval] DATE* Value);
|
||||
[propget, id(0x0000000A)]
|
||||
HRESULT _stdcall StoredPath([out, retval] BSTR* Value);
|
||||
[propget, id(0x0000000B)]
|
||||
HRESULT _stdcall Tagged([out, retval] VARIANT_BOOL* Value);
|
||||
[propput, id(0x0000000B)]
|
||||
HRESULT _stdcall Tagged([in] VARIANT_BOOL Value);
|
||||
[propget, id(0x0000000C)]
|
||||
HRESULT _stdcall UnCompressedSize([out, retval] long* Value);
|
||||
[propget, id(0x0000000D)]
|
||||
HRESULT _stdcall CRC32St([out, retval] BSTR* Value);
|
||||
[propget, id(0x0000000E)]
|
||||
HRESULT _stdcall Password([out, retval] BSTR* Value);
|
||||
[propput, id(0x0000000E)]
|
||||
HRESULT _stdcall Password([in] BSTR Value);
|
||||
[propget, id(0x0000000F)]
|
||||
HRESULT _stdcall CompressionMethod([out, retval] enum TZipCompressionMethod* Value);
|
||||
[propget, id(0x00000010)]
|
||||
HRESULT _stdcall CompressionRatio([out, retval] double* Value);
|
||||
[propget, id(0x00000011)]
|
||||
HRESULT _stdcall DeflateOption([out, retval] enum TZipDeflateOption* Value);
|
||||
[propget, id(0x00000012)]
|
||||
HRESULT _stdcall DictionarySize([out, retval] enum TZipDictionarySize* Value);
|
||||
[propget, id(0x00000013)]
|
||||
HRESULT _stdcall DiskNumberStart([out, retval] long* Value);
|
||||
[propget, id(0x00000014)]
|
||||
HRESULT _stdcall ExtraField([out, retval] BSTR* Value);
|
||||
[propput, id(0x00000014)]
|
||||
HRESULT _stdcall ExtraField([in] BSTR Value);
|
||||
[propget, id(0x00000015)]
|
||||
HRESULT _stdcall FileComment([out, retval] BSTR* Value);
|
||||
[propput, id(0x00000015)]
|
||||
HRESULT _stdcall FileComment([in] BSTR Value);
|
||||
[propget, id(0x00000016)]
|
||||
HRESULT _stdcall InternalFileAttributes([out, retval] long* Value);
|
||||
[propput, id(0x00000016)]
|
||||
HRESULT _stdcall InternalFileAttributes([in] long Value);
|
||||
[propget, id(0x00000017)]
|
||||
HRESULT _stdcall VersionMadeBy([out, retval] long* Value);
|
||||
[propget, id(0x00000018)]
|
||||
HRESULT _stdcall VersionNeededToExtract([out, retval] long* Value);
|
||||
};
|
||||
|
||||
[
|
||||
uuid(8FA78CE0-FD29-441E-9777-93B63EF1A9EE),
|
||||
version(3.0),
|
||||
dual,
|
||||
oleautomation
|
||||
]
|
||||
interface IGZipItem: IDispatch
|
||||
{
|
||||
[propget, id(0x00000001)]
|
||||
HRESULT _stdcall Action([out, retval] enum TArchiveAction* Value);
|
||||
[propget, id(0x00000002)]
|
||||
HRESULT _stdcall CompressedSize([out, retval] long* Value);
|
||||
[propget, id(0x00000003)]
|
||||
HRESULT _stdcall CRC32([out, retval] long* Value);
|
||||
[propget, id(0x00000004)]
|
||||
HRESULT _stdcall DiskFileName([out, retval] BSTR* Value);
|
||||
[propget, id(0x00000005)]
|
||||
HRESULT _stdcall DiskPath([out, retval] BSTR* Value);
|
||||
[propget, id(0x00000006)]
|
||||
HRESULT _stdcall ExternalFileAttributes([out, retval] enum TFileAttributes* Value);
|
||||
[propput, id(0x00000006)]
|
||||
HRESULT _stdcall ExternalFileAttributes([in] enum TFileAttributes Value);
|
||||
[propget, id(0x00000007)]
|
||||
HRESULT _stdcall FileName([out, retval] BSTR* Value);
|
||||
[propput, id(0x00000007)]
|
||||
HRESULT _stdcall FileName([in] BSTR Value);
|
||||
[propget, id(0x00000008)]
|
||||
HRESULT _stdcall IsEncrypted([out, retval] VARIANT_BOOL* Value);
|
||||
[propget, id(0x00000009)]
|
||||
HRESULT _stdcall LastModFileDateTime([out, retval] DATE* Value);
|
||||
[propget, id(0x0000000A)]
|
||||
HRESULT _stdcall StoredPath([out, retval] BSTR* Value);
|
||||
[propget, id(0x0000000B)]
|
||||
HRESULT _stdcall Tagged([out, retval] VARIANT_BOOL* Value);
|
||||
[propput, id(0x0000000B)]
|
||||
HRESULT _stdcall Tagged([in] VARIANT_BOOL Value);
|
||||
[propget, id(0x0000000C)]
|
||||
HRESULT _stdcall UnCompressedSize([out, retval] long* Value);
|
||||
[propget, id(0x0000000D)]
|
||||
HRESULT _stdcall CRC32St([out, retval] BSTR* Value);
|
||||
[propget, id(0x0000000E)]
|
||||
HRESULT _stdcall Password([out, retval] BSTR* Value);
|
||||
[propput, id(0x0000000E)]
|
||||
HRESULT _stdcall Password([in] BSTR Value);
|
||||
[propget, id(0x0000000F)]
|
||||
HRESULT _stdcall CompressionMethod([out, retval] unsigned char* Value);
|
||||
[propput, id(0x0000000F)]
|
||||
HRESULT _stdcall CompressionMethod([in] unsigned char Value);
|
||||
[propget, id(0x00000010)]
|
||||
HRESULT _stdcall ExtraField([out, retval] BSTR* Value);
|
||||
[propput, id(0x00000010)]
|
||||
HRESULT _stdcall ExtraField([in] BSTR Value);
|
||||
[propget, id(0x00000011)]
|
||||
HRESULT _stdcall ExtraFlags([out, retval] unsigned char* Value);
|
||||
[propput, id(0x00000011)]
|
||||
HRESULT _stdcall ExtraFlags([in] unsigned char Value);
|
||||
[propget, id(0x00000012)]
|
||||
HRESULT _stdcall FileComment([out, retval] BSTR* Value);
|
||||
[propput, id(0x00000012)]
|
||||
HRESULT _stdcall FileComment([in] BSTR Value);
|
||||
[propget, id(0x00000013)]
|
||||
HRESULT _stdcall FileSystem([out, retval] enum TFileSystem* Value);
|
||||
[propput, id(0x00000013)]
|
||||
HRESULT _stdcall FileSystem([in] enum TFileSystem Value);
|
||||
[propget, id(0x00000014)]
|
||||
HRESULT _stdcall Flags([out, retval] unsigned char* Value);
|
||||
[propput, id(0x00000014)]
|
||||
HRESULT _stdcall Flags([in] unsigned char Value);
|
||||
[propget, id(0x00000015)]
|
||||
HRESULT _stdcall HeaderCRC([out, retval] long* Value);
|
||||
};
|
||||
|
||||
[
|
||||
uuid(729E9F52-C489-4A41-A770-4E2C5282AE39),
|
||||
version(3.0),
|
||||
dual,
|
||||
oleautomation
|
||||
]
|
||||
interface ITarItem: IDispatch
|
||||
{
|
||||
[propget, id(0x00000001)]
|
||||
HRESULT _stdcall Action([out, retval] enum TArchiveAction* Value);
|
||||
[propget, id(0x00000002)]
|
||||
HRESULT _stdcall CompressedSize([out, retval] long* Value);
|
||||
[propget, id(0x00000003)]
|
||||
HRESULT _stdcall CRC32([out, retval] long* Value);
|
||||
[propget, id(0x00000004)]
|
||||
HRESULT _stdcall DiskFileName([out, retval] BSTR* Value);
|
||||
[propget, id(0x00000005)]
|
||||
HRESULT _stdcall DiskPath([out, retval] BSTR* Value);
|
||||
[propget, id(0x00000006)]
|
||||
HRESULT _stdcall ExternalFileAttributes([out, retval] enum TFileAttributes* Value);
|
||||
[propput, id(0x00000006)]
|
||||
HRESULT _stdcall ExternalFileAttributes([in] enum TFileAttributes Value);
|
||||
[propget, id(0x00000007)]
|
||||
HRESULT _stdcall FileName([out, retval] BSTR* Value);
|
||||
[propput, id(0x00000007)]
|
||||
HRESULT _stdcall FileName([in] BSTR Value);
|
||||
[propget, id(0x00000008)]
|
||||
HRESULT _stdcall IsEncrypted([out, retval] VARIANT_BOOL* Value);
|
||||
[propget, id(0x00000009)]
|
||||
HRESULT _stdcall LastModFileDateTime([out, retval] DATE* Value);
|
||||
[propget, id(0x0000000A)]
|
||||
HRESULT _stdcall StoredPath([out, retval] BSTR* Value);
|
||||
[propget, id(0x0000000B)]
|
||||
HRESULT _stdcall Tagged([out, retval] VARIANT_BOOL* Value);
|
||||
[propput, id(0x0000000B)]
|
||||
HRESULT _stdcall Tagged([in] VARIANT_BOOL Value);
|
||||
[propget, id(0x0000000C)]
|
||||
HRESULT _stdcall UnCompressedSize([out, retval] long* Value);
|
||||
[propget, id(0x0000000D)]
|
||||
HRESULT _stdcall CRC32St([out, retval] BSTR* Value);
|
||||
[propget, id(0x0000000E)]
|
||||
HRESULT _stdcall Password([out, retval] BSTR* Value);
|
||||
[propput, id(0x0000000E)]
|
||||
HRESULT _stdcall Password([in] BSTR Value);
|
||||
[propget, id(0x0000000F)]
|
||||
HRESULT _stdcall DevMajor([out, retval] long* Value);
|
||||
[propput, id(0x0000000F)]
|
||||
HRESULT _stdcall DevMajor([in] long Value);
|
||||
[propget, id(0x00000010)]
|
||||
HRESULT _stdcall DevMinor([out, retval] long* Value);
|
||||
[propput, id(0x00000010)]
|
||||
HRESULT _stdcall DevMinor([in] long Value);
|
||||
[propget, id(0x00000011)]
|
||||
HRESULT _stdcall GroupID([out, retval] long* Value);
|
||||
[propput, id(0x00000011)]
|
||||
HRESULT _stdcall GroupID([in] long Value);
|
||||
[propget, id(0x00000012)]
|
||||
HRESULT _stdcall GroupName([out, retval] BSTR* Value);
|
||||
[propput, id(0x00000012)]
|
||||
HRESULT _stdcall GroupName([in] BSTR Value);
|
||||
[propget, id(0x00000013)]
|
||||
HRESULT _stdcall LinkFlag([out, retval] unsigned char* Value);
|
||||
[propput, id(0x00000013)]
|
||||
HRESULT _stdcall LinkFlag([in] unsigned char Value);
|
||||
[propget, id(0x00000014)]
|
||||
HRESULT _stdcall LinkName([out, retval] BSTR* Value);
|
||||
[propput, id(0x00000014)]
|
||||
HRESULT _stdcall LinkName([in] BSTR Value);
|
||||
[propget, id(0x00000015)]
|
||||
HRESULT _stdcall Mode([out, retval] long* Value);
|
||||
[propput, id(0x00000015)]
|
||||
HRESULT _stdcall Mode([in] long Value);
|
||||
[propget, id(0x00000016)]
|
||||
HRESULT _stdcall UserID([out, retval] long* Value);
|
||||
[propput, id(0x00000016)]
|
||||
HRESULT _stdcall UserID([in] long Value);
|
||||
[propget, id(0x00000017)]
|
||||
HRESULT _stdcall UserName([out, retval] BSTR* Value);
|
||||
[propput, id(0x00000017)]
|
||||
HRESULT _stdcall UserName([in] BSTR Value);
|
||||
};
|
||||
|
||||
[
|
||||
uuid(B7480A7F-4E27-4B45-9FE6-224B60295A0C),
|
||||
version(3.0),
|
||||
helpstring("Dispatch interface for ZipKit Object"),
|
||||
helpcontext(0x00000006),
|
||||
dual,
|
||||
oleautomation
|
||||
]
|
||||
interface IZipKit: IDispatch
|
||||
{
|
||||
[id(0x00000001)]
|
||||
HRESULT _stdcall Add([in] BSTR FileMask, [in] BSTR ExclusionMask, [in] long SearchAttr);
|
||||
[id(0x00000007)]
|
||||
HRESULT _stdcall AddFromStream([in] BSTR FileName, [in] VARIANT Stream);
|
||||
[propget, id(0x00000003)]
|
||||
HRESULT _stdcall AutoSave([out, retval] VARIANT_BOOL* Value);
|
||||
[propput, id(0x00000003)]
|
||||
HRESULT _stdcall AutoSave([in] VARIANT_BOOL Value);
|
||||
[propget, id(0x00000004)]
|
||||
HRESULT _stdcall BaseDirectory([out, retval] BSTR* Value);
|
||||
[propput, id(0x00000004)]
|
||||
HRESULT _stdcall BaseDirectory([in] BSTR Value);
|
||||
[id(0x00000005)]
|
||||
HRESULT _stdcall ClearTags(void);
|
||||
[propget, id(0x00000006)]
|
||||
HRESULT _stdcall CompressionMethodToUse([out, retval] enum TZipSupportMethod* Value);
|
||||
[propput, id(0x00000006)]
|
||||
HRESULT _stdcall CompressionMethodToUse([in] enum TZipSupportMethod Value);
|
||||
[propget, id(0x00000002)]
|
||||
HRESULT _stdcall Count([out, retval] long* Value);
|
||||
[propget, id(0x00000008)]
|
||||
HRESULT _stdcall DeflateOption([out, retval] enum TZipDeflateOption* Value);
|
||||
[propput, id(0x00000008)]
|
||||
HRESULT _stdcall DeflateOption([in] enum TZipDeflateOption Value);
|
||||
[id(0x00000009)]
|
||||
HRESULT _stdcall Delete([in] BSTR FileMask, [in] BSTR ExclusionMask);
|
||||
[id(0x0000000A)]
|
||||
HRESULT _stdcall DeleteAt([in] long Index);
|
||||
[id(0x0000000B)]
|
||||
HRESULT _stdcall DeleteTaggedItems(void);
|
||||
[propget, id(0x0000000C)]
|
||||
HRESULT _stdcall DOSMode([out, retval] VARIANT_BOOL* Value);
|
||||
[propput, id(0x0000000C)]
|
||||
HRESULT _stdcall DOSMode([in] VARIANT_BOOL Value);
|
||||
[id(0x0000000D)]
|
||||
HRESULT _stdcall Extract([in] BSTR FileMask, [in] BSTR ExclusionMask);
|
||||
[id(0x0000000E)]
|
||||
HRESULT _stdcall ExtractAt([in] long Index, [in] BSTR NewName);
|
||||
[propget, id(0x0000000F)]
|
||||
HRESULT _stdcall ExtractOptions([out, retval] enum TZipExtractOptions* Value);
|
||||
[propput, id(0x0000000F)]
|
||||
HRESULT _stdcall ExtractOptions([in] enum TZipExtractOptions Value);
|
||||
[id(0x00000010)]
|
||||
HRESULT _stdcall ExtractTaggedItems(void);
|
||||
[propget, id(0x00000011)]
|
||||
HRESULT _stdcall FileName([out, retval] BSTR* Value);
|
||||
[propput, id(0x00000011)]
|
||||
HRESULT _stdcall FileName([in] BSTR Value);
|
||||
[id(0x00000012)]
|
||||
HRESULT _stdcall Find([in] BSTR FileName, [out, retval] long* Value);
|
||||
[id(0x00000013)]
|
||||
HRESULT _stdcall Freshen([in] BSTR FileMask, [in] BSTR ExclusionMask);
|
||||
[id(0x00000014)]
|
||||
HRESULT _stdcall FreshenTaggedItems(void);
|
||||
[propget, id(0x00000000)]
|
||||
HRESULT _stdcall Item([in] long Index, [out, retval] IDispatch** Value);
|
||||
[propget, id(0x00000017)]
|
||||
HRESULT _stdcall LogFile([out, retval] BSTR* Value);
|
||||
[propput, id(0x00000017)]
|
||||
HRESULT _stdcall LogFile([in] BSTR Value);
|
||||
[propget, id(0x00000018)]
|
||||
HRESULT _stdcall Logging([out, retval] VARIANT_BOOL* Value);
|
||||
[propput, id(0x00000018)]
|
||||
HRESULT _stdcall Logging([in] VARIANT_BOOL Value);
|
||||
[propget, id(0x00000019)]
|
||||
HRESULT _stdcall Password([out, retval] BSTR* Value);
|
||||
[propput, id(0x00000019)]
|
||||
HRESULT _stdcall Password([in] BSTR Value);
|
||||
[propget, id(0x0000001A)]
|
||||
HRESULT _stdcall PasswordRetries([out, retval] unsigned char* Value);
|
||||
[propput, id(0x0000001A)]
|
||||
HRESULT _stdcall PasswordRetries([in] unsigned char Value);
|
||||
[id(0x0000001B)]
|
||||
HRESULT _stdcall Replace([in] BSTR FileMask);
|
||||
[id(0x0000001C)]
|
||||
HRESULT _stdcall Save(void);
|
||||
[propget, id(0x0000001D)]
|
||||
HRESULT _stdcall Spanned([out, retval] VARIANT_BOOL* Value);
|
||||
[propget, id(0x0000001E)]
|
||||
HRESULT _stdcall SpanningThreshold([out, retval] long* Value);
|
||||
[propput, id(0x0000001E)]
|
||||
HRESULT _stdcall SpanningThreshold([in] long Value);
|
||||
[propget, id(0x0000001F)]
|
||||
HRESULT _stdcall Status([out, retval] enum TArchiveStatus* Value);
|
||||
[propget, id(0x00000020)]
|
||||
HRESULT _stdcall StoreOptions([out, retval] enum TStoreOptions* Value);
|
||||
[propput, id(0x00000020)]
|
||||
HRESULT _stdcall StoreOptions([in] enum TStoreOptions Value);
|
||||
[id(0x00000021)]
|
||||
HRESULT _stdcall TagItems([in] BSTR FileMask);
|
||||
[propget, id(0x00000022)]
|
||||
HRESULT _stdcall TempDirectory([out, retval] BSTR* Value);
|
||||
[propput, id(0x00000022)]
|
||||
HRESULT _stdcall TempDirectory([in] BSTR Value);
|
||||
[id(0x00000023)]
|
||||
HRESULT _stdcall TestTaggedItems(void);
|
||||
[id(0x00000024)]
|
||||
HRESULT _stdcall UntagItems([in] BSTR FileMask);
|
||||
[propget, id(0x00000025)]
|
||||
HRESULT _stdcall ZipFileComment([out, retval] BSTR* Value);
|
||||
[propput, id(0x00000025)]
|
||||
HRESULT _stdcall ZipFileComment([in] BSTR Value);
|
||||
[id(0x00000026)]
|
||||
HRESULT _stdcall License([in] BSTR Key, [out, retval] VARIANT_BOOL* Value);
|
||||
[propget, id(0xFFFFFFFC), restricted, hidden]
|
||||
HRESULT _stdcall _NewEnum([out, retval] IUnknown** Value);
|
||||
[id(0x00000015)]
|
||||
HRESULT _stdcall ExtractToStream([in] BSTR FileName, [out, retval] VARIANT* Value);
|
||||
[propget, id(0x00000028)]
|
||||
HRESULT _stdcall CompressionType([out, retval] enum TArchiveType* Value);
|
||||
[propput, id(0x00000028)]
|
||||
HRESULT _stdcall CompressionType([in] enum TArchiveType Value);
|
||||
[propget, id(0x00000029)]
|
||||
HRESULT _stdcall TarAutoHandle([out, retval] VARIANT_BOOL* Value);
|
||||
[propput, id(0x00000029)]
|
||||
HRESULT _stdcall TarAutoHandle([in] VARIANT_BOOL Value);
|
||||
};
|
||||
|
||||
[
|
||||
uuid(F094D5F4-3A52-45AE-9D86-4409611DD29E),
|
||||
version(3.0),
|
||||
helpstring("Events interface for ZipKit Object")
|
||||
]
|
||||
dispinterface IZipKitEvents
|
||||
{
|
||||
properties:
|
||||
methods:
|
||||
[id(0x00000001)]
|
||||
void OnArchiveItemProgress([in] IDispatch* Item, [in] unsigned char Progress, [in, out] VARIANT_BOOL* Abort);
|
||||
[id(0x00000002)]
|
||||
void OnArchiveProgress([in] unsigned char Progress, [in, out] VARIANT_BOOL* Abort);
|
||||
[id(0x00000003)]
|
||||
void OnChange(void);
|
||||
[id(0x00000004)]
|
||||
void OnConfirmOverwrite([in, out] BSTR* Name, [in, out] VARIANT_BOOL* Confirm);
|
||||
[id(0x00000005)]
|
||||
void OnConfirmProcessItem([in] IDispatch* Item, [in] enum TProcessType ProcessType, [in, out] VARIANT_BOOL* Confirm);
|
||||
[id(0x00000006)]
|
||||
void OnConfirmSave([in, out] VARIANT_BOOL* Confirm);
|
||||
[id(0x00000007)]
|
||||
void OnLoad(void);
|
||||
[id(0x00000008)]
|
||||
void OnNeedPassword([in, out] BSTR* NewPassword);
|
||||
[id(0x00000009)]
|
||||
void OnProcessItemFailure([in] IDispatch* Item, [in] enum TProcessType ProcessType, [in] enum TErrorClass ErrorClass, [in] enum TErrorCode ErrorCode, [in] BSTR ErrorString);
|
||||
[id(0x0000000A)]
|
||||
void OnRequestBlankDisk([in, out] VARIANT_BOOL* Abort);
|
||||
[id(0x0000000B)]
|
||||
void OnRequestImage([in] long ImageNumber, [in, out] BSTR* ImageName, [in, out] VARIANT_BOOL* Abort);
|
||||
[id(0x0000000C)]
|
||||
void OnRequestLastDisk([in, out] VARIANT_BOOL* Abort);
|
||||
[id(0x0000000D)]
|
||||
void OnRequestNthDisk([in] long DiskNumber, [in, out] VARIANT_BOOL* Abort);
|
||||
[id(0x0000000E)]
|
||||
void OnSave(void);
|
||||
};
|
||||
|
||||
[
|
||||
uuid(650989D8-F0FF-4C71-83C3-92556F4329F5),
|
||||
version(3.0)
|
||||
]
|
||||
coclass ZipItem
|
||||
{
|
||||
[default] interface IZipItem;
|
||||
};
|
||||
|
||||
[
|
||||
uuid(2B35BB50-D9C7-4669-B18E-943B5199FD8E),
|
||||
version(3.0)
|
||||
]
|
||||
coclass GZipItem
|
||||
{
|
||||
[default] interface IGZipItem;
|
||||
};
|
||||
|
||||
[
|
||||
uuid(2DF3E624-0E6C-42CF-8041-676B9A06375E),
|
||||
version(3.0)
|
||||
]
|
||||
coclass TarItem
|
||||
{
|
||||
[default] interface ITarItem;
|
||||
};
|
||||
|
||||
[
|
||||
uuid(730B4B32-9127-492A-BF02-196A7E6B4E1B),
|
||||
version(3.0),
|
||||
helpstring("ZipKit Object"),
|
||||
helpcontext(0x00000006)
|
||||
]
|
||||
coclass ZipKit
|
||||
{
|
||||
[default] interface IZipKit;
|
||||
[default, source] dispinterface IZipKitEvents;
|
||||
};
|
||||
|
||||
};
|
BIN
Abbrevia/source/COM/Abbrevia.tlb
Normal file
BIN
Abbrevia/source/COM/Abbrevia.tlb
Normal file
Binary file not shown.
817
Abbrevia/source/COM/Abbrevia_TLB.pas
generated
Normal file
817
Abbrevia/source/COM/Abbrevia_TLB.pas
generated
Normal file
@@ -0,0 +1,817 @@
|
||||
(* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is TurboPower Abbrevia
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* TurboPower Software
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** *)
|
||||
|
||||
unit Abbrevia_TLB;
|
||||
|
||||
// ************************************************************************ //
|
||||
// WARNING
|
||||
// -------
|
||||
// The types declared in this file were generated from data read from a
|
||||
// Type Library. If this type library is explicitly or indirectly (via
|
||||
// another type library referring to this type library) re-imported, or the
|
||||
// 'Refresh' command of the Type Library Editor activated while editing the
|
||||
// Type Library, the contents of this file will be regenerated and all
|
||||
// manual modifications will be lost.
|
||||
// ************************************************************************ //
|
||||
|
||||
// $Rev: 491 $
|
||||
// File generated on 7/23/2009 9:45:45 PM from Type Library described below.
|
||||
|
||||
// ************************************************************************ //
|
||||
// Type Lib: C:\Abbrevia\COM\abbrevia.dll
|
||||
// LIBID: {AF804E20-4043-499E-BB14-237B9F26F89F}
|
||||
// LCID: 0
|
||||
// Helpfile: C:\Abbrevia\COM\abrv-com.hlp
|
||||
// HelpString: TurboPower Abbrevia Compression Library v3.03
|
||||
// DepndLst:
|
||||
// (1) v2.0 stdole, (C:\WINDOWS\System32\stdole2.tlb)
|
||||
// ************************************************************************ //
|
||||
{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers.
|
||||
{$WARN SYMBOL_PLATFORM OFF}
|
||||
{$WRITEABLECONST ON}
|
||||
{$VARPROPSETTER ON}
|
||||
interface
|
||||
|
||||
uses Windows, ActiveX, Classes, Graphics, StdVCL, Variants;
|
||||
|
||||
|
||||
// *********************************************************************//
|
||||
// GUIDS declared in the TypeLibrary. Following prefixes are used:
|
||||
// Type Libraries : LIBID_xxxx
|
||||
// CoClasses : CLASS_xxxx
|
||||
// DISPInterfaces : DIID_xxxx
|
||||
// Non-DISP interfaces: IID_xxxx
|
||||
// *********************************************************************//
|
||||
const
|
||||
// TypeLibrary Major and minor versions
|
||||
AbbreviaMajorVersion = 5;
|
||||
AbbreviaMinorVersion = 0;
|
||||
|
||||
LIBID_Abbrevia: TGUID = '{AF804E20-4043-499E-BB14-237B9F26F89F}';
|
||||
|
||||
IID_IZipItem: TGUID = '{851699A1-422A-4C65-8E08-D0499ACDD834}';
|
||||
IID_IGZipItem: TGUID = '{8FA78CE0-FD29-441E-9777-93B63EF1A9EE}';
|
||||
IID_ITarItem: TGUID = '{729E9F52-C489-4A41-A770-4E2C5282AE39}';
|
||||
IID_IZipKit: TGUID = '{B7480A7F-4E27-4B45-9FE6-224B60295A0C}';
|
||||
DIID_IZipKitEvents: TGUID = '{F094D5F4-3A52-45AE-9D86-4409611DD29E}';
|
||||
CLASS_ZipItem: TGUID = '{650989D8-F0FF-4C71-83C3-92556F4329F5}';
|
||||
CLASS_GZipItem: TGUID = '{2B35BB50-D9C7-4669-B18E-943B5199FD8E}';
|
||||
CLASS_TarItem: TGUID = '{2DF3E624-0E6C-42CF-8041-676B9A06375E}';
|
||||
CLASS_ZipKit: TGUID = '{730B4B32-9127-492A-BF02-196A7E6B4E1B}';
|
||||
|
||||
// *********************************************************************//
|
||||
// Declaration of Enumerations defined in Type Library
|
||||
// *********************************************************************//
|
||||
// Constants for enum TArchiveAction
|
||||
type
|
||||
TArchiveAction = TOleEnum;
|
||||
const
|
||||
aaFailed = $00000000;
|
||||
aaNone = $00000001;
|
||||
aaAdd = $00000002;
|
||||
aaDelete = $00000003;
|
||||
aaFreshen = $00000004;
|
||||
aaMove = $00000005;
|
||||
aaStreamAdd = $00000006;
|
||||
|
||||
// Constants for enum TArchiveStatus
|
||||
type
|
||||
TArchiveStatus = TOleEnum;
|
||||
const
|
||||
asInvalid = $00000000;
|
||||
asIdle = $00000001;
|
||||
asBusy = $00000002;
|
||||
|
||||
// Constants for enum TErrorClass
|
||||
type
|
||||
TErrorClass = TOleEnum;
|
||||
const
|
||||
eclAbbrevia = $00000000;
|
||||
eclInOutError = $00000001;
|
||||
eclFileError = $00000002;
|
||||
eclFileCreateError = $00000003;
|
||||
eclFileOpenError = $00000004;
|
||||
eclOther = $00000005;
|
||||
|
||||
// Constants for enum TFileAttributes
|
||||
type
|
||||
TFileAttributes = TOleEnum;
|
||||
const
|
||||
faReadOnly = $00000001;
|
||||
faHidden = $00000002;
|
||||
faSysFile = $00000004;
|
||||
faVolumeID = $00000008;
|
||||
faDirectory = $00000010;
|
||||
faArchive = $00000020;
|
||||
|
||||
// Constants for enum TProcessType
|
||||
type
|
||||
TProcessType = TOleEnum;
|
||||
const
|
||||
ptAdd = $00000000;
|
||||
ptDelete = $00000001;
|
||||
ptExtract = $00000002;
|
||||
ptFreshen = $00000003;
|
||||
ptMove = $00000004;
|
||||
ptReplace = $00000005;
|
||||
|
||||
// Constants for enum TStoreOptions
|
||||
type
|
||||
TStoreOptions = TOleEnum;
|
||||
const
|
||||
soStripDrive = $00000001;
|
||||
soStripPath = $00000002;
|
||||
soRemoveDots = $00000004;
|
||||
soRecurse = $00000008;
|
||||
soFreshen = $00000010;
|
||||
soReplace = $00000020;
|
||||
|
||||
// Constants for enum TZipCompressionMethod
|
||||
type
|
||||
TZipCompressionMethod = TOleEnum;
|
||||
const
|
||||
cmStored = $00000000;
|
||||
cmShrunk = $00000001;
|
||||
cmReduced1 = $00000002;
|
||||
cmReduced2 = $00000003;
|
||||
cmReduced3 = $00000004;
|
||||
cmReduced4 = $00000005;
|
||||
cmImploded = $00000006;
|
||||
cmTokenized = $00000007;
|
||||
cmDeflated = $00000008;
|
||||
cmEnhancedDeflated = $00000009;
|
||||
cmDCLImploded = $0000000A;
|
||||
cmBestMethod = $0000000B;
|
||||
|
||||
// Constants for enum TZipDeflateOption
|
||||
type
|
||||
TZipDeflateOption = TOleEnum;
|
||||
const
|
||||
doInvalid = $00000000;
|
||||
doNormal = $00000001;
|
||||
doMaximum = $00000002;
|
||||
doFast = $00000003;
|
||||
doSuperFast = $00000004;
|
||||
|
||||
// Constants for enum TZipDictionarySize
|
||||
type
|
||||
TZipDictionarySize = TOleEnum;
|
||||
const
|
||||
dsInvalid = $00000000;
|
||||
ds4K = $00000001;
|
||||
ds8K = $00000002;
|
||||
|
||||
// Constants for enum TZipExtractOptions
|
||||
type
|
||||
TZipExtractOptions = TOleEnum;
|
||||
const
|
||||
eoCreateDirs = $00000000;
|
||||
eoRestorePath = $00000001;
|
||||
|
||||
// Constants for enum TZipSupportMethod
|
||||
type
|
||||
TZipSupportMethod = TOleEnum;
|
||||
const
|
||||
smStored = $00000000;
|
||||
smDeflated = $00000001;
|
||||
smBestMethod = $00000002;
|
||||
|
||||
// Constants for enum TErrorCode
|
||||
type
|
||||
TErrorCode = TOleEnum;
|
||||
const
|
||||
ecDuplicateName = $00000000;
|
||||
ecInvalidPassword = $00000001;
|
||||
ecNoSuchDirectory = $00000002;
|
||||
ecUnknownCompressionMethod = $00000003;
|
||||
ecUserAbort = $00000004;
|
||||
ecZipBadCRC = $00000005;
|
||||
ecZipVersionNumber = $00000006;
|
||||
ecSpannedItemNotFound = $00000007;
|
||||
|
||||
// Constants for enum TArchiveType
|
||||
type
|
||||
TArchiveType = TOleEnum;
|
||||
const
|
||||
atUnknown = $00000000;
|
||||
atZip = $00000001;
|
||||
atSelfExtZip = $00000002;
|
||||
atTar = $00000003;
|
||||
atGZip = $00000004;
|
||||
atGZippedTar = $00000005;
|
||||
atCab = $00000006;
|
||||
|
||||
// Constants for enum TFileSystem
|
||||
type
|
||||
TFileSystem = TOleEnum;
|
||||
const
|
||||
fsFAT = $00000000;
|
||||
fsAmiga = $00000001;
|
||||
fsVMS = $00000002;
|
||||
fsUnix = $00000003;
|
||||
fsVM_CMS = $00000004;
|
||||
fsAtariTOS = $00000005;
|
||||
fsHPFS = $00000006;
|
||||
fsMacintosh = $00000007;
|
||||
fsZSystem = $00000008;
|
||||
fsCP_M = $00000009;
|
||||
fsTOPS20 = $0000000A;
|
||||
fsNTFS = $0000000B;
|
||||
fsQDOS = $0000000C;
|
||||
fsAcornRISCOS = $0000000D;
|
||||
fsUnknown = $0000000E;
|
||||
fsUndefined = $0000000F;
|
||||
|
||||
type
|
||||
|
||||
// *********************************************************************//
|
||||
// Forward declaration of types defined in TypeLibrary
|
||||
// *********************************************************************//
|
||||
IZipItem = interface;
|
||||
IZipItemDisp = dispinterface;
|
||||
IGZipItem = interface;
|
||||
IGZipItemDisp = dispinterface;
|
||||
ITarItem = interface;
|
||||
ITarItemDisp = dispinterface;
|
||||
IZipKit = interface;
|
||||
IZipKitDisp = dispinterface;
|
||||
IZipKitEvents = dispinterface;
|
||||
|
||||
// *********************************************************************//
|
||||
// Declaration of CoClasses defined in Type Library
|
||||
// (NOTE: Here we map each CoClass to its Default Interface)
|
||||
// *********************************************************************//
|
||||
ZipItem = IZipItem;
|
||||
GZipItem = IGZipItem;
|
||||
TarItem = ITarItem;
|
||||
ZipKit = IZipKit;
|
||||
|
||||
|
||||
// *********************************************************************//
|
||||
// Interface: IZipItem
|
||||
// Flags: (4416) Dual OleAutomation Dispatchable
|
||||
// GUID: {851699A1-422A-4C65-8E08-D0499ACDD834}
|
||||
// *********************************************************************//
|
||||
IZipItem = interface(IDispatch)
|
||||
['{851699A1-422A-4C65-8E08-D0499ACDD834}']
|
||||
function Get_Action: TArchiveAction; safecall;
|
||||
function Get_CompressedSize: Integer; safecall;
|
||||
function Get_CRC32: Integer; safecall;
|
||||
function Get_DiskFileName: WideString; safecall;
|
||||
function Get_DiskPath: WideString; safecall;
|
||||
function Get_ExternalFileAttributes: TFileAttributes; safecall;
|
||||
procedure Set_ExternalFileAttributes(Value: TFileAttributes); safecall;
|
||||
function Get_FileName: WideString; safecall;
|
||||
procedure Set_FileName(const Value: WideString); safecall;
|
||||
function Get_IsEncrypted: WordBool; safecall;
|
||||
function Get_LastModFileDateTime: TDateTime; safecall;
|
||||
function Get_StoredPath: WideString; safecall;
|
||||
function Get_Tagged: WordBool; safecall;
|
||||
procedure Set_Tagged(Value: WordBool); safecall;
|
||||
function Get_UnCompressedSize: Integer; safecall;
|
||||
function Get_CRC32St: WideString; safecall;
|
||||
function Get_Password: WideString; safecall;
|
||||
procedure Set_Password(const Value: WideString); safecall;
|
||||
function Get_CompressionMethod: TZipCompressionMethod; safecall;
|
||||
function Get_CompressionRatio: Double; safecall;
|
||||
function Get_DeflateOption: TZipDeflateOption; safecall;
|
||||
function Get_DictionarySize: TZipDictionarySize; safecall;
|
||||
function Get_DiskNumberStart: Integer; safecall;
|
||||
function Get_ExtraField: WideString; safecall;
|
||||
procedure Set_ExtraField(const Value: WideString); safecall;
|
||||
function Get_FileComment: WideString; safecall;
|
||||
procedure Set_FileComment(const Value: WideString); safecall;
|
||||
function Get_InternalFileAttributes: Integer; safecall;
|
||||
procedure Set_InternalFileAttributes(Value: Integer); safecall;
|
||||
function Get_VersionMadeBy: Integer; safecall;
|
||||
function Get_VersionNeededToExtract: Integer; safecall;
|
||||
property Action: TArchiveAction read Get_Action;
|
||||
property CompressedSize: Integer read Get_CompressedSize;
|
||||
property CRC32: Integer read Get_CRC32;
|
||||
property DiskFileName: WideString read Get_DiskFileName;
|
||||
property DiskPath: WideString read Get_DiskPath;
|
||||
property ExternalFileAttributes: TFileAttributes read Get_ExternalFileAttributes write Set_ExternalFileAttributes;
|
||||
property FileName: WideString read Get_FileName write Set_FileName;
|
||||
property IsEncrypted: WordBool read Get_IsEncrypted;
|
||||
property LastModFileDateTime: TDateTime read Get_LastModFileDateTime;
|
||||
property StoredPath: WideString read Get_StoredPath;
|
||||
property Tagged: WordBool read Get_Tagged write Set_Tagged;
|
||||
property UnCompressedSize: Integer read Get_UnCompressedSize;
|
||||
property CRC32St: WideString read Get_CRC32St;
|
||||
property Password: WideString read Get_Password write Set_Password;
|
||||
property CompressionMethod: TZipCompressionMethod read Get_CompressionMethod;
|
||||
property CompressionRatio: Double read Get_CompressionRatio;
|
||||
property DeflateOption: TZipDeflateOption read Get_DeflateOption;
|
||||
property DictionarySize: TZipDictionarySize read Get_DictionarySize;
|
||||
property DiskNumberStart: Integer read Get_DiskNumberStart;
|
||||
property ExtraField: WideString read Get_ExtraField write Set_ExtraField;
|
||||
property FileComment: WideString read Get_FileComment write Set_FileComment;
|
||||
property InternalFileAttributes: Integer read Get_InternalFileAttributes write Set_InternalFileAttributes;
|
||||
property VersionMadeBy: Integer read Get_VersionMadeBy;
|
||||
property VersionNeededToExtract: Integer read Get_VersionNeededToExtract;
|
||||
end;
|
||||
|
||||
// *********************************************************************//
|
||||
// DispIntf: IZipItemDisp
|
||||
// Flags: (4416) Dual OleAutomation Dispatchable
|
||||
// GUID: {851699A1-422A-4C65-8E08-D0499ACDD834}
|
||||
// *********************************************************************//
|
||||
IZipItemDisp = dispinterface
|
||||
['{851699A1-422A-4C65-8E08-D0499ACDD834}']
|
||||
property Action: TArchiveAction readonly dispid 1;
|
||||
property CompressedSize: Integer readonly dispid 2;
|
||||
property CRC32: Integer readonly dispid 3;
|
||||
property DiskFileName: WideString readonly dispid 4;
|
||||
property DiskPath: WideString readonly dispid 5;
|
||||
property ExternalFileAttributes: TFileAttributes dispid 6;
|
||||
property FileName: WideString dispid 7;
|
||||
property IsEncrypted: WordBool readonly dispid 8;
|
||||
property LastModFileDateTime: TDateTime readonly dispid 9;
|
||||
property StoredPath: WideString readonly dispid 10;
|
||||
property Tagged: WordBool dispid 11;
|
||||
property UnCompressedSize: Integer readonly dispid 12;
|
||||
property CRC32St: WideString readonly dispid 13;
|
||||
property Password: WideString dispid 14;
|
||||
property CompressionMethod: TZipCompressionMethod readonly dispid 15;
|
||||
property CompressionRatio: Double readonly dispid 16;
|
||||
property DeflateOption: TZipDeflateOption readonly dispid 17;
|
||||
property DictionarySize: TZipDictionarySize readonly dispid 18;
|
||||
property DiskNumberStart: Integer readonly dispid 19;
|
||||
property ExtraField: WideString dispid 20;
|
||||
property FileComment: WideString dispid 21;
|
||||
property InternalFileAttributes: Integer dispid 22;
|
||||
property VersionMadeBy: Integer readonly dispid 23;
|
||||
property VersionNeededToExtract: Integer readonly dispid 24;
|
||||
end;
|
||||
|
||||
// *********************************************************************//
|
||||
// Interface: IGZipItem
|
||||
// Flags: (4416) Dual OleAutomation Dispatchable
|
||||
// GUID: {8FA78CE0-FD29-441E-9777-93B63EF1A9EE}
|
||||
// *********************************************************************//
|
||||
IGZipItem = interface(IDispatch)
|
||||
['{8FA78CE0-FD29-441E-9777-93B63EF1A9EE}']
|
||||
function Get_Action: TArchiveAction; safecall;
|
||||
function Get_CompressedSize: Integer; safecall;
|
||||
function Get_CRC32: Integer; safecall;
|
||||
function Get_DiskFileName: WideString; safecall;
|
||||
function Get_DiskPath: WideString; safecall;
|
||||
function Get_ExternalFileAttributes: TFileAttributes; safecall;
|
||||
procedure Set_ExternalFileAttributes(Value: TFileAttributes); safecall;
|
||||
function Get_FileName: WideString; safecall;
|
||||
procedure Set_FileName(const Value: WideString); safecall;
|
||||
function Get_IsEncrypted: WordBool; safecall;
|
||||
function Get_LastModFileDateTime: TDateTime; safecall;
|
||||
function Get_StoredPath: WideString; safecall;
|
||||
function Get_Tagged: WordBool; safecall;
|
||||
procedure Set_Tagged(Value: WordBool); safecall;
|
||||
function Get_UnCompressedSize: Integer; safecall;
|
||||
function Get_CRC32St: WideString; safecall;
|
||||
function Get_Password: WideString; safecall;
|
||||
procedure Set_Password(const Value: WideString); safecall;
|
||||
function Get_CompressionMethod: Byte; safecall;
|
||||
procedure Set_CompressionMethod(Value: Byte); safecall;
|
||||
function Get_ExtraField: WideString; safecall;
|
||||
procedure Set_ExtraField(const Value: WideString); safecall;
|
||||
function Get_ExtraFlags: Byte; safecall;
|
||||
procedure Set_ExtraFlags(Value: Byte); safecall;
|
||||
function Get_FileComment: WideString; safecall;
|
||||
procedure Set_FileComment(const Value: WideString); safecall;
|
||||
function Get_FileSystem: TFileSystem; safecall;
|
||||
procedure Set_FileSystem(Value: TFileSystem); safecall;
|
||||
function Get_Flags: Byte; safecall;
|
||||
procedure Set_Flags(Value: Byte); safecall;
|
||||
function Get_HeaderCRC: Integer; safecall;
|
||||
property Action: TArchiveAction read Get_Action;
|
||||
property CompressedSize: Integer read Get_CompressedSize;
|
||||
property CRC32: Integer read Get_CRC32;
|
||||
property DiskFileName: WideString read Get_DiskFileName;
|
||||
property DiskPath: WideString read Get_DiskPath;
|
||||
property ExternalFileAttributes: TFileAttributes read Get_ExternalFileAttributes write Set_ExternalFileAttributes;
|
||||
property FileName: WideString read Get_FileName write Set_FileName;
|
||||
property IsEncrypted: WordBool read Get_IsEncrypted;
|
||||
property LastModFileDateTime: TDateTime read Get_LastModFileDateTime;
|
||||
property StoredPath: WideString read Get_StoredPath;
|
||||
property Tagged: WordBool read Get_Tagged write Set_Tagged;
|
||||
property UnCompressedSize: Integer read Get_UnCompressedSize;
|
||||
property CRC32St: WideString read Get_CRC32St;
|
||||
property Password: WideString read Get_Password write Set_Password;
|
||||
property CompressionMethod: Byte read Get_CompressionMethod write Set_CompressionMethod;
|
||||
property ExtraField: WideString read Get_ExtraField write Set_ExtraField;
|
||||
property ExtraFlags: Byte read Get_ExtraFlags write Set_ExtraFlags;
|
||||
property FileComment: WideString read Get_FileComment write Set_FileComment;
|
||||
property FileSystem: TFileSystem read Get_FileSystem write Set_FileSystem;
|
||||
property Flags: Byte read Get_Flags write Set_Flags;
|
||||
property HeaderCRC: Integer read Get_HeaderCRC;
|
||||
end;
|
||||
|
||||
// *********************************************************************//
|
||||
// DispIntf: IGZipItemDisp
|
||||
// Flags: (4416) Dual OleAutomation Dispatchable
|
||||
// GUID: {8FA78CE0-FD29-441E-9777-93B63EF1A9EE}
|
||||
// *********************************************************************//
|
||||
IGZipItemDisp = dispinterface
|
||||
['{8FA78CE0-FD29-441E-9777-93B63EF1A9EE}']
|
||||
property Action: TArchiveAction readonly dispid 1;
|
||||
property CompressedSize: Integer readonly dispid 2;
|
||||
property CRC32: Integer readonly dispid 3;
|
||||
property DiskFileName: WideString readonly dispid 4;
|
||||
property DiskPath: WideString readonly dispid 5;
|
||||
property ExternalFileAttributes: TFileAttributes dispid 6;
|
||||
property FileName: WideString dispid 7;
|
||||
property IsEncrypted: WordBool readonly dispid 8;
|
||||
property LastModFileDateTime: TDateTime readonly dispid 9;
|
||||
property StoredPath: WideString readonly dispid 10;
|
||||
property Tagged: WordBool dispid 11;
|
||||
property UnCompressedSize: Integer readonly dispid 12;
|
||||
property CRC32St: WideString readonly dispid 13;
|
||||
property Password: WideString dispid 14;
|
||||
property CompressionMethod: Byte dispid 15;
|
||||
property ExtraField: WideString dispid 16;
|
||||
property ExtraFlags: Byte dispid 17;
|
||||
property FileComment: WideString dispid 18;
|
||||
property FileSystem: TFileSystem dispid 19;
|
||||
property Flags: Byte dispid 20;
|
||||
property HeaderCRC: Integer readonly dispid 21;
|
||||
end;
|
||||
|
||||
// *********************************************************************//
|
||||
// Interface: ITarItem
|
||||
// Flags: (4416) Dual OleAutomation Dispatchable
|
||||
// GUID: {729E9F52-C489-4A41-A770-4E2C5282AE39}
|
||||
// *********************************************************************//
|
||||
ITarItem = interface(IDispatch)
|
||||
['{729E9F52-C489-4A41-A770-4E2C5282AE39}']
|
||||
function Get_Action: TArchiveAction; safecall;
|
||||
function Get_CompressedSize: Integer; safecall;
|
||||
function Get_CRC32: Integer; safecall;
|
||||
function Get_DiskFileName: WideString; safecall;
|
||||
function Get_DiskPath: WideString; safecall;
|
||||
function Get_ExternalFileAttributes: TFileAttributes; safecall;
|
||||
procedure Set_ExternalFileAttributes(Value: TFileAttributes); safecall;
|
||||
function Get_FileName: WideString; safecall;
|
||||
procedure Set_FileName(const Value: WideString); safecall;
|
||||
function Get_IsEncrypted: WordBool; safecall;
|
||||
function Get_LastModFileDateTime: TDateTime; safecall;
|
||||
function Get_StoredPath: WideString; safecall;
|
||||
function Get_Tagged: WordBool; safecall;
|
||||
procedure Set_Tagged(Value: WordBool); safecall;
|
||||
function Get_UnCompressedSize: Integer; safecall;
|
||||
function Get_CRC32St: WideString; safecall;
|
||||
function Get_Password: WideString; safecall;
|
||||
procedure Set_Password(const Value: WideString); safecall;
|
||||
function Get_DevMajor: Integer; safecall;
|
||||
procedure Set_DevMajor(Value: Integer); safecall;
|
||||
function Get_DevMinor: Integer; safecall;
|
||||
procedure Set_DevMinor(Value: Integer); safecall;
|
||||
function Get_GroupID: Integer; safecall;
|
||||
procedure Set_GroupID(Value: Integer); safecall;
|
||||
function Get_GroupName: WideString; safecall;
|
||||
procedure Set_GroupName(const Value: WideString); safecall;
|
||||
function Get_LinkFlag: Byte; safecall;
|
||||
procedure Set_LinkFlag(Value: Byte); safecall;
|
||||
function Get_LinkName: WideString; safecall;
|
||||
procedure Set_LinkName(const Value: WideString); safecall;
|
||||
function Get_Mode: Integer; safecall;
|
||||
procedure Set_Mode(Value: Integer); safecall;
|
||||
function Get_UserID: Integer; safecall;
|
||||
procedure Set_UserID(Value: Integer); safecall;
|
||||
function Get_UserName: WideString; safecall;
|
||||
procedure Set_UserName(const Value: WideString); safecall;
|
||||
property Action: TArchiveAction read Get_Action;
|
||||
property CompressedSize: Integer read Get_CompressedSize;
|
||||
property CRC32: Integer read Get_CRC32;
|
||||
property DiskFileName: WideString read Get_DiskFileName;
|
||||
property DiskPath: WideString read Get_DiskPath;
|
||||
property ExternalFileAttributes: TFileAttributes read Get_ExternalFileAttributes write Set_ExternalFileAttributes;
|
||||
property FileName: WideString read Get_FileName write Set_FileName;
|
||||
property IsEncrypted: WordBool read Get_IsEncrypted;
|
||||
property LastModFileDateTime: TDateTime read Get_LastModFileDateTime;
|
||||
property StoredPath: WideString read Get_StoredPath;
|
||||
property Tagged: WordBool read Get_Tagged write Set_Tagged;
|
||||
property UnCompressedSize: Integer read Get_UnCompressedSize;
|
||||
property CRC32St: WideString read Get_CRC32St;
|
||||
property Password: WideString read Get_Password write Set_Password;
|
||||
property DevMajor: Integer read Get_DevMajor write Set_DevMajor;
|
||||
property DevMinor: Integer read Get_DevMinor write Set_DevMinor;
|
||||
property GroupID: Integer read Get_GroupID write Set_GroupID;
|
||||
property GroupName: WideString read Get_GroupName write Set_GroupName;
|
||||
property LinkFlag: Byte read Get_LinkFlag write Set_LinkFlag;
|
||||
property LinkName: WideString read Get_LinkName write Set_LinkName;
|
||||
property Mode: Integer read Get_Mode write Set_Mode;
|
||||
property UserID: Integer read Get_UserID write Set_UserID;
|
||||
property UserName: WideString read Get_UserName write Set_UserName;
|
||||
end;
|
||||
|
||||
// *********************************************************************//
|
||||
// DispIntf: ITarItemDisp
|
||||
// Flags: (4416) Dual OleAutomation Dispatchable
|
||||
// GUID: {729E9F52-C489-4A41-A770-4E2C5282AE39}
|
||||
// *********************************************************************//
|
||||
ITarItemDisp = dispinterface
|
||||
['{729E9F52-C489-4A41-A770-4E2C5282AE39}']
|
||||
property Action: TArchiveAction readonly dispid 1;
|
||||
property CompressedSize: Integer readonly dispid 2;
|
||||
property CRC32: Integer readonly dispid 3;
|
||||
property DiskFileName: WideString readonly dispid 4;
|
||||
property DiskPath: WideString readonly dispid 5;
|
||||
property ExternalFileAttributes: TFileAttributes dispid 6;
|
||||
property FileName: WideString dispid 7;
|
||||
property IsEncrypted: WordBool readonly dispid 8;
|
||||
property LastModFileDateTime: TDateTime readonly dispid 9;
|
||||
property StoredPath: WideString readonly dispid 10;
|
||||
property Tagged: WordBool dispid 11;
|
||||
property UnCompressedSize: Integer readonly dispid 12;
|
||||
property CRC32St: WideString readonly dispid 13;
|
||||
property Password: WideString dispid 14;
|
||||
property DevMajor: Integer dispid 15;
|
||||
property DevMinor: Integer dispid 16;
|
||||
property GroupID: Integer dispid 17;
|
||||
property GroupName: WideString dispid 18;
|
||||
property LinkFlag: Byte dispid 19;
|
||||
property LinkName: WideString dispid 20;
|
||||
property Mode: Integer dispid 21;
|
||||
property UserID: Integer dispid 22;
|
||||
property UserName: WideString dispid 23;
|
||||
end;
|
||||
|
||||
// *********************************************************************//
|
||||
// Interface: IZipKit
|
||||
// Flags: (4416) Dual OleAutomation Dispatchable
|
||||
// GUID: {B7480A7F-4E27-4B45-9FE6-224B60295A0C}
|
||||
// *********************************************************************//
|
||||
IZipKit = interface(IDispatch)
|
||||
['{B7480A7F-4E27-4B45-9FE6-224B60295A0C}']
|
||||
procedure Add(const FileMask: WideString; const ExclusionMask: WideString; SearchAttr: Integer); safecall;
|
||||
procedure AddFromStream(const FileName: WideString; Stream: OleVariant); safecall;
|
||||
function Get_AutoSave: WordBool; safecall;
|
||||
procedure Set_AutoSave(Value: WordBool); safecall;
|
||||
function Get_BaseDirectory: WideString; safecall;
|
||||
procedure Set_BaseDirectory(const Value: WideString); safecall;
|
||||
procedure ClearTags; safecall;
|
||||
function Get_CompressionMethodToUse: TZipSupportMethod; safecall;
|
||||
procedure Set_CompressionMethodToUse(Value: TZipSupportMethod); safecall;
|
||||
function Get_Count: Integer; safecall;
|
||||
function Get_DeflateOption: TZipDeflateOption; safecall;
|
||||
procedure Set_DeflateOption(Value: TZipDeflateOption); safecall;
|
||||
procedure Delete(const FileMask: WideString; const ExclusionMask: WideString); safecall;
|
||||
procedure DeleteAt(Index: Integer); safecall;
|
||||
procedure DeleteTaggedItems; safecall;
|
||||
function Get_DOSMode: WordBool; safecall;
|
||||
procedure Set_DOSMode(Value: WordBool); safecall;
|
||||
procedure Extract(const FileMask: WideString; const ExclusionMask: WideString); safecall;
|
||||
procedure ExtractAt(Index: Integer; const NewName: WideString); safecall;
|
||||
function Get_ExtractOptions: TZipExtractOptions; safecall;
|
||||
procedure Set_ExtractOptions(Value: TZipExtractOptions); safecall;
|
||||
procedure ExtractTaggedItems; safecall;
|
||||
function Get_FileName: WideString; safecall;
|
||||
procedure Set_FileName(const Value: WideString); safecall;
|
||||
function Find(const FileName: WideString): Integer; safecall;
|
||||
procedure Freshen(const FileMask: WideString; const ExclusionMask: WideString); safecall;
|
||||
procedure FreshenTaggedItems; safecall;
|
||||
function Get_Item(Index: Integer): IDispatch; safecall;
|
||||
function Get_LogFile: WideString; safecall;
|
||||
procedure Set_LogFile(const Value: WideString); safecall;
|
||||
function Get_Logging: WordBool; safecall;
|
||||
procedure Set_Logging(Value: WordBool); safecall;
|
||||
function Get_Password: WideString; safecall;
|
||||
procedure Set_Password(const Value: WideString); safecall;
|
||||
function Get_PasswordRetries: Byte; safecall;
|
||||
procedure Set_PasswordRetries(Value: Byte); safecall;
|
||||
procedure Replace(const FileMask: WideString); safecall;
|
||||
procedure Save; safecall;
|
||||
function Get_Spanned: WordBool; safecall;
|
||||
function Get_SpanningThreshold: Integer; safecall;
|
||||
procedure Set_SpanningThreshold(Value: Integer); safecall;
|
||||
function Get_Status: TArchiveStatus; safecall;
|
||||
function Get_StoreOptions: TStoreOptions; safecall;
|
||||
procedure Set_StoreOptions(Value: TStoreOptions); safecall;
|
||||
procedure TagItems(const FileMask: WideString); safecall;
|
||||
function Get_TempDirectory: WideString; safecall;
|
||||
procedure Set_TempDirectory(const Value: WideString); safecall;
|
||||
procedure TestTaggedItems; safecall;
|
||||
procedure UntagItems(const FileMask: WideString); safecall;
|
||||
function Get_ZipFileComment: WideString; safecall;
|
||||
procedure Set_ZipFileComment(const Value: WideString); safecall;
|
||||
function License(const Key: WideString): WordBool; safecall;
|
||||
function Get__NewEnum: IUnknown; safecall;
|
||||
function ExtractToStream(const FileName: WideString): OleVariant; safecall;
|
||||
function Get_CompressionType: TArchiveType; safecall;
|
||||
procedure Set_CompressionType(Value: TArchiveType); safecall;
|
||||
function Get_TarAutoHandle: WordBool; safecall;
|
||||
procedure Set_TarAutoHandle(Value: WordBool); safecall;
|
||||
property AutoSave: WordBool read Get_AutoSave write Set_AutoSave;
|
||||
property BaseDirectory: WideString read Get_BaseDirectory write Set_BaseDirectory;
|
||||
property CompressionMethodToUse: TZipSupportMethod read Get_CompressionMethodToUse write Set_CompressionMethodToUse;
|
||||
property Count: Integer read Get_Count;
|
||||
property DeflateOption: TZipDeflateOption read Get_DeflateOption write Set_DeflateOption;
|
||||
property DOSMode: WordBool read Get_DOSMode write Set_DOSMode;
|
||||
property ExtractOptions: TZipExtractOptions read Get_ExtractOptions write Set_ExtractOptions;
|
||||
property FileName: WideString read Get_FileName write Set_FileName;
|
||||
property Item[Index: Integer]: IDispatch read Get_Item;
|
||||
property LogFile: WideString read Get_LogFile write Set_LogFile;
|
||||
property Logging: WordBool read Get_Logging write Set_Logging;
|
||||
property Password: WideString read Get_Password write Set_Password;
|
||||
property PasswordRetries: Byte read Get_PasswordRetries write Set_PasswordRetries;
|
||||
property Spanned: WordBool read Get_Spanned;
|
||||
property SpanningThreshold: Integer read Get_SpanningThreshold write Set_SpanningThreshold;
|
||||
property Status: TArchiveStatus read Get_Status;
|
||||
property StoreOptions: TStoreOptions read Get_StoreOptions write Set_StoreOptions;
|
||||
property TempDirectory: WideString read Get_TempDirectory write Set_TempDirectory;
|
||||
property ZipFileComment: WideString read Get_ZipFileComment write Set_ZipFileComment;
|
||||
property _NewEnum: IUnknown read Get__NewEnum;
|
||||
property CompressionType: TArchiveType read Get_CompressionType write Set_CompressionType;
|
||||
property TarAutoHandle: WordBool read Get_TarAutoHandle write Set_TarAutoHandle;
|
||||
end;
|
||||
|
||||
// *********************************************************************//
|
||||
// DispIntf: IZipKitDisp
|
||||
// Flags: (4416) Dual OleAutomation Dispatchable
|
||||
// GUID: {B7480A7F-4E27-4B45-9FE6-224B60295A0C}
|
||||
// *********************************************************************//
|
||||
IZipKitDisp = dispinterface
|
||||
['{B7480A7F-4E27-4B45-9FE6-224B60295A0C}']
|
||||
procedure Add(const FileMask: WideString; const ExclusionMask: WideString; SearchAttr: Integer); dispid 1;
|
||||
procedure AddFromStream(const FileName: WideString; Stream: OleVariant); dispid 7;
|
||||
property AutoSave: WordBool dispid 3;
|
||||
property BaseDirectory: WideString dispid 4;
|
||||
procedure ClearTags; dispid 5;
|
||||
property CompressionMethodToUse: TZipSupportMethod dispid 6;
|
||||
property Count: Integer readonly dispid 2;
|
||||
property DeflateOption: TZipDeflateOption dispid 8;
|
||||
procedure Delete(const FileMask: WideString; const ExclusionMask: WideString); dispid 9;
|
||||
procedure DeleteAt(Index: Integer); dispid 10;
|
||||
procedure DeleteTaggedItems; dispid 11;
|
||||
property DOSMode: WordBool dispid 12;
|
||||
procedure Extract(const FileMask: WideString; const ExclusionMask: WideString); dispid 13;
|
||||
procedure ExtractAt(Index: Integer; const NewName: WideString); dispid 14;
|
||||
property ExtractOptions: TZipExtractOptions dispid 15;
|
||||
procedure ExtractTaggedItems; dispid 16;
|
||||
property FileName: WideString dispid 17;
|
||||
function Find(const FileName: WideString): Integer; dispid 18;
|
||||
procedure Freshen(const FileMask: WideString; const ExclusionMask: WideString); dispid 19;
|
||||
procedure FreshenTaggedItems; dispid 20;
|
||||
property Item[Index: Integer]: IDispatch readonly dispid 0;
|
||||
property LogFile: WideString dispid 23;
|
||||
property Logging: WordBool dispid 24;
|
||||
property Password: WideString dispid 25;
|
||||
property PasswordRetries: Byte dispid 26;
|
||||
procedure Replace(const FileMask: WideString); dispid 27;
|
||||
procedure Save; dispid 28;
|
||||
property Spanned: WordBool readonly dispid 29;
|
||||
property SpanningThreshold: Integer dispid 30;
|
||||
property Status: TArchiveStatus readonly dispid 31;
|
||||
property StoreOptions: TStoreOptions dispid 32;
|
||||
procedure TagItems(const FileMask: WideString); dispid 33;
|
||||
property TempDirectory: WideString dispid 34;
|
||||
procedure TestTaggedItems; dispid 35;
|
||||
procedure UntagItems(const FileMask: WideString); dispid 36;
|
||||
property ZipFileComment: WideString dispid 37;
|
||||
function License(const Key: WideString): WordBool; dispid 38;
|
||||
property _NewEnum: IUnknown readonly dispid $FFFFFFFC;
|
||||
function ExtractToStream(const FileName: WideString): OleVariant; dispid 21;
|
||||
property CompressionType: TArchiveType dispid 40;
|
||||
property TarAutoHandle: WordBool dispid 41;
|
||||
end;
|
||||
|
||||
// *********************************************************************//
|
||||
// DispIntf: IZipKitEvents
|
||||
// Flags: (4096) Dispatchable
|
||||
// GUID: {F094D5F4-3A52-45AE-9D86-4409611DD29E}
|
||||
// *********************************************************************//
|
||||
IZipKitEvents = dispinterface
|
||||
['{F094D5F4-3A52-45AE-9D86-4409611DD29E}']
|
||||
procedure OnArchiveItemProgress(const Item: IDispatch; Progress: Byte; var Abort: WordBool); dispid 1;
|
||||
procedure OnArchiveProgress(Progress: Byte; var Abort: WordBool); dispid 2;
|
||||
procedure OnChange; dispid 3;
|
||||
procedure OnConfirmOverwrite(var Name: WideString; var Confirm: WordBool); dispid 4;
|
||||
procedure OnConfirmProcessItem(const Item: IDispatch; ProcessType: TProcessType;
|
||||
var Confirm: WordBool); dispid 5;
|
||||
procedure OnConfirmSave(var Confirm: WordBool); dispid 6;
|
||||
procedure OnLoad; dispid 7;
|
||||
procedure OnNeedPassword(var NewPassword: WideString); dispid 8;
|
||||
procedure OnProcessItemFailure(const Item: IDispatch; ProcessType: TProcessType;
|
||||
ErrorClass: TErrorClass; ErrorCode: TErrorCode;
|
||||
const ErrorString: WideString); dispid 9;
|
||||
procedure OnRequestBlankDisk(var Abort: WordBool); dispid 10;
|
||||
procedure OnRequestImage(ImageNumber: Integer; var ImageName: WideString; var Abort: WordBool); dispid 11;
|
||||
procedure OnRequestLastDisk(var Abort: WordBool); dispid 12;
|
||||
procedure OnRequestNthDisk(DiskNumber: Integer; var Abort: WordBool); dispid 13;
|
||||
procedure OnSave; dispid 14;
|
||||
end;
|
||||
|
||||
// *********************************************************************//
|
||||
// The Class CoZipItem provides a Create and CreateRemote method to
|
||||
// create instances of the default interface IZipItem exposed by
|
||||
// the CoClass ZipItem. The functions are intended to be used by
|
||||
// clients wishing to automate the CoClass objects exposed by the
|
||||
// server of this typelibrary.
|
||||
// *********************************************************************//
|
||||
CoZipItem = class
|
||||
class function Create: IZipItem;
|
||||
class function CreateRemote(const MachineName: string): IZipItem;
|
||||
end;
|
||||
|
||||
// *********************************************************************//
|
||||
// The Class CoGZipItem provides a Create and CreateRemote method to
|
||||
// create instances of the default interface IGZipItem exposed by
|
||||
// the CoClass GZipItem. The functions are intended to be used by
|
||||
// clients wishing to automate the CoClass objects exposed by the
|
||||
// server of this typelibrary.
|
||||
// *********************************************************************//
|
||||
CoGZipItem = class
|
||||
class function Create: IGZipItem;
|
||||
class function CreateRemote(const MachineName: string): IGZipItem;
|
||||
end;
|
||||
|
||||
// *********************************************************************//
|
||||
// The Class CoTarItem provides a Create and CreateRemote method to
|
||||
// create instances of the default interface ITarItem exposed by
|
||||
// the CoClass TarItem. The functions are intended to be used by
|
||||
// clients wishing to automate the CoClass objects exposed by the
|
||||
// server of this typelibrary.
|
||||
// *********************************************************************//
|
||||
CoTarItem = class
|
||||
class function Create: ITarItem;
|
||||
class function CreateRemote(const MachineName: string): ITarItem;
|
||||
end;
|
||||
|
||||
// *********************************************************************//
|
||||
// The Class CoZipKit provides a Create and CreateRemote method to
|
||||
// create instances of the default interface IZipKit exposed by
|
||||
// the CoClass ZipKit. The functions are intended to be used by
|
||||
// clients wishing to automate the CoClass objects exposed by the
|
||||
// server of this typelibrary.
|
||||
// *********************************************************************//
|
||||
CoZipKit = class
|
||||
class function Create: IZipKit;
|
||||
class function CreateRemote(const MachineName: string): IZipKit;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses ComObj;
|
||||
|
||||
class function CoZipItem.Create: IZipItem;
|
||||
begin
|
||||
Result := CreateComObject(CLASS_ZipItem) as IZipItem;
|
||||
end;
|
||||
|
||||
class function CoZipItem.CreateRemote(const MachineName: string): IZipItem;
|
||||
begin
|
||||
Result := CreateRemoteComObject(MachineName, CLASS_ZipItem) as IZipItem;
|
||||
end;
|
||||
|
||||
class function CoGZipItem.Create: IGZipItem;
|
||||
begin
|
||||
Result := CreateComObject(CLASS_GZipItem) as IGZipItem;
|
||||
end;
|
||||
|
||||
class function CoGZipItem.CreateRemote(const MachineName: string): IGZipItem;
|
||||
begin
|
||||
Result := CreateRemoteComObject(MachineName, CLASS_GZipItem) as IGZipItem;
|
||||
end;
|
||||
|
||||
class function CoTarItem.Create: ITarItem;
|
||||
begin
|
||||
Result := CreateComObject(CLASS_TarItem) as ITarItem;
|
||||
end;
|
||||
|
||||
class function CoTarItem.CreateRemote(const MachineName: string): ITarItem;
|
||||
begin
|
||||
Result := CreateRemoteComObject(MachineName, CLASS_TarItem) as ITarItem;
|
||||
end;
|
||||
|
||||
class function CoZipKit.Create: IZipKit;
|
||||
begin
|
||||
Result := CreateComObject(CLASS_ZipKit) as IZipKit;
|
||||
end;
|
||||
|
||||
class function CoZipKit.CreateRemote(const MachineName: string): IZipKit;
|
||||
begin
|
||||
Result := CreateRemoteComObject(MachineName, CLASS_ZipKit) as IZipKit;
|
||||
end;
|
||||
|
||||
end.
|
17
Abbrevia/source/COM/Readme.txt
Normal file
17
Abbrevia/source/COM/Readme.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
The COM DLLs for v5.0 are compiled using Delphi XE2 (including extended RTTI) and include zipx support. Recompiling with Delphi 2009 and without zipx support should roughly halve the size of the 32-bit DLL.
|
||||
|
||||
They can be registered for all users (requires admin rights) using:
|
||||
|
||||
regsvr32 Abbrevia.dll
|
||||
|
||||
And for the current user using:
|
||||
|
||||
regsvr32 /i:user /n Abbrevia.dll
|
||||
|
||||
To uninstall use:
|
||||
|
||||
regsvr32 /u Abbrevia.dll
|
||||
|
||||
or
|
||||
|
||||
regsvr32 /i:user /n /u Abbrevia.dll
|
262
Abbrevia/source/COM/_GZipItem.pas
Normal file
262
Abbrevia/source/COM/_GZipItem.pas
Normal file
@@ -0,0 +1,262 @@
|
||||
(* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is TurboPower Abbrevia
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* TurboPower Software
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** *)
|
||||
|
||||
unit _GZipItem;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
ComObj, Abbrevia_TLB, AbGzTyp, AbZipKit;
|
||||
|
||||
type
|
||||
|
||||
TGZipItem = class(TAutoIntfObject, IGZipItem)
|
||||
private
|
||||
FOwner : TAbGzipItem;
|
||||
FParent : TAbZipKit;
|
||||
public
|
||||
constructor Create(AOwner : TAbGzipItem; AParent : TAbZipKit);
|
||||
protected
|
||||
{IArchiveItem}
|
||||
function Get_Action: TArchiveAction; safecall;
|
||||
function Get_CompressedSize: Integer; safecall;
|
||||
function Get_CRC32: Integer; safecall;
|
||||
function Get_CRC32St: WideString; safecall;
|
||||
function Get_DiskFileName: WideString; safecall;
|
||||
function Get_DiskPath: WideString; safecall;
|
||||
function Get_ExternalFileAttributes: TFileAttributes; safecall;
|
||||
procedure Set_ExternalFileAttributes(Value: TFileAttributes); safecall;
|
||||
function Get_FileName: WideString; safecall;
|
||||
procedure Set_FileName(const Value: WideString); safecall;
|
||||
function Get_IsEncrypted: WordBool; safecall;
|
||||
function Get_LastModFileDateTime: TDateTime; safecall;
|
||||
function Get_StoredPath: WideString; safecall;
|
||||
function Get_Tagged: WordBool; safecall;
|
||||
procedure Set_Tagged(Value: WordBool); safecall;
|
||||
function Get_UnCompressedSize: Integer; safecall;
|
||||
function Get_Password: WideString; safecall;
|
||||
procedure Set_Password(const Value: WideString); safecall;
|
||||
|
||||
{IGZipItem}
|
||||
function Get_CompressionMethod: Byte; safecall;
|
||||
procedure Set_CompressionMethod(Value: Byte); safecall;
|
||||
function Get_ExtraField: WideString; safecall;
|
||||
procedure Set_ExtraField(const Value: WideString); safecall;
|
||||
function Get_ExtraFlags: Byte; safecall;
|
||||
procedure Set_ExtraFlags(Value: Byte); safecall;
|
||||
function Get_FileComment: WideString; safecall;
|
||||
procedure Set_FileComment(const Value: WideString); safecall;
|
||||
function Get_FileSystem: TFileSystem; safecall;
|
||||
procedure Set_FileSystem(Value: TFileSystem); safecall;
|
||||
function Get_Flags: Byte; safecall;
|
||||
procedure Set_Flags(Value: Byte); safecall;
|
||||
function Get_HeaderCRC: Integer; safecall;
|
||||
end;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
ComServ, {StStrL,} SysUtils;
|
||||
|
||||
{------------------------------------------------------------------------------}
|
||||
constructor TGzipItem.Create(AOwner : TAbGzipItem; AParent : TAbZipKit);
|
||||
begin
|
||||
inherited Create(ComServer.TypeLib, IGZipItem);
|
||||
FOwner := AOwner;
|
||||
FParent := AParent;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
{IArchiveItem}
|
||||
{------------------------------------------------------------------------------}
|
||||
function TGzipItem.Get_Action: TArchiveAction;
|
||||
begin
|
||||
Result := TArchiveAction(FOwner.Action);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TGzipItem.Get_CompressedSize: Integer;
|
||||
begin
|
||||
result := FOwner.CompressedSize;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TGzipItem.Get_CRC32: Integer;
|
||||
begin
|
||||
result := FOwner.CRC32;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TGzipItem.Get_CRC32St: WideString;
|
||||
begin
|
||||
result := IntToHex(FOwner.CRC32, 8);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TGzipItem.Get_DiskFileName: WideString;
|
||||
begin
|
||||
result := FOwner.DiskFileName;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TGzipItem.Get_DiskPath: WideString;
|
||||
begin
|
||||
result := FOwner.DiskPath;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TGzipItem.Get_ExternalFileAttributes: TFileAttributes;
|
||||
begin
|
||||
result := TFileAttributes(FOwner.ExternalFileAttributes);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TGzipItem.Set_ExternalFileAttributes(Value: TFileAttributes);
|
||||
begin
|
||||
FOwner.ExternalFileAttributes := LongInt(Value);
|
||||
FParent.ZipArchive.IsDirty := True;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TGzipItem.Get_FileName: WideString;
|
||||
begin
|
||||
result := FOwner.FileName;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TGzipItem.Set_FileName(const Value: WideString);
|
||||
begin
|
||||
FOwner.FileName := Value;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TGzipItem.Get_IsEncrypted: WordBool;
|
||||
begin
|
||||
result := FOwner.IsEncrypted;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TGzipItem.Get_LastModFileDateTime: TDateTime;
|
||||
begin
|
||||
result := FileDateToDateTime((FOwner.LastModFileDate shl 16) + FOwner.LastModFileTime);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TGzipItem.Get_StoredPath: WideString;
|
||||
begin
|
||||
result := FOwner.StoredPath;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TGzipItem.Get_Tagged: WordBool;
|
||||
begin
|
||||
result := FOwner.Tagged;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TGzipItem.Set_Tagged(Value: WordBool);
|
||||
begin
|
||||
FOwner.Tagged := Value;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TGzipItem.Get_UnCompressedSize: Integer;
|
||||
begin
|
||||
result := FOwner.UncompressedSize;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TGzipItem.Get_Password: WideString;
|
||||
begin
|
||||
{!!!}
|
||||
//result := FOwner.Password;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TGzipItem.Set_Password(const Value: WideString);
|
||||
begin
|
||||
{!!!}
|
||||
//FOwner.Password := Value;
|
||||
//FParent.ZipArchive.IsDirty := True;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
{IGZipItem}
|
||||
{------------------------------------------------------------------------------}
|
||||
function TGzipItem.Get_CompressionMethod: Byte;
|
||||
begin
|
||||
result := FOwner.CompressionMethod;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TGzipItem.Set_CompressionMethod(Value: Byte);
|
||||
begin
|
||||
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TGzipItem.Get_ExtraField: WideString;
|
||||
begin
|
||||
result := '';
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TGzipItem.Set_ExtraField(const Value: WideString);
|
||||
begin
|
||||
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TGzipItem.Get_ExtraFlags: Byte;
|
||||
begin
|
||||
result := FOwner.ExtraFlags;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TGzipItem.Set_ExtraFlags(Value: Byte);
|
||||
begin
|
||||
FOwner.ExtraFlags := Value;
|
||||
FParent.ZipArchive.IsDirty := True;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TGzipItem.Get_FileComment: WideString;
|
||||
begin
|
||||
result := WideString(FOwner.FileComment);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TGzipItem.Set_FileComment(const Value: WideString);
|
||||
begin
|
||||
FOwner.FileComment := AnsiString(Value);
|
||||
FParent.ZipArchive.IsDirty := True;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TGzipItem.Get_FileSystem: TFileSystem;
|
||||
begin
|
||||
result := TFileSystem(FOwner.FileSystem);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TGzipItem.Set_FileSystem(Value: TFileSystem);
|
||||
begin
|
||||
FOwner.FileSystem := TAbGzFileSystem(Value);
|
||||
FParent.ZipArchive.IsDirty := True;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TGzipItem.Get_Flags: Byte;
|
||||
begin
|
||||
result := FOwner.Flags;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TGzipItem.Set_Flags(Value: Byte);
|
||||
begin
|
||||
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TGzipItem.Get_HeaderCRC: Integer;
|
||||
begin
|
||||
result := 0;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
|
||||
|
||||
|
||||
|
||||
end.
|
297
Abbrevia/source/COM/_TarItem.pas
Normal file
297
Abbrevia/source/COM/_TarItem.pas
Normal file
@@ -0,0 +1,297 @@
|
||||
(* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is TurboPower Abbrevia
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* TurboPower Software
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** *)
|
||||
|
||||
unit _TarItem;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
ComObj, Abbrevia_TLB, AbTarTyp, AbZipKit;
|
||||
|
||||
type
|
||||
|
||||
TTarItem = class(TAutoIntfObject, ITarItem)
|
||||
private
|
||||
FOwner : TAbTarItem;
|
||||
FParent : TAbZipKit;
|
||||
public
|
||||
constructor Create(AOwner : TAbTarItem; AParent : TAbZipKit);
|
||||
protected
|
||||
{IArchiveItem}
|
||||
function Get_Action: TArchiveAction; safecall;
|
||||
function Get_CompressedSize: Integer; safecall;
|
||||
function Get_CRC32: Integer; safecall;
|
||||
function Get_CRC32St: WideString; safecall;
|
||||
function Get_DiskFileName: WideString; safecall;
|
||||
function Get_DiskPath: WideString; safecall;
|
||||
function Get_ExternalFileAttributes: TFileAttributes; safecall;
|
||||
procedure Set_ExternalFileAttributes(Value: TFileAttributes); safecall;
|
||||
function Get_FileName: WideString; safecall;
|
||||
procedure Set_FileName(const Value: WideString); safecall;
|
||||
function Get_IsEncrypted: WordBool; safecall;
|
||||
function Get_LastModFileDateTime: TDateTime; safecall;
|
||||
function Get_StoredPath: WideString; safecall;
|
||||
function Get_Tagged: WordBool; safecall;
|
||||
procedure Set_Tagged(Value: WordBool); safecall;
|
||||
function Get_UnCompressedSize: Integer; safecall;
|
||||
function Get_Password: WideString; safecall;
|
||||
procedure Set_Password(const Value: WideString); safecall;
|
||||
|
||||
{ITarItem}
|
||||
function Get_DevMajor: Integer; safecall;
|
||||
procedure Set_DevMajor(Value: Integer); safecall;
|
||||
function Get_DevMinor: Integer; safecall;
|
||||
procedure Set_DevMinor(Value: Integer); safecall;
|
||||
function Get_GroupID: Integer; safecall;
|
||||
procedure Set_GroupID(Value: Integer); safecall;
|
||||
function Get_GroupName: WideString; safecall;
|
||||
procedure Set_GroupName(const Value: WideString); safecall;
|
||||
function Get_LinkFlag: Byte; safecall;
|
||||
procedure Set_LinkFlag(Value: Byte); safecall;
|
||||
function Get_LinkName: WideString; safecall;
|
||||
procedure Set_LinkName(const Value: WideString); safecall;
|
||||
function Get_Mode: Integer; safecall;
|
||||
procedure Set_Mode(Value: Integer); safecall;
|
||||
function Get_UserID: Integer; safecall;
|
||||
procedure Set_UserID(Value: Integer); safecall;
|
||||
function Get_UserName: WideString; safecall;
|
||||
procedure Set_UserName(const Value: WideString); safecall;
|
||||
|
||||
end;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
ComServ, {StStrL,} SysUtils;
|
||||
|
||||
{------------------------------------------------------------------------------}
|
||||
constructor TTarItem.Create(AOwner : TAbTarItem; AParent : TAbZipKit);
|
||||
begin
|
||||
inherited Create(ComServer.TypeLib, ITarItem);
|
||||
FOwner := AOwner;
|
||||
FParent := AParent;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
{IArchiveItem}
|
||||
{------------------------------------------------------------------------------}
|
||||
function TTarItem.Get_Action: TArchiveAction;
|
||||
begin
|
||||
Result := TArchiveAction(FOwner.Action);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TTarItem.Get_CompressedSize: Integer;
|
||||
begin
|
||||
result := FOwner.CompressedSize;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TTarItem.Get_CRC32: Integer;
|
||||
begin
|
||||
result := FOwner.CRC32;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TTarItem.Get_CRC32St: WideString;
|
||||
begin
|
||||
result := IntToHex(FOwner.CRC32, 8);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TTarItem.Get_DiskFileName: WideString;
|
||||
begin
|
||||
result := FOwner.DiskFileName;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TTarItem.Get_DiskPath: WideString;
|
||||
begin
|
||||
result := FOwner.DiskPath;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TTarItem.Get_ExternalFileAttributes: TFileAttributes;
|
||||
begin
|
||||
result := TFileAttributes(FOwner.ExternalFileAttributes);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TTarItem.Set_ExternalFileAttributes(Value: TFileAttributes);
|
||||
begin
|
||||
FOwner.ExternalFileAttributes := LongInt(Value);
|
||||
FParent.ZipArchive.IsDirty := True;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TTarItem.Get_FileName: WideString;
|
||||
begin
|
||||
result := FOwner.FileName;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TTarItem.Set_FileName(const Value: WideString);
|
||||
begin
|
||||
FOwner.FileName := Value;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TTarItem.Get_IsEncrypted: WordBool;
|
||||
begin
|
||||
result := FOwner.IsEncrypted;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TTarItem.Get_LastModFileDateTime: TDateTime;
|
||||
begin
|
||||
result := FileDateToDateTime((FOwner.LastModFileDate shl 16) + FOwner.LastModFileTime);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TTarItem.Get_StoredPath: WideString;
|
||||
begin
|
||||
result := FOwner.StoredPath;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TTarItem.Get_Tagged: WordBool;
|
||||
begin
|
||||
result := FOwner.Tagged;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TTarItem.Set_Tagged(Value: WordBool);
|
||||
begin
|
||||
FOwner.Tagged := Value;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TTarItem.Get_UnCompressedSize: Integer;
|
||||
begin
|
||||
result := FOwner.UncompressedSize;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TTarItem.Get_Password: WideString;
|
||||
begin
|
||||
{!!!}
|
||||
//result := FOwner.Password;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TTarItem.Set_Password(const Value: WideString);
|
||||
begin
|
||||
{!!!}
|
||||
//FOwner.Password := Value;
|
||||
//FParent.ZipArchive.IsDirty := True;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
{ITarItem}
|
||||
{------------------------------------------------------------------------------}
|
||||
function TTarItem.Get_DevMajor: Integer;
|
||||
begin
|
||||
result := FOwner.DevMajor;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TTarItem.Set_DevMajor(Value: Integer);
|
||||
begin
|
||||
FOwner.DevMajor := Value;
|
||||
FParent.ZipArchive.IsDirty := True;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TTarItem.Get_DevMinor: Integer;
|
||||
begin
|
||||
result := FOwner.DevMinor;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TTarItem.Set_DevMinor(Value: Integer);
|
||||
begin
|
||||
FOwner.DevMinor := Value;
|
||||
FParent.ZipArchive.IsDirty := True;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TTarItem.Get_GroupID: Integer;
|
||||
begin
|
||||
result := FOwner.GroupID;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TTarItem.Set_GroupID(Value: Integer);
|
||||
begin
|
||||
FOwner.GroupID := Value;
|
||||
FParent.ZipArchive.IsDirty := True;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TTarItem.Get_GroupName: WideString;
|
||||
begin
|
||||
result := FOwner.GroupName;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TTarItem.Set_GroupName(const Value: WideString);
|
||||
begin
|
||||
FOwner.GroupName := Value;
|
||||
FParent.ZipArchive.IsDirty := True;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TTarItem.Get_LinkFlag: Byte;
|
||||
begin
|
||||
result := Byte(FOwner.LinkFlag);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TTarItem.Set_LinkFlag(Value: Byte);
|
||||
begin
|
||||
FOwner.LinkFlag := AnsiChar(Value);
|
||||
FParent.ZipArchive.IsDirty := True;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TTarItem.Get_LinkName: WideString;
|
||||
begin
|
||||
result := FOwner.LinkName;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TTarItem.Set_LinkName(const Value: WideString);
|
||||
begin
|
||||
FOwner.LinkName := Value;
|
||||
FParent.ZipArchive.IsDirty := True;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TTarItem.Get_Mode: Integer;
|
||||
begin
|
||||
result := FOwner.Mode;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TTarItem.Set_Mode(Value: Integer);
|
||||
begin
|
||||
FOwner.Mode := Value;
|
||||
FParent.ZipArchive.IsDirty := True;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TTarItem.Get_UserID: Integer;
|
||||
begin
|
||||
result := FOwner.UserID;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TTarItem.Set_UserID(Value: Integer);
|
||||
begin
|
||||
FOwner.UserID := Value;
|
||||
FParent.ZipArchive.IsDirty := True;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TTarItem.Get_UserName: WideString;
|
||||
begin
|
||||
result := FOwner.UserName;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TTarItem.Set_UserName(const Value: WideString);
|
||||
begin
|
||||
FOwner.UserName := Value;
|
||||
FParent.ZipArchive.IsDirty := True;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
|
||||
|
||||
end.
|
255
Abbrevia/source/COM/_ZipItem.pas
Normal file
255
Abbrevia/source/COM/_ZipItem.pas
Normal file
@@ -0,0 +1,255 @@
|
||||
(* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is TurboPower Abbrevia
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* TurboPower Software
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** *)
|
||||
|
||||
unit _ZipItem;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
ComObj, Abbrevia_TLB, AbZipTyp, AbZipKit;
|
||||
|
||||
type
|
||||
TZipItem = class(TAutoIntfObject, IZipItem)
|
||||
private
|
||||
FOwner : TAbZipItem;
|
||||
FParent : TAbZipKit;
|
||||
public
|
||||
constructor Create(AOwner : TAbZipItem; AParent : TAbZipKit);
|
||||
protected
|
||||
{IArchiveItem}
|
||||
function Get_Action: TArchiveAction; safecall;
|
||||
function Get_CompressedSize: Integer; safecall;
|
||||
function Get_CRC32: Integer; safecall;
|
||||
function Get_CRC32St: WideString; safecall;
|
||||
function Get_DiskFileName: WideString; safecall;
|
||||
function Get_DiskPath: WideString; safecall;
|
||||
function Get_ExternalFileAttributes: TFileAttributes; safecall;
|
||||
procedure Set_ExternalFileAttributes(Value: TFileAttributes); safecall;
|
||||
function Get_FileName: WideString; safecall;
|
||||
procedure Set_FileName(const Value: WideString); safecall;
|
||||
function Get_IsEncrypted: WordBool; safecall;
|
||||
function Get_LastModFileDateTime: TDateTime; safecall;
|
||||
function Get_StoredPath: WideString; safecall;
|
||||
function Get_Tagged: WordBool; safecall;
|
||||
procedure Set_Tagged(Value: WordBool); safecall;
|
||||
function Get_UnCompressedSize: Integer; safecall;
|
||||
function Get_Password: WideString; safecall;
|
||||
procedure Set_Password(const Value: WideString); safecall;
|
||||
|
||||
{IZipItem}
|
||||
function Get_CompressionMethod: TZipCompressionMethod; safecall;
|
||||
function Get_CompressionRatio: Double; safecall;
|
||||
function Get_DeflateOption: TZipDeflateOption; safecall;
|
||||
function Get_DictionarySize: TZipDictionarySize; safecall;
|
||||
function Get_DiskNumberStart: Integer; safecall;
|
||||
function Get_ExtraField: WideString; safecall;
|
||||
procedure Set_ExtraField(const Value: WideString); safecall;
|
||||
function Get_FileComment: WideString; safecall;
|
||||
procedure Set_FileComment(const Value: WideString); safecall;
|
||||
function Get_InternalFileAttributes: Integer; safecall;
|
||||
procedure Set_InternalFileAttributes(Value: Integer); safecall;
|
||||
function Get_VersionMadeBy: Integer; safecall;
|
||||
function Get_VersionNeededToExtract: Integer; safecall;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
ComServ, SysUtils;
|
||||
|
||||
{------------------------------------------------------------------------------}
|
||||
constructor TZipItem.Create(AOwner : TAbZipItem; AParent : TAbZipKit);
|
||||
begin
|
||||
inherited Create(ComServer.TypeLib, IZipItem);
|
||||
FOwner := AOwner;
|
||||
FParent := AParent;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
{IArchiveItem}
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipItem.Get_Action: TArchiveAction;
|
||||
begin
|
||||
Result := TArchiveAction(FOwner.Action);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipItem.Get_CompressedSize: Integer;
|
||||
begin
|
||||
result := FOwner.CompressedSize;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipItem.Get_CRC32: Integer;
|
||||
begin
|
||||
result := FOwner.CRC32;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipItem.Get_CRC32St: WideString;
|
||||
begin
|
||||
result := IntToHex(FOwner.CRC32, 8);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipItem.Get_DiskFileName: WideString;
|
||||
begin
|
||||
result := FOwner.DiskFileName;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipItem.Get_DiskPath: WideString;
|
||||
begin
|
||||
result := FOwner.DiskPath;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipItem.Get_ExternalFileAttributes: TFileAttributes;
|
||||
begin
|
||||
result := TFileAttributes(FOwner.ExternalFileAttributes);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipItem.Set_ExternalFileAttributes(Value: TFileAttributes);
|
||||
begin
|
||||
FOwner.ExternalFileAttributes := LongInt(Value);
|
||||
FParent.ZipArchive.IsDirty := True;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipItem.Get_FileName: WideString;
|
||||
begin
|
||||
result := FOwner.FileName;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipItem.Set_FileName(const Value: WideString);
|
||||
begin
|
||||
FOwner.FileName := Value;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipItem.Get_IsEncrypted: WordBool;
|
||||
begin
|
||||
result := FOwner.IsEncrypted;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipItem.Get_LastModFileDateTime: TDateTime;
|
||||
begin
|
||||
result := FileDateToDateTime((FOwner.LastModFileDate shl 16) + FOwner.LastModFileTime);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipItem.Get_StoredPath: WideString;
|
||||
begin
|
||||
result := FOwner.StoredPath;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipItem.Get_Tagged: WordBool;
|
||||
begin
|
||||
result := FOwner.Tagged;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipItem.Set_Tagged(Value: WordBool);
|
||||
begin
|
||||
FOwner.Tagged := Value;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipItem.Get_UnCompressedSize: Integer;
|
||||
begin
|
||||
result := FOwner.UncompressedSize;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipItem.Get_Password: WideString;
|
||||
begin
|
||||
Result := WideString(FParent.Password);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipItem.Set_Password(const Value: WideString);
|
||||
begin
|
||||
FParent.Password := AnsiString(Value);
|
||||
FParent.ZipArchive.IsDirty := True;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
{IZipItem}
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipItem.Get_CompressionMethod: TZipCompressionMethod;
|
||||
begin
|
||||
Result := TZipCompressionMethod(FOwner.CompressionMethod);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipItem.Get_CompressionRatio: Double;
|
||||
begin
|
||||
result := FOwner.CompressionRatio;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipItem.Get_DeflateOption: TZipDeflateOption;
|
||||
begin
|
||||
result := TZipDeflateOption(FOwner.DeflationOption);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipItem.Get_DictionarySize: TZipDictionarySize;
|
||||
begin
|
||||
result := TZipDictionarySize(FOwner.DictionarySize);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipItem.Get_DiskNumberStart: Integer;
|
||||
begin
|
||||
result := FOwner.DiskNumberStart;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipItem.Get_ExtraField: WideString;
|
||||
begin
|
||||
result := '';
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipItem.Set_ExtraField(const Value: WideString);
|
||||
begin
|
||||
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipItem.Get_FileComment: WideString;
|
||||
begin
|
||||
result := WideString(FOwner.FileComment);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipItem.Set_FileComment(const Value: WideString);
|
||||
begin
|
||||
FOwner.FileComment := AnsiString(Value);
|
||||
FParent.ZipArchive.IsDirty := True;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipItem.Get_InternalFileAttributes: Integer;
|
||||
begin
|
||||
result := FOwner.InternalFileAttributes;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipItem.Set_InternalFileAttributes(Value: Integer);
|
||||
begin
|
||||
FOwner.InternalFileAttributes := Value;
|
||||
FParent.ZipArchive.IsDirty := True;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipItem.Get_VersionMadeBy: Integer;
|
||||
begin
|
||||
result := FOwner.VersionMadeBy;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipItem.Get_VersionNeededToExtract: Integer;
|
||||
begin
|
||||
result := FOwner.VersionNeededToExtract;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
|
||||
|
||||
end.
|
771
Abbrevia/source/COM/_ZipKit.pas
Normal file
771
Abbrevia/source/COM/_ZipKit.pas
Normal file
@@ -0,0 +1,771 @@
|
||||
(* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is TurboPower Abbrevia
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* TurboPower Software
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** *)
|
||||
|
||||
unit _ZipKit;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
ComObj, Classes, Windows, Abbrevia_TLB, ActiveX, axctrls, AbZipKit, AbArcTyp,
|
||||
AbUtils, _ZipItem, _GZipItem, _TarItem, AbZipTyp, AbTarTyp, AbGzTyp,
|
||||
AbConst, AbBrowse;
|
||||
|
||||
type
|
||||
{$IFNDEF VER130}{$WARN SYMBOL_PLATFORM OFF}{$ENDIF}
|
||||
TZipKit = class(TAutoObject, IConnectionPointContainer, IEnumVariant, IZipKit)
|
||||
private
|
||||
{private declarations}
|
||||
FConnectionPoints : TConnectionPoints;
|
||||
FEvents : IZipKitEvents;
|
||||
FOwner : TAbZipKit;
|
||||
FEnumPos : Integer;
|
||||
|
||||
{Events for FOwner}
|
||||
procedure _OnArchiveItemProgress(Sender : TObject; Item : TAbArchiveItem; Progress : Byte; var Abort : Boolean);
|
||||
procedure _OnArchiveProgress(Sender : TObject; Progress : Byte; var Abort : Boolean);
|
||||
procedure _OnChange(Sender : TObject);
|
||||
procedure _OnConfirmOverwrite(var Name : string; var confirm : Boolean);
|
||||
procedure _OnConfirmProcessItem(Sender : TObject; Item : TAbArchiveItem; ProcessType : TAbProcessType; var Confirm : Boolean);
|
||||
procedure _OnConfirmSave(Sender : TObject; var Confirm : Boolean);
|
||||
procedure _OnLoad(Sender : TObject);
|
||||
procedure _OnNeedPassword(Sender : TObject; var NewPassword : AnsiString);
|
||||
procedure _OnProcessItemFailure(Sender : TObject; Item : TAbArchiveItem; ProcessType : TAbProcessType; ErrorClass : TAbErrorClass; ErrorCode : Integer);
|
||||
procedure _OnRequestBlankDisk(Sender : TObject; var Abort : Boolean);
|
||||
procedure _OnRequestImage(Sender : TObject; ImageNumber : Integer; var ImageName : string; var Abort : Boolean);
|
||||
procedure _OnRequestLastDisk(Sender : TObject; var Abort : Boolean);
|
||||
procedure _OnRequestNthDisk(Sender : TObject; DiskNumber : Byte; var Abort : Boolean);
|
||||
procedure _OnSave(Sender : TObject);
|
||||
|
||||
public
|
||||
procedure Initialize; override;
|
||||
destructor Destroy; override;
|
||||
|
||||
protected
|
||||
|
||||
{IConnectionPointContainer}
|
||||
property ConnectionPoints: TConnectionPoints read FConnectionPoints
|
||||
implements IConnectionPointContainer;
|
||||
procedure EventSinkChanged(const EventSink: IUnknown); override;
|
||||
|
||||
|
||||
{IEnumVariant}
|
||||
function Next(celt: LongWord; var rgvar : OleVariant; out pceltFetched: LongWord): HResult; stdcall;
|
||||
function Skip(celt: LongWord): HResult; stdcall;
|
||||
function Reset: HResult; stdcall;
|
||||
function Clone(out Enum: IEnumVariant): HResult; stdcall;
|
||||
|
||||
|
||||
{IZipKit}
|
||||
procedure Add(const FileMask: WideString; const ExclusionMask: WideString; SearchAttr: Integer); safecall;
|
||||
procedure AddFromStream(const FileName: WideString; Stream: OleVariant); safecall;
|
||||
function Get_AutoSave: WordBool; safecall;
|
||||
procedure Set_AutoSave(Value: WordBool); safecall;
|
||||
function Get_BaseDirectory: WideString; safecall;
|
||||
procedure Set_BaseDirectory(const Value: WideString); safecall;
|
||||
procedure ClearTags; safecall;
|
||||
function Get_CompressionMethodToUse: TZipSupportMethod; safecall;
|
||||
procedure Set_CompressionMethodToUse(Value: TZipSupportMethod); safecall;
|
||||
function Get_Count: Integer; safecall;
|
||||
function Get_DeflateOption: TZipDeflateOption; safecall;
|
||||
procedure Set_DeflateOption(Value: TZipDeflateOption); safecall;
|
||||
procedure Delete(const FileMask: WideString; const ExclusionMask: WideString); safecall;
|
||||
procedure DeleteAt(Index: Integer); safecall;
|
||||
procedure DeleteTaggedItems; safecall;
|
||||
function Get_DOSMode: WordBool; safecall;
|
||||
procedure Set_DOSMode(Value: WordBool); safecall;
|
||||
procedure Extract(const FileMask: WideString; const ExclusionMask: WideString); safecall;
|
||||
procedure ExtractAt(Index: Integer; const NewName: WideString); safecall;
|
||||
function Get_ExtractOptions: TZipExtractOptions; safecall;
|
||||
procedure Set_ExtractOptions(Value: TZipExtractOptions); safecall;
|
||||
procedure ExtractTaggedItems; safecall;
|
||||
function Get_FileName: WideString; safecall;
|
||||
procedure Set_FileName(const Value: WideString); safecall;
|
||||
function Find(const FileName: WideString): Integer; safecall;
|
||||
procedure Freshen(const FileMask: WideString; const ExclusionMask: WideString); safecall;
|
||||
procedure FreshenTaggedItems; safecall;
|
||||
function Get_Item(Index: Integer): IDispatch; safecall;
|
||||
function Get_LogFile: WideString; safecall;
|
||||
procedure Set_LogFile(const Value: WideString); safecall;
|
||||
function Get_Logging: WordBool; safecall;
|
||||
procedure Set_Logging(Value: WordBool); safecall;
|
||||
function Get_Password: WideString; safecall;
|
||||
procedure Set_Password(const Value: WideString); safecall;
|
||||
function Get_PasswordRetries: Byte; safecall;
|
||||
procedure Set_PasswordRetries(Value: Byte); safecall;
|
||||
procedure Replace(const FileMask: WideString); safecall;
|
||||
procedure Save; safecall;
|
||||
function Get_Spanned: WordBool; safecall;
|
||||
function Get_SpanningThreshold: Integer; safecall;
|
||||
procedure Set_SpanningThreshold(Value: Integer); safecall;
|
||||
function Get_Status: TArchiveStatus; safecall;
|
||||
function Get_StoreOptions: TStoreOptions; safecall;
|
||||
procedure Set_StoreOptions(Value: TStoreOptions); safecall;
|
||||
procedure TagItems(const FileMask: WideString); safecall;
|
||||
function Get_TempDirectory: WideString; safecall;
|
||||
procedure Set_TempDirectory(const Value: WideString); safecall;
|
||||
procedure TestTaggedItems; safecall;
|
||||
procedure UntagItems(const FileMask: WideString); safecall;
|
||||
function Get_ZipFileComment: WideString; safecall;
|
||||
procedure Set_ZipFileComment(const Value: WideString); safecall;
|
||||
function License(const Key: WideString): WordBool; safecall;
|
||||
function Get__NewEnum: IUnknown; safecall;
|
||||
function ExtractToStream(const FileName: WideString): OleVariant; safecall;
|
||||
function Get_CompressionType: TArchiveType; safecall;
|
||||
procedure Set_CompressionType(Value: TArchiveType); safecall;
|
||||
|
||||
function Get_TarAutoHandle: WordBool; safecall;
|
||||
procedure Set_TarAutoHandle(Value: WordBool); safecall;
|
||||
end;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
|
||||
uses
|
||||
ComServ;
|
||||
|
||||
{------------------------------------------------------------------------------}
|
||||
{IConnectionPointContainer}
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit.EventSinkChanged(const EventSink: IUnknown);
|
||||
begin
|
||||
FEvents := EventSink as IZipKitEvents;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
{IEnumVariant}
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipKit.Next(celt: LongWord; var rgvar : OleVariant; out pceltFetched: LongWord): HResult; stdcall;
|
||||
var
|
||||
V : OleVariant;
|
||||
I : Integer;
|
||||
begin
|
||||
Result := S_FALSE;
|
||||
try
|
||||
if @pceltFetched <> nil then
|
||||
pceltFetched := 0;
|
||||
for I := 0 to celt - 1 do begin
|
||||
if FEnumPos >= FOwner.Count then begin
|
||||
FEnumPos := 0;
|
||||
Exit;
|
||||
end;
|
||||
V := Get_Item(FEnumPos);
|
||||
PVariantArgList(@rgvar)[I] := TVariantArg(V);
|
||||
|
||||
{ Prevent COM garbage collection }
|
||||
TVarData(V).VType := varEmpty;
|
||||
TVarData(V).VInteger := 0;
|
||||
|
||||
Inc(FEnumPos);
|
||||
if @pceltFetched <> nil then
|
||||
Inc(pceltFetched);
|
||||
end;
|
||||
except
|
||||
end;
|
||||
if (@pceltFetched = nil) or (pceltFetched = celt) then
|
||||
Result := S_OK;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipKit.Skip(celt: LongWord): HResult;
|
||||
begin
|
||||
Inc(FEnumPos, celt);
|
||||
Result := S_OK;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipKit.Reset: HResult;
|
||||
begin
|
||||
FEnumPos := 0;
|
||||
Result := S_OK;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipKit.Clone(out Enum: IEnumVariant): HResult;
|
||||
begin
|
||||
Enum := nil;
|
||||
Result := S_OK;
|
||||
try
|
||||
Enum := Self.Create;
|
||||
TZipKit(Enum).FOwner := FOwner;
|
||||
except
|
||||
Result := E_OUTOFMEMORY;
|
||||
end;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
{IZipKit}
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit.Add(const FileMask: WideString; const ExclusionMask: WideString; SearchAttr: Integer);
|
||||
begin
|
||||
FOwner.AddFilesEx(FileMask, ExclusionMask, SearchAttr);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit.AddFromStream(const FileName: WideString; Stream: OleVariant);
|
||||
var
|
||||
InStream : TMemoryStream;
|
||||
Info : array of Byte;
|
||||
begin
|
||||
Info := nil;
|
||||
InStream := TMemoryStream.Create;
|
||||
try
|
||||
Info := Stream;
|
||||
InStream.Write(Info[0], Length(Info));
|
||||
InStream.Position := 0;
|
||||
FOwner.AddFromStream(FileName, InStream);
|
||||
finally
|
||||
InStream.Free;
|
||||
end;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipKit.Get_AutoSave: WordBool;
|
||||
begin
|
||||
Result := FOwner.AutoSave;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit.Set_AutoSave(Value: WordBool);
|
||||
begin
|
||||
FOwner.AutoSave := Value;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipKit.Get_BaseDirectory: WideString;
|
||||
begin
|
||||
Result := FOwner.BaseDirectory;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit.Set_BaseDirectory(const Value: WideString);
|
||||
begin
|
||||
FOwner.BaseDirectory := Value;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit.ClearTags;
|
||||
begin
|
||||
FOwner.ClearTags;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipKit.Get_CompressionMethodToUse: TZipSupportMethod;
|
||||
begin
|
||||
Result := TZipCompressionMethod(FOwner.CompressionMethodToUse);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit.Set_CompressionMethodToUse(Value: TZipSupportMethod);
|
||||
begin
|
||||
FOwner.CompressionMethodToUse := TAbZipSupportedMethod(Value);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipKit.Get_Count: Integer;
|
||||
begin
|
||||
Result := FOwner.Count;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipKit.Get_DeflateOption: TZipDeflateOption;
|
||||
begin
|
||||
Result := TZipDeflateOption(FOwner.DeflationOption);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit.Set_DeflateOption(Value: TZipDeflateOption);
|
||||
begin
|
||||
FOwner.DeflationOption := TAbZipDeflationOption(Value);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit.Delete(const FileMask: WideString; const ExclusionMask: WideString);
|
||||
begin
|
||||
FOwner.DeleteFilesEx(FileMask, ExclusionMask);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit.DeleteAt(Index: Integer);
|
||||
begin
|
||||
FOwner.DeleteAt(Index);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit.DeleteTaggedItems;
|
||||
begin
|
||||
FOwner.DeleteTaggedItems;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipKit.Get_DOSMode: WordBool;
|
||||
begin
|
||||
Result := FOwner.DOSMode;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit.Set_DOSMode(Value: WordBool);
|
||||
begin
|
||||
FOwner.DOSMode := Value;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit.Extract(const FileMask: WideString; const ExclusionMask: WideString);
|
||||
begin
|
||||
FOwner.ExtractFilesEx(FileMask, ExclusionMask);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit.ExtractAt(Index: Integer; const NewName: WideString);
|
||||
begin
|
||||
FOwner.ExtractAt(Index, NewName);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipKit.Get_ExtractOptions: TZipExtractOptions;
|
||||
begin
|
||||
Result := 0;
|
||||
if TAbExtractOption(eoCreateDirs) in FOwner.ExtractOptions then
|
||||
Result := Result + TZipExtractOptions(eoCreateDirs);
|
||||
if TAbExtractOption(eoRestorePath) in FOwner.ExtractOptions then
|
||||
Result := Result + TZipExtractOptions(eoRestorePath);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit.Set_ExtractOptions(Value: TZipExtractOptions);
|
||||
var
|
||||
TempOptions : TAbExtractOptions;
|
||||
begin
|
||||
TempOptions := [];
|
||||
if (Value or Abbrevia_TLB.eoCreateDirs) = Value then
|
||||
Include(TempOptions, AbArcTyp.eoCreateDirs);
|
||||
if (Value or Abbrevia_TLB.eoRestorePath) = Value then
|
||||
Include(TempOptions, AbArcTyp.eoRestorePath);
|
||||
FOwner.ExtractOptions := TempOptions
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit.ExtractTaggedItems;
|
||||
begin
|
||||
FOwner.ExtractTaggedItems;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipKit.Get_FileName: WideString;
|
||||
begin
|
||||
Result := FOwner.FileName;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit.Set_FileName(const Value: WideString);
|
||||
begin
|
||||
FOwner.FileName := Value;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipKit.Find(const FileName: WideString): Integer;
|
||||
begin
|
||||
Result := FOwner.FindFile(FileName);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit.Freshen(const FileMask: WideString; const ExclusionMask: WideString);
|
||||
begin
|
||||
FOwner.FreshenFilesEx(FileMask, ExclusionMask);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit.FreshenTaggedItems;
|
||||
begin
|
||||
FOwner.FreshenTaggedItems;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipKit.Get_Item(Index: Integer): IDispatch;
|
||||
begin
|
||||
Result := TZipItem.Create(FOwner.Items[Index], FOwner);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipKit.Get_LogFile: WideString;
|
||||
begin
|
||||
Result := FOwner.LogFile;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit.Set_LogFile(const Value: WideString);
|
||||
begin
|
||||
FOwner.LogFile := Value;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipKit.Get_Logging: WordBool;
|
||||
begin
|
||||
Result := FOwner.Logging;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit.Set_Logging(Value: WordBool);
|
||||
begin
|
||||
FOwner.Logging := Value;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipKit.Get_Password: WideString;
|
||||
begin
|
||||
Result := WideString(FOwner.Password);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit.Set_Password(const Value: WideString);
|
||||
begin
|
||||
FOwner.Password := AnsiString(Value);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipKit.Get_PasswordRetries: Byte;
|
||||
begin
|
||||
Result := FOwner.PasswordRetries;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit.Set_PasswordRetries(Value: Byte);
|
||||
begin
|
||||
FOwner.PasswordRetries := Value;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit.Replace(const FileMask: WideString);
|
||||
begin
|
||||
FOwner.Replace(FOwner.Items[FOwner.FindFile(FileMask)]);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit.Save;
|
||||
begin
|
||||
FOwner.Save;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipKit.Get_Spanned: WordBool;
|
||||
begin
|
||||
Result := FOwner.Spanned;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipKit.Get_SpanningThreshold: Integer;
|
||||
begin
|
||||
Result := FOwner.SpanningThreshold;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit.Set_SpanningThreshold(Value: Integer);
|
||||
begin
|
||||
FOwner.SpanningThreshold := Value;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipKit.Get_Status: TArchiveStatus;
|
||||
begin
|
||||
Result := TArchiveStatus(FOwner.Status);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipKit.Get_StoreOptions: TStoreOptions;
|
||||
begin
|
||||
Result := 0;
|
||||
if TAbStoreOption(soStripDrive) in FOwner.StoreOptions then
|
||||
Result := Result + TStoreOptions(soStripDrive);
|
||||
if TAbStoreOption(soStripPath) in FOwner.StoreOptions then
|
||||
Result := Result + TStoreOptions(soStripPath);
|
||||
if TAbStoreOption(soRemoveDots) in FOwner.StoreOptions then
|
||||
Result := Result + TStoreOptions(soRemoveDots);
|
||||
if TAbStoreOption(soRecurse) in FOwner.StoreOptions then
|
||||
Result := Result + TStoreOptions(soRecurse);
|
||||
if TAbStoreOption(soFreshen) in FOwner.StoreOptions then
|
||||
Result := Result + TStoreOptions(soFreshen);
|
||||
if TAbStoreOption(soReplace) in FOwner.StoreOptions then
|
||||
Result := Result + TStoreOptions(soReplace);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit.Set_StoreOptions(Value: TStoreOptions);
|
||||
var
|
||||
TempOptions : TAbStoreOptions;
|
||||
begin
|
||||
TempOptions := [];
|
||||
if (Value or Abbrevia_TLB.soStripDrive) = Value then
|
||||
Include(TempOptions, AbArcTyp.soStripDrive);
|
||||
if (Value or Abbrevia_TLB.soStripPath) = Value then
|
||||
Include(TempOptions, AbArcTyp.soStripPath);
|
||||
if (Value or Abbrevia_TLB.soRemoveDots) = Value then
|
||||
Include(TempOptions, AbArcTyp.soRemoveDots);
|
||||
if (Value or Abbrevia_TLB.soRecurse) = Value then
|
||||
Include(TempOptions, AbArcTyp.soRecurse);
|
||||
if (Value or Abbrevia_TLB.soFreshen) = Value then
|
||||
Include(TempOptions, AbArcTyp.soFreshen);
|
||||
if (Value or Abbrevia_TLB.soReplace) = Value then
|
||||
Include(TempOptions, AbArcTyp.soReplace);
|
||||
FOwner.StoreOptions := TempOptions
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit.TagItems(const FileMask: WideString);
|
||||
begin
|
||||
FOwner.TagItems(FileMask);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipKit.Get_TempDirectory: WideString;
|
||||
begin
|
||||
Result := FOwner.TempDirectory;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit.Set_TempDirectory(const Value: WideString);
|
||||
begin
|
||||
FOwner.TempDirectory := Value;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit.TestTaggedItems;
|
||||
begin
|
||||
FOwner.TestTaggedItems;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit.UntagItems(const FileMask: WideString);
|
||||
begin
|
||||
FOwner.UnTagItems(FileMask);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipKit.Get_ZipFileComment: WideString;
|
||||
begin
|
||||
Result := WideString(FOwner.ZipFileComment);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit.Set_ZipFileComment(const Value: WideString);
|
||||
begin
|
||||
FOwner.ZipfileComment := AnsiString(Value);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipKit.License(const Key: WideString): WordBool;
|
||||
begin
|
||||
Result := True;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipKit.Get__NewEnum: IUnknown;
|
||||
begin
|
||||
Result := Self;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipKit.ExtractToStream(const FileName: WideString): OleVariant;
|
||||
var
|
||||
Stream : TMemoryStream;
|
||||
Info : array of Byte;
|
||||
begin
|
||||
Stream := TMemoryStream.Create;
|
||||
try
|
||||
FOwner.ExtractToStream(FileName, Stream);
|
||||
Stream.Position := 0;
|
||||
SetLength(Info, Stream.Size);
|
||||
Stream.Read(Info[0], Stream.Size);
|
||||
Result := Info;
|
||||
finally
|
||||
Stream.Free;
|
||||
end;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipKit.Get_CompressionType: TArchiveType;
|
||||
begin
|
||||
Result := TArchiveType((FOwner as TAbBaseBrowser).ArchiveType);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit.Set_CompressionType(Value: TArchiveType);
|
||||
begin
|
||||
(FOwner as TAbBaseBrowser).ArchiveType := TAbArchiveType(ord(Value));
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
function TZipKit.Get_TarAutoHandle: WordBool;
|
||||
begin
|
||||
Result := FOwner.TarAutoHandle;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit.Set_TarAutoHandle(Value: WordBool);
|
||||
begin
|
||||
FOwner.TarAutoHandle := Value;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
{TZipKit Events}
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit._OnArchiveItemProgress(Sender : TObject; Item : TAbArchiveItem;
|
||||
Progress : Byte; var Abort : Boolean);
|
||||
var
|
||||
FAbort : WordBool;
|
||||
begin
|
||||
FAbort := Abort;
|
||||
if Assigned(FEvents) then begin
|
||||
if ((FOwner as TAbBaseBrowser).ArchiveType = atZip) then
|
||||
FEvents.OnArchiveItemProgress(TZipItem.Create(TAbZipItem(Item), FOwner),
|
||||
Progress, FAbort)
|
||||
else if ((FOwner as TAbBaseBrowser).ArchiveType = atTar) then
|
||||
FEvents.OnArchiveItemProgress(TTarItem.Create(TAbTarItem(Item), FOwner),
|
||||
Progress, FAbort)
|
||||
else if ((FOwner as TAbBaseBrowser).ArchiveType = atGZip) then
|
||||
FEvents.OnArchiveItemProgress(TGZipItem.Create(TAbGZipItem(Item), FOwner),
|
||||
Progress, FAbort);
|
||||
end;
|
||||
Abort := FAbort;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit._OnArchiveProgress(Sender : TObject; Progress : Byte;
|
||||
var Abort : Boolean);
|
||||
var
|
||||
FAbort : WordBool;
|
||||
begin
|
||||
FAbort := Abort;
|
||||
if Assigned(FEvents) then
|
||||
FEvents.OnArchiveProgress(Progress, FAbort);
|
||||
Abort := FAbort;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit._OnChange(Sender : TObject);
|
||||
begin
|
||||
if Assigned(FEvents) then
|
||||
FEvents.OnChange;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit._OnConfirmOverwrite(var Name : string; var confirm : Boolean);
|
||||
var
|
||||
FConfirm : WordBool;
|
||||
FName : WideString;
|
||||
begin
|
||||
FConfirm := Confirm;
|
||||
FName := Name;
|
||||
if Assigned(FEvents) then
|
||||
FEvents.OnConfirmOverwrite(FName, FConfirm);
|
||||
Name := FName;
|
||||
Confirm := FConfirm;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit._OnConfirmProcessItem(Sender : TObject; Item : TAbArchiveItem;
|
||||
ProcessType : TAbProcessType; var Confirm : Boolean);
|
||||
var
|
||||
FConfirm : WordBool;
|
||||
begin
|
||||
FConfirm := Confirm;
|
||||
if Assigned(FEvents) then begin
|
||||
if ((FOwner as TAbBaseBrowser).ArchiveType = atZip) then
|
||||
FEvents.OnConfirmProcessItem(TZipItem.Create(TAbZipItem(Item), FOwner),
|
||||
TProcessType(ProcessType), FConfirm)
|
||||
else if ((FOwner as TAbBaseBrowser).ArchiveType = atTar) then
|
||||
FEvents.OnConfirmProcessItem(TTarItem.Create(TAbTarItem(Item), FOwner),
|
||||
TProcessType(ProcessType), FConfirm)
|
||||
else if ((FOwner as TAbBaseBrowser).ArchiveType = atGZip) then
|
||||
FEvents.OnConfirmProcessItem(TGZipItem.Create(TAbGZipItem(Item), FOwner),
|
||||
TProcessType(ProcessType), FConfirm);
|
||||
end;
|
||||
Confirm := FConfirm
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit._OnConfirmSave(Sender : TObject; var Confirm : Boolean);
|
||||
var
|
||||
FConfirm : WordBool;
|
||||
begin
|
||||
FConfirm := Confirm;
|
||||
if Assigned(FEvents) then
|
||||
FEvents.OnConfirmSave(FConfirm);
|
||||
Confirm := FConfirm;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit._OnLoad(Sender : TObject);
|
||||
begin
|
||||
if Assigned(FEvents) then
|
||||
FEvents.OnLoad;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit._OnNeedPassword(Sender : TObject; var NewPassword : AnsiString);
|
||||
var
|
||||
FNewPassword : WideString;
|
||||
begin
|
||||
FNewPassword := WideString(NewPassword);
|
||||
if Assigned(FEvents) then
|
||||
FEvents.OnNeedPassword(FNewPassword);
|
||||
NewPassword := AnsiString(FNewPassword);
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit._OnProcessItemFailure(Sender : TObject; Item : TAbArchiveItem;
|
||||
ProcessType : TAbProcessType; ErrorClass : TAbErrorClass;
|
||||
ErrorCode : Integer);
|
||||
begin
|
||||
if Assigned(FEvents) then begin
|
||||
if ((FOwner as TAbBaseBrowser).ArchiveType = atZip) then
|
||||
FEvents.OnProcessItemFailure(TZipItem.Create(TAbZipItem(Item), FOwner),
|
||||
TProcessType(ProcessType), TErrorClass(ErrorClass),
|
||||
TErrorCode(ErrorCode), AbStrRes(ErrorCode))
|
||||
else if ((FOwner as TAbBaseBrowser).ArchiveType = atTar) then
|
||||
FEvents.OnProcessItemFailure(TTarItem.Create(TAbTarItem(Item), FOwner),
|
||||
TProcessType(ProcessType), TErrorClass(ErrorClass),
|
||||
TErrorCode(ErrorCode),AbStrRes(ErrorCode))
|
||||
else if ((FOwner as TAbBaseBrowser).ArchiveType = atGZip) then
|
||||
FEvents.OnProcessItemFailure(TGZipItem.Create(TAbGZipItem(Item), FOwner),
|
||||
TProcessType(ProcessType), TErrorClass(ErrorClass),
|
||||
TErrorCode(ErrorCode),AbStrRes(ErrorCode));
|
||||
end;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit._OnRequestBlankDisk(Sender : TObject; var Abort : Boolean);
|
||||
var
|
||||
FAbort : WordBool;
|
||||
begin
|
||||
FAbort := Abort;
|
||||
if Assigned(FEvents) then
|
||||
FEvents.OnRequestBlankDisk(FAbort);
|
||||
Abort := FAbort;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit._OnRequestImage(Sender : TObject; ImageNumber : Integer; var ImageName : string; var Abort : Boolean);
|
||||
var
|
||||
FImageName : WideString;
|
||||
FAbort : WordBool;
|
||||
begin
|
||||
FImageName := ImageName;
|
||||
FAbort := Abort;
|
||||
if Assigned(FEvents) then
|
||||
FEvents.OnRequestImage(ImageNumber, FImageName, FAbort);
|
||||
Abort := FAbort;
|
||||
ImageName := FImageName;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit._OnRequestLastDisk(Sender : TObject; var Abort : Boolean);
|
||||
var
|
||||
FAbort : WordBool;
|
||||
begin
|
||||
FAbort := Abort;
|
||||
if Assigned(FEvents) then
|
||||
FEvents.OnRequestLastDisk(FAbort);
|
||||
Abort := FAbort;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit._OnRequestNthDisk(Sender : TObject; DiskNumber : Byte; var Abort : Boolean);
|
||||
var
|
||||
FAbort : WordBool;
|
||||
begin
|
||||
FAbort := Abort;
|
||||
if Assigned(FEvents) then
|
||||
FEvents.OnRequestNthDisk(DiskNumber, FAbort);
|
||||
Abort := FAbort;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit._OnSave(Sender : TObject);
|
||||
begin
|
||||
if Assigned(FEvents) then
|
||||
FEvents.OnSave;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TZipKit.Initialize;
|
||||
begin
|
||||
inherited Initialize;
|
||||
FConnectionPoints := TConnectionPoints.Create(Self);
|
||||
if AutoFactory.EventTypeInfo <> nil then
|
||||
FConnectionPoints.CreateConnectionPoint(AutoFactory.EventIID,
|
||||
ckSingle, EventConnect);
|
||||
FOwner := AbZipKit.TAbZipKit.Create(nil);
|
||||
FOwner.OnArchiveItemProgress := _OnArchiveItemProgress;
|
||||
FOwner.OnArchiveProgress := _OnArchiveProgress;
|
||||
FOwner.OnChange := _OnChange;
|
||||
FOwner.OnConfirmOverwrite := _OnConfirmOverwrite;
|
||||
FOwner.OnConfirmProcessItem := _OnConfirmProcessItem;
|
||||
FOwner.OnConfirmSave := _OnConfirmSave;
|
||||
FOwner.OnLoad := _OnLoad;
|
||||
FOwner.OnNeedPassword := _OnNeedPassword;
|
||||
FOwner.OnProcessItemFailure := _OnProcessItemFailure;
|
||||
FOwner.OnRequestBlankDisk := _OnRequestBlankDisk;
|
||||
FOwner.OnRequestImage := _OnRequestImage;
|
||||
FOwner.OnRequestLastDisk := _OnRequestLastDisk;
|
||||
FOwner.OnRequestNthDisk := _OnRequestNthDisk;
|
||||
FOwner.OnSave := _OnSave;
|
||||
FEnumPos := 0;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
destructor TZipKit.Destroy;
|
||||
begin
|
||||
FOwner.Free;
|
||||
inherited Destroy;
|
||||
end;
|
||||
{------------------------------------------------------------------------------}
|
||||
|
||||
initialization
|
||||
TAutoObjectFactory.Create(ComServer, TZipKit, Class_ZipKit, ciMultiInstance, tmBoth);
|
||||
|
||||
|
||||
end.
|
Reference in New Issue
Block a user