equal
deleted
inserted
replaced
43 : CTransportChannel(aProtocol, aRemoteDevice) |
43 : CTransportChannel(aProtocol, aRemoteDevice) |
44 { |
44 { |
45 LOG_FUNC |
45 LOG_FUNC |
46 } |
46 } |
47 |
47 |
48 TInt CDirectChannel::AttachTransportSession(CUserPlaneTransportSession& aSession, TAvdtpTransportSessionType /*aType*/) |
48 TInt CDirectChannel::AttachTransportSession(CUserPlaneTransportSession& aSession, TAvdtpTransportSessionType /*aType*/, TL2CapConfig::TChannelPriority aPriority) |
49 { |
49 { |
50 LOG_FUNC |
50 LOG_FUNC |
51 __ASSERT_DEBUG(!iTransportSession, Panic(EAVDTPBadSessionAttachToTransportChannel)); |
51 __ASSERT_DEBUG(!iTransportSession, Panic(EAVDTPBadSessionAttachToTransportChannel)); |
52 // don't care about session type for direct channels |
|
53 iTransportSession = &aSession; |
52 iTransportSession = &aSession; |
|
53 iChannelPriority = aPriority; |
|
54 UpdateChannelPriority(); |
54 return KErrNone; |
55 return KErrNone; |
55 } |
56 } |
56 |
57 |
|
58 void CDirectChannel::UpdateChannelPriority() |
|
59 { |
|
60 LOG_FUNC |
|
61 |
|
62 if(iLogicalChannel) |
|
63 { |
|
64 TPckgBuf<TL2CapConfig> configBuf; |
|
65 configBuf().ConfigureChannelPriority(iChannelPriority); |
|
66 (void)iLogicalChannel->SetOption(KSolBtL2CAP, KL2CAPUpdateChannelConfig, configBuf); |
|
67 } |
|
68 } |
|
69 |
57 TBool CDirectChannel::CouldAttachSession(const TAvdtpSockAddr& /*aAddr*/) |
70 TBool CDirectChannel::CouldAttachSession(const TAvdtpSockAddr& /*aAddr*/) |
58 { |
71 { |
59 LOG_FUNC |
72 LOG_FUNC |
60 // for this channel we can take iff no session |
73 // for this channel we can take iff no session |
61 return (iTransportSession == NULL); |
74 return (iTransportSession == NULL); |
134 #endif |
147 #endif |
135 { |
148 { |
136 LOG_FUNC |
149 LOG_FUNC |
137 __ASSERT_DEBUG(&aSession == iTransportSession, Panic(EAVDTPBadSessionDetachFromTransportChannel)); |
150 __ASSERT_DEBUG(&aSession == iTransportSession, Panic(EAVDTPBadSessionDetachFromTransportChannel)); |
138 iTransportSession = NULL; |
151 iTransportSession = NULL; |
|
152 iChannelPriority = TL2CapConfig::ELow; |
|
153 |
|
154 UpdateChannelPriority(); |
|
155 |
139 // closing logical channel is async - we die on CanClose |
156 // closing logical channel is async - we die on CanClose |
140 // but we're invalid, so tell protocol |
157 // but we're invalid, so tell protocol |
141 Protocol().TransportChannelClosing(*this); |
158 Protocol().TransportChannelClosing(*this); |
142 CloseLogicalChannel(); |
159 CloseLogicalChannel(); |
143 } |
160 } |