// Borland C++ Builder
// Copyright (c) 1995, 2002 by Borland Software Corporation
// All rights reserved

// (DO NOT EDIT: machine generated header) 'ahmtstoredata.pas' rev: 6.00

#ifndef ahmtstoredataHPP
#define ahmtstoredataHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#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;
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};
};


class DELPHICLASS TAHMIniFile;
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};
};


class DELPHICLASS TAHMDataStore;
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};
};


class DELPHICLASS TAHMStoreData;
class PASCALIMPLEMENTATION TAHMStoreData : public Ahmsystemclass::TAHMSystemComponent 
{
	typedef Ahmsystemclass::TAHMSystemComponent 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};
};


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

}	/* namespace Ahmtstoredata */
using namespace Ahmtstoredata;
#pragma option pop	// -w-
#pragma option pop	// -Vx

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