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

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

#ifndef wclBluetoothHPP
#define wclBluetoothHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <wclDriAsd.hpp>	// Pascal unit
#include <wclDriCommon.hpp>	// Pascal unit
#include <wclBluetoothErrors.hpp>	// Pascal unit
#include <wclConnectionErrors.hpp>	// Pascal unit
#include <wclSync.hpp>	// Pascal unit
#include <wclWinAPI.hpp>	// Pascal unit
#include <wclConnections.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <wclErrors.hpp>	// Pascal unit
#include <wclMessaging.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.hpp>	// Pascal unit

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

namespace Wclbluetooth
{
//-- type declarations -------------------------------------------------------
typedef Shortint SByte;

#pragma option push -b
enum TwclBluetoothApi { baBlueSoleil, baMicrosoft, baToshiba, baBled112 };
#pragma option pop

typedef Set<TwclBluetoothApi, baBlueSoleil, baBled112>  TwclBluetoothApis;

#pragma option push -b
enum TwclBluetoothVersion { bt10, bt11, bt12, bt20, bt21, bt30, bt40, bt41, bt42, bt50, bt51, bt52, bt53, bt54, btOther };
#pragma option pop

#pragma option push -b
enum TwclBluetoothDeviceType { dtClassic, dtBle, dtMixed, dtUnknown };
#pragma option pop

#pragma pack(push, 4)
struct TwclBluetoothService
{
	unsigned Handle;
	GUID Uuid;
	Byte Channel;
	AnsiString Name;
	AnsiString Comment;
} ;
#pragma pack(pop)

typedef DynamicArray<TwclBluetoothService >  TwclBluetoothServices;

typedef DynamicArray<GUID >  TwclBluetoothInstalledServices;

typedef DynamicArray<__int64 >  TwclBluetoothAddresses;

struct TwclVirtualComPort
{
	__int64 Address;
	GUID Service;
	Word Number;
	bool Outgoing;
} ;

typedef DynamicArray<TwclVirtualComPort >  TwclVirtualComPorts;

#pragma option push -b
enum TwclBluetoothDiscoverKind { dkClassic, dkBle };
#pragma option pop

typedef DynamicArray<Word >  TwclBluetoothSdpProtocols;

#pragma pack(push, 2)
struct TwclBluetoothSdpProfile
{
	Word Uuid;
	Word Version;
} ;
#pragma pack(pop)

typedef DynamicArray<TwclBluetoothSdpProfile >  TwclBluetoothSdpProfiles;

typedef DynamicArray<Byte >  TwclBluetoothSdpFormats;

#pragma pack(push, 2)
struct TwclGattUuid
{
	bool IsShortUuid;
	Word ShortUuid;
	GUID LongUuid;
} ;
#pragma pack(pop)

#pragma pack(push, 2)
struct TwclGattService
{
	TwclGattUuid Uuid;
	Word Handle;
} ;
#pragma pack(pop)

typedef DynamicArray<TwclGattService >  TwclGattServices;

#pragma pack(push, 2)
struct TwclGattCharacteristic
{
	Word ServiceHandle;
	TwclGattUuid Uuid;
	Word Handle;
	Word ValueHandle;
	bool IsBroadcastable;
	bool IsReadable;
	bool IsWritable;
	bool IsWritableWithoutResponse;
	bool IsSignedWritable;
	bool IsNotifiable;
	bool IsIndicatable;
	bool HasExtendedProperties;
} ;
#pragma pack(pop)

typedef DynamicArray<TwclGattCharacteristic >  TwclGattCharacteristics;

typedef DynamicArray<Byte >  TwclGattCharacteristicValue;

#pragma option push -b
enum TwclGattDescriptorType { dtCharacteristicExtendedProperties, dtCharacteristicUserDescription, dtClientCharacteristicConfiguration, dtServerCharacteristicConfiguration, dtCharacteristicFormat, dtCharacteristicAggregateFormat, dtCustomDescriptor };
#pragma option pop

#pragma pack(push, 4)
struct TwclGattDescriptor
{
	Word ServiceHandle;
	Word CharacteristicHandle;
	TwclGattDescriptorType DescriptorType;
	TwclGattUuid Uuid;
	Word Handle;
} ;
#pragma pack(pop)

typedef DynamicArray<TwclGattDescriptor >  TwclGattDescriptors;

#pragma pack(push, 1)
struct TwclGattCharacteristicExtendedProperties
{
	bool IsReliableWriteEnabled;
	bool IsAuxiliariesWritable;
} ;
#pragma pack(pop)

#pragma pack(push, 1)
struct TwclGattClientCharacteristicConfiguration
{
	bool IsSubscribeToNotification;
	bool IsSubscribeToIndication;
} ;
#pragma pack(pop)

#pragma pack(push, 1)
struct TwclGattServerCharacteristicConfiguration
{
	bool IsBroadcast;
} ;
#pragma pack(pop)

#pragma option push -b
enum TwclGattPresentationFormat { fmtRfu, fmtBoolean, fmt2Bit, fmtNibble, fmtUInt8, fmtUInt12, fmtUInt16, fmtUInt24, fmtUInt32, fmtUInt48, fmtUInt64, fmtUInt128, fmtSInt8, fmtSInt12, fmtSInt16, fmtSInt24, fmtSInt32, fmtSInt48, fmtSInt64, fmtSInt128, fmtFloat32, fmtFloat64, fmtSFloat, fmtFloat, fmtDUint16, fmtUtf8S, fmtUtf16S, fmtStruct };
#pragma option pop

#pragma pack(push, 4)
struct TwclGattCharacteristicFormat
{
	TwclGattPresentationFormat Format;
	Byte Exponent;
	Word AUnit;
	Byte NameSpace;
	Word Description;
} ;
#pragma pack(pop)

typedef DynamicArray<TwclGattCharacteristicFormat >  TwclGattCharacteristicFormats;

#pragma pack(push, 4)
struct TwclGattCharactertisticUserDescription
{
	AnsiString Description;
} ;
#pragma pack(pop)

typedef DynamicArray<Word >  wclBluetooth__1;

#pragma pack(push, 4)
struct TwclGattCharacteristicAggregateFormat
{
	DynamicArray<Word >  Handles;
} ;
#pragma pack(pop)

typedef DynamicArray<Byte >  wclBluetooth__2;

#pragma pack(push, 4)
struct TwclGattDescriptorValue
{
	TwclGattDescriptorType AType;
	TwclGattUuid Uuid;
	TwclGattCharacteristicExtendedProperties CharacteristicExtendedProperties;
	TwclGattClientCharacteristicConfiguration ClientCharacteristicConfiguration;
	TwclGattServerCharacteristicConfiguration ServerCharacteristicConfiguration;
	TwclGattCharacteristicFormat CharacteristicFormat;
	TwclGattCharacteristicAggregateFormat CharacteristicAggregateFormat;
	TwclGattCharactertisticUserDescription UserDescription;
	DynamicArray<Byte >  Data;
} ;
#pragma pack(pop)

#pragma option push -b
enum TwclGattOperationFlag { goNone, goReadFromDevice, goReadFromCache };
#pragma option pop

#pragma option push -b
enum TwclGattProtectionLevel { plNone, plAuthentication, plEncryption, plEncryptionAndAuthentication };
#pragma option pop

#pragma option push -b
enum TwclGattWriteKind { wkWithResponse, wkWithoutResponse, wkAuto };
#pragma option pop

#pragma option push -b
enum TwclGattSubscribeKind { skNotification, skIndication, skManual };
#pragma option pop

#pragma option push -b
enum TwclGattLocalCharacteristicProperty { cpAuthenticatedSignedWritable, cpBroadcastable, cpExtendedProperties, cpIndicatable, cpNotifiable, cpReadable, cpReliableWritable, cpWritableAuxiliaries, cpWritable, cpWritableWithoutResponse };
#pragma option pop

typedef Set<TwclGattLocalCharacteristicProperty, cpAuthenticatedSignedWritable, cpWritableWithoutResponse>  TwclGattLocalCharacteristicProperties;

typedef DynamicArray<Byte >  wclBluetooth__3;

#pragma pack(push, 4)
struct TwclGattLocalDescriptor
{
	Word Uuid;
	TwclGattProtectionLevel ReadProtectionLevel;
	TwclGattProtectionLevel WriteProtectionLevel;
	DynamicArray<Byte >  Data;
} ;
#pragma pack(pop)

typedef DynamicArray<TwclGattLocalDescriptor >  TwclGattLocalDescriptors;

#pragma pack(push, 4)
struct TwclGattLocalCharacteristicParameters
{
	DynamicArray<TwclGattLocalDescriptor >  Descriptors;
	DynamicArray<TwclGattCharacteristicFormat >  PresentationFormats;
	TwclGattLocalCharacteristicProperties Props;
	TwclGattProtectionLevel ReadProtectionLevel;
	AnsiString UserDescription;
	TwclGattProtectionLevel WriteProtectionLevel;
} ;
#pragma pack(pop)

#pragma option push -b
enum TwclBluetoothLeScanningMode { smActive, smPassive };
#pragma option pop

typedef DynamicArray<Byte >  TwclBluetoothLeAdvertisementFrameRawData;

#pragma option push -b
enum TwclBluetoothLeAdvertisementType { atConnectableUndirected, atConnectableDirected, atScannableUndirected, atNonConnectableUndirected, atScanResponse, atExtended, atUnknown };
#pragma option pop

#pragma option push -b
enum TwclBluetoothLeAdvertisementFlag { afLimitedDiscoverableMode, afGeneralDiscoverableMode, afClassicNotSupported, afDualModeControllerCapable, afDualModeHostCapable };
#pragma option pop

typedef Set<TwclBluetoothLeAdvertisementFlag, afLimitedDiscoverableMode, afDualModeHostCapable>  TwclBluetoothLeAdvertisementFlags;

#pragma option push -b
enum TwclBluetoothLeExtendedFrameFlag { efAnonymous, efConnectable, efDirected, efScannable, efScanResponse };
#pragma option pop

typedef Set<TwclBluetoothLeExtendedFrameFlag, efAnonymous, efScanResponse>  TwclBluetoothLeExtendedFrameFlags;

typedef DynamicArray<Byte >  TwclEddystoneEncodedUrl;

#pragma option push -b
enum TwclBluetoothMitmProtection { mitmProtectionNotRequired, mitmProtectionRequired, mitmProtectionNotRequiredBonding, mitmProtectionRequiredBonding, mitmProtectionNotRequiredGeneralBonding, mitmProtectionRequiredGeneralBonding, mitmProtectionNotDefined };
#pragma option pop

#pragma option push -b
enum TwclBluetoothLeProtectionLevel { pplDefault, pplNone, pplEncryption, pplEncryptionAndAuthentication };
#pragma option pop

#pragma option push -b
enum TwclBluetoothIoCapability { iocapDisplayOnly, iocapDisplayYesNo, iocapKeyboardOnly, iocapNoInputNoOutput, iocapDisplayKeyboard, iocapNotDefined };
#pragma option pop

#pragma pack(push, 1)
struct TwclBluetoothOobData
{
	Byte C[16];
	Byte R[16];
} ;
#pragma pack(pop)

#pragma option push -b
enum TwclBluetoothAddressType { atClassic, atPublic, atRandom, atUnspecified };
#pragma option pop

#pragma option push -b
enum TwclBluetoothPairingMethod { pmAuto, pmClassic, pmLe };
#pragma option pop

#pragma pack(push, 4)
struct TwclBluetoothLeAdvertisementFrame
{
	Word CompanyId;
	Byte DataType;
	DynamicArray<Byte >  Data;
} ;
#pragma pack(pop)

typedef DynamicArray<TwclBluetoothLeAdvertisementFrame >  TwclBluetoothLeAdvertisementFrames;

#pragma pack(push, 2)
struct TwclBluetoothLeConnectionParameters
{
	Word Interval;
	Word Latency;
	Word LinkTimeout;
} ;
#pragma pack(pop)

#pragma option push -b
enum TwclBluetoothLeConnectionParametersType { ppBalanced, ppPowerOptimized, ppThroughputOptimized };
#pragma option pop

#pragma pack(push, 2)
struct TwclBluetoothLeConnectionParametersValue
{
	Word MinInterval;
	Word MaxInterval;
	Word Latency;
	Word LinkTimeout;
} ;
#pragma pack(pop)

#pragma pack(push, 1)
struct TwclBluetoothLeConnectionPhyInfo
{
	bool IsCoded;
	bool IsUncoded1MPhy;
	bool IsUncoded2MPhy;
} ;
#pragma pack(pop)

#pragma pack(push, 1)
struct TwclBluetoothLeConnectionPhy
{
	TwclBluetoothLeConnectionPhyInfo Receive;
	TwclBluetoothLeConnectionPhyInfo Transmit;
} ;
#pragma pack(pop)

#pragma option push -b
enum TwclBluetoothLeAdvertisementPhy { phUnspecified, phUncoded1M, phUncoded2M, phCoded };
#pragma option pop

struct TwclBluetoothLeAdvertisementInfo
{
	__int64 Address;
	__int64 Timestamp;
	SByte Rssi;
} ;

#pragma pack(push, 2)
struct TwclBluetoothLeAppleAirdropFrameData
{
	Byte Prefix[8];
	Byte Version;
	Word AppleId;
	Word PhoneNumber;
	Word Email;
	Word Email2;
	Byte Suffix;
} ;
#pragma pack(pop)

#pragma pack(push, 1)
struct TwclBluetoothLeAppleAirplaySourceFrameData
{
	Byte Data;
} ;
#pragma pack(pop)

#pragma pack(push, 4)
struct TwclBluetoothLeAppleAirplayTargetFrameData
{
	Byte Flags;
	Byte Seed;
	unsigned Address;
} ;
#pragma pack(pop)

#pragma pack(push, 2)
struct TwclBluetoothLeAppleAirprintFrameData
{
	Byte AddressType;
	Byte ResourceType;
	Byte SecurityType;
	Word Port;
	Byte Address[16];
	SByte Power;
} ;
#pragma pack(pop)

#pragma pack(push, 1)
struct TwclBluetoothLeAppleFindMyFrameData
{
	Byte Status;
	Byte Key[22];
	Byte KeyBits;
	Byte Hint;
} ;
#pragma pack(pop)

#pragma pack(push, 2)
struct TwclBluetoothLeAppleHandoffFrameData
{
	bool Clipboard;
	Word Sequence;
	Byte AuthTag;
	Byte Data[10];
} ;
#pragma pack(pop)

#pragma pack(push, 2)
struct TwclBluetoothLeAppleHeySiriFrameData
{
	Word Hash;
	SByte Snr;
	Byte Confidence;
	Word DeviceClass;
	Byte Rand;
} ;
#pragma pack(pop)

#pragma pack(push, 2)
struct TwclBluetoothLeAppleHomeKitFrameData
{
	Byte Status;
	Byte DeviceId[6];
	Word Category;
	Word StateNumber;
	Byte ConfigNumber;
	Byte Version;
} ;
#pragma pack(pop)

#pragma pack(push, 2)
struct TwclBluetoothLeAppleiBeaconFrameData
{
	GUID Uuid;
	Word Minor;
	Word Major;
	SByte TxRssi;
} ;
#pragma pack(pop)

#pragma pack(push, 2)
struct TwclBluetoothLeAppleMagicSwitchFrameData
{
	Word Data;
	Byte Confidence;
} ;
#pragma pack(pop)

#pragma pack(push, 4)
struct TwclBluetoothLeAppleNearbyActionFrameData
{
	Byte Flags;
	Byte Action;
	unsigned Tag;
	Byte Device;
	DynamicArray<Byte >  Params;
} ;
#pragma pack(pop)

#pragma pack(push, 4)
struct TwclBluetoothLeAppleNearbyInfoFrameData
{
	Byte Status;
	Byte Action;
	Byte Flags;
	unsigned Tag;
} ;
#pragma pack(pop)

#pragma pack(push, 2)
struct TwclBluetoothLeAppleProximityPairingFrameData
{
	Byte Prefix;
	Word DeviceModel;
	Byte Status;
	Byte LeftBattery;
	Byte RightBattery;
	bool CaseCharging;
	bool RightCharging;
	bool LeftCharging;
	Byte CaseBattery;
	Byte Counter;
	Byte Color;
	Byte Suffix;
	Byte Data[16];
} ;
#pragma pack(pop)

#pragma pack(push, 2)
struct TwclBluetoothLeAppleTetheringSourceFrameData
{
	Byte Version;
	Byte Flags;
	Byte Battery;
	Word CellType;
	Byte Bars;
} ;
#pragma pack(pop)

#pragma pack(push, 4)
struct TwclBluetoothLeAppleTetheringTargetFrameData
{
	unsigned Id;
} ;
#pragma pack(pop)

#pragma pack(push, 4)
struct TwclBluetoothLeAppleUnknownFrameData
{
	Byte Id;
	DynamicArray<Byte >  Payload;
} ;
#pragma pack(pop)

#pragma option push -b
enum TwclBluetoothLeCdpBeaconDeviceType { dtXboxOne = 1, dtiPhone = 6, dtiPad, dtAndroid, dtWindowsDesktop, dtWindowsPhone = 11, dtLinux, dtWindowsIoT, dtSurfaceHub, dtWindowsLaptop, dtWindowsTablet };
#pragma option pop

#pragma option push -b
enum TwclBluetoothLeCdpBeaconScenarioType { stBluetooth = 1 };
#pragma option pop

#pragma option push -b
enum TwclBluetoothLeCdpBeaconExtendedDeviceStatus { edsRemoteSessionsHosted, edsRemoteSessionsNotHosted, edsNearShareAuthPolicySameUser, edsNearShareAuthPolicyPermissive };
#pragma option pop

typedef Set<TwclBluetoothLeCdpBeaconExtendedDeviceStatus, edsRemoteSessionsHosted, edsNearShareAuthPolicyPermissive>  TwclBluetoothLeCdpBeaconExtendedDeviceStatuses;

typedef DynamicArray<Byte >  TwclBluetoothLeCdpBeaconSalt;

typedef DynamicArray<Byte >  TwclBluetoothLeCdpBeaconHash;

#pragma pack(push, 2)
struct TwclWiiRemoteAccelCalibration
{
	Word MinX;
	Word MinY;
	Word MinZ;
	Word MaxX;
	Word MaxY;
	Word MaxZ;
} ;
#pragma pack(pop)

#pragma pack(push, 1)
struct TwclWiiRemoteLeds
{
	bool Led1;
	bool Led2;
	bool Led3;
	bool Led4;
} ;
#pragma pack(pop)

#pragma option push -b
enum TwclWiiRemoteIrMode { wiiIrOff, wiiIrBasicMode, wiiIrExtendedMode, wiiIrFullMode };
#pragma option pop

#pragma option push -b
enum TwclWiiRemoteIrSensitivity { wiiIrLevelOff, wiiIrLevel1, wiiIrLevel2, wiiIrLevel3, wiiIrLevel4, wiiIrLevel5, wiiIrLevelMax };
#pragma option pop

#pragma option push -b
enum TwclWiiRemoteExtension { wiiNoExtension, wiiNunchuk, wiiClassicController, wiiGuitar, wiiDrums, wiiBalanceBoard };
#pragma option pop

#pragma pack(push, 1)
struct TwclWiiRemoteButtons
{
	bool A;
	bool B;
	bool Plus;
	bool Home;
	bool Minus;
	bool One;
	bool Two;
	bool Up;
	bool Down;
	bool Left;
	bool Right;
} ;
#pragma pack(pop)

#pragma pack(push, 2)
struct TwclWiiRemote3D
{
	Word X;
	Word Y;
	Word Z;
} ;
#pragma pack(pop)

#pragma pack(push, 2)
struct TwclWiiRemoteAccel
{
	TwclWiiRemoteAccelCalibration Calibration;
	TwclWiiRemote3D Values;
} ;
#pragma pack(pop)

#pragma pack(push, 2)
struct TwclWiiRemote2D
{
	Word X;
	Word Y;
} ;
#pragma pack(pop)

#pragma pack(push, 2)
struct TwclWiiRemoteIrSensor
{
	TwclWiiRemote2D Position;
	Byte Size;
	bool Found;
} ;
#pragma pack(pop)

#pragma pack(push, 4)
struct TwclWiiRemoteIrSensors
{
	TwclWiiRemoteIrMode Mode;
	TwclWiiRemoteIrSensitivity Sensitivity;
	TwclWiiRemoteIrSensor Sensors[4];
} ;
#pragma pack(pop)

#pragma pack(push, 2)
struct TwclWiiRemoteNunchukCalibration
{
	TwclWiiRemoteAccelCalibration Accel;
	Byte MinX;
	Byte MidX;
	Byte MaxX;
	Byte MinY;
	Byte MidY;
	Byte MaxY;
} ;
#pragma pack(pop)

#pragma pack(push, 2)
struct TwclWiiRemoteNunchuk
{
	TwclWiiRemoteNunchukCalibration Calibration;
	TwclWiiRemoteAccel Accel;
	TwclWiiRemote2D Joystick;
	bool C;
	bool Z;
} ;
#pragma pack(pop)

#pragma pack(push, 1)
struct TwclWiiRemoteClassicControllerButtons
{
	bool A;
	bool B;
	bool Plus;
	bool Home;
	bool Minus;
	bool Up;
	bool Down;
	bool Left;
	bool Right;
	bool X;
	bool Y;
	bool ZL;
	bool ZR;
	bool L;
	bool R;
} ;
#pragma pack(pop)

#pragma pack(push, 1)
struct TwclWiiRemoteClassicControllerCalibration
{
	Byte LeftMinX;
	Byte LeftMidX;
	Byte LeftMaxX;
	Byte LeftMinY;
	Byte LeftMidY;
	Byte LeftMaxY;
	Byte RightMinX;
	Byte RightMidX;
	Byte RightMaxX;
	Byte RightMinY;
	Byte RightMidY;
	Byte RightMaxY;
	Byte LeftTriggerMin;
	Byte LeftTriggerMax;
	Byte RightTriggerMin;
	Byte RightTriggerMax;
} ;
#pragma pack(pop)

#pragma pack(push, 2)
struct TwclWiiRemoteClassicController
{
	TwclWiiRemoteClassicControllerCalibration Calibration;
	TwclWiiRemoteClassicControllerButtons Buttons;
	TwclWiiRemote2D LeftJoystick;
	TwclWiiRemote2D RightJoystick;
	Byte LeftTrigger;
	Byte RightTrigger;
} ;
#pragma pack(pop)

#pragma option push -b
enum TwclWiiRemoteGuitarType { wiiGuitarHero3, wiiGuitarHeroWorldTour };
#pragma option pop

#pragma pack(push, 1)
struct TwclWiiRemoteGuitarButtons
{
	bool StrumUp;
	bool StrumDown;
	bool Minus;
	bool Plus;
} ;
#pragma pack(pop)

#pragma pack(push, 1)
struct TwclWiiRemoteGuitarFretButtons
{
	bool Green;
	bool Red;
	bool Yellow;
	bool Blue;
	bool Orange;
} ;
#pragma pack(pop)

#pragma pack(push, 4)
struct TwclWiiRemoteGuitar
{
	TwclWiiRemoteGuitarType GuitarType;
	TwclWiiRemoteGuitarButtons Buttons;
	TwclWiiRemoteGuitarFretButtons FretButtons;
	TwclWiiRemoteGuitarFretButtons Touchbar;
	TwclWiiRemote2D Joystick;
	Byte WhammyBar;
} ;
#pragma pack(pop)

#pragma pack(push, 2)
struct TwclWiiRemoteDrums
{
	bool Red;
	bool Green;
	bool Blue;
	bool Orange;
	bool Yellow;
	bool Pedal;
	Byte RedVelocity;
	Byte GreenVelocity;
	Byte BlueVelocity;
	Byte OrangeVelocity;
	Byte YellowVelocity;
	Byte PedalVelocity;
	bool Plus;
	bool Minus;
	TwclWiiRemote2D Joystick;
} ;
#pragma pack(pop)

#pragma pack(push, 2)
struct TwclWiiRemoteBalanceBoardSensors
{
	Word TopRight;
	Word TopLeft;
	Word BottomRight;
	Word BottomLeft;
} ;
#pragma pack(pop)

struct TwclWiiRemoteBalanceBoardSensorsWeight
{
	double TopRight;
	double TopLeft;
	double BottomRight;
	double BottomLeft;
} ;

#pragma pack(push, 2)
struct TwclWiiRemoteBalanceBoardCalibration
{
	TwclWiiRemoteBalanceBoardSensors Kg0;
	TwclWiiRemoteBalanceBoardSensors Kg17;
	TwclWiiRemoteBalanceBoardSensors Kg34;
} ;
#pragma pack(pop)

struct TwclWiiRemoteBalanceBoardGC
{
	double X;
	double Y;
} ;

struct TwclWiiRemoteBalanceBoard
{
	TwclWiiRemoteBalanceBoardCalibration Calibration;
	TwclWiiRemoteBalanceBoardSensors Sensors;
	TwclWiiRemoteBalanceBoardSensorsWeight SensorsKg;
	TwclWiiRemoteBalanceBoardSensorsWeight SensorsLb;
	double WeightKg;
	double WeightLb;
	TwclWiiRemoteBalanceBoardGC CenterOfGravity;
} ;

#pragma pack(push, 4)
struct TwclBluetoothLePacketHeader
{
	unsigned AccessAddress;
	Byte Channel;
	unsigned Crc;
	SByte Rssi;
	unsigned Timestamp;
	bool Valid;
} ;
#pragma pack(pop)

#pragma option push -b
enum TwclBluetoothLeAdvertisingPduType { ptAdvInd, ptAdvDirectInd, ptAdvNonConnInd, ptScanReq, ptAuxScanReq, ptScanRsp, ptConnectInd, ptAuxConnectReq, ptAdvScanInd, ptAdvExtInd, ptAuxAdvInd, ptAuxScanRsp, ptAuxSyncInd, ptAuxChainInd, ptAuxConnectRsp };
#pragma option pop

#pragma pack(push, 4)
struct TwclBluetoothLeAdvertisingPduHeader
{
	TwclBluetoothLePacketHeader Header;
	TwclBluetoothLeAdvertisingPduType PduType;
	bool ChSel;
	bool TxAdd;
	bool RxAdd;
} ;
#pragma pack(pop)

struct TwclBleSnifferLlData
{
	unsigned Aa;
	unsigned CrcInit;
	Byte WinSize;
	Word WinOffset;
	Word Interval;
	Word Latency;
	Word Timeout;
	__int64 ChM;
	Byte Hop;
	Byte Sca;
} ;

class DELPHICLASS TwclBluetoothRadio;
typedef void __fastcall (__closure *TwclBluetoothConfirmEvent)(System::TObject* Sender, const TwclBluetoothRadio* Radio, const __int64 Address, /* out */ bool &Confirm);

typedef void __fastcall (__closure *TwclBluetoothDeviceEvent)(System::TObject* Sender, const TwclBluetoothRadio* Radio, const __int64 Address);

typedef void __fastcall (__closure *TwclBluetoothDeviceResultEvent)(System::TObject* Sender, const TwclBluetoothRadio* Radio, const __int64 Address, const int Error);

typedef void __fastcall (__closure *TwclBluetoothEvent)(System::TObject* Sender, const TwclBluetoothRadio* Radio);

typedef void __fastcall (__closure *TwclBluetoothIoCapabilityRequestEvent)(System::TObject* Sender, const TwclBluetoothRadio* Radio, const __int64 Address, /* out */ TwclBluetoothMitmProtection &Mitm, /* out */ TwclBluetoothIoCapability &IoCapability, /* out */ bool &OobPresent);

typedef void __fastcall (__closure *TwclBluetoothNumericComparisonEvent)(System::TObject* Sender, const TwclBluetoothRadio* Radio, const __int64 Address, const unsigned Number, /* out */ bool &Confirm);

typedef void __fastcall (__closure *TwclBluetoothOobDataRequestEvent)(System::TObject* Sender, const TwclBluetoothRadio* Radio, const __int64 Address, /* out */ TwclBluetoothOobData &OobData);

typedef void __fastcall (__closure *TwclBluetoothPasskeyNotificationEvent)(System::TObject* Sender, const TwclBluetoothRadio* Radio, const __int64 Address, const unsigned Passkey);

typedef void __fastcall (__closure *TwclBluetoothPasskeyRequestEvent)(System::TObject* Sender, const TwclBluetoothRadio* Radio, const __int64 Address, /* out */ unsigned &Passkey);

typedef void __fastcall (__closure *TwclBluetoothPinRequestEvent)(System::TObject* Sender, const TwclBluetoothRadio* Radio, const __int64 Address, /* out */ AnsiString &Pin);

typedef void __fastcall (__closure *TwclBluetoothProtectionLevelRequestEvent)(System::TObject* Sender, const TwclBluetoothRadio* Radio, const __int64 Address, /* out */ TwclBluetoothLeProtectionLevel &Protection);

typedef void __fastcall (__closure *TwclBluetoothResultEvent)(System::TObject* Sender, const TwclBluetoothRadio* Radio, const int Error);

typedef void __fastcall (__closure *TwclBluetoothGetSdpAttributesEvent)(System::TObject* Sender, /* out */ TwclBluetoothSdpProtocols &Protocols, /* out */ TwclBluetoothSdpProfiles &Profiles, /* out */ TwclBluetoothSdpFormats &Formats, /* out */ unsigned &Cod);

class DELPHICLASS TwclRfCommServerClientConnection;
typedef void __fastcall (__closure *TwclRfCommServerConnectEvent)(System::TObject* Sender, const TwclRfCommServerClientConnection* Client, const int Error);

typedef void __fastcall (__closure *TwclRfCommServerDataEvent)(System::TObject* Sender, const TwclRfCommServerClientConnection* Client, const void * Data, const unsigned Size);

typedef void __fastcall (__closure *TwclRfCommServerDisconnectEvent)(System::TObject* Sender, const TwclRfCommServerClientConnection* Client, const int Reason);

typedef void __fastcall (__closure *TwclGattCharacteristicChangedEvent)(System::TObject* Sender, const Word Handle, const TwclGattCharacteristicValue Value);

typedef void __fastcall (__closure *TwclBluetoothLeAdvertisementAppearanceFrameEvent)(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const Word Appearance);

typedef void __fastcall (__closure *TwclBluetoothLeAdvertisementFrameInformationEvent)(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const AnsiString Name, const TwclBluetoothLeAdvertisementType PacketType, const TwclBluetoothLeAdvertisementFlags Flags);

typedef void __fastcall (__closure *TwclBluetoothLeAdvertisementExtFrameInformationEvent)(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const TwclBluetoothAddressType AddressType, const SByte TxPower, const TwclBluetoothLeExtendedFrameFlags Flags);

typedef void __fastcall (__closure *TwclBluetoothLeAdvertisementRawFrameEvent)(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const Byte DataType, const TwclBluetoothLeAdvertisementFrameRawData Data);

typedef void __fastcall (__closure *TwclBluetoothLeAdvertisementReceivedEvent)(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const TwclBluetoothLeAdvertisementFrameRawData Data);

typedef void __fastcall (__closure *TwclBluetoothLeAdvertisementService16DataFrameEvent)(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const Word Uuid, const TwclBluetoothLeAdvertisementFrameRawData Data);

typedef void __fastcall (__closure *TwclBluetoothLeAdvertisementService32DataFrameEvent)(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const unsigned Uuid, const TwclBluetoothLeAdvertisementFrameRawData Data);

typedef void __fastcall (__closure *TwclBluetoothLeAdvertisementService128DataFrameEvent)(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const GUID &Uuid, const TwclBluetoothLeAdvertisementFrameRawData Data);

typedef void __fastcall (__closure *TwclBluetoothLeAdvertisementServiceSol16FrameEvent)(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const Word Uuid);

typedef void __fastcall (__closure *TwclBluetoothLeAdvertisementServiceSol32FrameEvent)(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const unsigned Uuid);

typedef void __fastcall (__closure *TwclBluetoothLeAdvertisementServiceSol128FrameEvent)(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const GUID &Uuid);

typedef void __fastcall (__closure *TwclBluetoothLeAdvertisementTxPowerLevelFrameEvent)(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const SByte TxPower);

typedef void __fastcall (__closure *TwclBluetoothLeAdvertisementUuidFrameEvent)(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const GUID &Uuid);

typedef void __fastcall (__closure *TwclBluetoothLeAltBeaconFrameEvent)(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const Word CompanyId, const Word Major, const Word Minor, const GUID &Uuid, const SByte TxRssi, const Byte Reserved, const TwclBluetoothLeAdvertisementFrameRawData Data);

typedef void __fastcall (__closure *TwclBluetoothLeDriAsdMessageEvent)(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const Wcldricommon::TwclDriRawData Raw);

typedef void __fastcall (__closure *TwclBluetoothLeEddystoneTlmFrameEvent)(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const unsigned AdvCnt, const Word Batt, const unsigned SecCnt, const double Temp, const TwclBluetoothLeAdvertisementFrameRawData Data);

typedef void __fastcall (__closure *TwclBluetoothLeEddystoneUidFrameEvent)(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const SByte TxRssi, const GUID &Uuid, const TwclBluetoothLeAdvertisementFrameRawData Data);

typedef void __fastcall (__closure *TwclBluetoothLeEddystoneUrlFrameEvent)(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const SByte TxRssi, const AnsiString Url);

typedef void __fastcall (__closure *TwclBluetoothLeManufacturerRawFrameEvent)(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const Word CompanyId, const TwclBluetoothLeAdvertisementFrameRawData Data);

typedef void __fastcall (__closure *TwclBluetoothLeAppleAirdropFrameEvent)(System::TObject* Sender, const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleAirdropFrameData &Data);

typedef void __fastcall (__closure *TwclBluetoothLeAppleAirplaySourceFrameEvent)(System::TObject* Sender, const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleAirplaySourceFrameData Data);

typedef void __fastcall (__closure *TwclBluetoothLeAppleAirplayTargetFrameEvent)(System::TObject* Sender, const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleAirplayTargetFrameData &Data);

typedef void __fastcall (__closure *TwclBluetoothLeAppleAirprintFrameEvent)(System::TObject* Sender, const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleAirprintFrameData &Data);

typedef void __fastcall (__closure *TwclBluetoothLeAppleFindMyFrameEvent)(System::TObject* Sender, const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleFindMyFrameData &Data);

typedef void __fastcall (__closure *TwclBluetoothLeAppleHandoffFrameEvent)(System::TObject* Sender, const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleHandoffFrameData &Data);

typedef void __fastcall (__closure *TwclBluetoothLeAppleHeySiriFrameEvent)(System::TObject* Sender, const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleHeySiriFrameData &Data);

typedef void __fastcall (__closure *TwclBluetoothLeAppleHomeKitFrameEvent)(System::TObject* Sender, const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleHomeKitFrameData &Data);

typedef void __fastcall (__closure *TwclBluetoothLeAppleiBeaconFrameEvent)(System::TObject* Sender, const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleiBeaconFrameData &Data);

typedef void __fastcall (__closure *TwclBluetoothLeAppleMagicSwitchFrameEvent)(System::TObject* Sender, const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleMagicSwitchFrameData Data);

typedef void __fastcall (__closure *TwclBluetoothLeAppleNearbyActionFrameEvent)(System::TObject* Sender, const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleNearbyActionFrameData &Data);

typedef void __fastcall (__closure *TwclBluetoothLeAppleNearbyInfoFrameEvent)(System::TObject* Sender, const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleNearbyInfoFrameData &Data);

typedef void __fastcall (__closure *TwclBluetoothLeAppleProximityPairingFrameEvent)(System::TObject* Sender, const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleProximityPairingFrameData &Data);

typedef void __fastcall (__closure *TwclBluetoothLeAppleTetheringSourceFrameEvent)(System::TObject* Sender, const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleTetheringSourceFrameData &Data);

typedef void __fastcall (__closure *TwclBluetoothLeAppleTetheringTargetFrameEvent)(System::TObject* Sender, const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleTetheringTargetFrameData Data);

typedef void __fastcall (__closure *TwclBluetoothLeAppleUnknownFrameEvent)(System::TObject* Sender, const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleUnknownFrameData &Data);

typedef void __fastcall (__closure *TwclBluetoothLeMicrosoftCdpBeaconFrameEvent)(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const TwclBluetoothLeCdpBeaconScenarioType ScenarioType, const Byte Version, const TwclBluetoothLeCdpBeaconDeviceType DeviceType, const Byte SubVersion, const bool ShareNearBy, const bool AddressAsDeviceId, const TwclBluetoothLeCdpBeaconExtendedDeviceStatuses ExtendedDeviceStatus, const TwclBluetoothLeCdpBeaconSalt Salt, const TwclBluetoothLeCdpBeaconHash Hash);

class DELPHICLASS TwclGattServerClient;
typedef void __fastcall (__closure *TwclGattServerClientEvent)(System::TObject* Sender, const TwclGattServerClient* Client);

class DELPHICLASS TwclGattLocalCharacteristic;
class DELPHICLASS TwclGattLocalCharacteristicReadRequest;
typedef void __fastcall (__closure *TwclGattLocalCharacteristicReadEvent)(System::TObject* Sender, const TwclGattServerClient* Client, const TwclGattLocalCharacteristic* Characteristic, const TwclGattLocalCharacteristicReadRequest* Request);

class DELPHICLASS TwclGattLocalCharacteristicWriteRequest;
typedef void __fastcall (__closure *TwclGattLocalCharacteristicWriteEvent)(System::TObject* Sender, const TwclGattServerClient* Client, const TwclGattLocalCharacteristic* Characteristic, const TwclGattLocalCharacteristicWriteRequest* Request);

typedef void __fastcall (__closure *TwclGattLocalCharacteristicSubscribedClientsChangedEvent)(System::TObject* Sender, const TwclGattServerClient* Client, const TwclGattLocalCharacteristic* Characteristic);

typedef void __fastcall (__closure *TwclWiiRemoteAccelChangedEvent)(System::TObject* Sender, const TwclWiiRemoteAccel &Accel);

typedef void __fastcall (__closure *TwclWiiRemoteBalanceBoardChangedEvent)(System::TObject* Sender, const TwclWiiRemoteBalanceBoard &Board);

typedef void __fastcall (__closure *TwclWiiRemoteButtonsChangedEvent)(System::TObject* Sender, const TwclWiiRemoteButtons &Buttons);

typedef void __fastcall (__closure *TwclWiiRemoteClassicControllerChangedEvent)(System::TObject* Sender, const TwclWiiRemoteClassicController &Controller);

typedef void __fastcall (__closure *TwclWiiRemoteDrumsChangedEvent)(System::TObject* Sender, const TwclWiiRemoteDrums &Drums);

typedef void __fastcall (__closure *TwclWiiRemoteGuitarChangedEvent)(System::TObject* Sender, const TwclWiiRemoteGuitar &Guitar);

typedef void __fastcall (__closure *TwclWiiRemoteIrChangedEvent)(System::TObject* Sender, const TwclWiiRemoteIrSensors &Ir);

typedef void __fastcall (__closure *TwclWiiRemoteNunchukChangedEvent)(System::TObject* Sender, const TwclWiiRemoteNunchuk &Nunchuk);

typedef void __fastcall (__closure *TwclWiiRemoteStatusChangedEvent)(System::TObject* Sender, const double Batt, const TwclWiiRemoteLeds Leds);

typedef void __fastcall (__closure *TwclBleSnifferAdvDirectIndReceivedEvent)(System::TObject* Sender, const TwclBluetoothLeAdvertisingPduHeader &PduHeader, const __int64 AdvA, const __int64 TargetA);

typedef void __fastcall (__closure *TwclBleSnifferAdvIndReceivedEvent)(System::TObject* Sender, const TwclBluetoothLeAdvertisingPduHeader &PduHeader, const __int64 AdvA, const void * AdvData, const Byte AdvDataLen);

typedef void __fastcall (__closure *TwclBleSnifferAdvNonConnIndReceivedEvent)(System::TObject* Sender, const TwclBluetoothLeAdvertisingPduHeader &PduHeader, const __int64 AdvA, const void * AdvData, const Byte AdvDataLen);

typedef void __fastcall (__closure *TwclBleSnifferAdvScanIndReceivedEvent)(System::TObject* Sender, const TwclBluetoothLeAdvertisingPduHeader &PduHeader, const __int64 AdvA, const void * AdvData, const Byte AdvDataLen);

typedef void __fastcall (__closure *TwclBleSnifferConnectIndReceivedEvent)(System::TObject* Sender, const TwclBluetoothLeAdvertisingPduHeader &PduHeader, const __int64 InitA, const __int64 AdvA, const TwclBleSnifferLlData &LlData);

typedef void __fastcall (__closure *TwclBleSnifferScanReqReceivedEvent)(System::TObject* Sender, const TwclBluetoothLeAdvertisingPduHeader &PduHeader, const __int64 ScanA, const __int64 AdvA);

typedef void __fastcall (__closure *TwclBleSnifferScanRspReceivedEvent)(System::TObject* Sender, const TwclBluetoothLeAdvertisingPduHeader &PduHeader, const __int64 AdvA, const void * ScanRspData, const Byte ScanRspDataLen);

typedef void __fastcall (__closure *TwclBleSnifferRawPacketReceivedEvent)(System::TObject* Sender, const TwclBluetoothLePacketHeader &Header, const void * Payload, const Word Size);

#pragma option push -b
enum TwclBluetoothConnectionType { ctRfCommClient, ctRfCommServer, ctGattClient, ctGattServer, ctBeaconWatcher, ctLeAdvertiser, ctWiiRemote };
#pragma option pop

class DELPHICLASS TwclBluetoothManager;
class PASCALIMPLEMENTATION TwclBluetoothManager : public Classes::TComponent 
{
	typedef Classes::TComponent inherited;
	
public:
	TwclBluetoothRadio* operator[](int Index) { return Radios[Index]; }
	
private:
	bool FActive;
	Wclsync::TwclCriticalSection* FCS;
	bool FHandlePairing;
	Wclsync::TwclMutex* FInstance;
	Wclmessaging::TwclMessageProcessingMethod FMessageProcessing;
	Classes::TList* FRadios;
	Wclmessaging::TwclMessageReceiver* FReceiver;
	Wclsync::TwclThreadId FThreadId;
	bool FUseBled112;
	Classes::TNotifyEvent FAfterOpen;
	Classes::TNotifyEvent FBeforeClose;
	TwclBluetoothDeviceResultEvent FOnAuthenticationCompleted;
	Classes::TNotifyEvent FOnClosed;
	TwclBluetoothConfirmEvent FOnConfirm;
	TwclBluetoothDeviceEvent FOnDeviceFound;
	TwclBluetoothResultEvent FOnDiscoveringCompleted;
	TwclBluetoothEvent FOnDiscoveringStarted;
	TwclBluetoothIoCapabilityRequestEvent FOnIoCapabilityRequest;
	TwclBluetoothNumericComparisonEvent FOnNumericComparison;
	TwclBluetoothOobDataRequestEvent FOnOobDataRequest;
	TwclBluetoothPasskeyNotificationEvent FOnPasskeyNotification;
	TwclBluetoothPasskeyRequestEvent FOnPasskeyRequest;
	TwclBluetoothPinRequestEvent FOnPinRequest;
	TwclBluetoothProtectionLevelRequestEvent FOnProtectionLevelRequest;
	TwclBluetoothEvent FOnStatusChanged;
	void __fastcall MessageReceived(const Wclmessaging::TwclMessage* Message);
	void __fastcall AddRadio(const TwclBluetoothRadio* Radio);
	bool __fastcall GetDiscovering(void);
	int __fastcall GetCount(void);
	TwclBluetoothRadio* __fastcall GetRadios(const int Index);
	void __fastcall SetMessageProcessing(const Wclmessaging::TwclMessageProcessingMethod Value);
	
protected:
	virtual void __fastcall DoAfterOpen(void);
	virtual void __fastcall DoAuthenticationCompleted(const TwclBluetoothRadio* Radio, const __int64 Address, const int Error);
	virtual void __fastcall DoBeforeClose(void);
	virtual void __fastcall DoClosed(void);
	virtual void __fastcall DoConfirm(const TwclBluetoothRadio* Radio, const __int64 Address, bool &Confirm);
	virtual void __fastcall DoDeviceFound(const TwclBluetoothRadio* Radio, const __int64 Address);
	virtual void __fastcall DoDiscoveringCompleted(const TwclBluetoothRadio* Radio, const int Error);
	virtual void __fastcall DoDiscoveringStarted(const TwclBluetoothRadio* Radio);
	virtual void __fastcall DoIoCapabilityRequest(const TwclBluetoothRadio* Radio, const __int64 Address, TwclBluetoothMitmProtection &Mitm, TwclBluetoothIoCapability &IoCapability, bool &OobPresent);
	virtual void __fastcall DoNumericComparison(const TwclBluetoothRadio* Radio, const __int64 Address, const unsigned Number, bool &Confirm);
	virtual void __fastcall DoOobDataRequest(const TwclBluetoothRadio* Radio, const __int64 Address, TwclBluetoothOobData &OobData);
	virtual void __fastcall DoPasskeyNotification(const TwclBluetoothRadio* Radio, const __int64 Address, const unsigned Passkey);
	virtual void __fastcall DoPasskeyRequest(const TwclBluetoothRadio* Radio, const __int64 Address, unsigned &Passkey);
	virtual void __fastcall DoPinRequest(const TwclBluetoothRadio* Radio, const __int64 Address, AnsiString &Pin);
	virtual void __fastcall DoProtectionLevelRequest(const TwclBluetoothRadio* Radio, const __int64 Address, TwclBluetoothLeProtectionLevel &Protection);
	virtual void __fastcall DoStatusChanged(const TwclBluetoothRadio* Radio);
	
public:
	__fastcall virtual TwclBluetoothManager(Classes::TComponent* AOwner);
	__fastcall virtual ~TwclBluetoothManager(void);
	int __fastcall Close(void);
	int __fastcall Open(const TwclBluetoothApis Apis, const bool HandlePairing = true)/* overload */;
	int __fastcall Open(const bool HandlePairing = true)/* overload */;
	int __fastcall GetRadio(/* out */ TwclBluetoothRadio* &Radio)/* overload */;
	int __fastcall GetLeRadio(/* out */ TwclBluetoothRadio* &Radio)/* overload */;
	int __fastcall GetClassicRadio(/* out */ TwclBluetoothRadio* &Radio)/* overload */;
	__property bool Active = {read=FActive, nodefault};
	__property int Count = {read=GetCount, nodefault};
	__property bool Discovering = {read=GetDiscovering, nodefault};
	__property bool HandlePairing = {read=FHandlePairing, nodefault};
	__property TwclBluetoothRadio* Radios[int Index] = {read=GetRadios/*, default*/};
	
__published:
	__property Wclmessaging::TwclMessageProcessingMethod MessageProcessing = {read=FMessageProcessing, write=SetMessageProcessing, default=1};
	__property Classes::TNotifyEvent AfterOpen = {read=FAfterOpen, write=FAfterOpen};
	__property Classes::TNotifyEvent BeforeClose = {read=FBeforeClose, write=FBeforeClose};
	__property TwclBluetoothDeviceResultEvent OnAuthenticationCompleted = {read=FOnAuthenticationCompleted, write=FOnAuthenticationCompleted};
	__property Classes::TNotifyEvent OnClosed = {read=FOnClosed, write=FOnClosed};
	__property TwclBluetoothConfirmEvent OnConfirm = {read=FOnConfirm, write=FOnConfirm};
	__property TwclBluetoothDeviceEvent OnDeviceFound = {read=FOnDeviceFound, write=FOnDeviceFound};
	__property TwclBluetoothResultEvent OnDiscoveringCompleted = {read=FOnDiscoveringCompleted, write=FOnDiscoveringCompleted};
	__property TwclBluetoothEvent OnDiscoveringStarted = {read=FOnDiscoveringStarted, write=FOnDiscoveringStarted};
	__property TwclBluetoothIoCapabilityRequestEvent OnIoCapabilityRequest = {read=FOnIoCapabilityRequest, write=FOnIoCapabilityRequest};
	__property TwclBluetoothNumericComparisonEvent OnNumericComparison = {read=FOnNumericComparison, write=FOnNumericComparison};
	__property TwclBluetoothOobDataRequestEvent OnOobDataRequest = {read=FOnOobDataRequest, write=FOnOobDataRequest};
	__property TwclBluetoothPasskeyNotificationEvent OnPasskeyNotification = {read=FOnPasskeyNotification, write=FOnPasskeyNotification};
	__property TwclBluetoothPasskeyRequestEvent OnPasskeyRequest = {read=FOnPasskeyRequest, write=FOnPasskeyRequest};
	__property TwclBluetoothPinRequestEvent OnPinRequest = {read=FOnPinRequest, write=FOnPinRequest};
	__property TwclBluetoothProtectionLevelRequestEvent OnProtectionLevelRequest = {read=FOnProtectionLevelRequest, write=FOnProtectionLevelRequest};
	__property TwclBluetoothEvent OnStatusChanged = {read=FOnStatusChanged, write=FOnStatusChanged};
};


class PASCALIMPLEMENTATION TwclBluetoothRadio : public System::TObject 
{
	typedef System::TObject inherited;
	
private:
	bool FAvailable;
	Wclsync::TwclCriticalSection* FCS;
	bool FDiscovering;
	bool FDiscoveringStarted;
	Wclsync::TwclMutex* FInstance;
	bool FLeDiscovering;
	bool FLoaded;
	TwclBluetoothManager* FManager;
	__int64 FPairAddress;
	bool FPairing;
	bool FPlugged;
	Wclmessaging::TwclMessageReceiver* FReceiver;
	DynamicArray<__int64 >  FFoundDevices;
	bool FIncludePaired;
	Classes::TList* FConnections;
	DynamicArray<TwclVirtualComPort >  FComPorts;
	int __fastcall InitializeGlobalInstanceMutex(void);
	int __fastcall IsBluetoothLeSupported(void);
	bool __fastcall DeviceNotFound(const __int64 Address);
	void __fastcall CloseAllConnections(const int Reason);
	void __fastcall DestroyComPorts(void);
	int __fastcall CreateConnection(const TwclBluetoothConnectionType ConnectionType, /* out */ Wclconnections::TwclCustomConnection* &Connection);
	void __fastcall RegisterConnection(const Wclconnections::TwclCustomConnection* Connection, const int Result);
	void __fastcall RemoveConnection(const Wclconnections::TwclCustomConnection* Connection);
	int __fastcall Close(void);
	int __fastcall Open(void);
	void __fastcall ProcessStatusChangedMessage(void);
	void __fastcall ProcessDiscoveringStartedMessage(void);
	void __fastcall ProcessDiscoveringCompletedMessage(const int Error);
	void __fastcall ProcessDeviceFoundMessage(const Wclmessaging::TwclMessage* Message);
	void __fastcall ProcessIoCapRequestMessage(const __int64 Address);
	void __fastcall ProcessProtectionRequestMessage(const __int64 Address);
	void __fastcall ProcessPinRequestMessage(const __int64 Address);
	void __fastcall ProcessNumericComparisonMessage(const __int64 Address, const unsigned Number);
	void __fastcall ProcessPasskeyRequestMessage(const __int64 Address);
	void __fastcall ProcessPasskeyNotificationMessage(const __int64 Address, const unsigned Passkey);
	void __fastcall ProcessConfirmOnlyMessage(const __int64 Address);
	void __fastcall ProcessOobDataRequestMessage(const __int64 Address);
	void __fastcall ProcessAuthCompletedMessage(const __int64 Address, const int Error);
	bool __fastcall GetAvailable(void);
	bool __fastcall GetClassicSupported(void);
	bool __fastcall GetLeSupported(void);
	Wclmessaging::TwclMessageProcessingMethod __fastcall GetMessageProcessing(void);
	bool __fastcall GetPlugged(void);
	Wclsync::TwclThreadId __fastcall GetThreadId(void);
	
protected:
	virtual void __fastcall MessageReceived(const Wclmessaging::TwclMessage* Message);
	virtual void __fastcall DoAuthenticationCompleted(const __int64 Address, const int Error);
	virtual void __fastcall DoConfirm(const __int64 Address, bool &Confirm);
	virtual void __fastcall DoDeviceFound(const __int64 Address);
	virtual void __fastcall DoDiscoveringCompleted(const int Error);
	virtual void __fastcall DoDiscoveringStarted(void);
	virtual void __fastcall DoIoCapabilityRequest(const __int64 Address, TwclBluetoothMitmProtection &Mitm, TwclBluetoothIoCapability &IoCapability, bool &OobPresent);
	virtual void __fastcall DoNumericComparison(const __int64 Address, const unsigned Number, bool &Confirm);
	virtual void __fastcall DoOobDataRequest(const __int64 Address, TwclBluetoothOobData &OobData);
	virtual void __fastcall DoPasskeyNotification(const __int64 Address, const unsigned Passkey);
	virtual void __fastcall DoPasskeyRequest(const __int64 Address, unsigned &Passkey);
	virtual void __fastcall DoPinRequest(const __int64 Address, AnsiString &Pin);
	virtual void __fastcall DoProtectionLevelRequest(const __int64 Address, TwclBluetoothLeProtectionLevel &Protection);
	virtual void __fastcall DoStatusChanged(void);
	virtual int __fastcall HalGetFunctions(void) = 0 ;
	virtual int __fastcall HalInitialize(void) = 0 ;
	virtual int __fastcall HalLoadApi(void) = 0 ;
	virtual int __fastcall HalRegisterCallbacks(void) = 0 ;
	virtual int __fastcall HalSetGlobalInstance(void) = 0 ;
	virtual void __fastcall HalClearFunctions(void) = 0 ;
	virtual void __fastcall HalClearGlobalInstance(void) = 0 ;
	virtual void __fastcall HalTerminateOperations(void) = 0 ;
	virtual void __fastcall HalUninitialize(void) = 0 ;
	virtual void __fastcall HalUnloadApi(void) = 0 ;
	virtual void __fastcall HalUnregisterCallbacks(void) = 0 ;
	virtual int __fastcall HalGetAddress(/* out */ __int64 &Address) = 0 ;
	virtual int __fastcall HalGetCod(/* out */ unsigned &Cod) = 0 ;
	virtual int __fastcall HalGetConnectable(/* out */ bool &Connectable) = 0 ;
	virtual int __fastcall HalGetDiscoverable(/* out */ bool &Discoverable) = 0 ;
	virtual int __fastcall HalGetHciVersion(/* out */ Byte &Version, /* out */ Word &Revision) = 0 ;
	virtual int __fastcall HalGetLmpVersion(/* out */ Byte &Version, /* out */ Word &Subversion) = 0 ;
	virtual int __fastcall HalGetManufacturer(/* out */ Word &Manu) = 0 ;
	virtual int __fastcall HalGetName(/* out */ AnsiString &Name) = 0 ;
	virtual int __fastcall HalSetCod(const unsigned Cod) = 0 ;
	virtual int __fastcall HalSetConnectable(const bool Connectable) = 0 ;
	virtual int __fastcall HalSetDiscoverable(const bool Discoverable) = 0 ;
	virtual int __fastcall HalSetName(const AnsiString Name) = 0 ;
	virtual int __fastcall HalTurnOn(void) = 0 ;
	virtual int __fastcall HalTurnOff(void) = 0 ;
	virtual int __fastcall HalDiscoverClassic(const Byte Timeout) = 0 ;
	virtual int __fastcall HalDiscoverBle(const Byte Timeout) = 0 ;
	virtual int __fastcall HalTerminate(void) = 0 ;
	virtual int __fastcall HalEnumPairedDevices(/* out */ TwclBluetoothAddresses &Devices) = 0 ;
	virtual int __fastcall HalEnumConnectedDevices(/* out */ TwclBluetoothAddresses &Devices) = 0 ;
	virtual int __fastcall HalEnumRemoteServices(const __int64 Address, const System::PGUID Uuid, /* out */ TwclBluetoothServices &Services) = 0 ;
	virtual int __fastcall HalIsRemoteDeviceInRange(const __int64 Address, /* out */ bool &InRange) = 0 ;
	virtual int __fastcall HalRemoteDisconnect(const __int64 Address) = 0 ;
	virtual int __fastcall HalGetRemoteAddressType(const __int64 Address, /* out */ TwclBluetoothAddressType &AddrType) = 0 ;
	virtual int __fastcall HalGetRemoteCod(const __int64 Address, /* out */ unsigned &Cod) = 0 ;
	virtual int __fastcall HalGetRemoteDeviceType(const __int64 Address, /* out */ TwclBluetoothDeviceType &DevType) = 0 ;
	virtual int __fastcall HalGetRemoteName(const __int64 Address, /* out */ AnsiString &Name) = 0 ;
	virtual int __fastcall HalGetRemotePaired(const __int64 Address, /* out */ bool &Paired) = 0 ;
	virtual int __fastcall HalGetRemoteConnectedStatus(const __int64 Address, /* out */ bool &Connected) = 0 ;
	virtual int __fastcall HalGetRemoteRssi(const __int64 Address, /* out */ SByte &Rssi) = 0 ;
	virtual int __fastcall HalConfirmReply(const __int64 Address, const bool Confirm) = 0 ;
	virtual int __fastcall HalIoCapabilityReply(const __int64 Address, const TwclBluetoothMitmProtection Mitm, const TwclBluetoothIoCapability IoCapability, const bool OobPresent) = 0 ;
	virtual int __fastcall HalNumericComparisonReply(const __int64 Address, const unsigned Value, const bool Confirm) = 0 ;
	virtual int __fastcall HalOobDataReply(const __int64 Address, const TwclBluetoothOobData &OobData) = 0 ;
	virtual int __fastcall HalPasskeyReply(const __int64 Address, const unsigned Passkey) = 0 ;
	virtual int __fastcall HalPinReply(const __int64 Address, const AnsiString Pin) = 0 ;
	virtual int __fastcall HalProtectionLevelReply(const __int64 Address, const TwclBluetoothLeProtectionLevel Protection) = 0 ;
	virtual int __fastcall HalRemotePair(const __int64 Address, const TwclBluetoothPairingMethod Method) = 0 ;
	virtual int __fastcall HalRemoteUnpair(const __int64 Address, const TwclBluetoothPairingMethod Method) = 0 ;
	virtual int __fastcall HalGetSimplePairingMode(/* out */ bool &Enabled) = 0 ;
	virtual int __fastcall HalSetSimplePairingMode(const bool Enable) = 0 ;
	virtual int __fastcall HalCreateConnection(const TwclBluetoothConnectionType ConnectionType, /* out */ Wclconnections::TwclCustomConnection* &Connection) = 0 ;
	virtual int __fastcall HalCreateComPort(const __int64 Address, const GUID &Service, /* out */ Word &Number) = 0 ;
	virtual int __fastcall HalDestroyComPort(const Word Number) = 0 ;
	virtual int __fastcall HalEnumComPorts(/* out */ TwclVirtualComPorts &ComPorts) = 0 ;
	virtual int __fastcall HalEnumInstalledServices(const __int64 Address, /* out */ TwclBluetoothInstalledServices &Services) = 0 ;
	virtual int __fastcall HalInstallDevice(const __int64 Address, const GUID &Service) = 0 ;
	virtual int __fastcall HalUninstallDevice(const __int64 Address, const GUID &Service) = 0 ;
	virtual TwclBluetoothApi __fastcall HalGetApi(void) = 0 ;
	virtual AnsiString __fastcall HalGetApiName(void) = 0 ;
	virtual bool __fastcall HalGetAvailable(void) = 0 ;
	virtual bool __fastcall HalGetPlugged(void) = 0 ;
	int __fastcall CheckAvailable(void);
	__property bool IncludePaired = {read=FIncludePaired, nodefault};
	__property bool LeDiscovering = {read=FLeDiscovering, nodefault};
	__property Wclmessaging::TwclMessageProcessingMethod MessageProcessing = {read=GetMessageProcessing, nodefault};
	__property __int64 PairAddress = {read=FPairAddress};
	__property Wclmessaging::TwclMessageReceiver* Receiver = {read=FReceiver};
	__property Wclsync::TwclThreadId ThreadId = {read=GetThreadId, nodefault};
	
public:
	__fastcall virtual TwclBluetoothRadio(const TwclBluetoothManager* Manager);
	__fastcall virtual ~TwclBluetoothRadio(void);
	int __fastcall GetAddress(/* out */ __int64 &Address);
	int __fastcall GetBluetoothVersion(/* out */ TwclBluetoothVersion &Version);
	int __fastcall GetCod(/* out */ unsigned &Cod);
	int __fastcall GetConnectable(/* out */ bool &Connectable);
	int __fastcall GetDiscoverable(/* out */ bool &Discoverable);
	int __fastcall GetHciVersion(/* out */ Byte &Version, /* out */ Word &Revision);
	int __fastcall GetLmpVersion(/* out */ Byte &Version, /* out */ Word &Subversion);
	int __fastcall GetManufacturer(/* out */ Word &Manu);
	int __fastcall GetName(/* out */ AnsiString &Name);
	int __fastcall SetCod(const unsigned Cod);
	int __fastcall SetConnectable(const bool Connectable);
	int __fastcall SetDiscoverable(const bool Discoverable);
	int __fastcall SetName(const AnsiString Name);
	int __fastcall TurnOn(void);
	int __fastcall TurnOff(void);
	int __fastcall Discover(const Byte Timeout, const TwclBluetoothDiscoverKind Kind, const bool IncludePaired = false);
	int __fastcall Terminate(void);
	int __fastcall EnumPairedDevices(/* out */ TwclBluetoothAddresses &Devices)/* overload */;
	int __fastcall EnumPairedDevices(const TwclBluetoothDiscoverKind Kind, /* out */ TwclBluetoothAddresses &Devices)/* overload */;
	int __fastcall EnumConnectedDevices(/* out */ TwclBluetoothAddresses &Devices);
	int __fastcall EnumRemoteServices(const __int64 Address, System::PGUID Uuid, /* out */ TwclBluetoothServices &Services);
	int __fastcall IsRemoteDeviceInRange(const __int64 Address, /* out */ bool &InRange);
	int __fastcall RemoteDisconnect(const __int64 Address);
	int __fastcall GetRemoteAddressType(const __int64 Address, /* out */ TwclBluetoothAddressType &AddrType);
	int __fastcall GetRemoteCod(const __int64 Address, /* out */ unsigned &Cod);
	int __fastcall GetRemoteDeviceType(const __int64 Address, /* out */ TwclBluetoothDeviceType &DevType);
	int __fastcall GetRemoteName(const __int64 Address, /* out */ AnsiString &Name);
	int __fastcall GetRemotePaired(const __int64 Address, /* out */ bool &Paired);
	int __fastcall GetRemoteConnectedStatus(const __int64 Address, /* out */ bool &Connected);
	int __fastcall GetRemoteRssi(const __int64 Address, /* out */ SByte &Rssi);
	int __fastcall RemotePair(const __int64 Address, const TwclBluetoothPairingMethod Method = (TwclBluetoothPairingMethod)(0x0));
	int __fastcall RemoteUnpair(const __int64 Address, const TwclBluetoothPairingMethod Method = (TwclBluetoothPairingMethod)(0x0), const bool Force = false);
	int __fastcall GetSimplePairingMode(/* out */ bool &Enabled);
	int __fastcall SetSimplePairingMode(const bool Enable);
	int __fastcall CreateComPort(const __int64 Address, const GUID &Service, /* out */ Word &Number);
	int __fastcall DestroyComPort(const Word Number);
	int __fastcall EnumComPorts(/* out */ TwclVirtualComPorts &ComPorts);
	int __fastcall EnumInstalledServices(const __int64 Address, /* out */ TwclBluetoothInstalledServices &Services);
	int __fastcall InstallDevice(const __int64 Address, const GUID &Service);
	int __fastcall UninstallDevice(const __int64 Address, const GUID &Service);
	__property TwclBluetoothApi Api = {read=HalGetApi, nodefault};
	__property AnsiString ApiName = {read=HalGetApiName};
	__property bool Available = {read=GetAvailable, nodefault};
	__property bool ClassicSupported = {read=GetClassicSupported, nodefault};
	__property TwclVirtualComPorts ComPorts = {read=FComPorts};
	__property bool Discovering = {read=FDiscovering, nodefault};
	__property bool LeSupported = {read=GetLeSupported, nodefault};
	__property TwclBluetoothManager* Manager = {read=FManager};
	__property bool Pairing = {read=FPairing, nodefault};
	__property bool Plugged = {read=GetPlugged, nodefault};
};


class DELPHICLASS TwclRfCommClientConnection;
class PASCALIMPLEMENTATION TwclRfCommClientConnection : public Wclconnections::TwclClientDataConnection 
{
	typedef Wclconnections::TwclClientDataConnection inherited;
	
private:
	TwclBluetoothRadio* FRadio;
	__int64 FAddress;
	bool FAuthentication;
	Byte FChannel;
	bool FEncryption;
	#pragma pack(push, 1)
	GUID FService;
	#pragma pack(pop)
	
	
protected:
	virtual void __fastcall MessageReceived(const Wclmessaging::TwclMessage* Message);
	
public:
	__fastcall virtual TwclRfCommClientConnection(const TwclBluetoothRadio* Radio);
	HIDESBASE int __fastcall Connect(const __int64 Address, const GUID &Service, const Byte Channel, const bool Authentication, const bool Encryption, const unsigned Timeout);
	__property __int64 Address = {read=FAddress};
	__property bool Authentication = {read=FAuthentication, nodefault};
	__property Byte Channel = {read=FChannel, nodefault};
	__property bool Encryption = {read=FEncryption, nodefault};
	__property TwclBluetoothRadio* Radio = {read=FRadio};
	__property GUID Service = {read=FService};
public:
	#pragma option push -w-inl
	/* TwclClientConnection.Destroy */ inline __fastcall virtual ~TwclRfCommClientConnection(void) { }
	#pragma option pop
	
};


class PASCALIMPLEMENTATION TwclRfCommServerClientConnection : public Wclconnections::TwclServerClientDataConnection 
{
	typedef Wclconnections::TwclServerClientDataConnection inherited;
	
private:
	__int64 FAddress;
	
protected:
	void __fastcall SetAddress(const __int64 Address);
	
public:
	__fastcall virtual TwclRfCommServerClientConnection(void);
	__property __int64 Address = {read=FAddress};
public:
	#pragma option push -w-inl
	/* TwclServerClientConnection.Destroy */ inline __fastcall virtual ~TwclRfCommServerClientConnection(void) { }
	#pragma option pop
	
};


class DELPHICLASS TwclRfCommServerConnection;
class PASCALIMPLEMENTATION TwclRfCommServerConnection : public Wclconnections::TwclServerDataConnection 
{
	typedef Wclconnections::TwclServerDataConnection inherited;
	
private:
	TwclBluetoothRadio* FRadio;
	bool FAuthentication;
	Byte FAssignedChannel;
	Byte FChannel;
	bool FEncryption;
	#pragma pack(push, 1)
	GUID FService;
	#pragma pack(pop)
	
