bluetooth/btstack/avdtp/avdtpMuxChannel.h
branchRCL_3
changeset 22 786b94c6f0a4
parent 0 29b1cd4cb562
--- a/bluetooth/btstack/avdtp/avdtpMuxChannel.h	Thu Jul 15 19:55:36 2010 +0300
+++ b/bluetooth/btstack/avdtp/avdtpMuxChannel.h	Thu Aug 19 11:01:00 2010 +0300
@@ -134,7 +134,7 @@
 								TTCID aRemotelyAssignedTCID);
 
 // management path
-	virtual TInt AttachTransportSession(CUserPlaneTransportSession& aSession, TAvdtpTransportSessionType aType);
+	virtual TInt AttachTransportSession(CUserPlaneTransportSession& aSession, TAvdtpTransportSessionType aType, TL2CapConfig::TChannelPriority aPriority = TL2CapConfig::ELow);
 	virtual void DetachTransportSession(CUserPlaneTransportSession& aSession, TAvdtpTransportSessionType aType);
 	virtual TBool CouldAttachSession(const TAvdtpSockAddr& aAddr);
 	virtual TTCID TCID() const;
@@ -153,7 +153,9 @@
 
 private:	
 	CMuxChannel(CAvdtpProtocol& aProtocol, const TBTDevAddr& aRemoteDevice);
-						 
+	
+	void UpdateChannelPriority();
+	
 	static TInt MuxSendIntervalCb(TAny* aCMuxChannel);
 	void CheckForClose();
 	TUint DoSend();
@@ -171,13 +173,15 @@
 	// receive path	
 	struct TUserPlaneTransportSessionState
 		{
-		inline TUserPlaneTransportSessionState(CUserPlaneTransportSession& aSession);
+		inline TUserPlaneTransportSessionState(CUserPlaneTransportSession& aSession, TL2CapConfig::TChannelPriority aChannelPriority);
 		
 		CUserPlaneTransportSession& iSession;
 		TBool iIsBlocked;
-		
+		TL2CapConfig::TChannelPriority iChannelPriority;
 		};
 		
+	static void MaxChannelPriority(TL2CapConfig::TChannelPriority& aMaxPriority, const RArray<TUserPlaneTransportSessionState>& aSessions);
+	
 	RArray<TUserPlaneTransportSessionState>	iMediaSessions;
 	RArray<TUserPlaneTransportSessionState>	iReportingSessions;
 	RArray<TUserPlaneTransportSessionState>	iRecoverySessions; // recall not from same streams as other sessions
@@ -202,8 +206,10 @@
 	};
 
 inline CMuxChannel::TUserPlaneTransportSessionState::TUserPlaneTransportSessionState(
-	CUserPlaneTransportSession& aSession)
-: iSession(aSession)
+	CUserPlaneTransportSession& aSession,
+	TL2CapConfig::TChannelPriority aChannelPriority)
+	: iSession(aSession)
+	, iChannelPriority(aChannelPriority)
 	{
 	}