// CodeGear C++Builder
// Copyright (c) 1995, 2009 by Embarcadero Technologies, Inc.
// All rights reserved

// (DO NOT EDIT: machine generated header) 'Smizipfile.pas' rev: 21.00

#ifndef SmizipfileHPP
#define SmizipfileHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <Sysinit.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <Sysutils.hpp>	// Pascal unit

//-- user supplied -----------------------------------------------------------

namespace Smizipfile
{
//-- type declarations -------------------------------------------------------
#pragma pack(push,1)
struct TCommonFileHeader
{
	
public:
	System::Word VersionNeededToExtract;
	System::Word GeneralPurposeBitFlag;
	System::Word CompressionMethod;
	unsigned LastModFileTimeDate;
	unsigned Crc32;
	unsigned CompressedSize;
	unsigned UncompressedSize;
	System::Word FilenameLength;
	System::Word ExtraFieldLength;
};
#pragma pack(pop)


#pragma pack(push,1)
struct TFileHeader
{
	
public:
	unsigned CentralFileHeaderSignature;
	System::Word VersionMadeBy;
	TCommonFileHeader CommonFileHeader;
	System::Word FileCommentLength;
	System::Word DiskNumberStart;
	System::Word InternalFileAttributes;
	unsigned ExternalFileAttributes;
	unsigned RelativeOffsetOfLocalHeader;
	System::AnsiString FileName;
	System::AnsiString ExtraField;
	System::AnsiString FileComment;
};
#pragma pack(pop)


#pragma pack(push,1)
struct TEndOfCentralDir
{
	
public:
	unsigned EndOfCentralDirSignature;
	System::Word NumberOfThisDisk;
	System::Word NumberOfTheDiskWithTheStart;
	System::Word TotalNumberOfEntriesOnThisDisk;
	System::Word TotalNumberOfEntries;
	unsigned SizeOfTheCentralDirectory;
	unsigned OffsetOfStartOfCentralDirectory;
	System::Word ZipfileCommentLength;
};
#pragma pack(pop)


class DELPHICLASS TLocalFile;
class PASCALIMPLEMENTATION TLocalFile : public Classes::TCollectionItem
{
	typedef Classes::TCollectionItem inherited;
	
private:
	unsigned FLocalFileHeaderSignature;
	TCommonFileHeader FCommonFileHeader;
	System::AnsiString FFileName;
	System::AnsiString FExtraField;
	System::AnsiString FCompressedData;
	unsigned FCentralFileHeaderSignature;
	System::Word FCentralVersionMadeBy;
	TCommonFileHeader FCentralCommonFileHeader;
	System::Word FCentralFileCommentLength;
	System::Word FCentralDiskNumberStart;
	System::Word FCentralInternalFileAttributes;
	unsigned FCentralExternalFileAttributes;
	unsigned FCentralRelativeOffsetOfLocalHeader;
	System::AnsiString FCentralFileName;
	System::AnsiString FCentralExtraField;
	System::AnsiString FCentralFileComment;
	
protected:
	bool FHeaderRead;
	
public:
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	void __fastcall LoadFileFromStream(Classes::TStream* AStream);
	void __fastcall LoadCentralDirectoryFromStream(Classes::TStream* AStream);
	
__published:
	__property unsigned LocalFileHeaderSignature = {read=FLocalFileHeaderSignature, write=FLocalFileHeaderSignature, nodefault};
	
public:
	__property TCommonFileHeader CommonFileHeader = {read=FCommonFileHeader, write=FCommonFileHeader};
	
__published:
	__property System::AnsiString FileName = {read=FFileName, write=FFileName};
	__property System::AnsiString ExtraField = {read=FExtraField, write=FExtraField};
	__property System::AnsiString CompressedData = {read=FCompressedData, write=FCompressedData};
	__property unsigned CentralFileHeaderSignature = {read=FCentralFileHeaderSignature, write=FCentralFileHeaderSignature, nodefault};
	__property System::Word CentralVersionMadeBy = {read=FCentralVersionMadeBy, write=FCentralVersionMadeBy, nodefault};
	
public:
	__property TCommonFileHeader CentralCommonFileHeader = {read=FCentralCommonFileHeader, write=FCentralCommonFileHeader};
	
__published:
	__property System::Word CentralFileCommentLength = {read=FCentralFileCommentLength, write=FCentralFileCommentLength, nodefault};
	__property System::Word CentralDiskNumberStart = {read=FCentralDiskNumberStart, write=FCentralDiskNumberStart, nodefault};
	__property System::Word CentralInternalFileAttributes = {read=FCentralInternalFileAttributes, write=FCentralInternalFileAttributes, nodefault};
	__property unsigned CentralExternalFileAttributes = {read=FCentralExternalFileAttributes, write=FCentralExternalFileAttributes, nodefault};
	__property unsigned CentralRelativeOffsetOfLocalHeader = {read=FCentralRelativeOffsetOfLocalHeader, write=FCentralRelativeOffsetOfLocalHeader, nodefault};
	__property System::AnsiString CentralFileName = {read=FCentralFileName, write=FCentralFileName};
	__property System::AnsiString CentralExtraField = {read=FCentralExtraField, write=FCentralExtraField};
	__property System::AnsiString CentralFileComment = {read=FCentralFileComment, write=FCentralFileComment};
public:
	/* TCollectionItem.Create */ inline __fastcall virtual TLocalFile(Classes::TCollection* Collection) : Classes::TCollectionItem(Collection) { }
	/* TCollectionItem.Destroy */ inline __fastcall virtual ~TLocalFile(void) { }
	
};


class DELPHICLASS TLocalFiles;
class PASCALIMPLEMENTATION TLocalFiles : public Classes::TCollection
{
	typedef Classes::TCollection inherited;
	
public:
	TLocalFile* operator[](int Index) { return Items[Index]; }
	
private:
	Classes::TComponent* FControl;
	TLocalFile* __fastcall GetLocalFile(int Index);
	void __fastcall SetLocalFile(int Index, TLocalFile* Value);
	
protected:
	DYNAMIC Classes::TPersistent* __fastcall GetOwner(void);
	
public:
	__fastcall TLocalFiles(Classes::TComponent* ACntrl);
	HIDESBASE TLocalFile* __fastcall Add(void);
	__property Classes::TComponent* OwnerControl = {read=FControl};
	__property TLocalFile* Items[int Index] = {read=GetLocalFile, write=SetLocalFile/*, default*/};
public:
	/* TCollection.Destroy */ inline __fastcall virtual ~TLocalFiles(void) { }
	
};


class DELPHICLASS TZipArchive;
class PASCALIMPLEMENTATION TZipArchive : public Classes::TComponent
{
	typedef Classes::TComponent inherited;
	
private:
	TLocalFiles* Files;
	TEndOfCentralDir EndOfCentralDirectory;
	System::UnicodeString ZipFileComment;
	System::AnsiString __fastcall GetUncompressed(int i);
	int __fastcall GetCount(void);
	
public:
	__fastcall virtual TZipArchive(Classes::TComponent* AOwner);
	__fastcall virtual ~TZipArchive(void);
	int __fastcall GetIndexByFileName(const System::UnicodeString AFileName);
	System::UnicodeString __fastcall DecompressFileName(const System::UnicodeString AFileName);
	void __fastcall LoadFromFile(const System::UnicodeString FileName);
	void __fastcall LoadFromStream(const Classes::TStream* ZipFileStream);
	void __fastcall GetFileNames(Classes::TStrings* lstFiles);
	__property int Count = {read=GetCount, nodefault};
	__property System::AnsiString Uncompressed[int i] = {read=GetUncompressed};
};


class DELPHICLASS EZipFileCRCError;
class PASCALIMPLEMENTATION EZipFileCRCError : public Sysutils::Exception
{
	typedef Sysutils::Exception inherited;
	
public:
	/* Exception.Create */ inline __fastcall EZipFileCRCError(const System::UnicodeString Msg) : Sysutils::Exception(Msg) { }
	/* Exception.CreateFmt */ inline __fastcall EZipFileCRCError(const System::UnicodeString Msg, System::TVarRec const *Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
	/* Exception.CreateRes */ inline __fastcall EZipFileCRCError(int Ident)/* overload */ : Sysutils::Exception(Ident) { }
	/* Exception.CreateResFmt */ inline __fastcall EZipFileCRCError(int Ident, System::TVarRec const *Args, const int Args_Size)/* overload */ : Sysutils::Exception(Ident, Args, Args_Size) { }
	/* Exception.CreateHelp */ inline __fastcall EZipFileCRCError(const System::UnicodeString Msg, int AHelpContext) : Sysutils::Exception(Msg, AHelpContext) { }
	/* Exception.CreateFmtHelp */ inline __fastcall EZipFileCRCError(const System::UnicodeString Msg, System::TVarRec const *Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext) { }
	/* Exception.CreateResHelp */ inline __fastcall EZipFileCRCError(int Ident, int AHelpContext)/* overload */ : Sysutils::Exception(Ident, AHelpContext) { }
	/* Exception.CreateResFmtHelp */ inline __fastcall EZipFileCRCError(System::PResStringRec ResStringRec, System::TVarRec const *Args, const int Args_Size, int AHelpContext)/* overload */ : Sysutils::Exception(ResStringRec, Args, Args_Size, AHelpContext) { }
	/* Exception.Destroy */ inline __fastcall virtual ~EZipFileCRCError(void) { }
	
};


//-- var, const, procedure ---------------------------------------------------

}	/* namespace Smizipfile */
using namespace Smizipfile;
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// SmizipfileHPP
