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

// (DO NOT EDIT: machine generated header) 'UECOpenMapQuestServices.pas' rev: 37.00 (Windows)

#ifndef UECOpenMapQuestServicesHPP
#define UECOpenMapQuestServicesHPP

#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 <UECMapUtil.hpp>
#include <Vcl.StdCtrls.hpp>
#include <System.SysUtils.hpp>
#include <System.Classes.hpp>
#include <Vcl.Graphics.hpp>
#include <Winapi.Windows.hpp>
#include <Winapi.UrlMon.hpp>
#include <Winapi.WinInet.hpp>
#include <Winapi.Messages.hpp>
#include <Vcl.Controls.hpp>
#include <System.Win.ComObj.hpp>
#include <Vcl.Forms.hpp>
#include <Winapi.ShlObj.hpp>
#include <System.Math.hpp>
#include <UECMapZIP.hpp>
#include <Winapi.ActiveX.hpp>
#include <Vcl.Dialogs.hpp>

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

namespace Uecopenmapquestservices
{
//-- forward type declarations -----------------------------------------------
class DELPHICLASS TThreadOpenMapQuest;
class DELPHICLASS TThreadOpenMapQuestSearch;
class DELPHICLASS TThreadOpenMapQuestReverse;
class DELPHICLASS TThreadOpenMapQuestAltitude;
class DELPHICLASS TThreadOpenMapQuestStaticMap;
class DELPHICLASS TThreadOpenMapQuestDirections;
class DELPHICLASS TThreadOpenMapQuestGuidance;
class DELPHICLASS TNominatimReverseResult;
class DELPHICLASS TNominatimResult;
class DELPHICLASS TOpenMapQuestServices;
//-- type declarations -------------------------------------------------------
class PASCALIMPLEMENTATION TThreadOpenMapQuest : public System::Classes::TThread
{
	typedef System::Classes::TThread inherited;
	
private:
	System::UnicodeString FParams;
	System::Classes::TMemoryStream* FMemoryStream;
	System::Classes::TStringList* FtslList;
	System::TObject* FSender;
	System::Classes::TNotifyEvent FNotifyEvent;
	bool FOptimizeRoad;
	bool FOnlyLocal;
	System::TObject* FDataObject;
	System::UnicodeString FUrl_Service;
	void __fastcall doNotify();
	
public:
	__fastcall TThreadOpenMapQuest(bool ACreateSuspended, System::UnicodeString sParams, System::Classes::TStringList* tslList, System::Classes::TMemoryStream* MemoryStream, System::Classes::TNotifyEvent NotifyEvent, System::TObject* Sender, bool Optimize, bool onlylocal, System::TObject* DataObject, System::UnicodeString url_service);
	__fastcall virtual ~TThreadOpenMapQuest();
};


class PASCALIMPLEMENTATION TThreadOpenMapQuestSearch : public TThreadOpenMapQuest
{
	typedef TThreadOpenMapQuest inherited;
	
protected:
	virtual void __fastcall Execute();
public:
	/* TThreadOpenMapQuest.Create */ inline __fastcall TThreadOpenMapQuestSearch(bool ACreateSuspended, System::UnicodeString sParams, System::Classes::TStringList* tslList, System::Classes::TMemoryStream* MemoryStream, System::Classes::TNotifyEvent NotifyEvent, System::TObject* Sender, bool Optimize, bool onlylocal, System::TObject* DataObject, System::UnicodeString url_service) : TThreadOpenMapQuest(ACreateSuspended, sParams, tslList, MemoryStream, NotifyEvent, Sender, Optimize, onlylocal, DataObject, url_service) { }
	/* TThreadOpenMapQuest.Destroy */ inline __fastcall virtual ~TThreadOpenMapQuestSearch() { }
	
};


class PASCALIMPLEMENTATION TThreadOpenMapQuestReverse : public TThreadOpenMapQuest
{
	typedef TThreadOpenMapQuest inherited;
	
protected:
	virtual void __fastcall Execute();
public:
	/* TThreadOpenMapQuest.Create */ inline __fastcall TThreadOpenMapQuestReverse(bool ACreateSuspended, System::UnicodeString sParams, System::Classes::TStringList* tslList, System::Classes::TMemoryStream* MemoryStream, System::Classes::TNotifyEvent NotifyEvent, System::TObject* Sender, bool Optimize, bool onlylocal, System::TObject* DataObject, System::UnicodeString url_service) : TThreadOpenMapQuest(ACreateSuspended, sParams, tslList, MemoryStream, NotifyEvent, Sender, Optimize, onlylocal, DataObject, url_service) { }
	/* TThreadOpenMapQuest.Destroy */ inline __fastcall virtual ~TThreadOpenMapQuestReverse() { }
	
};


class PASCALIMPLEMENTATION TThreadOpenMapQuestAltitude : public TThreadOpenMapQuest
{
	typedef TThreadOpenMapQuest inherited;
	
protected:
	virtual void __fastcall Execute();
public:
	/* TThreadOpenMapQuest.Create */ inline __fastcall TThreadOpenMapQuestAltitude(bool ACreateSuspended, System::UnicodeString sParams, System::Classes::TStringList* tslList, System::Classes::TMemoryStream* MemoryStream, System::Classes::TNotifyEvent NotifyEvent, System::TObject* Sender, bool Optimize, bool onlylocal, System::TObject* DataObject, System::UnicodeString url_service) : TThreadOpenMapQuest(ACreateSuspended, sParams, tslList, MemoryStream, NotifyEvent, Sender, Optimize, onlylocal, DataObject, url_service) { }
	/* TThreadOpenMapQuest.Destroy */ inline __fastcall virtual ~TThreadOpenMapQuestAltitude() { }
	
};


class PASCALIMPLEMENTATION TThreadOpenMapQuestStaticMap : public TThreadOpenMapQuest
{
	typedef TThreadOpenMapQuest inherited;
	
protected:
	virtual void __fastcall Execute();
public:
	/* TThreadOpenMapQuest.Create */ inline __fastcall TThreadOpenMapQuestStaticMap(bool ACreateSuspended, System::UnicodeString sParams, System::Classes::TStringList* tslList, System::Classes::TMemoryStream* MemoryStream, System::Classes::TNotifyEvent NotifyEvent, System::TObject* Sender, bool Optimize, bool onlylocal, System::TObject* DataObject, System::UnicodeString url_service) : TThreadOpenMapQuest(ACreateSuspended, sParams, tslList, MemoryStream, NotifyEvent, Sender, Optimize, onlylocal, DataObject, url_service) { }
	/* TThreadOpenMapQuest.Destroy */ inline __fastcall virtual ~TThreadOpenMapQuestStaticMap() { }
	
};


class PASCALIMPLEMENTATION TThreadOpenMapQuestDirections : public TThreadOpenMapQuest
{
	typedef TThreadOpenMapQuest inherited;
	
private:
	void __fastcall LoadRoutePathWithDirectionsList();
	
protected:
	virtual void __fastcall Execute();
public:
	/* TThreadOpenMapQuest.Create */ inline __fastcall TThreadOpenMapQuestDirections(bool ACreateSuspended, System::UnicodeString sParams, System::Classes::TStringList* tslList, System::Classes::TMemoryStream* MemoryStream, System::Classes::TNotifyEvent NotifyEvent, System::TObject* Sender, bool Optimize, bool onlylocal, System::TObject* DataObject, System::UnicodeString url_service) : TThreadOpenMapQuest(ACreateSuspended, sParams, tslList, MemoryStream, NotifyEvent, Sender, Optimize, onlylocal, DataObject, url_service) { }
	/* TThreadOpenMapQuest.Destroy */ inline __fastcall virtual ~TThreadOpenMapQuestDirections() { }
	
};


class PASCALIMPLEMENTATION TThreadOpenMapQuestGuidance : public TThreadOpenMapQuest
{
	typedef TThreadOpenMapQuest inherited;
	
protected:
	virtual void __fastcall Execute();
public:
	/* TThreadOpenMapQuest.Create */ inline __fastcall TThreadOpenMapQuestGuidance(bool ACreateSuspended, System::UnicodeString sParams, System::Classes::TStringList* tslList, System::Classes::TMemoryStream* MemoryStream, System::Classes::TNotifyEvent NotifyEvent, System::TObject* Sender, bool Optimize, bool onlylocal, System::TObject* DataObject, System::UnicodeString url_service) : TThreadOpenMapQuest(ACreateSuspended, sParams, tslList, MemoryStream, NotifyEvent, Sender, Optimize, onlylocal, DataObject, url_service) { }
	/* TThreadOpenMapQuest.Destroy */ inline __fastcall virtual ~TThreadOpenMapQuestGuidance() { }
	
};


class PASCALIMPLEMENTATION TNominatimReverseResult : public System::Classes::TStringList
{
	typedef System::Classes::TStringList inherited;
	
private:
	System::UnicodeString __fastcall GetHouse_number();
	System::UnicodeString __fastcall GetRoad();
	System::UnicodeString __fastcall GetVillage();
	System::UnicodeString __fastcall GetTown();
	System::UnicodeString __fastcall GetCity();
	System::UnicodeString __fastcall GetCounty();
	System::UnicodeString __fastcall GetPostcode();
	System::UnicodeString __fastcall GetCountry();
	System::UnicodeString __fastcall GetCountry_code();
	System::UnicodeString __fastcall GetAmenity();
	
public:
	__property System::UnicodeString House_number = {read=GetHouse_number};
	__property System::UnicodeString Road = {read=GetRoad};
	__property System::UnicodeString Village = {read=GetVillage};
	__property System::UnicodeString Town = {read=GetTown};
	__property System::UnicodeString City = {read=GetCity};
	__property System::UnicodeString County = {read=GetCounty};
	__property System::UnicodeString Postcode = {read=GetPostcode};
	__property System::UnicodeString Country = {read=GetCountry};
	__property System::UnicodeString Country_code = {read=GetCountry_code};
	__property System::UnicodeString Amenity = {read=GetAmenity};
public:
	/* TStringList.Create */ inline __fastcall TNominatimReverseResult()/* overload */ : System::Classes::TStringList() { }
	/* TStringList.Create */ inline __fastcall TNominatimReverseResult(bool OwnsObjects)/* overload */ : System::Classes::TStringList(OwnsObjects) { }
	/* TStringList.Create */ inline __fastcall TNominatimReverseResult(System::WideChar QuoteChar, System::WideChar Delimiter)/* overload */ : System::Classes::TStringList(QuoteChar, Delimiter) { }
	/* TStringList.Create */ inline __fastcall TNominatimReverseResult(System::WideChar QuoteChar, System::WideChar Delimiter, System::Classes::TStringsOptions Options)/* overload */ : System::Classes::TStringList(QuoteChar, Delimiter, Options) { }
	/* TStringList.Create */ inline __fastcall TNominatimReverseResult(System::Classes::TDuplicates Duplicates, bool Sorted, bool CaseSensitive)/* overload */ : System::Classes::TStringList(Duplicates, Sorted, CaseSensitive) { }
	/* TStringList.Create */ inline __fastcall TNominatimReverseResult(System::Classes::TStringsOptions Options, System::Classes::TDuplicates Duplicates)/* overload */ : System::Classes::TStringList(Options, Duplicates) { }
	/* TStringList.Destroy */ inline __fastcall virtual ~TNominatimReverseResult() { }
	
};


#pragma pack(push,4)
class PASCALIMPLEMENTATION TNominatimResult : public System::TObject
{
	typedef System::TObject inherited;
	
private:
	System::Classes::TStringList* FDataList;
	bool __fastcall getError();
	System::UnicodeString __fastcall getPlace_id();
	System::UnicodeString __fastcall getOsm_type();
	System::UnicodeString __fastcall getOsm_id();
	System::UnicodeString __fastcall getPlace_rank();
	System::UnicodeString __fastcall getBoundingbox();
	double __fastcall getLatitude();
	double __fastcall getLongitude();
	System::UnicodeString __fastcall getDisplay_name();
	System::UnicodeString __fastcall getPlace_Type();
	System::UnicodeString __fastcall getIcon();
	System::UnicodeString __fastcall getXml();
	Uecmaputil::TLatLng __fastcall getSouthWest();
	Uecmaputil::TLatLng __fastcall getNorthEast();
	
public:
	__property System::Classes::TStringList* DataList = {read=FDataList, write=FDataList};
	__property System::UnicodeString Place_id = {read=getPlace_id};
	__property System::UnicodeString Osm_type = {read=getOsm_type};
	__property System::UnicodeString Osm_id = {read=getOsm_id};
	__property System::UnicodeString Place_rank = {read=getPlace_rank};
	__property System::UnicodeString BoundingBox = {read=getBoundingbox};
	__property double Latitude = {read=getLatitude};
	__property double Longitude = {read=getLongitude};
	__property Uecmaputil::TLatLng SouthWest = {read=getSouthWest};
	__property Uecmaputil::TLatLng NorthEast = {read=getNorthEast};
	__property System::UnicodeString Display_name = {read=getDisplay_name};
	__property System::UnicodeString Address = {read=getDisplay_name};
	__property System::UnicodeString Place_type = {read=getPlace_Type};
	__property System::UnicodeString Icon = {read=getIcon};
	__property System::UnicodeString Xml = {read=getXml};
	__property bool Error = {read=getError, nodefault};
public:
	/* TObject.Create */ inline __fastcall TNominatimResult() : System::TObject() { }
	/* TObject.Destroy */ inline __fastcall virtual ~TNominatimResult() { }
	
};

#pragma pack(pop)

class PASCALIMPLEMENTATION TOpenMapQuestServices : public System::TObject
{
	typedef System::TObject inherited;
	
private:
	Winapi::Windows::TRTLCriticalSection CritSect;
	bool FOnlyLocal;
	TNominatimResult* FSearchResult;
	TNominatimResult* FReverseResult;
	TThreadOpenMapQuestSearch* FThreadSearch;
	TThreadOpenMapQuestReverse* FThreadReverse;
	TThreadOpenMapQuestAltitude* FThreadAltitude;
	TThreadOpenMapQuestStaticMap* FThreadStaticMap;
	TThreadOpenMapQuestDirections* FThreadDirections;
	TThreadOpenMapQuestGuidance* FThreadGuidance;
	System::UnicodeString FLocalCache;
	bool FOptimizeRoute;
	System::UnicodeString FUrl_Service;
	System::UnicodeString FParams;
	System::UnicodeString FKey;
	Uecmaputil::TThreadStringList* FParamsSearchList;
	Uecmaputil::TThreadStringList* FParamsReverseList;
	Uecmaputil::TThreadStringList* FParamsAltitudeList;
	Uecmaputil::TThreadStringList* FPAramsStaticMapList;
	Uecmaputil::TThreadStringList* FParamsDirectionsList;
	Uecmaputil::TThreadStringList* FParamsGuidanceList;
	System::Classes::TStringList* FAltitudeResults;
	System::Classes::TStringList* FSearchResults;
	System::Classes::TStringList* FDirectionsResults;
	System::Classes::TStringList* FGuidanceResults;
	System::Classes::TStringList* FReverseResults;
	System::Classes::TMemoryStream* FMemoryStream;
	System::Classes::TNotifyEvent FOnAltitude;
	System::Classes::TNotifyEvent FOnStaticMap;
	System::Classes::TNotifyEvent FOnSearch;
	System::Classes::TNotifyEvent FOnDirections;
	System::Classes::TNotifyEvent FOnGuidance;
	System::Classes::TNotifyEvent FOnReverse;
	int FDecimalPrecision;
	void __fastcall doSearch(System::TObject* Sender);
	void __fastcall doReverse(System::TObject* Sender);
	void __fastcall doAltitude(System::TObject* Sender);
	void __fastcall doStaticMap(System::TObject* Sender);
	void __fastcall doDirections(System::TObject* Sender);
	void __fastcall doGuidance(System::TObject* Sender);
	void __fastcall doAsyncAltitude();
	void __fastcall doASyncSearch();
	void __fastcall doASyncReverse();
	void __fastcall doASyncStaticMap();
	void __fastcall doASyncDirections(System::TObject* DataObject = (System::TObject*)(0x0));
	void __fastcall doASyncGuidance();
	int __fastcall getSearchCount();
	TNominatimResult* __fastcall getSearchResult(int index);
	TNominatimResult* __fastcall getReverseResult();
	System::UnicodeString __fastcall getKey();
	void __fastcall Lock();
	void __fastcall UnLock();
	
public:
	__fastcall TOpenMapQuestServices();
	__fastcall virtual ~TOpenMapQuestServices();
	void __fastcall AsyncSearch(System::UnicodeString sParams, const System::UnicodeString url = System::UnicodeString());
	void __fastcall AsyncReverse(System::UnicodeString sParams, const System::UnicodeString url = System::UnicodeString());
	void __fastcall DirectASyncReverse(System::TObject* Sender, const System::UnicodeString Params, TNominatimResult* NominatimResult, System::Classes::TNotifyEvent NotifyEvent, const System::UnicodeString url_service = System::UnicodeString());
	void __fastcall AsyncAltitude(System::UnicodeString sParams);
	void __fastcall AsyncStaticMap(System::UnicodeString sParams);
	void __fastcall AsyncDirections(System::UnicodeString sParams, System::TObject* DataObject = (System::TObject*)(0x0));
	void __fastcall AsyncGuidance(System::UnicodeString sParams);
	bool __fastcall Search(System::UnicodeString sParams, const bool onlylocal = false);
	bool __fastcall Reverse(System::UnicodeString sParams, const bool onlylocal = false);
	int __fastcall Altitude(System::UnicodeString sParams, const bool onlylocal = false);
	bool __fastcall StaticMap(System::UnicodeString sParams);
	bool __fastcall Directions(System::UnicodeString sParams);
	System::UnicodeString __fastcall DirectionShapePoints(const System::UnicodeString value);
	bool __fastcall AlignLatLngToRoute(double &dLatitude, double &dLongitude);
	double __fastcall DistanceRouteByAdress(const System::UnicodeString StartAdress, const System::UnicodeString EndAdress, const System::UnicodeString Params = System::UnicodeString());
	double __fastcall DistanceRouteFrom(const double *dLatLngs, const System::NativeInt dLatLngs_High, const System::UnicodeString Params = System::UnicodeString());
	double __fastcall DistanceRoute(const System::UnicodeString url = System::UnicodeString());
	bool __fastcall Guidance(System::UnicodeString sParams);
	__property System::UnicodeString Params = {read=FParams};
	__property System::UnicodeString Key = {read=getKey, write=FKey};
	__property bool onlylocal = {read=FOnlyLocal, write=FOnlyLocal, nodefault};
	__property System::UnicodeString LocalCache = {read=FLocalCache, write=FLocalCache};
	__property System::Classes::TStringList* AltitudeResults = {read=FAltitudeResults};
	__property int DecimalPrecision = {read=FDecimalPrecision, write=FDecimalPrecision, nodefault};
	__property int SearchCount = {read=getSearchCount, nodefault};
	__property TNominatimResult* SearchResult[int index] = {read=getSearchResult};
	__property System::Classes::TStringList* SearchResults = {read=FSearchResults};
	__property System::Classes::TStringList* ReverseResults = {read=FReverseResults};
	__property System::Classes::TStringList* DirectionsResults = {read=FDirectionsResults};
	__property System::Classes::TStringList* GuidanceResults = {read=FGuidanceResults};
	__property bool OptimizeRoute = {read=FOptimizeRoute, write=FOptimizeRoute, nodefault};
	__property TNominatimResult* ReverseResult = {read=getReverseResult};
	__property System::Classes::TMemoryStream* StreamResult = {read=FMemoryStream};
	__property System::Classes::TNotifyEvent OnDirections = {read=FOnDirections, write=FOnDirections};
	__property System::Classes::TNotifyEvent OnGuidance = {read=FOnGuidance, write=FOnGuidance};
	__property System::Classes::TNotifyEvent OnSearch = {read=FOnSearch, write=FOnSearch};
	__property System::Classes::TNotifyEvent OnReverse = {read=FOnReverse, write=FOnReverse};
	__property System::Classes::TNotifyEvent OnAltitude = {read=FOnAltitude, write=FOnAltitude};
	__property System::Classes::TNotifyEvent OnStaticMap = {read=FOnStaticMap, write=FOnStaticMap};
};


//-- var, const, procedure ---------------------------------------------------
extern DELPHI_PACKAGE bool __fastcall OSMNominatimSearch(const System::UnicodeString sParams, System::Classes::TStringList* tslResults, const System::UnicodeString Def = System::UnicodeString(), const bool onlylocal = false, const System::UnicodeString url_service = System::UnicodeString(), Uecmapzip::TECMapZip* MapZip = (Uecmapzip::TECMapZip*)(0x0), const System::UnicodeString ZipName = System::UnicodeString());
extern DELPHI_PACKAGE bool __fastcall OSMNominatimReverse(const System::UnicodeString sParams, System::Classes::TStringList* tslResults, const bool onlylocal = false, const System::UnicodeString url_service = System::UnicodeString(), Uecmapzip::TECMapZip* MapZip = (Uecmapzip::TECMapZip*)(0x0), const System::UnicodeString ZipName = System::UnicodeString());
}	/* namespace Uecopenmapquestservices */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_UECOPENMAPQUESTSERVICES)
using namespace Uecopenmapquestservices;
#endif
#pragma pack(pop)
#pragma option pop

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