|
1 /* |
|
2 * Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Handles plugin |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include <badesca.h> |
|
21 #include "ccceplugin.h" |
|
22 #include "cconvergedcallprovider.h" |
|
23 #include "cccelogger.h" |
|
24 #include "cccecallcontainer.h" |
|
25 #include "cccetransfercontroller.h" |
|
26 #include "mccpcall.h" |
|
27 #include "mccpcscall.h" |
|
28 #include "mcceobserver.h" |
|
29 #include "cccecall.h" |
|
30 #include "mccecallobserver.h" |
|
31 #include "ccceconferencecall.h" |
|
32 |
|
33 #include "mccpplugindeathobserver.h" |
|
34 #include "mccpssobserver.h" |
|
35 #include "mccessobserver.h" |
|
36 #include "mccptransferprovider.h" |
|
37 #include "tccecallindex.h" |
|
38 |
|
39 #include <featmgr.h> |
|
40 #include "mccpdtmfprovider.h" |
|
41 |
|
42 |
|
43 |
|
44 // ======== MEMBER FUNCTIONS ======== |
|
45 // ----------------------------------------------------------------------------- |
|
46 // NewL() |
|
47 // ----------------------------------------------------------------------------- |
|
48 // |
|
49 CCCEPlugin* CCCEPlugin::NewL( const TUid& aPluginUID, |
|
50 MCCEObserver& aObserver, |
|
51 CCCECallContainer& aCallContainer, |
|
52 MCCPPluginDeathObserver& aDeathObserver, |
|
53 CCCETransferController& aTransferController ) |
|
54 { |
|
55 CCCEPlugin* self = new (ELeave) CCCEPlugin( aPluginUID, |
|
56 aObserver, |
|
57 aCallContainer, |
|
58 aDeathObserver, |
|
59 aTransferController ); |
|
60 CleanupStack::PushL(self); |
|
61 self->ConstructL(); |
|
62 CleanupStack::Pop(self); |
|
63 return self; |
|
64 } |
|
65 |
|
66 // ----------------------------------------------------------------------------- |
|
67 // CCCEPluginManager() |
|
68 // ----------------------------------------------------------------------------- |
|
69 // |
|
70 CCCEPlugin::CCCEPlugin( const TUid& aPluginUID, |
|
71 MCCEObserver& aObserver, |
|
72 CCCECallContainer& aCallContainer, |
|
73 MCCPPluginDeathObserver& aDeathObserver, |
|
74 CCCETransferController& aTransferController ) |
|
75 : iObserver( aObserver ), |
|
76 iCallContainer( aCallContainer ), |
|
77 iTransferController( aTransferController ), |
|
78 iDeathObserver( aDeathObserver ), |
|
79 iPluginId( aPluginUID ), |
|
80 iReleaseWhenIdle( ETrue ) |
|
81 { |
|
82 |
|
83 } |
|
84 |
|
85 // ----------------------------------------------------------------------------- |
|
86 // ConstructL() |
|
87 // ----------------------------------------------------------------------------- |
|
88 // |
|
89 void CCCEPlugin::ConstructL() |
|
90 { |
|
91 FeatureManager::InitializeLibL(); |
|
92 |
|
93 iPlugin = CConvergedCallProvider::NewL( iPluginId ); |
|
94 |
|
95 if(iPlugin) |
|
96 { |
|
97 CCELOGSTRING("CCCEPlugin::GetPluginL: Initialize" ); |
|
98 iPlugin->InitializeL( *this, *this ); |
|
99 } |
|
100 } |
|
101 |
|
102 // ----------------------------------------------------------------------------- |
|
103 // ~CCCEPluginManager() |
|
104 // ----------------------------------------------------------------------------- |
|
105 // |
|
106 CCCEPlugin::~CCCEPlugin() |
|
107 { |
|
108 delete iPlugin; |
|
109 FeatureManager::UnInitializeLib(); |
|
110 } |
|
111 |
|
112 // ----------------------------------------------------------------------------- |
|
113 // Dtmf |
|
114 // ----------------------------------------------------------------------------- |
|
115 // |
|
116 MCCPDTMFProvider& CCCEPlugin::GetDtmfProviderL( |
|
117 const MCCPDTMFObserver& aObserver ) |
|
118 { |
|
119 if( !iDtmfProvider ) |
|
120 { |
|
121 iDtmfProvider = iPlugin->DTMFProviderL( aObserver ); |
|
122 |
|
123 if( !iDtmfProvider ) |
|
124 { |
|
125 CCELOGSTRING("CCCEPlugin::GetDtmfProviderL: Plugin does not support dtmf, leaving with KErrNotSupported" ); |
|
126 // maybe api should be changed to leave with error code instead of returning null |
|
127 User::Leave(KErrNotSupported); |
|
128 } |
|
129 } |
|
130 |
|
131 return *iDtmfProvider; |
|
132 } |
|
133 |
|
134 // ----------------------------------------------------------------------------- |
|
135 // Return protocol interface object of wanted type. |
|
136 // ----------------------------------------------------------------------------- |
|
137 // |
|
138 CConvergedCallProvider* CCCEPlugin::GetPluginL() const |
|
139 { |
|
140 return iPlugin; |
|
141 } |
|
142 |
|
143 // ----------------------------------------------------------------------------- |
|
144 // Primary emergency call objects are created construct time |
|
145 // ----------------------------------------------------------------------------- |
|
146 // |
|
147 void CCCEPlugin::InitialiseEmergencyCallL(MCCPCallObserver& aEmergencyCallObserver) |
|
148 { |
|
149 iEmergencyCall = |
|
150 iPlugin->NewEmergencyCallL( 0, KNullDesC, aEmergencyCallObserver ); |
|
151 } |
|
152 |
|
153 // ----------------------------------------------------------------------------- |
|
154 // Get emergency call handle. |
|
155 // ----------------------------------------------------------------------------- |
|
156 // |
|
157 MCCPEmergencyCall* CCCEPlugin::GetEmergencyCall() const |
|
158 { |
|
159 return iEmergencyCall; |
|
160 } |
|
161 |
|
162 // --------------------------------------------------------------------------- |
|
163 // CCCEPlugin::Type() |
|
164 // --------------------------------------------------------------------------- |
|
165 // |
|
166 TUid CCCEPlugin::Type() const |
|
167 { |
|
168 return iPluginId; |
|
169 } |
|
170 |
|
171 // --------------------------------------------------------------------------- |
|
172 // Returns ETrue if plugin can be relesed if idle |
|
173 // --------------------------------------------------------------------------- |
|
174 // |
|
175 TBool CCCEPlugin::ReleaseWhenIdle() |
|
176 { |
|
177 return iReleaseWhenIdle; |
|
178 } |
|
179 |
|
180 // --------------------------------------------------------------------------- |
|
181 // Set ETrue if plugin should stay permanently in memory |
|
182 // --------------------------------------------------------------------------- |
|
183 // |
|
184 void CCCEPlugin::SetReleaseWhenIdle(TBool aReleaseWhenIdle ) |
|
185 { |
|
186 iReleaseWhenIdle = aReleaseWhenIdle; |
|
187 } |
|
188 |
|
189 // --------------------------------------------------------------------------- |
|
190 // From class MCCPCSObserver |
|
191 // --------------------------------------------------------------------------- |
|
192 // |
|
193 void CCCEPlugin::MoCallCreated( MCCPCall& aCall ) |
|
194 { |
|
195 CCELOGSTRING("CCCEPlugin::MoCallCreated" ); |
|
196 |
|
197 TBool callAllowed = EFalse; |
|
198 |
|
199 //CCELOGSTRING2(" cceparams->iCallType = %d", aCall->Parameters().CallType() ); |
|
200 |
|
201 callAllowed = ( IsCallAllowed() >= 0 ); |
|
202 |
|
203 |
|
204 CCCECall* call = NULL; |
|
205 if( callAllowed ) |
|
206 { |
|
207 call = iCallContainer.GetNextFreeCall(); |
|
208 } |
|
209 |
|
210 if( call ) |
|
211 { |
|
212 TRAPD( error, |
|
213 call->SetConvergedCallL( &aCall, iPluginId ) ); |
|
214 |
|
215 // set observer for the passed call |
|
216 TRAP_IGNORE( aCall.AddObserverL(*call) ); |
|
217 |
|
218 // Error handling |
|
219 if( error ) |
|
220 { |
|
221 CCELOGSTRING( |
|
222 "CCCEPlugin::MoCallCreated:Canceled" ); |
|
223 aCall.Cancel(); |
|
224 call->Release(); |
|
225 } |
|
226 else |
|
227 { |
|
228 CCELOGSTRING( |
|
229 "CCCEPlugin::MoCallCreated:Forwarded" ); |
|
230 // Sets new call index. Normally the call itself |
|
231 // sets the value, but in the case when external client has |
|
232 // created the call we need to set it here, because |
|
233 // the call is already ongoing. |
|
234 call->SetNewCallIndex(); |
|
235 iObserver.MOCallCreated( *call ); |
|
236 } |
|
237 |
|
238 } |
|
239 else |
|
240 { |
|
241 CCELOGSTRING( "CCCEPlugin::MoCallCreated:Error, CCECall not found" ); |
|
242 aCall.Cancel(); |
|
243 iCallContainer.ReleaseCall( aCall, iPluginId ); |
|
244 } |
|
245 } |
|
246 |
|
247 // --------------------------------------------------------------------------- |
|
248 // From class MCCPCSObserver |
|
249 // CCCEPlugin::DataPortName() |
|
250 // --------------------------------------------------------------------------- |
|
251 // |
|
252 void CCCEPlugin::DataPortName( TName& aPortName ) |
|
253 { |
|
254 CCELOGSTRING( "CCCEPlugin::DataPortName" ); |
|
255 iObserver.DataPortName( aPortName ); |
|
256 } |
|
257 |
|
258 // --------------------------------------------------------------------------- |
|
259 // From class MCCPCSObserver |
|
260 // --------------------------------------------------------------------------- |
|
261 // |
|
262 void CCCEPlugin::ConferenceCallCreated( MCCPConferenceCall& aConferenceCall ) |
|
263 { |
|
264 CCELOGSTRING("CCCEPlugin::ConferenceCallCreated IN" ); |
|
265 if( !iCallContainer.ConferenceCall().SetOngoingConferenceCall( |
|
266 aConferenceCall, iPluginId ) ) |
|
267 { |
|
268 iObserver.ConferenceCallCreated( iCallContainer.ConferenceCall() ); |
|
269 } |
|
270 else |
|
271 { |
|
272 iPlugin->ReleaseConferenceCall( aConferenceCall ); |
|
273 } |
|
274 |
|
275 CCELOGSTRING("CCCEPlugin::ConferenceCallCreated OUT" ); |
|
276 } |
|
277 |
|
278 // --------------------------------------------------------------------------- |
|
279 // CCCEPlugin::IsCallAllowed() |
|
280 // --------------------------------------------------------------------------- |
|
281 // |
|
282 TInt CCCEPlugin::IsCallAllowed() const |
|
283 { |
|
284 CCCECall* call; |
|
285 TInt activeNonConferenceCalls = 0; |
|
286 CCPCall::TCallState callState; |
|
287 |
|
288 for( TInt i = 0; i < KCCECallObjects; i++ ) |
|
289 { |
|
290 call = iCallContainer.GetCall( i ); |
|
291 |
|
292 if( call->IsInUse() && |
|
293 !iCallContainer.ConferenceCall().IsPartOfConference( *call ) ) |
|
294 { |
|
295 callState = call->State(); |
|
296 |
|
297 CCELOGSTRING2( "CCCEPlugin::IsCallAllowed:Active call found: State = %d", |
|
298 callState ); |
|
299 |
|
300 switch( callState ) |
|
301 { |
|
302 case CCPCall::EStateQueued: |
|
303 case CCPCall::EStateRinging: |
|
304 case CCPCall::EStateConnecting: |
|
305 { |
|
306 CCELOGSTRING( "CCCEPlugin::IsCallAllowed: KErrGeneral" ); |
|
307 // No other calls allowed |
|
308 } |
|
309 return KErrGeneral; |
|
310 case CCPCall::EStateDialling: |
|
311 { |
|
312 // Dialling -> Cancel it |
|
313 // Telephone UI spec: chapter 3.1.4 |
|
314 call->HangUp(); |
|
315 } |
|
316 break; |
|
317 case CCPCall::EStateDisconnecting: |
|
318 { |
|
319 // Disconnecting -> do nothing |
|
320 } |
|
321 break; |
|
322 default: |
|
323 { |
|
324 // Active/Hold -> Call can be on waiting state |
|
325 activeNonConferenceCalls++; |
|
326 } |
|
327 break; |
|
328 } |
|
329 |
|
330 if( activeNonConferenceCalls >= KCCEMaxNumberOfCalls ) |
|
331 { |
|
332 CCELOGSTRING( "CCCEPlugin::IsCallAllowed: KErrOverflow" ); |
|
333 return KErrOverflow; |
|
334 } |
|
335 |
|
336 } |
|
337 } |
|
338 // In addition to checks made here call should not be allowed |
|
339 // when emergency call is ongoing. This is done in |
|
340 // CCCECallContainer::GetNextFreeCall() |
|
341 |
|
342 CCELOGSTRING( "CCCEPlugin::IsCallAllowed: ETrue" ); |
|
343 return activeNonConferenceCalls; |
|
344 } |
|
345 |
|
346 // --------------------------------------------------------------------------- |
|
347 // CCCEPlugin::IsDataCallAllowed() |
|
348 // --------------------------------------------------------------------------- |
|
349 // |
|
350 TBool CCCEPlugin::IsDataCallAllowed() const |
|
351 { |
|
352 CCELOGSTRING( "CCCEPlugin::IsDataCallAllowed()" ); |
|
353 CCCECall* call = NULL; |
|
354 TInt callCount = 0; |
|
355 CCPCall::TCallState callState; |
|
356 for( TInt i = 0; i < KCCECallObjects; i++ ) |
|
357 { |
|
358 call = iCallContainer.GetCall( i ); |
|
359 callState = call->State(); |
|
360 if( CCPCall::EStateIdle != callState && |
|
361 !iCallContainer.ConferenceCall().IsPartOfConference( *call ) ) |
|
362 { |
|
363 callCount++; |
|
364 } |
|
365 } |
|
366 |
|
367 if( iCallContainer.ConferenceCall().State() != |
|
368 MCCEConferenceCallObserver::ECCEConferenceIdle ) |
|
369 { |
|
370 callCount++; |
|
371 } |
|
372 |
|
373 // In addition to checks made here call should not be allowed |
|
374 // when emergency call is ongoing. This is done in |
|
375 // CCCECallContainer::GetNextFreeCall() |
|
376 |
|
377 CCELOGSTRING2( "CCCEPlugin::IsDataCallAllowed() callCount=%d", callCount ); |
|
378 // Data call cannot be allowed if there is three or more calls ongoing |
|
379 return ( callCount < KCCEMaxNumberOfCalls ); |
|
380 } |
|
381 |
|
382 // --------------------------------------------------------------------------- |
|
383 // From class MCCPObserver |
|
384 // --------------------------------------------------------------------------- |
|
385 // |
|
386 void CCCEPlugin::ErrorOccurred( const TCCPError aError ) |
|
387 { |
|
388 CCELOGSTRING2("CCCEPlugin::ErrorOccurred: Error = %d", aError ); |
|
389 |
|
390 switch (aError) |
|
391 { |
|
392 case ECCPIncomingCallFailed: |
|
393 { |
|
394 if( iReleaseWhenIdle ) |
|
395 { |
|
396 iDeathObserver.CCPPluginInitialisationFailed(iPluginId, aError); |
|
397 } |
|
398 } |
|
399 break; |
|
400 case ECCPRegistrationFailed: |
|
401 { |
|
402 iDeathObserver.CCPPluginInitialisationFailed(iPluginId, aError); |
|
403 } |
|
404 break; |
|
405 default: |
|
406 { |
|
407 CCELOGSTRING("CCCEPlugin::ErrorOccurred: Default"); |
|
408 } |
|
409 break; |
|
410 } |
|
411 } |
|
412 |
|
413 // --------------------------------------------------------------------------- |
|
414 // From class MCCPObserver |
|
415 // --------------------------------------------------------------------------- |
|
416 // |
|
417 void CCCEPlugin::IncomingCall( MCCPCall* aCall, MCCPCall& aTempCall ) |
|
418 { |
|
419 CCELOGSTRING("CCCEPlugin::IncomingCall():IN"); |
|
420 CCELOGSTRING3(" originalcall: aTempCall=0x%x transfercall: aCall=0x%x", &aTempCall, aCall ); |
|
421 |
|
422 if( !aCall || aCall == &aTempCall ) |
|
423 { |
|
424 CCELOGSTRING("CCCEPlugin::IncomingCall(MCCPCall*,MCCPCall&) - Error: Invalid parameters!"); |
|
425 return; |
|
426 } |
|
427 |
|
428 iTransferController.TransferCallIncoming( aCall, &aTempCall ); |
|
429 CCELOGSTRING("CCCEPlugin::IncomingCall():OUT"); |
|
430 } |
|
431 |
|
432 // --------------------------------------------------------------------------- |
|
433 // From class MCCPObserver |
|
434 // --------------------------------------------------------------------------- |
|
435 // |
|
436 void CCCEPlugin::IncomingCall( MCCPCall* aCall ) |
|
437 { |
|
438 CCELOGSTRING( "CCCEPlugin::IncomingCall" ); |
|
439 |
|
440 if( !aCall ) |
|
441 { |
|
442 CCELOGSTRING("CCCEPlugin::IncomingCall(MCCPCall*) - Error: incoming call pointer was null!"); |
|
443 return; |
|
444 } |
|
445 |
|
446 CCCECall* call = NULL; |
|
447 TInt nonConferenceCalls = IsCallAllowed(); |
|
448 |
|
449 if( nonConferenceCalls >= 0 ) |
|
450 { |
|
451 call = iCallContainer.GetNextFreeCall(); |
|
452 } |
|
453 |
|
454 if( call ) |
|
455 { |
|
456 TRAPD( error, |
|
457 call->SetConvergedCallL( aCall, iPluginId ) ); |
|
458 |
|
459 // Order call to ringing state |
|
460 // Requires no active calls and conference call must be idle |
|
461 if( nonConferenceCalls == 0 && |
|
462 iCallContainer.ConferenceCall().State() == |
|
463 MCCEConferenceCallObserver::ECCEConferenceIdle ) |
|
464 { |
|
465 CCELOGSTRING( "CCCEPlugin::IncomingCall:No active calls" ); |
|
466 error = aCall->Ringing(); |
|
467 } |
|
468 else |
|
469 { |
|
470 CCELOGSTRING( "CCCEPlugin::IncomingCall:One active call" ); |
|
471 error = aCall->Queue(); |
|
472 } |
|
473 |
|
474 // Error handling |
|
475 if( error ) |
|
476 { |
|
477 CCELOGSTRING2( "CCCEPlugin::IncomingCall: Error = %d", error ); |
|
478 aCall->Reject(); |
|
479 call->Release(); |
|
480 } |
|
481 else |
|
482 { |
|
483 CCELOGSTRING( "CCCEPlugin::IncomingCall:No errors occurred-> inform phoneengine" ); |
|
484 iObserver.IncomingCall( *call ); |
|
485 } |
|
486 } |
|
487 else |
|
488 { |
|
489 CCELOGSTRING( "CCCEPlugin::IncomingCall:Error, CCECall not found" ); |
|
490 aCall->Reject(); |
|
491 iCallContainer.ReleaseCall( *aCall, iPluginId ); |
|
492 } |
|
493 } |
|
494 |
|
495 // --------------------------------------------------------------------------- |
|
496 // From class MCCPObserver |
|
497 // --------------------------------------------------------------------------- |
|
498 // |
|
499 void CCCEPlugin::CallCreated( MCCPCall* aNewTransferCall, |
|
500 MCCPCall* aOriginator, |
|
501 TBool aAttented ) |
|
502 { |
|
503 CCELOGSTRING2("CCCEPlugin::CallCreated():IN aAttended=%d",aAttented); |
|
504 CCELOGSTRING3(" TransferCall: aNewTransferCall=0x%x OriginalCall: aOriginator=0x%x", |
|
505 aNewTransferCall, aOriginator ); |
|
506 |
|
507 if ( !aNewTransferCall || aNewTransferCall == aOriginator ) |
|
508 { |
|
509 CCELOGSTRING("CCCETransferController::HandleTransferRequest() Error: Invalid parameters!"); |
|
510 return; |
|
511 } |
|
512 |
|
513 if ( aAttented ) |
|
514 { |
|
515 iTransferController.HandleRemoteTransferRequest( aNewTransferCall, |
|
516 aOriginator, aAttented ); |
|
517 } |
|
518 else |
|
519 { |
|
520 TInt nonConferenceCalls = IsCallAllowed(); |
|
521 |
|
522 if ( nonConferenceCalls == 0 || nonConferenceCalls == 1 ) |
|
523 { |
|
524 iTransferController.HandleRemoteTransferRequest( aNewTransferCall, |
|
525 aOriginator, aAttented ); |
|
526 } |
|
527 else |
|
528 { |
|
529 // Reject unattended transfer |
|
530 CCELOGSTRING( "CCCEPlugin::CallCreated(): reject transfer" ); |
|
531 CCCECall* originator = iCallContainer.GetCall( aOriginator ); |
|
532 TRAP_IGNORE( aOriginator->TransferProviderL(*originator)->AcceptTransfer(EFalse) ); |
|
533 iCallContainer.ReleaseCall( *aNewTransferCall ); |
|
534 } |
|
535 } |
|
536 |
|
537 CCELOGSTRING( "CCCEPlugin::CallCreated():OUT" ); |
|
538 } |
|
539 |
|
540 |
|
541 // --------------------------------------------------------------------------- |
|
542 // CCCEPlugin::BarringEventOccurred |
|
543 // --------------------------------------------------------------------------- |
|
544 // |
|
545 void CCCEPlugin::BarringEventOccurred( const MCCPSsObserver::TCCPSsBarringEvent aBarringEvent ) |
|
546 { |
|
547 CCELOGSTRING2("CCCEPlugin::BarringEventOccurred():IN event=%d",aBarringEvent ); |
|
548 |
|
549 if( iCallContainer.SsObserver() ) |
|
550 { |
|
551 // one to one mapping at the moment can be casted directly, change if mapping gets out of sync |
|
552 iCallContainer.SsObserver()->BarringEventOccurred( |
|
553 (MCCESsObserver::TCCESsBarringEvent)aBarringEvent ); |
|
554 } |
|
555 else |
|
556 { |
|
557 CCELOGSTRING( "CCCEPlugin::BarringEventOccurred: Event ignored no observer is set!" ); |
|
558 } |
|
559 |
|
560 CCELOGSTRING( "CCCEPlugin::BarringEventOccurred:OUT" ); |
|
561 } |
|
562 |
|
563 |
|
564 // --------------------------------------------------------------------------- |
|
565 // CCCEPlugin::CLIEventOccurred |
|
566 // --------------------------------------------------------------------------- |
|
567 // |
|
568 void CCCEPlugin::CLIEventOccurred( const MCCPSsObserver::TCCPSsCLIEvent aCallLineEvent ) |
|
569 { |
|
570 CCELOGSTRING2("CCCEPlugin::CLIEventOccurred():IN event=%d",aCallLineEvent ); |
|
571 |
|
572 if( iCallContainer.SsObserver() ) |
|
573 { |
|
574 // one to one mapping at the moment can be casted directly, change if mapping gets out of sync |
|
575 iCallContainer.SsObserver()->CLIEventOccurred( |
|
576 (MCCESsObserver::TCCESsCLIEvent)aCallLineEvent ); |
|
577 } |
|
578 else |
|
579 { |
|
580 CCELOGSTRING( "CCCEPlugin::CLIEventOccurred: Event ignored no observer is set!" ); |
|
581 } |
|
582 |
|
583 CCELOGSTRING( "CCCEPlugin::CLIEventOccurred:OUT" ); |
|
584 } |
|
585 |
|
586 |
|
587 // --------------------------------------------------------------------------- |
|
588 // CCCEPlugin::BarringEventOccurred |
|
589 // --------------------------------------------------------------------------- |
|
590 // |
|
591 void CCCEPlugin::CallForwardEventOccurred( |
|
592 const MCCPSsObserver::TCCPSsCallForwardEvent aCallForwardEvent, |
|
593 const TDesC& aRemoteAddress ) |
|
594 { |
|
595 CCELOGSTRING2("CCCEPlugin::CallForwardEventOccurred():IN event=%d",aCallForwardEvent ); |
|
596 |
|
597 if( iCallContainer.SsObserver() ) |
|
598 { |
|
599 // one to one mapping at the moment can be casted directly, change if mapping gets out of sync |
|
600 iCallContainer.SsObserver()->CallForwardEventOccurred( |
|
601 (MCCESsObserver::TCCESsCallForwardEvent)aCallForwardEvent, |
|
602 aRemoteAddress ); |
|
603 } |
|
604 else |
|
605 { |
|
606 CCELOGSTRING( "CCCEPlugin::CallForwardEventOccurred: Event ignored no observer is set!" ); |
|
607 } |
|
608 |
|
609 CCELOGSTRING( "CCCEPlugin::CallForwardEventOccurred:OUT" ); |
|
610 |
|
611 } |
|
612 |
|
613 |
|
614 // --------------------------------------------------------------------------- |
|
615 // CCCEPlugin::CallCugEventOccurred |
|
616 // --------------------------------------------------------------------------- |
|
617 // |
|
618 void CCCEPlugin::CallCugEventOccurred( const MCCPSsObserver::TCCPSsCugEvent aCugEvent ) |
|
619 { |
|
620 CCELOGSTRING2("CCCEPlugin::CallCugEventOccurred():IN event=%d",aCugEvent ); |
|
621 |
|
622 if( iCallContainer.SsObserver() ) |
|
623 { |
|
624 // one to one mapping at the moment can be casted directly, change if mapping gets out of sync |
|
625 iCallContainer.SsObserver()->CallCugEventOccurred( |
|
626 (MCCESsObserver::TCCESsCugEvent)aCugEvent ); |
|
627 } |
|
628 else |
|
629 { |
|
630 CCELOGSTRING( "CCCEPlugin::CallCugEventOccurred: Event ignored no observer is set!" ); |
|
631 } |
|
632 |
|
633 CCELOGSTRING( "CCCEPlugin::CallCugEventOccurred:OUT" ); |
|
634 } |
|
635 |
|
636 // --------------------------------------------------------------------------- |
|
637 // CCCEPlugin::NotifyCurrentActiveALSLine |
|
638 // --------------------------------------------------------------------------- |
|
639 // |
|
640 void CCCEPlugin::NotifyCurrentActiveALSLine( TInt aLine ) |
|
641 { |
|
642 CCELOGSTRING2("CCCEPlugin::NotifyCurrentActiveALSLine():IN line=%d",aLine ); |
|
643 |
|
644 if( iCallContainer.SsObserver() ) |
|
645 { |
|
646 iCallContainer.SsObserver()->NotifyCurrentActiveALSLine(aLine); |
|
647 } |
|
648 else |
|
649 { |
|
650 CCELOGSTRING( "CCCEPlugin::NotifyCurrentActiveALSLine: Event ignored no observer is set!" ); |
|
651 } |
|
652 |
|
653 CCELOGSTRING( "CCCEPlugin::NotifyCurrentActiveALSLine():OUT" ); |
|
654 } |
|
655 |
|
656 // --------------------------------------------------------------------------- |
|
657 // CCCEPlugin::IsCsPlugin |
|
658 // --------------------------------------------------------------------------- |
|
659 // |
|
660 TBool CCCEPlugin::IsCsPlugin( MCCPCall& aCall ) |
|
661 { |
|
662 TBool isCsPlugin( EFalse ); |
|
663 if ( FeatureManager::FeatureSupported( KFeatureIdFfVoiceCallContinuity ) ) |
|
664 { |
|
665 if ( aCall.Parameters().CallType() != CCPCall::ECallTypePS ) |
|
666 { |
|
667 isCsPlugin = ETrue; |
|
668 } |
|
669 } |
|
670 else |
|
671 { |
|
672 if( iPluginId == KCSProviderUid ) |
|
673 { |
|
674 isCsPlugin = ETrue; |
|
675 } |
|
676 } |
|
677 return isCsPlugin; |
|
678 } |
|
679 |
|
680 // end of file |