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

// (DO NOT EDIT: machine generated header) 'MSPalmDoc.pas' rev: 36.00 (Windows)

#ifndef MSPalmDocHPP
#define MSPalmDocHPP

#pragma delphiheader begin
#pragma option push
#if defined(__BORLANDC__) && !defined(__clang__)
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member 
#endif
#pragma pack(push,8)
#include <System.hpp>
#include <SysInit.hpp>
#include <System.Classes.hpp>
#include <System.SysUtils.hpp>
#include <MSWBase.hpp>
#include <Winapi.Windows.hpp>
#include <System.Types.hpp>

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

namespace Mspalmdoc
{
//-- forward type declarations -----------------------------------------------
struct TPDBHeader;
struct TPDB_DocRecord0;
struct TPDB_PeanutHeader;
class DELPHICLASS TPalmDocFile;
//-- type declarations -------------------------------------------------------
#pragma pack(push,1)
struct DECLSPEC_DRECORD TPDBHeader
{
public:
	System::StaticArray<char, 32> Name;
	System::Word Attributes;
	System::Word Version;
	unsigned CreateTime;
	unsigned ModifyTime;
	unsigned BackupTime;
	unsigned ModificationNumber;
	unsigned AppInfoIDc;
	unsigned SortInfoID;
	System::StaticArray<char, 4> PDBType;
	System::StaticArray<char, 4> Creator;
	unsigned IDSeed;
	unsigned NextRecordList;
	System::Word NumRecords;
};
#pragma pack(pop)


#pragma pack(push,1)
struct DECLSPEC_DRECORD TPDB_DocRecord0
{
public:
	System::Word Version;
	System::Word spare;
	unsigned DocSize;
	System::Word NumRecords;
	System::Word RecSize;
	unsigned Position;
};
#pragma pack(pop)


#pragma pack(push,1)
struct DECLSPEC_DRECORD TPDB_PeanutHeader
{
public:
	System::Word Version;
	System::StaticArray<char, 6> Junk1;
	System::Word NumRecords;
	System::StaticArray<char, 106> Junk2;
};
#pragma pack(pop)


class PASCALIMPLEMENTATION TPalmDocFile : public Mswbase::TMSWBaseDocument
{
	typedef Mswbase::TMSWBaseDocument inherited;
	
private:
	TPDBHeader Header;
	TPDB_DocRecord0 Record0;
	System::AnsiString __fastcall DecompressText(const System::AnsiString Value, System::Word Len, System::Word MaxRecSize);
	
protected:
	virtual void __fastcall ClearInternalLists();
	bool __fastcall IsPeanutFile();
	
public:
	__fastcall virtual TPalmDocFile(System::Classes::TComponent* AOwner);
	__fastcall virtual ~TPalmDocFile();
	virtual void __fastcall LoadFromStream(System::Classes::TStream* Stream);
	virtual void __fastcall LoadFromFile(const System::WideString AFileName);
};


//-- var, const, procedure ---------------------------------------------------
}	/* namespace Mspalmdoc */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_MSPALMDOC)
using namespace Mspalmdoc;
#endif
#pragma pack(pop)
#pragma option pop

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