|
1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Name : sipietfconnectioncontext.cpp |
|
15 // Part of : sip ietf connection context |
|
16 // implementation |
|
17 // Version : 1.0 |
|
18 // INCLUDE FILES |
|
19 // |
|
20 |
|
21 |
|
22 |
|
23 #include "sipietfconnectioncontext.h" |
|
24 #include "sipmessageelements.h" |
|
25 #include "sipregistrationbinding.h" |
|
26 #include "sipconnection.h" |
|
27 #include "sipclienttransaction.h" |
|
28 #include "siprefresh.h" |
|
29 #include "sipietfprofilecontext.h" |
|
30 #include "sipprofileagent.h" |
|
31 #include "sipconcreteprofile.h" |
|
32 #include "SipProfileLog.h" |
|
33 #include "CSIPProxyResolver.h" |
|
34 #include "siperr.h" |
|
35 #include "sipresponseelements.h" |
|
36 #include <sip.h> |
|
37 #include <siphttpdigest.h> |
|
38 #include <sipprofile.h> |
|
39 |
|
40 |
|
41 // ============================ MEMBER FUNCTIONS =============================== |
|
42 |
|
43 // ----------------------------------------------------------------------------- |
|
44 // CSIPIetfConnectionContext::CSIPIetfConnectionContext |
|
45 // C++ default constructor can NOT contain any code, that |
|
46 // might leave. |
|
47 // ----------------------------------------------------------------------------- |
|
48 // |
|
49 CSIPIetfConnectionContext::CSIPIetfConnectionContext() |
|
50 { |
|
51 } |
|
52 |
|
53 // ----------------------------------------------------------------------------- |
|
54 // CSIPIetfConnectionContext::~CSIPIetfConnectionContext |
|
55 // (other items were commented in a header). |
|
56 // ----------------------------------------------------------------------------- |
|
57 // |
|
58 CSIPIetfConnectionContext::~CSIPIetfConnectionContext() |
|
59 { |
|
60 iContexts.ResetAndDestroy(); |
|
61 |
|
62 delete iProxyResolver; |
|
63 delete iConnection; |
|
64 |
|
65 iUsers.Reset(); |
|
66 iUsers.Close(); |
|
67 |
|
68 delete iSipHttpDigest; |
|
69 delete iSip; |
|
70 } |
|
71 |
|
72 // ----------------------------------------------------------------------------- |
|
73 // CSIPIetfConnectionContext::NewLC |
|
74 // (other items were commented in a header). |
|
75 // ----------------------------------------------------------------------------- |
|
76 // |
|
77 CSIPIetfConnectionContext* CSIPIetfConnectionContext::NewLC() |
|
78 { |
|
79 CSIPIetfConnectionContext* self = |
|
80 new (ELeave) CSIPIetfConnectionContext(); |
|
81 CleanupStack::PushL(self); |
|
82 self->ConstructL(); |
|
83 return self; |
|
84 } |
|
85 |
|
86 // ----------------------------------------------------------------------------- |
|
87 // CSIPIetfConnectionContext::NewL |
|
88 // (other items were commented in a header). |
|
89 // ----------------------------------------------------------------------------- |
|
90 // |
|
91 CSIPIetfConnectionContext* CSIPIetfConnectionContext::NewL() |
|
92 { |
|
93 CSIPIetfConnectionContext* self = |
|
94 CSIPIetfConnectionContext::NewLC(); |
|
95 CleanupStack::Pop(); |
|
96 return self; |
|
97 } |
|
98 |
|
99 // ----------------------------------------------------------------------------- |
|
100 // CSIPIetfConnectionContext::SetConnection |
|
101 // (other items were commented in a header). |
|
102 // ----------------------------------------------------------------------------- |
|
103 // |
|
104 void CSIPIetfConnectionContext::SetConnection(CSIPConnection* aConnection) |
|
105 { |
|
106 delete iConnection; |
|
107 iConnection = aConnection; |
|
108 } |
|
109 |
|
110 // ----------------------------------------------------------------------------- |
|
111 // CSIPIetfConnectionContext::Connection |
|
112 // (other items were commented in a header). |
|
113 // ----------------------------------------------------------------------------- |
|
114 // |
|
115 CSIPConnection* CSIPIetfConnectionContext::Connection() |
|
116 { |
|
117 return iConnection; |
|
118 } |
|
119 |
|
120 // ----------------------------------------------------------------------------- |
|
121 // CSIPIetfConnectionContext::IsIdle |
|
122 // (other items were commented in a header). |
|
123 // ----------------------------------------------------------------------------- |
|
124 // |
|
125 TBool CSIPIetfConnectionContext::IsIdle() const |
|
126 { |
|
127 return (iContexts.Count()==0); |
|
128 } |
|
129 |
|
130 // ----------------------------------------------------------------------------- |
|
131 // CSIPIetfConnectionContext::FindContext |
|
132 // (other items were commented in a header). |
|
133 // ----------------------------------------------------------------------------- |
|
134 // |
|
135 CSIPIetfProfileContext* |
|
136 CSIPIetfConnectionContext::FindContext(TUint32 aProfileId) |
|
137 { |
|
138 CSIPIetfProfileContext* context = 0; |
|
139 TBool found = EFalse; |
|
140 for (TInt i=0; i<iContexts.Count() && !found; i++) |
|
141 { |
|
142 if (iContexts[i]->Profile() && iContexts[i]->Profile()->Id() == aProfileId) |
|
143 { |
|
144 context = iContexts[i]; |
|
145 found = ETrue; |
|
146 } |
|
147 } |
|
148 return context; |
|
149 } |
|
150 |
|
151 // ----------------------------------------------------------------------------- |
|
152 // CSIPIetfConnectionContext::AddProfileContextL |
|
153 // (other items were commented in a header). |
|
154 // ----------------------------------------------------------------------------- |
|
155 // |
|
156 void |
|
157 CSIPIetfConnectionContext::AddProfileContextL(CSIPIetfProfileContext* aContext) |
|
158 { |
|
159 __ASSERT_DEBUG(aContext->Connection().IapId()==iConnection->IapId(), |
|
160 User::Invariant()); |
|
161 User::LeaveIfError(iContexts.Append(aContext)); |
|
162 } |
|
163 |
|
164 // ----------------------------------------------------------------------------- |
|
165 // CSIPIetfConnectionContext::CleanIdleContexts |
|
166 // (other items were commented in a header). |
|
167 // ----------------------------------------------------------------------------- |
|
168 // |
|
169 void CSIPIetfConnectionContext::CleanIdleContexts() |
|
170 { |
|
171 PROFILE_DEBUG1("CSIPIetfConnectionContext::CleanIdleContexts") |
|
172 CSIPIetfProfileContext* context = 0; |
|
173 for (TInt i= iContexts.Count()-1; i >= 0;i--) |
|
174 { |
|
175 PROFILE_DEBUG3("CSIPIetfConnectionContext::CleanIdleContexts iContexts.Count() > 0 i=",i) |
|
176 if (iContexts[i]->CurrentState() == MSIPProfileContext::EInit && |
|
177 iContexts[i]->IsIdle()) |
|
178 { |
|
179 PROFILE_DEBUG1("CSIPIetfConnectionContext::CleanIdleContexts, ProfileContext removed") |
|
180 context = iContexts[i]; |
|
181 iContexts.Remove(i); |
|
182 delete context; |
|
183 context = NULL; |
|
184 } |
|
185 } |
|
186 iContexts.Compress(); |
|
187 } |
|
188 |
|
189 // ----------------------------------------------------------------------------- |
|
190 // CSIPIetfConnectionContext::SetCredentials |
|
191 // ----------------------------------------------------------------------------- |
|
192 // |
|
193 TBool CSIPIetfConnectionContext::SetCredentials( |
|
194 const CSIPClientTransaction& aTransaction, |
|
195 CSIPHttpDigest& aDigest) |
|
196 { |
|
197 TBool found = EFalse; |
|
198 for (TInt i=0; i < iContexts.Count() && !found; i++) |
|
199 { |
|
200 if (iSipHttpDigest) |
|
201 { |
|
202 found = iContexts[i]->SetCredentials(aTransaction,*iSipHttpDigest); |
|
203 } |
|
204 else |
|
205 { |
|
206 found = iContexts[i]->SetCredentials(aTransaction,aDigest); |
|
207 } |
|
208 } |
|
209 return found; |
|
210 } |
|
211 |
|
212 // ----------------------------------------------------------------------------- |
|
213 // CSIPIetfConnectionContext::SetCredentials |
|
214 // ----------------------------------------------------------------------------- |
|
215 // |
|
216 TBool CSIPIetfConnectionContext::SetCredentials( |
|
217 const CSIPRefresh& aRefresh, |
|
218 CSIPHttpDigest& aDigest) |
|
219 { |
|
220 TBool found = EFalse; |
|
221 for (TInt i=0; i < iContexts.Count() && !found; i++) |
|
222 { |
|
223 if (iSipHttpDigest) |
|
224 { |
|
225 found = iContexts[i]->SetCredentials(aRefresh,*iSipHttpDigest); |
|
226 } |
|
227 else |
|
228 { |
|
229 found = iContexts[i]->SetCredentials(aRefresh,aDigest); |
|
230 } |
|
231 } |
|
232 return found; |
|
233 } |
|
234 |
|
235 // ----------------------------------------------------------------------------- |
|
236 // CSIPIetfConnectionContext::ConnectionUser |
|
237 // ----------------------------------------------------------------------------- |
|
238 // |
|
239 TBool CSIPIetfConnectionContext::ConnectionUser( CSIPConcreteProfile& aProfile ) |
|
240 { |
|
241 TBool connectionUser( EFalse ); |
|
242 if ( aProfile.IapId() == iConnection->IapId() ) |
|
243 { |
|
244 connectionUser = ( iUsers.Find( &aProfile ) != KErrNotFound ); |
|
245 } |
|
246 return connectionUser; |
|
247 } |
|
248 |
|
249 // ----------------------------------------------------------------------------- |
|
250 // CSIPIetfConnectionContext::SetConnectionUserL |
|
251 // ----------------------------------------------------------------------------- |
|
252 // |
|
253 void CSIPIetfConnectionContext::SetConnectionUserL( |
|
254 CSIPConcreteProfile& aProfile ) |
|
255 { |
|
256 __ASSERT_ALWAYS( iConnection, User::Leave( KErrNotReady ) ); |
|
257 |
|
258 iUsers.AppendL( &aProfile ); |
|
259 |
|
260 SetConnectionParameters(); |
|
261 } |
|
262 |
|
263 // ----------------------------------------------------------------------------- |
|
264 // CSIPIetfConnectionContext::CreateSipL |
|
265 // ----------------------------------------------------------------------------- |
|
266 // |
|
267 CSIP& CSIPIetfConnectionContext::CreateSipL( |
|
268 MSIPObserver& aSipObserver, |
|
269 MSIPHttpDigestChallengeObserver2& aSipHttpDigestObserver ) |
|
270 { |
|
271 __ASSERT_ALWAYS( !iSip, User::Leave( KErrAlreadyExists ) ); |
|
272 __ASSERT_ALWAYS( !iSipHttpDigest, User::Leave( KErrAlreadyExists ) ); |
|
273 |
|
274 iSip = CSIP::NewL( TUid::Null(), aSipObserver ); |
|
275 iSipHttpDigest = CSIPHttpDigest::NewL( *iSip, aSipHttpDigestObserver ); |
|
276 return *iSip; |
|
277 } |
|
278 |
|
279 // ----------------------------------------------------------------------------- |
|
280 // CSIPIetfConnectionContext::ResolveL |
|
281 // (other items were commented in a header). |
|
282 // ----------------------------------------------------------------------------- |
|
283 // |
|
284 void CSIPIetfConnectionContext::ResolveL() |
|
285 { |
|
286 CleanProxyResolving(); |
|
287 ResolveProxyL(); |
|
288 } |
|
289 |
|
290 // ----------------------------------------------------------------------------- |
|
291 // CSIPIetfConnectionContext::ResolveProxyL |
|
292 // (other items were commented in a header). |
|
293 // ----------------------------------------------------------------------------- |
|
294 // |
|
295 void CSIPIetfConnectionContext::ResolveProxyL() |
|
296 { |
|
297 PROFILE_DEBUG1("CSIPIetfConnectionContext::ResolveProxyL") |
|
298 if (iProxyResolveRequestId == 0) |
|
299 { |
|
300 if (iProxyResolver == 0) |
|
301 { |
|
302 iProxyResolver = CSIPProxyResolver::NewL(); |
|
303 } |
|
304 |
|
305 if (iConnection->State() == CSIPConnection::EActive) |
|
306 { |
|
307 PROFILE_DEBUG1("CSIPIetfConnectionContext::ResolveProxyL, resolving") |
|
308 iProxyResolver->ResolveProxyL( |
|
309 iProxyResolveRequestId, iConnection->IapId(), *this); |
|
310 } |
|
311 } |
|
312 PROFILE_DEBUG1("CSIPIetfConnectionContext::ResolveProxyL, exit") |
|
313 } |
|
314 |
|
315 // ----------------------------------------------------------------------------- |
|
316 // CSIPIetfConnectionContext::CleanProxyResolving |
|
317 // (other items were commented in a header). |
|
318 // ----------------------------------------------------------------------------- |
|
319 // |
|
320 void CSIPIetfConnectionContext::CleanProxyResolving() |
|
321 { |
|
322 PROFILE_DEBUG1("CSIPIetfConnectionContext::CleanProxyResolving") |
|
323 if(iProxyResolveRequestId) |
|
324 { |
|
325 iProxyResolver->Cancel(iProxyResolveRequestId); |
|
326 iProxyResolveRequestId = 0; |
|
327 } |
|
328 } |
|
329 |
|
330 // ----------------------------------------------------------------------------- |
|
331 // CSIPIetfConnectionContext::ConnectionStateChanged |
|
332 // (other items were commented in a header). |
|
333 // ----------------------------------------------------------------------------- |
|
334 // |
|
335 void CSIPIetfConnectionContext::ConnectionStateChanged( |
|
336 CSIPConnection::TState aState) |
|
337 { |
|
338 PROFILE_DEBUG1("CSIPIetfConnectionContext::ConnectionStateChanged") |
|
339 if (aState == CSIPConnection::EActive) |
|
340 { |
|
341 PROFILE_DEBUG1("ConnectionStateChanged, Active") |
|
342 } |
|
343 else if (aState == CSIPConnection::EInactive |
|
344 || aState == CSIPConnection::EUnavailable) |
|
345 { |
|
346 PROFILE_DEBUG3("ConnectionStateChanged, state: ", aState) |
|
347 CleanProxyResolving(); |
|
348 } |
|
349 else |
|
350 { |
|
351 PROFILE_DEBUG3("ConnectionStateChanged, state: ", aState) |
|
352 //makes pclint happy |
|
353 } |
|
354 |
|
355 CleanIdleContexts(); |
|
356 |
|
357 for (TInt i=0; i<iContexts.Count(); i++) |
|
358 { |
|
359 iContexts[i]->ConnectionStateChanged(aState); |
|
360 } |
|
361 } |
|
362 |
|
363 // ----------------------------------------------------------------------------- |
|
364 // CSIPIetfConnectionContext::IncomingResponse |
|
365 // (other items were commented in a header). |
|
366 // ----------------------------------------------------------------------------- |
|
367 // |
|
368 void CSIPIetfConnectionContext::IncomingResponse( |
|
369 CSIPClientTransaction& aTransaction, |
|
370 CSIPRegistrationBinding& aRegistration) |
|
371 { |
|
372 PROFILE_DEBUG1("CSIPIetfConnectionContext::IncomingResponse") |
|
373 TBool handled = EFalse; |
|
374 |
|
375 CleanIdleContexts(); |
|
376 |
|
377 for (TInt i=0; i<iContexts.Count() && !handled; i++) |
|
378 { |
|
379 const CSIPResponseElements* response = aTransaction.ResponseElements(); |
|
380 if (response) |
|
381 { |
|
382 TBool isErrorResponse = (response->StatusCode() >= 300); |
|
383 TInt contextCountBefore = iContexts.Count(); |
|
384 |
|
385 iContexts[i]->IncomingResponse(aTransaction, aRegistration, handled); |
|
386 |
|
387 TBool contextRemoved = (iContexts.Count() != contextCountBefore); |
|
388 if (handled && !contextRemoved && isErrorResponse) |
|
389 { |
|
390 iContexts[i]->RetryRegistration(); |
|
391 } |
|
392 } |
|
393 } |
|
394 } |
|
395 |
|
396 // ----------------------------------------------------------------------------- |
|
397 // CSIPIetfConnectionContext::ErrorOccured |
|
398 // (other items were commented in a header). |
|
399 // ----------------------------------------------------------------------------- |
|
400 // |
|
401 void CSIPIetfConnectionContext::ErrorOccured( |
|
402 TInt aError, |
|
403 CSIPClientTransaction& aTransaction, |
|
404 CSIPRegistrationBinding& aRegistration) |
|
405 { |
|
406 PROFILE_DEBUG3("CSIPIetfConnectionContext::ErrorOccured", aError) |
|
407 TBool handled = EFalse; |
|
408 |
|
409 CleanIdleContexts(); |
|
410 |
|
411 for (TInt i=0; i<iContexts.Count() && !handled; i++) |
|
412 { |
|
413 iContexts[i]->ErrorOccured(aError, aTransaction, aRegistration, handled); |
|
414 if (handled && (iProxyResolveRequestId == 0)) |
|
415 { |
|
416 if ( iContexts[i]->RetryTimerInUse() ) |
|
417 { |
|
418 iContexts[i]->RetryDeltaTimer( iContexts[i]->DelayTime(), aError ); |
|
419 } |
|
420 else |
|
421 { |
|
422 iContexts[i]->RetryRegistration(); |
|
423 } |
|
424 } |
|
425 } |
|
426 } |
|
427 |
|
428 // ----------------------------------------------------------------------------- |
|
429 // CSIPIetfConnectionContext::ErrorOccured |
|
430 // (other items were commented in a header). |
|
431 // ----------------------------------------------------------------------------- |
|
432 // |
|
433 void CSIPIetfConnectionContext::ErrorOccured( |
|
434 TInt aError, |
|
435 CSIPRegistrationBinding& aRegistration) |
|
436 { |
|
437 PROFILE_DEBUG3("CSIPIetfConnectionContext::ErrorOccured", aError) |
|
438 TBool handled = EFalse; |
|
439 |
|
440 CleanIdleContexts(); |
|
441 |
|
442 for (TInt i=0; i<iContexts.Count() && !handled; i++) |
|
443 { |
|
444 if (aError == KErrSIPTerminatedWithResponse) |
|
445 { |
|
446 const CSIPClientTransaction* transaction = |
|
447 iContexts[i]->Registration()->SIPRefresh()->SIPTransaction(); |
|
448 if (transaction) |
|
449 { |
|
450 aError = transaction->ResponseElements()->StatusCode(); |
|
451 iContexts[i]->CSIPProfileContextBase::ErrorOccured(aError, |
|
452 const_cast<CSIPClientTransaction&> (*transaction), |
|
453 aRegistration, |
|
454 handled); |
|
455 } |
|
456 else |
|
457 { |
|
458 iContexts[i]->ErrorOccured(aError, aRegistration, handled); |
|
459 } |
|
460 } |
|
461 else |
|
462 { |
|
463 iContexts[i]->ErrorOccured(aError, aRegistration, handled); |
|
464 } |
|
465 |
|
466 if (handled && (iProxyResolveRequestId == 0)) |
|
467 { |
|
468 if ( iContexts[i]->RetryTimerInUse() ) |
|
469 { |
|
470 iContexts[i]->RetryDeltaTimer( iContexts[i]->DelayTime(), aError ); |
|
471 } |
|
472 else |
|
473 { |
|
474 iContexts[i]->RetryRegistration(); |
|
475 } |
|
476 } |
|
477 } |
|
478 } |
|
479 |
|
480 // ----------------------------------------------------------------------------- |
|
481 // CSIPIetfConnectionContext::ProxyResolvingRequestComplete |
|
482 // (other items were commented in a header). |
|
483 // ----------------------------------------------------------------------------- |
|
484 // |
|
485 void CSIPIetfConnectionContext::ProxyResolvingRequestComplete( |
|
486 TUint /*aRequestId*/, MDesC8Array* aProxies) |
|
487 { |
|
488 PROFILE_DEBUG1("CSIPIetfConnectionContext::ProxyResolvingRequestComplete") |
|
489 iProxyResolveRequestId = 0; |
|
490 |
|
491 CleanIdleContexts(); |
|
492 |
|
493 TInt err = KErrNone; |
|
494 for (TInt i=0; i<iContexts.Count(); i++) |
|
495 { |
|
496 TRAP(err, iContexts[i]->ProxyResolvingRequestCompleteL(*aProxies)); |
|
497 if (err != KErrNone) |
|
498 { |
|
499 iContexts[i]->HandleProxyResolvingError(err); |
|
500 } |
|
501 } |
|
502 delete aProxies; |
|
503 } |
|
504 |
|
505 // ----------------------------------------------------------------------------- |
|
506 // CSIPIetfConnectionContext::ProxyResolvingRequestFailed |
|
507 // (other items were commented in a header). |
|
508 // ----------------------------------------------------------------------------- |
|
509 // |
|
510 void CSIPIetfConnectionContext::ProxyResolvingRequestFailed( |
|
511 TUint /*aRequestId*/, TInt aError) |
|
512 { |
|
513 PROFILE_DEBUG3("CSIPIetfConnectionContext::\ |
|
514 ProxyResolvingRequestFailed", aError) |
|
515 CleanIdleContexts(); |
|
516 iProxyResolveRequestId = 0; |
|
517 |
|
518 for (TInt i=0; i<iContexts.Count(); i++) |
|
519 { |
|
520 iContexts[i]->ProxyResolvingRequestFailed(aError); |
|
521 } |
|
522 } |
|
523 |
|
524 // ----------------------------------------------------------------------------- |
|
525 // CSIPIetfConnectionContext::ConstructL |
|
526 // Symbian 2nd phase constructor can leave. |
|
527 // ----------------------------------------------------------------------------- |
|
528 // |
|
529 void CSIPIetfConnectionContext::ConstructL() |
|
530 { |
|
531 } |
|
532 |
|
533 // ----------------------------------------------------------------------------- |
|
534 // CSIPIetfConnectionContext::ErrorOccured |
|
535 // (other items were commented in a header). |
|
536 // ----------------------------------------------------------------------------- |
|
537 // |
|
538 void CSIPIetfConnectionContext::ErrorOccured( |
|
539 TInt /*aError*/, |
|
540 CSIPTransactionBase& /*aTransaction*/) |
|
541 { |
|
542 } |
|
543 |
|
544 // ----------------------------------------------------------------------------- |
|
545 // CSIPIetfConnectionContext::IncomingRequest |
|
546 // (other items were commented in a header). |
|
547 // ----------------------------------------------------------------------------- |
|
548 // |
|
549 void CSIPIetfConnectionContext::IncomingRequest( |
|
550 CSIPServerTransaction* /*aTransaction*/) |
|
551 { |
|
552 } |
|
553 |
|
554 // ----------------------------------------------------------------------------- |
|
555 // CSIPIetfConnectionContext::IncomingRequest |
|
556 // (other items were commented in a header). |
|
557 // ----------------------------------------------------------------------------- |
|
558 // |
|
559 void CSIPIetfConnectionContext::IncomingRequest( |
|
560 CSIPServerTransaction* /*aTransaction*/, |
|
561 CSIPDialog& /*aDialog*/) |
|
562 { |
|
563 } |
|
564 |
|
565 // ----------------------------------------------------------------------------- |
|
566 // CSIPIetfConnectionContext::IncomingResponse |
|
567 // (other items were commented in a header). |
|
568 // ----------------------------------------------------------------------------- |
|
569 // |
|
570 void CSIPIetfConnectionContext::IncomingResponse( |
|
571 CSIPClientTransaction& /*aTransaction*/) |
|
572 { |
|
573 } |
|
574 |
|
575 // ----------------------------------------------------------------------------- |
|
576 // CSIPIetfConnectionContext::IncomingResponse |
|
577 // (other items were commented in a header). |
|
578 // ----------------------------------------------------------------------------- |
|
579 // |
|
580 void CSIPIetfConnectionContext::IncomingResponse( |
|
581 CSIPClientTransaction& /*aTransaction*/, |
|
582 CSIPDialogAssocBase& /*aDialogAssoc*/) |
|
583 { |
|
584 } |
|
585 |
|
586 // ----------------------------------------------------------------------------- |
|
587 // CSIPIetfConnectionContext::IncomingResponse |
|
588 // (other items were commented in a header). |
|
589 // ----------------------------------------------------------------------------- |
|
590 // |
|
591 void CSIPIetfConnectionContext::IncomingResponse( |
|
592 CSIPClientTransaction& /*aTransaction*/, |
|
593 CSIPInviteDialogAssoc* /*aDialogAssoc*/) |
|
594 { |
|
595 } |
|
596 |
|
597 |
|
598 // ----------------------------------------------------------------------------- |
|
599 // CSIPIetfConnectionContext::ErrorOccured |
|
600 // (other items were commented in a header). |
|
601 // ----------------------------------------------------------------------------- |
|
602 // |
|
603 void CSIPIetfConnectionContext::ErrorOccured( |
|
604 TInt /*aError*/, |
|
605 CSIPDialogAssocBase& /*aDialogAssoc*/) |
|
606 { |
|
607 } |
|
608 // ----------------------------------------------------------------------------- |
|
609 // CSIPIetfConnectionContext::ErrorOccured |
|
610 // (other items were commented in a header). |
|
611 // ----------------------------------------------------------------------------- |
|
612 // |
|
613 void CSIPIetfConnectionContext::ErrorOccured( |
|
614 TInt /*aError*/, |
|
615 CSIPTransactionBase& /*aTransaction*/, |
|
616 CSIPDialogAssocBase& /*aDialogAssoc*/) |
|
617 { |
|
618 } |
|
619 |
|
620 // ----------------------------------------------------------------------------- |
|
621 // CSIPIetfConnectionContext::ErrorOccured |
|
622 // (other items were commented in a header). |
|
623 // ----------------------------------------------------------------------------- |
|
624 // |
|
625 void CSIPIetfConnectionContext::ErrorOccured( |
|
626 TInt /*aError*/, |
|
627 CSIPRefresh& /*aRefresh*/) |
|
628 { |
|
629 } |
|
630 |
|
631 // ----------------------------------------------------------------------------- |
|
632 // CSIPIetfConnectionContext::InviteCompleted |
|
633 // (other items were commented in a header). |
|
634 // ----------------------------------------------------------------------------- |
|
635 // |
|
636 void CSIPIetfConnectionContext::InviteCompleted( |
|
637 CSIPClientTransaction& /*aTransaction*/) |
|
638 { |
|
639 } |
|
640 |
|
641 // ----------------------------------------------------------------------------- |
|
642 // CSIPIetfConnectionContext::InviteCanceled |
|
643 // (other items were commented in a header). |
|
644 // ----------------------------------------------------------------------------- |
|
645 // |
|
646 void CSIPIetfConnectionContext::InviteCanceled( |
|
647 CSIPServerTransaction& /*aTransaction*/) |
|
648 { |
|
649 } |
|
650 |
|
651 // ----------------------------------------------------------------------------- |
|
652 // CSIPIetfConnectionContext::AddIntoQueue |
|
653 // (other items were commented in a header). |
|
654 // ----------------------------------------------------------------------------- |
|
655 // |
|
656 TBool CSIPIetfConnectionContext::AddIntoQueue( const TDesC8& aValue ) |
|
657 { |
|
658 PROFILE_DEBUG1("CSIPIetfConnectionContext::AddIntoQue") |
|
659 TBool result = EFalse; |
|
660 for (TInt i=0; i<iContexts.Count() && !result; i++) |
|
661 { |
|
662 result = iContexts[i]->AddIntoQueue( aValue ); |
|
663 } |
|
664 return result; |
|
665 } |
|
666 |
|
667 // ----------------------------------------------------------------------------- |
|
668 // CSIPIetfConnectionContext::SetConnectionParameters |
|
669 // ----------------------------------------------------------------------------- |
|
670 // |
|
671 void CSIPIetfConnectionContext::SetConnectionParameters() |
|
672 { |
|
673 PROFILE_DEBUG1("CSIPIetfConnectionContext::SetConnectionParameters") |
|
674 |
|
675 // Params are taken from first user |
|
676 if ( iUsers.Count() > 0 && |
|
677 !iConnectionParamsSet && |
|
678 iConnection ) |
|
679 { |
|
680 TUint32 signallingQosValue( 0 ); |
|
681 if ( iUsers[ 0 ]->ExtensionParameter( |
|
682 KSIPSoIpTOS, signallingQosValue ) != KErrNotFound ) |
|
683 { |
|
684 PROFILE_DEBUG3( |
|
685 "CSIPIetfConnectionContext::SetConnectionParametersL, val:", |
|
686 signallingQosValue) |
|
687 |
|
688 // Errors can be ignored as they are not preventing registration |
|
689 TRAP_IGNORE( iConnection->SetOptL( KSoIpTOS, |
|
690 KProtocolInetIp, |
|
691 signallingQosValue ) ) |
|
692 iConnectionParamsSet = ETrue; |
|
693 } |
|
694 } |
|
695 |
|
696 PROFILE_DEBUG1("CSIPIetfConnectionContext::SetConnectionParameters, exit") |
|
697 } |