equal
deleted
inserted
replaced
168 const TBTDevAddr& CBtmRfcommSock::Remote() const |
168 const TBTDevAddr& CBtmRfcommSock::Remote() const |
169 { |
169 { |
170 return iRemote; |
170 return iRemote; |
171 } |
171 } |
172 |
172 |
173 TInt CBtmRfcommSock::RequestMasterRole() |
|
174 { |
|
175 TRACE_FUNC |
|
176 TRACE_ASSERT(iDataSocket, EBTPanicNullPointer) |
|
177 TUint32 basebandState = 0; |
|
178 TInt err = iDataSocket->PhysicalLinkState( basebandState ); |
|
179 if (!err && (basebandState & ENotifySlave)) |
|
180 { |
|
181 err = iDataSocket->RequestMasterRole(); |
|
182 } |
|
183 return err; |
|
184 } |
|
185 |
|
186 TBool CBtmRfcommSock::IsInSniff() const |
173 TBool CBtmRfcommSock::IsInSniff() const |
187 { |
174 { |
188 return iInSniff; |
175 return iInSniff; |
189 } |
176 } |
190 |
177 |
242 iObserver->RfcommConnectCompletedL(aErr); |
229 iObserver->RfcommConnectCompletedL(aErr); |
243 |
230 |
244 if (aErr == KErrNone) |
231 if (aErr == KErrNone) |
245 { |
232 { |
246 iInData.ReAllocL(256); |
233 iInData.ReAllocL(256); |
247 RequestMasterRole(); |
234 // Previously a request to become piconet master was made here, for IOP reasons this |
|
235 // was removed (as theoretically being a piconet master is not required for HFP/HSP AG). |
248 TInt err = iAda.Open(iServer, iRemote); |
236 TInt err = iAda.Open(iServer, iRemote); |
249 TRACE_INFO((_L("ada.Open err %d"), err)) |
237 TRACE_INFO((_L("ada.Open err %d"), err)) |
250 iDataSocket->ActivateBasebandEventNotifier(ENotifyAnyPowerMode | ENotifyAnyRole | |
238 iDataSocket->ActivateBasebandEventNotifier(ENotifyAnyPowerMode | ENotifyAnyRole | |
251 ENotifySCOLinkUp | ENotifySCOLinkDown | |
239 ENotifySCOLinkUp | ENotifySCOLinkDown | |
252 ENotifySCOLinkError | ENotifyPhysicalLinkUp | |
240 ENotifySCOLinkError | ENotifyPhysicalLinkUp | |
273 iObserver->RfcommAcceptCompletedL(aErr, iService); |
261 iObserver->RfcommAcceptCompletedL(aErr, iService); |
274 |
262 |
275 if (aErr == KErrNone) |
263 if (aErr == KErrNone) |
276 { |
264 { |
277 iInData.ReAllocL(256); |
265 iInData.ReAllocL(256); |
278 RequestMasterRole(); |
266 // Previously a request to become piconet master was made here, for IOP reasons this |
|
267 // was removed (as theoretically being a piconet master is not required for HFP/HSP AG). |
279 TInt err = iAda.Open(iServer, iRemote); |
268 TInt err = iAda.Open(iServer, iRemote); |
280 TRACE_INFO((_L("ada.Open err %d"), err)) |
269 TRACE_INFO((_L("ada.Open err %d"), err)) |
281 iDataSocket->ActivateBasebandEventNotifier(ENotifyAnyPowerMode | ENotifyAnyRole | |
270 iDataSocket->ActivateBasebandEventNotifier(ENotifyAnyPowerMode | ENotifyAnyRole | |
282 ENotifySCOLinkUp | ENotifySCOLinkDown | |
271 ENotifySCOLinkUp | ENotifySCOLinkDown | |
283 ENotifySCOLinkError | ENotifyPhysicalLinkUp | |
272 ENotifySCOLinkError | ENotifyPhysicalLinkUp | |