ReactOS  0.4.15-dev-1397-g19779b3
fbtHciLocal.h
Go to the documentation of this file.
1 #ifndef _LOCAL_HCI_H_
2 #define _LOCAL_HCI_H_
3 
4 #include "fbtHci.h"
5 
6 #define MAX_QUEUED_COMMANDS 100
7 
8 typedef struct _QueuedCommand
9 {
14 
16 
17 // Local HCI command abstraction
18 // 1. Send Command
19 // 2. Wait for Command status / Command complete
20 class CHciLocal : public CHci
21 {
22 public:
23  CHciLocal(void);
24  virtual ~CHciLocal(void);
25 
26  virtual int QueueCommand(USHORT nCommand, BYTE *pResultBuffer=NULL, DWORD dwBufferSize=0);
27  virtual int QueueCommandStatus(USHORT nCommand);
28  virtual void DeQueueCommand(int nSlot);
29  virtual DWORD ClearQueue(void);
30  virtual PQueuedCommand GetQueuedCommand(int nSlot);
31 
32  virtual DWORD WaitForCommandComplete(int nSlot);
33  virtual DWORD WaitForCommandStatus(int nSlot, BYTE &nStatus);
34 
35  virtual DWORD SendReset(void);
37  virtual DWORD SendSetEventFilter(
38  BYTE nFilterType,
39  BYTE nFilterConditionType,
40  BYTE nCondition[FBT_HCI_MAX_CONDITION_SIZE],
41  BYTE nConditionBytes);
42 
43  virtual DWORD SendInquiry(ULONG nLAP, BYTE nInquiryLength, BYTE nNumResponses);
44  virtual DWORD SendInquiryCancel(void);
46  USHORT nPacketType,
47  BYTE nPageScanRepetitionMode,
48  BYTE nPageScanMode,
49  USHORT nClockOffset,
50  BYTE nAllowRoleSwitch);
51 
52  virtual DWORD SendDisconnect(USHORT nConnectionHandle, BYTE nReason);
53  virtual DWORD SendSwitchRole(BYTE BD_ADDR[FBT_HCI_BDADDR_SIZE], BYTE nRole);
54  virtual DWORD SendRemoteNameRequest(BYTE BD_ADDR[FBT_HCI_BDADDR_SIZE], BYTE nPageScanRepetitionMode, BYTE nPageScanMode, USHORT nClockOffset);
56 
58 
59  virtual DWORD CommandCompleteHandler(USHORT nCommand, BYTE *pParameters, DWORD dwParameterLength);
60  virtual DWORD CommandStatusHandler(BYTE nStatus, USHORT nCommand);
61 
62 protected:
63  virtual int FindCommandSlot(USHORT nCommand);
64 
67 
68 };
69 
70 
71 #endif // _LOCAL_HCI_H_
virtual DWORD SendSetEventFilter(BYTE nFilterType, BYTE nFilterConditionType, BYTE nCondition[FBT_HCI_MAX_CONDITION_SIZE], BYTE nConditionBytes)
virtual DWORD WaitForCommandComplete(int nSlot)
virtual DWORD SendReset(void)
virtual ~CHciLocal(void)
BYTE * pResultBuffer
Definition: fbtHciLocal.h:11
CHciLocal(void)
virtual int QueueCommand(USHORT nCommand, BYTE *pResultBuffer=NULL, DWORD dwBufferSize=0)
QueuedCommand m_QueuedCommands[MAX_QUEUED_COMMANDS]
Definition: fbtHciLocal.h:65
Definition: fbthci.h:22
virtual DWORD WaitForCommandStatus(int nSlot, BYTE &nStatus)
#define FBT_HCI_MAX_CONDITION_SIZE
Definition: fbtHciSizes.h:19
virtual DWORD SendSwitchRole(BYTE BD_ADDR[FBT_HCI_BDADDR_SIZE], BYTE nRole)
CRITICAL_SECTION m_QueueCriticalSection
Definition: fbtHciLocal.h:66
virtual DWORD SendWriteClassOfDevice(BYTE ClassOfDevice[FBT_HCI_DEVICE_CLASS_SIZE])
#define FBT_HCI_BDADDR_SIZE
Definition: fbtHciSizes.h:13
USHORT nCommand
Definition: fbtHciLocal.h:10
static DWORD DWORD * dwLength
Definition: fusion.c:85
unsigned long DWORD
Definition: ntddk_ex.h:95
virtual DWORD ClearQueue(void)
virtual DWORD OnEvent(PFBT_HCI_EVENT_HEADER pEvent, DWORD dwLength)
#define MAX_QUEUED_COMMANDS
Definition: fbtHciLocal.h:6
virtual DWORD SendReadLocalVersionInformation(void)
struct _QueuedCommand QueuedCommand
unsigned char BYTE
Definition: xxhash.c:193
virtual DWORD SendCreateConnection(BYTE BD_ADDR[FBT_HCI_BDADDR_SIZE], USHORT nPacketType, BYTE nPageScanRepetitionMode, BYTE nPageScanMode, USHORT nClockOffset, BYTE nAllowRoleSwitch)
DWORD dwBufferSize
Definition: fbtHciLocal.h:12
virtual DWORD SendInquiryCancel(void)
virtual void DeQueueCommand(int nSlot)
unsigned short USHORT
Definition: pedump.c:61
virtual PQueuedCommand GetQueuedCommand(int nSlot)
virtual DWORD SendRemoteNameRequest(BYTE BD_ADDR[FBT_HCI_BDADDR_SIZE], BYTE nPageScanRepetitionMode, BYTE nPageScanMode, USHORT nClockOffset)
#define NULL
Definition: types.h:112
#define FBT_HCI_DEVICE_CLASS_SIZE
Definition: fbtHciSizes.h:16
virtual DWORD CommandStatusHandler(BYTE nStatus, USHORT nCommand)
struct _QueuedCommand * PQueuedCommand
virtual DWORD CommandCompleteHandler(USHORT nCommand, BYTE *pParameters, DWORD dwParameterLength)
unsigned int ULONG
Definition: retypes.h:1
virtual DWORD SendInquiry(ULONG nLAP, BYTE nInquiryLength, BYTE nNumResponses)
virtual DWORD SendDisconnect(USHORT nConnectionHandle, BYTE nReason)
virtual int QueueCommandStatus(USHORT nCommand)
virtual int FindCommandSlot(USHORT nCommand)