williamr@2: // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@2: // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members williamr@2: // which accompanies this distribution, and is available williamr@2: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // This is the API that the bluetooth stack expects from the HCI layer. williamr@2: // It comprises an event notification interface and a command sending interface. williamr@2: // Implementations of the HCI must derive from CHCIBase. williamr@2: // williamr@2: // williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @file williamr@2: @publishedPartner williamr@2: @released williamr@2: */ williamr@2: williamr@2: #ifndef BT_HCIBASE_H_ williamr@2: #define BT_HCIBASE_H_ williamr@2: williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: williamr@2: class CHCICommandFrame; williamr@2: class CHCIACLDataFrame; williamr@2: class CHCISCODataFrame; williamr@2: class CHCIBase; williamr@2: class MHCIEventObserver; williamr@2: class CESockIniData; williamr@2: williamr@2: /** Factory for creating CHCIBase derived class. williamr@2: williamr@2: To provide a new HCI implementation, re-implement this williamr@2: class in a DLL, which has a factory fucntion at oridnal 1 williamr@2: which returns a TAny* to the instance of this factory. williamr@2: NewHCIL() will then be called on the factory to actually williamr@2: create the CHCIBase derived object. williamr@2: williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: NONSHARABLE_CLASS(CHCIFactory) : public CBase williamr@2: { williamr@2: public: williamr@2: CHCIFactory(); williamr@2: virtual TVersion Version() const; williamr@2: virtual CHCIBase* NewHCIL(MHCIEventObserver* aParent, CESockIniData* aIni=0); williamr@2: virtual CHCICommandFrame* NewHCICommandFrameL(THCIOpcode aOpcode); williamr@2: virtual CHCIACLDataFrame* NewHCIACLDataFrameL(TUint16 aSize); williamr@2: virtual CHCISCODataFrame* NewHCISCODataFrameL(TUint8 aSize); williamr@2: }; williamr@2: williamr@2: williamr@2: /** Abstract HCI Interface class. williamr@2: williamr@2: The Symbian Bluetooth stack uses this abstract class as the williamr@2: polymorphic base through which it obtains host controller williamr@2: access. The actual implementation is dependent on the DLL williamr@2: loaded at run-time, as specified in the bt.bt.esk file. williamr@2: The concrete class derived from this should be returned williamr@2: by the CHCIFactory class, located through ordinal 1 in the williamr@2: polymorphic DLL. williamr@2: williamr@2: @publishedPartner williamr@2: @released williamr@2: @see williamr@2: CHCI for detailed description of the functions. williamr@2: MHCIEventObserver for the callback interface for events received over HCI. williamr@2: */ williamr@2: NONSHARABLE_CLASS(CHCIBase) : public CBase williamr@2: { williamr@2: public: williamr@2: williamr@2: /** Writes command frame. williamr@2: williamr@2: @param aFrame command frame to write williamr@2: @return KErrBcspWriteCommandDataFailed on failure, KErrNone otherwise williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual TInt WriteCommand(const CHCICommandFrame& aFrame)=0; williamr@2: williamr@2: // HCI General exports williamr@2: /** Sets option. williamr@2: williamr@2: @param aName option to set williamr@2: @param aData option value williamr@2: @return System wide error code williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual TInt SetOption(TUint aName,const TDesC8& aData)=0; williamr@2: williamr@2: /** Gets option. williamr@2: williamr@2: @param aName option to set williamr@2: @param aData desriptor to be filled with option data williamr@2: @return System wide error code williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual TInt GetOption(TUint aName,TDes8& aData)=0; williamr@2: williamr@2: // HCI Data Calls williamr@2: /** Formats ACL Data. williamr@2: williamr@2: @param aFrame Reference to CHCIACLDataFrame which will be formatted with the data supplied in the other params williamr@2: @param aConnH Connection handle for this frame williamr@2: @param aFlags Flags to be set for this frame williamr@2: @param aData Data for this frame williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void FormatACLData(CHCIACLDataFrame& aFrame, THCIConnHandle aConnH,TUint8 aFlags,const TDesC8& aData)=0; williamr@2: williamr@2: /** Formats SCO Data. williamr@2: williamr@2: @param aFrame Reference to CHCISCODataFrame which will be formatted with the data supplied in the other params williamr@2: @param aConnH Connection handle for this frame williamr@2: @param aData Data for this frame williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void FormatSCOData(CHCISCODataFrame& aFrame, THCIConnHandle aConnH, const TDesC8& aData)=0; williamr@2: williamr@2: /** Writes ACL Data. williamr@2: williamr@2: This forwards a write from link layer to host controller. The descriptor in the frame is owned by the link layer. williamr@2: williamr@2: @param aFrame the formatted ACL payload from the linkmanager williamr@2: @return System wide error code williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual TInt WriteACLData(const CHCIACLDataFrame& aFrame)=0; williamr@2: williamr@2: /** Writes SCO Data. williamr@2: williamr@2: This forwards a write from link layer to host controller. The descriptor in the frame is owned by the link layer. williamr@2: williamr@2: @param aFrame the formatted SCO payload from the linkmanager williamr@2: @return System wide error code williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual TInt WriteSCOData(const CHCISCODataFrame& aFrame)=0; williamr@2: williamr@2: // HCI Frame information commands williamr@2: /** Gets frame connection handle williamr@2: williamr@2: @param aFrame the frame to return the connection handle of williamr@2: @return the connection handle from aFrame williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual THCIConnHandle FrameConnectionHandle(const CHCIACLDataFrame& aFrame) const =0; williamr@2: williamr@2: /** Gets frame opcode. williamr@2: williamr@2: @param aFrame the frame to return the opcode of williamr@2: @return the opcode of aFrame williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual THCIOpcode FrameOpcode(const CHCICommandFrame& aFrame) const =0; williamr@2: williamr@2: // HCI Commands williamr@2: /** Commands the host controller to start looking for remote devices within range. williamr@2: williamr@2: The HCI client should not issue a second Inquiry() before the first has williamr@2: completed, because the HC cannot cope with this and will return a williamr@2: COMMAND_DISALLOWED error williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aCode InquiryAccessCode (3 bytes) williamr@2: @param aLength InquiryLength N where N * 1.28s is the no. of seconds for inquiry williamr@2: @param aNumResponses Number of responses from inquiry before it is halted - default 0 is unlimited number of responses. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void Inquiry(CHCICommandFrame& aFrame, const TUint aCode=KGIAC, const TUint8 aLength=10, const TUint8 aNumResponses=0)=0; williamr@2: williamr@2: /** Cancels an ongoing inquiry. williamr@2: williamr@2: @param aFrame frame to apply any necessary formatting to for inquiry cancel. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void InquiryCancel(CHCICommandFrame& aFrame)=0; williamr@2: williamr@2: /** Commands the host controller to enter periodic enquiry mode williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aMax MaxPeriodLength. The HC chooses a value between aMax and aMin. williamr@2: @param aMin MinPeriodLength williamr@2: @param aCode InquiryAccessCode (3 bytes) williamr@2: @param aLength InquiryLength (default N=2) williamr@2: @param aNumResponses Number of Responses (default=0) williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void PeriodicInquiryMode(CHCICommandFrame& aFrame, TUint16 aMax,TUint16 aMin, const TUint aCode=0,const TUint8 aLength=2,const TUint8 aNumResponses=0)=0; williamr@2: williamr@2: /** Exits the periodic inquiry. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ExitPeriodicInquiryMode(CHCICommandFrame& aFrame)=0; williamr@2: williamr@2: /** Initiates connection to remote device using the specified baseband packet type. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aBdaddr remove device address williamr@2: @param aPacketType Packet Type williamr@2: @param aPageScanRepetitionMode pages scan repetition mode williamr@2: @param aPageScanMode page scan mode williamr@2: @param aClockOffset Offset between local and remote clock williamr@2: @param aAllowRoleSwitch Whether the remote device is allowed to role switch the local device williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void CreateConnection(CHCICommandFrame& aFrame, const TBTDevAddr& aBdaddr, williamr@2: TUint16 aPacketType=KDM1Packet, TUint8 aPageScanRepetitionMode=0, williamr@2: TUint8 aPageScanMode=0, TUint16 aClockOffset=0, TUint8 aAllowRoleSwitch=1)=0; williamr@2: williamr@2: /** Add an SCO connection between the Host Controller and the remote device. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aConnHandle Connection handle williamr@2: @param aPacketType Packet Type williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void AddSCOConnection(CHCICommandFrame& aFrame, THCIConnHandle aConnHandle,TUint16 aPacketType)=0; williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: Adds a new or modifies an existing synchronous logical transport (SCO or eSCO) williamr@2: @param aFrame The HCI frame to format williamr@2: @param aConnHandle Connection handle (2 bytes) williamr@2: @param aTransmitBandwidth (4 bytes) williamr@2: @param aReceiveBandwidth (4 bytes) williamr@2: @param aMaxLatency (2 bytes) williamr@2: @param aVoiceSettings (2 bytes) williamr@2: @param aRetransmissionEffort (1 bytes) williamr@2: @param aPacketType (2 bytes) williamr@2: */ williamr@2: virtual void SetupSynchronousConnectionCommand(CHCICommandFrame& aFrame, TUint16 aConnHandle, williamr@2: TUint aTransmitBandwidth, TUint aReceiveBandwidth, TUint16 aMaxLatency, williamr@2: TUint16 aVoiceSettings, TUint8 aRetransmissionEffort, williamr@2: TUint16 aPacketType)=0; williamr@2: williamr@2: /** williamr@2: Accepts an incoming connection request for an synchronous connection. williamr@2: @param aFrame The HCI frame to format williamr@2: @param aBdaddr BDADDR (6 bytes) williamr@2: @param aTransmitBandwidth (4 bytes) williamr@2: @param aReceiveBandwidth (4 bytes) williamr@2: @param aMaxLatency (2 bytes) williamr@2: @param aContentFormat (2 bytes) williamr@2: @param aRetransmissionEffort (1 bytes) williamr@2: @param aPacketType (2 bytes) williamr@2: */ williamr@2: virtual void AcceptSynchronousConnectionRequestCommand(CHCICommandFrame& aFrame, const TBTDevAddr& aBdaddr, williamr@2: TUint aTransmitBandwidth, TUint aReceiveBandwidth, TUint16 aMaxLatency, williamr@2: TUint16 aContentFormat, TUint8 aRetransmissionEffort, TUint16 aPacketType)=0; williamr@2: /** williamr@2: Rejects the synchronous connction from thre remote device (aBdaddr). williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aBdaddr BDADDR williamr@2: @param THCIErrorCode Reject reason williamr@2: */ williamr@2: virtual void RejectSynchronousConnectionRequestCommand(CHCICommandFrame& aFrame, const TBTDevAddr& aBdaddr,THCIErrorCode aReason)=0; williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: /** Accepts an incoming connection request. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aBdaddr bluetooth address of remote device williamr@2: @param aRole Role - 0x00=Master, 0x01=Slave. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void AcceptConnectionRequest(CHCICommandFrame& aFrame, const TBTDevAddr& aBdaddr,TUint8 aRole)=0; williamr@2: williamr@2: /** Rejects the connection from the remote device. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aBdaddr Bluetooth address of remote device williamr@2: @param THCIErrorCode Reject reason williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void RejectConnectionRequest(CHCICommandFrame& aFrame, const TBTDevAddr& aBdaddr,THCIErrorCode aReason)=0; williamr@2: williamr@2: /** Replies to the remote host with the supplied link key. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aBdaddr bluetooth address of remote device williamr@2: @param aLinkKey Link key (16 bytes) williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void LinkKeyRequestReply(CHCICommandFrame& aFrame, const TBTDevAddr& aBdaddr,const TDesC8& aLinkKey)=0; williamr@2: williamr@2: /** Notifies the remote host that the link key was not accepted. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aBdaddr Bluetooth address of remote device williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void LinkKeyRequestNegativeReply(CHCICommandFrame& aFrame, const TBTDevAddr& aBdaddr)=0; williamr@2: williamr@2: /** Returns to the remote host the requested PIN. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aBdaddr Bluetooth address of remote device williamr@2: @param aPIN PIN Code (up to 16 bytes) williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void PINCodeRequestReply(CHCICommandFrame& aFrame, const TBTDevAddr& aBdaddr,const TDesC8& aPIN)=0; williamr@2: williamr@2: /** Notifies the remote host that the PIN code was rejected. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aBdaddr Bluetooth address of remote device williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void PINCodeRequestNegativeReply(CHCICommandFrame& aFrame, const TBTDevAddr& aBdaddr)=0; williamr@2: williamr@2: /** Disconnect the ACL or SCO connection corresponding to the supplied handle. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aConnHandle Handle of connection to disconnect williamr@2: @param aReason Reason for disconnection williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void Disconnect(CHCICommandFrame& aFrame, THCIConnHandle aConnHandle,THCIErrorCode aReason)=0; williamr@2: williamr@2: /** Changes baseband packet type (e.g DH1, DM3 etc.). williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aConnHandle Connection Handle williamr@2: @param aType Packet Type. This should be one of the consts defined in hcibase.h e.g. KDM1Packet. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ChangeConnectionPacketType(CHCICommandFrame& aFrame, THCIConnHandle aConnHandle,TUint16 aType)=0; williamr@2: williamr@2: /** Perform authenticaction request. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aConnHandle Connection Handle williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void AuthenticationRequest(CHCICommandFrame& aFrame, THCIConnHandle aConnHandle)=0; williamr@2: williamr@2: /** Sets connection encryption williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aConnHandle Connection Handle williamr@2: @param aEnable Enable flag ETrue=Enable link encryption, EFalse=Disable link encryption williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void SetEncryptionEnable(CHCICommandFrame& aFrame, THCIConnHandle aConnHandle,TBool aEnable)=0; williamr@2: williamr@2: /** Notifies host of need to change connection key for the supplied connection handle. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aConnHandle Connection Handle williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ChangeConnectionLinkKey(CHCICommandFrame& aFrame, THCIConnHandle aConnHandle)=0; williamr@2: williamr@2: /** Not used. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aKeyFlag Link Key Flag. Possible values are ETrue to use temporary link key or EFalse to use regular link key williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void MasterLinkKey(CHCICommandFrame& aFrame, TBool aKeyFlag)=0; williamr@2: williamr@2: /** Retrieves the remote hosts advertised hardware/firmware features. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aConnHandle Connection Handle williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadRemoteSupportedFeatures(CHCICommandFrame& aFrame, THCIConnHandle aConnHandle)=0; williamr@2: williamr@2: /** Retrieve remote hosts HW/Firmware revision information. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aConnHandle Connection Handle williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadRemoteVersionInfo(CHCICommandFrame& aFrame, THCIConnHandle aConnHandle)=0; williamr@2: williamr@2: /** Request on human redable name of remote host. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aBdaddr The bluetooth address of device on which we seek to find a name williamr@2: @param aPageScanRepetitionMode Page scan repetition mode williamr@2: @param aPageScanMode Page scan mode williamr@2: @param aClockOffset Offset of remote device clock from local device clock williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void RemoteNameRequest(CHCICommandFrame& aFrame, const TBTDevAddr& aBdaddr, TUint8 aPageScanRepetitionMode=0, williamr@2: TUint8 aPageScanMode=0, TBasebandTime aClockOffset=0)=0; williamr@2: williamr@2: /** Retrieve offset of remote clock from local clock. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aConnHandle Connection Handle williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadClockOffset(CHCICommandFrame& aFrame, THCIConnHandle aConnHandle)=0; williamr@2: williamr@2: // HCI Link Policy Commands williamr@2: /** Write local link policy settings williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aConnHandle Connection Handle williamr@2: @param aSettings @see Bluetooth HCI specification williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void WriteLinkPolicySettings(CHCICommandFrame& aFrame, THCIConnHandle aConnHandle, TUint16 aSettings)=0; williamr@2: williamr@2: /** Switch radio and host controller to Hold mode. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aConnHandle Connection Handle williamr@2: @param aHoldMaxInterval Max Hold Interval N, where Time of Hold=N*0.625ms (1 baseband slot) williamr@2: @param aHoldMinInterval Min Hold interval N, as above (both up to 40.9 sec) williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void HoldMode(CHCICommandFrame& aFrame, THCIConnHandle aConnHandle, TBasebandTime aHoldMaxInterval, williamr@2: TBasebandTime aHoldMinInterval)=0; williamr@2: williamr@2: /** Switch radio and host controller to Sniff mode. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aConnHandle Connection Handle williamr@2: @param aSniffMaxInterval Max Sniff length (Max number of acceptable slots in a sniff period) N, where the interval (time between sniffs)=N*0.625ms (1 baseband slot) williamr@2: @param aSniffMinInterval Min Sniff interval , as above williamr@2: @param aAttemptSlots Sniff Attempt - the period the slave will listen after each sniff interval williamr@2: @param aTimeOutSlots Sniff Timeout - time listening for packets as long as some arrive williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void SniffMode(CHCICommandFrame& aFrame, THCIConnHandle aConnHandle,TBasebandTime aSniffMaxInterval,TBasebandTime williamr@2: aSniffMinInterval, TBasebandTime aAttempSlots, TBasebandTime aTimeOutSlots)=0; williamr@2: williamr@2: /** Switch radio and host out of the Sniff mode. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aConnHandle Connection Handle williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ExitSniffMode(CHCICommandFrame& aFrame, THCIConnHandle aConnHandle)=0; williamr@2: williamr@2: /** Switch radio and host controller to the Park mode. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aConnHandle Connection Handle williamr@2: @param aBeaconMax Beacon Max Interval Length N where interval between beacons=N*0.625ms williamr@2: @param aBeaconMin Beacon Min Interval Length N where interval between beacons=N*0.625ms williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ParkMode(CHCICommandFrame& aFrame, THCIConnHandle aConnHandle, TBasebandTime aBeaconMaxInterval, williamr@2: TBasebandTime aBeaconMinInterval)=0; williamr@2: williamr@2: /** Switch radio and host controller off the Park mode. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aConnHandle Connection Handle williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ExitParkMode(CHCICommandFrame& aFrame, THCIConnHandle aConnHandle)=0; williamr@2: williamr@2: /** Initiate role discovery for the supplied connection handle. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aConnHandle Connection Handle williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void RoleDiscovery(CHCICommandFrame& aFrame, THCIConnHandle aConnHandle)=0; williamr@2: williamr@2: /** Switch current role (master / slave) for the physical link associated with the bluetooth device address provided. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aRole New role williamr@2: @param aAddr Bluetooth device address of remote device williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void SwitchRole(CHCICommandFrame& aFrame, TBTBasebandRole aRole, const TBTDevAddr& aAddr)=0; williamr@2: williamr@2: williamr@2: // HCI Host Controller and Baseband Commands williamr@2: /** Sets the mask for the reception or the filtering-out of HCI events from the host controller. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aMask Event Mask williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void SetEventMask(CHCICommandFrame& aFrame, const THCIEventMask& aMask)=0; williamr@2: williamr@2: /** Resets the Host Controller hardware state. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void Reset(CHCICommandFrame& aFrame)=0; williamr@2: williamr@2: /** Set the filter mask for remotely initiated events. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aData Denotes the filter 'category' and its particular properties as such its 'category'/type may be EClearAllFilters, EInquiryResultFilter or EConnectionSetupFilter. Then its condition type (aData.iConditionType) can be as defined in the spec williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void SetEventFilter(CHCICommandFrame& aFrame, const THCIEventCondition& aData)=0; williamr@2: williamr@2: /** Flush buffers corresponding to the supplied connection handle. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aConnHandle Connection Handle williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void Flush(CHCICommandFrame& aFrame, THCIConnHandle aConnHandle)=0; williamr@2: williamr@2: /** Creates a new unit key in the host controller. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void CreateNewUnitKey(CHCICommandFrame& aFrame)=0; williamr@2: williamr@2: /** Reads out from the host controller the stored link key for given device address williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aBdaddr Bluetooth device address to read the link key for. williamr@2: @param aFlag Read all keys flag williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadStoredLinkKey(CHCICommandFrame& aFrame, const TBTDevAddr& aBdaddr,THCIReadAllKeysFlag aFlag)=0; williamr@2: williamr@2: /** Writes a Link Key to the Host Controllers volatile storage memory. You can write as many keys as you want to storage - this function just does one at a time. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aNumOfKeysToWrite Number of keys to write to storage williamr@2: @param aBdaddr Bluetooth device address for the associated link key williamr@2: @param aLinkKey The Link Key williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void WriteStoredLinkKey(CHCICommandFrame& aFrame, /*TUint8 aNumOfKeysToWrite,*/ williamr@2: const TBTDevAddr& aBdaddr,const TDesC8& aLinkKey)=0; williamr@2: williamr@2: /** Delete the link key stored in the host controller's volatile storage. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aBdaddr Bluetooth device address associated with the link key to delete. williamr@2: @param aFlag Delete options flag williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void DeleteStoredLinkKey(CHCICommandFrame& aFrame, const TBTDevAddr& aBdaddr,THCIDeleteAllKeysFlag aFlag)=0; williamr@2: williamr@2: /** Sets the local Bluetooth device name. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aName Local device name (max 248 characters as defined in bluetooth specification). williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ChangeLocalName(CHCICommandFrame& aFrame, const TDesC8& aName)=0; williamr@2: williamr@2: /** Reads out the stored local Bluetooth device name. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadLocalName(CHCICommandFrame& aFrame)=0; williamr@2: williamr@2: /** Reads out of the Bluetooth device the connection accept timeout, for incoming connections. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadConnectionAcceptTimeout(CHCICommandFrame& aFrame)=0; williamr@2: williamr@2: /** Sets the connection accept timeout in the host controller. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aTimeout The connection timeout williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void WriteConnectionAcceptTimeout(CHCICommandFrame& aFrame, TBasebandTime aTimeout)=0; williamr@2: williamr@2: /** Commands the Bluetooth hardware to respond with its Page Timeout. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadPageTimeout(CHCICommandFrame& aFrame)=0; williamr@2: williamr@2: /** Sets the page timeout in the host controller. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aTimeout Page Timeout. This must be between KMaxPageTimeout and KMinPageTimeout. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void WritePageTimeout(CHCICommandFrame& aFrame, TBasebandTime aTimeout)=0; williamr@2: williamr@2: /** Read out of the host controller the scan options. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadScanEnable(CHCICommandFrame& aFrame)=0; williamr@2: williamr@2: /** Sets the scan options on the host controller. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aScanEnable Scan enable options williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void WriteScanEnable(CHCICommandFrame& aFrame, THCIScanEnable aEnable=EInquiryAndPageScan)=0; williamr@2: williamr@2: /** Read out of the host controller the number of supported inquiry access codes. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadNumberOfSupportedIAC(CHCICommandFrame& aFrame)=0; williamr@2: williamr@2: /** Write to the host controller the lower address parts supplied. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aNumCurrentIAC The number of inquiry access code lower address parts being sent to the hardware williamr@2: @param aIAC_LAP The inquiry access code lower address parts - 3 bytes each: e.g: GIACLAP=0x9e8b33, LIACLAP=0x9e8b00 williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void WriteCurrentIACLAP(CHCICommandFrame& aFrame, TUint8 aNumCurrentIAC, TUint aIAC_LAP[])=0; williamr@2: williamr@2: /** Read out the inquiry access code lower address parts. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadCurrentIACLAP(CHCICommandFrame& aFrame)=0; williamr@2: williamr@2: /** Read out from the host controller whether authentication is enabled. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadAuthenticationEnable(CHCICommandFrame& aFrame)=0; williamr@2: williamr@2: /** Set/Unset authentication. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aAuthEnable Authentication Enable. Possible values are EFalse for authentication disabled or ETrue for authentication enabled williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void WriteAuthenticationEnable(CHCICommandFrame& aFrame, TBool aAuthEnable)=0; williamr@2: williamr@2: /** Read out the encryption mode. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadEncryptionMode(CHCICommandFrame& aFrame)=0; williamr@2: williamr@2: /** Set/unset the encryption. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aFlag Whether to enable encryption. Possible values are EFalse to disable encryption or ETrue to enable encryption. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void WriteEncryptionMode(CHCICommandFrame& aFrame, THCIEncryptModeFlag aFlag)=0; williamr@2: williamr@2: /** Reads out the class of device of the local Bluetooth device. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadClassOfDevice(CHCICommandFrame& aFrame)=0; williamr@2: williamr@2: /** Sets the local Bluetooth class of device. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aCoD Class Of Device williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void WriteClassOfDevice(CHCICommandFrame& aFrame, TUint aCoD)=0; williamr@2: williamr@2: /** Read the Bluetooth hardware voice settings. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadVoiceSetting(CHCICommandFrame& aFrame)=0; williamr@2: williamr@2: /** Set the local Bluetooth device voice settings. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aVoiceChannelSetting Voice channel settings as defined by the HCI specification. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void WriteVoiceSetting(CHCICommandFrame& aFrame, TInt16 aVoiceChannelSetting)=0; williamr@2: williamr@2: // HCI Informational Parameters Commands williamr@2: /** Retrieve local hardware/firmware revision info. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadLocalVersionInformation(CHCICommandFrame& aFrame)=0; williamr@2: williamr@2: /** Retrieve local hardware/firmware capabilities. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadLocalSupportedFeatures(CHCICommandFrame& aFrame)=0; williamr@2: williamr@2: /** Retrieve from the host controller its buffering capabilities. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadBufferSize(CHCICommandFrame& aFrame)=0; williamr@2: williamr@2: /** Retrieve the hardware's intended country code (for security/encryption issues). williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadCountryCode(CHCICommandFrame& aFrame)=0; williamr@2: williamr@2: /** Retrieve local Bluetooth device address. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadBDADDR(CHCICommandFrame& aFrame)=0; williamr@2: williamr@2: // Host Controller to Host Data Flow Control williamr@2: /** Set/unset notification of delivery of packets, from the host controller to the host. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aFlowFlag Flow Control Enable flag williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void SetHostControllerToHostFlowControl(CHCICommandFrame& aFrame, TBool aHC2HFlowFlag)=0;// may return KErrNoMemory williamr@2: williamr@2: /** Notification to host controller of the number of packets that the above williamr@2: layers (L2CAP) have consumed. HostNumberOfCompletedPackets command to be williamr@2: issued by L2CAP. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aNumHandles Number of connectionhandles williamr@2: @param aConnH Connection handle williamr@2: @param aCompletedPacketsNo Host num of completed packets williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void HostNumberOfCompletedPackets(CHCICommandFrame& aFrame, TUint8 aNumHandles, THCIConnHandle aConnH[], TUint16 aCompletedPacketsNo[])=0; williamr@2: williamr@2: /** Notifies the host controller of the hosts buffering capabilities. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aACLDataLength Host's ACL Data Packet Length williamr@2: @param aSCODataLength Host's SCO Data Packet Length williamr@2: @param aTotalACLPackets Total Number of ACL Data Packets that the Host can handle williamr@2: @param aTotalSCOPackets Total Number of SCO Data Packets that the Host can handle williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void HostBufferSize(CHCICommandFrame& aFrame, TUint16 aACLDataLength,TUint8 aSCODataLength, williamr@2: TUint16 aTotalACLPackets, TUint16 aTotalSCOPackets)=0; williamr@2: williamr@2: /** Writes link supervision timeout. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aConnH Connection handle williamr@2: @param aTimeout Timeout to write williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void WriteLinkSupervisionTimeout(CHCICommandFrame& aFrame, THCIConnHandle aConnH, TBasebandTime aTimeout)=0; williamr@2: williamr@2: /** This call allows for a raw HCI command frame to be written to the HC. williamr@2: williamr@2: This is intended for vendor specific commands for which the opcode williamr@2: field will be known to the HCI. williamr@2: williamr@2: These raw frames should be constructed by calling the HCI factory williamr@2: function with the opcode constructed of the vendor debug opcode group field williamr@2: and the particular OCF required. This function should then be called with the williamr@2: appropriately formatted parameters which shall be placed into the frame's williamr@2: payload. It should be noted that the client need NOT to be concerned williamr@2: with the HCTL framing at all. williamr@2: williamr@2: The HCI will only then copy this frame to the host controller after putting williamr@2: it in an HCTL frame. williamr@2: williamr@2: Note that the client is responsible for policing the size of the descriptor williamr@2: passed to this function. The length should be: 0 <= n <= KHCIMaxCommandLength williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aData The frame parameters williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void WriteVendorRawFrameCommand(CHCICommandFrame& aFrame, const TDesC8& aData)=0; williamr@2: williamr@2: williamr@2: // HCI Status Parameters Commands williamr@2: // not here yet williamr@2: williamr@2: // HCI Testing Commands williamr@2: // not here yet williamr@2: /** Used for testing. williamr@2: williamr@2: @released williamr@2: @internalComponent williamr@2: */ williamr@2: virtual TAny *LogIndex() const=0; williamr@2: williamr@2: // methods to allow stack to query HCI about its features williamr@2: /** Reads ACL reporting interval. williamr@2: williamr@2: @return the ACL reporting interval. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual TUint16 ReadACLReportingInterval() = 0; // Some hardware only reports on the nth ACL data packet being sent williamr@2: // this is an opportunity for the HCI to supply a minimum value of n williamr@2: // to the Link Manager williamr@2: williamr@2: /** Reads size of HCI framing overhead per frame. williamr@2: williamr@2: @return size of HCI framing overhead per frame. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual TUint16 ReadACLFramingOverhead() = 0; // Size of HCI framing overhead per frame williamr@2: williamr@2: // Adaptive Frequency Hopping (AFH) williamr@2: williamr@2: /** Notifies the host controller of channels that are known by the host to be bad or to be about to be bad. williamr@2: williamr@2: This allows those channels to be avoided if Adaptive Frequency Hopping is active on a connection. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aChannelClassification Bitwise representation of the bad channels williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void SetAFHHostChannelClassification(CHCICommandFrame& aFrame, const TDesC8& aChannelClassification)=0; williamr@2: williamr@2: /** Retrieves the AFH channel map being used on the specified connection. williamr@2: williamr@2: If we are master this will be the local AFH channel map. If we are slave it williamr@2: will be the remote master's AFH channel map. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aConnH Connection handle williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadAFHChannelMap(CHCICommandFrame& aFrame, THCIConnHandle aConnH)=0; williamr@2: williamr@2: /** Notifies the host controller whether or not it is required to keep checking for busy channels.. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @param aEnable Check for busy channels if ETrue, otherwise don't williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void WriteAFHChannelAssessmentMode(CHCICommandFrame& aFrame, TBool aEnable)=0; williamr@2: williamr@2: /** Asks the host controller whether or not it is checking for busy channels.. williamr@2: williamr@2: @param aFrame The HCI frame to format williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadAFHChannelAssessmentMode(CHCICommandFrame& aFrame)=0; williamr@2: williamr@2: /** HCI level Ioctl williamr@2: williamr@2: @param aLevel The Ioctl level williamr@2: @param aName The Ioctl function number williamr@2: @param aOption Data associated with this Ioctl williamr@2: @param aStackSAP A pointer to the SAP, used to track Ioctls williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void Ioctl(TUint aLevel,TUint aName, TDes8* aOption, TAny* aStackSAP) = 0; williamr@2: williamr@2: /** Cancel HCI level Ioctl williamr@2: williamr@2: @param aLevel The Ioctl level williamr@2: @param aName The Ioctl function number williamr@2: @param aStackSAP A pointer to the SAP, used to track Ioctls williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void CancelIoctl(TUint aLevel,TUint aName, TAny* aStackSAP) = 0; williamr@2: }; williamr@2: williamr@2: enum THCIErrorCode; williamr@2: williamr@2: williamr@2: williamr@2: /** Event handler mixin that must be implemented by the client of HCI. williamr@2: williamr@2: A class that implements this interface must be passed into the williamr@2: CHCIBase derived class on construction, and will be used by the HCI williamr@2: class to notify the client of events received over the HCI interface. williamr@2: williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: class MHCIEventObserver williamr@2: { williamr@2: public: williamr@2: // Interfaces to allow HCI to notify LL williamr@2: /** This provides command credits. williamr@2: williamr@2: @param aCredits Provided command credits. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void SetCommandCredits(TUint16 aCredits)=0; williamr@2: williamr@2: /** Informs of the ACL MTU for this host. williamr@2: williamr@2: @param aMTU Maximum size of ACL packet the host can send. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void HCIMaximumACLPacketSize(TUint16 aMTU)=0; williamr@2: williamr@2: /** Called when transport channels have become free. williamr@2: williamr@2: @param aChannel Channel that is free. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void CanSend(THCITransportChannel aChannel = KHCITransportAllChannels)=0; williamr@2: williamr@2: // Events as per spec williamr@2: /** Called on an inquiry complete event. williamr@2: williamr@2: @param aNumResponses Number of responses received from the inquiry. This is zero if not supported or there is an error. williamr@2: @param aErr HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void InquiryCompleteEvent(THCIErrorCode aErr, TUint8 aNumResponses)=0; williamr@2: williamr@2: /** Called on an inquiry result complete event. williamr@2: williamr@2: @param aEntry TInquiryLogEntry containing results of inquiry. williamr@2: @param aErr HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void InquiryResultCompleteEvent(THCIErrorCode aErr,const TInquiryLogEntry& aEntry)=0; williamr@2: williamr@2: /** Called on a connection complete event. williamr@2: williamr@2: @param aConn Contains information about the completed connection. williamr@2: @param aErr HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ConnectionCompleteEvent(THCIErrorCode aErr, const TBTConnect &aConn)=0; williamr@2: williamr@2: /** Called on a connection request event. williamr@2: williamr@2: @param aConn Information about the device requesting the connection. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ConnectionRequestEvent(const TBTConnect &aConn)=0; williamr@2: williamr@2: /** Called on a disconnection complete event. williamr@2: williamr@2: @param aConnH Connection handle williamr@2: @param aReason Reason for disconnection. williamr@2: @param aErr HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void DisconnectionCompleteEvent(THCIErrorCode aErr, THCIConnHandle aConnH, THCIErrorCode aReason)=0; williamr@2: williamr@2: /** Called on an authentication complete event. williamr@2: williamr@2: @param aConnH Connection handle williamr@2: @param aErr HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void AuthenticationCompleteEvent(THCIErrorCode aErr, THCIConnHandle aConnH)=0; williamr@2: williamr@2: /** Called on a remote name request complete event. williamr@2: williamr@2: @param aBdaddr Bluetooth address of remote device williamr@2: @param aBuf Name of remote device (max 248 bytes as defined by the bluetooth specification). williamr@2: @param aErr HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void RemoteNameReqCompleteEvent(THCIErrorCode aErr, const TBTDevAddr& aBdaddr, const TDesC8& aBuf)=0; williamr@2: williamr@2: /** Called on encryption change event. williamr@2: williamr@2: @param aConnH Connection handle williamr@2: @param aEnable Whether encryption is enabled williamr@2: @param aErr HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void EncryptionChangeEvent(THCIErrorCode aErr, THCIConnHandle aConnH,TBool aEnable)=0; williamr@2: williamr@2: /** Called on link key complete event. williamr@2: williamr@2: @param Connection handle williamr@2: @param aErr HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ChangeLinkKeyCompleteEvent(THCIErrorCode aErr, THCIConnHandle aConnH)=0; williamr@2: williamr@2: /** Called on master link key complete event. williamr@2: williamr@2: @param aConnH Connection handle williamr@2: @param aKeyFlag See bluetooth specification williamr@2: @param aErr HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void MasterLinkKeyCompleteEvent(THCIErrorCode aErr, THCIConnHandle aConnH,TBool aKeyFlag)=0; williamr@2: williamr@2: /** Called on read remote supported features complete event. williamr@2: williamr@2: @param aConnH Connection handle williamr@2: @param aBitMaskList LMP_Features Bit Mask List (8 bytes) williamr@2: @param aErr HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadRemoteSupportedFeaturesCompleteEvent(THCIErrorCode aErr, THCIConnHandle aConnH, TUint64 aBitMaskList)=0; williamr@2: /** Called on read remote version info complete event. williamr@2: williamr@2: @param aConnH Connection handle williamr@2: @param aVer Information on remote hardware version williamr@2: @param aErr HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadRemoteVersionInfoCompleteEvent(THCIErrorCode aErr, THCIConnHandle aConnH, const TBTDevRemoteHwVersion& aVer)=0; williamr@2: williamr@2: /** Called on QOS setup complete event. williamr@2: williamr@2: @param aQOS QOS information. williamr@2: @param aErr HCI specific or system wide error code. williamr@2: @param aConnH Connection handle williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void QOSSetupCompleteEvent(THCIErrorCode aErr, THCIConnHandle aConnH, TBTQOS aQOS)=0; williamr@2: williamr@2: /** Called on Command Complete Event. williamr@2: williamr@2: @param aErr HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void CommandCompleteEvent(THCIErrorCode aErr,THCIOpcode aOpcode)=0; williamr@2: williamr@2: /** Called on command status event. williamr@2: williamr@2: @param aOpcode Opcode of the successfully completed event. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void CommandStatusEvent(THCIOpcode aOpcode)=0; williamr@2: williamr@2: /** Called on Hardware Error Event. williamr@2: williamr@2: @param aHwCode Hardware code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void HardwareErrorEvent(TUint8 aHwCode)=0; williamr@2: williamr@2: /** Called on Flush Occurred Event. williamr@2: williamr@2: @param aErr HCI specific or system wide error code. williamr@2: @param aConnH Connection handle williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void FlushOccurredEvent(THCIErrorCode aErr, THCIConnHandle aConnH)=0; williamr@2: williamr@2: /** Called on Role Change Event. williamr@2: williamr@2: @param aRole New role. williamr@2: @param aBdaddr Bluetooth device address of remote device. williamr@2: @param aErr HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void RoleChangeEvent(THCIErrorCode aErr, const TBTDevAddr& aBdaddr,TBTBasebandRole aRole)=0; williamr@2: williamr@2: /** Called on HCI Completed Packets event. williamr@2: williamr@2: @param aConnH Connection handle williamr@2: @param aNumPacketsCompleted Number of packets completed. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void HCICompletedPackets(THCIConnHandle aConnH, TUint16 aNumPacketsCompleted)=0; //NumberCompletedPacketsEvent williamr@2: williamr@2: /** Called on Mode Change Event. williamr@2: williamr@2: @param aMode Current mode. williamr@2: @param aInterval Interval defined according to current mode (see bluetooth specification). williamr@2: @param aErr HCI specific or system wide error code. williamr@2: @param aConnH Connection handle williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ModeChangeEvent(THCIErrorCode aErr, THCIConnHandle aConnH, TBTLinkMode aMode, TUint16 aInterval)=0; williamr@2: williamr@2: /** Called on Return Link Keys Event. williamr@2: williamr@2: @param aBdaddr Bluetooth device address of remote device. williamr@2: @param aLinkKey Link key. williamr@2: @param aErr HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReturnLinkKeysEvent(THCIErrorCode aErr, const TBTDevAddr& aBdaddr,const TBTLinkKey& aLinkKey)=0; williamr@2: williamr@2: /** Called on PIN Code Request Event. williamr@2: williamr@2: @param aBdaddr Bluetooth device address williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void PINCodeRequestEvent(const TBTDevAddr& aBdaddr)=0; williamr@2: williamr@2: /** Called on Link Key Request Event. williamr@2: williamr@2: @param aBdaddr Bluetooth device address williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void LinkKeyRequestEvent(const TBTDevAddr& aBdaddr)=0; williamr@2: williamr@2: /** Called on Link Key Notification Event. williamr@2: williamr@2: @param aBdaddr Bluetooth device address. williamr@2: @param aLinkKey Link key. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void LinkKeyNotificationEvent(const TBTDevAddr& aBdaddr,const TBTLinkKey& aLinkKey)=0; williamr@2: williamr@2: /** Called on Loopback Command Event. Not currently supported. williamr@2: williamr@2: @released williamr@2: @internalTechnology williamr@2: */ williamr@2: virtual void LoopbackCommandEvent()=0; //not supported yet williamr@2: williamr@2: /** Called on Data Buffer Overflow Event. williamr@2: williamr@2: @param aLinkType williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void DataBufferOverflowEvent(TUint8 aLinkType)=0; williamr@2: williamr@2: /** Called on Max Slots Change Event. williamr@2: williamr@2: @param aMaxSlots New value of max slots. williamr@2: @param aConnH Connection handle williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void MaxSlotsChangeEvent(THCIConnHandle aConnH, TUint8 aMaxSlots)=0; williamr@2: williamr@2: /** Called on Read Clock Offset Result Event. williamr@2: williamr@2: @param aClockOffset Clock offset. williamr@2: @param aErr HCI specific or system wide error code. williamr@2: @param aConnH Connection handle williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadClockOffsetResultEvent(THCIErrorCode aErr, THCIConnHandle aConnH, TBasebandTime aClockOffset)=0; williamr@2: williamr@2: /** Called on Connection Packet Type Changed Event. williamr@2: williamr@2: @param aPacketType New packet type. williamr@2: @param aErr HCI specific or system wide error code. williamr@2: @param aConnH Connection handle williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ConnectionPacketTypeChangedEvent(THCIErrorCode aErr, williamr@2: THCIConnHandle aConnH, TUint16 aPacketType)=0; williamr@2: williamr@2: /** Called on QOS Violation Event. williamr@2: williamr@2: @param aConnH Connection handle williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void QOSViolationEvent(THCIConnHandle aConnH)=0; williamr@2: williamr@2: /** Called on Page Scan Mode Change Event. williamr@2: williamr@2: @param aBdaddr Bluetooth device address. williamr@2: @param aPageScanMode New page scan mode williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void PageScanModeChangeEvent(const TBTDevAddr& aBdaddr, TUint8 aPageScanMode)=0; williamr@2: williamr@2: /** Called on Page Scan Repetition Mode Change Event. williamr@2: williamr@2: @param aBdaddr Bluetooth device address williamr@2: @param aPageScanRepetitionMode New page scan repetition mode williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void PageScanRepetitionModeChangeEvent(const TBTDevAddr& aBdaddr, TUint8 aPageScanRepetitionMode)=0; williamr@2: williamr@2: // data events williamr@2: williamr@2: /** Called on ACLDataReceivedEvent. williamr@2: williamr@2: @param aConnH Connection handle williamr@2: @param aData Received data williamr@2: @param aFlag See bluetooth specification williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ACLDataReceivedEvent(THCIConnHandle aConnH,TUint8 aFlag,const TDesC8& aData)=0; williamr@2: williamr@2: /** Called on SCO Data Received Event. williamr@2: williamr@2: @param aData Recieved data. williamr@2: @param aConnH Connection handle williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void SCODataReceivedEvent(THCIConnHandle aConnH, const TDesC8& aData)=0; williamr@2: williamr@2: // complete events williamr@2: williamr@2: williamr@2: /** Called on Reset Complete Event. williamr@2: williamr@2: @param aStatus HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ResetCompleteEvent(THCIErrorCode aStatus)=0; williamr@2: williamr@2: /** Called on Write Link Supervision Timeout Complete Event. williamr@2: williamr@2: @param aStatus HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void WriteLinkSupervisionTimeoutCompleteEvent(THCIErrorCode aStatus)=0; williamr@2: williamr@2: /** Called on Link Key Request Reply Complete Event. williamr@2: williamr@2: @param aStatus HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void LinkKeyRequestReplyCompleteEvent(THCIErrorCode aStatus)=0; williamr@2: williamr@2: /** Called on Link Key Request Reply Negative Complete Event. williamr@2: williamr@2: @param aStatus HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void LinkKeyRequestReplyNegativeCompleteEvent(THCIErrorCode aStatus)=0; williamr@2: williamr@2: /** Called on PIN Code Request Reply Complete Event. williamr@2: williamr@2: @param aStatus HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void PINCodeRequestReplyCompleteEvent(THCIErrorCode aStatus)=0; williamr@2: williamr@2: /** Called on PIN Code Request Reply Negative Complete Event. williamr@2: williamr@2: @param aStatus HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void PINCodeRequestReplyNegativeCompleteEvent(THCIErrorCode aStatus)=0; williamr@2: williamr@2: /** Called on Inquiry Cancel Complete Event. williamr@2: williamr@2: @param aStatus HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void InquiryCancelCompleteEvent(THCIErrorCode aStatus)=0; williamr@2: williamr@2: /** Called on Periodic Inquiry Mode Complete Event. williamr@2: williamr@2: @param aStatus HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void PeriodicInquiryModeCompleteEvent(THCIErrorCode aStatus)=0; williamr@2: williamr@2: /** Called on Exit Periodic Inquiry Mode Complete Event. williamr@2: williamr@2: @param aStatus HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ExitPeriodicInquiryModeCompleteEvent(THCIErrorCode aStatus)=0; williamr@2: williamr@2: /** Called on Set Event Mask Complete Event. williamr@2: williamr@2: @param aStatus HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void SetEventMaskCompleteEvent(THCIErrorCode aStatus)=0; williamr@2: williamr@2: /** Called on Set Event Filter Complete Event. williamr@2: williamr@2: @param aStatus HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void SetEventFilterCompleteEvent(THCIErrorCode aStatus)=0; williamr@2: williamr@2: /** Called on Create New Unit Key Complete Event. williamr@2: williamr@2: @param aStatus HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void CreateNewUnitKeyCompleteEvent(THCIErrorCode aStatus)=0; williamr@2: williamr@2: /** Called on Change Local Name Complete Event. williamr@2: williamr@2: @param aStatus HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ChangeLocalNameCompleteEvent(THCIErrorCode aStatus)=0; williamr@2: williamr@2: /** Called on Write Authentication Enable Complete Event. williamr@2: williamr@2: @param aStatus HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void WriteAuthenticationEnableCompleteEvent(THCIErrorCode aStatus)=0; williamr@2: williamr@2: /** Called on Write Encryption Mode Complete Event. williamr@2: williamr@2: @param aStatus HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void WriteEncryptionModeCompleteEvent(THCIErrorCode aStatus)=0; williamr@2: williamr@2: /** Called on Write Page Timeout Complete Event. williamr@2: williamr@2: @param aStatus HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void WritePageTimeoutCompleteEvent(THCIErrorCode aStatus)=0; williamr@2: williamr@2: /** Called on Write Connection Accept Timeout Complete Event. williamr@2: williamr@2: @param aStatus HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void WriteConnectionAcceptTimeoutCompleteEvent(THCIErrorCode aStatus)=0; williamr@2: williamr@2: /** Called on Write Class Of Device Complete Event. williamr@2: williamr@2: @param aStatus HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void WriteClassOfDeviceCompleteEvent(THCIErrorCode aStatus)=0; williamr@2: williamr@2: /** Called on Write Voice Setting Complete Event. williamr@2: williamr@2: @param aStatus HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void WriteVoiceSettingCompleteEvent(THCIErrorCode aStatus)=0; williamr@2: williamr@2: /** Called on Write Current IAC LAP Complete Event. williamr@2: williamr@2: @param aStatus HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void WriteCurrentIACLAPCompleteEvent(THCIErrorCode aStatus)=0; williamr@2: williamr@2: /** Called on Set Host Controller To Host Flow Complete Event. williamr@2: williamr@2: @param aStatus HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void SetHostControllerToHostFlowCompleteEvent(THCIErrorCode aStatus)=0; williamr@2: williamr@2: /** Called on Host Buffer Size Complete Event. williamr@2: williamr@2: @param aStatus HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void HostBufferSizeCompleteEvent(THCIErrorCode aStatus)=0; williamr@2: williamr@2: /** Called on Host Number Of Completed Packets Complete Event. williamr@2: williamr@2: @param aStatus HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void HostNumberOfCompletedPacketsCompleteEvent(THCIErrorCode aStatus)=0; williamr@2: williamr@2: /** Called on Write Scan Enable Complete Event. williamr@2: williamr@2: @param aStatus HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void WriteScanEnableCompleteEvent(THCIErrorCode aStatus)=0; williamr@2: williamr@2: /** Called on Write Link Policy Settings Complete Event. williamr@2: williamr@2: @param aConnH Connection handle williamr@2: @param aStatus HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void WriteLinkPolicySettingsCompleteEvent(THCIErrorCode aStatus, THCIConnHandle aConnH)=0; williamr@2: williamr@2: // results of local commands williamr@2: williamr@2: williamr@2: /** Called on Read Stored Link Key Result. williamr@2: williamr@2: @param aNumKeysRead Number of keys read williamr@2: @param aMaxNumKeys Max number of keys williamr@2: @param aErr HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadStoredLinkKeyResult(THCIErrorCode aErr,TUint16 aNumKeysRead,TUint16 aMaxNumKeys)=0; williamr@2: williamr@2: /** Called on Write Stored Link Key Result. williamr@2: williamr@2: @param aNumKeysStored Number of keys stored williamr@2: @param aErr HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void WriteStoredLinkKeyResult(THCIErrorCode aErr,TUint8 aNumKeysStored)=0; williamr@2: williamr@2: /** Called on Delete Stored Link Key Result. williamr@2: williamr@2: @param aNumKeysDeleted Number of keys deleted williamr@2: @param aErr HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void DeleteStoredLinkKeyResult(THCIErrorCode aErr,TUint8 aNumKeysDeleted)=0; williamr@2: williamr@2: /** Called on Read Scan Enable Result. williamr@2: williamr@2: @param aEnable See bluetooth specification williamr@2: @param aErr HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadScanEnableResult(THCIErrorCode aErr,TUint8 aEnable)=0; williamr@2: williamr@2: /** Called on Read Authentication Enable Result. williamr@2: williamr@2: @param aEnable See bluetooth specification williamr@2: @param aErr HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadAuthenticationEnableResult(THCIErrorCode aErr,TUint8 aEnable)=0; williamr@2: williamr@2: /** Called on Read Encryption Enable Result. williamr@2: williamr@2: @param aEnable See bluetooth specification williamr@2: @param aErr HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadEncryptionEnableResult(THCIErrorCode aErr,THCIEncryptModeFlag aEnable)=0; williamr@2: williamr@2: /** Called on Read Bdaddr Result. williamr@2: williamr@2: @param aBdaddr Bluetooth device address of remote device williamr@2: @param aErr HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadBdaddrResult(THCIErrorCode aErr,const TBTDevAddr& aBdaddr)=0; williamr@2: williamr@2: /** Called on Read Class Of Device Result. williamr@2: williamr@2: @param aCoD Class of device of remote device williamr@2: @param aErr HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadClassOfDeviceResult(THCIErrorCode aErr,TUint aCoD)=0; williamr@2: williamr@2: /** Called on Read Voice Setting Result. williamr@2: williamr@2: @param aVoiceChannelSetting Voice channel setting williamr@2: @param aErr HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadVoiceSettingResult(THCIErrorCode aErr,TUint16 aVoiceChannelSetting)=0; williamr@2: williamr@2: /** Called on Read Local Name Result. williamr@2: williamr@2: @param aLocalName Local name williamr@2: @param aErr HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadLocalNameResult(THCIErrorCode aErr,const TDesC8& aLocalName)=0; williamr@2: williamr@2: /** Called on Read Timeout Result. williamr@2: williamr@2: @param aType See bluetooth specification williamr@2: @param aTimeout See bluetooth specification williamr@2: @param aErr HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadTimeoutResult(THCIErrorCode aErr,THCITimeoutType aType,TBasebandTime aTimeout)=0; williamr@2: williamr@2: /** Called on Read Local Version Info Result. williamr@2: williamr@2: @param aHCIVersion Version information of local device hardware williamr@2: @param aLMPVersion Version information of local LMP williamr@2: @param aErr HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadLocalVersionInfoResult(THCIErrorCode aErr, TBTDevHCIVersion aHCIVersion, TBTDevLMPVersion aLMPVersion)=0; williamr@2: williamr@2: /** Called on Read Local Supported Features Result. williamr@2: williamr@2: @param aBitMaskList See bluetooth specification williamr@2: @param aErr HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadLocalSupportedFeaturesResult(THCIErrorCode aErr, TUint64 aBitMaskList)=0; williamr@2: /** Called on Read Country Code Result. williamr@2: williamr@2: @param aCountryCode Country code williamr@2: @param aErr HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadCountryCodeResult(THCIErrorCode aErr, TUint8 aCountryCode)=0; williamr@2: williamr@2: /** Called on Read Number Of Supported IAC Result. williamr@2: williamr@2: @param aNumIACs Number of IACs williamr@2: @param aErr HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadNumberOfSupportedIACResult(THCIErrorCode aErr, TUint8 aNumIACs)=0; williamr@2: williamr@2: /** Called on Read Discoverability Result. williamr@2: williamr@2: @param aNumIACs The number of concurrent IACs on which scanning is/would take place williamr@2: @param aIAC IAC_LAP array. williamr@2: @param aErr HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadDiscoverabilityResult(THCIErrorCode aErr, TUint8 aNumIACs, TUint aIAC[])=0; williamr@2: williamr@2: /** Called on Read Buffer Size Result. williamr@2: williamr@2: @param aAclMaxLen Maximum length of each ACL packet williamr@2: @param aScoMaxLen Maximum length of each SCO packet williamr@2: @param aNoACL Total number of ACL data packets williamr@2: @param aNoSCO Total number of SCO data packets williamr@2: @param aErr HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadBufferSizeResult(THCIErrorCode aErr,TUint16 aAclMaxLen, williamr@2: TUint8 aScoMaxLen,TUint16 aNoACL,TUint16 aNoSCO)=0; williamr@2: williamr@2: /** Called on Read Role Discovery Result. williamr@2: williamr@2: @param aRole Current role williamr@2: @param aStatus HCI specific or system wide error code. williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadRoleDiscoveryResult(THCIErrorCode aStatus, TBTBasebandRole aRole)=0; williamr@2: williamr@2: /** Called on Vendor Specific Debug Event. williamr@2: williamr@2: @param aEventFrame The frame holds the event parameters and parameter length field williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void VendorSpecificDebugEvent(TPtrC8 aEventFrame)=0; williamr@2: williamr@2: // Power off event williamr@2: williamr@2: /** Called on Handle Power Status Change. williamr@2: williamr@2: @param aState New power state williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void HandlePowerStatusChange(TBTPowerState aState)=0; williamr@2: williamr@2: williamr@2: // Results of Adaptive Frequency Hopping (AFH) commands williamr@2: williamr@2: /** Called in response to a SetAFHHostChannelClassification command. williamr@2: williamr@2: @param aStatus The success or not of the SetAFHHostChannelClassification command williamr@2: @see SetAFHHostChannelClassification williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void SetAFHHostChannelClassificationCompleteEvent(THCIErrorCode aStatus)=0; williamr@2: williamr@2: /** Called in response to a ReadAFHChannelMap command. williamr@2: williamr@2: @param aStatus The success or not of the ReadAFHChannelMap command williamr@2: @param aConnH Connection handle williamr@2: @param aAFHMode ETrue if AFH is enabled, EFalse if not williamr@2: @param aAFHChannelMap The AFH channel map being used on the specified connection williamr@2: @see ReadAFHChannelMap williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadAFHChannelMapCompleteEvent(THCIErrorCode aStatus, THCIConnHandle aConnH, TBool aAFHMode, const TDesC8& aAFHChannelMap)=0; williamr@2: williamr@2: /** Called in response to a WriteAFHChannelAssessmentMode command. williamr@2: williamr@2: @param aStatus The success or not of the WriteAFHChannelAssessmentMode command williamr@2: @see WriteAFHChannelAssessmentMode williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void WriteAFHChannelAssessmentModeCompleteEvent(THCIErrorCode aStatus)=0; williamr@2: williamr@2: /** Called in response to a ReadAFHChannelAssessmentMode command. williamr@2: williamr@2: @param aStatus The success or not of the ReadAFHChannelAssessmentMode command williamr@2: @param aChannelAssessmentMode The host controller is checking for busy channels if ETrue, otherwise it is not williamr@2: @see ReadAFHChannelAssessmentMode williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void ReadAFHChannelAssessmentModeCompleteEvent(THCIErrorCode aStatus, TBool aChannelAssessmentMode)=0; williamr@2: williamr@2: williamr@2: /** Called in response to a Flush command. williamr@2: williamr@2: @param aStatus The success or not of the Flush command williamr@2: @param aConnH The connection handle williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void FlushCompleteEvent(THCIErrorCode aStatus, THCIConnHandle aConnH)=0; williamr@2: williamr@2: williamr@2: /** Called on a synchronous connection complete event. williamr@2: @param aStatus williamr@2: @param aConnH HCI connection handle williamr@2: @param aBdaddr BT device address williamr@2: @param aLinkType Link Type:SCO, Reserved or eSCO williamr@2: @param aTransmissionInterval Transmission Interval williamr@2: @param aRetransmissionWindow Retransmission Window williamr@2: @param aRxPacketLength Rx Packet Length williamr@2: @param aTxPacketLength Tx Packet Length williamr@2: @param aAirMode Air Mode: uLaw, ALaw, CVSD or Transparent data williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void SynchronousConnectionCompleteEvent(const THCIErrorCode aErr, williamr@2: const THCIConnHandle aConnH, williamr@2: const TBTDevAddr& aBdaddr, williamr@2: const TLinkType aLinkType, williamr@2: const TUint8 aTransmissionInterval, williamr@2: const TUint8 aRetransmissionWindow, williamr@2: const TUint16 aRxPacketLength, williamr@2: const TUint16 aTxPacketLength, williamr@2: const TAirMode aAirMode)=0; williamr@2: williamr@2: /** Called on a synchronous connection changed event williamr@2: @param aStatus williamr@2: @param aConnH HCI connection handle williamr@2: @param aTransmissionInterval Transmission Interval williamr@2: @param aRetransmissionWindow Retransmission Window williamr@2: @param aRxPacketLength Rx Packet Length williamr@2: @param aTxPacketLength Tx Packet Length williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void SynchronousConnectionChangedEvent(const THCIErrorCode aErr, williamr@2: const THCIConnHandle aConnH, williamr@2: const TUint8 aTransmissionInterval, williamr@2: const TUint8 aRetransmissionWindow, williamr@2: const TUint16 aRxPacketLength, williamr@2: const TUint16 aTxPacketLength)=0; williamr@2: williamr@2: williamr@2: williamr@2: /** Called when an HCI level Ioctl completes. williamr@2: williamr@2: @param aLevel The Ioctl level williamr@2: @param aName The Ioctl function number williamr@2: @param aOption Data associated with this Ioctl williamr@2: @param aErr System-wide error code williamr@2: @param aStackSAP A pointer to the SAP, used to track Ioctls williamr@2: @released williamr@2: @publishedPartner williamr@2: */ williamr@2: virtual void CompleteIoctl(TUint aLevel,TUint aName,TDes8* aOption,TInt aErr, TAny* aStackSAP)=0; williamr@2: }; williamr@2: williamr@2: williamr@2: /* williamr@2: * Constants used for Symbian's RHCIDirectAccess test functionality williamr@2: */ williamr@2: williamr@2: // Test Ioctls williamr@2: enum THCIDirectAccessTestIoctl williamr@2: { williamr@2: EHCIDirectAccessTestIoctlSetFlag1 = 0, williamr@2: EHCIDirectAccessTestIoctlSetFlag2, williamr@2: EHCIDirectAccessTestIoctlGetFlag1, williamr@2: EHCIDirectAccessTestIoctlGetFlag2, williamr@2: EHCIDirectAccessTestIoctlValidateFlag1, williamr@2: EHCIDirectAccessTestIoctlValidateFlag2, williamr@2: EHCIDirectAccessTestIoctlTimerFiveSeconds, williamr@2: EHCIDirectAccessTestIoctlTimerEightSeconds, williamr@2: EHCIDirectAccessTestIoctlTestDataPath, williamr@2: EHCIDirectAccessTestIoctlNotifyOnEventX, williamr@2: EHCIDirectAccessTestIoctlTriggerEventX, williamr@2: }; williamr@2: williamr@2: // text strings for testing data path williamr@2: _LIT8(KHCIDirectAccessTestExpectedText, "ExpectedText"); williamr@2: _LIT8(KHCIDirectAccessTestUnexpectedText, "UnexpectedText"); williamr@2: williamr@2: #endif