// Borland C++ Builder
// Copyright (c) 1995, 1999 by Borland International
// All rights reserved

// (DO NOT EDIT: machine generated header) 'sgZip.pas' rev: 5.00

#ifndef sgZipHPP
#define sgZipHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <zlibpas_sg.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.hpp>	// Pascal unit

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

namespace Sgzip
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TsgDWFFileExt { feW2D, fePNG, feXML, feUndefined };
#pragma option pop

#pragma option push -b-
enum TsgXMLFileTag { xmlManifest, xmlDescriptor, xmlUndefined };
#pragma option pop

#pragma option push -b-
enum TsgDWFResTypeTag { resThumbnail, res2dsg, resUndefined };
#pragma option pop

struct TsgEPlotSection;
typedef TsgEPlotSection *PsgEPlotSection;

struct TsgEPlotSection
{
	int IndInZip;
	int FileLength;
	AnsiString Title;
	AnsiString LayoutName;
	AnsiString Company;
	AnsiString Author;
	AnsiString CreationTime;
	AnsiString ModificationTime;
	AnsiString Width;
	AnsiString Height;
	AnsiString Units;
	AnsiString Order;
	AnsiString Graphic;
} ;

class DELPHICLASS EsgDWFUnzip;
class PASCALIMPLEMENTATION EsgDWFUnzip : public Sysutils::Exception 
{
	typedef Sysutils::Exception inherited;
	
public:
	#pragma option push -w-inl
	/* Exception.Create */ inline __fastcall EsgDWFUnzip(const AnsiString Msg) : Sysutils::Exception(Msg
		) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateFmt */ inline __fastcall EsgDWFUnzip(const AnsiString Msg, const System::TVarRec 
		* Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateRes */ inline __fastcall EsgDWFUnzip(int Ident)/* overload */ : Sysutils::Exception(
		Ident) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateResFmt */ inline __fastcall EsgDWFUnzip(int Ident, const System::TVarRec * Args, 
		const int Args_Size)/* overload */ : Sysutils::Exception(Ident, Args, Args_Size) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateHelp */ inline __fastcall EsgDWFUnzip(const AnsiString Msg, int AHelpContext) : 
		Sysutils::Exception(Msg, AHelpContext) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateFmtHelp */ inline __fastcall EsgDWFUnzip(const AnsiString Msg, const System::TVarRec 
		* Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
		) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateResHelp */ inline __fastcall EsgDWFUnzip(int Ident, int AHelpContext)/* overload */
		 : Sysutils::Exception(Ident, AHelpContext) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateResFmtHelp */ inline __fastcall EsgDWFUnzip(System::PResStringRec ResStringRec, 
		const System::TVarRec * Args, const int Args_Size, int AHelpContext)/* overload */ : Sysutils::Exception(
		ResStringRec, Args, Args_Size, AHelpContext) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~EsgDWFUnzip(void) { }
	#pragma option pop
	
};


class DELPHICLASS TsgDWFUnzip;
class PASCALIMPLEMENTATION TsgDWFUnzip : public System::TObject 
{
	typedef System::TObject inherited;
	
private:
	Classes::TMemoryStream* FStream;
	Classes::TList* FContents;
	Classes::TList* FEPlotSections;
	bool __fastcall GetContents(void);
	void __fastcall Reset(void);
	TsgDWFFileExt __fastcall GetFileExt(const AnsiString AFileName);
	Classes::TList* __fastcall GetContent(void);
	Classes::TList* __fastcall GetEPlotSections(void);
	
protected:
	TsgXMLFileTag __fastcall GetXMLType(AnsiString FileName);
	
public:
	__fastcall TsgDWFUnzip(void);
	__fastcall virtual ~TsgDWFUnzip(void);
	bool __fastcall ExtractFile(int FileIndex, Classes::TStream* AStream);
	void __fastcall LoadFromFile(const AnsiString AFileName);
	void __fastcall LoadFromStream(Classes::TStream* AStream);
	__property Classes::TList* Contents = {read=GetContent};
	__property Classes::TList* EPlotSections = {read=GetEPlotSections};
};


//-- var, const, procedure ---------------------------------------------------
extern PACKAGE bool __fastcall UnPackGZStream(Classes::TStream* AGZStream, Classes::TStream* AOutStream
	, AnsiString &FileName);
extern PACKAGE bool __fastcall UnPackStream(Classes::TStream* AStream);
extern PACKAGE bool __fastcall PackStream(Classes::TStream* AStream);
extern PACKAGE bool __fastcall UnPackSTBStream(Classes::TStream* ASTBStream, Classes::TStringList* ASTBFile
	);

}	/* namespace Sgzip */
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Sgzip;
#endif
#pragma option pop	// -w-
#pragma option pop	// -Vx

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