bluetooth/btstack/avdtp/avdtpMuxChannel.h
branchRCL_3
changeset 56 015fa7494bd2
parent 41 786b94c6f0a4
equal deleted inserted replaced
49:10183c6d2913 56:015fa7494bd2
   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, TL2CapConfig::TChannelPriority aPriority = TL2CapConfig::ELow);
   137 	virtual TInt AttachTransportSession(CUserPlaneTransportSession& aSession, TAvdtpTransportSessionType aType);
   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 	
       
   159 	static TInt MuxSendIntervalCb(TAny* aCMuxChannel);
   157 	static TInt MuxSendIntervalCb(TAny* aCMuxChannel);
   160 	void CheckForClose();
   158 	void CheckForClose();
   161 	TUint DoSend();
   159 	TUint DoSend();
   162 						
   160 						
   163 private:
   161 private:
   171 
   169 
   172 private:
   170 private:
   173 	// receive path	
   171 	// receive path	
   174 	struct TUserPlaneTransportSessionState
   172 	struct TUserPlaneTransportSessionState
   175 		{
   173 		{
   176 		inline TUserPlaneTransportSessionState(CUserPlaneTransportSession& aSession, TL2CapConfig::TChannelPriority aChannelPriority);
   174 		inline TUserPlaneTransportSessionState(CUserPlaneTransportSession& aSession);
   177 		
   175 		
   178 		CUserPlaneTransportSession& iSession;
   176 		CUserPlaneTransportSession& iSession;
   179 		TBool iIsBlocked;
   177 		TBool iIsBlocked;
   180 		TL2CapConfig::TChannelPriority iChannelPriority;
   178 		
   181 		};
   179 		};
   182 		
   180 		
   183 	static void MaxChannelPriority(TL2CapConfig::TChannelPriority& aMaxPriority, const RArray<TUserPlaneTransportSessionState>& aSessions);
       
   184 	
       
   185 	RArray<TUserPlaneTransportSessionState>	iMediaSessions;
   181 	RArray<TUserPlaneTransportSessionState>	iMediaSessions;
   186 	RArray<TUserPlaneTransportSessionState>	iReportingSessions;
   182 	RArray<TUserPlaneTransportSessionState>	iReportingSessions;
   187 	RArray<TUserPlaneTransportSessionState>	iRecoverySessions; // recall not from same streams as other sessions
   183 	RArray<TUserPlaneTransportSessionState>	iRecoverySessions; // recall not from same streams as other sessions
   188 
   184 
   189 	RArray<const TArray<TUserPlaneTransportSessionState> > iSessions;
   185 	RArray<const TArray<TUserPlaneTransportSessionState> > iSessions;
   204 #endif
   200 #endif
   205 	// could have send iterator?
   201 	// could have send iterator?
   206 	};
   202 	};
   207 
   203 
   208 inline CMuxChannel::TUserPlaneTransportSessionState::TUserPlaneTransportSessionState(
   204 inline CMuxChannel::TUserPlaneTransportSessionState::TUserPlaneTransportSessionState(
   209 	CUserPlaneTransportSession& aSession,
   205 	CUserPlaneTransportSession& aSession)
   210 	TL2CapConfig::TChannelPriority aChannelPriority)
   206 : iSession(aSession)
   211 	: iSession(aSession)
       
   212 	, iChannelPriority(aChannelPriority)
       
   213 	{
   207 	{
   214 	}
   208 	}
   215 
   209 
   216 		
   210 		
   217 #endif //AVDTPMUXCHANNEL_H
   211 #endif //AVDTPMUXCHANNEL_H