	AnsiString FServiceName;
	TwclBluetoothGetSdpAttributesEvent FGetSdpAttributes;
	
protected:
	virtual void __fastcall MessageReceived(const Wclmessaging::TwclMessage* Message);
	void __fastcall SetAssignedChannel(const Byte Channel);
	virtual void __fastcall DoGetSdpAttributes(/* out */ TwclBluetoothSdpProtocols &Protocols, /* out */ TwclBluetoothSdpProfiles &Profiles, /* out */ TwclBluetoothSdpFormats &Formats, /* out */ unsigned &Cod);
	
public:
	__fastcall virtual TwclRfCommServerConnection(const TwclBluetoothRadio* Radio);
	HIDESBASE int __fastcall Listen(const GUID &Service, const AnsiString ServiceName, const Byte Channel, const bool Authentication, const bool Encryption);
	__property bool Authentication = {read=FAuthentication, nodefault};
	__property Byte AssignedChannel = {read=FAssignedChannel, nodefault};
	__property Byte Channel = {read=FChannel, nodefault};
	__property bool Encryption = {read=FEncryption, nodefault};
	__property TwclBluetoothRadio* Radio = {read=FRadio};
	__property GUID Service = {read=FService};
	__property AnsiString ServiceName = {read=FServiceName};
	__property TwclBluetoothGetSdpAttributesEvent GetSdpAttributes = {read=FGetSdpAttributes, write=FGetSdpAttributes};
public:
	#pragma option push -w-inl
	/* TwclServerConnection.Destroy */ inline __fastcall virtual ~TwclRfCommServerConnection(void) { }
	#pragma option pop
	
};


class DELPHICLASS TwclGattClientConnection;
class PASCALIMPLEMENTATION TwclGattClientConnection : public Wclconnections::TwclClientConnection 
{
	typedef Wclconnections::TwclClientConnection inherited;
	
private:
	__int64 FAddress;
	bool FConnectOnRead;
	bool FForceNotifications;
	TwclBluetoothRadio* FRadio;
	bool FRemoteDisconnected;
	Classes::TList* FSubscriptions;
	Classes::TList* FSubscribedDescriptors;
	TwclGattCharacteristicChangedEvent FOnCharacteristicChanged;
	Classes::TNotifyEvent FOnConnectionParamsChanged;
	Classes::TNotifyEvent FOnConnectionPhyChanged;
	Classes::TNotifyEvent FOnMaxPduSizeChanged;
	void __fastcall ProcessCharacteristicChangeMessage(const Word Handle, const void * Value, const unsigned Size);
	
protected:
	virtual int __fastcall PrepareForConnection(void);
	virtual void __fastcall MessageReceived(const Wclmessaging::TwclMessage* Message);
	virtual int __fastcall HalConnect(const Wclsync::TwclEvent* Event);
	virtual int __fastcall HalDisconnect(void);
	virtual void __fastcall DoCharacteristicChanged(const Word Handle, const TwclGattCharacteristicValue Value);
	virtual void __fastcall DoConnectionParamsChanged(void);
	virtual void __fastcall DoConnectionPhyChanged(void);
	virtual void __fastcall DoMaxPduSizeChanged(void);
	virtual int __fastcall HalReadCharacteristics(const TwclGattService &Service, const TwclGattOperationFlag Flag, /* out */ TwclGattCharacteristics &Characteristics) = 0 ;
	virtual int __fastcall HalReadCharacteristicValue(const TwclGattCharacteristic &Characteristic, const TwclGattOperationFlag Flag, const TwclGattProtectionLevel Protection, /* out */ TwclGattCharacteristicValue &Value) = 0 ;
	virtual int __fastcall HalReadDescriptors(const TwclGattCharacteristic &Characteristic, const TwclGattOperationFlag Flag, /* out */ TwclGattDescriptors &Descriptors) = 0 ;
	virtual int __fastcall HalReadDescriptorValue(const TwclGattDescriptor &Descriptor, const TwclGattOperationFlag Flag, const TwclGattProtectionLevel Protection, TwclGattDescriptorValue &Value) = 0 ;
	virtual int __fastcall HalReadIncludedServices(const TwclGattService &Service, const TwclGattOperationFlag Flag, /* out */ TwclGattServices &Services) = 0 ;
	virtual int __fastcall HalReadServices(const TwclGattOperationFlag Flag, /* out */ TwclGattServices &Services) = 0 ;
	virtual int __fastcall HalWriteCharacteristicValue(const TwclGattCharacteristic &Characteristic, const TwclGattProtectionLevel Protection, const TwclGattCharacteristicValue Value) = 0 ;
	virtual int __fastcall HalWriteDescriptorValue(const TwclGattDescriptor &Descriptor, const TwclGattProtectionLevel Protection, const TwclGattDescriptorValue &Value) = 0 ;
	virtual int __fastcall HalSubscribe(const TwclGattCharacteristic &Characteristic, /* out */ unsigned &Hdl) = 0 ;
	virtual int __fastcall HalUnsubscribe(const unsigned Hdl) = 0 ;
	virtual int __fastcall HalGetConnectionParams(/* out */ TwclBluetoothLeConnectionParameters &Params) = 0 ;
	virtual int __fastcall HalSetConnectionParams(const TwclBluetoothLeConnectionParametersType Params) = 0 /* overload */;
	virtual int __fastcall HalSetConnectionParams(const TwclBluetoothLeConnectionParametersValue &Params) = 0 /* overload */;
	virtual int __fastcall HalGetMaxPduSize(/* out */ Word &Size) = 0 ;
	virtual int __fastcall HalGetConnectionPhyInfo(/* out */ TwclBluetoothLeConnectionPhy &Info) = 0 ;
	
public:
	__fastcall virtual TwclGattClientConnection(const TwclBluetoothRadio* Radio);
	int __fastcall ReadCharacteristics(const TwclGattService &Service, const TwclGattOperationFlag Flag, /* out */ TwclGattCharacteristics &Characteristics);
	int __fastcall ReadCharacteristicValue(const TwclGattCharacteristic &Characteristic, const TwclGattOperationFlag Flag, const TwclGattProtectionLevel Protection, /* out */ TwclGattCharacteristicValue &Value);
	int __fastcall ReadDescriptors(const TwclGattCharacteristic &Characteristic, const TwclGattOperationFlag Flag, /* out */ TwclGattDescriptors &Descriptors);
	int __fastcall ReadDescriptorValue(const TwclGattDescriptor &Descriptor, const TwclGattOperationFlag Flag, const TwclGattProtectionLevel Protection, /* out */ TwclGattDescriptorValue &Value);
	int __fastcall ReadIncludedServices(const TwclGattService &Service, const TwclGattOperationFlag Flag, /* out */ TwclGattServices &Services);
	int __fastcall ReadServices(const TwclGattOperationFlag Flag, /* out */ TwclGattServices &Services);
	int __fastcall WriteCharacteristicValue(const TwclGattCharacteristic &Characteristic, const TwclGattProtectionLevel Protection, const TwclGattCharacteristicValue Value, const TwclGattWriteKind WriteKind);
	int __fastcall WriteDescriptorValue(const TwclGattDescriptor &Descriptor, const TwclGattProtectionLevel Protection, const TwclGattDescriptorValue &Value);
	int __fastcall WriteClientConfiguration(const TwclGattCharacteristic &Characteristic, const bool Subscribe, const TwclGattOperationFlag Flag, const TwclGattProtectionLevel Protection);
	int __fastcall Subscribe(const TwclGattCharacteristic &Characteristic);
	int __fastcall Unsubscribe(const TwclGattCharacteristic &Characteristic);
	HIDESBASE int __fastcall Connect(const __int64 Address, const bool ConnectOnRead, const bool ForceNotifications);
	int __fastcall GetConnectionParams(/* out */ TwclBluetoothLeConnectionParameters &Params);
	int __fastcall SetConnectionParams(const TwclBluetoothLeConnectionParametersType Params)/* overload */;
	int __fastcall SetConnectionParams(const TwclBluetoothLeConnectionParametersValue &Params)/* overload */;
	int __fastcall GetMaxPduSize(/* out */ Word &Size);
	int __fastcall GetConnectionPhyInfo(/* out */ TwclBluetoothLeConnectionPhy &Info);
	__property __int64 Address = {read=FAddress};
	__property bool ConnectOnRead = {read=FConnectOnRead, nodefault};
	__property bool ForceNotifications = {read=FForceNotifications, nodefault};
	__property TwclBluetoothRadio* Radio = {read=FRadio};
	__property TwclGattCharacteristicChangedEvent OnCharacteristicChanged = {read=FOnCharacteristicChanged, write=FOnCharacteristicChanged};
	__property Classes::TNotifyEvent OnConnectionParamsChanged = {read=FOnConnectionParamsChanged, write=FOnConnectionParamsChanged};
	__property Classes::TNotifyEvent OnConnectionPhyChanged = {read=FOnConnectionPhyChanged, write=FOnConnectionPhyChanged};
	__property Classes::TNotifyEvent OnMaxPduSizeChanged = {read=FOnMaxPduSizeChanged, write=FOnMaxPduSizeChanged};
public:
	#pragma option push -w-inl
	/* TwclClientConnection.Destroy */ inline __fastcall virtual ~TwclGattClientConnection(void) { }
	#pragma option pop
	
};


class DELPHICLASS TwclGattLocalAttribute;
class PASCALIMPLEMENTATION TwclGattLocalAttribute : public System::TObject 
{
	typedef System::TObject inherited;
	
private:
	Wclsync::TwclCriticalSection* FCS;
	TwclGattUuid FUuid;
	
protected:
	__property Wclsync::TwclCriticalSection* CS = {read=FCS};
	
public:
	__fastcall TwclGattLocalAttribute(const TwclGattUuid &Uuid);
	__fastcall virtual ~TwclGattLocalAttribute(void);
	__property TwclGattUuid Uuid = {read=FUuid};
};


class DELPHICLASS TwclGattLocalService;
class DELPHICLASS TwclGattServerConnection;
class DELPHICLASS TwclBluetoothGattServerClientParams;
class PASCALIMPLEMENTATION TwclGattServerConnection : public Wclconnections::TwclCustomConnection 
{
	typedef Wclconnections::TwclCustomConnection inherited;
	
private:
	Classes::TList* FClients;
	Wclsync::TwclMutex* FMutex;
	TwclBluetoothRadio* FRadio;
	Classes::TList* FServices;
	Wclsync::TwclThread* FThread;
	int FInitResult;
	Wclsync::TwclManualResetEvent* FInitEvent;
	Wclsync::TwclManualResetEvent* FTermEvent;
	TwclGattServerClientEvent FOnClientConnected;
	TwclGattServerClientEvent FOnClientDisconnected;
	TwclGattServerClientEvent FOnConnectionParamsChanged;
	TwclGattServerClientEvent FOnConnectionPhyChanged;
	TwclGattServerClientEvent FOnMaxPduSizeChanged;
	TwclGattServerClientEvent FOnNotificationSizeChanged;
	TwclGattLocalCharacteristicReadEvent FOnRead;
	Classes::TNotifyEvent FOnStarted;
	Classes::TNotifyEvent FOnStopped;
	TwclGattLocalCharacteristicSubscribedClientsChangedEvent FOnSubscribed;
	TwclGattLocalCharacteristicSubscribedClientsChangedEvent FOnUnsubscribed;
	TwclGattLocalCharacteristicWriteEvent FOnWrite;
	void __fastcall ThreadProc(void);
	void __fastcall NotifyDisconnected(void);
	void __fastcall NotifyUnsubscribed(void);
	bool __fastcall AddClient(const __int64 Address, /* out */ TwclGattServerClient* &Client);
	TwclGattServerClient* __fastcall FindClient(const __int64 Address);
	TwclGattServerClient* __fastcall RemoveClient(const __int64 Address);
	TwclGattServerClient* __fastcall ClientConnected(const __int64 Address, const TwclBluetoothGattServerClientParams* Params);
	void __fastcall ClientDisconnected(const __int64 Address);
	bool __fastcall GetActive(void);
	TwclGattServerClient* __fastcall GetClients(const int Index);
	int __fastcall GetClientsCount(void);
	TwclGattLocalService* __fastcall GetServices(const int Index);
	int __fastcall GetServicesCount(void);
	
protected:
	virtual void __fastcall MessageReceived(const Wclmessaging::TwclMessage* Message);
	virtual void __fastcall DoClientConnected(const TwclGattServerClient* Client);
	virtual void __fastcall DoClientDisconnected(const TwclGattServerClient* Client);
	virtual void __fastcall DoConnectionParamsChanged(const TwclGattServerClient* Client);
	virtual void __fastcall DoConnectionPhyChanged(const TwclGattServerClient* Client);
	virtual void __fastcall DoMaxPduSizeChanged(const TwclGattServerClient* Client);
	virtual void __fastcall DoNotificationSizeChanged(const TwclGattServerClient* Client);
	virtual void __fastcall DoRead(const TwclGattServerClient* Client, const TwclGattLocalCharacteristic* Characteristic, const TwclGattLocalCharacteristicReadRequest* Request);
	virtual void __fastcall DoStarted(void);
	virtual void __fastcall DoStopped(void);
	virtual void __fastcall DoSubscribed(const TwclGattServerClient* Client, const TwclGattLocalCharacteristic* Characteristic);
	virtual void __fastcall DoUnsubscribed(const TwclGattServerClient* Client, const TwclGattLocalCharacteristic* Characteristic);
	virtual void __fastcall DoWrite(const TwclGattServerClient* Client, const TwclGattLocalCharacteristic* Characteristic, const TwclGattLocalCharacteristicWriteRequest* Request);
	virtual int __fastcall HalInitialize(void) = 0 ;
	virtual int __fastcall HalUninitialize(void) = 0 ;
	virtual int __fastcall HalCreateService(const TwclGattUuid &Uuid, /* out */ TwclGattLocalService* &Service) = 0 ;
	virtual TwclGattServerClient* __fastcall HalCreateClient(const __int64 Address) = 0 ;
	
public:
	__fastcall virtual TwclGattServerConnection(const TwclBluetoothRadio* Radio);
	__fastcall virtual ~TwclGattServerConnection(void);
	int __fastcall Start(void);
	int __fastcall Stop(void);
	int __fastcall AddService(const TwclGattUuid &Uuid, /* out */ TwclGattLocalService* &Service);
	int __fastcall ClearServices(void);
	int __fastcall DeleteService(const int Index);
	__property bool Active = {read=GetActive, nodefault};
	__property TwclGattServerClient* Clients[int Index] = {read=GetClients};
	__property int ClientsCount = {read=GetClientsCount, nodefault};
	__property TwclBluetoothRadio* Radio = {read=FRadio};
	__property TwclGattLocalService* Services[int Index] = {read=GetServices};
	__property int ServicesCount = {read=GetServicesCount, nodefault};
	__property TwclGattServerClientEvent OnClientConnected = {read=FOnClientConnected, write=FOnClientConnected};
	__property TwclGattServerClientEvent OnClientDisconnected = {read=FOnClientDisconnected, write=FOnClientDisconnected};
	__property TwclGattServerClientEvent OnConnectionParamsChanged = {read=FOnConnectionParamsChanged, write=FOnConnectionParamsChanged};
	__property TwclGattServerClientEvent OnConnectionPhyChanged = {read=FOnConnectionPhyChanged, write=FOnConnectionPhyChanged};
	__property TwclGattServerClientEvent OnMaxPduSizeChanged = {read=FOnMaxPduSizeChanged, write=FOnMaxPduSizeChanged};
	__property TwclGattServerClientEvent OnNotificationSizeChanged = {read=FOnNotificationSizeChanged, write=FOnNotificationSizeChanged};
	__property TwclGattLocalCharacteristicReadEvent OnRead = {read=FOnRead, write=FOnRead};
	__property Classes::TNotifyEvent OnStarted = {read=FOnStarted, write=FOnStarted};
	__property Classes::TNotifyEvent OnStopped = {read=FOnStopped, write=FOnStopped};
	__property TwclGattLocalCharacteristicSubscribedClientsChangedEvent OnSubscribed = {read=FOnSubscribed, write=FOnSubscribed};
	__property TwclGattLocalCharacteristicSubscribedClientsChangedEvent OnUnsubscribed = {read=FOnUnsubscribed, write=FOnUnsubscribed};
	__property TwclGattLocalCharacteristicWriteEvent OnWrite = {read=FOnWrite, write=FOnWrite};
};


class PASCALIMPLEMENTATION TwclGattLocalService : public TwclGattLocalAttribute 
{
	typedef TwclGattLocalAttribute inherited;
	
public:
	TwclGattLocalCharacteristic* operator[](int Index) { return Characteristics[Index]; }
	
private:
	bool FAdded;
	int FError;
	Classes::TList* FCharacteristics;
	TwclGattServerConnection* FServer;
	bool FConnectable;
	bool FDiscoverable;
	int __fastcall AddAllCharacteristics(void);
	void __fastcall ClearAllCharacteristics(void);
	void __fastcall DeleteSelectedCharacteristic(const int Index);
	void __fastcall RemoveAddedCharacteristics(void);
	void __fastcall RemoveAllCharacteristics(void);
	void __fastcall SetConnectable(const bool Value);
	void __fastcall SetDiscoverable(const bool Value);
	int __fastcall Add(void);
	int __fastcall Remove(void);
	TwclGattLocalCharacteristic* __fastcall GetCharacteristics(const int Index);
	int __fastcall GetCharacteristicsCount(void);
	
protected:
	virtual int __fastcall HalAdd(void) = 0 ;
	virtual int __fastcall HalCreate(void) = 0 ;
	virtual int __fastcall HalDestroy(void) = 0 ;
	virtual int __fastcall HalRemove(void) = 0 ;
	virtual int __fastcall HalCreateCharacteristic(const TwclGattUuid &Uuid, const TwclGattLocalCharacteristicParameters &Params, /* out */ TwclGattLocalCharacteristic* &Characteristic) = 0 ;
	
public:
	__fastcall TwclGattLocalService(const TwclGattServerConnection* Server, const TwclGattUuid &Uuid);
	__fastcall virtual ~TwclGattLocalService(void);
	int __fastcall AddCharacteristic(const TwclGattUuid &Uuid, const TwclGattLocalCharacteristicParameters &Params, /* out */ TwclGattLocalCharacteristic* &Characteristic);
	int __fastcall ClearCharacteristics(void);
	int __fastcall DeleteCharacteristic(const int Index);
	__property bool Connectable = {read=FConnectable, write=SetConnectable, nodefault};
	__property bool Discoverable = {read=FDiscoverable, write=SetDiscoverable, nodefault};
	__property bool Added = {read=FAdded, nodefault};
	__property TwclGattLocalCharacteristic* Characteristics[int Index] = {read=GetCharacteristics/*, default*/};
	__property int CharacteristicsCount = {read=GetCharacteristicsCount, nodefault};
	__property int Error = {read=FError, nodefault};
	__property TwclGattServerConnection* Server = {read=FServer};
};


class PASCALIMPLEMENTATION TwclGattLocalCharacteristic : public TwclGattLocalAttribute 
{
	typedef TwclGattLocalAttribute inherited;
	
public:
	TwclGattServerClient* operator[](int Index) { return Clients[Index]; }
	
private:
	bool FAdded;
	Classes::TList* FClients;
	int FError;
	TwclGattLocalCharacteristicParameters FParams;
	TwclGattLocalService* FService;
	TwclGattServerClient* __fastcall GetClients(const int Index);
	int __fastcall GetCount(void);
	bool __fastcall IsNotifiable(void);
	void __fastcall AddClient(const TwclGattServerClient* Client);
	void __fastcall RemoveClient(const TwclGattServerClient* Client);
	int __fastcall Add(void);
	int __fastcall Remove(void);
	
protected:
	virtual int __fastcall HalAdd(void) = 0 ;
	virtual int __fastcall HalRemove(void) = 0 ;
	virtual int __fastcall HalNotify(const __int64 Address, const void * Data, const unsigned Size) = 0 ;
	
public:
	__fastcall TwclGattLocalCharacteristic(const TwclGattLocalService* Service, const TwclGattUuid &Uuid, const TwclGattLocalCharacteristicParameters &Params);
	__fastcall virtual ~TwclGattLocalCharacteristic(void);
	int __fastcall Notify(const void * Data, const unsigned Size)/* overload */;
	int __fastcall Notify(const __int64 Address, const void * Data, const unsigned Size)/* overload */;
	__property bool Added = {read=FAdded, nodefault};
	__property TwclGattServerClient* Clients[int Index] = {read=GetClients/*, default*/};
	__property int Count = {read=GetCount, nodefault};
	__property int Error = {read=FError, nodefault};
	__property TwclGattLocalCharacteristicParameters Params = {read=FParams};
	__property TwclGattLocalService* Service = {read=FService};
};


class DELPHICLASS TwclGattLocalCharacteristicRequest;
class PASCALIMPLEMENTATION TwclGattLocalCharacteristicRequest : public System::TObject 
{
	typedef System::TObject inherited;
	
private:
	unsigned FOffset;
	bool FProcessed;
	__int64 FTimestamp;
	
protected:
	void __fastcall SetProcessed(const int Error);
	int __fastcall CheckProcessed(void);
	virtual int __fastcall HalRespondWithError(const int Error) = 0 ;
	
public:
	__fastcall virtual TwclGattLocalCharacteristicRequest(const __int64 Timestamp, const unsigned Offset);
	__fastcall virtual ~TwclGattLocalCharacteristicRequest(void);
	virtual int __fastcall RespondWithError(const int Error);
	__property unsigned Offset = {read=FOffset, nodefault};
	__property __int64 Timestamp = {read=FTimestamp};
};


class PASCALIMPLEMENTATION TwclGattLocalCharacteristicReadRequest : public TwclGattLocalCharacteristicRequest 
{
	typedef TwclGattLocalCharacteristicRequest inherited;
	
private:
	unsigned FSize;
	
protected:
	virtual int __fastcall HalRespond(const void * Data, const unsigned Size) = 0 ;
	
public:
	__fastcall virtual TwclGattLocalCharacteristicReadRequest(const __int64 Timestamp, const unsigned Offset, const unsigned Size);
	int __fastcall Respond(const void * Data, const unsigned Size);
	__property unsigned Size = {read=FSize, nodefault};
public:
	#pragma option push -w-inl
	/* TwclGattLocalCharacteristicRequest.Destroy */ inline __fastcall virtual ~TwclGattLocalCharacteristicReadRequest(void) { }
	#pragma option pop
	
};


class PASCALIMPLEMENTATION TwclGattLocalCharacteristicWriteRequest : public TwclGattLocalCharacteristicRequest 
{
	typedef TwclGattLocalCharacteristicRequest inherited;
	
private:
	void *FData;
	unsigned FSize;
	bool FWithResponse;
	
protected:
	virtual int __fastcall HalRespond(void) = 0 ;
	
public:
	__fastcall virtual TwclGattLocalCharacteristicWriteRequest(const __int64 Timestamp, const unsigned Offset, const void * Data, const unsigned Size, const bool WithResponse);
	__fastcall virtual ~TwclGattLocalCharacteristicWriteRequest(void);
	int __fastcall Respond(void);
	virtual int __fastcall RespondWithError(const int Error);
	__property void * Data = {read=FData};
	__property unsigned Size = {read=FSize, nodefault};
	__property bool WithResponse = {read=FWithResponse, nodefault};
};


class PASCALIMPLEMENTATION TwclBluetoothGattServerClientParams : public System::TObject 
{
	typedef System::TObject inherited;
	
public:
	__fastcall TwclBluetoothGattServerClientParams(void);
	__fastcall virtual ~TwclBluetoothGattServerClientParams(void);
};


class PASCALIMPLEMENTATION TwclGattServerClient : public System::TObject 
{
	typedef System::TObject inherited;
	
public:
	TwclGattLocalCharacteristic* operator[](int Index) { return Characteristics[Index]; }
	
private:
	__int64 FAddress;
	Classes::TList* FCharacteristics;
	TwclGattServerConnection* FConnection;
	TwclGattLocalCharacteristic* __fastcall GetCharacteristics(const int Index);
	int __fastcall GetCount(void);
	bool __fastcall GetSubscribed(void);
	void __fastcall AddCharacteristic(const TwclGattLocalCharacteristic* Characteristic);
	void __fastcall RemoveCharacteristic(const TwclGattLocalCharacteristic* Characteristic);
	
protected:
	virtual void __fastcall AfterConnect(const TwclBluetoothGattServerClientParams* Params);
	virtual void __fastcall AfterDisconnect(void);
	virtual void __fastcall AfterSubscribed(const TwclGattLocalCharacteristic* Characteristic);
	virtual void __fastcall AfterUnsubscribed(const TwclGattLocalCharacteristic* Characteristic);
	virtual int __fastcall HalDisconnect(void) = 0 ;
	virtual int __fastcall HalGetConnectionParams(/* out */ TwclBluetoothLeConnectionParameters &Params) = 0 ;
	virtual int __fastcall HalSetConnectionParams(const TwclBluetoothLeConnectionParametersType Params) = 0 /* overload */;
	virtual int __fastcall HalSetConnectionParams(const TwclBluetoothLeConnectionParametersValue &Params) = 0 /* overload */;
	virtual int __fastcall HalGetMaxNotificationSize(/* out */ Word &Size) = 0 ;
	virtual int __fastcall HalGetMaxPduSize(/* out */ Word &Size) = 0 ;
	virtual int __fastcall HalGetConnectionPhyInfo(/* out */ TwclBluetoothLeConnectionPhy &Info) = 0 ;
	
public:
	__fastcall virtual TwclGattServerClient(const __int64 Address, const TwclGattServerConnection* Connection);
	__fastcall virtual ~TwclGattServerClient(void);
	int __fastcall Disconnect(void);
	int __fastcall GetConnectionParams(/* out */ TwclBluetoothLeConnectionParameters &Params);
	int __fastcall SetConnectionParams(const TwclBluetoothLeConnectionParametersType Params)/* overload */;
	int __fastcall SetConnectionParams(const TwclBluetoothLeConnectionParametersValue &Params)/* overload */;
	int __fastcall GetMaxNotificationSize(/* out */ Word &Size);
	int __fastcall GetMaxPduSize(/* out */ Word &Size);
	int __fastcall GetConnectionPhyInfo(/* out */ TwclBluetoothLeConnectionPhy &Info);
	__property __int64 Address = {read=FAddress};
	__property TwclGattLocalCharacteristic* Characteristics[int Index] = {read=GetCharacteristics/*, default*/};
	__property TwclGattServerConnection* Connection = {read=FConnection};
	__property int Count = {read=GetCount, nodefault};
	__property bool Subscribed = {read=GetSubscribed, nodefault};
};


class DELPHICLASS TwclBluetoothLeBeaconWatcherConnection;
class PASCALIMPLEMENTATION TwclBluetoothLeBeaconWatcherConnection : public Wclconnections::TwclCustomConnection 
{
	typedef Wclconnections::TwclCustomConnection inherited;
	
private:
	bool FAllowExtendedAdvertisements;
	bool FMonitoring;
	TwclBluetoothRadio* FRadio;
	Word FScanInterval;
	TwclBluetoothLeScanningMode FScanningMode;
	Word FScanWindow;
	TwclBluetoothLeAdvertisementAppearanceFrameEvent FOnAdvertisementAppearanceFrame;
	TwclBluetoothLeAdvertisementFrameInformationEvent FOnAdvertisementFrameInformation;
	TwclBluetoothLeAdvertisementExtFrameInformationEvent FOnAdvertisementExtFrameInformation;
	TwclBluetoothLeAdvertisementRawFrameEvent FOnAdvertisementRawFrame;
	TwclBluetoothLeAdvertisementReceivedEvent FOnAdvertisementReceived;
	TwclBluetoothLeAdvertisementService16DataFrameEvent FOnAdvertisementService16DataFrame;
	TwclBluetoothLeAdvertisementService32DataFrameEvent FOnAdvertisementService32DataFrame;
	TwclBluetoothLeAdvertisementService128DataFrameEvent FOnAdvertisementService128DataFrame;
	TwclBluetoothLeAdvertisementServiceSol16FrameEvent FOnAdvertisementServiceSol16Frame;
	TwclBluetoothLeAdvertisementServiceSol32FrameEvent FOnAdvertisementServiceSol32Frame;
	TwclBluetoothLeAdvertisementServiceSol128FrameEvent FOnAdvertisementServiceSol128Frame;
	TwclBluetoothLeAdvertisementTxPowerLevelFrameEvent FOnAdvertisementTxPowerLevelFrame;
	TwclBluetoothLeAdvertisementUuidFrameEvent FOnAdvertisementUuidFrame;
	TwclBluetoothLeAltBeaconFrameEvent FOnAltBeaconFrame;
	TwclBluetoothLeAppleAirdropFrameEvent FOnAppleAirdropFrame;
	TwclBluetoothLeAppleAirplaySourceFrameEvent FOnAppleAirplaySourceFrame;
	TwclBluetoothLeAppleAirplayTargetFrameEvent FOnAppleAirplayTargetFrame;
	TwclBluetoothLeAppleAirprintFrameEvent FOnAppleAirprintFrame;
	TwclBluetoothLeAppleFindMyFrameEvent FOnAppleFindMyFrame;
	TwclBluetoothLeAppleHandoffFrameEvent FOnAppleHandoffFrame;
	TwclBluetoothLeAppleHeySiriFrameEvent FOnAppleHeySiriFrame;
	TwclBluetoothLeAppleHomeKitFrameEvent FOnAppleHomeKitFrame;
	TwclBluetoothLeAppleiBeaconFrameEvent FOnAppleiBeaconFrame;
	TwclBluetoothLeAppleMagicSwitchFrameEvent FOnAppleMagicSwitchFrame;
	TwclBluetoothLeAppleNearbyActionFrameEvent FOnAppleNearbyActionFrame;
	TwclBluetoothLeAppleNearbyInfoFrameEvent FOnAppleNearbyInfoFrame;
	TwclBluetoothLeAppleProximityPairingFrameEvent FOnAppleProximityPairingFrame;
	TwclBluetoothLeAppleTetheringSourceFrameEvent FOnAppleTetheringSourceFrame;
	TwclBluetoothLeAppleTetheringTargetFrameEvent FOnAppleTetheringTargetFrame;
	TwclBluetoothLeAppleUnknownFrameEvent FOnAppleUnknownFrame;
	TwclBluetoothLeDriAsdMessageEvent FOnDriAsdMessage;
	TwclBluetoothLeEddystoneTlmFrameEvent FOnEddystoneTlmFrame;
	TwclBluetoothLeEddystoneUidFrameEvent FOnEddystoneUidFrame;
	TwclBluetoothLeEddystoneUrlFrameEvent FOnEddystoneUrlFrame;
	TwclBluetoothLeManufacturerRawFrameEvent FOnManufacturerRawFrame;
	TwclBluetoothLeMicrosoftCdpBeaconFrameEvent FOnMicrosoftCdpBeaconFrame;
	Classes::TNotifyEvent FOnStarted;
	Classes::TNotifyEvent FOnStopped;
	void __fastcall ResetScanParams(void);
	void __fastcall ParseAppleAirdrop(const TwclBluetoothLeAdvertisementInfo &Info, const int Ndx, const TwclBluetoothLeAdvertisementFrameRawData Data);
	void __fastcall ParseAppleAirplaySource(const TwclBluetoothLeAdvertisementInfo &Info, const int Ndx, const TwclBluetoothLeAdvertisementFrameRawData Data);
	void __fastcall ParseAppleAirplayTarget(const TwclBluetoothLeAdvertisementInfo &Info, const int Ndx, const TwclBluetoothLeAdvertisementFrameRawData Data);
	void __fastcall ParseAppleAirprint(const TwclBluetoothLeAdvertisementInfo &Info, const int Ndx, const TwclBluetoothLeAdvertisementFrameRawData Data);
	void __fastcall ParseAppleFindMy(const TwclBluetoothLeAdvertisementInfo &Info, const int Ndx, const TwclBluetoothLeAdvertisementFrameRawData Data);
	void __fastcall ParseAppleHandoff(const TwclBluetoothLeAdvertisementInfo &Info, const int Ndx, const TwclBluetoothLeAdvertisementFrameRawData Data);
	void __fastcall ParseAppleHeySiri(const TwclBluetoothLeAdvertisementInfo &Info, const int Ndx, const TwclBluetoothLeAdvertisementFrameRawData Data);
	void __fastcall ParseAppleHomeKit(const TwclBluetoothLeAdvertisementInfo &Info, const int Ndx, const TwclBluetoothLeAdvertisementFrameRawData Data);
	void __fastcall ParseAppleiBeacon(const TwclBluetoothLeAdvertisementInfo &Info, const int Ndx, const TwclBluetoothLeAdvertisementFrameRawData Data);
	void __fastcall ParseAppleMagicSwitch(const TwclBluetoothLeAdvertisementInfo &Info, const int Ndx, const TwclBluetoothLeAdvertisementFrameRawData Data);
	void __fastcall ParseAppleNearbyAction(const TwclBluetoothLeAdvertisementInfo &Info, const int Ndx, const TwclBluetoothLeAdvertisementFrameRawData Data);
	void __fastcall ParseAppleNearbyInfo(const TwclBluetoothLeAdvertisementInfo &Info, const int Ndx, const TwclBluetoothLeAdvertisementFrameRawData Data);
	void __fastcall ParseAppleProximityPairing(const TwclBluetoothLeAdvertisementInfo &Info, const int Ndx, const TwclBluetoothLeAdvertisementFrameRawData Data);
	void __fastcall ParseAppleTetheringSource(const TwclBluetoothLeAdvertisementInfo &Info, const int Ndx, const TwclBluetoothLeAdvertisementFrameRawData Data);
	void __fastcall ParseAppleTetheringTarget(const TwclBluetoothLeAdvertisementInfo &Info, const int Ndx, const TwclBluetoothLeAdvertisementFrameRawData Data);
	void __fastcall ParseAppleUnknownFrame(const TwclBluetoothLeAdvertisementInfo &Info, const int Ndx, const TwclBluetoothLeAdvertisementFrameRawData Data);
	void __fastcall ParseAppleAdvertisement(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const TwclBluetoothLeAdvertisementFrameRawData Data);
	void __fastcall ParseMsCdpBeacon(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const TwclBluetoothLeAdvertisementFrameRawData Data);
	void __fastcall ParseAltBeacon(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const Word CompanyId, const TwclBluetoothLeAdvertisementFrameRawData Data);
	void __fastcall ParseManufacturerRawFrame(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const Word CompanyId, const TwclBluetoothLeAdvertisementFrameRawData Data);
	void __fastcall ParseDriAsdMessage(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const Word Uuid, const TwclBluetoothLeAdvertisementFrameRawData Data);
	void __fastcall ParseEddystoneBeacons(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const Word Uuid, const TwclBluetoothLeAdvertisementFrameRawData Data);
	
protected:
	virtual void __fastcall MessageReceived(const Wclmessaging::TwclMessage* Message);
	virtual void __fastcall DoAdvertisementAppearanceFrame(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const Word Appearance);
	virtual void __fastcall DoAdvertisementFrameInformation(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const AnsiString Name, const TwclBluetoothLeAdvertisementType PacketType, const TwclBluetoothLeAdvertisementFlags Flags);
	virtual void __fastcall DoAdvertisementExtFrameInformation(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const TwclBluetoothAddressType AddressType, const SByte TxPower, const TwclBluetoothLeExtendedFrameFlags Flags);
	virtual void __fastcall DoAdvertisementRawFrame(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const Byte DataType, const TwclBluetoothLeAdvertisementFrameRawData Data);
	virtual void __fastcall DoAdvertisementReceived(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const TwclBluetoothLeAdvertisementFrameRawData Data);
	virtual void __fastcall DoAdvertisementService16DataFrame(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const Word Uuid, const TwclBluetoothLeAdvertisementFrameRawData Data);
	virtual void __fastcall DoAdvertisementService32DataFrame(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const unsigned Uuid, const TwclBluetoothLeAdvertisementFrameRawData Data);
	virtual void __fastcall DoAdvertisementService128DataFrame(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const GUID &Uuid, const TwclBluetoothLeAdvertisementFrameRawData Data);
	virtual void __fastcall DoAdvertisementServiceSol16Frame(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const Word Uuid);
	virtual void __fastcall DoAdvertisementServiceSol32Frame(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const unsigned Uuid);
	virtual void __fastcall DoAdvertisementServiceSol128Frame(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const GUID &Uuid);
	virtual void __fastcall DoAdvertisementTxPowerLevelFrame(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const SByte TxPower);
	virtual void __fastcall DoAdvertisementUuidFrame(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const GUID &Uuid);
	virtual void __fastcall DoAltBeaconFrame(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const Word CompanyId, const Word Major, const Word Minor, const GUID &Uuid, const SByte TxRssi, const Byte Reserved, const TwclBluetoothLeAdvertisementFrameRawData Data);
	virtual void __fastcall DoAppleAirdropFrame(const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleAirdropFrameData &Data);
	virtual void __fastcall DoAppleAirplaySourceFrame(const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleAirplaySourceFrameData Data);
	virtual void __fastcall DoAppleAirplayTargetFrame(const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleAirplayTargetFrameData &Data);
	virtual void __fastcall DoAppleAirprintFrame(const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleAirprintFrameData &Data);
	virtual void __fastcall DoAppleFindMyFrame(const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleFindMyFrameData &Data);
	virtual void __fastcall DoAppleHandoffFrame(const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleHandoffFrameData &Data);
	virtual void __fastcall DoAppleHeySiriFrame(const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleHeySiriFrameData &Data);
	virtual void __fastcall DoAppleHomeKitFrame(const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleHomeKitFrameData &Data);
	virtual void __fastcall DoAppleiBeaconFrame(const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleiBeaconFrameData &Data);
	virtual void __fastcall DoAppleMagicSwitchFrame(const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleMagicSwitchFrameData Data);
	virtual void __fastcall DoAppleNearbyActionFrame(const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleNearbyActionFrameData &Data);
	virtual void __fastcall DoAppleNearbyInfoFrame(const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleNearbyInfoFrameData &Data);
	virtual void __fastcall DoAppleProximityPairingFrame(const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleProximityPairingFrameData &Data);
	virtual void __fastcall DoAppleTetheringSourceFrame(const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleTetheringSourceFrameData &Data);
	virtual void __fastcall DoAppleTetheringTargetFrame(const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleTetheringTargetFrameData Data);
	virtual void __fastcall DoAppleUnknownFrame(const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleUnknownFrameData &Data);
	virtual void __fastcall DoDriAsdMessage(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const Wcldricommon::TwclDriRawData Raw);
	virtual void __fastcall DoEddystoneTlmFrame(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const unsigned AdvCnt, const Word Batt, const unsigned SecCnt, const double Temp, const TwclBluetoothLeAdvertisementFrameRawData Data);
	virtual void __fastcall DoEddystoneUidFrame(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const SByte TxRssi, const GUID &Uuid, const TwclBluetoothLeAdvertisementFrameRawData Data);
	virtual void __fastcall DoEddystoneUrlFrame(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const SByte TxRssi, const AnsiString Url);
	virtual void __fastcall DoManufacturerRawFrame(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const Word CompanyId, const TwclBluetoothLeAdvertisementFrameRawData Data);
	virtual void __fastcall DoMicrosoftCdpBeaconFrame(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const TwclBluetoothLeCdpBeaconScenarioType ScenarioType, const Byte Version, const TwclBluetoothLeCdpBeaconDeviceType DeviceType, const Byte SubVersion, const bool ShareNearBy, const bool AddressAsDeviceId, const TwclBluetoothLeCdpBeaconExtendedDeviceStatuses ExtendedDeviceStatus, const TwclBluetoothLeCdpBeaconSalt Salt, const TwclBluetoothLeCdpBeaconHash Hash);
	virtual void __fastcall DoStarted(void);
	virtual void __fastcall DoStopped(void);
	virtual int __fastcall HalStart(void) = 0 ;
	virtual int __fastcall HalStop(void) = 0 ;
	
public:
	__fastcall virtual TwclBluetoothLeBeaconWatcherConnection(const TwclBluetoothRadio* Radio);
	__fastcall virtual ~TwclBluetoothLeBeaconWatcherConnection(void);
	int __fastcall Start(const bool AllowExtendedAdvertisements, const Word ScanInterval, const TwclBluetoothLeScanningMode ScanningMode, const Word ScanWindow);
	int __fastcall Stop(void);
	__property bool AllowExtendedAdvertisements = {read=FAllowExtendedAdvertisements, nodefault};
	__property bool Monitoring = {read=FMonitoring, nodefault};
	__property TwclBluetoothRadio* Radio = {read=FRadio};
	__property Word ScanInterval = {read=FScanInterval, nodefault};
	__property TwclBluetoothLeScanningMode ScanningMode = {read=FScanningMode, nodefault};
	__property Word ScanWindow = {read=FScanWindow, nodefault};
	__property TwclBluetoothLeAdvertisementAppearanceFrameEvent OnAdvertisementAppearanceFrame = {read=FOnAdvertisementAppearanceFrame, write=FOnAdvertisementAppearanceFrame};
	__property TwclBluetoothLeAdvertisementFrameInformationEvent OnAdvertisementFrameInformation = {read=FOnAdvertisementFrameInformation, write=FOnAdvertisementFrameInformation};
	__property TwclBluetoothLeAdvertisementExtFrameInformationEvent OnAdvertisementExtFrameInformation = {read=FOnAdvertisementExtFrameInformation, write=FOnAdvertisementExtFrameInformation};
	__property TwclBluetoothLeAdvertisementRawFrameEvent OnAdvertisementRawFrame = {read=FOnAdvertisementRawFrame, write=FOnAdvertisementRawFrame};
	__property TwclBluetoothLeAdvertisementReceivedEvent OnAdvertisementReceived = {read=FOnAdvertisementReceived, write=FOnAdvertisementReceived};
	__property TwclBluetoothLeAdvertisementService16DataFrameEvent OnAdvertisementService16DataFrame = {read=FOnAdvertisementService16DataFrame, write=FOnAdvertisementService16DataFrame};
	__property TwclBluetoothLeAdvertisementService32DataFrameEvent OnAdvertisementService32DataFrame = {read=FOnAdvertisementService32DataFrame, write=FOnAdvertisementService32DataFrame};
	__property TwclBluetoothLeAdvertisementService128DataFrameEvent OnAdvertisementService128DataFrame = {read=FOnAdvertisementService128DataFrame, write=FOnAdvertisementService128DataFrame};
	__property TwclBluetoothLeAdvertisementServiceSol16FrameEvent OnAdvertisementServiceSol16Frame = {read=FOnAdvertisementServiceSol16Frame, write=FOnAdvertisementServiceSol16Frame};
	__property TwclBluetoothLeAdvertisementServiceSol32FrameEvent OnAdvertisementServiceSol32Frame = {read=FOnAdvertisementServiceSol32Frame, write=FOnAdvertisementServiceSol32Frame};
	__property TwclBluetoothLeAdvertisementServiceSol128FrameEvent OnAdvertisementServiceSol128Frame = {read=FOnAdvertisementServiceSol128Frame, write=FOnAdvertisementServiceSol128Frame};
	__property TwclBluetoothLeAdvertisementTxPowerLevelFrameEvent OnAdvertisementTxPowerLevelFrame = {read=FOnAdvertisementTxPowerLevelFrame, write=FOnAdvertisementTxPowerLevelFrame};
	__property TwclBluetoothLeAdvertisementUuidFrameEvent OnAdvertisementUuidFrame = {read=FOnAdvertisementUuidFrame, write=FOnAdvertisementUuidFrame};
	__property TwclBluetoothLeAltBeaconFrameEvent OnAltBeaconFrame = {read=FOnAltBeaconFrame, write=FOnAltBeaconFrame};
	__property TwclBluetoothLeAppleAirdropFrameEvent OnAppleAirdropFrame = {read=FOnAppleAirdropFrame, write=FOnAppleAirdropFrame};
	__property TwclBluetoothLeAppleAirplaySourceFrameEvent OnAppleAirplaySourceFrame = {read=FOnAppleAirplaySourceFrame, write=FOnAppleAirplaySourceFrame};
	__property TwclBluetoothLeAppleAirplayTargetFrameEvent OnAppleAirplayTargetFrame = {read=FOnAppleAirplayTargetFrame, write=FOnAppleAirplayTargetFrame};
	__property TwclBluetoothLeAppleAirprintFrameEvent OnAppleAirprintFrame = {read=FOnAppleAirprintFrame, write=FOnAppleAirprintFrame};
	__property TwclBluetoothLeAppleFindMyFrameEvent OnAppleFindMyFrame = {read=FOnAppleFindMyFrame, write=FOnAppleFindMyFrame};
	__property TwclBluetoothLeAppleHandoffFrameEvent OnAppleHandoffFrame = {read=FOnAppleHandoffFrame, write=FOnAppleHandoffFrame};
	__property TwclBluetoothLeAppleHeySiriFrameEvent OnAppleHeySiriFrame = {read=FOnAppleHeySiriFrame, write=FOnAppleHeySiriFrame};
	__property TwclBluetoothLeAppleHomeKitFrameEvent OnAppleHomeKitFrame = {read=FOnAppleHomeKitFrame, write=FOnAppleHomeKitFrame};
	__property TwclBluetoothLeAppleiBeaconFrameEvent OnAppleiBeaconFrame = {read=FOnAppleiBeaconFrame, write=FOnAppleiBeaconFrame};
	__property TwclBluetoothLeAppleMagicSwitchFrameEvent OnAppleMagicSwitchFrame = {read=FOnAppleMagicSwitchFrame, write=FOnAppleMagicSwitchFrame};
	__property TwclBluetoothLeAppleNearbyActionFrameEvent OnAppleNearbyActionFrame = {read=FOnAppleNearbyActionFrame, write=FOnAppleNearbyActionFrame};
	__property TwclBluetoothLeAppleNearbyInfoFrameEvent OnAppleNearbyInfoFrame = {read=FOnAppleNearbyInfoFrame, write=FOnAppleNearbyInfoFrame};
	__property TwclBluetoothLeAppleProximityPairingFrameEvent OnAppleProximityPairingFrame = {read=FOnAppleProximityPairingFrame, write=FOnAppleProximityPairingFrame};
	__property TwclBluetoothLeAppleTetheringSourceFrameEvent OnAppleTetheringSourceFrame = {read=FOnAppleTetheringSourceFrame, write=FOnAppleTetheringSourceFrame};
	__property TwclBluetoothLeAppleTetheringTargetFrameEvent OnAppleTetheringTargetFrame = {read=FOnAppleTetheringTargetFrame, write=FOnAppleTetheringTargetFrame};
	__property TwclBluetoothLeAppleUnknownFrameEvent OnAppleUnknownFrame = {read=FOnAppleUnknownFrame, write=FOnAppleUnknownFrame};
	__property TwclBluetoothLeDriAsdMessageEvent OnDriAsdMessage = {read=FOnDriAsdMessage, write=FOnDriAsdMessage};
	__property TwclBluetoothLeEddystoneTlmFrameEvent OnEddystoneTlmFrame = {read=FOnEddystoneTlmFrame, write=FOnEddystoneTlmFrame};
	__property TwclBluetoothLeEddystoneUidFrameEvent OnEddystoneUidFrame = {read=FOnEddystoneUidFrame, write=FOnEddystoneUidFrame};
	__property TwclBluetoothLeEddystoneUrlFrameEvent OnEddystoneUrlFrame = {read=FOnEddystoneUrlFrame, write=FOnEddystoneUrlFrame};
	__property TwclBluetoothLeManufacturerRawFrameEvent OnManufacturerRawFrame = {read=FOnManufacturerRawFrame, write=FOnManufacturerRawFrame};
	__property TwclBluetoothLeMicrosoftCdpBeaconFrameEvent OnMicrosoftCdpBeaconFrame = {read=FOnMicrosoftCdpBeaconFrame, write=FOnMicrosoftCdpBeaconFrame};
	__property Classes::TNotifyEvent OnStarted = {read=FOnStarted, write=FOnStarted};
	__property Classes::TNotifyEvent OnStopped = {read=FOnStopped, write=FOnStopped};
};


class DELPHICLASS TwclBluetoothLeAdvertisement;
class PASCALIMPLEMENTATION TwclBluetoothLeAdvertisement : public System::TObject 
{
	typedef System::TObject inherited;
	
private:
	Wclsync::TwclCriticalSection* FCS;
	
protected:
	__property Wclsync::TwclCriticalSection* CS = {read=FCS};
	
public:
	__fastcall TwclBluetoothLeAdvertisement(void);
	__fastcall virtual ~TwclBluetoothLeAdvertisement(void);
	virtual void __fastcall GetFrames(/* out */ TwclBluetoothLeAdvertisementFrames &Frames) = 0 ;
};


class DELPHICLASS TwclBluetoothLeTxRssiAdvertisement;
class PASCALIMPLEMENTATION TwclBluetoothLeTxRssiAdvertisement : public TwclBluetoothLeAdvertisement 
{
	typedef TwclBluetoothLeAdvertisement inherited;
	
private:
	SByte FTxRssi;
	
public:
	__fastcall TwclBluetoothLeTxRssiAdvertisement(const SByte TxRssi);
	__property SByte TxRssi = {read=FTxRssi, nodefault};
public:
	#pragma option push -w-inl
	/* TwclBluetoothLeAdvertisement.Destroy */ inline __fastcall virtual ~TwclBluetoothLeTxRssiAdvertisement(void) { }
	#pragma option pop
	
};


class DELPHICLASS TwclBluetoothLeIdAdvertisement;
class PASCALIMPLEMENTATION TwclBluetoothLeIdAdvertisement : public TwclBluetoothLeTxRssiAdvertisement 
{
	typedef TwclBluetoothLeTxRssiAdvertisement inherited;
	
private:
	Word FMajor;
	Word FMinor;
	#pragma pack(push, 1)
	GUID FUuid;
	#pragma pack(pop)
	
	
public:
	__fastcall TwclBluetoothLeIdAdvertisement(const SByte TxRssi, const Word Major, const Word Minor, const GUID &Uuid);
	__property Word Major = {read=FMajor, nodefault};
	__property Word Minor = {read=FMinor, nodefault};
	__property GUID Uuid = {read=FUuid};
public:
	#pragma option push -w-inl
	/* TwclBluetoothLeAdvertisement.Destroy */ inline __fastcall virtual ~TwclBluetoothLeIdAdvertisement(void) { }
	#pragma option pop
	
};


class DELPHICLASS TwclBluetoothLeiBeaconAdvertisement;
class PASCALIMPLEMENTATION TwclBluetoothLeiBeaconAdvertisement : public TwclBluetoothLeIdAdvertisement 
{
	typedef TwclBluetoothLeIdAdvertisement inherited;
	
public:
	__fastcall TwclBluetoothLeiBeaconAdvertisement(const SByte TxRssi, const Word Major, const Word Minor, const GUID &Uuid);
	virtual void __fastcall GetFrames(/* out */ TwclBluetoothLeAdvertisementFrames &Frames);
public:
	#pragma option push -w-inl
	/* TwclBluetoothLeAdvertisement.Destroy */ inline __fastcall virtual ~TwclBluetoothLeiBeaconAdvertisement(void) { }
	#pragma option pop
	
};


class DELPHICLASS TwclBluetoothLeCompanyIdAdvertisement;
class PASCALIMPLEMENTATION TwclBluetoothLeCompanyIdAdvertisement : public TwclBluetoothLeIdAdvertisement 
{
	typedef TwclBluetoothLeIdAdvertisement inherited;
	
private:
	Word FCompanyId;
	
public:
	__fastcall TwclBluetoothLeCompanyIdAdvertisement(const SByte TxRssi, const Word Major, const Word Minor, const GUID &Uuid, const Word CompanyId);
	__property Word CompanyId = {read=FCompanyId, nodefault};
public:
	#pragma option push -w-inl
	/* TwclBluetoothLeAdvertisement.Destroy */ inline __fastcall virtual ~TwclBluetoothLeCompanyIdAdvertisement(void) { }
	#pragma option pop
	
};


class DELPHICLASS TwclBluetoothLeProximityBeaconAdvertisement;
class PASCALIMPLEMENTATION TwclBluetoothLeProximityBeaconAdvertisement : public TwclBluetoothLeCompanyIdAdvertisement 
{
	typedef TwclBluetoothLeCompanyIdAdvertisement inherited;
	
public:
	__fastcall TwclBluetoothLeProximityBeaconAdvertisement(const SByte TxRssi, const Word Major, const Word Minor, const GUID &Uuid, const Word CompanyId);
	virtual void __fastcall GetFrames(/* out */ TwclBluetoothLeAdvertisementFrames &Frames);
public:
	#pragma option push -w-inl
	/* TwclBluetoothLeAdvertisement.Destroy */ inline __fastcall virtual ~TwclBluetoothLeProximityBeaconAdvertisement(void) { }
	#pragma option pop
	
};


class DELPHICLASS TwclBluetoothLeAltBeaconAdvertisement;
class PASCALIMPLEMENTATION TwclBluetoothLeAltBeaconAdvertisement : public TwclBluetoothLeCompanyIdAdvertisement 
{
	typedef TwclBluetoothLeCompanyIdAdvertisement inherited;
	
private:
	Byte FReserved;
	
public:
	__fastcall TwclBluetoothLeAltBeaconAdvertisement(const SByte TxRssi, const Word Major, const Word Minor, const GUID &Uuid, const Word CompanyId, const Byte Reserved);
	virtual void __fastcall GetFrames(/* out */ TwclBluetoothLeAdvertisementFrames &Frames);
	__property Byte Reserved = {read=FReserved, nodefault};
public:
	#pragma option push -w-inl
	/* TwclBluetoothLeAdvertisement.Destroy */ inline __fastcall virtual ~TwclBluetoothLeAltBeaconAdvertisement(void) { }
	#pragma option pop
	
};


class DELPHICLASS TwclBluetoothLeEddystoneUidBeaconAdvertisement;
class PASCALIMPLEMENTATION TwclBluetoothLeEddystoneUidBeaconAdvertisement : public TwclBluetoothLeTxRssiAdvertisement 
{
	typedef TwclBluetoothLeTxRssiAdvertisement inherited;
	
private:
	#pragma pack(push, 1)
	GUID FUuid;
	#pragma pack(pop)
	
	
public:
	__fastcall TwclBluetoothLeEddystoneUidBeaconAdvertisement(const SByte TxRssi, const GUID &Uuid);
	virtual void __fastcall GetFrames(/* out */ TwclBluetoothLeAdvertisementFrames &Frames);
	__property GUID Uuid = {read=FUuid};
public:
	#pragma option push -w-inl
	/* TwclBluetoothLeAdvertisement.Destroy */ inline __fastcall virtual ~TwclBluetoothLeEddystoneUidBeaconAdvertisement(void) { }
	#pragma option pop
	
};


class DELPHICLASS TwclBluetoothLeEddystoneUrlBeaconAdvertisement;
class PASCALIMPLEMENTATION TwclBluetoothLeEddystoneUrlBeaconAdvertisement : public TwclBluetoothLeTxRssiAdvertisement 
{
	typedef TwclBluetoothLeTxRssiAdvertisement inherited;
	
private:
	AnsiString FUrl;
	DynamicArray<Byte >  FUrlEncoded;
	Byte FUrlScheme;
	int __fastcall ParseUrl(const AnsiString Value);
	
public:
	__fastcall TwclBluetoothLeEddystoneUrlBeaconAdvertisement(const SByte TxRssi, const AnsiString Url);
	virtual void __fastcall GetFrames(/* out */ TwclBluetoothLeAdvertisementFrames &Frames);
	__property AnsiString Url = {read=FUrl};
public:
	#pragma option push -w-inl
	/* TwclBluetoothLeAdvertisement.Destroy */ inline __fastcall virtual ~TwclBluetoothLeEddystoneUrlBeaconAdvertisement(void) { }
	#pragma option pop
	
};


class DELPHICLASS TwclBluetoothLe16ServiceAdvertisement;
class PASCALIMPLEMENTATION TwclBluetoothLe16ServiceAdvertisement : public TwclBluetoothLeAdvertisement 
{
	typedef TwclBluetoothLeAdvertisement inherited;
	
private:
	Word FUuid;
	
public:
	__fastcall TwclBluetoothLe16ServiceAdvertisement(const Word Uuid);
	virtual void __fastcall GetFrames(/* out */ TwclBluetoothLeAdvertisementFrames &Frames);
	__property Word Uuid = {read=FUuid, nodefault};
public:
	#pragma option push -w-inl
	/* TwclBluetoothLeAdvertisement.Destroy */ inline __fastcall virtual ~TwclBluetoothLe16ServiceAdvertisement(void) { }
	#pragma option pop
	
};


class DELPHICLASS TwclBluetoothLe32ServiceAdvertisement;
class PASCALIMPLEMENTATION TwclBluetoothLe32ServiceAdvertisement : public TwclBluetoothLeAdvertisement 
{
	typedef TwclBluetoothLeAdvertisement inherited;
	
private:
	unsigned FUuid;
	
public:
	__fastcall TwclBluetoothLe32ServiceAdvertisement(const unsigned Uuid);
	virtual void __fastcall GetFrames(/* out */ TwclBluetoothLeAdvertisementFrames &Frames);
	__property unsigned Uuid = {read=FUuid, nodefault};
public:
	#pragma option push -w-inl
	/* TwclBluetoothLeAdvertisement.Destroy */ inline __fastcall virtual ~TwclBluetoothLe32ServiceAdvertisement(void) { }
	#pragma option pop
	
};


class DELPHICLASS TwclBluetoothLe128ServiceAdvertisement;
class PASCALIMPLEMENTATION TwclBluetoothLe128ServiceAdvertisement : public TwclBluetoothLeAdvertisement 
{
	typedef TwclBluetoothLeAdvertisement inherited;
	
private:
	#pragma pack(push, 1)
	GUID FUuid;
	#pragma pack(pop)
	
	
public:
	__fastcall TwclBluetoothLe128ServiceAdvertisement(const GUID &Uuid);
	virtual void __fastcall GetFrames(/* out */ TwclBluetoothLeAdvertisementFrames &Frames);
	__property GUID Uuid = {read=FUuid};
public:
	#pragma option push -w-inl
	/* TwclBluetoothLeAdvertisement.Destroy */ inline __fastcall virtual ~TwclBluetoothLe128ServiceAdvertisement(void) { }
	#pragma option pop
	
};


class DELPHICLASS TwclBluetoothLe16ServiceDataAdvertisement;
class PASCALIMPLEMENTATION TwclBluetoothLe16ServiceDataAdvertisement : public TwclBluetoothLe16ServiceAdvertisement 
{
	typedef TwclBluetoothLe16ServiceAdvertisement inherited;
	
private:
	DynamicArray<Byte >  FData;
	
public:
	__fastcall TwclBluetoothLe16ServiceDataAdvertisement(const Word Uuid, const TwclBluetoothLeAdvertisementFrameRawData Data);
	virtual void __fastcall GetFrames(/* out */ TwclBluetoothLeAdvertisementFrames &Frames);
	__property TwclBluetoothLeAdvertisementFrameRawData Data = {read=FData};
public:
	#pragma option push -w-inl
	/* TwclBluetoothLeAdvertisement.Destroy */ inline __fastcall virtual ~TwclBluetoothLe16ServiceDataAdvertisement(void) { }
	#pragma option pop
	
};


class DELPHICLASS TwclBluetoothLe32ServiceDataAdvertisement;
class PASCALIMPLEMENTATION TwclBluetoothLe32ServiceDataAdvertisement : public TwclBluetoothLe32ServiceAdvertisement 
{
	typedef TwclBluetoothLe32ServiceAdvertisement inherited;
	
private:
	DynamicArray<Byte >  FData;
	
public:
	__fastcall TwclBluetoothLe32ServiceDataAdvertisement(const unsigned Uuid, const TwclBluetoothLeAdvertisementFrameRawData Data);
	virtual void __fastcall GetFrames(/* out */ TwclBluetoothLeAdvertisementFrames &Frames);
	__property TwclBluetoothLeAdvertisementFrameRawData Data = {read=FData};
public:
	#pragma option push -w-inl
	/* TwclBluetoothLeAdvertisement.Destroy */ inline __fastcall virtual ~TwclBluetoothLe32ServiceDataAdvertisement(void) { }
	#pragma option pop
	
};


class DELPHICLASS TwclBluetoothLe128ServiceDataAdvertisement;
class PASCALIMPLEMENTATION TwclBluetoothLe128ServiceDataAdvertisement : public TwclBluetoothLe128ServiceAdvertisement 
{
	typedef TwclBluetoothLe128ServiceAdvertisement inherited;
	
private:
	DynamicArray<Byte >  FData;
	
public:
	__fastcall TwclBluetoothLe128ServiceDataAdvertisement(const GUID &Uuid, const TwclBluetoothLeAdvertisementFrameRawData Data);
	virtual void __fastcall GetFrames(/* out */ TwclBluetoothLeAdvertisementFrames &Frames);
	__property TwclBluetoothLeAdvertisementFrameRawData Data = {read=FData};
public:
	#pragma option push -w-inl
	/* TwclBluetoothLeAdvertisement.Destroy */ inline __fastcall virtual ~TwclBluetoothLe128ServiceDataAdvertisement(void) { }
	#pragma option pop
	
};


class DELPHICLASS TwclBluetoothLeCustomAdvertisement;
class PASCALIMPLEMENTATION TwclBluetoothLeCustomAdvertisement : public TwclBluetoothLeAdvertisement 
{
	typedef TwclBluetoothLeAdvertisement inherited;
	
private:
	DynamicArray<Byte >  FData;
	Byte FDataType;
	
public:
	__fastcall TwclBluetoothLeCustomAdvertisement(const Byte DataType, const TwclBluetoothLeAdvertisementFrameRawData Data);
	virtual void __fastcall GetFrames(/* out */ TwclBluetoothLeAdvertisementFrames &Frames);
	__property TwclBluetoothLeAdvertisementFrameRawData Data = {read=FData};
	__property Byte DataType = {read=FDataType, nodefault};
public:
	#pragma option push -w-inl
	/* TwclBluetoothLeAdvertisement.Destroy */ inline __fastcall virtual ~TwclBluetoothLeCustomAdvertisement(void) { }
	#pragma option pop
	
};


class DELPHICLASS TwclBluetoothLeManufacturerAdvertisement;
class PASCALIMPLEMENTATION TwclBluetoothLeManufacturerAdvertisement : public TwclBluetoothLeAdvertisement 
{
	typedef TwclBluetoothLeAdvertisement inherited;
	
private:
	Word FCompanyId;
	DynamicArray<Byte >  FData;
	
public:
	__fastcall TwclBluetoothLeManufacturerAdvertisement(const Word CompanyId, const TwclBluetoothLeAdvertisementFrameRawData Data);
	virtual void __fastcall GetFrames(/* out */ TwclBluetoothLeAdvertisementFrames &Frames);
	__property Word CompanyId = {read=FCompanyId, nodefault};
	__property TwclBluetoothLeAdvertisementFrameRawData Data = {read=FData};
public:
	#pragma option push -w-inl
	/* TwclBluetoothLeAdvertisement.Destroy */ inline __fastcall virtual ~TwclBluetoothLeManufacturerAdvertisement(void) { }
	#pragma option pop
	
};


class DELPHICLASS TwclBluetoothLeRawAdvertisement;
class PASCALIMPLEMENTATION TwclBluetoothLeRawAdvertisement : public TwclBluetoothLeAdvertisement 
{
	typedef TwclBluetoothLeAdvertisement inherited;
	
private:
	DynamicArray<Byte >  FData;
	Byte __fastcall GetFramesCount(const TwclBluetoothLeAdvertisementFrameRawData Data);
	
public:
	__fastcall TwclBluetoothLeRawAdvertisement(const TwclBluetoothLeAdvertisementFrameRawData Data);
	virtual void __fastcall GetFrames(/* out */ TwclBluetoothLeAdvertisementFrames &Frames);
	__property TwclBluetoothLeAdvertisementFrameRawData Data = {read=FData};
public:
	#pragma option push -w-inl
	/* TwclBluetoothLeAdvertisement.Destroy */ inline __fastcall virtual ~TwclBluetoothLeRawAdvertisement(void) { }
	#pragma option pop
	
};


class DELPHICLASS TwclBluetoothLeAdvertiserConnection;
class PASCALIMPLEMENTATION TwclBluetoothLeAdvertiserConnection : public Wclconnections::TwclCustomConnection 
{
	typedef Wclconnections::TwclCustomConnection inherited;
	
private:
	Classes::TList* FAdvertisements;
	bool FAdvertising;
	Word FInterval;
	TwclBluetoothRadio* FRadio;
	bool FAnonymous;
	bool FIncludeTxRssi;
	SByte FPreferredTxRssi;
	bool FUseExtendedAdvertisement;
	Classes::TNotifyEvent FOnStarted;
	Classes::TNotifyEvent FOnStopped;
	int __fastcall CheckAdvertisements(const Classes::TList* Advertisements);
	
protected:
	virtual void __fastcall MessageReceived(const Wclmessaging::TwclMessage* Message);
	virtual void __fastcall DoStarted(void);
	virtual void __fastcall DoStopped(void);
	virtual int __fastcall HalStart(void) = 0 ;
	virtual int __fastcall HalStop(void) = 0 ;
	
public:
	__fastcall virtual TwclBluetoothLeAdvertiserConnection(const TwclBluetoothRadio* Radio);
	__fastcall virtual ~TwclBluetoothLeAdvertiserConnection(void);
	int __fastcall Start(const Classes::TList* Advertisements, const Word Interval, const bool UseExtendedAdvertisement, const bool Anonymous, const bool IncludeTxRssi, const SByte PreferredTxRssi);
	int __fastcall Stop(void);
	__property Classes::TList* Advertisements = {read=FAdvertisements};
	__property bool Advertising = {read=FAdvertising, nodefault};
	__property TwclBluetoothRadio* Radio = {read=FRadio};
	__property Word Interval = {read=FInterval, nodefault};
	__property bool Anonymous = {read=FAnonymous, nodefault};
	__property bool IncludeTxRssi = {read=FIncludeTxRssi, nodefault};
	__property SByte PreferredTxRssi = {read=FPreferredTxRssi, nodefault};
	__property bool UseExtendedAdvertisement = {read=FUseExtendedAdvertisement, nodefault};
	__property Classes::TNotifyEvent OnStarted = {read=FOnStarted, write=FOnStarted};
	__property Classes::TNotifyEvent OnStopped = {read=FOnStopped, write=FOnStopped};
};


class DELPHICLASS TwclWiiRemoteClientConnection;
class PASCALIMPLEMENTATION TwclWiiRemoteClientConnection : public Wclconnections::TwclClientConnection 
{
	typedef Wclconnections::TwclClientConnection inherited;
	
private:
	__int64 FAddress;
	bool FInitialized;
	TwclBluetoothRadio* FRadio;
	Wclsync::TwclEvent* FDisconnectEvent;
	Wclsync::TwclManualResetEvent* FReadMemoryEvent;
	Wclsync::TwclManualResetEvent* FWriteMemoryEvent;
	char *FReadBuffer;
	Word FReadOffset;
	Word FReadSize;
	TwclWiiRemoteAccelCalibration FAccelCalibration;
	TwclWiiRemoteBalanceBoardCalibration FBalanceBoardCalibration;
	#pragma pack(push, 1)
	TwclWiiRemoteClassicControllerCalibration FClassicControllerCalibration;
	#pragma pack(pop)
	
