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

// (DO NOT EDIT: machine generated header) 'AHMTStoreData.pas' rev: 4.00

#ifndef AHMTStoreDataHPP
#define AHMTStoreDataHPP

#pragma delphiheader begin
#pragma option push -w-
#include <Graphics.hpp>	// Pascal unit
#include <AHMSystemClass.hpp>	// Pascal unit
#include <Registry.hpp>	// Pascal unit
#include <IniFiles.hpp>	// Pascal unit
#include <Dialogs.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Messages.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.hpp>	// Pascal unit

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

namespace Ahmtstoredata
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TAHMRootKey { hkeyClassesRoot, hkeyCurrentUser, hkeyLocalMachine, hkeyUsers, hkeyCurrentConfig, 
	hkeyDynData };
#pragma option pop

#pragma option push -b-
enum TAHMDatatype { sRegistry, sIniFile };
#pragma option pop

class DELPHICLASS TAHMRegistry;
#pragma pack(push, 4)
class PASCALIMPLEMENTATION TAHMRegistry : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	TAHMRootKey FRootKey;
	AnsiString FPath;
	void __fastcall SetPath(const AnsiString Value);
	
public:
	__fastcall TAHMRegistry(void);
	__fastcall virtual ~TAHMRegistry(void);
	
__published:
	__property TAHMRootKey Rootkey = {read=FRootKey, write=FRootKey, default=1};
	__property AnsiString Path = {read=FPath, write=SetPath};
};

#pragma pack(pop)

class DELPHICLASS TAHMIniFile;
#pragma pack(push, 4)
class PASCALIMPLEMENTATION TAHMIniFile : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	AnsiString FFilename;
	
public:
	__fastcall TAHMIniFile(void);
	__fastcall virtual ~TAHMIniFile(void);
	
__published:
	__property AnsiString IniFilename = {read=FFilename, write=FFilename};
};

#pragma pack(pop)

class DELPHICLASS TAHMDataStore;
#pragma pack(push, 4)
class PASCALIMPLEMENTATION TAHMDataStore : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	bool FEnabled;
	TAHMDatatype FDatatype;
	TAHMRegistry* FRegistry;
	TAHMIniFile* FIniFile;
	Classes::TNotifyEvent FOnError;
	AnsiString FSection;
	AnsiString FPassword;
	void __fastcall SetPassword(const AnsiString Value);
	
public:
	__fastcall TAHMDataStore(void);
	__fastcall virtual ~TAHMDataStore(void);
	
__published:
	__property Classes::TNotifyEvent OnError = {read=FOnError, write=FOnError};
	__property bool Enabled = {read=FEnabled, write=FEnabled, default=1};
	__property AnsiString Section = {read=FSection, write=FSection};
	__property AnsiString Password = {read=FPassword, write=SetPassword};
	__property TAHMDatatype Datatype = {read=FDatatype, write=FDatatype, default=0};
	__property TAHMRegistry* Registry = {read=FRegistry, write=FRegistry};
	__property TAHMIniFile* Inifile = {read=FIniFile, write=FIniFile};
};

#pragma pack(pop)

class DELPHICLASS TAHMStoreData;
#pragma pack(push, 4)
class PASCALIMPLEMENTATION TAHMStoreData : public Ahmsystemclass::TAHMSystemsComponent 
{
	typedef Ahmsystemclass::TAHMSystemsComponent inherited;
	
private:
	Classes::TNotifyEvent FOnError;
	TAHMDataStore* FDataStore;
	
public:
	__fastcall virtual TAHMStoreData(Classes::TComponent* AOwner);
	__fastcall virtual ~TAHMStoreData(void);
	AnsiString __fastcall ReadStr(AnsiString Key, AnsiString Error);
	Variant __fastcall ReadVariant(AnsiString Key, const Variant &Error);
	int __fastcall ReadInt(AnsiString Key, int Error);
	bool __fastcall ReadBool(AnsiString Key, bool Error);
	Graphics::TColor __fastcall ReadColor(AnsiString Key, Graphics::TColor Error);
	System::TDateTime __fastcall ReadTime(AnsiString Key, System::TDateTime Error);
	System::TDateTime __fastcall ReadDate(AnsiString Key, System::TDateTime Error);
	System::TDateTime __fastcall ReadDateTime(AnsiString Key, System::TDateTime Error);
	AnsiString __fastcall ReadCrypt(AnsiString Key, AnsiString Error);
	void __fastcall WriteCrypt(AnsiString Key, AnsiString Value);
	void __fastcall ReadStrs(Classes::TStringList* &Values);
	void __fastcall WriteTime(AnsiString Key, System::TDateTime Value);
	void __fastcall WriteDate(AnsiString Key, System::TDateTime Value);
	void __fastcall WriteDateTime(AnsiString Key, System::TDateTime Value);
	void __fastcall WriteVariant(AnsiString Key, const Variant &Value);
	void __fastcall WriteStr(AnsiString Key, AnsiString Value);
	void __fastcall WriteInt(AnsiString Key, int Value);
	void __fastcall WriteColor(AnsiString Key, Graphics::TColor Value);
	void __fastcall WriteBool(AnsiString Key, bool Value);
	void __fastcall DeleteKey(AnsiString Key);
	void __fastcall Erase(void);
	
__published:
	__property Classes::TNotifyEvent OnError = {read=FOnError, write=FOnError};
	__property TAHMDataStore* DataStore = {read=FDataStore, write=FDataStore};
};

#pragma pack(pop)

//-- var, const, procedure ---------------------------------------------------
extern PACKAGE HKEY AHMHKeys[6];

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

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