bluetooth/btstack/l2cap/l2capSAPSignalHandler.h
branchRCL_3
changeset 17 32ba20339036
parent 0 29b1cd4cb562
child 25 99439b07e980
equal deleted inserted replaced
16:9f17f914e828 17:32ba20339036
   126 	
   126 	
   127 	// SAP signal handler timer methods.	
   127 	// SAP signal handler timer methods.	
   128 	static TInt TimerExpired(TAny* aSAPSignalHandler);
   128 	static TInt TimerExpired(TAny* aSAPSignalHandler);
   129 
   129 
   130 	void StartConfigurationTimer();
   130 	void StartConfigurationTimer();
       
   131 	void StartConfigRequestDelayTimer();
   131 	void CancelTimer();
   132 	void CancelTimer();
   132 
   133 
   133 	void DetachFromMux();
   134 	void DetachFromMux();
   134 	void SAPClosed();
   135 	void SAPClosed();
   135 
   136 
   136 	TInt SendEchoRequest(const TDes8* aData);
   137 	TInt SendEchoRequest(const TDes8* aData);
   137 	void EchoResponseReceived(const TDesC8* aData);
   138 	void EchoResponseReceived(const TDesC8* aData);
       
   139 
       
   140 	inline void ConfigureChannel();
   138 
   141 
   139 	void OverrideParkMode();
   142 	void OverrideParkMode();
   140 	void UndoOverrideParkMode();
   143 	void UndoOverrideParkMode();
   141 	void OverrideLPMWithTimeout();
   144 	void OverrideLPMWithTimeout();
       
   145 
   142 	inline TInt SignalHandlerErrorCode() const;
   146 	inline TInt SignalHandlerErrorCode() const;
   143 	inline MSocketNotify::TOperationBitmasks SignalHandlerErrorAction() const;
   147 	inline MSocketNotify::TOperationBitmasks SignalHandlerErrorAction() const;
   144 	inline void SetSignalHandlerErrorCode(TInt aError);
   148 	inline void SetSignalHandlerErrorCode(TInt aError);
   145 	inline void SetSignalHandlerErrorAction(MSocketNotify::TOperationBitmasks aAction);
   149 	inline void SetSignalHandlerErrorAction(MSocketNotify::TOperationBitmasks aAction);
   146 
       
   147 private:
   150 private:
   148 	CL2CapSAPSignalHandler(CL2CAPConnectionSAP& aSAP);
   151 	CL2CapSAPSignalHandler(CL2CAPConnectionSAP& aSAP);
   149 	void ConstructL();
   152 	void ConstructL();
   150 	
   153 	
   151 	void PendingCommandsDrained();
   154 	void PendingCommandsDrained();
   185 	// We need the peer supported features to be able to handle a Config Request coming
   188 	// We need the peer supported features to be able to handle a Config Request coming
   186 	// through (to be able to negotiate channel mode properly), which may be any time after 
   189 	// through (to be able to negotiate channel mode properly), which may be any time after 
   187 	// OpenChannelRequest, so OpenChannelRequest is delayed until Information Response comes
   190 	// OpenChannelRequest, so OpenChannelRequest is delayed until Information Response comes
   188 	// through.
   191 	// through.
   189 	TBool iOpenChannelRequestAwaitingPeerEntityConfig;
   192 	TBool iOpenChannelRequestAwaitingPeerEntityConfig;
   190 	// The SAP is ready to send a config request
   193 	// A ConfigureChannelRequest from the SAP is only expected in an active open scenario.
   191 	// Flag to indicate that we are delaying sending this config request
   194 	// On passive open we kick the configuration ourselves.
   192 	TBool iAwaitingConfigRequestDelayTimer;
   195 	TBool iAwaitConfigureChannelRequest;
       
   196 
       
   197 	friend class TL2CAPSigStateClosed;
       
   198 	friend class TL2CAPSigStateWaitConnectRsp;
       
   199 	friend class TL2CAPSigStateWaitConnect;
       
   200 	friend class TL2CAPSigStateConfigBase;
   193 	};
   201 	};
   194 
   202 
   195 inline TUint8 CL2CapSAPSignalHandler::GetOutstandingRequestID()
   203 inline TUint8 CL2CapSAPSignalHandler::GetOutstandingRequestID()
   196 	{
   204 	{
   197 	return iOutstandingRequestID;
   205 	return iOutstandingRequestID;
   228 	}
   236 	}
   229 inline TL2CAPPort CL2CapSAPSignalHandler::RemotePort() const
   237 inline TL2CAPPort CL2CapSAPSignalHandler::RemotePort() const
   230 	{
   238 	{
   231 	return iRemotePort;
   239 	return iRemotePort;
   232 	}
   240 	}
   233 	
   241 
   234 inline const TBTDevAddr& CL2CapSAPSignalHandler::RemoteBTAddress() const
   242 inline const TBTDevAddr& CL2CapSAPSignalHandler::RemoteBTAddress() const
   235 	{
   243 	{
   236 	return iSAP->RemoteDev();
   244 	return iSAP->RemoteDev();
   237 	}
   245 	}
   238 
   246 
   278 
   286 
   279 inline void CL2CapSAPSignalHandler::SetSignalHandlerErrorAction(MSocketNotify::TOperationBitmasks aAction)
   287 inline void CL2CapSAPSignalHandler::SetSignalHandlerErrorAction(MSocketNotify::TOperationBitmasks aAction)
   280 	{
   288 	{
   281 	iSignalHandlerErrorAction = aAction;
   289 	iSignalHandlerErrorAction = aAction;
   282 	}
   290 	}
   283 	
   291 
       
   292 inline void CL2CapSAPSignalHandler::ConfigureChannel()
       
   293 	{
       
   294 	iSigState->ConfigureChannel(*this);
       
   295 	}
       
   296 
   284 #endif
   297 #endif