Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > DoxygenfbtHciLocal.h
Go to the documentation of this file.
00001 #ifndef _LOCAL_HCI_H_ 00002 #define _LOCAL_HCI_H_ 00003 00004 #include "fbtHci.h" 00005 00006 #define MAX_QUEUED_COMMANDS 100 00007 00008 typedef struct _QueuedCommand 00009 { 00010 USHORT nCommand; 00011 BYTE *pResultBuffer; 00012 DWORD dwBufferSize; 00013 HANDLE hEvent; 00014 00015 } QueuedCommand, *PQueuedCommand; 00016 00017 // Local HCI command abstraction 00018 // 1. Send Command 00019 // 2. Wait for Command status / Command complete 00020 class CHciLocal : public CHci 00021 { 00022 public: 00023 CHciLocal(void); 00024 virtual ~CHciLocal(void); 00025 00026 virtual int QueueCommand(USHORT nCommand, BYTE *pResultBuffer=NULL, DWORD dwBufferSize=0); 00027 virtual int QueueCommandStatus(USHORT nCommand); 00028 virtual void DeQueueCommand(int nSlot); 00029 virtual DWORD ClearQueue(void); 00030 virtual PQueuedCommand GetQueuedCommand(int nSlot); 00031 00032 virtual DWORD WaitForCommandComplete(int nSlot); 00033 virtual DWORD WaitForCommandStatus(int nSlot, BYTE &nStatus); 00034 00035 virtual DWORD SendReset(void); 00036 virtual DWORD SendWriteClassOfDevice(BYTE ClassOfDevice[FBT_HCI_DEVICE_CLASS_SIZE]); 00037 virtual DWORD SendSetEventFilter( 00038 BYTE nFilterType, 00039 BYTE nFilterConditionType, 00040 BYTE nCondition[FBT_HCI_MAX_CONDITION_SIZE], 00041 BYTE nConditionBytes); 00042 00043 virtual DWORD SendInquiry(ULONG nLAP, BYTE nInquiryLength, BYTE nNumResponses); 00044 virtual DWORD SendInquiryCancel(void); 00045 virtual DWORD SendCreateConnection(BYTE BD_ADDR[FBT_HCI_BDADDR_SIZE], 00046 USHORT nPacketType, 00047 BYTE nPageScanRepetitionMode, 00048 BYTE nPageScanMode, 00049 USHORT nClockOffset, 00050 BYTE nAllowRoleSwitch); 00051 00052 virtual DWORD SendDisconnect(USHORT nConnectionHandle, BYTE nReason); 00053 virtual DWORD SendSwitchRole(BYTE BD_ADDR[FBT_HCI_BDADDR_SIZE], BYTE nRole); 00054 virtual DWORD SendRemoteNameRequest(BYTE BD_ADDR[FBT_HCI_BDADDR_SIZE], BYTE nPageScanRepetitionMode, BYTE nPageScanMode, USHORT nClockOffset); 00055 virtual DWORD SendReadLocalVersionInformation(FBT_HCI_READ_LOCAL_VERSION_INFORMATION_COMPLETE &CommandComplete); 00056 00057 virtual DWORD OnEvent(PFBT_HCI_EVENT_HEADER pEvent, DWORD dwLength); 00058 00059 virtual DWORD CommandCompleteHandler(USHORT nCommand, BYTE *pParameters, DWORD dwParameterLength); 00060 virtual DWORD CommandStatusHandler(BYTE nStatus, USHORT nCommand); 00061 00062 protected: 00063 virtual int FindCommandSlot(USHORT nCommand); 00064 00065 QueuedCommand m_QueuedCommands[MAX_QUEUED_COMMANDS]; 00066 CRITICAL_SECTION m_QueueCriticalSection; 00067 00068 }; 00069 00070 00071 #endif // _LOCAL_HCI_H_ Generated on Sun May 27 2012 04:27:14 for ReactOS by
1.7.6.1
|