|
1 // Copyright (c) 2006-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 // |
|
15 |
|
16 |
|
17 |
|
18 // INCLUDE FILES |
|
19 #include "cmmcalltsy.h" |
|
20 #include <featmgr/featurecontrol.h> |
|
21 #include <featureuids.h> |
|
22 #include "cmmphonetsy.h" |
|
23 #include "cmmlinetsy.h" |
|
24 #include "cmmtsyreqhandlestore.h" |
|
25 #include "cmmcalllist.h" |
|
26 #include "CMmCommonStaticUtility.h" |
|
27 #include "cmmlinelist.h" |
|
28 #include "cmmmessagemanagerbase.h" |
|
29 #include <ctsy/pluginapi/cmmdatapackage.h> |
|
30 #include <ctsy/serviceapi/gsmerror.h> |
|
31 #include "cmmcallgsmwcdmaext.h" |
|
32 #include <ctsy/pluginapi/mtelephonyaudiocontrol.h> |
|
33 |
|
34 // ======== MEMBER FUNCTIONS ======== |
|
35 |
|
36 CMmCallTsy::CMmCallTsy() : iCallParamsPckg(iCallParams) |
|
37 { |
|
38 } |
|
39 |
|
40 void CMmCallTsy::ConstructL( |
|
41 RMobilePhone::TMobileService aMode ) |
|
42 { |
|
43 #ifdef REQHANDLE_TIMER |
|
44 //Create req handle store |
|
45 iTsyReqHandleStore = CMmTsyReqHandleStore::NewL( this, iMmPhone, |
|
46 EMultimodeCallMaxNumOfRequests, iCallReqHandles); |
|
47 #else |
|
48 //Create req handle store |
|
49 iTsyReqHandleStore = CMmTsyReqHandleStore::NewL( |
|
50 EMultimodeCallMaxNumOfRequests, iCallReqHandles); |
|
51 #endif |
|
52 |
|
53 iCallMode = aMode; |
|
54 |
|
55 //Call ownership change request list |
|
56 iList = CAcquireOwnerList::NewL(); |
|
57 |
|
58 //initialise call duration notifier |
|
59 iCallTimer = CHeartbeatRunner::NewL( this ); |
|
60 |
|
61 //Initialise extension modules |
|
62 InitExtensionModulesL( aMode ); |
|
63 |
|
64 //Initialise miscellaneous internal attributes |
|
65 InitInternalAttributes(); |
|
66 } |
|
67 |
|
68 CMmCallTsy::~CMmCallTsy() |
|
69 { |
|
70 TFLOGSTRING3("TSY: CMmCallTsy::~CMmCallTsy. Call deleted iCallId:%d iCallName:%S",iCallId, &iCallName); |
|
71 |
|
72 TInt trapError( KErrNone ); |
|
73 |
|
74 //Hang up call if call is still connecting or active and hang up is not |
|
75 //called |
|
76 if( iTsyReqHandleStore ) |
|
77 { |
|
78 if ( !( RMobileCall::EStatusIdle == iMobileCallStatus || |
|
79 RMobileCall::EStatusDisconnecting == iMobileCallStatus || |
|
80 RMobileCall::EStatusDisconnectingWithInband == iMobileCallStatus ) |
|
81 && ( 0 == iTsyReqHandleStore->GetTsyReqHandle( |
|
82 EMultimodeCallHangUp ) ) ) |
|
83 { |
|
84 TBool timerStarted = EFalse; |
|
85 if( iCallTimer ) |
|
86 { |
|
87 timerStarted = iCallTimer->Stop(); |
|
88 } |
|
89 //Check air time timer only if call was in active state(call timer |
|
90 //was started) |
|
91 if ( timerStarted ) |
|
92 { |
|
93 if( iMmPhone ) |
|
94 { |
|
95 iMmPhone->AirTimeTimerCheckStop(); |
|
96 //TODO: attention reviewers - please check if UpdateLifeTimer should/shouldn't be called here |
|
97 UpdateLifeTimer(); |
|
98 } |
|
99 } |
|
100 |
|
101 //Send call release request before deleting this object |
|
102 TInt symbianHangUpCause( KErrGsmReleaseByUser ); |
|
103 |
|
104 //Create package |
|
105 CCallDataPackage package; |
|
106 //Set call id and call mode |
|
107 package.SetCallIdAndMode( iCallId, iCallMode ); |
|
108 |
|
109 TBool autoStChangeDisable = EFalse; |
|
110 //Pack call parameters and mobile call info |
|
111 package.PackData( &symbianHangUpCause, &autoStChangeDisable ); |
|
112 //Send request to the Domestic OS layer. |
|
113 if( iMessageManager ) |
|
114 { |
|
115 TRAP( trapError, |
|
116 iMessageManager->HandleRequestL( EEtelCallHangUp, &package ); |
|
117 ); |
|
118 // inform telephony audio control that we're hanging up the call |
|
119 if ( iTelephonyAudioControlSetup && iTelephonyAudioControl ) |
|
120 { |
|
121 iTelephonyAudioControl->TeardownTelephonyAudio( iCallName, |
|
122 KErrNone ); |
|
123 TFLOGSTRING2("TSY: CMmCallTsy::~CMmCallTsy Call routing tear down: Call name:%S", &iCallName ); |
|
124 } |
|
125 |
|
126 } |
|
127 |
|
128 // We can't do nothing if hanguprequest fails here, |
|
129 // because call object is closed. |
|
130 } |
|
131 } |
|
132 |
|
133 //delete req handle store |
|
134 if ( iTsyReqHandleStore ) |
|
135 { |
|
136 delete iTsyReqHandleStore; |
|
137 } |
|
138 iTsyReqHandleStore = NULL; |
|
139 |
|
140 //delete req handle store |
|
141 if ( iList ) |
|
142 { |
|
143 delete iList; |
|
144 } |
|
145 iList = NULL; |
|
146 |
|
147 //delete call ownership change request list |
|
148 if ( iCallTimer ) |
|
149 { |
|
150 delete iCallTimer; |
|
151 } |
|
152 iCallTimer = NULL; |
|
153 |
|
154 //Decrement number of opened calls from line. |
|
155 if( iMmLine ) |
|
156 { |
|
157 iMmLine->DecrementNumberOfCalls(); |
|
158 } |
|
159 |
|
160 // Remove the call from the list of calls |
|
161 if( iMmPhone ) |
|
162 { |
|
163 iMmPhone->CallList()->RemoveObject( this ); |
|
164 } |
|
165 |
|
166 //delete call extension |
|
167 if ( iMmCallExtInterface ) |
|
168 { |
|
169 delete iMmCallExtInterface; |
|
170 } |
|
171 iMmCallExtInterface = NULL; |
|
172 |
|
173 iMmPhone = NULL; |
|
174 iMmLine = NULL; |
|
175 iCallTimer = NULL; |
|
176 iRetNotifyMobileCallCaps = NULL; |
|
177 iRetCaps = NULL; |
|
178 iRetStatus = NULL; |
|
179 iRetMobileCallStatus = NULL; |
|
180 iRetRemotePartyInfo = NULL; |
|
181 iRetTimeIntervalSeconds = NULL; |
|
182 iRetCallEvent = NULL; |
|
183 iList = NULL; |
|
184 iTsyReqHandleStore = NULL; |
|
185 iRetPrivacyStatus = NULL; |
|
186 iMessageManager = NULL; |
|
187 iRetUUI = NULL; |
|
188 } |
|
189 |
|
190 // --------------------------------------------------------------------------- |
|
191 // CMmCallTsy::InitExtensionModulesL |
|
192 // Initialises extension modules for CMmCallTsy |
|
193 // (other items were commented in a header). |
|
194 // --------------------------------------------------------------------------- |
|
195 // |
|
196 void CMmCallTsy::InitExtensionModulesL( |
|
197 RMobilePhone::TMobileService aMode ) |
|
198 { |
|
199 RMobilePhone::TMobilePhoneNetworkMode currentMode; |
|
200 iMmPhone->GetStaticExtensionMode( ¤tMode ); |
|
201 |
|
202 iMmCallExtInterface = reinterpret_cast<CMmCallExtInterface*> |
|
203 (CMmCallGsmWcdmaExt::NewL( this, aMode, iMessageManager ) ); |
|
204 |
|
205 } |
|
206 |
|
207 // --------------------------------------------------------------------------- |
|
208 // CMmCallTsy::InitInternalAttributes |
|
209 // Initialises miscellaneous internal attributes. |
|
210 // (other items were commented in a header). |
|
211 // --------------------------------------------------------------------------- |
|
212 // |
|
213 void CMmCallTsy::InitInternalAttributes() |
|
214 { |
|
215 //Set status parameters |
|
216 iCallStatus = RCall::EStatusIdle; |
|
217 iMobileCallStatus = RMobileCall::EStatusIdle; |
|
218 |
|
219 //Initialise call params |
|
220 iCallParams.iSpeakerControl = RCall::EMonitorSpeakerControlOnUntilCarrier; |
|
221 iCallParams.iSpeakerVolume = RCall::EMonitorSpeakerVolumeLow; |
|
222 iCallParams.iInterval = 4; |
|
223 iCallParams.iWaitForDialTone = RCall::EDialToneWait; |
|
224 iCallParams.iIdRestrict = RMobileCall::EIdRestrictDefault; |
|
225 iCallParams.iCug.iExplicitInvoke = EFalse; |
|
226 iCallParams.iCug.iCugIndex = 0; |
|
227 iCallParams.iCug.iSuppressPrefCug = EFalse; |
|
228 iCallParams.iCug.iSuppressOA = EFalse; |
|
229 iCallParams.iAutoRedial = EFalse; |
|
230 // CallParamsV2 |
|
231 iCallParams.iBearerMode = RMobileCall::EMulticallNotSupported; |
|
232 |
|
233 // CallParamsV7 |
|
234 iCallParams.iCallParamOrigin = RMobileCall::EOriginatorUnknown; |
|
235 iCallParams.iBCRepeatIndicator = RMobileCall::EBCAlternateMode; |
|
236 iCallParams.iIconId.iQualifier = RMobileCall::EIconQualifierNotSet; |
|
237 iCallParams.iIconId.iIdentifier = 0; |
|
238 iCallParams.iAlphaId.Zero(); |
|
239 iCallParams.iSubAddress.Zero(); |
|
240 iCallParams.iBearerCap1.Zero(); |
|
241 iCallParams.iBearerCap2.Zero(); |
|
242 iCallParams.iBCRepeatIndicator = RMobileCall::EBCAlternateMode; |
|
243 |
|
244 iDialCancelFlag = CMmCallTsy::EDialCancelNotCalled; |
|
245 iAnswerCancelFlag = EFalse; |
|
246 iHangUpFlag = EFalse; |
|
247 |
|
248 //this is required for the Conference call. |
|
249 iPreviousCallId = -1; |
|
250 |
|
251 //Initialize last exit code |
|
252 iLastExitCode = KErrNotFound; |
|
253 //this is required for custom tsy |
|
254 iDiagnosticOctet = NULL; |
|
255 |
|
256 //by default a call object has been created through ETel |
|
257 iGhostCall = EFalse; |
|
258 iEtelOriginated = ETrue; |
|
259 |
|
260 iPreviousCallControlCaps = 0; |
|
261 iIsRemoteReleasedCall = EFalse; |
|
262 } |
|
263 |
|
264 // --------------------------------------------------------------------------- |
|
265 // CMmCallTsy::OpenNewObjectByNameL |
|
266 // Creates new object and returns a pointer to it. Not supported. |
|
267 // (other items were commented in a header). |
|
268 // --------------------------------------------------------------------------- |
|
269 // |
|
270 CTelObject* CMmCallTsy::OpenNewObjectByNameL( |
|
271 const TDesC& ) |
|
272 { |
|
273 //Not supported |
|
274 User::Leave( KErrNotSupported ); |
|
275 //lint -e{527} "unreachable code" |
|
276 return NULL; |
|
277 } |
|
278 |
|
279 // --------------------------------------------------------------------------- |
|
280 // CMmCallTsy::OpenNewObjectL |
|
281 // Creates new object and returns a pointer to it. Not supported. |
|
282 // (other items were commented in a header). |
|
283 // --------------------------------------------------------------------------- |
|
284 // |
|
285 CTelObject* CMmCallTsy::OpenNewObjectL( |
|
286 TDes& ) |
|
287 { |
|
288 // Not supported |
|
289 User::Leave( KErrNotSupported ); |
|
290 //lint -e{527} "unreachable code" |
|
291 return NULL; |
|
292 } |
|
293 |
|
294 // --------------------------------------------------------------------------- |
|
295 // CMmCallTsy::ExtFunc |
|
296 // TRAP's all CMmCallTsy related MM API requests in case that they fail. This |
|
297 // method functions only as a centralized TRAP for the DoExtFuncL method that |
|
298 // does the actual mapping of IPC number to TSY method call. |
|
299 // (other items were commented in a header). |
|
300 // --------------------------------------------------------------------------- |
|
301 // |
|
302 TInt CMmCallTsy::ExtFunc( |
|
303 const TTsyReqHandle aTsyReqHandle, |
|
304 const TInt aIpc, |
|
305 const TDataPackage& aPackage ) |
|
306 { |
|
307 TInt ret( KErrNone ); |
|
308 TInt trapError( KErrNone ); |
|
309 |
|
310 //reset last tsy request type |
|
311 iReqHandleType = EMultimodeCallReqHandleUnknown; |
|
312 |
|
313 //before processing further the request, check if offline mode status |
|
314 //is enabled and if the given request can be perfomed in that case. |
|
315 if ( ERfsStateInfoInactive == iMmPhone->GetRfStateInfo () && |
|
316 !IsRequestPossibleInOffline( aIpc ) ) |
|
317 { |
|
318 TFLOGSTRING2("TSY: Offline mode ON, request is not allowed: %d", aIpc ); |
|
319 ret = CMmCommonStaticUtility::EpocErrorCode( |
|
320 KErrGeneral, KErrGsmOfflineOpNotAllowed ); |
|
321 |
|
322 //Complete the request with appropiate error |
|
323 ReqCompleted ( aTsyReqHandle, ret ); |
|
324 } |
|
325 else |
|
326 { |
|
327 TRAP( trapError, ret = DoExtFuncL( aTsyReqHandle, aIpc, aPackage ); ); |
|
328 |
|
329 if ( trapError != KErrNone ) |
|
330 { |
|
331 //error handling. Object cannot be created. |
|
332 ReqCompleted( aTsyReqHandle, trapError ); |
|
333 } |
|
334 else if ( ret != KErrNone ) |
|
335 { |
|
336 ReqCompleted( aTsyReqHandle, ret ); |
|
337 } |
|
338 //save request handle |
|
339 if ( EMultimodeCallReqHandleUnknown != iReqHandleType ) |
|
340 { |
|
341 #ifdef REQHANDLE_TIMER |
|
342 SetTypeOfResponse( iReqHandleType, aTsyReqHandle ); |
|
343 #else |
|
344 iTsyReqHandleStore->SetTsyReqHandle( |
|
345 iReqHandleType, aTsyReqHandle ); |
|
346 #endif |
|
347 } |
|
348 |
|
349 } |
|
350 |
|
351 return KErrNone; |
|
352 } |
|
353 |
|
354 // --------------------------------------------------------------------------- |
|
355 // CMmCallTsy::GetInfo |
|
356 // This CORE API method returns core Call information. |
|
357 // (other items were commented in a header). |
|
358 // --------------------------------------------------------------------------- |
|
359 // |
|
360 TInt CMmCallTsy::GetInfo( |
|
361 const TTsyReqHandle aTsyReqHandle, |
|
362 RCall::TCallInfo* aCallInfo ) |
|
363 { |
|
364 //Fill Core Call information |
|
365 aCallInfo->iCallName = iCallName; |
|
366 aCallInfo->iStatus = iCallStatus; |
|
367 aCallInfo->iLineName = iMmLine->LineName(); |
|
368 aCallInfo->iHookStatus = RCall::EHookStatusUnknown; |
|
369 aCallInfo->iDuration = GetCallDurationInSeconds(); |
|
370 |
|
371 ReqCompleted( aTsyReqHandle, KErrNone ); |
|
372 return KErrNone; |
|
373 } |
|
374 |
|
375 // --------------------------------------------------------------------------- |
|
376 // CMmCallTsy::NotifyCapsChange |
|
377 // This CORE API method requests notifications when core caps change. |
|
378 // (other items were commented in a header). |
|
379 // --------------------------------------------------------------------------- |
|
380 // |
|
381 TInt CMmCallTsy::NotifyCapsChange( |
|
382 const TTsyReqHandle aTsyReqHandle, |
|
383 RCall::TCaps* aCaps ) |
|
384 { |
|
385 iRetCaps = aCaps; |
|
386 //Store the current capabilities |
|
387 iPreviousCaps = iCallCaps; |
|
388 |
|
389 iTsyReqHandleStore->SetTsyReqHandle( |
|
390 EMultimodeCallCapsChangeNotification, aTsyReqHandle ); |
|
391 |
|
392 return KErrNone; |
|
393 } |
|
394 |
|
395 // --------------------------------------------------------------------------- |
|
396 // CMmCallTsy::NotifyCapsChangeCancel |
|
397 // This CORE API method cancels core caps change notifications. |
|
398 // (other items were commented in a header). |
|
399 // --------------------------------------------------------------------------- |
|
400 // |
|
401 TInt CMmCallTsy::NotifyCapsChangeCancel( |
|
402 const TTsyReqHandle aTsyReqHandle ) |
|
403 { |
|
404 iRetCaps = NULL; |
|
405 iTsyReqHandleStore->ResetTsyReqHandle( |
|
406 EMultimodeCallCapsChangeNotification ); |
|
407 |
|
408 ReqCompleted( aTsyReqHandle, KErrCancel ); |
|
409 |
|
410 return KErrNone; |
|
411 } |
|
412 |
|
413 // --------------------------------------------------------------------------- |
|
414 // CMmCallTsy::CompleteNotifyCapsChange |
|
415 // Complete notification when caps change. |
|
416 // (other items were commented in a header). |
|
417 // --------------------------------------------------------------------------- |
|
418 // |
|
419 void CMmCallTsy::CompleteNotifyCapsChange() |
|
420 { |
|
421 //reset req handle. Returns the deleted req handle |
|
422 TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( |
|
423 EMultimodeCallCapsChangeNotification ); |
|
424 |
|
425 //if caps have changed and client has requested capability notifications |
|
426 if ( EMultimodeCallReqHandleUnknown != reqHandle && |
|
427 iRetCaps != NULL && |
|
428 iCallCaps.iFlags != iPreviousCaps.iFlags ) |
|
429 { |
|
430 iRetCaps->iFlags = iCallCaps.iFlags; |
|
431 ReqCompleted( reqHandle, KErrNone ); |
|
432 } |
|
433 } |
|
434 |
|
435 // --------------------------------------------------------------------------- |
|
436 // CMmCallTsy::NotifyHookChange |
|
437 // This CORE API method requests notifications on hook change. |
|
438 // Feature not supported. |
|
439 // (other items were commented in a header). |
|
440 // --------------------------------------------------------------------------- |
|
441 // |
|
442 TInt CMmCallTsy::NotifyHookChange( |
|
443 const TTsyReqHandle aTsyReqHandle, |
|
444 RCall::THookStatus* ) |
|
445 { |
|
446 ReqCompleted( aTsyReqHandle, KErrNotSupported ); |
|
447 return KErrNone; |
|
448 } |
|
449 |
|
450 // --------------------------------------------------------------------------- |
|
451 // CMmCallTsy::NotifyHookChange |
|
452 // This CORE API method cancels hook change notifications. |
|
453 // Feature not supported. |
|
454 // (other items were commented in a header). |
|
455 // --------------------------------------------------------------------------- |
|
456 // |
|
457 TInt CMmCallTsy::NotifyHookChangeCancel( |
|
458 const TTsyReqHandle aTsyReqHandle ) |
|
459 { |
|
460 ReqCompleted( aTsyReqHandle, KErrNotSupported ); |
|
461 return KErrNone; |
|
462 } |
|
463 |
|
464 // --------------------------------------------------------------------------- |
|
465 // CMmCallTsy::NotifyStatusChange |
|
466 // This CORE API method requests notifications when Core status changes. |
|
467 // (other items were commented in a header). |
|
468 // --------------------------------------------------------------------------- |
|
469 // |
|
470 TInt CMmCallTsy::NotifyStatusChange( |
|
471 const TTsyReqHandle aTsyReqHandle, |
|
472 RCall::TStatus* aStatus ) |
|
473 { |
|
474 // Save request handle and ptr to aStatus. |
|
475 iRetStatus = aStatus; |
|
476 iTsyReqHandleStore->SetTsyReqHandle( |
|
477 EMultimodeCallNotifyStatusChange, aTsyReqHandle ); |
|
478 return KErrNone; |
|
479 } |
|
480 |
|
481 // --------------------------------------------------------------------------- |
|
482 // CMmCallTsy::NotifyStatusChangeCancel |
|
483 // This CORE API method cancels core status change notifications. |
|
484 // (other items were commented in a header). |
|
485 // --------------------------------------------------------------------------- |
|
486 // |
|
487 TInt CMmCallTsy::NotifyStatusChangeCancel( |
|
488 const TTsyReqHandle aTsyReqHandle ) |
|
489 { |
|
490 iRetStatus = NULL; |
|
491 iTsyReqHandleStore->ResetTsyReqHandle( EMultimodeCallNotifyStatusChange ); |
|
492 ReqCompleted( aTsyReqHandle, KErrCancel ); |
|
493 return KErrNone; |
|
494 } |
|
495 |
|
496 // --------------------------------------------------------------------------- |
|
497 // CMmCallTsy::HandleGhostCallStatusChange |
|
498 // Handles status change notifications of a call object that is not monitored |
|
499 // by any client (handle to this call object has not been opened by any client). |
|
500 // (other items were commented in a header). |
|
501 // --------------------------------------------------------------------------- |
|
502 // |
|
503 void CMmCallTsy::HandleGhostCallStatusChange( |
|
504 TInt aResult, |
|
505 CMmDataPackage* aDataPackage ) |
|
506 { |
|
507 RMobileCall::TMobileCallStatus callStatus( RMobileCall::EStatusIdle ); |
|
508 RMobileCall::TMobileCallStatus receivedCallStatus( |
|
509 RMobileCall::EStatusIdle ); |
|
510 |
|
511 aDataPackage->UnPackData( receivedCallStatus ); |
|
512 |
|
513 TTsyReqHandle mobileStatusHandle = iTsyReqHandleStore->GetTsyReqHandle( |
|
514 EMultimodeCallNotifyMobileCallStatusChange ); |
|
515 |
|
516 //client is ready for receiving status change indications |
|
517 //or call has entered either idle or active status -> no |
|
518 //more status changes are assumed soon. |
|
519 if ( mobileStatusHandle || |
|
520 ( receivedCallStatus == RMobileCall::EStatusConnected ) || |
|
521 ( receivedCallStatus == RMobileCall::EStatusIdle ) ) |
|
522 { |
|
523 //this call is not anymore a ghost call |
|
524 iGhostCall = EFalse; |
|
525 |
|
526 //idle state indicated -> no more indications waited. |
|
527 if ( RMobileCall::EStatusIdle == receivedCallStatus ) |
|
528 { |
|
529 //ghost call has terminated, inform client |
|
530 CompleteNotifyStatusChange( aResult, aDataPackage ); |
|
531 } |
|
532 //complete one or more simulated status change indications |
|
533 else |
|
534 { |
|
535 if ( RMobileCall::EStatusDisconnecting == receivedCallStatus || |
|
536 RMobileCall::EStatusDisconnectingWithInband == |
|
537 receivedCallStatus ) |
|
538 { |
|
539 CompleteNotifyStatusChange( aResult, aDataPackage ); |
|
540 } |
|
541 else |
|
542 { |
|
543 //Send simulated status indications to the client |
|
544 //since it has missed the real ones. |
|
545 if ( receivedCallStatus >= RMobileCall::EStatusDialling ) |
|
546 { |
|
547 callStatus = RMobileCall::EStatusDialling; |
|
548 aDataPackage->PackData( &callStatus ); |
|
549 CompleteNotifyStatusChange( aResult, aDataPackage ); |
|
550 } |
|
551 if ( receivedCallStatus >= RMobileCall::EStatusConnecting ) |
|
552 { |
|
553 callStatus = RMobileCall::EStatusConnecting; |
|
554 aDataPackage->PackData( &callStatus ); |
|
555 CompleteNotifyStatusChange( aResult, aDataPackage ); |
|
556 } |
|
557 if ( receivedCallStatus >= RMobileCall::EStatusConnected ) |
|
558 { |
|
559 callStatus = RMobileCall::EStatusConnected; |
|
560 aDataPackage->PackData( &callStatus ); |
|
561 CompleteNotifyStatusChange( aResult, aDataPackage ); |
|
562 } |
|
563 } |
|
564 } |
|
565 } |
|
566 } |
|
567 |
|
568 // --------------------------------------------------------------------------- |
|
569 // CMmCallTsy::NotifyDurationChange |
|
570 // This CORE API method requests notification when call duration changes. |
|
571 // (other items were commented in a header). |
|
572 // --------------------------------------------------------------------------- |
|
573 // |
|
574 TInt CMmCallTsy::NotifyDurationChange( |
|
575 const TTsyReqHandle aTsyReqHandle, |
|
576 TTimeIntervalSeconds* aTime ) |
|
577 { |
|
578 iRetTimeIntervalSeconds = aTime; |
|
579 iTsyReqHandleStore->SetTsyReqHandle( |
|
580 EMultimodeCallNotifyDurationChange, aTsyReqHandle ); |
|
581 |
|
582 if ( iCallStatus == RCall::EStatusConnected && iCallTimer != NULL) |
|
583 { |
|
584 //start duration notifications immediately |
|
585 iCallTimer->Start(); |
|
586 } |
|
587 |
|
588 return KErrNone; |
|
589 } |
|
590 |
|
591 // --------------------------------------------------------------------------- |
|
592 // CMmCallTsy::NotifyDurationChangeCancel |
|
593 // This CORE API method cancels call duration change notifications. |
|
594 // (other items were commented in a header). |
|
595 // --------------------------------------------------------------------------- |
|
596 // |
|
597 TInt CMmCallTsy::NotifyDurationChangeCancel( |
|
598 const TTsyReqHandle aTsyReqHandle ) |
|
599 { |
|
600 iRetTimeIntervalSeconds = NULL; |
|
601 |
|
602 if ( iCallTimer != NULL ) |
|
603 { |
|
604 //stop notifications |
|
605 iCallTimer->Stop(); |
|
606 } |
|
607 |
|
608 iTsyReqHandleStore->ResetTsyReqHandle( |
|
609 EMultimodeCallNotifyDurationChange ); |
|
610 |
|
611 ReqCompleted( aTsyReqHandle, KErrCancel ); |
|
612 |
|
613 return KErrNone; |
|
614 } |
|
615 |
|
616 // --------------------------------------------------------------------------- |
|
617 // CMmCallTsy::CompleteNotifyCallDurationChange |
|
618 // Complete notification when duration changes. Timer causes calling of |
|
619 // this completion every second. Type is not defined because this is |
|
620 // called by iCallTimer. |
|
621 // (other items were commented in a header). |
|
622 // --------------------------------------------------------------------------- |
|
623 // |
|
624 void CMmCallTsy::CompleteNotifyCallDurationChange() |
|
625 { |
|
626 //reset req handle. Returns the deleted req handle |
|
627 TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( |
|
628 EMultimodeCallNotifyDurationChange ); |
|
629 |
|
630 if ( EMultimodeCallReqHandleUnknown != reqHandle ) |
|
631 { |
|
632 //get current duration. |
|
633 *iRetTimeIntervalSeconds = GetCallDurationInSeconds(); |
|
634 ReqCompleted( reqHandle, KErrNone ); |
|
635 } |
|
636 } |
|
637 |
|
638 // --------------------------------------------------------------------------- |
|
639 // CMmCallTsy::GetStatus |
|
640 // This CORE API methods returns core call status through the aStatus param. |
|
641 // (other items were commented in a header). |
|
642 // --------------------------------------------------------------------------- |
|
643 // |
|
644 TInt CMmCallTsy::GetStatus( |
|
645 const TTsyReqHandle aTsyReqHandle, |
|
646 RCall::TStatus* aStatus ) |
|
647 { |
|
648 *aStatus = iCallStatus; |
|
649 ReqCompleted( aTsyReqHandle, KErrNone ); |
|
650 return KErrNone; |
|
651 } |
|
652 |
|
653 // --------------------------------------------------------------------------- |
|
654 // CMmCallTsy::GetCaps |
|
655 // This CORE API method returns Core call capabilities. |
|
656 // (other items were commented in a header). |
|
657 // --------------------------------------------------------------------------- |
|
658 // |
|
659 TInt CMmCallTsy::GetCaps( |
|
660 const TTsyReqHandle aTsyReqHandle, |
|
661 RCall::TCaps* aCaps ) |
|
662 { |
|
663 *aCaps = iCallCaps; |
|
664 ReqCompleted( aTsyReqHandle, KErrNone ); |
|
665 return KErrNone; |
|
666 } |
|
667 |
|
668 // --------------------------------------------------------------------------- |
|
669 // CMmCallTsy::DialCancel |
|
670 // This CORE API method cancels an outstanding dial request.Calls HangUp |
|
671 // method to do this and set a flag so that we can know that DialCancel |
|
672 // handling is going on. |
|
673 // (other items were commented in a header). |
|
674 // --------------------------------------------------------------------------- |
|
675 // |
|
676 TInt CMmCallTsy::DialCancel( |
|
677 const TTsyReqHandle aTsyReqHandle ) |
|
678 { |
|
679 TFLOGSTRING3("TSY: CMmCallTsy::DialCancel. Req handle: %d, Call name: %S", aTsyReqHandle, &iCallName); |
|
680 |
|
681 TInt ret( KErrGeneral ); |
|
682 |
|
683 //check if dial cancel has been called |
|
684 if ( CMmCallTsy::EDialCancelNotCalled != iDialCancelFlag ) |
|
685 { |
|
686 ret = KErrServerBusy; |
|
687 } |
|
688 else |
|
689 { |
|
690 ret = KErrNone; |
|
691 iDialCancelFlag = CMmCallTsy::EDialCancelCallCalled; |
|
692 |
|
693 if ( iCallId > 0 || (GetDialFlag()&& iCallStatus!=RMobileCall::EStatusIdle) ) |
|
694 { |
|
695 if ( RMobileCall::EStatusDisconnecting != iMobileCallStatus ) |
|
696 { |
|
697 TFLOGSTRING("TSY: CMmCallTsy::DialCancel Hangup called"); |
|
698 HangUp( aTsyReqHandle ); |
|
699 } |
|
700 else |
|
701 { |
|
702 TFLOGSTRING("TSY: CMmCallTsy::DialCancel skipped Hangup call"); |
|
703 } |
|
704 } |
|
705 } |
|
706 return ret; |
|
707 } |
|
708 |
|
709 // --------------------------------------------------------------------------- |
|
710 // CMmCallTsy::CompleteDial |
|
711 // Completes a Dial request. |
|
712 // (other items were commented in a header). |
|
713 // --------------------------------------------------------------------------- |
|
714 // |
|
715 void CMmCallTsy::CompleteDial( |
|
716 TInt aResult ) |
|
717 { |
|
718 TFLOGSTRING2("TSY: CMmCallTsy::CompleteDial. Result:%d", aResult ); |
|
719 TFLOGSTRING3("TSY: CMmCallTsy::CompleteDial. Call Id:%d Call name:%S", iCallId, &iCallName); |
|
720 |
|
721 //Set dial flag to false |
|
722 SetDialFlag( EFalse ); |
|
723 |
|
724 TTsyReqHandle reqHandle ( EMultimodeCallReqHandleUnknown ); |
|
725 |
|
726 if ( KETelExt3rdPartyV1 == iExtensionId ) |
|
727 { |
|
728 //3rd Party Client |
|
729 //reset req handle. Returns the deleted req handle |
|
730 TFLOGSTRING("TSY: CMmCallTsy::CompleteDial. EMultimodeCallDialISV"); |
|
731 reqHandle = |
|
732 iTsyReqHandleStore->ResetTsyReqHandle( EMultimodeCallDialISV ); |
|
733 |
|
734 } |
|
735 else |
|
736 { |
|
737 //reset req handle. Returns the deleted req handle |
|
738 TFLOGSTRING("TSY: CMmCallTsy::CompleteDial. EMultimodeCallDial"); |
|
739 reqHandle = |
|
740 iTsyReqHandleStore->ResetTsyReqHandle( EMultimodeCallDial ); |
|
741 } |
|
742 |
|
743 |
|
744 if ( EMultimodeCallReqHandleUnknown != reqHandle ) |
|
745 { |
|
746 if ( aResult != KErrNone ) |
|
747 { |
|
748 // The creation has failed. |
|
749 iLastExitCode = aResult; |
|
750 ClearCallStatus(); |
|
751 |
|
752 //Dial has failed, update core status - dial possible again |
|
753 iCallCaps.iFlags |= RCall::KCapsDial; |
|
754 iCallCaps.iFlags &= ~( RCall::KCapsHangUp ); |
|
755 |
|
756 //complete caps change notification |
|
757 CompleteNotifyCapsChange(); |
|
758 } |
|
759 |
|
760 ReqCompleted( reqHandle, aResult ); |
|
761 } |
|
762 } |
|
763 |
|
764 // --------------------------------------------------------------------------- |
|
765 // CMmCallTsy::AnswerIncomingCallCancel |
|
766 // TSY has started a request and it is not possible to then cancel this |
|
767 // request. The best thing for the TSY to do in this case is to call |
|
768 // HangUp method to do this and set a flag so that we can know that |
|
769 // AnswerIncomingCallCancel handling is going on. |
|
770 // (other items were commented in a header). |
|
771 // --------------------------------------------------------------------------- |
|
772 // |
|
773 TInt CMmCallTsy::AnswerIncomingCallCancel( |
|
774 const TTsyReqHandle aTsyReqHandle ) |
|
775 { |
|
776 TFLOGSTRING3("TSY: CMmCallTsy::AnswerIncomingCallCancel. Req handle: %d, Call name: %S", aTsyReqHandle, &iCallName); |
|
777 |
|
778 TInt ret( KErrNone ); |
|
779 |
|
780 if( iAnswerCancelFlag ) |
|
781 { |
|
782 ret = KErrServerBusy; |
|
783 } |
|
784 else |
|
785 { |
|
786 iAnswerCancelFlag = ETrue; |
|
787 |
|
788 if ( 0 < iCallId ) |
|
789 { |
|
790 HangUp( aTsyReqHandle ); |
|
791 } |
|
792 } |
|
793 |
|
794 return ret; |
|
795 } |
|
796 |
|
797 // --------------------------------------------------------------------------- |
|
798 // CMmCallTsy::CompleteAnswerIncomingCall |
|
799 // Completes answer request to client. |
|
800 // (other items were commented in a header). |
|
801 // --------------------------------------------------------------------------- |
|
802 // |
|
803 void CMmCallTsy::CompleteAnswerIncomingCall( |
|
804 TInt aResult ) |
|
805 { |
|
806 TFLOGSTRING2("TSY: CMmCallTsy::CompleteAnswerIncomingCall. Result:%d", aResult ); |
|
807 TFLOGSTRING3("TSY: CMmCallTsy::CompleteAnswerIncomingCall. Call Id:%d Call name:%S", iCallId, &iCallName); |
|
808 |
|
809 TTsyReqHandle reqHandle ( EMultimodeCallReqHandleUnknown ); |
|
810 |
|
811 TFLOGSTRING2("TSY: CMmCallTsy::CompleteAnswerIncomingCall. iExtensionId:%d", iExtensionId ); |
|
812 |
|
813 if ( KETelExt3rdPartyV1 == iExtensionId ) |
|
814 { |
|
815 //3rd Party Client |
|
816 //reset req handle. Returns the deleted req handle |
|
817 reqHandle = |
|
818 iTsyReqHandleStore->ResetTsyReqHandle( EMultimodeCallAnswerISV ); |
|
819 } |
|
820 else |
|
821 { |
|
822 //reset req handle. Returns the deleted req handle |
|
823 reqHandle = |
|
824 iTsyReqHandleStore->ResetTsyReqHandle( EMultimodeCallAnswer ); |
|
825 } |
|
826 |
|
827 if ( EMultimodeCallReqHandleUnknown != reqHandle ) |
|
828 { |
|
829 if ( KErrNone != aResult ) |
|
830 { |
|
831 TInt extendedError( |
|
832 CMmCommonStaticUtility::ExtendedErrorCode( aResult ) ); |
|
833 |
|
834 if ( KErrGsmCCNormalUnspecified == extendedError ) |
|
835 { |
|
836 //Call MT released while answer request was ongoing |
|
837 //Set Symbian error value to disconnected. |
|
838 aResult = CMmCommonStaticUtility::EpocErrorCode( |
|
839 KErrGeneral, KErrDisconnected ); |
|
840 } |
|
841 else |
|
842 { |
|
843 iCallCaps.iFlags |= RCall::KCapsAnswer | RCall::KCapsDial; |
|
844 iCallCaps.iFlags &= ~( RCall::KCapsHangUp ); |
|
845 |
|
846 CompleteNotifyCapsChange(); |
|
847 } |
|
848 |
|
849 iLastExitCode = aResult; |
|
850 |
|
851 ClearCallStatus(); |
|
852 } |
|
853 ReqCompleted( reqHandle, aResult ); |
|
854 } |
|
855 } |
|
856 |
|
857 // --------------------------------------------------------------------------- |
|
858 // CMmCallTsy::HangUpCancel |
|
859 // CORE API method. TSY has started a request and it is not possible to then |
|
860 // cancel this request. The best thing for the TSY to do in this case is to |
|
861 // proceed as though the Cancel never happened. The server's call to the TSY |
|
862 // cancel function will return synchronously. The TSY then continues to wait |
|
863 // for the HangUp() acknowledgemnt and when it receives it, the TSY will |
|
864 // complete the original HangUp request. |
|
865 // (other items were commented in a header). |
|
866 // --------------------------------------------------------------------------- |
|
867 // |
|
868 TInt CMmCallTsy::HangUpCancel( |
|
869 const TTsyReqHandle ) |
|
870 { |
|
871 return KErrNone; |
|
872 } |
|
873 |
|
874 // --------------------------------------------------------------------------- |
|
875 // CMmCallTsy::CompleteHangUp |
|
876 // Completes call hangup (both normal and emergency calls). If the cause value |
|
877 // is different than the sent one, the call release requset has failed. In |
|
878 // this case the causeValue describes the fail cause. Otherwise the call |
|
879 // releasing has succeeded. |
|
880 // (other items were commented in a header). |
|
881 // --------------------------------------------------------------------------- |
|
882 // |
|
883 void CMmCallTsy::CompleteHangUp( |
|
884 TInt aResult ) |
|
885 { |
|
886 TFLOGSTRING2("TSY: CMmCallTsy::CompleteHangUp.\n \t\t\t Result:%d", aResult ); |
|
887 TFLOGSTRING3("TSY: CMmCallTsy::CompleteHangUp. Call Id:%d Call name:%S", iCallId, &iCallName); |
|
888 |
|
889 TInt ret( KErrNone ); |
|
890 |
|
891 // Complete for HangUp request |
|
892 // (not to DialCancel or AnswerIncomingCallCancel) |
|
893 if ( CMmCallTsy::EDialCancelNotCalled == iDialCancelFlag && |
|
894 !iAnswerCancelFlag ) |
|
895 { |
|
896 //reset req handle. Returns the deleted req handle |
|
897 TTsyReqHandle reqHandle = |
|
898 iTsyReqHandleStore->ResetTsyReqHandle( EMultimodeCallHangUp ); |
|
899 |
|
900 if ( EMultimodeCallReqHandleUnknown != reqHandle ) |
|
901 { |
|
902 //if hangup request failed |
|
903 if ( KErrNone != aResult ) |
|
904 { |
|
905 //Hangup failed, it should be still possible to carry out |
|
906 iCallCaps.iFlags |= RCall::KCapsHangUp; |
|
907 |
|
908 //Call status is not idle. HangUp request failed, complete |
|
909 //HangUp request with error. |
|
910 if ( RCall::EStatusIdle != iCallStatus ) |
|
911 { |
|
912 // ignore KErrGsmReleaseByUser, which means that the call ended |
|
913 // because the local user released the call, and must be treated |
|
914 // as a normal return code from the LTSY |
|
915 ret = ( (aResult == KErrGsmReleaseByUser) ? KErrNone : aResult ); |
|
916 } |
|
917 } |
|
918 else |
|
919 { |
|
920 //Dial hangup has succeeded, update core status - |
|
921 //dial possible again |
|
922 iCallCaps.iFlags |= RCall::KCapsDial; |
|
923 |
|
924 if ( KErrGsmCallRejected != iLastExitCode ) |
|
925 { |
|
926 iLastExitCode = KErrNone; |
|
927 } |
|
928 //If client refuses to answer, remove the answering capability |
|
929 iCallCaps.iFlags &= ~( RCall::KCapsAnswer ); |
|
930 } |
|
931 ReqCompleted( reqHandle, ret ); |
|
932 |
|
933 //complete caps change notification |
|
934 CompleteNotifyCapsChange(); |
|
935 } |
|
936 } |
|
937 // Complete for DialCancel or AnswerIncomingCallCancel, success |
|
938 else if ( KErrNone == aResult ) |
|
939 { |
|
940 // Find out if this is cancelling of Dial |
|
941 TTsyReqHandle cancelHandle = iTsyReqHandleStore-> |
|
942 ResetTsyReqHandle( EMultimodeCallDial ); |
|
943 |
|
944 if ( cancelHandle == NULL ) |
|
945 { |
|
946 // Find out if this is cancelling of AnswerIncomingCall |
|
947 cancelHandle = iTsyReqHandleStore-> |
|
948 ResetTsyReqHandle( EMultimodeCallAnswer ); |
|
949 |
|
950 if( NULL == cancelHandle ) |
|
951 { |
|
952 // Find out if this is cancelling of AnswerIncomingCallISV |
|
953 cancelHandle = iTsyReqHandleStore-> |
|
954 ResetTsyReqHandle( EMultimodeCallAnswerISV ); |
|
955 |
|
956 if( NULL == cancelHandle ) |
|
957 { |
|
958 // Find out if this is cancelling of DialISV |
|
959 cancelHandle = iTsyReqHandleStore-> |
|
960 ResetTsyReqHandle( EMultimodeCallDialISV ); |
|
961 |
|
962 if ( NULL == cancelHandle ) |
|
963 { |
|
964 // Find out if this is cancelling of DialNoFdnCheck |
|
965 cancelHandle = iTsyReqHandleStore-> |
|
966 ResetTsyReqHandle( EMultimodeCallDialNoFdnCheck ); |
|
967 } |
|
968 } |
|
969 } |
|
970 } |
|
971 |
|
972 if ( 0 < cancelHandle ) |
|
973 { |
|
974 // Complete with error value KErrCancel |
|
975 ReqCompleted( cancelHandle, KErrCancel ); |
|
976 |
|
977 // Cancel has succeeded, update core status - |
|
978 // dial possible again |
|
979 iCallCaps.iFlags |= RCall::KCapsDial; |
|
980 |
|
981 // If client refuses to answer, remove the answering capability |
|
982 iCallCaps.iFlags &= ~( RCall::KCapsAnswer ); |
|
983 |
|
984 // Complete caps change notification |
|
985 CompleteNotifyCapsChange(); |
|
986 } |
|
987 } |
|
988 // Cancel failed and the request succeeded (connected) |
|
989 else if ( RCall::EStatusConnected == iCallStatus ) |
|
990 { |
|
991 // Find out if this is cancelling of Dial |
|
992 TTsyReqHandle cancelHandle = iTsyReqHandleStore-> |
|
993 ResetTsyReqHandle( EMultimodeCallDial ); |
|
994 |
|
995 if ( cancelHandle == NULL ) |
|
996 { |
|
997 // Find out if this is cancelling of AnswerIncomingCall |
|
998 cancelHandle = iTsyReqHandleStore-> |
|
999 ResetTsyReqHandle( EMultimodeCallAnswer ); |
|
1000 |
|
1001 if( NULL == cancelHandle ) |
|
1002 { |
|
1003 // Find out if this is cancelling of AnswerIncomingCallISV |
|
1004 cancelHandle = iTsyReqHandleStore-> |
|
1005 ResetTsyReqHandle( EMultimodeCallAnswerISV ); |
|
1006 |
|
1007 if( NULL == cancelHandle ) |
|
1008 { |
|
1009 // Find out if this is cancelling of DialISV |
|
1010 cancelHandle = iTsyReqHandleStore-> |
|
1011 ResetTsyReqHandle( EMultimodeCallDialISV ); |
|
1012 |
|
1013 if ( NULL == cancelHandle ) |
|
1014 { |
|
1015 // Find out if this is cancelling of DialNoFdnCheck |
|
1016 cancelHandle = iTsyReqHandleStore-> |
|
1017 ResetTsyReqHandle( EMultimodeCallDialNoFdnCheck ); |
|
1018 } |
|
1019 } |
|
1020 } |
|
1021 } |
|
1022 |
|
1023 // Cancel to Dial or AnswerIncomingCall |
|
1024 if ( 0 < cancelHandle ) |
|
1025 { |
|
1026 // Complete with success (KErrNone) |
|
1027 ReqCompleted( cancelHandle, KErrNone ); |
|
1028 |
|
1029 // Succeeded, update core status - hangup possible again |
|
1030 iCallCaps.iFlags |= RCall::KCapsHangUp; |
|
1031 |
|
1032 // Complete caps change notification |
|
1033 CompleteNotifyCapsChange(); |
|
1034 } |
|
1035 } |
|
1036 |
|
1037 // Reset cancel flags |
|
1038 iDialCancelFlag = CMmCallTsy::EDialCancelNotCalled; |
|
1039 iAnswerCancelFlag = EFalse; |
|
1040 // Reset HangUp flag |
|
1041 iHangUpFlag = EFalse; |
|
1042 } |
|
1043 |
|
1044 // --------------------------------------------------------------------------- |
|
1045 // CMmCallTsy::GetOwnershipStatus |
|
1046 // Get call ownership status. |
|
1047 // (other items were commented in a header). |
|
1048 // --------------------------------------------------------------------------- |
|
1049 // |
|
1050 TInt CMmCallTsy::GetOwnershipStatus( |
|
1051 const TTsyReqHandle, |
|
1052 RCall::TOwnershipStatus* ) |
|
1053 { |
|
1054 return KErrNotSupported; |
|
1055 } |
|
1056 |
|
1057 // --------------------------------------------------------------------------- |
|
1058 // CMmCallTsy::TransferOwnership |
|
1059 // Transfers the call ownership. |
|
1060 // (other items were commented in a header). |
|
1061 // --------------------------------------------------------------------------- |
|
1062 // |
|
1063 TInt CMmCallTsy::TransferOwnership( |
|
1064 const TTsyReqHandle ) |
|
1065 { |
|
1066 return KErrNotSupported; |
|
1067 } |
|
1068 |
|
1069 // --------------------------------------------------------------------------- |
|
1070 // CMmCallTsy::AcquireOwnership |
|
1071 // Acquire the call ownership. |
|
1072 // (other items were commented in a header). |
|
1073 // --------------------------------------------------------------------------- |
|
1074 // |
|
1075 TInt CMmCallTsy::AcquireOwnership( |
|
1076 const TTsyReqHandle ) |
|
1077 { |
|
1078 return KErrNotSupported; |
|
1079 } |
|
1080 |
|
1081 // --------------------------------------------------------------------------- |
|
1082 // CMmCallTsy::AcquireOwnershipCancel |
|
1083 // Cancel the call ownership acquire. |
|
1084 // (other items were commented in a header). |
|
1085 // --------------------------------------------------------------------------- |
|
1086 // |
|
1087 TInt CMmCallTsy::AcquireOwnershipCancel( |
|
1088 const TTsyReqHandle ) |
|
1089 { |
|
1090 return KErrNotSupported; |
|
1091 } |
|
1092 |
|
1093 // --------------------------------------------------------------------------- |
|
1094 // CMmCallTsy::RelinquishOwnership |
|
1095 // Relinquish the call ownership. |
|
1096 // (other items were commented in a header). |
|
1097 // --------------------------------------------------------------------------- |
|
1098 // |
|
1099 TInt CMmCallTsy::RelinquishOwnership() |
|
1100 { |
|
1101 return KErrNotSupported; |
|
1102 } |
|
1103 |
|
1104 // --------------------------------------------------------------------------- |
|
1105 // CMmCallTsy::GetCallParams |
|
1106 // This CORE API method is used for getting Core call parameters. |
|
1107 // (other items were commented in a header). |
|
1108 // --------------------------------------------------------------------------- |
|
1109 // |
|
1110 TInt CMmCallTsy::GetCallParams( |
|
1111 const TTsyReqHandle aTsyReqHandle, |
|
1112 TDes8* aParams ) |
|
1113 { |
|
1114 |
|
1115 if(sizeof(RMobileCall::TMobileCallParamsV1) > aParams->MaxLength()) |
|
1116 { |
|
1117 TFLOGSTRING ("TSY: CMmCallTsy::GetCallParams bad size argument"); |
|
1118 // Complete the request with appropiate error |
|
1119 return KErrArgument; |
|
1120 } |
|
1121 |
|
1122 RMobileCall::TMobileCallParamsV1Pckg* paramsPckgV1 = |
|
1123 reinterpret_cast<RMobileCall::TMobileCallParamsV1Pckg*>( aParams ); |
|
1124 RMobileCall::TMobileCallParamsV1& paramsV1 = ( *paramsPckgV1 )(); |
|
1125 |
|
1126 paramsV1.iSpeakerControl = iCallParams.iSpeakerControl; |
|
1127 paramsV1.iSpeakerVolume = iCallParams.iSpeakerVolume; |
|
1128 paramsV1.iInterval = iCallParams.iInterval; |
|
1129 paramsV1.iWaitForDialTone = iCallParams.iWaitForDialTone; |
|
1130 |
|
1131 //let extension to update mode specific params as well |
|
1132 iMmCallExtInterface->GetCallParams( aParams ); |
|
1133 |
|
1134 ReqCompleted( aTsyReqHandle, KErrNone ); |
|
1135 return KErrNone; |
|
1136 } |
|
1137 |
|
1138 // --------------------------------------------------------------------------- |
|
1139 // CMmCallTsy::GetCallDuration |
|
1140 // This CORE API method is used for getting call duration. Calls |
|
1141 // GetCallDurationInSeconds() method to return the current call duration. |
|
1142 // See details from there. |
|
1143 // (other items were commented in a header). |
|
1144 // --------------------------------------------------------------------------- |
|
1145 // |
|
1146 TInt CMmCallTsy::GetCallDuration( |
|
1147 const TTsyReqHandle aTsyReqHandle, |
|
1148 TTimeIntervalSeconds* aTime ) |
|
1149 { |
|
1150 //get duration |
|
1151 *aTime = GetCallDurationInSeconds(); |
|
1152 ReqCompleted( aTsyReqHandle, KErrNone ); |
|
1153 return KErrNone; |
|
1154 } |
|
1155 |
|
1156 // --------------------------------------------------------------------------- |
|
1157 // CMmCallTsy::CallId |
|
1158 // Returns call ID.of this call |
|
1159 // (other items were commented in a header). |
|
1160 // --------------------------------------------------------------------------- |
|
1161 // |
|
1162 TInt CMmCallTsy::CallId() const |
|
1163 { |
|
1164 return iCallId; |
|
1165 } |
|
1166 |
|
1167 // --------------------------------------------------------------------------- |
|
1168 // CMmCallTsy::SetCallId |
|
1169 // Sets call ID. |
|
1170 // (other items were commented in a header). |
|
1171 // --------------------------------------------------------------------------- |
|
1172 // |
|
1173 TInt CMmCallTsy::SetCallId( |
|
1174 TInt aCallId ) |
|
1175 { |
|
1176 TInt ret( KErrGeneral ); |
|
1177 |
|
1178 if ( aCallId <= KMaxCallIdValue ) |
|
1179 { |
|
1180 iCallId = aCallId; |
|
1181 ret = KErrNone; |
|
1182 } |
|
1183 return ret; |
|
1184 } |
|
1185 |
|
1186 // --------------------------------------------------------------------------- |
|
1187 // CMmCallTsy::SetCallStatus |
|
1188 // Sets call Status. |
|
1189 // (other items were commented in a header). |
|
1190 // --------------------------------------------------------------------------- |
|
1191 // |
|
1192 void CMmCallTsy::SetCallStatus( |
|
1193 RCall::TStatus aCallStatus, |
|
1194 RMobileCall::TMobileCallStatus aMobileCallStatus ) |
|
1195 { |
|
1196 iCallStatus = aCallStatus; |
|
1197 iMobileCallStatus = aMobileCallStatus; |
|
1198 } |
|
1199 |
|
1200 // --------------------------------------------------------------------------- |
|
1201 // CMmCallTsy::SetPreviousCallId |
|
1202 // Sets previous active call ID. The Call ID is set when the call goes to idle |
|
1203 // state. Before the previous call ID is set, all other calls are checked and |
|
1204 // if they have the same previous call ID, their call id will be cleared. This |
|
1205 // is required by Conference call implementation. |
|
1206 // (other items were commented in a header). |
|
1207 // --------------------------------------------------------------------------- |
|
1208 // |
|
1209 void CMmCallTsy::SetPreviousCallId( |
|
1210 TInt aCurrentId ) |
|
1211 { |
|
1212 if ( aCurrentId > 0 ) |
|
1213 { |
|
1214 CMmCallTsy* mmCall = NULL; |
|
1215 |
|
1216 for ( TInt i = 0; i < iMmPhone->CallList()-> |
|
1217 GetNumberOfObjects(); i++ ) |
|
1218 { |
|
1219 mmCall = iMmPhone->CallList()->GetMmCallByIndex( i ); |
|
1220 |
|
1221 if ( mmCall->PreviousCallId() == aCurrentId ) |
|
1222 { |
|
1223 mmCall->SetPreviousCallId( -1 ); |
|
1224 } |
|
1225 } |
|
1226 } |
|
1227 iPreviousCallId = aCurrentId; |
|
1228 } |
|
1229 |
|
1230 // --------------------------------------------------------------------------- |
|
1231 // CMmCallTsy::PreviousCallId |
|
1232 // Returns previous active call ID. The Call ID is reset when the call goes to |
|
1233 // idle state. This is required by Conference call implementation. |
|
1234 // (other items were commented in a header). |
|
1235 // --------------------------------------------------------------------------- |
|
1236 // |
|
1237 TInt CMmCallTsy::PreviousCallId() const |
|
1238 { |
|
1239 return iPreviousCallId; |
|
1240 } |
|
1241 |
|
1242 // --------------------------------------------------------------------------- |
|
1243 // CMmCallTsy::ResetPreviousCallId |
|
1244 // Resets previous active call ID. The Call ID is reset when the call goes to |
|
1245 // idle state. This is required by Conference call implementation. |
|
1246 // (other items were commented in a header). |
|
1247 // --------------------------------------------------------------------------- |
|
1248 // |
|
1249 void CMmCallTsy::ResetPreviousCallId() |
|
1250 { |
|
1251 iPreviousCallId = -1; |
|
1252 } |
|
1253 |
|
1254 // --------------------------------------------------------------------------- |
|
1255 // CMmCallTsy::CallMode |
|
1256 // Returns call mode. |
|
1257 // (other items were commented in a header). |
|
1258 // --------------------------------------------------------------------------- |
|
1259 // |
|
1260 RMobilePhone::TMobileService CMmCallTsy::CallMode() const |
|
1261 { |
|
1262 return iCallMode; |
|
1263 } |
|
1264 |
|
1265 // --------------------------------------------------------------------------- |
|
1266 // CMmCallTsy::CallDirection |
|
1267 // Returns call direction. |
|
1268 // (other items were commented in a header). |
|
1269 // --------------------------------------------------------------------------- |
|
1270 // |
|
1271 RMobileCall::TMobileCallDirection CMmCallTsy::CallDirection() const |
|
1272 { |
|
1273 return iCallDirection; |
|
1274 } |
|
1275 |
|
1276 // --------------------------------------------------------------------------- |
|
1277 // CMmCallTsy::SetCallDirection |
|
1278 // Sets call direction. |
|
1279 // (other items were commented in a header). |
|
1280 // --------------------------------------------------------------------------- |
|
1281 // |
|
1282 TInt CMmCallTsy::SetCallDirection( |
|
1283 RMobileCall::TMobileCallDirection aCallDirection ) |
|
1284 { |
|
1285 iCallDirection = aCallDirection; |
|
1286 return KErrNone; |
|
1287 } |
|
1288 |
|
1289 // --------------------------------------------------------------------------- |
|
1290 // CMmCallTsy::CallName |
|
1291 // Returns call name. |
|
1292 // (other items were commented in a header). |
|
1293 // --------------------------------------------------------------------------- |
|
1294 // |
|
1295 const TDesC& CMmCallTsy::CallName() const |
|
1296 { |
|
1297 return iCallName; |
|
1298 } |
|
1299 |
|
1300 // --------------------------------------------------------------------------- |
|
1301 // CMmCallTsy::SetCallName |
|
1302 // Sets call name. |
|
1303 // (other items were commented in a header). |
|
1304 // --------------------------------------------------------------------------- |
|
1305 // |
|
1306 void CMmCallTsy::SetCallName( |
|
1307 const TName& aCallName ) |
|
1308 { |
|
1309 iCallName = aCallName; |
|
1310 } |
|
1311 |
|
1312 // --------------------------------------------------------------------------- |
|
1313 // CMmCallTsy::SetCallCaps |
|
1314 // Sets call capabilities. |
|
1315 // (other items were commented in a header). |
|
1316 // --------------------------------------------------------------------------- |
|
1317 // |
|
1318 void CMmCallTsy::SetCallCaps( |
|
1319 TUint32 aCallCaps ) |
|
1320 { |
|
1321 iCallCaps.iFlags = aCallCaps; |
|
1322 CompleteNotifyCapsChange(); |
|
1323 } |
|
1324 |
|
1325 // --------------------------------------------------------------------------- |
|
1326 // CMmCallTsy::CallCaps |
|
1327 // Returns call capabilities. |
|
1328 // (other items were commented in a header). |
|
1329 // --------------------------------------------------------------------------- |
|
1330 // |
|
1331 TUint32 CMmCallTsy::CallCaps() const |
|
1332 { |
|
1333 //get call caps |
|
1334 TUint32 aCallCaps = iCallCaps.iFlags; |
|
1335 //return them |
|
1336 return aCallCaps; |
|
1337 } |
|
1338 |
|
1339 // --------------------------------------------------------------------------- |
|
1340 // CMmCallTsy::GetMobileCallCaps |
|
1341 // This function returns the call control and call event dynamic capabilities. |
|
1342 // (other items were commented in a header). |
|
1343 // --------------------------------------------------------------------------- |
|
1344 // |
|
1345 TInt CMmCallTsy::GetMobileCallCaps( |
|
1346 const TTsyReqHandle aTsyReqHandle, |
|
1347 TDes8* aCaps ) |
|
1348 { |
|
1349 TInt ret( KErrArgument ); |
|
1350 |
|
1351 if ( sizeof ( RMobileCall::TMobileCallCapsV1 ) <= aCaps->MaxLength() ) |
|
1352 { |
|
1353 RMobileCall::TMobileCallCapsV1Pckg* callCapsV1Pckg = |
|
1354 reinterpret_cast<RMobileCall::TMobileCallCapsV1Pckg*>( aCaps ); |
|
1355 RMobileCall::TMobileCallCapsV1& callCapsV1 = |
|
1356 ( *callCapsV1Pckg )(); |
|
1357 |
|
1358 if ( KETelExtMultimodeV1 == callCapsV1.ExtensionId() ) |
|
1359 { |
|
1360 ret = KErrNone; |
|
1361 iMmCallExtInterface->GetMobileCallCapsV1( callCapsV1 ); |
|
1362 } |
|
1363 } |
|
1364 |
|
1365 ReqCompleted( aTsyReqHandle, ret ); |
|
1366 return KErrNone; |
|
1367 } |
|
1368 |
|
1369 |
|
1370 // --------------------------------------------------------------------------- |
|
1371 // CMmCallTsy::NotifyMobileCallCapsChange |
|
1372 // Notifies the change of Mobile Call Capabilities. |
|
1373 // (other items were commented in a header). |
|
1374 // --------------------------------------------------------------------------- |
|
1375 // |
|
1376 TInt CMmCallTsy::NotifyMobileCallCapsChange( |
|
1377 TDes8* aCaps ) |
|
1378 { |
|
1379 TInt ret( KErrArgument ); |
|
1380 |
|
1381 if ( sizeof ( RMobileCall::TMobileCallCapsV1 ) <= aCaps->MaxLength() ) |
|
1382 { |
|
1383 RMobileCall::TMobileCallCapsV1Pckg* callCapsV1Pckg = |
|
1384 reinterpret_cast<RMobileCall::TMobileCallCapsV1Pckg*>( aCaps ); |
|
1385 RMobileCall::TMobileCallCapsV1& callCapsV1 = |
|
1386 ( *callCapsV1Pckg )(); |
|
1387 |
|
1388 if ( KETelExtMultimodeV1 == callCapsV1.ExtensionId() ) |
|
1389 { |
|
1390 ret = KErrNone; |
|
1391 iRetNotifyMobileCallCaps = aCaps; |
|
1392 iReqHandleType = EMultimodeCallNotifyMobileCallCapsChange; |
|
1393 } |
|
1394 } |
|
1395 return ret; |
|
1396 |
|
1397 } |
|
1398 |
|
1399 // --------------------------------------------------------------------------- |
|
1400 // CMmCallTsy::NotifyMobileCallCapsChangeCancel |
|
1401 // Cancels an outstanding asynchronous NotifyMobileCallCapsChange request. |
|
1402 // (other items were commented in a header). |
|
1403 // --------------------------------------------------------------------------- |
|
1404 // |
|
1405 TInt CMmCallTsy::NotifyMobileCallCapsChangeCancel( |
|
1406 const TTsyReqHandle aTsyReqHandle ) |
|
1407 { |
|
1408 //reset pointer |
|
1409 iRetNotifyMobileCallCaps = NULL; |
|
1410 iTsyReqHandleStore->ResetTsyReqHandle( |
|
1411 EMultimodeCallNotifyMobileCallCapsChange ); |
|
1412 ReqCompleted( aTsyReqHandle, KErrCancel ); |
|
1413 return KErrNone; |
|
1414 } |
|
1415 |
|
1416 // --------------------------------------------------------------------------- |
|
1417 // CMmCallTsy::CompleteNotifyMobileCallCapsChange |
|
1418 // Completes a NotifyMobileCallCapsChange method. The caps request is directed |
|
1419 // to the currently active protocol extension. |
|
1420 // (other items were commented in a header). |
|
1421 // --------------------------------------------------------------------------- |
|
1422 // |
|
1423 void CMmCallTsy::CompleteNotifyMobileCallCapsChange( |
|
1424 TInt aErrorCode ) |
|
1425 { |
|
1426 //get req handle. |
|
1427 TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle( |
|
1428 EMultimodeCallNotifyMobileCallCapsChange ); |
|
1429 |
|
1430 if ( EMultimodeCallReqHandleUnknown != reqHandle ) |
|
1431 { |
|
1432 RMobileCall::TMobileCallCapsV1Pckg* callCapsV1Pckg = |
|
1433 reinterpret_cast<RMobileCall::TMobileCallCapsV1Pckg*>( |
|
1434 iRetNotifyMobileCallCaps ); |
|
1435 RMobileCall::TMobileCallCapsV1& callCapsV1 = |
|
1436 ( *callCapsV1Pckg )(); |
|
1437 |
|
1438 iMmCallExtInterface->GetMobileCallCapsV1( callCapsV1 ); |
|
1439 |
|
1440 if (callCapsV1.iCallControlCaps != iPreviousCallControlCaps ) |
|
1441 { |
|
1442 //reset req handle. |
|
1443 iTsyReqHandleStore->ResetTsyReqHandle( |
|
1444 EMultimodeCallNotifyMobileCallCapsChange ); |
|
1445 |
|
1446 iPreviousCallControlCaps = callCapsV1.iCallControlCaps; |
|
1447 iRetNotifyMobileCallCaps = NULL; |
|
1448 ReqCompleted( reqHandle, aErrorCode ); |
|
1449 } |
|
1450 } |
|
1451 } |
|
1452 |
|
1453 // --------------------------------------------------------------------------- |
|
1454 // CMmCallTsy::CompleteNotifyMobileCallCapsChange |
|
1455 // Returns a pointer to the active extension. |
|
1456 // (other items were commented in a header). |
|
1457 // --------------------------------------------------------------------------- |
|
1458 // |
|
1459 CMmCallExtInterface* CMmCallTsy::ActiveCallExtension() |
|
1460 { |
|
1461 return iMmCallExtInterface; |
|
1462 } |
|
1463 |
|
1464 // --------------------------------------------------------------------------- |
|
1465 // CMmCallTsy::ClearCallStatus |
|
1466 // Clears internal call status. |
|
1467 // (other items were commented in a header). |
|
1468 // --------------------------------------------------------------------------- |
|
1469 // |
|
1470 void CMmCallTsy::ClearCallStatus() |
|
1471 { |
|
1472 iCallDirection = RMobileCall::EDirectionUnknown; |
|
1473 iEtelOriginated = ETrue; |
|
1474 } |
|
1475 |
|
1476 // --------------------------------------------------------------------------- |
|
1477 // CMmCallTsy::Status |
|
1478 // Returns the current core call status. Can be called from TSY classes. |
|
1479 // (other items were commented in a header). |
|
1480 // --------------------------------------------------------------------------- |
|
1481 // |
|
1482 RCall::TStatus CMmCallTsy::Status() const |
|
1483 { |
|
1484 return iCallStatus; |
|
1485 } |
|
1486 |
|
1487 // --------------------------------------------------------------------------- |
|
1488 // CMmCallTsy::MobileCallStatus |
|
1489 // Returns the current mobile call status. Can be called from TSY classes. |
|
1490 // (other items were commented in a header). |
|
1491 // --------------------------------------------------------------------------- |
|
1492 // |
|
1493 RMobileCall::TMobileCallStatus CMmCallTsy::MobileCallStatus() const |
|
1494 { |
|
1495 return iMobileCallStatus; |
|
1496 } |
|
1497 |
|
1498 // --------------------------------------------------------------------------- |
|
1499 // CMmCallTsy::GetMobileCallStatus |
|
1500 // Returns the current status of the call through the aStatus argument. |
|
1501 // (other items were commented in a header). |
|
1502 // --------------------------------------------------------------------------- |
|
1503 // |
|
1504 TInt CMmCallTsy::GetMobileCallStatus( |
|
1505 const TTsyReqHandle aTsyReqHandle, |
|
1506 RMobileCall::TMobileCallStatus* aStatus ) |
|
1507 { |
|
1508 *aStatus = iMobileCallStatus; |
|
1509 ReqCompleted( aTsyReqHandle, KErrNone ); |
|
1510 return KErrNone; |
|
1511 } |
|
1512 |
|
1513 // --------------------------------------------------------------------------- |
|
1514 // CMmCallTsy::NotifyMobileCallStatusChange |
|
1515 // Allows a client to be notified when the call changes state. The request |
|
1516 // completes when the call changes state, the new state being passed in the |
|
1517 // aStatus parameter. |
|
1518 // (other items were commented in a header). |
|
1519 // --------------------------------------------------------------------------- |
|
1520 // |
|
1521 TInt CMmCallTsy::NotifyMobileCallStatusChange( |
|
1522 RMobileCall::TMobileCallStatus* aStatus ) |
|
1523 { |
|
1524 iRetMobileCallStatus = aStatus; |
|
1525 iReqHandleType = EMultimodeCallNotifyMobileCallStatusChange; |
|
1526 return KErrNone; |
|
1527 } |
|
1528 |
|
1529 // --------------------------------------------------------------------------- |
|
1530 // CMmCallTsy::NotifyMobileCallStatusChangeCancel |
|
1531 // Cancels an outstanding asynchronous NotifyMobileCallStatusChange request. |
|
1532 // (other items were commented in a header). |
|
1533 // --------------------------------------------------------------------------- |
|
1534 // |
|
1535 TInt CMmCallTsy::NotifyMobileCallStatusChangeCancel( |
|
1536 const TTsyReqHandle aTsyReqHandle ) |
|
1537 { |
|
1538 iRetMobileCallStatus = NULL; |
|
1539 iTsyReqHandleStore->ResetTsyReqHandle( |
|
1540 EMultimodeCallNotifyMobileCallStatusChange ); |
|
1541 |
|
1542 ReqCompleted( aTsyReqHandle, KErrCancel ); |
|
1543 return KErrNone; |
|
1544 } |
|
1545 |
|
1546 // --------------------------------------------------------------------------- |
|
1547 // CMmCallTsy::NotifyCallEvent |
|
1548 // Allows clients to be notified when various call events occur. These events |
|
1549 // may be generated locally (i.e. from within the ME) or remotely (by the |
|
1550 // remote connected party). The request completes when an event occurs. Upon |
|
1551 // completion, the aEvent parameter will return the event type. |
|
1552 // (other items were commented in a header). |
|
1553 // --------------------------------------------------------------------------- |
|
1554 // |
|
1555 TInt CMmCallTsy::NotifyCallEvent( |
|
1556 RMobileCall::TMobileCallEvent* aEvent ) |
|
1557 { |
|
1558 iRetCallEvent = aEvent; |
|
1559 iReqHandleType = EMultimodeCallNotifyCallEvent; |
|
1560 return KErrNone; |
|
1561 } |
|
1562 |
|
1563 // --------------------------------------------------------------------------- |
|
1564 // CMmCallTsy::NotifyCallEventCancel |
|
1565 // This method cancels an outstanding asynchronous NotifyCallEvent request. |
|
1566 // (other items were commented in a header). |
|
1567 // --------------------------------------------------------------------------- |
|
1568 // |
|
1569 TInt CMmCallTsy::NotifyCallEventCancel( |
|
1570 const TTsyReqHandle aTsyReqHandle ) |
|
1571 { |
|
1572 iRetCallEvent = NULL; |
|
1573 iTsyReqHandleStore->ResetTsyReqHandle( EMultimodeCallNotifyCallEvent ); |
|
1574 ReqCompleted( aTsyReqHandle, KErrCancel ); |
|
1575 return KErrNone; |
|
1576 } |
|
1577 |
|
1578 // --------------------------------------------------------------------------- |
|
1579 // CMmCallTsy::CompleteNotifyCallEvent |
|
1580 // Allows clients to be notified when various call events occur. |
|
1581 // (other items were commented in a header). |
|
1582 // --------------------------------------------------------------------------- |
|
1583 // |
|
1584 void CMmCallTsy::CompleteNotifyCallEvent( |
|
1585 RMobileCall::TMobileCallEvent aEvent ) |
|
1586 { |
|
1587 //reset req handle. Returns the deleted req handle |
|
1588 TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( |
|
1589 EMultimodeCallNotifyCallEvent ); |
|
1590 |
|
1591 if ( EMultimodeCallReqHandleUnknown != reqHandle && |
|
1592 iRetCallEvent != NULL ) |
|
1593 { |
|
1594 if( IsPartOfConference() && RMobileCall::ERemoteTerminated == aEvent ) |
|
1595 { |
|
1596 TFLOGSTRING("TSY: iIsRemoteReleasedCall = ETrue"); |
|
1597 iIsRemoteReleasedCall = ETrue; |
|
1598 } |
|
1599 *iRetCallEvent = aEvent; |
|
1600 ReqCompleted( reqHandle, KErrNone ); |
|
1601 } |
|
1602 } |
|
1603 |
|
1604 // --------------------------------------------------------------------------- |
|
1605 // CMmCallTsy::CompleteNotifyRemoteCallEvent |
|
1606 // Informs common TSY about a remote event (that cannot be understood from |
|
1607 // status indication. |
|
1608 // (other items were commented in a header). |
|
1609 // --------------------------------------------------------------------------- |
|
1610 // |
|
1611 void CMmCallTsy::CompleteNotifyRemoteCallEvent( |
|
1612 const CMmDataPackage* aDataPackage ) |
|
1613 { |
|
1614 RMobileCall::TMobileCallEvent callEvent( RMobileCall::ERemoteHold ); |
|
1615 aDataPackage->UnPackData( callEvent ); |
|
1616 |
|
1617 switch ( callEvent ) |
|
1618 { |
|
1619 case RMobileCall::ERemoteHold: |
|
1620 case RMobileCall::ERemoteResume: |
|
1621 case RMobileCall::ERemoteTerminated: |
|
1622 case RMobileCall::ERemoteConferenceCreate: |
|
1623 CompleteNotifyCallEvent( callEvent ); |
|
1624 break; |
|
1625 //local events handled by CMmCallTsy::CompleteNotifyStatusChange |
|
1626 case RMobileCall::ELocalHold: |
|
1627 case RMobileCall::ELocalResume: |
|
1628 case RMobileCall::ELocalDeflectCall: |
|
1629 case RMobileCall::ELocalTransfer: |
|
1630 //not supported cases |
|
1631 case RMobileCall::ERemoteTransferring: |
|
1632 case RMobileCall::ERemoteTransferAlerting: |
|
1633 case RMobileCall::ERemoteBarred: |
|
1634 case RMobileCall::ERemoteForwarding: |
|
1635 case RMobileCall::ERemoteWaiting: |
|
1636 case RMobileCall::ELocalBarred: |
|
1637 default: |
|
1638 break; |
|
1639 } |
|
1640 } |
|
1641 |
|
1642 // --------------------------------------------------------------------------- |
|
1643 // CMmCallTsy::GetMobileCallInfo |
|
1644 // The method returns a current snapshot of the call information |
|
1645 // described in the TMobileCallInfoVx class. The class is packaged into |
|
1646 // a TMobileCallInfoVxPckg before being passed to the GetMobileCallInfo method. |
|
1647 // This method actually calls FillMobileCallInfo method to get mobile call |
|
1648 // information. |
|
1649 // (other items were commented in a header). |
|
1650 // --------------------------------------------------------------------------- |
|
1651 // |
|
1652 TInt CMmCallTsy::GetMobileCallInfo( |
|
1653 const TTsyReqHandle aTsyReqHandle, |
|
1654 TDes8* aInfo ) |
|
1655 { |
|
1656 //get the mobile call information |
|
1657 TInt ret = FillMobileCallInfo( aInfo ); |
|
1658 |
|
1659 ReqCompleted( aTsyReqHandle, ret ); |
|
1660 return KErrNone; |
|
1661 } |
|
1662 |
|
1663 // --------------------------------------------------------------------------- |
|
1664 // CMmCallTsy::FillMobileCallInfo |
|
1665 // The method fills a current snapshot of the call information described in |
|
1666 // the TMobileCallInfoVx class to the aInfo. The mode specific fields will |
|
1667 // be filled by the extension. |
|
1668 // (other items were commented in a header). |
|
1669 // --------------------------------------------------------------------------- |
|
1670 // |
|
1671 TInt CMmCallTsy::FillMobileCallInfo( |
|
1672 TDes8* aInfo ) |
|
1673 { |
|
1674 TFLOGSTRING("TSY: CMmCallTsy::FillMobileCallInfo"); |
|
1675 |
|
1676 TInt ret = KErrArgument; |
|
1677 TInt extensionId = 0; |
|
1678 |
|
1679 if ( sizeof ( RMobilePhone::TMultimodeType ) <= aInfo->MaxLength() ) |
|
1680 { |
|
1681 RMobilePhone::TMultimodeTypePckg* infoParamsPckg = |
|
1682 reinterpret_cast<RMobilePhone::TMultimodeTypePckg*>( |
|
1683 aInfo ); |
|
1684 RMobilePhone::TMultimodeType& callInfo = ( *infoParamsPckg )(); |
|
1685 |
|
1686 // get extensionid from the recieved data |
|
1687 extensionId = callInfo.ExtensionId(); |
|
1688 TFLOGSTRING2("TSY: CMmCallTsy::FillMobileCallInfo - extensionid=%d",callInfo.ExtensionId()); |
|
1689 } |
|
1690 |
|
1691 //TMobileCallInfoV1 |
|
1692 if ( KETelExtMultimodeV1 == extensionId || |
|
1693 KETelExtMultimodeV3 == extensionId || |
|
1694 KEtelExtMultimodeV7 == extensionId || |
|
1695 KEtelExtMultimodeV8 == extensionId ) |
|
1696 { |
|
1697 TFLOGSTRING("TSY: CMmCallTsy::FillMobileCallInfo - V1"); |
|
1698 |
|
1699 // Set ret to KErrNone. We can fill this parameter class. |
|
1700 ret = KErrNone; |
|
1701 |
|
1702 RMobileCall::TMobileCallInfoV1Pckg* paramsPckgV1 = |
|
1703 reinterpret_cast<RMobileCall::TMobileCallInfoV1Pckg*>( aInfo ); |
|
1704 RMobileCall::TMobileCallInfoV1& info = ( *paramsPckgV1 )(); |
|
1705 |
|
1706 // set mobilecallinfo default values |
|
1707 FillMobileCallInfoDefaults( &info ); |
|
1708 |
|
1709 // fill specific data |
|
1710 iMmCallExtInterface->FillMobileCallInfo( &info ); |
|
1711 } |
|
1712 |
|
1713 // TMobileCallInfoV3 |
|
1714 if ( KETelExtMultimodeV3 == extensionId || |
|
1715 KEtelExtMultimodeV7 == extensionId || |
|
1716 KEtelExtMultimodeV8 == extensionId ) |
|
1717 { |
|
1718 TFLOGSTRING("TSY: CMmCallTsy::FillMobileCallInfo - V3"); |
|
1719 |
|
1720 RMobileCall::TMobileCallInfoV3Pckg* paramsPckgV3 = |
|
1721 reinterpret_cast<RMobileCall::TMobileCallInfoV3Pckg*>( aInfo ); |
|
1722 RMobileCall::TMobileCallInfoV3& info = ( *paramsPckgV3 )(); |
|
1723 |
|
1724 // fill specific data |
|
1725 iMmCallExtInterface->FillMobileCallInfoV3( &info ) ; |
|
1726 } |
|
1727 |
|
1728 // TMobileCallInfoV7 |
|
1729 if ( KEtelExtMultimodeV7 == extensionId || |
|
1730 KEtelExtMultimodeV8 == extensionId ) |
|
1731 { |
|
1732 TFLOGSTRING("TSY: CMmCallTsy::FillMobileCallInfo - V7"); |
|
1733 |
|
1734 RMobileCall::TMobileCallInfoV7Pckg* paramsPckgV7 = |
|
1735 reinterpret_cast<RMobileCall::TMobileCallInfoV7Pckg*>( aInfo ); |
|
1736 RMobileCall::TMobileCallInfoV7& info = ( *paramsPckgV7 )(); |
|
1737 |
|
1738 // fill specific data |
|
1739 iMmCallExtInterface->FillMobileCallInfoV7( &info ); |
|
1740 } |
|
1741 |
|
1742 // TMobileCallInfoV8 |
|
1743 if ( KEtelExtMultimodeV8 == extensionId ) |
|
1744 { |
|
1745 TFLOGSTRING("TSY: CMmCallTsy::FillMobileCallInfo - V8"); |
|
1746 |
|
1747 RMobileCall::TMobileCallInfoV8Pckg* paramsPckgV8 = |
|
1748 reinterpret_cast<RMobileCall::TMobileCallInfoV8Pckg*>( aInfo ); |
|
1749 RMobileCall::TMobileCallInfoV8& info = ( *paramsPckgV8 )(); |
|
1750 |
|
1751 // fill specific data |
|
1752 iMmCallExtInterface->FillMobileCallInfoV8( &info ); |
|
1753 } |
|
1754 |
|
1755 TFLOGSTRING2("TSY: CMmCallTsy::FillMobileCallInfo end. ret=%d",ret); |
|
1756 |
|
1757 return ret; |
|
1758 } |
|
1759 |
|
1760 // --------------------------------------------------------------------------- |
|
1761 // CMmCallTsy::NotifyRemotePartyInfoChange |
|
1762 // This method allows the client to be notified of any change in the remote |
|
1763 // party information. |
|
1764 // (other items were commented in a header). |
|
1765 // --------------------------------------------------------------------------- |
|
1766 // |
|
1767 TInt CMmCallTsy::NotifyRemotePartyInfoChange( |
|
1768 TDes8* aRemotePartyInfo ) |
|
1769 { |
|
1770 TInt ret = KErrNone; |
|
1771 |
|
1772 if( sizeof( RMobileCall::TMobileCallRemotePartyInfoV1 ) > aRemotePartyInfo->MaxLength() ) |
|
1773 { |
|
1774 TFLOGSTRING ("TSY: CMmCallTsy::NotifyRemotePartyInfoChange Bad size argument"); |
|
1775 |
|
1776 // Complete the request with appropiate error |
|
1777 ret = KErrArgument; |
|
1778 } |
|
1779 else |
|
1780 { |
|
1781 iRetRemotePartyInfo = aRemotePartyInfo; |
|
1782 iReqHandleType = EMultimodeCallNotifyRemotePartyInfoChange; |
|
1783 } |
|
1784 |
|
1785 return ret; |
|
1786 } |
|
1787 |
|
1788 // --------------------------------------------------------------------------- |
|
1789 // CMmCallTsy::NotifyRemotePartyInfoChangeCancel |
|
1790 // This method cancels an outstanding asynchronous NotifyRemotePartyInfoChange |
|
1791 // request. |
|
1792 // (other items were commented in a header). |
|
1793 // --------------------------------------------------------------------------- |
|
1794 // |
|
1795 TInt CMmCallTsy::NotifyRemotePartyInfoChangeCancel( |
|
1796 const TTsyReqHandle aTsyReqHandle ) |
|
1797 { |
|
1798 iRetRemotePartyInfo = NULL; |
|
1799 iTsyReqHandleStore->ResetTsyReqHandle( |
|
1800 EMultimodeCallNotifyRemotePartyInfoChange ); |
|
1801 |
|
1802 ReqCompleted( aTsyReqHandle, KErrCancel ); |
|
1803 return KErrNone; |
|
1804 } |
|
1805 |
|
1806 // --------------------------------------------------------------------------- |
|
1807 // CMmCallTsy::CompleteNotifyRemotePartyInfoChange |
|
1808 // Completes a NotifyRemotePartyInfoChange method. |
|
1809 // (other items were commented in a header). |
|
1810 // --------------------------------------------------------------------------- |
|
1811 // |
|
1812 void CMmCallTsy::CompleteNotifyRemotePartyInfoChange() |
|
1813 { |
|
1814 //reset req handle. Returns the deleted req handle |
|
1815 TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( |
|
1816 EMultimodeCallNotifyRemotePartyInfoChange ); |
|
1817 |
|
1818 if ( EMultimodeCallReqHandleUnknown != reqHandle ) |
|
1819 { |
|
1820 iMmCallExtInterface->GetRemotePartyInfo( |
|
1821 reinterpret_cast<RMobileCall::TMobileCallRemotePartyInfoV1Pckg*> |
|
1822 ( iRetRemotePartyInfo ) ); |
|
1823 ReqCompleted( reqHandle, KErrNone ); |
|
1824 } |
|
1825 } |
|
1826 |
|
1827 // --------------------------------------------------------------------------- |
|
1828 // CMmCallTsy::CompleteNotifyMobileCallInfoChange |
|
1829 // Notifies common TSY about mobile call information change. |
|
1830 // (other items were commented in a header). |
|
1831 // --------------------------------------------------------------------------- |
|
1832 // |
|
1833 void CMmCallTsy::CompleteNotifyMobileCallInfoChange( |
|
1834 CMmDataPackage* aDataPackage ) |
|
1835 { |
|
1836 //set data to gsm extension |
|
1837 //( direction added because not uppdated in messagehandler) |
|
1838 iMmCallExtInterface->SetMobileCallData( |
|
1839 aDataPackage, iCallDirection ); |
|
1840 //call completenotify remotepartyinfochange |
|
1841 CompleteNotifyRemotePartyInfoChange(); |
|
1842 } |
|
1843 |
|
1844 // --------------------------------------------------------------------------- |
|
1845 // CMmCallTsy::TransferL |
|
1846 // This method allows a client to transfer a call so that the remote party of |
|
1847 // one call ends up connected to the remote party of another call while this |
|
1848 // user drops out of both calls. |
|
1849 // (other items were commented in a header). |
|
1850 // --------------------------------------------------------------------------- |
|
1851 // |
|
1852 TInt CMmCallTsy::TransferL( |
|
1853 const TTsyReqHandle aTsyReqHandle ) |
|
1854 { |
|
1855 TInt ret( KErrServerBusy ); |
|
1856 |
|
1857 TTsyReqHandle transferHandle = |
|
1858 iTsyReqHandleStore->GetTsyReqHandle( EMultimodeCallTransfer ); |
|
1859 |
|
1860 if ( !transferHandle ) |
|
1861 { |
|
1862 ret = iMmCallExtInterface->TransferL(); |
|
1863 |
|
1864 if ( KErrNone != ret ) |
|
1865 { |
|
1866 ReqCompleted( aTsyReqHandle, ret ); |
|
1867 } |
|
1868 else |
|
1869 { |
|
1870 //save tsy req handle type |
|
1871 iReqHandleType = EMultimodeCallTransfer; |
|
1872 } |
|
1873 } |
|
1874 else |
|
1875 { |
|
1876 ReqCompleted( aTsyReqHandle, ret ); |
|
1877 } |
|
1878 return KErrNone; |
|
1879 } |
|
1880 |
|
1881 // --------------------------------------------------------------------------- |
|
1882 // CMmCallTsy::CompleteTransfer |
|
1883 // This method completes an outstanding asynchronous Transfer request. |
|
1884 // (other items were commented in a header). |
|
1885 // --------------------------------------------------------------------------- |
|
1886 // |
|
1887 void CMmCallTsy::CompleteTransfer( |
|
1888 TInt aErrorCode ) |
|
1889 { |
|
1890 //reset req handle. Returns the deleted req handle |
|
1891 TTsyReqHandle reqHandle = |
|
1892 iTsyReqHandleStore->ResetTsyReqHandle( EMultimodeCallTransfer ); |
|
1893 |
|
1894 if ( EMultimodeCallReqHandleUnknown != reqHandle ) |
|
1895 { |
|
1896 ReqCompleted( reqHandle, aErrorCode ); |
|
1897 } |
|
1898 } |
|
1899 |
|
1900 // --------------------------------------------------------------------------- |
|
1901 // CMmCallTsy::NotifyPrivacyConfirmation |
|
1902 // This method allows the client to be notified when the network has confirmed |
|
1903 // the privacy setting. |
|
1904 // (other items were commented in a header). |
|
1905 // --------------------------------------------------------------------------- |
|
1906 // |
|
1907 TInt CMmCallTsy::NotifyPrivacyConfirmation( |
|
1908 RMobilePhone::TMobilePhonePrivacy* aPrivacyStatus ) |
|
1909 { |
|
1910 iRetPrivacyStatus = aPrivacyStatus; |
|
1911 iReqHandleType = EMultimodeCallNotifyPrivacyConfirmation; |
|
1912 return KErrNone; |
|
1913 } |
|
1914 |
|
1915 // --------------------------------------------------------------------------- |
|
1916 // CMmCallTsy::NotifyPrivacyConfirmationCancel |
|
1917 // Cancels an outstanding asynchronous NotifyPrivacyConfirmation request. |
|
1918 // (other items were commented in a header). |
|
1919 // --------------------------------------------------------------------------- |
|
1920 // |
|
1921 TInt CMmCallTsy::NotifyPrivacyConfirmationCancel( |
|
1922 const TTsyReqHandle aTsyReqHandle ) |
|
1923 { |
|
1924 iRetPrivacyStatus = NULL; |
|
1925 iTsyReqHandleStore->ResetTsyReqHandle( |
|
1926 EMultimodeCallNotifyPrivacyConfirmation ); |
|
1927 |
|
1928 ReqCompleted( aTsyReqHandle, KErrCancel ); |
|
1929 return KErrNone; |
|
1930 } |
|
1931 |
|
1932 // --------------------------------------------------------------------------- |
|
1933 // CMmCallTsy::CompleteNotifyPrivacyConfirmation |
|
1934 // Completes a NotifyPrivacyConfirmation request. |
|
1935 // (other items were commented in a header). |
|
1936 // --------------------------------------------------------------------------- |
|
1937 // |
|
1938 void CMmCallTsy::CompleteNotifyPrivacyConfirmation( |
|
1939 RMobilePhone::TMobilePhonePrivacy aStatus ) |
|
1940 { |
|
1941 //reset req handle. Returns the deleted req handle |
|
1942 TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( |
|
1943 EMultimodeCallNotifyPrivacyConfirmation ); |
|
1944 |
|
1945 if ( EMultimodeCallReqHandleUnknown != reqHandle ) |
|
1946 { |
|
1947 *iRetPrivacyStatus = aStatus; |
|
1948 ReqCompleted( reqHandle, KErrNone ); |
|
1949 } |
|
1950 } |
|
1951 |
|
1952 // --------------------------------------------------------------------------- |
|
1953 // CMmCallTsy::Line |
|
1954 // Return the line from which this call object has been opened from. |
|
1955 // (other items were commented in a header). |
|
1956 // --------------------------------------------------------------------------- |
|
1957 // |
|
1958 CMmLineTsy* CMmCallTsy::Line() |
|
1959 { |
|
1960 //Return the line from which this call object has been opened from. |
|
1961 return iMmLine; |
|
1962 } |
|
1963 |
|
1964 // --------------------------------------------------------------------------- |
|
1965 // CMmCallTsy::Phone |
|
1966 // This method returns pointer to the Phone object. |
|
1967 // (other items were commented in a header). |
|
1968 // --------------------------------------------------------------------------- |
|
1969 // |
|
1970 CMmPhoneTsy* CMmCallTsy::Phone() |
|
1971 { |
|
1972 //This method returns pointer to the Phone object. |
|
1973 return iMmPhone; |
|
1974 } |
|
1975 |
|
1976 // --------------------------------------------------------------------------- |
|
1977 // CMmCallTsy::GetCallDurationInSeconds |
|
1978 // Returns call duration in seconds. If call is not active, the duration of |
|
1979 // the last successful call will be returned. |
|
1980 // (other items were commented in a header). |
|
1981 // --------------------------------------------------------------------------- |
|
1982 // |
|
1983 TTimeIntervalSeconds CMmCallTsy::GetCallDurationInSeconds() |
|
1984 { |
|
1985 // If the call is active, NumberOfBeats will return the current duration |
|
1986 // If the call is not active, NumberOfBeats will return the last |
|
1987 // call duration |
|
1988 TTimeIntervalSeconds duration ( iCallTimer->NumberOfBeats() ); |
|
1989 return duration; |
|
1990 } |
|
1991 |
|
1992 // --------------------------------------------------------------------------- |
|
1993 // CMmCallTsy::IsServiceLocallyRequested |
|
1994 // Return ETrue if this type of request is requested by any of TSY's client. |
|
1995 // (other items were commented in a header). |
|
1996 // --------------------------------------------------------------------------- |
|
1997 // |
|
1998 TBool CMmCallTsy::IsServiceLocallyRequested( |
|
1999 CMmCallTsy::TCallRequestTypes aReqType ) |
|
2000 { |
|
2001 //Return ETrue if this type of request is requested by any TSY's client. |
|
2002 //create parameter callCount and get number of objects from call list to |
|
2003 //it |
|
2004 TInt callCount = iMmPhone->CallList()->GetNumberOfObjects(); |
|
2005 CMmCallTsy* mmCall = NULL; |
|
2006 TBool ret( EFalse); |
|
2007 |
|
2008 for ( TInt i = 0; i < callCount; i++ ) |
|
2009 { |
|
2010 mmCall = reinterpret_cast<CMmCallTsy*>( |
|
2011 iMmPhone->CallList()->GetObjectByIndex(i)); |
|
2012 |
|
2013 if( mmCall->ServiceRequested( aReqType ) ) |
|
2014 { |
|
2015 ret = ETrue; |
|
2016 break; |
|
2017 } |
|
2018 } |
|
2019 return ret; |
|
2020 } |
|
2021 |
|
2022 // --------------------------------------------------------------------------- |
|
2023 // CMmCallTsy::GetGhostCall |
|
2024 // Return ETrue if this call is a Ghost Call |
|
2025 // (other items were commented in a header). |
|
2026 // --------------------------------------------------------------------------- |
|
2027 // |
|
2028 TBool CMmCallTsy::GetGhostCall() const |
|
2029 { |
|
2030 return iGhostCall; |
|
2031 } |
|
2032 |
|
2033 // --------------------------------------------------------------------------- |
|
2034 // CMmCallTsy::GetDiagnostics |
|
2035 // Returns value of iDiagnosticOctect internal attribute |
|
2036 // (other items were commented in a header). |
|
2037 // --------------------------------------------------------------------------- |
|
2038 // |
|
2039 TUint8 CMmCallTsy::GetDiagnostics() const |
|
2040 { |
|
2041 return iDiagnosticOctet; |
|
2042 } |
|
2043 |
|
2044 // --------------------------------------------------------------------------- |
|
2045 // CMmCallTsy::SetDiagnostics |
|
2046 // Sets aDiagnosticOctet into internal variable iDiagnosticOctet |
|
2047 // (other items were commented in a header). |
|
2048 // --------------------------------------------------------------------------- |
|
2049 // |
|
2050 void CMmCallTsy::SetDiagnostics( |
|
2051 TUint8 aDiagnosticOctet ) |
|
2052 { |
|
2053 iDiagnosticOctet = aDiagnosticOctet; |
|
2054 } |
|
2055 |
|
2056 // --------------------------------------------------------------------------- |
|
2057 // CMmCallTsy::GetCallReqHandleStore |
|
2058 // Returns pointer to iTsyReqHandleStore |
|
2059 // (other items were commented in a header). |
|
2060 // --------------------------------------------------------------------------- |
|
2061 // |
|
2062 CMmTsyReqHandleStore* CMmCallTsy::GetCallReqHandleStore() |
|
2063 { |
|
2064 return iTsyReqHandleStore; |
|
2065 } |
|
2066 |
|
2067 // --------------------------------------------------------------------------- |
|
2068 // CMmCallTsy::SetUnownedCallObjectFlag |
|
2069 // TSY creates automatically call object for incoming call or ghost call that |
|
2070 // is created using AT-commands. This method sets flag indicating if a client |
|
2071 // has't opened existing call object for this call. |
|
2072 // (other items were commented in a header). |
|
2073 // --------------------------------------------------------------------------- |
|
2074 // |
|
2075 void CMmCallTsy::SetUnownedCallObjectFlag( |
|
2076 TBool aIsUnownedCallObject ) |
|
2077 { |
|
2078 iUnownedCallObject = aIsUnownedCallObject; |
|
2079 } |
|
2080 |
|
2081 // --------------------------------------------------------------------------- |
|
2082 // CMmCallTsy::IsUnownedCallObject |
|
2083 // TSY creates automatically call object for incoming call or ghost call that |
|
2084 // is created using AT-commands. This flag indicates that client haven't |
|
2085 // opened existing call object for this call. |
|
2086 // (other items were commented in a header). |
|
2087 // --------------------------------------------------------------------------- |
|
2088 // |
|
2089 TBool CMmCallTsy::IsUnownedCallObject() const |
|
2090 { |
|
2091 return iUnownedCallObject; |
|
2092 } |
|
2093 |
|
2094 // --------------------------------------------------------------------------- |
|
2095 // CMmCallTsy::SetGhostCall |
|
2096 // Sets a flag that indicates that this call is not created through ETel |
|
2097 // (other items were commented in a header). |
|
2098 // --------------------------------------------------------------------------- |
|
2099 // |
|
2100 void CMmCallTsy::SetGhostCall( |
|
2101 TBool aValue ) |
|
2102 { |
|
2103 //Sets a flag that indicates that this call is not created through ETel |
|
2104 iGhostCall = aValue; |
|
2105 |
|
2106 if ( aValue ) |
|
2107 { |
|
2108 iEtelOriginated = EFalse; |
|
2109 } |
|
2110 } |
|
2111 |
|
2112 // --------------------------------------------------------------------------- |
|
2113 // CMmCallTsy::ETelOriginated |
|
2114 // Returns ETrue is this call has been originated through ETel API |
|
2115 // (other items were commented in a header). |
|
2116 // --------------------------------------------------------------------------- |
|
2117 // |
|
2118 TBool CMmCallTsy::ETelOriginated() const |
|
2119 { |
|
2120 return iEtelOriginated; |
|
2121 } |
|
2122 |
|
2123 // --------------------------------------------------------------------------- |
|
2124 // CMmCallTsy::ServiceRequested |
|
2125 // Returns ETrue if this service is pending on this call object |
|
2126 // (other items were commented in a header). |
|
2127 // --------------------------------------------------------------------------- |
|
2128 // |
|
2129 TBool CMmCallTsy::ServiceRequested( |
|
2130 CMmCallTsy::TCallRequestTypes aReqType ) |
|
2131 { |
|
2132 TBool ret( EFalse ); |
|
2133 |
|
2134 if( CMmCallTsy::EMultimodeCallReqHandleUnknown != |
|
2135 iTsyReqHandleStore->GetTsyReqHandle( aReqType ) ) |
|
2136 { |
|
2137 //Returns ETrue if this service is pending on this call object |
|
2138 ret = ETrue; |
|
2139 } |
|
2140 return ret; |
|
2141 } |
|
2142 |
|
2143 #ifdef REQHANDLE_TIMER |
|
2144 // --------------------------------------------------------------------------- |
|
2145 // CMmCallTsy::Complete |
|
2146 // Completes the request due timer expiration |
|
2147 // (other items were commented in a header). |
|
2148 // --------------------------------------------------------------------------- |
|
2149 // |
|
2150 void CMmCallTsy::Complete( |
|
2151 TInt aReqHandleType, |
|
2152 TInt aError ) |
|
2153 { |
|
2154 //All possible TSY req handle types are listed in the |
|
2155 //switch case below. |
|
2156 switch( aReqHandleType ) |
|
2157 { |
|
2158 //cases handled with automatic completion |
|
2159 case EMultimodeCallDial: |
|
2160 case EMultimodeCallDialISV: |
|
2161 CompleteDial( aError ); |
|
2162 break; |
|
2163 case EMultimodeCallDialNoFdnCheck: |
|
2164 CompleteDialNoFdn( aError ); |
|
2165 break; |
|
2166 case EMultimodeCallAnswer: |
|
2167 case EMultimodeCallAnswerISV: |
|
2168 CompleteAnswerIncomingCall( aError ); |
|
2169 break; |
|
2170 case EMultimodeCallHangUp: |
|
2171 CompleteHangUp( aError ); |
|
2172 break; |
|
2173 case EMultimodeCallTransfer: |
|
2174 CompleteTransfer( aError ); |
|
2175 break; |
|
2176 |
|
2177 //Can't use timer: |
|
2178 // - all notifications |
|
2179 //case EMultimodeCallNotifyStatusChange: |
|
2180 //case EMultimodeCallNotifyDurationChange: |
|
2181 //case EMultimodeCallCapsChangeNotification: |
|
2182 //case EMultimodeCallNotifyMobileCallStatusChange: |
|
2183 //case EMultimodeCallNotifyCallEvent: |
|
2184 //case EMultimodeCallNotifyRemotePartyInfoChange: |
|
2185 //case EMultimodeCallNotifyMobileCallCapsChange: |
|
2186 //case EMultimodeCallNotifyDataCallCapsChange: |
|
2187 //case EMultimodeCallNotifyHscsdInfoChange: |
|
2188 //case EMultimodeCallNotifyPrivacyConfirmation: |
|
2189 |
|
2190 case EMultimodeMobileCallHold: |
|
2191 case EMultimodeMobileCallResume: |
|
2192 case EMultimodeMobileCallSwap: |
|
2193 case EMultimodeMobileCallDeflectCall: |
|
2194 case EMultimodeMobileCallDialEmergencyCall: |
|
2195 case EMultimodeCallGoOneToOne: |
|
2196 case EMultimodeCallSetDynamicHscsdParams: |
|
2197 default: |
|
2198 ReqCompleted( |
|
2199 iTsyReqHandleStore->ResetTsyReqHandle( aReqHandleType ), |
|
2200 aError ); |
|
2201 break; |
|
2202 } |
|
2203 } |
|
2204 #endif |
|
2205 |
|
2206 |
|
2207 #ifdef TF_LOGGING_ENABLED |
|
2208 // --------------------------------------------------------------------------- |
|
2209 // CMmCallTsy::ReqCompleted |
|
2210 // Overloads CTelObject::ReqCompleted for logging purposes. It prints the |
|
2211 // aTsyReqHandle and aError variable in the log file and then calls |
|
2212 // CTelObject::ReqCompleted. |
|
2213 // (other items were commented in a header). |
|
2214 // --------------------------------------------------------------------------- |
|
2215 // |
|
2216 void CMmCallTsy::ReqCompleted( |
|
2217 const TTsyReqHandle aTsyReqHandle, |
|
2218 const TInt aError ) |
|
2219 { |
|
2220 //Overloads CTelObject::ReqCompleted for logging purposes. It |
|
2221 //prints the aTsyReqHandle and aError variable in the log file and then |
|
2222 //calls CTelObject::ReqCompleted. |
|
2223 TFLOGSTRING3("TSY: CMmCallTsy::Request Completed. Handle:%d Error:%d", aTsyReqHandle, aError); |
|
2224 |
|
2225 CTelObject::ReqCompleted(aTsyReqHandle,aError); |
|
2226 } |
|
2227 #endif |
|
2228 |
|
2229 // --------------------------------------------------------------------------- |
|
2230 // CMmCallTsy::IsPartOfConference |
|
2231 // Returns ETrue if this call is part of a conference |
|
2232 // --------------------------------------------------------------------------- |
|
2233 // |
|
2234 TBool CMmCallTsy::IsPartOfConference() const |
|
2235 { |
|
2236 return iIsPartOfConference; |
|
2237 } |
|
2238 |
|
2239 // --------------------------------------------------------------------------- |
|
2240 // CMmCallTsy::SetPartOfConference |
|
2241 // Sets the flag indicating that this call is part of a MO conference |
|
2242 // --------------------------------------------------------------------------- |
|
2243 // |
|
2244 void CMmCallTsy::SetPartOfConference( TBool aPartOfConference ) |
|
2245 { |
|
2246 iIsPartOfConference = aPartOfConference; |
|
2247 |
|
2248 #ifdef TF_LOGGING_METHOD |
|
2249 if ( iIsPartOfConference ) |
|
2250 { |
|
2251 TFLOGSTRING2( "TSY: CMmCallTsy::SetPartOfConference: Call %d has joined the conference", iCallId ); |
|
2252 } |
|
2253 else |
|
2254 { |
|
2255 TFLOGSTRING( "TSY: CMmCallTsy::SetPartOfConference: Call has left the conference" ); |
|
2256 } |
|
2257 #endif // TF_LOGGING_METHOD |
|
2258 |
|
2259 } |
|
2260 // --------------------------------------------------------------------------- |
|
2261 // CMmCallTsy::IsRequestPossibleInOffLine |
|
2262 // Checks wether a ETel request can be performed or not while offline mode is |
|
2263 // enabled |
|
2264 // --------------------------------------------------------------------------- |
|
2265 // |
|
2266 TBool CMmCallTsy::IsRequestPossibleInOffline( TInt aIpc ) const |
|
2267 { |
|
2268 // we assume here that most of the requests are possible, thefore |
|
2269 // we switch for the not possible ones, optimizing a bit the checking. |
|
2270 TBool isRequestPossible ( ETrue ); |
|
2271 |
|
2272 switch ( aIpc ) |
|
2273 { |
|
2274 case EMobileCallDialEmergencyCall://OK (when flag is enabled) |
|
2275 { |
|
2276 isRequestPossible = EFalse; |
|
2277 RFeatureControl featureControl; |
|
2278 TInt err = featureControl.Open(); |
|
2279 if ( (err == KErrNone) && (featureControl.FeatureSupported(NFeature::KEmergencyCallsEnabledInOfflineMode) == KFeatureSupported) ) |
|
2280 { |
|
2281 isRequestPossible = ETrue; |
|
2282 } |
|
2283 featureControl.Close(); |
|
2284 } |
|
2285 break; |
|
2286 //case EMobileCallGetMobileCallStatus: //OK |
|
2287 //case EMobileCallNotifyMobileCallStatusChange://OK |
|
2288 case EMobileCallHold://NO |
|
2289 case EMobileCallResume://NO |
|
2290 case EMobileCallSwap://NO |
|
2291 case EMobileCallTransfer://NO |
|
2292 case EMobileCallGoOneToOne://NO |
|
2293 //case EMobileCallNotifyCallEvent://OK |
|
2294 //case EMobileCallGetMobileCallCaps: //OK |
|
2295 //case EMobileCallNotifyMobileCallCapsChange: //OK |
|
2296 //case EMobileCallGetMobileCallInfo://OK |
|
2297 //case EMobileCallNotifyRemotePartyInfoChange://OK |
|
2298 //case EMobileCallNotifyPrivacyConfirmation://OK |
|
2299 //case EMobileCallGetMobileDataCallCaps: //OK |
|
2300 //case EMobileCallNotifyMobileDataCallCapsChange: //OK |
|
2301 //case EMobileCallGetMobileDataCallRLPRange://OK |
|
2302 //case EMobileCallSetDynamicHscsdParams://OK |
|
2303 //case EMobileCallGetCurrentHscsdInfo://OK |
|
2304 //case EMobileCallNotifyHscsdInfoChange://OK |
|
2305 isRequestPossible = EFalse; |
|
2306 break; |
|
2307 default: |
|
2308 break; |
|
2309 } |
|
2310 |
|
2311 return isRequestPossible; |
|
2312 |
|
2313 } |
|
2314 |
|
2315 // --------------------------------------------------------------------------- |
|
2316 // CMmCallTsy::GetFaxSettings |
|
2317 // This CORE API method is used for getting fax settings |
|
2318 // (not supported by default). |
|
2319 // (other items were commented in a header). |
|
2320 // --------------------------------------------------------------------------- |
|
2321 // |
|
2322 TInt CMmCallTsy::GetFaxSettings( |
|
2323 const TTsyReqHandle, |
|
2324 RCall::TFaxSessionSettings* ) |
|
2325 { |
|
2326 return KErrNotSupported; |
|
2327 } |
|
2328 |
|
2329 // --------------------------------------------------------------------------- |
|
2330 // CMmCallTsy::SetFaxSettings |
|
2331 // This CORE API method is used for set fax settings |
|
2332 // (not supported by default). |
|
2333 // (other items were commented in a header). |
|
2334 // --------------------------------------------------------------------------- |
|
2335 // |
|
2336 TInt CMmCallTsy::SetFaxSettings( |
|
2337 const TTsyReqHandle, |
|
2338 const RCall::TFaxSessionSettings*) |
|
2339 { |
|
2340 return KErrNotSupported; |
|
2341 } |
|
2342 |
|
2343 |
|
2344 // --------------------------------------------------------------------------- |
|
2345 // CMmCallTsy::SetExtensionId |
|
2346 // Set iExtensionId attribute |
|
2347 // (other items were commented in a header). |
|
2348 // --------------------------------------------------------------------------- |
|
2349 // |
|
2350 void CMmCallTsy::SetExtensionId( |
|
2351 TInt aExtensionId ) |
|
2352 { |
|
2353 iExtensionId = aExtensionId; |
|
2354 TFLOGSTRING2("TSY: CMmCallTsy::SetExtensionId.iExtensionId:%d",iExtensionId ); |
|
2355 } |
|
2356 |
|
2357 // --------------------------------------------------------------------------- |
|
2358 // CMmCallTsy::GetExtensionId |
|
2359 // Get iExtensionId attribute |
|
2360 // (other items were commented in a header). |
|
2361 // --------------------------------------------------------------------------- |
|
2362 // |
|
2363 TInt CMmCallTsy::GetExtensionId() |
|
2364 { |
|
2365 return iExtensionId; |
|
2366 } |
|
2367 |
|
2368 // --------------------------------------------------------------------------- |
|
2369 // CMmCallTsy::SetDialFlag |
|
2370 // Sets iDialFlag boolean value |
|
2371 // (other items were commented in a header). |
|
2372 // --------------------------------------------------------------------------- |
|
2373 // |
|
2374 void CMmCallTsy::SetDialFlag( |
|
2375 TBool aDialFlag ) |
|
2376 { |
|
2377 iDialFlag= aDialFlag; |
|
2378 TFLOGSTRING2("TSY: CMmCallTsy::SetDialFlag. iDialFlag:%d",iDialFlag ); |
|
2379 } |
|
2380 |
|
2381 // --------------------------------------------------------------------------- |
|
2382 // CMmCallTsy::GetDialFlag |
|
2383 // Returns iDialFlag boolean value |
|
2384 // (other items were commented in a header). |
|
2385 // --------------------------------------------------------------------------- |
|
2386 // |
|
2387 TBool CMmCallTsy::GetDialFlag() |
|
2388 { |
|
2389 |
|
2390 TFLOGSTRING2("TSY: CMmCallTsy::GetDialFlag. iDialFlag:%d",iDialFlag ); |
|
2391 return iDialFlag; |
|
2392 } |
|
2393 |
|
2394 // --------------------------------------------------------------------------- |
|
2395 // CMmCallTsy::IsRemoteReleasedCall |
|
2396 // Returns iIsRemoteReleasedCall boolean value |
|
2397 // (other items were commented in a header). |
|
2398 // --------------------------------------------------------------------------- |
|
2399 // |
|
2400 TBool CMmCallTsy::IsRemoteReleasedCall() const |
|
2401 { |
|
2402 TFLOGSTRING("TSY: CMmCallTsy::IsRemoteReleasedCall()"); |
|
2403 return iIsRemoteReleasedCall; |
|
2404 } |
|
2405 |
|
2406 // --------------------------------------------------------------------------- |
|
2407 // CMmCallTsy::ActivateUUS |
|
2408 // Specifies which User-To-User Signalling service(s) should be activated. |
|
2409 // (other items were commented in a header). |
|
2410 // --------------------------------------------------------------------------- |
|
2411 // |
|
2412 TInt CMmCallTsy::ActivateUUS( const TTsyReqHandle aTsyReqHandle, |
|
2413 RMobileCall::TMobileCallUUSRequestV1Pckg* aUUSRequest ) |
|
2414 { |
|
2415 // Support only implicit-UUS1 service, |
|
2416 // save the UUS-Request and send it during the Dial so that |
|
2417 // UUS-Request can be mapped on LTSY side to correct phone call (with id). |
|
2418 // details of the message send, see CMmVoiceCallTsy::Dial |
|
2419 |
|
2420 // To support UUS2 and UUS3 services in future the logic must be |
|
2421 // changed so that the UUS information can be sended to LTSY immediately. |
|
2422 |
|
2423 // Unpack UUS parameters |
|
2424 RMobileCall::TMobileCallUUSRequestV1 requestUUS = ( *aUUSRequest )(); |
|
2425 TFLOGSTRING3("TSY: CMmCallTsy::ActivateUUS() -ServiceReq:%u -UUI:%S", requestUUS.iServiceReq, &requestUUS.iUUI ); |
|
2426 // handle implicit UUS1 request only |
|
2427 if ( requestUUS.iServiceReq & RMobileCall::KUUS1Implicit ) |
|
2428 { |
|
2429 // take a copy of the UUS request |
|
2430 iUUSRequest = requestUUS; |
|
2431 // complete req, with KErrNone |
|
2432 ReqCompleted( aTsyReqHandle, KErrNone ); |
|
2433 } |
|
2434 else |
|
2435 { |
|
2436 // other UUS services are not supported in this phase |
|
2437 ReqCompleted( aTsyReqHandle, KErrNotSupported ); |
|
2438 } |
|
2439 |
|
2440 return KErrNone; |
|
2441 } |
|
2442 |
|
2443 // --------------------------------------------------------------------------- |
|
2444 // CMmCallTsy::ReceiveUUI |
|
2445 // Enables the client to receive the next incoming UUI message or in case |
|
2446 // already received, return the buffered UUI. |
|
2447 // (other items were commented in a header). |
|
2448 // --------------------------------------------------------------------------- |
|
2449 // |
|
2450 TInt CMmCallTsy::ReceiveUUI( const TTsyReqHandle aTsyReqHandle, |
|
2451 RMobileCall::TMobileCallUUI* aUUI ) |
|
2452 { |
|
2453 TFLOGSTRING("TSY: CMmCallTsy::ReceiveUUI()" ); |
|
2454 |
|
2455 // check are there any UUI information already in the buffer (UUS1) |
|
2456 if ( 0 < iReceivedUUI.Length() ) |
|
2457 { |
|
2458 TFLOGSTRING2("TSY: CMmCallTsy::ReceiveUUI() - information in BUFFER:%S", &iReceivedUUI ); |
|
2459 // copy and empty the buffered information |
|
2460 *aUUI = iReceivedUUI; |
|
2461 iReceivedUUI.Zero(); |
|
2462 |
|
2463 // complete the request |
|
2464 ReqCompleted( aTsyReqHandle, KErrNone ); |
|
2465 } |
|
2466 else |
|
2467 { |
|
2468 TFLOGSTRING("TSY: CMmCallTsy::ReceiveUUI() - wait for next incoming UUI message" ); |
|
2469 // Save request handle and pointer of the UUI message. |
|
2470 iRetUUI = aUUI; |
|
2471 iTsyReqHandleStore->SetTsyReqHandle( |
|
2472 EMultimodeCallReceiveUUI, aTsyReqHandle ); |
|
2473 } |
|
2474 |
|
2475 return KErrNone; |
|
2476 } |
|
2477 |
|
2478 // --------------------------------------------------------------------------- |
|
2479 // CMmCallTsy::ReceiveUUICancel |
|
2480 // Use this method to cancel a previously placed asynchronous |
|
2481 // EMobileCallReceiveUUI request. |
|
2482 // (other items were commented in a header). |
|
2483 // --------------------------------------------------------------------------- |
|
2484 // |
|
2485 TInt CMmCallTsy::ReceiveUUICancel( const TTsyReqHandle aTsyReqHandle ) |
|
2486 { |
|
2487 TFLOGSTRING("TSY: CMmCallTsy::ReceiveUUICancel()"); |
|
2488 |
|
2489 // reset the client side pointer, empty buffer and cancel the handle |
|
2490 iRetUUI = NULL; |
|
2491 iReceivedUUI.Zero(); |
|
2492 iTsyReqHandleStore->ResetTsyReqHandle( EMultimodeCallReceiveUUI ); |
|
2493 ReqCompleted( aTsyReqHandle, KErrCancel ); |
|
2494 return KErrNone; |
|
2495 } |
|
2496 |
|
2497 // --------------------------------------------------------------------------- |
|
2498 // CMmCallTsy::CompleteReceiveUUI |
|
2499 // This method completes an outstanding ReceiveUUI request. |
|
2500 // (other items were commented in a header). |
|
2501 // --------------------------------------------------------------------------- |
|
2502 // |
|
2503 void CMmCallTsy::CompleteReceiveUUI( CMmDataPackage* aDataPackage, |
|
2504 TInt aResult ) |
|
2505 { |
|
2506 TFLOGSTRING("TSY: CMmCallTsy::CompleteReceiveUUI()" ); |
|
2507 |
|
2508 RMobileCall::TMobileCallUUI* receiveUUI = NULL; |
|
2509 aDataPackage->UnPackData( &receiveUUI ); |
|
2510 |
|
2511 TFLOGSTRING2("TSY: CMmCallTsy::CompleteReceiveUUI() - receiveUUI:%S", &receiveUUI ); |
|
2512 |
|
2513 // reset req handle. Returns the deleted req handle |
|
2514 TTsyReqHandle reqHandle = |
|
2515 iTsyReqHandleStore->ResetTsyReqHandle( EMultimodeCallReceiveUUI ); |
|
2516 |
|
2517 if ( EMultimodeCallReqHandleUnknown != reqHandle ) |
|
2518 { |
|
2519 TFLOGSTRING("TSY: CMmCallTsy::CompleteReceiveUUI() - Handle found, complete" ); |
|
2520 // Update the client side data through pointer |
|
2521 *iRetUUI = *receiveUUI; |
|
2522 // Null client side pointer, data copied |
|
2523 iRetUUI = NULL; |
|
2524 // complete req |
|
2525 ReqCompleted( reqHandle, aResult ); |
|
2526 } |
|
2527 else if ( KErrNone == aResult ) |
|
2528 { |
|
2529 TFLOGSTRING("TSY: CMmCallTsy::CompleteReceiveUUI() - Handle NOT found, buffer" ); |
|
2530 // set initial information to the buffer |
|
2531 iReceivedUUI = *receiveUUI; |
|
2532 } |
|
2533 } |
|
2534 |
|
2535 // --------------------------------------------------------------------------- |
|
2536 // CMmCallTsy::SetDialTypeId |
|
2537 // Set iDialTypeId attribute |
|
2538 // (other items were commented in a header). |
|
2539 // --------------------------------------------------------------------------- |
|
2540 // |
|
2541 void CMmCallTsy::SetDialTypeId( |
|
2542 TUint8 aDialType ) |
|
2543 { |
|
2544 iDialTypeId = aDialType; |
|
2545 TFLOGSTRING2("TSY: CMmCallTsy::SetDialTypeId.iDialType:%d",aDialType ); |
|
2546 } |
|
2547 |
|
2548 // --------------------------------------------------------------------------- |
|
2549 // CMmCallTsy::GetDialTypeId |
|
2550 // Returns iDialTypeId value |
|
2551 // (other items were commented in a header). |
|
2552 // --------------------------------------------------------------------------- |
|
2553 // |
|
2554 TUint8 CMmCallTsy::GetDialTypeId() |
|
2555 { |
|
2556 |
|
2557 TFLOGSTRING2("TSY: CMmCallTsy::GetDialType. iDialType:%d",iDialTypeId ); |
|
2558 return iDialTypeId; |
|
2559 } |
|
2560 |
|
2561 // --------------------------------------------------------------------------- |
|
2562 // CMmCallTsy::CompleteDialNoFdn |
|
2563 // Completes a Dial request. |
|
2564 // (other items were commented in a header). |
|
2565 // --------------------------------------------------------------------------- |
|
2566 // |
|
2567 void CMmCallTsy::CompleteDialNoFdn( |
|
2568 TInt aResult ) |
|
2569 { |
|
2570 TFLOGSTRING2("TSY: CMmCallTsy::CompleteDialNoFdn. Result:%d", aResult ); |
|
2571 TFLOGSTRING3("TSY: CMmCallTsy::CompleteDialNoFdn. Call Id:%d Call name:%S", iCallId, &iCallName); |
|
2572 |
|
2573 //Set dial flag to false |
|
2574 SetDialFlag( EFalse ); |
|
2575 |
|
2576 TTsyReqHandle reqHandle ( EMultimodeCallReqHandleUnknown ); |
|
2577 |
|
2578 // Reset req handle. Returns the deleted req handle |
|
2579 reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( |
|
2580 EMultimodeCallDialNoFdnCheck ); |
|
2581 |
|
2582 if ( EMultimodeCallReqHandleUnknown != reqHandle ) |
|
2583 { |
|
2584 if ( aResult != KErrNone ) |
|
2585 { |
|
2586 // The creation has failed. |
|
2587 iLastExitCode = aResult; |
|
2588 ClearCallStatus(); |
|
2589 |
|
2590 //Dial has failed, update core status - dial possible again |
|
2591 iCallCaps.iFlags |= RCall::KCapsDial; |
|
2592 iCallCaps.iFlags &= ~( RCall::KCapsHangUp ); |
|
2593 |
|
2594 //complete caps change notification |
|
2595 CompleteNotifyCapsChange(); |
|
2596 } |
|
2597 //Complete request |
|
2598 ReqCompleted( reqHandle, aResult ); |
|
2599 } |
|
2600 |
|
2601 //Set dial type to none |
|
2602 SetDialTypeId( KMultimodeCallTypeDialNone ); |
|
2603 } |
|
2604 |
|
2605 // --------------------------------------------------------------------------- |
|
2606 // CMmCallTsy::UpdateLifeTimer |
|
2607 // When the last call from conference call becomes idle, we are updating |
|
2608 // life time duration param with remaining call duration |
|
2609 // --------------------------------------------------------------------------- |
|
2610 // |
|
2611 void CMmCallTsy::UpdateLifeTimer() |
|
2612 { |
|
2613 if ( iMmPhone->NumberOfActiveCalls() == 0 ) |
|
2614 { |
|
2615 TTimeIntervalSeconds tis; |
|
2616 iMmPhone->GetAirTimeDuration(tis); |
|
2617 TUint32 duration; |
|
2618 duration = tis.Int(); |
|
2619 duration = duration % iMmPhone->KLifeTimeUpdateInterval; |
|
2620 |
|
2621 TFLOGSTRING2("TSY: CMmCallTsy::UpdateLifeTimer - \ |
|
2622 duration: %d", duration); |
|
2623 |
|
2624 //errors: trap and ignore |
|
2625 CMmDataPackage dataPackage; |
|
2626 dataPackage.PackData( &duration ); |
|
2627 |
|
2628 #ifdef USING_CTSY_DISPATCHER |
|
2629 TRAP_IGNORE(iMessageManager->HandleRequestL( |
|
2630 ECtsyUpdateLifeTimeReq, &dataPackage ); |
|
2631 ); |
|
2632 #else |
|
2633 TRAP_IGNORE(iMessageManager->HandleRequestL( |
|
2634 EMmTsyUpdateLifeTimeIPC, &dataPackage ); |
|
2635 ); |
|
2636 #endif //USING_CTSY_DISPATCHER |
|
2637 } |
|
2638 } |
|
2639 // CMmCallTsy::FillMobileCallInfoDefaults |
|
2640 // The method fills a current snapshot of the call information described in |
|
2641 // the TMobileCallInfoV1 class to the aInfo. The mode specific fields will |
|
2642 // be filled by the extension. |
|
2643 // (other items were commented in a header). |
|
2644 // --------------------------------------------------------------------------- |
|
2645 // |
|
2646 TInt CMmCallTsy::FillMobileCallInfoDefaults( |
|
2647 RMobileCall::TMobileCallInfoV1* aInfo ) |
|
2648 { |
|
2649 TFLOGSTRING("TSY: CMmCallTsy::FillMobileCallInfoDefaults"); |
|
2650 |
|
2651 //set validity fields to 0 in the beginning. |
|
2652 aInfo->iValid = 0; |
|
2653 //The name of the call |
|
2654 aInfo->iCallName.Copy( iCallName ); |
|
2655 //The name of the line on which the call is open |
|
2656 aInfo->iLineName.Copy( iMmLine->LineName() ); |
|
2657 //The current status of the call |
|
2658 aInfo->iStatus = iMobileCallStatus; |
|
2659 |
|
2660 //The time & date the call started. |
|
2661 TDateTime temp( iCallTimer->GetTimerStartTime()->DateTime() ); |
|
2662 aInfo->iStartTime.Set( |
|
2663 temp.Year(), temp.Month(), temp.Day(), |
|
2664 temp.Hour(), temp.Minute(), temp.Second(), temp.MicroSecond() ); |
|
2665 |
|
2666 //The current duration of the call |
|
2667 aInfo->iDuration = GetCallDurationInSeconds(); |
|
2668 |
|
2669 //Set validity indication |
|
2670 aInfo->iValid |= RMobileCall::KCallStartTime | RMobileCall::KCallDuration; |
|
2671 |
|
2672 //Client call Id. Note! Call server uses different call Id. |
|
2673 aInfo->iCallId = iCallId; |
|
2674 aInfo->iValid |= RMobileCall::KCallId; |
|
2675 |
|
2676 //The reason for termination of a finished call. Will equal KErrNone if |
|
2677 //the call ended normally and KErrNotFound if the call has not ended. |
|
2678 aInfo->iExitCode = iLastExitCode; |
|
2679 aInfo->iValid |= RMobileCall::KCallExitCode; |
|
2680 |
|
2681 //ETrue if the call is an emergency call or EFalse if it is not. |
|
2682 aInfo->iEmergency = iEmergencyCall; |
|
2683 aInfo->iValid |= RMobileCall::KCallEmergency; |
|
2684 TFLOGSTRING("TSY: CMmCallTsy::FillMobileCallInfoDefaults end"); |
|
2685 return KErrNone; |
|
2686 } |
|
2687 |
|
2688 // End of File |