bluetooth/btstack/linkmgr/physicallinks.h
branchRCL_3
changeset 17 32ba20339036
parent 16 9f17f914e828
child 22 786b94c6f0a4
equal deleted inserted replaced
16:9f17f914e828 17:32ba20339036
    68 	to prevent an early switch back into a low power mode.
    68 	to prevent an early switch back into a low power mode.
    69 **/
    69 **/
    70 	{
    70 	{
    71 public:
    71 public:
    72 	static CArbitrationDelayTimer* NewL(CPhysicalLink* aParent);
    72 	static CArbitrationDelayTimer* NewL(CPhysicalLink* aParent);
    73     void Start(TBool aLocalPriority=EFalse);
    73 	TInt Start(TBool aImmediate, TBool aLocalPriority);
    74 	
    74 	void Restart();
       
    75 
    75 private:
    76 private:
    76 	CArbitrationDelayTimer(CPhysicalLink* aParent);
    77 	CArbitrationDelayTimer(CPhysicalLink* aParent);
    77 	void ConstructL();
    78 	void ConstructL();
    78 	void RunL();
    79 	void RunL();
    79     void DoCancel();
    80 	void DoCancel();
    80     
    81 	TInt DoArbitrate();
    81 private:
    82 	void CancelButPreserveLocalPriority();
    82 	CPhysicalLink* 	iParent;
    83 
    83     TBool iLocalPriority;	
    84 private:
       
    85 	CPhysicalLink* iParent;
       
    86 	TBool iLocalPriority;
    84 	};
    87 	};
    85 
    88 
    86 
    89 
    87 NONSHARABLE_STRUCT(TLogicalLinkListener)
    90 NONSHARABLE_STRUCT(TLogicalLinkListener)
    88 	{
    91 	{
   294 	inline TBool IsConnected() const;
   297 	inline TBool IsConnected() const;
   295 	inline TBool IsListening() const;
   298 	inline TBool IsListening() const;
   296 	inline TBTBasebandRole Role() const;
   299 	inline TBTBasebandRole Role() const;
   297 	void SetDeviceNamePending(TBool aBool);
   300 	void SetDeviceNamePending(TBool aBool);
   298 	TInt GetOption(TUint aLevel,TUint aName,TDes8& aOption) const;
   301 	TInt GetOption(TUint aLevel,TUint aName,TDes8& aOption) const;
   299 	TInt Connect(TBasebandPageTimePolicy aPolicy=EPagingNormal);
   302 	void Connect(TBasebandPageTimePolicy aPolicy=EPagingNormal);
   300 	TInt SCOConnect();
   303 	TInt SCOConnect();
   301 	TInt SCOConnect(const TUint16 aUserHVPacketTypes);
   304 	TInt SCOConnect(const TUint16 aUserHVPacketTypes);
   302 	TInt SynchronousConnect(TUint aTransmitBandwidth, TUint aReceiveBandwidth,
   305 	TInt SynchronousConnect(TUint aTransmitBandwidth, TUint aReceiveBandwidth,
   303 		TUint16 aMaxLatency, TUint16 aVoiceSettings,
   306 		TUint16 aMaxLatency, TUint16 aVoiceSettings,
   304 		TUint8 aRetransmissionEffort, const TBTSyncPacketTypes aUserPacketTypes);
   307 		TUint8 aRetransmissionEffort, const TBTSyncPacketTypes aUserPacketTypes);
   305 	TInt PassiveOpen();
   308 	TInt Arbitrate(TBool aImmediately=EFalse, TBool aLocalPriority=EFalse); 
   306     TInt Arbitrate(TBool aImmediately=EFalse, TBool aLocalPriority=EFalse); 
   309 	TInt DoArbitrate(TBool aLocalPriority);
   307     TInt DoArbitrate(TBool aLocalPriority);
       
   308 	void SetPassKey(const TDesC8& aPassKey);
   310 	void SetPassKey(const TDesC8& aPassKey);
   309 	const TBTPinCode& PassKey() const;		
   311 	const TBTPinCode& PassKey() const;		
   310 
   312 
   311 	void StartArbitrationTimer() const;
   313 	void StartArbitrationTimer() const;
   312 	
   314 	
   372 	virtual void ModeChange(THCIErrorCode aErr, THCIConnHandle aConnH, TBTLinkMode aMode, TBasebandTime aInterval);
   374 	virtual void ModeChange(THCIErrorCode aErr, THCIConnHandle aConnH, TBTLinkMode aMode, TBasebandTime aInterval);
   373 	virtual void WriteLinkPolicySettingsCompleteEvent(THCIErrorCode aErr, THCIConnHandle aConnH);
   375 	virtual void WriteLinkPolicySettingsCompleteEvent(THCIErrorCode aErr, THCIConnHandle aConnH);
   374 	virtual void RoleChange(THCIErrorCode aErr, const TBTDevAddr& aAddr, TBTBasebandRole aRole);
   376 	virtual void RoleChange(THCIErrorCode aErr, const TBTDevAddr& aAddr, TBTBasebandRole aRole);
   375 	virtual void ClockOffset(THCIErrorCode aErr, THCIConnHandle aConnH, TBasebandTime aClockOffset);
   377 	virtual void ClockOffset(THCIErrorCode aErr, THCIConnHandle aConnH, TBasebandTime aClockOffset);
   376 	virtual void RemoteName(THCIErrorCode aErr, const TBTDevAddr& aAddr, const TBTDeviceName8& aName);
   378 	virtual void RemoteName(THCIErrorCode aErr, const TBTDevAddr& aAddr, const TBTDeviceName8& aName);
       
   379 	
       
   380 	void ConnectionComplete(TInt aResult, const TBTConnect& aConn);
   377 
   381 
   378 	TBool LinkKeyRequestPending();
   382 	TBool LinkKeyRequestPending();
   379 	void SetAuthenticationPending(TUint8 aFlag);
   383 	void SetAuthenticationPending(TUint8 aFlag);
   380 	virtual void AuthenticationComplete(TUint8 aFlag);
   384 	virtual void AuthenticationComplete(TUint8 aFlag);
   381 
   385 
   551 	TDeltaTimerEntry			iIdleTimerEntry;
   555 	TDeltaTimerEntry			iIdleTimerEntry;
   552 	TBool						iIdleTimerQueued;
   556 	TBool						iIdleTimerQueued;
   553 	TDeltaTimerEntry			iOverrideLPMTimerEntry;
   557 	TDeltaTimerEntry			iOverrideLPMTimerEntry;
   554 
   558 
   555 	TLinkPolicy					iLinkPolicy;
   559 	TLinkPolicy					iLinkPolicy;
   556 	TUint8 						iPreviousRequestedModeMask;
   560 	TUint16						iPreviousRequestedModeMask;
   557 	TBool						iOverrideParkRequests; //for maybe temporary unpark
   561 	TBool						iOverrideParkRequests; //for maybe temporary unpark
   558 	TBool						iOverrideLPMRequests; //for maybe temporary force active
   562 	TBool						iOverrideLPMRequests; //for maybe temporary force active
   559 	TBool						iLPMOverrideTimerQueued;
   563 	TBool						iLPMOverrideTimerQueued;
   560 	TBool						iConnectionPacketTypeChanged; //for triggering h/w 
   564 	TBool						iConnectionPacketTypeChanged; //for triggering h/w 
   561 	
   565