	TwclWiiRemoteNunchukCalibration FNunchukCalibration;
	bool FAccelEnabled;
	TwclWiiRemoteExtension FExtension;
	TwclWiiRemoteIrMode FIrMode;
	TwclWiiRemoteIrSensitivity FIrSensitivity;
	#pragma pack(push, 1)
	TwclWiiRemoteLeds FLeds;
	#pragma pack(pop)
	
	bool FRumble;
	TwclWiiRemoteAccelChangedEvent FOnAccelChanged;
	TwclWiiRemoteBalanceBoardChangedEvent FOnBalanceBoardChanged;
	TwclWiiRemoteButtonsChangedEvent FOnButtonsChanged;
	TwclWiiRemoteClassicControllerChangedEvent FOnClassicControllerChanged;
	TwclWiiRemoteDrumsChangedEvent FOnDrumsChanged;
	Classes::TNotifyEvent FOnExtensionAttached;
	Classes::TNotifyEvent FOnExtensionDetached;
	TwclWiiRemoteGuitarChangedEvent FOnGuitarChanged;
	TwclWiiRemoteIrChangedEvent FOnIrChanged;
	TwclWiiRemoteNunchukChangedEvent FOnNunchukChanged;
	TwclWiiRemoteStatusChangedEvent FOnStatusChanged;
	int __fastcall CheckInitialized(void);
	TwclWiiRemoteExtension __fastcall DecodeExtensionType(const char * Report);
	double __fastcall GetBalanceBoardSensorValue(const Word Sensor, const Word Min, const Word Mid, const Word Max);
	Byte __fastcall GetReportId(const bool Accel, const bool Ir, const bool Ext);
	Byte __fastcall GetRumbleBit(void);
	int __fastcall Wait(const Wclsync::TwclEvent* Event);
	int __fastcall ReadCalibration(void);
	int __fastcall ReadMemory(unsigned Address, Word Size, /* out */ char * &Data);
	int __fastcall WriteMemory(unsigned Address, Byte Size, System::PByte Data)/* overload */;
	int __fastcall WriteMemory(unsigned Address, Byte Data)/* overload */;
	int __fastcall WriteReport(const System::PByte Report, const Byte Size);
	int __fastcall DisableIr(void);
	int __fastcall EnableIr(void)/* overload */;
	int __fastcall EnableIr(const TwclWiiRemoteIrMode Mode, const TwclWiiRemoteIrSensitivity Sensitivity)/* overload */;
	int __fastcall SetIrLevel1(void);
	int __fastcall SetIrLevel2(void);
	int __fastcall SetIrLevel3(void);
	int __fastcall SetIrLevel4(void);
	int __fastcall SetIrLevel5(void);
	int __fastcall SetIrLevelMax(void);
	int __fastcall SetReportType(const Byte ReportType, const bool Continuous)/* overload */;
	int __fastcall SetReportType(Byte ReportType, const TwclWiiRemoteIrSensitivity Sensitivity, const bool Continuous)/* overload */;
	int __fastcall InitializeBalanceBoard(void);
	int __fastcall InitializeClassicController(void);
	int __fastcall InitializeMusicExtensions(void);
	int __fastcall InitializeNunchuk(void);
	int __fastcall InitializeExtension(void);
	void __fastcall ParseBalanceBoardExtension(const char * Report, const Byte Offset);
	void __fastcall ParseClassicControllerExtension(const char * Report, const Byte Offset);
	void __fastcall ParseDrumsExtension(const char * Report, const Byte Offset);
	void __fastcall ParseGuitarExtension(const char * Report, const Byte Offset);
	void __fastcall ParseNunchukExtension(const char * Report, const Byte Offset);
	void __fastcall ParseExtensions(const char * Report, const Byte Offset);
	void __fastcall ParseAccel(const char * Report);
	void __fastcall ParseButtons(const char * Report);
	void __fastcall ParseIr(const char * Report);
	void __fastcall ParseReadMemory(const char * Report);
	void __fastcall ParseStatus(const char * Report);
	void __fastcall ParseInputReport(const char * Report);
	void __fastcall ResetCalibrations(void);
	void __fastcall ResetExtensionCalibration(void);
	void __fastcall ResetStates(void);
	
protected:
	void __fastcall ProcessReport(const System::PByte Report);
	virtual void __fastcall MessageReceived(const Wclmessaging::TwclMessage* Message);
	virtual int __fastcall HalConnect(const Wclsync::TwclEvent* Event);
	virtual int __fastcall HalDisconnect(void);
	virtual int __fastcall HalWrite(const System::PByte Report, const Byte Size) = 0 ;
	virtual void __fastcall DoAccelChanged(const TwclWiiRemoteAccel &Accel);
	virtual void __fastcall DoBalanceBoardChanged(const TwclWiiRemoteBalanceBoard &Board);
	virtual void __fastcall DoButtonsChanged(const TwclWiiRemoteButtons &Buttons);
	virtual void __fastcall DoClassicControllerChanged(const TwclWiiRemoteClassicController &Controller);
	virtual void __fastcall DoConnect(const int Error);
	virtual void __fastcall DoDisconnect(const int Reason);
	virtual void __fastcall DoDrumsChanged(const TwclWiiRemoteDrums &Drums);
	virtual void __fastcall DoExtensionAttached(void);
	virtual void __fastcall DoExtensionDetached(void);
	virtual void __fastcall DoGuitarChanged(const TwclWiiRemoteGuitar &Guitar);
	virtual void __fastcall DoIrChanged(const TwclWiiRemoteIrSensors &Ir);
	virtual void __fastcall DoNunchukChanged(const TwclWiiRemoteNunchuk &Nunchuk);
	virtual void __fastcall DoStatusChanged(const double Batt, const TwclWiiRemoteLeds Leds);
	__property Wclsync::TwclEvent* DisconnectEvent = {read=FDisconnectEvent};
	
public:
	__fastcall virtual TwclWiiRemoteClientConnection(const TwclBluetoothRadio* Radio);
	HIDESBASE int __fastcall Connect(const __int64 Address, const unsigned Timeout);
	int __fastcall GetStatus(void);
	int __fastcall SetLeds(const TwclWiiRemoteLeds Leds)/* overload */;
	int __fastcall SetLeds(const bool Led1, const bool Led2, const bool Led3, const bool Led4)/* overload */;
	int __fastcall SetRumble(const bool TurnOn);
	int __fastcall EnableAccel(void);
	int __fastcall DisableAccel(void);
	int __fastcall SetIrSensitivity(const TwclWiiRemoteIrSensitivity Sensitivity);
	__property __int64 Address = {read=FAddress};
	__property bool AccelEnabled = {read=FAccelEnabled, nodefault};
	__property TwclWiiRemoteExtension Extension = {read=FExtension, nodefault};
	__property TwclWiiRemoteIrMode IrMode = {read=FIrMode, nodefault};
	__property TwclWiiRemoteIrSensitivity IrSensitivity = {read=FIrSensitivity, nodefault};
	__property TwclWiiRemoteLeds Leds = {read=FLeds};
	__property TwclBluetoothRadio* Radio = {read=FRadio};
	__property bool Rumble = {read=FRumble, nodefault};
	__property TwclWiiRemoteAccelChangedEvent OnAccelChanged = {read=FOnAccelChanged, write=FOnAccelChanged};
	__property TwclWiiRemoteBalanceBoardChangedEvent OnBalanceBoardChanged = {read=FOnBalanceBoardChanged, write=FOnBalanceBoardChanged};
	__property TwclWiiRemoteButtonsChangedEvent OnButtonsChanged = {read=FOnButtonsChanged, write=FOnButtonsChanged};
	__property TwclWiiRemoteClassicControllerChangedEvent OnClassicControllerChanged = {read=FOnClassicControllerChanged, write=FOnClassicControllerChanged};
	__property TwclWiiRemoteDrumsChangedEvent OnDrumsChanged = {read=FOnDrumsChanged, write=FOnDrumsChanged};
	__property Classes::TNotifyEvent OnExtensionAttached = {read=FOnExtensionAttached, write=FOnExtensionAttached};
	__property Classes::TNotifyEvent OnExtensionDetached = {read=FOnExtensionDetached, write=FOnExtensionDetached};
	__property TwclWiiRemoteGuitarChangedEvent OnGuitarChanged = {read=FOnGuitarChanged, write=FOnGuitarChanged};
	__property TwclWiiRemoteIrChangedEvent OnIrChanged = {read=FOnIrChanged, write=FOnIrChanged};
	__property TwclWiiRemoteNunchukChangedEvent OnNunchukChanged = {read=FOnNunchukChanged, write=FOnNunchukChanged};
	__property TwclWiiRemoteStatusChangedEvent OnStatusChanged = {read=FOnStatusChanged, write=FOnStatusChanged};
public:
	#pragma option push -w-inl
	/* TwclClientConnection.Destroy */ inline __fastcall virtual ~TwclWiiRemoteClientConnection(void) { }
	#pragma option pop
	
};


class DELPHICLASS TwclWiiRemoteHidClientConnection;
class PASCALIMPLEMENTATION TwclWiiRemoteHidClientConnection : public TwclWiiRemoteClientConnection 
{
	typedef TwclWiiRemoteClientConnection inherited;
	
private:
	unsigned FHandle;
	Wclsync::TwclManualResetEvent* FReadEvent;
	Wclsync::TwclManualResetEvent* FWriteEvent;
	bool FWasInstalled;
	int __fastcall EnumWiis(const Classes::TStringList* Wiis);
	int __fastcall GetPath(/* out */ AnsiString &Path);
	int __fastcall InstallDevice(const Wclsync::TwclEvent* Event, /* out */ AnsiString &Path);
	int __fastcall UninstallDevice(void);
	int __fastcall CheckTimeout(const Wclsync::TwclEvent* Event, const unsigned Ticks);
	void __fastcall TerminateIo(const _OVERLAPPED &Over);
	void __fastcall ClearHid(void);
	int __fastcall LoadHid(void);
	int __fastcall UnloadHid(void);
	
protected:
	virtual int __fastcall HalConnect(const Wclsync::TwclEvent* Event);
	virtual int __fastcall HalCommunicate(const Wclsync::TwclEvent* Event);
	virtual int __fastcall HalDisconnect(void);
	virtual int __fastcall HalWrite(const System::PByte Report, const Byte Size);
	
public:
	__fastcall virtual TwclWiiRemoteHidClientConnection(const TwclBluetoothRadio* Radio);
public:
	#pragma option push -w-inl
	/* TwclClientConnection.Destroy */ inline __fastcall virtual ~TwclWiiRemoteHidClientConnection(void) { }
	#pragma option pop
	
};


class DELPHICLASS TwclBluetoothComponent;
class PASCALIMPLEMENTATION TwclBluetoothComponent : public Classes::TComponent 
{
	typedef Classes::TComponent inherited;
	
private:
	Wclconnections::TwclCustomConnection* FCopy;
	Wclsync::TwclCriticalSection* FCS;
	void __fastcall DeleteCopy(void);
	
protected:
	void __fastcall SetCopy(const Wclconnections::TwclCustomConnection* NewConnection);
	__property Wclsync::TwclCriticalSection* CS = {read=FCS};
	
public:
	__fastcall virtual TwclBluetoothComponent(Classes::TComponent* AOwner);
	__fastcall virtual ~TwclBluetoothComponent(void);
};


class DELPHICLASS TwclRfCommClient;
class PASCALIMPLEMENTATION TwclRfCommClient : public TwclBluetoothComponent 
{
	typedef TwclBluetoothComponent inherited;
	
private:
	__int64 FAddress;
	bool FAuthentication;
	Byte FChannel;
	bool FEncryption;
	#pragma pack(push, 1)
	GUID FService;
	#pragma pack(pop)
	
