1 #ifndef _ROUND_TRIP_HCI_H_
2 #define _ROUND_TRIP_HCI_H_
3 
4 #include "fbtHciLocal.h"
5 
6 // Complete round trip HCI abstraction
7 // 1. Send Command
8 // 2. Wait for Command status / Command complete
9 // 3. Wait fo event
10 class CHciRoundTrip : public CHciLocal
11 {
12 public:
13 
14 	CHciRoundTrip();
15 	virtual ~CHciRoundTrip();
16 
17 	virtual DWORD QueueEvent(BYTE EventCode, LPVOID pParameters, DWORD dwParameterLength);
18 	virtual DWORD WaitForEvent();
19 
20     virtual DWORD OnEvent(PFBT_HCI_EVENT_HEADER pEvent, DWORD Length);
21 
22 	virtual DWORD ReadBDADDR(BYTE *BDADDR);
23 	virtual DWORD ReadClassOfDevice(BYTE *ClassOfDevice);
24     virtual DWORD ReadLocalName(BYTE *Name);
25     virtual DWORD CreateConnection(BYTE  BD_ADDR[FBT_HCI_BDADDR_SIZE],
26 								   USHORT PacketType,
27 								   BYTE  PageScanRepetitionMode,
28 								   BYTE  PageScanMode,
29 								   USHORT ClockOffset,
30 								   BYTE  AllowRoleSwitch,
31 								   USHORT &ConnectionHandle);
32 
33 	virtual DWORD Disconnect(USHORT ConnectionHandler, BYTE Reason);
34 	virtual DWORD SwitchRole(BYTE BD_ADDR[FBT_HCI_BDADDR_SIZE], BYTE Role);
35     virtual DWORD RemoteNameRequest(BYTE BD_ADDR[FBT_HCI_BDADDR_SIZE],
36     								BYTE PageScanRepetitionMode,
37     								BYTE PageScanMode,
38     								USHORT ClockOffset,
39     								BYTE Name[FBT_HCI_NAME_SIZE]);
40 
41 protected:
42 	BYTE	m_PendingEvent;
43 	LPVOID	m_pEventParameters;
44 	DWORD	m_dwEventParameterLength;
45 
46 	HANDLE	m_hEventSignal;
47 
48 };
49 
50 
51 #endif // _ROUND_TRIP_HCI_H_
52