bluetooth/btstack/avdtp/avdtpMuxChannel.h
branchRCL_3
changeset 22 786b94c6f0a4
parent 0 29b1cd4cb562
equal deleted inserted replaced
21:14e240312f6f 22:786b94c6f0a4
   132 public:
   132 public:
   133 	static CMuxChannel* NewL(CAvdtpProtocol& aProtocol, const TBTDevAddr& aRemoteDevice,
   133 	static CMuxChannel* NewL(CAvdtpProtocol& aProtocol, const TBTDevAddr& aRemoteDevice,
   134 								TTCID aRemotelyAssignedTCID);
   134 								TTCID aRemotelyAssignedTCID);
   135 
   135 
   136 // management path
   136 // management path
   137 	virtual TInt AttachTransportSession(CUserPlaneTransportSession& aSession, TAvdtpTransportSessionType aType);
   137 	virtual TInt AttachTransportSession(CUserPlaneTransportSession& aSession, TAvdtpTransportSessionType aType, TL2CapConfig::TChannelPriority aPriority = TL2CapConfig::ELow);
   138 	virtual void DetachTransportSession(CUserPlaneTransportSession& aSession, TAvdtpTransportSessionType aType);
   138 	virtual void DetachTransportSession(CUserPlaneTransportSession& aSession, TAvdtpTransportSessionType aType);
   139 	virtual TBool CouldAttachSession(const TAvdtpSockAddr& aAddr);
   139 	virtual TBool CouldAttachSession(const TAvdtpSockAddr& aAddr);
   140 	virtual TTCID TCID() const;
   140 	virtual TTCID TCID() const;
   141 	CServProviderBase* ObtainSAP();
   141 	CServProviderBase* ObtainSAP();
   142 	void ActiveMultiplexer();
   142 	void ActiveMultiplexer();
   151 	
   151 	
   152 	~CMuxChannel();
   152 	~CMuxChannel();
   153 
   153 
   154 private:	
   154 private:	
   155 	CMuxChannel(CAvdtpProtocol& aProtocol, const TBTDevAddr& aRemoteDevice);
   155 	CMuxChannel(CAvdtpProtocol& aProtocol, const TBTDevAddr& aRemoteDevice);
   156 						 
   156 	
       
   157 	void UpdateChannelPriority();
       
   158 	
   157 	static TInt MuxSendIntervalCb(TAny* aCMuxChannel);
   159 	static TInt MuxSendIntervalCb(TAny* aCMuxChannel);
   158 	void CheckForClose();
   160 	void CheckForClose();
   159 	TUint DoSend();
   161 	TUint DoSend();
   160 						
   162 						
   161 private:
   163 private:
   169 
   171 
   170 private:
   172 private:
   171 	// receive path	
   173 	// receive path	
   172 	struct TUserPlaneTransportSessionState
   174 	struct TUserPlaneTransportSessionState
   173 		{
   175 		{
   174 		inline TUserPlaneTransportSessionState(CUserPlaneTransportSession& aSession);
   176 		inline TUserPlaneTransportSessionState(CUserPlaneTransportSession& aSession, TL2CapConfig::TChannelPriority aChannelPriority);
   175 		
   177 		
   176 		CUserPlaneTransportSession& iSession;
   178 		CUserPlaneTransportSession& iSession;
   177 		TBool iIsBlocked;
   179 		TBool iIsBlocked;
   178 		
   180 		TL2CapConfig::TChannelPriority iChannelPriority;
   179 		};
   181 		};
   180 		
   182 		
       
   183 	static void MaxChannelPriority(TL2CapConfig::TChannelPriority& aMaxPriority, const RArray<TUserPlaneTransportSessionState>& aSessions);
       
   184 	
   181 	RArray<TUserPlaneTransportSessionState>	iMediaSessions;
   185 	RArray<TUserPlaneTransportSessionState>	iMediaSessions;
   182 	RArray<TUserPlaneTransportSessionState>	iReportingSessions;
   186 	RArray<TUserPlaneTransportSessionState>	iReportingSessions;
   183 	RArray<TUserPlaneTransportSessionState>	iRecoverySessions; // recall not from same streams as other sessions
   187 	RArray<TUserPlaneTransportSessionState>	iRecoverySessions; // recall not from same streams as other sessions
   184 
   188 
   185 	RArray<const TArray<TUserPlaneTransportSessionState> > iSessions;
   189 	RArray<const TArray<TUserPlaneTransportSessionState> > iSessions;
   200 #endif
   204 #endif
   201 	// could have send iterator?
   205 	// could have send iterator?
   202 	};
   206 	};
   203 
   207 
   204 inline CMuxChannel::TUserPlaneTransportSessionState::TUserPlaneTransportSessionState(
   208 inline CMuxChannel::TUserPlaneTransportSessionState::TUserPlaneTransportSessionState(
   205 	CUserPlaneTransportSession& aSession)
   209 	CUserPlaneTransportSession& aSession,
   206 : iSession(aSession)
   210 	TL2CapConfig::TChannelPriority aChannelPriority)
       
   211 	: iSession(aSession)
       
   212 	, iChannelPriority(aChannelPriority)
   207 	{
   213 	{
   208 	}
   214 	}
   209 
   215 
   210 		
   216 		
   211 #endif //AVDTPMUXCHANNEL_H
   217 #endif //AVDTPMUXCHANNEL_H