	unsigned FTimeout;
	bool FActive;
	TwclRfCommClientConnection* FClient;
	Wclconnections::TwclClientConnectionConnectEvent FOnConnect;
	Wclconnections::TwclClientConnectionProcessorEvent FOnCreateProcessor;
	Wclconnections::TwclConnectionDataEvent FOnData;
	Wclconnections::TwclClientConnectionProcessorEvent FOnDestroyProcessor;
	Wclconnections::TwclClientConnectionDisconnectEvent FOnDisconnect;
	Wclconnections::TwclCustomClientDataProcessor* __fastcall GetProcessor(void);
	TwclBluetoothRadio* __fastcall GetRadio(void);
	Wclconnections::TwclClientState __fastcall GetState(void);
	void __fastcall SetAddress(const __int64 Value);
	void __fastcall SetAuthentication(const bool Value);
	void __fastcall SetChannel(const Byte Value);
	void __fastcall SetEncryption(const bool Value);
	void __fastcall SetService(const GUID &Value);
	void __fastcall SetTimeout(const unsigned Value);
	void __fastcall ClientConnect(System::TObject* Sender, const int Error);
	void __fastcall ClientData(System::TObject* Sender, const void * Data, const unsigned Size);
	void __fastcall ClientDisconnect(System::TObject* Sender, const int Reason);
	
protected:
	virtual void __fastcall DoConnect(const int Error);
	virtual void __fastcall DoCreateProcessor(const Wclconnections::TwclClientDataConnection* Connection);
	virtual void __fastcall DoData(const void * Data, const unsigned Size);
	virtual void __fastcall DoDestroyProcessor(const Wclconnections::TwclClientDataConnection* Connection);
	virtual void __fastcall DoDisconnect(const int Reason);
	
public:
	__fastcall virtual TwclRfCommClient(Classes::TComponent* AOwner);
	__fastcall virtual ~TwclRfCommClient(void);
	int __fastcall Connect(const TwclBluetoothRadio* Radio);
	int __fastcall Disconnect(void);
	int __fastcall GetReadBufferSize(/* out */ unsigned &Size);
	int __fastcall GetWriteBufferSize(/* out */ unsigned &Size);
	int __fastcall SetReadBufferSize(const unsigned Size);
	int __fastcall SetWriteBufferSize(const unsigned Size);
	int __fastcall Write(const void * Data, const unsigned Size, /* out */ unsigned &Written);
	__property Wclconnections::TwclCustomClientDataProcessor* Processor = {read=GetProcessor};
	__property TwclBluetoothRadio* Radio = {read=GetRadio};
	__property GUID Service = {read=FService, write=SetService};
	__property Wclconnections::TwclClientState State = {read=GetState, nodefault};
	
__published:
	__property __int64 Address = {read=FAddress, write=SetAddress, default=0};
	__property bool Authentication = {read=FAuthentication, write=SetAuthentication, default=1};
	__property Byte Channel = {read=FChannel, write=SetChannel, default=0};
	__property bool Encryption = {read=FEncryption, write=SetEncryption, default=0};
	__property unsigned Timeout = {read=FTimeout, write=SetTimeout, default=10000};
	__property Wclconnections::TwclClientConnectionConnectEvent OnConnect = {read=FOnConnect, write=FOnConnect};
	__property Wclconnections::TwclClientConnectionProcessorEvent OnCreateProcessor = {read=FOnCreateProcessor, write=FOnCreateProcessor};
	__property Wclconnections::TwclConnectionDataEvent OnData = {read=FOnData, write=FOnData};
	__property Wclconnections::TwclClientConnectionProcessorEvent OnDestroyProcessor = {read=FOnDestroyProcessor, write=FOnDestroyProcessor};
	__property Wclconnections::TwclClientConnectionDisconnectEvent OnDisconnect = {read=FOnDisconnect, write=FOnDisconnect};
};


class DELPHICLASS TwclRfCommServer;
class PASCALIMPLEMENTATION TwclRfCommServer : public TwclBluetoothComponent 
{
	typedef TwclBluetoothComponent inherited;
	
public:
	TwclRfCommServerClientConnection* operator[](int Index) { return Clients[Index]; }
	
private:
	bool FAuthentication;
	Byte FChannel;
	bool FEncryption;
	#pragma pack(push, 1)
	GUID FService;
	#pragma pack(pop)
	
	AnsiString FServiceName;
	bool FActive;
	TwclRfCommServerConnection* FServer;
	TwclBluetoothGetSdpAttributesEvent FGetSdpAttributes;
	Wclconnections::TwclClientConnectionDisconnectEvent FOnClosed;
	Wclconnections::TwclServerConnectionProcessorEvent FOnCreateProcessor;
	TwclRfCommServerConnectEvent FOnConnect;
	TwclRfCommServerDataEvent FOnData;
	Wclconnections::TwclServerConnectionProcessorEvent FOnDestroyProcessor;
	TwclRfCommServerDisconnectEvent FOnDisconnect;
	Classes::TNotifyEvent FOnListen;
	Byte __fastcall GetAssignedChannel(void);
	int __fastcall GetCount(void);
	TwclRfCommServerClientConnection* __fastcall GetClients(const int Index);
	TwclBluetoothRadio* __fastcall GetRadio(void);
	Wclconnections::TwclServerState __fastcall GetState(void);
	void __fastcall SetAuthentication(const bool Value);
	void __fastcall SetChannel(const Byte Value);
	void __fastcall SetEncryption(const bool Value);
	void __fastcall SetService(const GUID &Value);
	void __fastcall SetServiceName(const AnsiString Value);
	void __fastcall ServerClosed(System::TObject* Sender, const int Reason);
	void __fastcall ServerConnect(System::TObject* Sender, const Wclconnections::TwclServerClientConnection* Client, const int Error);
	void __fastcall ServerData(System::TObject* Sender, const Wclconnections::TwclServerClientDataConnection* Client, const void * Data, const unsigned Size);
	void __fastcall ServerDisconnect(System::TObject* Sender, const Wclconnections::TwclServerClientConnection* Client, const int Reason);
	void __fastcall ServerListen(System::TObject* Sender);
	void __fastcall ServerGetSdpAttributes(System::TObject* Sender, /* out */ TwclBluetoothSdpProtocols &Protocols, /* out */ TwclBluetoothSdpProfiles &Profiles, /* out */ TwclBluetoothSdpFormats &Formats, /* out */ unsigned &Cod);
	
protected:
	virtual void __fastcall DoClosed(const int Reason);
	virtual void __fastcall DoConnect(const TwclRfCommServerClientConnection* Client, const int Error);
	virtual void __fastcall DoCreateProcessor(const Wclconnections::TwclServerClientDataConnection* Connection);
	virtual void __fastcall DoData(const TwclRfCommServerClientConnection* Client, const void * Data, const unsigned Size);
	virtual void __fastcall DoDestroyProcessor(const Wclconnections::TwclServerClientDataConnection* Connection);
	virtual void __fastcall DoDisconnect(const TwclRfCommServerClientConnection* Client, const int Reason);
	virtual void __fastcall DoListen(void);
	virtual void __fastcall DoGetSdpAttributes(/* out */ TwclBluetoothSdpProtocols &Protocols, /* out */ TwclBluetoothSdpProfiles &Profiles, /* out */ TwclBluetoothSdpFormats &Formats, /* out */ unsigned &Cod);
	
public:
	__fastcall virtual TwclRfCommServer(Classes::TComponent* AOwner);
	__fastcall virtual ~TwclRfCommServer(void);
	int __fastcall Close(void);
	int __fastcall Listen(const TwclBluetoothRadio* Radio);
	__property Byte AssignedChannel = {read=GetAssignedChannel, nodefault};
	__property int Count = {read=GetCount, nodefault};
	__property TwclRfCommServerClientConnection* Clients[int Index] = {read=GetClients/*, default*/};
	__property TwclBluetoothRadio* Radio = {read=GetRadio};
	__property GUID Service = {read=FService, write=SetService};
	__property Wclconnections::TwclServerState State = {read=GetState, nodefault};
	
__published:
	__property bool Authentication = {read=FAuthentication, write=SetAuthentication, default=1};
	__property Byte Channel = {read=FChannel, write=SetChannel, default=0};
	__property bool Encryption = {read=FEncryption, write=SetEncryption, default=0};
	__property AnsiString ServiceName = {read=FServiceName, write=SetServiceName};
	__property TwclBluetoothGetSdpAttributesEvent GetSdpAttributes = {read=FGetSdpAttributes, write=FGetSdpAttributes};
	__property Wclconnections::TwclClientConnectionDisconnectEvent OnClosed = {read=FOnClosed, write=FOnClosed};
	__property TwclRfCommServerConnectEvent OnConnect = {read=FOnConnect, write=FOnConnect};
	__property Wclconnections::TwclServerConnectionProcessorEvent OnCreateProcessor = {read=FOnCreateProcessor, write=FOnCreateProcessor};
	__property TwclRfCommServerDataEvent OnData = {read=FOnData, write=FOnData};
	__property Wclconnections::TwclServerConnectionProcessorEvent OnDestroyProcessor = {read=FOnDestroyProcessor, write=FOnDestroyProcessor};
	__property TwclRfCommServerDisconnectEvent OnDisconnect = {read=FOnDisconnect, write=FOnDisconnect};
	__property Classes::TNotifyEvent OnListen = {read=FOnListen, write=FOnListen};
};


class DELPHICLASS TwclGattClient;
class PASCALIMPLEMENTATION TwclGattClient : public TwclBluetoothComponent 
{
	typedef TwclBluetoothComponent inherited;
	
private:
	__int64 FAddress;
	bool FConnectOnRead;
	bool FForceNotifications;
	bool FActive;
	TwclGattClientConnection* FClient;
	TwclGattCharacteristicChangedEvent FOnCharacteristicChanged;
	Wclconnections::TwclClientConnectionConnectEvent FOnConnect;
	Classes::TNotifyEvent FOnConnectionParamsChanged;
	Classes::TNotifyEvent FOnConnectionPhyChanged;
	Wclconnections::TwclClientConnectionDisconnectEvent FOnDisconnect;
	Classes::TNotifyEvent FOnMaxPduSizeChanged;
	int __fastcall CheckSubscriptionMethod(const TwclGattSubscribeKind SubscribeKind, TwclGattCharacteristic &Characteristic);
	TwclBluetoothRadio* __fastcall GetRadio(void);
	Wclconnections::TwclClientState __fastcall GetState(void);
	void __fastcall SetAddress(const __int64 Value);
	void __fastcall SetConnectOnRead(const bool Value);
	void __fastcall SetForceNotifications(const bool Value);
	void __fastcall ClientCharacteristicChanged(System::TObject* Sender, const Word Handle, const TwclGattCharacteristicValue Value);
	void __fastcall ClientConnect(System::TObject* Sender, const int Error);
	void __fastcall ClientConnectionParamsChanged(System::TObject* Sender);
	void __fastcall ClientConnectionPhyChanged(System::TObject* Sender);
	void __fastcall ClientDisconnect(System::TObject* Sender, const int Reason);
	void __fastcall ClientMaxPduSizeChanged(System::TObject* Sender);
	
protected:
	virtual void __fastcall DoCharacteristicChanged(const Word Handle, const TwclGattCharacteristicValue Value);
	virtual void __fastcall DoConnectionParamsChanged(void);
	virtual void __fastcall DoConnectionPhyChanged(void);
	virtual void __fastcall DoMaxPduSizeChanged(void);
	virtual void __fastcall DoConnect(const int Error);
	virtual void __fastcall DoDisconnect(const int Reason);
	
public:
	__fastcall virtual TwclGattClient(Classes::TComponent* AOwner);
	__fastcall virtual ~TwclGattClient(void);
	int __fastcall Connect(const TwclBluetoothRadio* Radio);
	int __fastcall Disconnect(void);
	int __fastcall FindCharacteristic(const TwclGattService &Service, const TwclGattUuid &Uuid, /* out */ TwclGattCharacteristic &Characteristic, const TwclGattOperationFlag Flag = (TwclGattOperationFlag)(0x0))/* overload */;
	int __fastcall FindService(const TwclGattUuid &Uuid, /* out */ TwclGattService &Service, const TwclGattOperationFlag Flag = (TwclGattOperationFlag)(0x0));
	int __fastcall ReadCharacteristics(const TwclGattService &Service, const TwclGattOperationFlag Flag, /* out */ TwclGattCharacteristics &Characteristics);
	int __fastcall ReadCharacteristicValue(const TwclGattCharacteristic &Characteristic, const TwclGattOperationFlag Flag, /* out */ TwclGattCharacteristicValue &Value, const TwclGattProtectionLevel Protection = (TwclGattProtectionLevel)(0x0));
	int __fastcall ReadDescriptors(const TwclGattCharacteristic &Characteristic, const TwclGattOperationFlag Flag, /* out */ TwclGattDescriptors &Descriptors);
	int __fastcall ReadDescriptorValue(const TwclGattDescriptor &Descriptor, const TwclGattOperationFlag Flag, /* out */ TwclGattDescriptorValue &Value, const TwclGattProtectionLevel Protection = (TwclGattProtectionLevel)(0x0));
	int __fastcall ReadIncludedServices(const TwclGattService &Service, const TwclGattOperationFlag Flag, /* out */ TwclGattServices &Services);
	int __fastcall ReadServices(const TwclGattOperationFlag Flag, /* out */ TwclGattServices &Services);
	int __fastcall WriteCharacteristicValue(const TwclGattCharacteristic &Characteristic, const TwclGattCharacteristicValue Value, const TwclGattProtectionLevel Protection = (TwclGattProtectionLevel)(0x0), const TwclGattWriteKind WriteKind = (TwclGattWriteKind)(0x2));
	int __fastcall WriteDescriptorValue(const TwclGattDescriptor &Descriptor, const TwclGattDescriptorValue &Value, const TwclGattProtectionLevel Protection = (TwclGattProtectionLevel)(0x0));
	int __fastcall WriteClientConfiguration(const TwclGattCharacteristic &Characteristic, const bool Subscribe, const TwclGattOperationFlag Flag, const TwclGattProtectionLevel Protection = (TwclGattProtectionLevel)(0x0), const TwclGattSubscribeKind SubscribeKind = (TwclGattSubscribeKind)(0x2));
	int __fastcall Subscribe(const TwclGattCharacteristic &Characteristic, const TwclGattSubscribeKind SubscribeKind = (TwclGattSubscribeKind)(0x2));
	int __fastcall Unsubscribe(const TwclGattCharacteristic &Characteristic, const TwclGattSubscribeKind SubscribeKind = (TwclGattSubscribeKind)(0x2));
	int __fastcall SubscribeForNotifications(const TwclGattCharacteristic &Characteristic, const TwclGattOperationFlag Flag = (TwclGattOperationFlag)(0x0), const TwclGattProtectionLevel Protection = (TwclGattProtectionLevel)(0x0), const TwclGattSubscribeKind SubscribeKind = (TwclGattSubscribeKind)(0x2));
	int __fastcall UnsubscribeFromNotifications(const TwclGattCharacteristic &Characteristic, const TwclGattOperationFlag Flag = (TwclGattOperationFlag)(0x0), const TwclGattProtectionLevel Protection = (TwclGattProtectionLevel)(0x0), const TwclGattSubscribeKind SubscribeKind = (TwclGattSubscribeKind)(0x2));
	int __fastcall GetConnectionParams(/* out */ TwclBluetoothLeConnectionParameters &Params);
	int __fastcall SetConnectionParams(const TwclBluetoothLeConnectionParametersType Params)/* overload */;
	int __fastcall SetConnectionParams(const TwclBluetoothLeConnectionParametersValue &Params)/* overload */;
	int __fastcall GetMaxPduSize(/* out */ Word &Size);
	int __fastcall GetConnectionPhyInfo(/* out */ TwclBluetoothLeConnectionPhy &Info);
	__property TwclBluetoothRadio* Radio = {read=GetRadio};
	__property Wclconnections::TwclClientState State = {read=GetState, nodefault};
	
__published:
	__property __int64 Address = {read=FAddress, write=SetAddress, default=0};
	__property bool ConnectOnRead = {read=FConnectOnRead, write=SetConnectOnRead, default=0};
	__property bool ForceNotifications = {read=FForceNotifications, write=SetForceNotifications, default=0};
	__property TwclGattCharacteristicChangedEvent OnCharacteristicChanged = {read=FOnCharacteristicChanged, write=FOnCharacteristicChanged};
	__property Wclconnections::TwclClientConnectionConnectEvent OnConnect = {read=FOnConnect, write=FOnConnect};
	__property Classes::TNotifyEvent OnConnectionParamsChanged = {read=FOnConnectionParamsChanged, write=FOnConnectionParamsChanged};
	__property Classes::TNotifyEvent OnConnectionPhyChanged = {read=FOnConnectionPhyChanged, write=FOnConnectionPhyChanged};
	__property Wclconnections::TwclClientConnectionDisconnectEvent OnDisconnect = {read=FOnDisconnect, write=FOnDisconnect};
	__property Classes::TNotifyEvent OnMaxPduSizeChanged = {read=FOnMaxPduSizeChanged, write=FOnMaxPduSizeChanged};
};


class DELPHICLASS TwclGattServer;
class PASCALIMPLEMENTATION TwclGattServer : public TwclBluetoothComponent 
{
	typedef TwclBluetoothComponent inherited;
	
public:
	TwclGattServerClient* operator[](int Index) { return Clients[Index]; }
	
private:
	TwclGattServerConnection* FServer;
	TwclGattServerClientEvent FOnClientConnected;
	TwclGattServerClientEvent FOnClientDisconnected;
	TwclGattServerClientEvent FOnConnectionParamsChanged;
	TwclGattServerClientEvent FOnConnectionPhyChanged;
	TwclGattServerClientEvent FOnMaxPduSizeChanged;
	TwclGattServerClientEvent FOnNotificationSizeChanged;
	TwclGattLocalCharacteristicReadEvent FOnRead;
	Classes::TNotifyEvent FOnStarted;
	Classes::TNotifyEvent FOnStopped;
	TwclGattLocalCharacteristicSubscribedClientsChangedEvent FOnSubscribed;
	TwclGattLocalCharacteristicSubscribedClientsChangedEvent FOnUnsubscribed;
	TwclGattLocalCharacteristicWriteEvent FOnWrite;
	TwclGattServerClient* __fastcall GetClients(const int Index);
	int __fastcall GetClientsCount(void);
	bool __fastcall GetInitialized(void);
	TwclBluetoothRadio* __fastcall GetRadio(void);
	TwclGattLocalService* __fastcall GetServices(const int Index);
	int __fastcall GetServicesCount(void);
	bool __fastcall GetStarted(void);
	void __fastcall CharacteristicRead(System::TObject* Sender, const TwclGattServerClient* Client, const TwclGattLocalCharacteristic* Characteristic, const TwclGattLocalCharacteristicReadRequest* Request);
	void __fastcall CharacteristicWrite(System::TObject* Sender, const TwclGattServerClient* Client, const TwclGattLocalCharacteristic* Characteristic, const TwclGattLocalCharacteristicWriteRequest* Request);
	void __fastcall ClientConnected(System::TObject* Sender, const TwclGattServerClient* Client);
	void __fastcall ClientDisconnected(System::TObject* Sender, const TwclGattServerClient* Client);
	void __fastcall ClientSubscribed(System::TObject* Sender, const TwclGattServerClient* Client, const TwclGattLocalCharacteristic* Characteristic);
	void __fastcall ClientUnsubscribed(System::TObject* Sender, const TwclGattServerClient* Client, const TwclGattLocalCharacteristic* Characteristic);
	void __fastcall ConnectionParamsChanged(System::TObject* Sender, const TwclGattServerClient* Client);
	void __fastcall ConnectionPhyChanged(System::TObject* Sender, const TwclGattServerClient* Client);
	void __fastcall MaxPduSizeChanged(System::TObject* Sender, const TwclGattServerClient* Client);
	void __fastcall NotificationSizeChanged(System::TObject* Sender, const TwclGattServerClient* Client);
	void __fastcall ServerStarted(System::TObject* Sender);
	void __fastcall ServerStopped(System::TObject* Sender);
	
protected:
	virtual void __fastcall DoClientConnected(const TwclGattServerClient* Client);
	virtual void __fastcall DoClientDisconnected(const TwclGattServerClient* Client);
	virtual void __fastcall DoConnectionParamsChanged(const TwclGattServerClient* Client);
	virtual void __fastcall DoConnectionPhyChanged(const TwclGattServerClient* Client);
	virtual void __fastcall DoMaxPduSizeChanged(const TwclGattServerClient* Client);
	virtual void __fastcall DoNotificationSizeChanged(const TwclGattServerClient* Client);
	virtual void __fastcall DoRead(const TwclGattServerClient* Client, const TwclGattLocalCharacteristic* Characteristic, const TwclGattLocalCharacteristicReadRequest* Request);
	virtual void __fastcall DoStarted(void);
	virtual void __fastcall DoStopped(void);
	virtual void __fastcall DoSubscribed(const TwclGattServerClient* Client, const TwclGattLocalCharacteristic* Characteristic);
	virtual void __fastcall DoUnsubscribed(const TwclGattServerClient* Client, const TwclGattLocalCharacteristic* Characteristic);
	virtual void __fastcall DoWrite(const TwclGattServerClient* Client, const TwclGattLocalCharacteristic* Characteristic, const TwclGattLocalCharacteristicWriteRequest* Request);
	
public:
	__fastcall virtual TwclGattServer(Classes::TComponent* AOwner);
	__fastcall virtual ~TwclGattServer(void);
	int __fastcall Initialize(const TwclBluetoothRadio* Radio);
	int __fastcall Uninitialize(void);
	int __fastcall Start(void);
	int __fastcall Stop(void);
	int __fastcall AddService(const TwclGattUuid &Uuid, /* out */ TwclGattLocalService* &Service);
	int __fastcall ClearServices(void);
	int __fastcall DeleteService(const int Index);
	__property bool Initialized = {read=GetInitialized, nodefault};
	__property TwclBluetoothRadio* Radio = {read=GetRadio};
	__property bool Started = {read=GetStarted, nodefault};
	__property TwclGattLocalService* Services[int Index] = {read=GetServices};
	__property int ServicesCount = {read=GetServicesCount, nodefault};
	__property TwclGattServerClient* Clients[int Index] = {read=GetClients/*, default*/};
	__property int ClientsCount = {read=GetClientsCount, nodefault};
	
__published:
	__property TwclGattServerClientEvent OnClientConnected = {read=FOnClientConnected, write=FOnClientConnected};
	__property TwclGattServerClientEvent OnClientDisconnected = {read=FOnClientDisconnected, write=FOnClientDisconnected};
	__property TwclGattServerClientEvent OnConnectionParamsChanged = {read=FOnConnectionParamsChanged, write=FOnConnectionParamsChanged};
	__property TwclGattServerClientEvent OnConnectionPhyChanged = {read=FOnConnectionPhyChanged, write=FOnConnectionPhyChanged};
	__property TwclGattServerClientEvent OnMaxPduSizeChanged = {read=FOnMaxPduSizeChanged, write=FOnMaxPduSizeChanged};
	__property TwclGattServerClientEvent OnNotificationSizeChanged = {read=FOnNotificationSizeChanged, write=FOnNotificationSizeChanged};
	__property TwclGattLocalCharacteristicReadEvent OnRead = {read=FOnRead, write=FOnRead};
	__property Classes::TNotifyEvent OnStarted = {read=FOnStarted, write=FOnStarted};
	__property Classes::TNotifyEvent OnStopped = {read=FOnStopped, write=FOnStopped};
	__property TwclGattLocalCharacteristicSubscribedClientsChangedEvent OnSubscribed = {read=FOnSubscribed, write=FOnSubscribed};
	__property TwclGattLocalCharacteristicSubscribedClientsChangedEvent OnUnsubscribed = {read=FOnUnsubscribed, write=FOnUnsubscribed};
	__property TwclGattLocalCharacteristicWriteEvent OnWrite = {read=FOnWrite, write=FOnWrite};
};


class DELPHICLASS TwclBluetoothLeBeaconWatcher;
class PASCALIMPLEMENTATION TwclBluetoothLeBeaconWatcher : public TwclBluetoothComponent 
{
	typedef TwclBluetoothComponent inherited;
	
private:
	bool FActive;
	bool FAllowExtendedAdvertisements;
	Word FScanInterval;
	TwclBluetoothLeScanningMode FScanningMode;
	Word FScanWindow;
	TwclBluetoothLeBeaconWatcherConnection* FWatcher;
	TwclBluetoothLeAdvertisementAppearanceFrameEvent FOnAdvertisementAppearanceFrame;
	TwclBluetoothLeAdvertisementFrameInformationEvent FOnAdvertisementFrameInformation;
	TwclBluetoothLeAdvertisementExtFrameInformationEvent FOnAdvertisementExtFrameInformation;
	TwclBluetoothLeAdvertisementRawFrameEvent FOnAdvertisementRawFrame;
	TwclBluetoothLeAdvertisementReceivedEvent FOnAdvertisementReceived;
	TwclBluetoothLeAdvertisementService16DataFrameEvent FOnAdvertisementService16DataFrame;
	TwclBluetoothLeAdvertisementService32DataFrameEvent FOnAdvertisementService32DataFrame;
	TwclBluetoothLeAdvertisementService128DataFrameEvent FOnAdvertisementService128DataFrame;
	TwclBluetoothLeAdvertisementServiceSol16FrameEvent FOnAdvertisementServiceSol16Frame;
	TwclBluetoothLeAdvertisementServiceSol32FrameEvent FOnAdvertisementServiceSol32Frame;
	TwclBluetoothLeAdvertisementServiceSol128FrameEvent FOnAdvertisementServiceSol128Frame;
	TwclBluetoothLeAdvertisementTxPowerLevelFrameEvent FOnAdvertisementTxPowerLevelFrame;
	TwclBluetoothLeAdvertisementUuidFrameEvent FOnAdvertisementUuidFrame;
	TwclBluetoothLeAltBeaconFrameEvent FOnAltBeaconFrame;
	TwclBluetoothLeAppleAirdropFrameEvent FOnAppleAirdropFrame;
	TwclBluetoothLeAppleAirplaySourceFrameEvent FOnAppleAirplaySourceFrame;
	TwclBluetoothLeAppleAirplayTargetFrameEvent FOnAppleAirplayTargetFrame;
	TwclBluetoothLeAppleAirprintFrameEvent FOnAppleAirprintFrame;
	TwclBluetoothLeAppleFindMyFrameEvent FOnAppleFindMyFrame;
	TwclBluetoothLeAppleHandoffFrameEvent FOnAppleHandoffFrame;
	TwclBluetoothLeAppleHeySiriFrameEvent FOnAppleHeySiriFrame;
	TwclBluetoothLeAppleHomeKitFrameEvent FOnAppleHomeKitFrame;
	TwclBluetoothLeAppleiBeaconFrameEvent FOnAppleiBeaconFrame;
	TwclBluetoothLeAppleMagicSwitchFrameEvent FOnAppleMagicSwitchFrame;
	TwclBluetoothLeAppleNearbyActionFrameEvent FOnAppleNearbyActionFrame;
	TwclBluetoothLeAppleNearbyInfoFrameEvent FOnAppleNearbyInfoFrame;
	TwclBluetoothLeAppleProximityPairingFrameEvent FOnAppleProximityPairingFrame;
	TwclBluetoothLeAppleTetheringSourceFrameEvent FOnAppleTetheringSourceFrame;
	TwclBluetoothLeAppleTetheringTargetFrameEvent FOnAppleTetheringTargetFrame;
	TwclBluetoothLeAppleUnknownFrameEvent FOnAppleUnknownFrame;
	TwclBluetoothLeDriAsdMessageEvent FOnDriAsdMessage;
	TwclBluetoothLeEddystoneTlmFrameEvent FOnEddystoneTlmFrame;
	TwclBluetoothLeEddystoneUidFrameEvent FOnEddystoneUidFrame;
	TwclBluetoothLeEddystoneUrlFrameEvent FOnEddystoneUrlFrame;
	TwclBluetoothLeManufacturerRawFrameEvent FOnManufacturerRawFrame;
	TwclBluetoothLeMicrosoftCdpBeaconFrameEvent FOnMicrosoftCdpBeaconFrame;
	Classes::TNotifyEvent FOnStarted;
	Classes::TNotifyEvent FOnStopped;
	bool __fastcall GetMonitoring(void);
	TwclBluetoothRadio* __fastcall GetRadio(void);
	void __fastcall SetAllowExtendedAdvertisements(const bool Value);
	void __fastcall SetScanInterval(const Word Value);
	void __fastcall SetScanningMode(const TwclBluetoothLeScanningMode Value);
	void __fastcall SetScanWindow(const Word Value);
	void __fastcall WatcherAdvertisementAppearanceFrame(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const Word Appearance);
	void __fastcall WatcherAdvertisementFrameInformation(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const AnsiString Name, const TwclBluetoothLeAdvertisementType PacketType, const TwclBluetoothLeAdvertisementFlags Flags);
	void __fastcall WatcherAdvertisementExtFrameInformation(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const TwclBluetoothAddressType AddressType, const SByte TxPower, const TwclBluetoothLeExtendedFrameFlags Flags);
	void __fastcall WatcherAdvertisementRawFrame(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const Byte DataType, const TwclBluetoothLeAdvertisementFrameRawData Data);
	void __fastcall WatcherAdvertisementReceived(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const TwclBluetoothLeAdvertisementFrameRawData Data);
	void __fastcall WatcherAdvertisementService16DataFrame(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const Word Uuid, const TwclBluetoothLeAdvertisementFrameRawData Data);
	void __fastcall WatcherAdvertisementService32DataFrame(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const unsigned Uuid, const TwclBluetoothLeAdvertisementFrameRawData Data);
	void __fastcall WatcherAdvertisementService128DataFrame(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const GUID &Uuid, const TwclBluetoothLeAdvertisementFrameRawData Data);
	void __fastcall WatcherAdvertisementServiceSol16Frame(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const Word Uuid);
	void __fastcall WatcherAdvertisementServiceSol32Frame(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const unsigned Uuid);
	void __fastcall WatcherAdvertisementServiceSol128Frame(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const GUID &Uuid);
	void __fastcall WatcherAdvertisementTxPowerLevelFrame(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const SByte TxPower);
	void __fastcall WatcherAdvertisementUuidFrame(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const GUID &Uuid);
	void __fastcall WatcherAltBeaconFrame(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const Word CompanyId, const Word Major, const Word Minor, const GUID &Uuid, const SByte TxRssi, const Byte Reserved, const TwclBluetoothLeAdvertisementFrameRawData Data);
	void __fastcall WatcherAppleAirdropFrame(System::TObject* Sender, const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleAirdropFrameData &Data);
	void __fastcall WatcherAppleAirplaySourceFrame(System::TObject* Sender, const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleAirplaySourceFrameData Data);
	void __fastcall WatcherAppleAirplayTargetFrame(System::TObject* Sender, const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleAirplayTargetFrameData &Data);
	void __fastcall WatcherAppleAirprintFrame(System::TObject* Sender, const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleAirprintFrameData &Data);
	void __fastcall WatcherAppleFindMyFrame(System::TObject* Sender, const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleFindMyFrameData &Data);
	void __fastcall WatcherAppleHandoffFrame(System::TObject* Sender, const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleHandoffFrameData &Data);
	void __fastcall WatcherAppleHeySiriFrame(System::TObject* Sender, const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleHeySiriFrameData &Data);
	void __fastcall WatcherAppleHomeKitFrame(System::TObject* Sender, const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleHomeKitFrameData &Data);
	void __fastcall WatcherAppleiBeaconFrame(System::TObject* Sender, const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleiBeaconFrameData &Data);
	void __fastcall WatcherAppleMagicSwitchFrame(System::TObject* Sender, const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleMagicSwitchFrameData Data);
	void __fastcall WatcherAppleNearbyActionFrame(System::TObject* Sender, const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleNearbyActionFrameData &Data);
	void __fastcall WatcherAppleNearbyInfoFrame(System::TObject* Sender, const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleNearbyInfoFrameData &Data);
	void __fastcall WatcherAppleProximityPairingFrame(System::TObject* Sender, const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleProximityPairingFrameData &Data);
	void __fastcall WatcherAppleTetheringSourceFrame(System::TObject* Sender, const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleTetheringSourceFrameData &Data);
	void __fastcall WatcherAppleTetheringTargetFrame(System::TObject* Sender, const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleTetheringTargetFrameData Data);
	void __fastcall WatcherAppleUnknownFrame(System::TObject* Sender, const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleUnknownFrameData &Data);
	void __fastcall WatcherDriAsdMessage(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const Wcldricommon::TwclDriRawData Raw);
	void __fastcall WatcherEddystoneTlmFrame(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const unsigned AdvCnt, const Word Batt, const unsigned SecCnt, const double Temp, const TwclBluetoothLeAdvertisementFrameRawData Data);
	void __fastcall WatcherEddystoneUidFrame(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const SByte TxRssi, const GUID &Uuid, const TwclBluetoothLeAdvertisementFrameRawData Data);
	void __fastcall WatcherEddystoneUrlFrame(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const SByte TxRssi, const AnsiString Url);
	void __fastcall WatcherManufacturerRawFrame(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const Word CompanyId, const TwclBluetoothLeAdvertisementFrameRawData Data);
	void __fastcall WatcherMicrosoftCdpBeaconFrame(System::TObject* Sender, const __int64 Address, const __int64 Timestamp, const SByte Rssi, const TwclBluetoothLeCdpBeaconScenarioType ScenarioType, const Byte Version, const TwclBluetoothLeCdpBeaconDeviceType DeviceType, const Byte SubVersion, const bool ShareNearBy, const bool AddressAsDeviceId, const TwclBluetoothLeCdpBeaconExtendedDeviceStatuses ExtendedDeviceStatus, const TwclBluetoothLeCdpBeaconSalt Salt, const TwclBluetoothLeCdpBeaconHash Hash);
	void __fastcall WatcherStarted(System::TObject* Sender);
	void __fastcall WatcherStopped(System::TObject* Sender);
	
protected:
	virtual void __fastcall DoAdvertisementAppearanceFrame(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const Word Appearance);
	virtual void __fastcall DoAdvertisementFrameInformation(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const AnsiString Name, const TwclBluetoothLeAdvertisementType PacketType, const TwclBluetoothLeAdvertisementFlags Flags);
	virtual void __fastcall DoAdvertisementExtFrameInformation(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const TwclBluetoothAddressType AddressType, const SByte TxPower, const TwclBluetoothLeExtendedFrameFlags Flags);
	virtual void __fastcall DoAdvertisementRawFrame(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const Byte DataType, const TwclBluetoothLeAdvertisementFrameRawData Data);
	virtual void __fastcall DoAdvertisementReceived(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const TwclBluetoothLeAdvertisementFrameRawData Data);
	virtual void __fastcall DoAdvertisementService16DataFrame(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const Word Uuid, const TwclBluetoothLeAdvertisementFrameRawData Data);
	virtual void __fastcall DoAdvertisementService32DataFrame(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const unsigned Uuid, const TwclBluetoothLeAdvertisementFrameRawData Data);
	virtual void __fastcall DoAdvertisementService128DataFrame(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const GUID &Uuid, const TwclBluetoothLeAdvertisementFrameRawData Data);
	virtual void __fastcall DoAdvertisementServiceSol16Frame(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const Word Uuid);
	virtual void __fastcall DoAdvertisementServiceSol32Frame(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const unsigned Uuid);
	virtual void __fastcall DoAdvertisementServiceSol128Frame(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const GUID &Uuid);
	virtual void __fastcall DoAdvertisementTxPowerLevelFrame(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const SByte TxPower);
	virtual void __fastcall DoAdvertisementUuidFrame(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const GUID &Uuid);
	virtual void __fastcall DoAltBeaconFrame(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const Word CompanyId, const Word Major, const Word Minor, const GUID &Uuid, const SByte TxRssi, const Byte Reserved, const TwclBluetoothLeAdvertisementFrameRawData Data);
	virtual void __fastcall DoAppleAirdropFrame(const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleAirdropFrameData &Data);
	virtual void __fastcall DoAppleAirplaySourceFrame(const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleAirplaySourceFrameData Data);
	virtual void __fastcall DoAppleAirplayTargetFrame(const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleAirplayTargetFrameData &Data);
	virtual void __fastcall DoAppleAirprintFrame(const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleAirprintFrameData &Data);
	virtual void __fastcall DoAppleFindMyFrame(const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleFindMyFrameData &Data);
	virtual void __fastcall DoAppleHandoffFrame(const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleHandoffFrameData &Data);
	virtual void __fastcall DoAppleHeySiriFrame(const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleHeySiriFrameData &Data);
	virtual void __fastcall DoAppleHomeKitFrame(const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleHomeKitFrameData &Data);
	virtual void __fastcall DoAppleiBeaconFrame(const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleiBeaconFrameData &Data);
	virtual void __fastcall DoAppleMagicSwitchFrame(const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleMagicSwitchFrameData Data);
	virtual void __fastcall DoAppleNearbyActionFrame(const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleNearbyActionFrameData &Data);
	virtual void __fastcall DoAppleNearbyInfoFrame(const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleNearbyInfoFrameData &Data);
	virtual void __fastcall DoAppleProximityPairingFrame(const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleProximityPairingFrameData &Data);
	virtual void __fastcall DoAppleTetheringSourceFrame(const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleTetheringSourceFrameData &Data);
	virtual void __fastcall DoAppleTetheringTargetFrame(const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleTetheringTargetFrameData Data);
	virtual void __fastcall DoAppleUnknownFrame(const TwclBluetoothLeAdvertisementInfo &Info, const TwclBluetoothLeAppleUnknownFrameData &Data);
	virtual void __fastcall DoDriAsdMessage(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const Wcldricommon::TwclDriRawData Raw);
	virtual void __fastcall DoEddystoneTlmFrame(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const unsigned AdvCnt, const Word Batt, const unsigned SecCnt, const double Temp, const TwclBluetoothLeAdvertisementFrameRawData Data);
	virtual void __fastcall DoEddystoneUidFrame(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const SByte TxRssi, const GUID &Uuid, const TwclBluetoothLeAdvertisementFrameRawData Data);
	virtual void __fastcall DoEddystoneUrlFrame(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const SByte TxRssi, const AnsiString Url);
	virtual void __fastcall DoManufacturerRawFrame(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const Word CompanyId, const TwclBluetoothLeAdvertisementFrameRawData Data);
	virtual void __fastcall DoMicrosoftCdpBeaconFrame(const __int64 Address, const __int64 Timestamp, const SByte Rssi, const TwclBluetoothLeCdpBeaconScenarioType ScenarioType, const Byte Version, const TwclBluetoothLeCdpBeaconDeviceType DeviceType, const Byte SubVersion, const bool ShareNearBy, const bool AddressAsDeviceId, const TwclBluetoothLeCdpBeaconExtendedDeviceStatuses ExtendedDeviceStatus, const TwclBluetoothLeCdpBeaconSalt Salt, const TwclBluetoothLeCdpBeaconHash Hash);
	virtual void __fastcall DoStarted(void);
	virtual void __fastcall DoStopped(void);
	
public:
	__fastcall virtual TwclBluetoothLeBeaconWatcher(Classes::TComponent* AOwner);
	__fastcall virtual ~TwclBluetoothLeBeaconWatcher(void);
	int __fastcall Start(const TwclBluetoothRadio* Radio);
	int __fastcall Stop(void);
	int __fastcall RestoreDefaults(void);
	__property bool Monitoring = {read=GetMonitoring, nodefault};
	__property TwclBluetoothRadio* Radio = {read=GetRadio};
	
__published:
	__property bool AllowExtendedAdvertisements = {read=FAllowExtendedAdvertisements, write=SetAllowExtendedAdvertisements, default=0};
	__property Word ScanInterval = {read=FScanInterval, write=SetScanInterval, default=189};
	__property TwclBluetoothLeScanningMode ScanningMode = {read=FScanningMode, write=SetScanningMode, default=0};
	__property Word ScanWindow = {read=FScanWindow, write=SetScanWindow, default=29};
	__property TwclBluetoothLeAdvertisementAppearanceFrameEvent OnAdvertisementAppearanceFrame = {read=FOnAdvertisementAppearanceFrame, write=FOnAdvertisementAppearanceFrame};
	__property TwclBluetoothLeAdvertisementFrameInformationEvent OnAdvertisementFrameInformation = {read=FOnAdvertisementFrameInformation, write=FOnAdvertisementFrameInformation};
	__property TwclBluetoothLeAdvertisementExtFrameInformationEvent OnAdvertisementExtFrameInformation = {read=FOnAdvertisementExtFrameInformation, write=FOnAdvertisementExtFrameInformation};
	__property TwclBluetoothLeAdvertisementRawFrameEvent OnAdvertisementRawFrame = {read=FOnAdvertisementRawFrame, write=FOnAdvertisementRawFrame};
	__property TwclBluetoothLeAdvertisementReceivedEvent OnAdvertisementReceived = {read=FOnAdvertisementReceived, write=FOnAdvertisementReceived};
	__property TwclBluetoothLeAdvertisementService16DataFrameEvent OnAdvertisementService16DataFrame = {read=FOnAdvertisementService16DataFrame, write=FOnAdvertisementService16DataFrame};
	__property TwclBluetoothLeAdvertisementService32DataFrameEvent OnAdvertisementService32DataFrame = {read=FOnAdvertisementService32DataFrame, write=FOnAdvertisementService32DataFrame};
	__property TwclBluetoothLeAdvertisementService128DataFrameEvent OnAdvertisementService128DataFrame = {read=FOnAdvertisementService128DataFrame, write=FOnAdvertisementService128DataFrame};
	__property TwclBluetoothLeAdvertisementServiceSol16FrameEvent OnAdvertisementServiceSol16Frame = {read=FOnAdvertisementServiceSol16Frame, write=FOnAdvertisementServiceSol16Frame};
	__property TwclBluetoothLeAdvertisementServiceSol32FrameEvent OnAdvertisementServiceSol32Frame = {read=FOnAdvertisementServiceSol32Frame, write=FOnAdvertisementServiceSol32Frame};
	__property TwclBluetoothLeAdvertisementServiceSol128FrameEvent OnAdvertisementServiceSol128Frame = {read=FOnAdvertisementServiceSol128Frame, write=FOnAdvertisementServiceSol128Frame};
	__property TwclBluetoothLeAdvertisementTxPowerLevelFrameEvent OnAdvertisementTxPowerLevelFrame = {read=FOnAdvertisementTxPowerLevelFrame, write=FOnAdvertisementTxPowerLevelFrame};
	__property TwclBluetoothLeAdvertisementUuidFrameEvent OnAdvertisementUuidFrame = {read=FOnAdvertisementUuidFrame, write=FOnAdvertisementUuidFrame};
	__property TwclBluetoothLeAltBeaconFrameEvent OnAltBeaconFrame = {read=FOnAltBeaconFrame, write=FOnAltBeaconFrame};
	__property TwclBluetoothLeAppleAirdropFrameEvent OnAppleAirdropFrame = {read=FOnAppleAirdropFrame, write=FOnAppleAirdropFrame};
	__property TwclBluetoothLeAppleAirplaySourceFrameEvent OnAppleAirplaySourceFrame = {read=FOnAppleAirplaySourceFrame, write=FOnAppleAirplaySourceFrame};
	__property TwclBluetoothLeAppleAirplayTargetFrameEvent OnAppleAirplayTargetFrame = {read=FOnAppleAirplayTargetFrame, write=FOnAppleAirplayTargetFrame};
	__property TwclBluetoothLeAppleAirprintFrameEvent OnAppleAirprintFrame = {read=FOnAppleAirprintFrame, write=FOnAppleAirprintFrame};
	__property TwclBluetoothLeAppleFindMyFrameEvent OnAppleFindMyFrame = {read=FOnAppleFindMyFrame, write=FOnAppleFindMyFrame};
	__property TwclBluetoothLeAppleHandoffFrameEvent OnAppleHandoffFrame = {read=FOnAppleHandoffFrame, write=FOnAppleHandoffFrame};
	__property TwclBluetoothLeAppleHeySiriFrameEvent OnAppleHeySiriFrame = {read=FOnAppleHeySiriFrame, write=FOnAppleHeySiriFrame};
	__property TwclBluetoothLeAppleHomeKitFrameEvent OnAppleHomeKitFrame = {read=FOnAppleHomeKitFrame, write=FOnAppleHomeKitFrame};
	__property TwclBluetoothLeAppleiBeaconFrameEvent OnAppleiBeaconFrame = {read=FOnAppleiBeaconFrame, write=FOnAppleiBeaconFrame};
	__property TwclBluetoothLeAppleMagicSwitchFrameEvent OnAppleMagicSwitchFrame = {read=FOnAppleMagicSwitchFrame, write=FOnAppleMagicSwitchFrame};
	__property TwclBluetoothLeAppleNearbyActionFrameEvent OnAppleNearbyActionFrame = {read=FOnAppleNearbyActionFrame, write=FOnAppleNearbyActionFrame};
	__property TwclBluetoothLeAppleNearbyInfoFrameEvent OnAppleNearbyInfoFrame = {read=FOnAppleNearbyInfoFrame, write=FOnAppleNearbyInfoFrame};
	__property TwclBluetoothLeAppleProximityPairingFrameEvent OnAppleProximityPairingFrame = {read=FOnAppleProximityPairingFrame, write=FOnAppleProximityPairingFrame};
	__property TwclBluetoothLeAppleTetheringSourceFrameEvent OnAppleTetheringSourceFrame = {read=FOnAppleTetheringSourceFrame, write=FOnAppleTetheringSourceFrame};
	__property TwclBluetoothLeAppleTetheringTargetFrameEvent OnAppleTetheringTargetFrame = {read=FOnAppleTetheringTargetFrame, write=FOnAppleTetheringTargetFrame};
	__property TwclBluetoothLeAppleUnknownFrameEvent OnAppleUnknownFrame = {read=FOnAppleUnknownFrame, write=FOnAppleUnknownFrame};
	__property TwclBluetoothLeDriAsdMessageEvent OnDriAsdMessage = {read=FOnDriAsdMessage, write=FOnDriAsdMessage};
	__property TwclBluetoothLeEddystoneTlmFrameEvent OnEddystoneTlmFrame = {read=FOnEddystoneTlmFrame, write=FOnEddystoneTlmFrame};
	__property TwclBluetoothLeEddystoneUidFrameEvent OnEddystoneUidFrame = {read=FOnEddystoneUidFrame, write=FOnEddystoneUidFrame};
	__property TwclBluetoothLeEddystoneUrlFrameEvent OnEddystoneUrlFrame = {read=FOnEddystoneUrlFrame, write=FOnEddystoneUrlFrame};
	__property TwclBluetoothLeManufacturerRawFrameEvent OnManufacturerRawFrame = {read=FOnManufacturerRawFrame, write=FOnManufacturerRawFrame};
	__property TwclBluetoothLeMicrosoftCdpBeaconFrameEvent OnMicrosoftCdpBeaconFrame = {read=FOnMicrosoftCdpBeaconFrame, write=FOnMicrosoftCdpBeaconFrame};
	__property Classes::TNotifyEvent OnStarted = {read=FOnStarted, write=FOnStarted};
	__property Classes::TNotifyEvent OnStopped = {read=FOnStopped, write=FOnStopped};
};


class DELPHICLASS TwclBluetoothLeAdvertiser;
class PASCALIMPLEMENTATION TwclBluetoothLeAdvertiser : public TwclBluetoothComponent 
{
	typedef TwclBluetoothComponent inherited;
	
public:
	TwclBluetoothLeAdvertisement* operator[](int Index) { return Advertisements[Index]; }
	
private:
	bool FActive;
	Classes::TList* FAdvertisements;
	TwclBluetoothLeAdvertiserConnection* FAdvertiser;
	Word FInterval;
	bool FAnonymous;
	bool FIncludeTxRssi;
	SByte FPreferredTxRssi;
	bool FUseExtendedAdvertisement;
	Classes::TNotifyEvent FOnStarted;
	Classes::TNotifyEvent FOnStopped;
	int __fastcall CheckAdvertisement(const TwclBluetoothLeAdvertisement* Advertisement);
	TwclBluetoothLeAdvertisement* __fastcall GetAdvertisements(const int Index);
	bool __fastcall GetAdvertising(void);
	int __fastcall GetCount(void);
	TwclBluetoothRadio* __fastcall GetRadio(void);
	void __fastcall SetAnonymous(const bool Value);
	void __fastcall SetIncludeTxRssi(const bool Value);
	void __fastcall SetInterval(const Word Value);
	void __fastcall SetPreferredTxRssi(const SByte Value);
	void __fastcall SetUseExtendedAdvertisement(const bool Value);
	void __fastcall AdvertiserStarted(System::TObject* Sender);
	void __fastcall AdvertiserStopped(System::TObject* Sender);
	
protected:
	virtual void __fastcall DoStarted(void);
	virtual void __fastcall DoStopped(void);
	
public:
	__fastcall virtual TwclBluetoothLeAdvertiser(Classes::TComponent* AOwner);
	__fastcall virtual ~TwclBluetoothLeAdvertiser(void);
	int __fastcall Add(const TwclBluetoothLeAdvertisement* Advertisement);
	int __fastcall Clear(void);
	int __fastcall Delete(const int Index);
	int __fastcall Start(const TwclBluetoothRadio* Radio);
	int __fastcall Stop(void);
	int __fastcall RestoreDefaults(void);
	__property TwclBluetoothLeAdvertisement* Advertisements[int Index] = {read=GetAdvertisements/*, default*/};
	__property bool Advertising = {read=GetAdvertising, nodefault};
	__property int Count = {read=GetCount, nodefault};
	__property TwclBluetoothRadio* Radio = {read=GetRadio};
	
__published:
	__property bool Anonymous = {read=FAnonymous, write=SetAnonymous, default=0};
	__property bool IncludeTxRssi = {read=FIncludeTxRssi, write=SetIncludeTxRssi, default=0};
	__property Word Interval = {read=FInterval, write=SetInterval, nodefault};
	__property SByte PreferredTxRssi = {read=FPreferredTxRssi, write=SetPreferredTxRssi, default=-127};
	__property bool UseExtendedAdvertisement = {read=FUseExtendedAdvertisement, write=SetUseExtendedAdvertisement, default=0};
	__property Classes::TNotifyEvent OnStarted = {read=FOnStarted, write=FOnStarted};
	__property Classes::TNotifyEvent OnStopped = {read=FOnStopped, write=FOnStopped};
};


class DELPHICLASS TwclWiiRemoteClient;
class PASCALIMPLEMENTATION TwclWiiRemoteClient : public TwclBluetoothComponent 
{
	typedef TwclBluetoothComponent inherited;
	
private:
	bool FActive;
	__int64 FAddress;
	unsigned FTimeout;
	TwclWiiRemoteClientConnection* FClient;
	TwclWiiRemoteAccelChangedEvent FOnAccelChanged;
	TwclWiiRemoteBalanceBoardChangedEvent FOnBalanceBoardChanged;
	TwclWiiRemoteButtonsChangedEvent FOnButtonsChanged;
	TwclWiiRemoteClassicControllerChangedEvent FOnClassicControllerChanged;
	Wclconnections::TwclClientConnectionConnectEvent FOnConnect;
	Wclconnections::TwclClientConnectionDisconnectEvent FOnDisconnect;
	TwclWiiRemoteDrumsChangedEvent FOnDrumsChanged;
	Classes::TNotifyEvent FOnExtensionAttached;
	Classes::TNotifyEvent FOnExtensionDetached;
	TwclWiiRemoteGuitarChangedEvent FOnGuitarChanged;
	TwclWiiRemoteIrChangedEvent FOnIrChanged;
	TwclWiiRemoteNunchukChangedEvent FOnNunchukChanged;
	TwclWiiRemoteStatusChangedEvent FOnStatusChanged;
	void __fastcall ClientAccelChanged(System::TObject* Sender, const TwclWiiRemoteAccel &Accel);
	void __fastcall ClientBalanceBoardChanged(System::TObject* Sender, const TwclWiiRemoteBalanceBoard &Board);
	void __fastcall ClientButtonsChanged(System::TObject* Sender, const TwclWiiRemoteButtons &Buttons);
	void __fastcall ClientClassicControllerChanged(System::TObject* Sender, const TwclWiiRemoteClassicController &Controller);
	void __fastcall ClientConnect(System::TObject* Sender, const int Error);
	void __fastcall ClientDisconnect(System::TObject* Sender, const int Reason);
	void __fastcall ClientDrumsChanged(System::TObject* Sender, const TwclWiiRemoteDrums &Drums);
	void __fastcall ClientExtensionAttached(System::TObject* Sender);
	void __fastcall ClientExtensionDetached(System::TObject* Sender);
	void __fastcall ClientGuitarChanged(System::TObject* Sender, const TwclWiiRemoteGuitar &Guitar);
	void __fastcall ClientIrChanged(System::TObject* Sender, const TwclWiiRemoteIrSensors &Ir);
	void __fastcall ClientNunchukChanged(System::TObject* Sender, const TwclWiiRemoteNunchuk &Nunchuk);
	void __fastcall ClientStatusChanged(System::TObject* Sender, const double Batt, const TwclWiiRemoteLeds Leds);
	bool __fastcall GetAccelEnabled(void);
	TwclWiiRemoteExtension __fastcall GetExtension(void);
	TwclWiiRemoteIrMode __fastcall GetIrMode(void);
	TwclWiiRemoteIrSensitivity __fastcall GetIrSensitivity(void);
	TwclWiiRemoteLeds __fastcall GetLeds(void);
	TwclBluetoothRadio* __fastcall GetRadio(void);
	bool __fastcall GetRumble(void);
	Wclconnections::TwclClientState __fastcall GetState(void);
	void __fastcall SetAddress(const __int64 Value);
	void __fastcall SetTimeout(const unsigned Value);
	
protected:
	virtual void __fastcall DoAccelChanged(const TwclWiiRemoteAccel &Accel);
	virtual void __fastcall DoBalanceBoardChanged(const TwclWiiRemoteBalanceBoard &Board);
	virtual void __fastcall DoButtonsChanged(const TwclWiiRemoteButtons &Buttons);
	virtual void __fastcall DoClassicControllerChanged(const TwclWiiRemoteClassicController &Controller);
	virtual void __fastcall DoConnect(const int Error);
	virtual void __fastcall DoDisconnect(const int Reason);
	virtual void __fastcall DoDrumsChanged(const TwclWiiRemoteDrums &Drums);
	virtual void __fastcall DoExtensionAttached(void);
	virtual void __fastcall DoExtensionDetached(void);
	virtual void __fastcall DoGuitarChanged(const TwclWiiRemoteGuitar &Guitar);
	virtual void __fastcall DoIrChanged(const TwclWiiRemoteIrSensors &Ir);
	virtual void __fastcall DoNunchukChanged(const TwclWiiRemoteNunchuk &Nunchuk);
	virtual void __fastcall DoStatusChanged(const double Batt, const TwclWiiRemoteLeds Leds);
	
public:
	__fastcall virtual TwclWiiRemoteClient(Classes::TComponent* AOwner);
	__fastcall virtual ~TwclWiiRemoteClient(void);
	int __fastcall Connect(const TwclBluetoothRadio* Radio);
	int __fastcall Disconnect(void);
	int __fastcall GetStatus(void);
	int __fastcall SetLeds(const TwclWiiRemoteLeds Leds)/* overload */;
	int __fastcall SetLeds(const bool Led1, const bool Led2, const bool Led3, const bool Led4)/* overload */;
	int __fastcall SetRumble(const bool TurnOn);
	int __fastcall EnableAccel(void);
	int __fastcall DisableAccel(void);
	int __fastcall SetIrSensitivity(const TwclWiiRemoteIrSensitivity Sensitivity);
	__property bool AccelEnabled = {read=GetAccelEnabled, nodefault};
	__property TwclWiiRemoteExtension Extension = {read=GetExtension, nodefault};
	__property TwclWiiRemoteIrMode IrMode = {read=GetIrMode, nodefault};
	__property TwclWiiRemoteIrSensitivity IrSensitivity = {read=GetIrSensitivity, nodefault};
	__property TwclWiiRemoteLeds Leds = {read=GetLeds};
	__property TwclBluetoothRadio* Radio = {read=GetRadio};
	__property bool Rumble = {read=GetRumble, nodefault};
	__property Wclconnections::TwclClientState State = {read=GetState, nodefault};
	
__published:
	__property __int64 Address = {read=FAddress, write=SetAddress, default=0};
	__property unsigned Timeout = {read=FTimeout, write=SetTimeout, default=10000};
	__property TwclWiiRemoteAccelChangedEvent OnAccelChanged = {read=FOnAccelChanged, write=FOnAccelChanged};
	__property TwclWiiRemoteBalanceBoardChangedEvent OnBalanceBoardChanged = {read=FOnBalanceBoardChanged, write=FOnBalanceBoardChanged};
	__property TwclWiiRemoteButtonsChangedEvent OnButtonsChanged = {read=FOnButtonsChanged, write=FOnButtonsChanged};
	__property TwclWiiRemoteClassicControllerChangedEvent OnClassicControllerChanged = {read=FOnClassicControllerChanged, write=FOnClassicControllerChanged};
	__property Wclconnections::TwclClientConnectionConnectEvent OnConnect = {read=FOnConnect, write=FOnConnect};
	__property Wclconnections::TwclClientConnectionDisconnectEvent OnDisconnect = {read=FOnDisconnect, write=FOnDisconnect};
	__property TwclWiiRemoteDrumsChangedEvent OnDrumsChanged = {read=FOnDrumsChanged, write=FOnDrumsChanged};
	__property Classes::TNotifyEvent OnExtensionAttached = {read=FOnExtensionAttached, write=FOnExtensionAttached};
	__property Classes::TNotifyEvent OnExtensionDetached = {read=FOnExtensionDetached, write=FOnExtensionDetached};
	__property TwclWiiRemoteGuitarChangedEvent OnGuitarChanged = {read=FOnGuitarChanged, write=FOnGuitarChanged};
	__property TwclWiiRemoteIrChangedEvent OnIrChanged = {read=FOnIrChanged, write=FOnIrChanged};
	__property TwclWiiRemoteNunchukChangedEvent OnNunchukChanged = {read=FOnNunchukChanged, write=FOnNunchukChanged};
	__property TwclWiiRemoteStatusChangedEvent OnStatusChanged = {read=FOnStatusChanged, write=FOnStatusChanged};
};


class DELPHICLASS TwclBleSniffer;
class PASCALIMPLEMENTATION TwclBleSniffer : public Classes::TComponent 
{
	typedef Classes::TComponent inherited;
	
private:
	Byte FChannel;
	AnsiString FDevicePath;
	Wclsync::TwclManualResetEvent* FInitEvent;
	int FInitResult;
	Wclmessaging::TwclMessageProcessingMethod FMessageProcessing;
	Wclmessaging::TwclMessageReceiver* FReceiver;
	Wclsync::TwclManualResetEvent* FTermEvent;
	Wclsync::TwclThread* FThread;
	TwclBleSnifferAdvDirectIndReceivedEvent FOnAdvDirectIndReceived;
	TwclBleSnifferAdvIndReceivedEvent FOnAdvIndReceived;
	TwclBleSnifferAdvNonConnIndReceivedEvent FOnAdvNonConnIndReceived;
	TwclBleSnifferAdvScanIndReceivedEvent FOnAdvScanIndReceived;
	TwclBleSnifferConnectIndReceivedEvent FOnConnectIndReceived;
	TwclBleSnifferScanReqReceivedEvent FOnScanReqReceived;
	TwclBleSnifferScanRspReceivedEvent FOnScanRspReceived;
	TwclBleSnifferRawPacketReceivedEvent FOnRawPacketReceived;
	Classes::TNotifyEvent FOnStarted;
	Classes::TNotifyEvent FOnStopped;
	bool __fastcall GetActive(void);
	void __fastcall SetMessageProcessing(const Wclmessaging::TwclMessageProcessingMethod Value);
	AnsiString __fastcall FindDevice();
	__int64 __fastcall DecodeAddress(const void * Pdu, const Byte Ndx, const Byte Len);
	bool __fastcall ParseConnectIndPdu(const TwclBluetoothLeAdvertisingPduHeader &PduHeader, const void * Pdu, const Byte PduLen);
	bool __fastcall ParseSingleAddrAdvertisingPdu(const Byte Id, const TwclBluetoothLeAdvertisingPduHeader &PduHeader, const void * Pdu, const Byte PduLen);
	bool __fastcall ParseTwoAddrAdvertisingPdu(const Byte Id, const TwclBluetoothLeAdvertisingPduHeader &PduHeader, const void * Pdu, const Byte PduLen);
	bool __fastcall ParseAdvertisingPacket(const TwclBluetoothLePacketHeader &Header, const void * Payload, const Word Len);
	bool __fastcall ParseDataPacket(const TwclBluetoothLePacketHeader &Header, const void * Payload, const Word Len);
	void __fastcall ParsePacket(const void * Packet, const Word Size);
	void __fastcall SnifferThread(void);
	
protected:
	virtual void __fastcall MessageReceived(const Wclmessaging::TwclMessage* Message);
	virtual void __fastcall DoAdvDirectIndReceived(const TwclBluetoothLeAdvertisingPduHeader &PduHeader, const __int64 AdvA, const __int64 TargetA);
	virtual void __fastcall DoAdvIndReceived(const TwclBluetoothLeAdvertisingPduHeader &PduHeader, const __int64 AdvA, const void * AdvData, const Byte AdvDataLen);
	virtual void __fastcall DoAdvNonConnIndReceived(const TwclBluetoothLeAdvertisingPduHeader &PduHeader, const __int64 AdvA, const void * AdvData, const Byte AdvDataLen);
	virtual void __fastcall DoAdvScanIndReceived(const TwclBluetoothLeAdvertisingPduHeader &PduHeader, const __int64 AdvA, const void * AdvData, const Byte AdvDataLen);
	virtual void __fastcall DoConnectIndReceived(const TwclBluetoothLeAdvertisingPduHeader &PduHeader, const __int64 InitA, const __int64 AdvA, const TwclBleSnifferLlData &LlData);
	virtual void __fastcall DoScanReqReceived(const TwclBluetoothLeAdvertisingPduHeader &PduHeader, const __int64 ScanA, const __int64 AdvA);
	virtual void __fastcall DoScanRspReceived(const TwclBluetoothLeAdvertisingPduHeader &PduHeader, const __int64 AdvA, const void * ScanRspData, const Byte ScanRspDataLen);
	virtual void __fastcall DoRawPacketReceived(const TwclBluetoothLePacketHeader &Header, const void * Payload, const Word Size);
	virtual void __fastcall DoStarted(void);
	virtual void __fastcall DoStopped(void);
	
public:
	__fastcall virtual TwclBleSniffer(Classes::TComponent* AOwner);
	__fastcall virtual ~TwclBleSniffer(void);
	int __fastcall Start(const AnsiString DevicePath, const Byte Channel)/* overload */;
	int __fastcall Start(const Byte Channel)/* overload */;
	int __fastcall Stop(void);
	__property bool Active = {read=GetActive, nodefault};
	__property Byte Channel = {read=FChannel, nodefault};
	__property AnsiString DevicePath = {read=FDevicePath};
	
__published:
	__property Wclmessaging::TwclMessageProcessingMethod MessageProcessing = {read=FMessageProcessing, write=SetMessageProcessing, default=1};
	__property TwclBleSnifferAdvDirectIndReceivedEvent OnAdvDirectIndReceived = {read=FOnAdvDirectIndReceived, write=FOnAdvDirectIndReceived};
	__property TwclBleSnifferAdvIndReceivedEvent OnAdvIndReceived = {read=FOnAdvIndReceived, write=FOnAdvIndReceived};
	__property TwclBleSnifferAdvNonConnIndReceivedEvent OnAdvNonConnIndReceived = {read=FOnAdvNonConnIndReceived, write=FOnAdvNonConnIndReceived};
	__property TwclBleSnifferAdvScanIndReceivedEvent OnAdvScanIndReceived = {read=FOnAdvScanIndReceived, write=FOnAdvScanIndReceived};
	__property TwclBleSnifferConnectIndReceivedEvent OnConnectIndReceived = {read=FOnConnectIndReceived, write=FOnConnectIndReceived};
	__property TwclBleSnifferScanReqReceivedEvent OnScanReqReceived = {read=FOnScanReqReceived, write=FOnScanReqReceived};
	__property TwclBleSnifferScanRspReceivedEvent OnScanRspReceived = {read=FOnScanRspReceived, write=FOnScanRspReceived};
	__property TwclBleSnifferRawPacketReceivedEvent OnRawPacketReceived = {read=FOnRawPacketReceived, write=FOnRawPacketReceived};
	__property Classes::TNotifyEvent OnStarted = {read=FOnStarted, write=FOnStarted};
	__property Classes::TNotifyEvent OnStopped = {read=FOnStopped, write=FOnStopped};
};


//-- var, const, procedure ---------------------------------------------------
extern PACKAGE bool __fastcall wclGattCompareUuid(const TwclGattUuid &u1, const TwclGattUuid &u2)/* overload */;
extern PACKAGE TwclGattUuid __fastcall wclGattMakeUuid(const Word Uuid)/* overload */;
extern PACKAGE TwclGattUuid __fastcall wclGattMakeUuid(const GUID &Uuid)/* overload */;

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

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