1 // Copyright (c) 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 // CLtsyCallControlHandler |
|
15 |
|
16 //system include |
|
17 #include <ctsy/ltsy/cctsydispatchercallback.h> |
|
18 #include <mmtsy_ipcdefs.h> |
|
19 #include <ctsy/ltsy/ltsylogger.h> |
|
20 //#include <e32des16.h> |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <e32std.h> |
|
24 #include <e32cons.h> |
|
25 |
|
26 //user include |
|
27 #include "cltsycallcontrolhandler.h" |
|
28 #include "globalphonemanager.h" |
|
29 #include "ltsycommondefine.h" |
|
30 #include "mslogger.h" |
|
31 #include "ltsymacros.h" |
|
32 #include "tsyconfg.h" |
|
33 #include "atwaitforcallhandler.h" |
|
34 #include "atdialvoice.h" |
|
35 #include "athangup.h" |
|
36 #include "atanswer.h" |
|
37 #include "atchld.h" |
|
38 #include "unsolicitedcommandcallcontrolhandler.h" |
|
39 #include "atdtmfvts.h" |
|
40 #include "ltsycallinformationmanager.h" |
|
41 #include "athangupcommandrecords.h" |
|
42 |
|
43 |
|
44 //const define |
|
45 _LIT16(KLtsyEmergencyCallNumber911, "911"); |
|
46 _LIT16(KLtsyEmergencyCallNumber112, "112"); |
|
47 |
|
48 CLtsyCallControlHandler::CLtsyCallControlHandler( |
|
49 CCtsyDispatcherCallback& aCtsyDispatcherCallback, CGlobalPhonemanager* aGloblePhone) |
|
50 : iCtsyDispatcherCallback(aCtsyDispatcherCallback), iGloblePhone(aGloblePhone) |
|
51 { |
|
52 |
|
53 } |
|
54 |
|
55 |
|
56 CLtsyCallControlHandler::~CLtsyCallControlHandler() |
|
57 { |
|
58 delete iEmergencyCall; |
|
59 iEmergencyCall = NULL; |
|
60 |
|
61 delete iUnsolicitedHandler; |
|
62 iUnsolicitedHandler = NULL; |
|
63 |
|
64 delete iWaitForCall; |
|
65 iWaitForCall = NULL; |
|
66 } |
|
67 |
|
68 |
|
69 CLtsyCallControlHandler* CLtsyCallControlHandler::NewLC( |
|
70 CCtsyDispatcherCallback& aCtsyDispatcherCallback, |
|
71 CGlobalPhonemanager* aGloblePhone) |
|
72 { |
|
73 TSYLOGENTRYEXIT; |
|
74 CLtsyCallControlHandler* self = new (ELeave) CLtsyCallControlHandler(aCtsyDispatcherCallback,aGloblePhone); |
|
75 CleanupStack::PushL(self); |
|
76 self->ConstructL(); |
|
77 return self; |
|
78 } |
|
79 |
|
80 |
|
81 CLtsyCallControlHandler* CLtsyCallControlHandler::NewL(CCtsyDispatcherCallback& aCtsyDispatcherCallback, CGlobalPhonemanager* aGloblePhone) |
|
82 { |
|
83 TSYLOGENTRYEXIT; |
|
84 CLtsyCallControlHandler* self= |
|
85 CLtsyCallControlHandler::NewLC(aCtsyDispatcherCallback, aGloblePhone); |
|
86 CleanupStack::Pop(self); |
|
87 return self; |
|
88 } |
|
89 |
|
90 |
|
91 void CLtsyCallControlHandler::ConstructL() |
|
92 /** |
|
93 * Second phase constructor. |
|
94 */ |
|
95 { |
|
96 //Emergency Call |
|
97 iEmergencyCall = CATDialVoice::NewL((*iGloblePhone),iCtsyDispatcherCallback); |
|
98 iEmergencyCall->SetEmergnecyCallFlag(ETrue); |
|
99 |
|
100 //Process unsolicited command |
|
101 iUnsolicitedHandler = CUnsolicitedCommandCallControlHandler::NewL((*iGloblePhone), |
|
102 iCtsyDispatcherCallback); |
|
103 |
|
104 //Monitor incoming call |
|
105 iWaitForCall = CATWaitForCallHandler::NewL((*iGloblePhone), iCtsyDispatcherCallback); |
|
106 iWaitForCall->StartToWaitForCall(); |
|
107 |
|
108 } // CLtsyCallControlHandler::ConstructL |
|
109 |
|
110 TBool CLtsyCallControlHandler::IsInterfaceSupported(TLtsyDispatchInterfaceApiId aDispatchApiId) |
|
111 /** |
|
112 * Returns whether a Dispatch Interface API is supported or not. |
|
113 * |
|
114 * @param aDispatchApiId Id of Dispatch interface being queried |
|
115 * @return indication whether interface is supported or not |
|
116 */ |
|
117 { |
|
118 TBool bFlag(EFalse); |
|
119 switch(aDispatchApiId) |
|
120 { |
|
121 // Insert ApiIds when support is provided in LTSY |
|
122 case MLtsyDispatchCallControlAnswer::KLtsyDispatchCallControlAnswerApiId : |
|
123 bFlag = ETrue; |
|
124 break; |
|
125 case MLtsyDispatchCallControlHold::KLtsyDispatchCallControlHoldApiId: |
|
126 bFlag = ETrue; |
|
127 break; |
|
128 case MLtsyDispatchCallControlHangUp::KLtsyDispatchCallControlHangUpApiId : |
|
129 bFlag = ETrue; |
|
130 break; |
|
131 case MLtsyDispatchCallControlResume::KLtsyDispatchCallControlResumeApiId : |
|
132 bFlag = ETrue; |
|
133 break; |
|
134 case MLtsyDispatchCallControlDialVoice::KLtsyDispatchCallControlDialVoiceApiId : |
|
135 bFlag = ETrue; |
|
136 break; |
|
137 case MLtsyDispatchCallControlSwap::KLtsyDispatchCallControlSwapApiId : |
|
138 bFlag = ETrue; |
|
139 break; |
|
140 case MLtsyDispatchCallControlTerminateErrorCall::KLtsyDispatchCallControlTerminateErrorCallApiId : |
|
141 bFlag = ETrue; |
|
142 break; |
|
143 case MLtsyDispatchCallControlTerminateAllCalls::KLtsyDispatchCallControlTerminateAllCallsApiId : |
|
144 bFlag = ETrue; |
|
145 break; |
|
146 case MLtsyDispatchCallControlSendDtmfTones::KLtsyDispatchCallControlSendDtmfTonesApiId : |
|
147 bFlag = ETrue; |
|
148 break; |
|
149 case MLtsyDispatchCallControlStartDtmfTone::KLtsyDispatchCallControlStartDtmfToneApiId : |
|
150 bFlag = ETrue; |
|
151 break; |
|
152 case MLtsyDispatchCallControlStopDtmfTone::KLtsyDispatchCallControlStopDtmfToneApiId : |
|
153 bFlag = ETrue; |
|
154 break; |
|
155 case MLtsyDispatchCallControlSendDtmfTonesCancel::KLtsyDispatchCallControlSendDtmfTonesCancelApiId : |
|
156 bFlag = ETrue; |
|
157 break; |
|
158 case MLtsyDispatchCallControlQueryIsEmergencyNumber::KLtsyDispatchCallControlQueryIsEmergencyNumberApiId : |
|
159 bFlag = ETrue; |
|
160 break; |
|
161 case MLtsyDispatchCallControlDialEmergency::KLtsyDispatchCallControlDialEmergencyApiId : |
|
162 bFlag = ETrue; |
|
163 break; |
|
164 default: |
|
165 bFlag = EFalse; |
|
166 break; |
|
167 } |
|
168 return bFlag; |
|
169 } |
|
170 |
|
171 void CLtsyCallControlHandler::IsCallbackIndicatorSupported(TLtsyDispatchIndIdGroup aIdGroup, TUint32& aIndIdBitMask) |
|
172 /** |
|
173 * Returns the set of callback indicators that are supported. |
|
174 * |
|
175 * @param aIdGroup ID of group that is being queried e.g. aIdGroup=EIndIdGroup1 |
|
176 * @param aIndIdBitMask [out] argument that should return a bitmask indicating which indicator callbacks are supported. |
|
177 */ |
|
178 { |
|
179 |
|
180 //Create bitmask with bitset for each indicator ID that is supported. E.g. |
|
181 |
|
182 if(aIdGroup == EIndIdGroup1) |
|
183 aIndIdBitMask = KLtsyDispatchCallControlNotifyCallStatusChangeIndId | |
|
184 KLtsyDispatchCallControlReceiveUuiIndId | |
|
185 KLtsyDispatchCallControlNotifyDataCallCapsChangeIndId| |
|
186 KLtsyDispatchCallControlNotifyIncomingCallIndId| |
|
187 KLtsyDispatchCallControlNotifyHscsdInfoChangeIndId| |
|
188 KLtsyDispatchCallControlNotifyCallEventIndId| |
|
189 KLtsyDispatchCallControlGetCallInfoIndId| |
|
190 KLtsyDispatchCallControlNotifyIccCallForwardingStatusChangeIndId; |
|
191 else |
|
192 aIndIdBitMask = 0; //no indicators from other groups supported |
|
193 |
|
194 } |
|
195 |
|
196 TInt CLtsyCallControlHandler::HandleAnswerReqL(TInt aCallId, TBool aIsIsvCall) |
|
197 /** |
|
198 * This request is completed by invoking |
|
199 * CCtsyDispatcherCallback::CallbackCallControlAnswerComp() |
|
200 * |
|
201 * @param aCallId The Call ID of the call to answer. |
|
202 * |
|
203 * @param aIsIsvCall ETrue if the request to answer the call comes from a |
|
204 * 3rd party application, EFalse otherwise. This parameter exists in case the |
|
205 * LTSY wishes to perform special handling of ISV calls. |
|
206 * |
|
207 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
208 * or another error code to indicate the failure otherwise. |
|
209 */ |
|
210 { |
|
211 LOGTEXT( _L8("[Ltsy CallControl] Starting CLtsyCallControlHandler::HandleAnswerReqL()")); |
|
212 |
|
213 TInt nEmergencyCallId = iGloblePhone->GetCallInfoManager().FindEmergencyCallId(); |
|
214 if (nEmergencyCallId != KErrNotFound) |
|
215 { |
|
216 const TLtsyCallInformation& tCallInfo(iGloblePhone->GetCallInfoManager().GetCallInformationByCallId(nEmergencyCallId)); |
|
217 if (TLtsyCallInformation::EHeldCall != tCallInfo.GetCallState()) |
|
218 { |
|
219 //Reset Ring state |
|
220 iGloblePhone->GetCallInfoManager().SetIncomingCallFlag(EFalse); |
|
221 return KErrNotSupported; |
|
222 } |
|
223 } |
|
224 |
|
225 TInt nRet = iGloblePhone->CheckGlobalPhoneStatus(); |
|
226 if (nRet == KErrNone) |
|
227 { |
|
228 //Reset Ring state |
|
229 iGloblePhone->GetCallInfoManager().SetIncomingCallFlag(EFalse); |
|
230 |
|
231 //Setting Port active |
|
232 iGloblePhone->iEventSignalActive = ETrue; |
|
233 //Create answer call |
|
234 CATAnswer* cAnswerCall = CATAnswer::NewL((*iGloblePhone), iCtsyDispatcherCallback); |
|
235 iGloblePhone->SetActiveRequest(cAnswerCall); |
|
236 cAnswerCall->SetAnswerCallId(aCallId); |
|
237 cAnswerCall->SetIsIsvCall(aIsIsvCall); |
|
238 //Start answer |
|
239 cAnswerCall->StartRequest(); |
|
240 } |
|
241 |
|
242 return nRet; |
|
243 } // CLtsyCallControlHandler::HandleAnswerReqL |
|
244 |
|
245 TInt CLtsyCallControlHandler::HandleHoldReqL(TInt aCallId) |
|
246 /** |
|
247 * This request is completed by invoking |
|
248 * CCtsyDispatcherCallback::CallbackCallControlHoldComp() |
|
249 * |
|
250 * @param aCallId The Call ID of the call to hold. |
|
251 * |
|
252 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
253 * or another error code to indicate the failure otherwise. |
|
254 */ |
|
255 { |
|
256 LOGTEXT(_L8("[Ltsy CallControl] Starting CLtsyCallControlHandler::HandleHoldReqL")); |
|
257 LOGTEXT2(_L8("[Ltsy CallControl] aCallId = %d"), aCallId); |
|
258 |
|
259 TInt nRet = iGloblePhone->CheckGlobalPhoneStatus(); |
|
260 if (nRet == KErrNone) |
|
261 { |
|
262 //Setting Port active |
|
263 iGloblePhone->iEventSignalActive = ETrue; |
|
264 |
|
265 //Create hold call |
|
266 CATChld* cHoldCall = CATChld::NewL((*iGloblePhone), iCtsyDispatcherCallback); |
|
267 iGloblePhone->SetActiveRequest(cHoldCall); |
|
268 //Check call id is a hold call or not |
|
269 if (cHoldCall->IsHoldCall(aCallId)) |
|
270 { |
|
271 LOGTEXT2(_L8("[Ltsy CallControl] aCallId = %d is a hold call so return KErrNone"), aCallId); |
|
272 iGloblePhone->iEventSignalActive = EFalse; |
|
273 return KErrNotSupported; |
|
274 } |
|
275 |
|
276 cHoldCall->SetCallId(aCallId); |
|
277 cHoldCall->SetIpcType(CATChld::ELtsyReqCallHold); |
|
278 cHoldCall->SetChldType(CATChld::EHeldAllActiveCallAndAcceptHeldWaiting); |
|
279 cHoldCall->StartRequest(); |
|
280 } |
|
281 |
|
282 return nRet; |
|
283 } // CLtsyCallControlHandler::HandleHoldReqL |
|
284 |
|
285 |
|
286 TInt CLtsyCallControlHandler::HandleDialEmergencyReqL(const TDes& aEmergencyNumber) |
|
287 /** |
|
288 * This request is completed by invoking |
|
289 * CCtsyDispatcherCallback::CallbackCallControlDialEmergencyComp() |
|
290 * |
|
291 * @param aEmergencyNumber The emergency phone number to dial. The descriptor |
|
292 * should be of type RMobileENStore::TEmergencyNumber. |
|
293 * |
|
294 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
295 * or another error code to indicate the failure otherwise. |
|
296 */ |
|
297 { |
|
298 LOGTEXT(_L8("[Ltsy CallControl] Starting CLtsyCallControlHandler::HandleDialEmergencyReqL()")); |
|
299 |
|
300 //Checking is have emergency call |
|
301 if (iGloblePhone->GetCallInfoManager().FindEmergencyCallId() != KErrNotFound) |
|
302 { |
|
303 return KErrNotSupported; |
|
304 } |
|
305 |
|
306 TBuf8<RMobilePhone::KMaxMobileTelNumberSize> tTelNum; |
|
307 tTelNum.Copy(aEmergencyNumber.Left(tTelNum.MaxLength())); |
|
308 |
|
309 TInt nRet = iGloblePhone->CheckGlobalPhoneStatus(); |
|
310 if (nRet == KErrNone) |
|
311 { |
|
312 //Setting Port active |
|
313 iGloblePhone->iEventSignalActive = ETrue; |
|
314 |
|
315 //Init call |
|
316 iEmergencyCall->InitVariable(); |
|
317 |
|
318 //Set telnum |
|
319 iEmergencyCall->SetTelephoneNumber(tTelNum); |
|
320 iEmergencyCall->StartRequest(); |
|
321 } |
|
322 else // KErrInUse |
|
323 { |
|
324 if (iGloblePhone->GetCallInfoManager().FindDialingOrAlertingCallId() != KErrNotFound) |
|
325 { |
|
326 //Delete last call |
|
327 iGloblePhone->DeleteLastActiveRequest(); |
|
328 |
|
329 //Setting Port active |
|
330 iGloblePhone->iEventSignalActive = ETrue; |
|
331 |
|
332 //Init call |
|
333 iEmergencyCall->InitVariable(); |
|
334 //Set telnum |
|
335 iEmergencyCall->SetTelephoneNumber(tTelNum); |
|
336 iEmergencyCall->StartRequest(); |
|
337 nRet = KErrNone; |
|
338 } |
|
339 } |
|
340 |
|
341 return nRet; |
|
342 } // CLtsyCallControlHandler::HandleDialEmergencyReqL |
|
343 |
|
344 TInt CLtsyCallControlHandler::HandleStopDtmfToneReqL(TInt aCallId) |
|
345 /** |
|
346 * This request is completed by invoking |
|
347 * CCtsyDispatcherCallback::CallbackCallControlStopDtmfToneComp() |
|
348 * |
|
349 * @param aCallId Call ID of the connected call the stop request will be sent |
|
350 * through. |
|
351 * |
|
352 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
353 * or another error code to indicate the failure otherwise. |
|
354 */ |
|
355 { |
|
356 LOGTEXT(_L8("[Ltsy CallControl] Starting CLtsyCallControlHandler::HandleStopDtmfToneReqL()")); |
|
357 LOGTEXT2( _L8("[Ltsy CallControl] CallId = %d"), aCallId); |
|
358 |
|
359 TInt nRet = iGloblePhone->CheckGlobalPhoneStatus(); |
|
360 if (nRet == KErrNone) |
|
361 { |
|
362 //Setting Port active |
|
363 iGloblePhone->iEventSignalActive = ETrue; |
|
364 |
|
365 //Create DTMF |
|
366 CATDtmfVts* cDtmfVts = CATDtmfVts::NewL((*iGloblePhone), iCtsyDispatcherCallback); |
|
367 iGloblePhone->SetActiveRequest(cDtmfVts); |
|
368 |
|
369 //Set CallId |
|
370 nRet = cDtmfVts->SetCallId(aCallId); |
|
371 if (nRet != KErrNone) |
|
372 { |
|
373 return nRet; |
|
374 } |
|
375 |
|
376 //Set work type |
|
377 cDtmfVts->SetDtmfWorkType(CATDtmfVts::EDtmfStopOneTone); |
|
378 |
|
379 //Start request |
|
380 cDtmfVts->StartRequest(); |
|
381 } |
|
382 |
|
383 return nRet; |
|
384 } // CLtsyCallControlHandler::HandleStopDtmfToneReqL |
|
385 |
|
386 |
|
387 TInt CLtsyCallControlHandler::HandleSetActiveAlsLineReqL(RMobilePhone::TMobilePhoneALSLine /*aAlsLine*/) |
|
388 /** |
|
389 * This request is completed by invoking |
|
390 * CCtsyDispatcherCallback::CallbackCallControlSetActiveAlsLineComp() |
|
391 * |
|
392 * @param aAlsLine The new active ALS line. |
|
393 * |
|
394 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
395 * or another error code to indicate the failure otherwise. |
|
396 */ |
|
397 { |
|
398 TSYLOGENTRYEXIT; |
|
399 |
|
400 TInt ret = KErrNotSupported; |
|
401 |
|
402 // TODO: Add implementation here....... |
|
403 |
|
404 |
|
405 return TSYLOGSETEXITERR(ret); |
|
406 } // CLtsyCallControlHandler::HandleSetActiveAlsLineReqL |
|
407 |
|
408 |
|
409 TInt CLtsyCallControlHandler::HandleSendDtmfTonesCancelReqL(TInt aCallId) |
|
410 /** |
|
411 * This request is completed by invoking |
|
412 * CCtsyDispatcherCallback::CallbackCallControlSendDtmfTonesCancelComp() |
|
413 * |
|
414 * @param aCallId The Call ID through which the cancel request should be sent. |
|
415 * |
|
416 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
417 * or another error code to indicate the failure otherwise. |
|
418 */ |
|
419 { |
|
420 |
|
421 LOGTEXT(_L8("[Ltsy CallControl] Starting CLtsyCallControlHandler::HandleSendDtmfTonesCancelReqL()")); |
|
422 LOGTEXT2( _L8("[Ltsy CallControl] CallId = %d"), aCallId); |
|
423 |
|
424 TInt nRet = iGloblePhone->CheckGlobalPhoneStatus(); |
|
425 if (nRet == KErrNone) |
|
426 { |
|
427 //Setting Port active |
|
428 iGloblePhone->iEventSignalActive = ETrue; |
|
429 |
|
430 //Create DTMF |
|
431 CATDtmfVts* cDtmfVts = CATDtmfVts::NewL((*iGloblePhone), iCtsyDispatcherCallback); |
|
432 iGloblePhone->SetActiveRequest(cDtmfVts); |
|
433 |
|
434 //Set CallId |
|
435 nRet = cDtmfVts->SetCallId(aCallId); |
|
436 if (nRet != KErrNone) |
|
437 { |
|
438 return nRet; |
|
439 } |
|
440 |
|
441 //Set work type |
|
442 cDtmfVts->SetDtmfWorkType(CATDtmfVts::EDtmfCancelMoreTones); |
|
443 |
|
444 //Start request |
|
445 cDtmfVts->StartRequest(); |
|
446 } |
|
447 |
|
448 return nRet; |
|
449 } // CLtsyCallControlHandler::HandleSendDtmfTonesCancelReqL |
|
450 |
|
451 |
|
452 TInt CLtsyCallControlHandler::HandleHangUpReqL(TInt aCallId, TInt aHangupCause) |
|
453 /** |
|
454 * This request is completed by invoking |
|
455 * CCtsyDispatcherCallback::CallbackCallControlHangUpComp() |
|
456 * |
|
457 * @param aCallId The Call ID of the call to hang up. |
|
458 * |
|
459 * @param aHangupCause The reason for the hang up request. |
|
460 * |
|
461 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
462 * or another error code to indicate the failure otherwise. |
|
463 */ |
|
464 { |
|
465 LOGTEXT( _L8("[Ltsy CallControl] Starting CLtsyCallControlHandler::HandleHangUpReqL")); |
|
466 LOGTEXT3(_L8("[Ltsy CallControl] aCallId = %d aHangupCause = %d"), aCallId, aHangupCause); |
|
467 |
|
468 TInt nRet = iGloblePhone->CheckGlobalPhoneStatus(); |
|
469 if (nRet == KErrNone) |
|
470 { |
|
471 //Setting Port active |
|
472 iGloblePhone->iEventSignalActive = ETrue; |
|
473 |
|
474 //Reset Ring state |
|
475 iGloblePhone->GetCallInfoManager().SetIncomingCallFlag(EFalse); |
|
476 |
|
477 //Set hang up active |
|
478 iGloblePhone->GetCallInfoManager().GetHangupCommandRecords().SetHangupActiveFlag(ETrue); |
|
479 |
|
480 //Create Hang up |
|
481 CATChld* cHangupCall = CATChld::NewL((*iGloblePhone), iCtsyDispatcherCallback); |
|
482 iGloblePhone->SetActiveRequest(cHangupCall); |
|
483 cHangupCall->SetCallId(aCallId); |
|
484 cHangupCall->SetHangupCase(aHangupCause); |
|
485 cHangupCall->SetIpcType(CATChld::ELtsyReqCallHangup); |
|
486 cHangupCall->SetChldType(CATChld::ERleaseSpecificCall); |
|
487 cHangupCall->StartRequest(); |
|
488 } |
|
489 else if (nRet == KErrInUse) |
|
490 { |
|
491 LOGTEXT( _L8("[Ltsy CallControl] Starting Hang up in process so add hangup information")); |
|
492 |
|
493 const TLtsyCallInformation& tCallInfo(iGloblePhone->GetCallInfoManager().GetCallInformationByCallId(aCallId)); |
|
494 |
|
495 if (iGloblePhone->GetCallInfoManager().GetHangupCommandRecords().GetHangupActiveFlag()) |
|
496 { |
|
497 //Hang up is processing so add its information to array |
|
498 nRet = iGloblePhone->GetCallInfoManager().GetHangupCommandRecords().AddHangupCommandInfo(aCallId, aHangupCause); |
|
499 } |
|
500 else if (TLtsyCallInformation::EDialingCall == tCallInfo.GetCallState() || |
|
501 TLtsyCallInformation::EAlertingCall == tCallInfo.GetCallState()) |
|
502 { |
|
503 |
|
504 //Delete last call |
|
505 iGloblePhone->DeleteLastActiveRequest(); |
|
506 |
|
507 //Setting Port active |
|
508 iGloblePhone->iEventSignalActive = ETrue; |
|
509 |
|
510 //Set hang up active |
|
511 iGloblePhone->GetCallInfoManager().GetHangupCommandRecords().SetHangupActiveFlag(ETrue); |
|
512 |
|
513 //Create Hang up |
|
514 CATChld* cHangupCall = CATChld::NewL((*iGloblePhone), iCtsyDispatcherCallback); |
|
515 iGloblePhone->SetActiveRequest(cHangupCall); |
|
516 cHangupCall->SetCallId(aCallId); |
|
517 cHangupCall->SetHangupCase(aHangupCause); |
|
518 cHangupCall->SetIpcType(CATChld::ELtsyReqCallHangup); |
|
519 cHangupCall->SetChldType(CATChld::ERleaseSpecificCall); |
|
520 cHangupCall->StartRequest(); |
|
521 nRet = KErrNone; |
|
522 } |
|
523 } |
|
524 |
|
525 return nRet; |
|
526 } // CLtsyCallControlHandler::HandleHangUpReqL |
|
527 |
|
528 |
|
529 TInt CLtsyCallControlHandler::HandleResumeReqL(TInt aCallId) |
|
530 /** |
|
531 * This request is completed by invoking |
|
532 * CCtsyDispatcherCallback::CallbackCallControlResumeComp() |
|
533 * |
|
534 * @param aCallId The Call ID of the call to resume. |
|
535 * |
|
536 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
537 * or another error code to indicate the failure otherwise. |
|
538 */ |
|
539 { |
|
540 LOGTEXT(_L8("[Ltsy CallControl] Starting CLtsyCallControlHandler::HandleResumeReqL")); |
|
541 LOGTEXT2(_L8("[Ltsy CallControl] aCallId = %d"), aCallId); |
|
542 |
|
543 TInt nRet = iGloblePhone->CheckGlobalPhoneStatus(); |
|
544 if (nRet == KErrNone) |
|
545 { |
|
546 //Setting Port active |
|
547 iGloblePhone->iEventSignalActive = ETrue; |
|
548 |
|
549 //Create DTMF |
|
550 CATChld* cResumeCall = CATChld::NewL((*iGloblePhone), iCtsyDispatcherCallback); |
|
551 iGloblePhone->SetActiveRequest(cResumeCall); |
|
552 if (cResumeCall->IsActiveCall(aCallId)) |
|
553 { |
|
554 LOGTEXT2(_L8("[Ltsy CallControl] aCallId = %d is a active call so return KErrNone"), aCallId); |
|
555 iGloblePhone->iEventSignalActive = EFalse; |
|
556 return KErrNotSupported; |
|
557 } |
|
558 cResumeCall->SetCallId(aCallId); |
|
559 cResumeCall->SetIpcType(CATChld::ELtsyReqCallResume); |
|
560 cResumeCall->SetChldType(CATChld::EHeldAllActiveCallAndAcceptHeldWaiting); |
|
561 cResumeCall->StartRequest(); |
|
562 } |
|
563 |
|
564 return nRet; |
|
565 } // CLtsyCallControlHandler::HandleResumeReqL |
|
566 |
|
567 TInt CLtsyCallControlHandler::HandleSetDynamicHscsdParamsReqL( |
|
568 TInt /*aCallId*/, const RMobileCall::TMobileHscsdCallParamsV1& /*aHscsdParams*/) |
|
569 /** |
|
570 * This request is completed by invoking |
|
571 * CCtsyDispatcherCallback::CallbackCallControlSetDynamicHscsdParamsComp() |
|
572 * |
|
573 * @param aCallId The call ID of the data call. |
|
574 * |
|
575 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
576 * or another error code to indicate the failure otherwise. |
|
577 */ |
|
578 { |
|
579 TSYLOGENTRYEXIT; |
|
580 |
|
581 TInt ret = KErrNotSupported; |
|
582 |
|
583 // TODO: Add implementation here....... |
|
584 |
|
585 |
|
586 return TSYLOGSETEXITERR(ret); |
|
587 } // CLtsyCallControlHandler::HandleSetDynamicHscsdParamsReqL |
|
588 |
|
589 |
|
590 TInt CLtsyCallControlHandler::HandleDialVoiceReqL(RMobilePhone::TMobilePhoneALSLine /*aLine*/, |
|
591 const RMobilePhone::TMobileAddress& aDialledParty, const RMobileCall::TMobileCallParamsV1& /*aCallParamsV1*/, |
|
592 TBool /*aIsIsvCall*/, RMobileCall::TCallParamOrigin /*aCallOrigin*/, TBool /*aPerformFdnCheck*/) |
|
593 /** |
|
594 * This request is completed by invoking |
|
595 * CCtsyDispatcherCallback::CallbackCallControlDialVoiceComp() |
|
596 * |
|
597 * @param aCallLine The line to use to dial the call. |
|
598 * |
|
599 * @param aDialledParty Details about the dialled party including the phone |
|
600 * number to dial. |
|
601 * |
|
602 * @param aCallParamsV1 The call parameters of the call to dial. |
|
603 * |
|
604 * @param aIsIsvCall Indicates whether the call originated from a third party |
|
605 * application. |
|
606 * |
|
607 * @param aCallOrigin The origin of the dial request. e.g. Whether the dial |
|
608 * came from an Etel client or the SIM or another source. |
|
609 * |
|
610 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
611 * or another error code to indicate the failure otherwise. |
|
612 */ |
|
613 { |
|
614 LOGTEXT( _L8("[Ltsy CallControl] Starting CLtsyCallControlHandler::HandleDialVoiceReqL()")); |
|
615 |
|
616 TInt nEmergencyCallId = iGloblePhone->GetCallInfoManager().FindEmergencyCallId(); |
|
617 if (nEmergencyCallId != KErrNotFound) |
|
618 { |
|
619 const TLtsyCallInformation& tCallInfo(iGloblePhone->GetCallInfoManager().GetCallInformationByCallId(nEmergencyCallId)); |
|
620 if (TLtsyCallInformation::EHeldCall != tCallInfo.GetCallState()) |
|
621 { |
|
622 return KErrNotSupported; |
|
623 } |
|
624 } |
|
625 |
|
626 //Set telephone number |
|
627 TBuf8<KCommsDbSvrMaxFieldLength> dialModifier; |
|
628 TInt nRet = iGloblePhone->iConfiguration->ConfigModemStringL( |
|
629 TPtrC(KCDTypeNameDialToneWaitModifier), |
|
630 dialModifier); |
|
631 if (nRet != KErrNone) |
|
632 { |
|
633 return nRet; |
|
634 } |
|
635 |
|
636 TBuf8<RMobilePhone::KMaxMobileTelNumberSize> tTelNum; |
|
637 tTelNum.Copy(aDialledParty.iTelNumber.Left(tTelNum.MaxLength())); |
|
638 |
|
639 nRet = tTelNum.FindF(dialModifier); |
|
640 if (nRet != KErrNotFound) |
|
641 { |
|
642 tTelNum.Delete(nRet, 1); |
|
643 } |
|
644 |
|
645 nRet = iGloblePhone->CheckGlobalPhoneStatus(); |
|
646 if (nRet == KErrNone) |
|
647 { |
|
648 //Setting Port active |
|
649 iGloblePhone->iEventSignalActive = ETrue; |
|
650 |
|
651 //Create dial voice |
|
652 CATDialVoice* cDialVoice = CATDialVoice::NewL((*iGloblePhone), iCtsyDispatcherCallback); |
|
653 iGloblePhone->SetActiveRequest(cDialVoice); |
|
654 cDialVoice->SetTelephoneNumber(tTelNum); |
|
655 cDialVoice->StartRequest(); |
|
656 } |
|
657 |
|
658 return nRet; |
|
659 } // CLtsyCallControlHandler::HandleDialReqL |
|
660 |
|
661 TInt CLtsyCallControlHandler::HandleTransferReqL(TInt /*aHeldCallId*/, TInt /*aSecondCallId*/) |
|
662 /** |
|
663 * This request is completed by invoking |
|
664 * CCtsyDispatcherCallback::CallbackCallControlTransferComp() |
|
665 * |
|
666 * @param aHeldCallId Call ID of the held call to transfer. |
|
667 * |
|
668 * @param aSecondCallId Call ID of the other to transfer the held call to. |
|
669 * |
|
670 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
671 * or another error code to indicate the failure otherwise. |
|
672 */ |
|
673 { |
|
674 TSYLOGENTRYEXIT; |
|
675 |
|
676 TInt ret = KErrNotSupported; |
|
677 |
|
678 // TODO: Add implementation here....... |
|
679 |
|
680 |
|
681 return TSYLOGSETEXITERR(ret); |
|
682 } // CLtsyCallControlHandler::HandleTransferReqL |
|
683 |
|
684 |
|
685 TInt CLtsyCallControlHandler::HandleSendDtmfTonesReqL(TInt aCallId, const TDesC &aTones) |
|
686 /** |
|
687 * This request is completed by invoking |
|
688 * CCtsyDispatcherCallback::CallbackCallControlSendDtmfTonesComp() |
|
689 * |
|
690 * @param aCallId The Call ID of the call through which the DTMF string will be |
|
691 * sent. |
|
692 * |
|
693 * @param aTones Tones to send through the active call. |
|
694 * |
|
695 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
696 * or another error code to indicate the failure otherwise. |
|
697 */ |
|
698 { |
|
699 LOGTEXT( _L8("[Ltsy CallControl] Starting CLtsyCallControlHandler::HandleSendDtmfTonesReqL()")); |
|
700 LOGTEXT3( _L8("[Ltsy CallControl] CallId = %d\tTones = %S"), aCallId, &aTones); |
|
701 |
|
702 TInt nRet = iGloblePhone->CheckGlobalPhoneStatus(); |
|
703 if (nRet == KErrNone) |
|
704 { |
|
705 //Setting Port active |
|
706 iGloblePhone->iEventSignalActive = ETrue; |
|
707 |
|
708 //Create DTMF |
|
709 CATDtmfVts* cDtmfVts = CATDtmfVts::NewL((*iGloblePhone), iCtsyDispatcherCallback); |
|
710 iGloblePhone->SetActiveRequest(cDtmfVts); |
|
711 //Set CallId |
|
712 TInt nRet = cDtmfVts->SetCallId(aCallId); |
|
713 if (nRet != KErrNone) |
|
714 { |
|
715 return nRet; |
|
716 } |
|
717 |
|
718 //Set Tones |
|
719 nRet = cDtmfVts->SetDtmfString(aTones); |
|
720 if (nRet != KErrNone) |
|
721 { |
|
722 return nRet; |
|
723 } |
|
724 |
|
725 //set work type |
|
726 cDtmfVts->SetDtmfWorkType(CATDtmfVts::EDtmfSendMoreTones); |
|
727 cDtmfVts->StartRequest(); |
|
728 } |
|
729 |
|
730 return nRet; |
|
731 } // CLtsyCallControlHandler::HandleSendDtmfTonesReqL |
|
732 |
|
733 |
|
734 TInt CLtsyCallControlHandler::HandleGetIdentityServiceStatusReqL(RMobilePhone::TMobilePhoneIdService /*aService*/) |
|
735 /** |
|
736 * This request is completed by invoking |
|
737 * CCtsyDispatcherCallback::CallbackCallControlGetIdentityServiceStatusComp() |
|
738 * |
|
739 * @param aService The service whose status needs to be retrieved. |
|
740 * |
|
741 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
742 * or another error code to indicate the failure otherwise. |
|
743 */ |
|
744 { |
|
745 TSYLOGENTRYEXIT; |
|
746 |
|
747 TInt ret = KErrNotSupported; |
|
748 |
|
749 // TODO: Add implementation here....... |
|
750 |
|
751 |
|
752 return TSYLOGSETEXITERR(ret); |
|
753 } // CLtsyCallControlHandler::HandleGetIdentityServiceStatusReqL |
|
754 |
|
755 |
|
756 TInt CLtsyCallControlHandler::HandleSwapReqL(TInt aHeldCallId, TInt aConnectedCallId) |
|
757 /** |
|
758 * This request is completed by invoking |
|
759 * CCtsyDispatcherCallback::CallbackCallControlSwapComp() |
|
760 * |
|
761 * @param aHeldCallId The Call ID of the held call to swap. |
|
762 * |
|
763 * @param aConnectedCallId The Call ID of the connected call to swap. |
|
764 * |
|
765 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
766 * or another error code to indicate the failure otherwise. |
|
767 */ |
|
768 { |
|
769 LOGTEXT(_L8("[Ltsy CallControl] Starting CLtsyCallControlHandler::HandleSwapReqL")); |
|
770 LOGTEXT3(_L8("[Ltsy CallControl] aHeldCallId = %d\taConnectedCallId = %d"), aHeldCallId, aConnectedCallId); |
|
771 |
|
772 TInt nRet = iGloblePhone->CheckGlobalPhoneStatus(); |
|
773 if (nRet == KErrNone) |
|
774 { |
|
775 //Setting Port active |
|
776 iGloblePhone->iEventSignalActive = ETrue; |
|
777 |
|
778 //Create DTMF |
|
779 CATChld* cSwapCall = CATChld::NewL((*iGloblePhone), iCtsyDispatcherCallback); |
|
780 iGloblePhone->SetActiveRequest(cSwapCall); |
|
781 cSwapCall->SetCallId(aHeldCallId); |
|
782 cSwapCall->SetConnectedCallId(aConnectedCallId); |
|
783 cSwapCall->SetIpcType(CATChld::ELtsyReqCallSwap); |
|
784 cSwapCall->SetChldType(CATChld::EHeldAllActiveCallAndAcceptHeldWaiting); |
|
785 cSwapCall->StartRequest(); |
|
786 } |
|
787 |
|
788 return nRet; |
|
789 } // CLtsyCallControlHandler::HandleSwapReqL |
|
790 |
|
791 TInt CLtsyCallControlHandler::HandleLoanDataPortSyncL(TInt /*aCallId*/, RCall::TCommPort& /*aCommPort*/) |
|
792 /** |
|
793 * This request is part of |
|
794 * MLtsyDispatchCallControlLoanDataPort::HandleLoanDataPortSyncL() |
|
795 * |
|
796 * @param aCallId Call ID of the data call requiring the data port. |
|
797 * |
|
798 * @param aCommPort Output parameter. The communications port information |
|
799 * retrieved by a client using the RCall::LoanDataPort() API. |
|
800 * |
|
801 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
802 * or another error code to indicate the failure otherwise. |
|
803 */ |
|
804 { |
|
805 TSYLOGENTRYEXIT; |
|
806 |
|
807 TInt ret = KErrNotSupported; |
|
808 |
|
809 // TODO: Add implementation here....... |
|
810 |
|
811 |
|
812 return TSYLOGSETEXITERR(ret); |
|
813 } // CLtsyCallControlHandler::HandleLoanDataPortSyncL |
|
814 |
|
815 |
|
816 TInt CLtsyCallControlHandler::HandleRecoverDataPortSyncL(TInt /*aCallId*/, RCall::TCommPort& /*aCommPort*/) |
|
817 /** |
|
818 * This request is part of |
|
819 * MLtsyDispatchCallControlRecoverDataPort::HandleRecoverDataPortSyncL() |
|
820 * |
|
821 * @param aCallId Call ID of the data call requiring the data port. |
|
822 * |
|
823 * @param aCommPort The data port to recover. This contains the details previously |
|
824 * returned by a call to RCall::LoanDataPort() |
|
825 * |
|
826 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
827 * or another error code to indicate the failure otherwise. |
|
828 */ |
|
829 { |
|
830 TSYLOGENTRYEXIT; |
|
831 |
|
832 TInt ret = KErrNotSupported; |
|
833 |
|
834 // TODO: Add implementation here....... |
|
835 |
|
836 |
|
837 return TSYLOGSETEXITERR(ret); |
|
838 } // CLtsyCallControlHandler::HandleRecoverDataPortSyncL |
|
839 |
|
840 |
|
841 TInt CLtsyCallControlHandler::HandleStartDtmfToneReqL(TInt aCallId, const TChar& aTone) |
|
842 /** |
|
843 * This request is completed by invoking |
|
844 * CCtsyDispatcherCallback::CallbackCallControlStartDtmfTone() |
|
845 * |
|
846 * @param aCallId Call ID of the connected call through which the DTMF tone |
|
847 * will be sent. |
|
848 * |
|
849 * @param aTone The tone character to send through the call. |
|
850 * |
|
851 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
852 * or another error code to indicate the failure otherwise. |
|
853 */ |
|
854 { |
|
855 LOGTEXT(_L8("[Ltsy CallControl] Starting CLtsyCallControlHandler::HandleStartDtmfToneReqL()")); |
|
856 LOGTEXT2( _L8("[Ltsy CallControl] CallId = %d"), aCallId); |
|
857 |
|
858 TInt nRet = iGloblePhone->CheckGlobalPhoneStatus(); |
|
859 if (nRet == KErrNone) |
|
860 { |
|
861 //Setting Port active |
|
862 iGloblePhone->iEventSignalActive = ETrue; |
|
863 |
|
864 //Create DTMF |
|
865 CATDtmfVts* cDtmfVts = CATDtmfVts::NewL((*iGloblePhone), iCtsyDispatcherCallback); |
|
866 iGloblePhone->SetActiveRequest(cDtmfVts); |
|
867 //Set CallId |
|
868 TInt nRet = cDtmfVts->SetCallId(aCallId); |
|
869 if (nRet != KErrNone) |
|
870 { |
|
871 return nRet; |
|
872 } |
|
873 |
|
874 //Set Tones |
|
875 TBuf<16> bufTone; |
|
876 bufTone.Append(aTone); |
|
877 nRet = cDtmfVts->SetDtmfString(bufTone); |
|
878 if (nRet != KErrNone) |
|
879 { |
|
880 return nRet; |
|
881 } |
|
882 |
|
883 //set work type |
|
884 cDtmfVts->SetDtmfWorkType(CATDtmfVts::EDtmfSendOneTone); |
|
885 cDtmfVts->StartRequest(); |
|
886 } |
|
887 |
|
888 return nRet; |
|
889 } // CLtsyCallControlHandler::HandleStartDtmfToneSyncL |
|
890 |
|
891 TInt CLtsyCallControlHandler::HandleGetActiveAlsLineReqL() |
|
892 /** |
|
893 * This request is completed by invoking |
|
894 * CCtsyDispatcherCallback::CallbackCallControlGetActiveAlsLineComp() |
|
895 * |
|
896 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
897 * or another error code to indicate the failure otherwise. |
|
898 */ |
|
899 { |
|
900 TSYLOGENTRYEXIT; |
|
901 |
|
902 TInt ret = KErrNotSupported; |
|
903 |
|
904 // TO DO: Add implementation here....... |
|
905 |
|
906 |
|
907 return TSYLOGSETEXITERR(ret); |
|
908 } // CLtsyCallControlHandler::HandleGetActiveAlsLineReqL |
|
909 |
|
910 TInt CLtsyCallControlHandler::HandleDialDataReqL(const RMobilePhone::TMobileAddress& /*aDialledParty*/, const RMobileCall::TMobileDataCallParamsV1& /*aCallParamsV1*/, TBool /*aPerformFdnCheck*/) |
|
911 /** |
|
912 * This request is completed by invoking |
|
913 * CCtsyDispatcherCallback::CallbackCallControlGetActiveAlsLineComp() |
|
914 * |
|
915 * @param aLine The line to use to dial the call. |
|
916 * |
|
917 * @param aDialledParty Details about the dialled party including the phone |
|
918 * number to dial. |
|
919 * |
|
920 * @param aCallParamsV1 The call parameters of the call to dial. |
|
921 * |
|
922 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
923 * or another error code to indicate the failure otherwise. |
|
924 */ |
|
925 { |
|
926 TSYLOGENTRYEXIT; |
|
927 |
|
928 TInt ret = KErrNotSupported; |
|
929 |
|
930 // TO DO: Add implementation here....... |
|
931 |
|
932 |
|
933 return TSYLOGSETEXITERR(ret); |
|
934 } // CLtsyCallControlHandler::HandleDialDataReqL |
|
935 |
|
936 TInt CLtsyCallControlHandler::HandleQueryIsEmergencyNumberSyncL(const TDesC& aNumber, TBool& aIsEmergencyNumber) |
|
937 /** |
|
938 * This request is part of |
|
939 * MLtsyDispatchCallControlQueryIsEmergencyNumber::HandleQueryIsEmergencyNumberSyncL() |
|
940 * |
|
941 * @param aNumber Input parameter. The phone number being queried to see |
|
942 * if it is an emergency number or not. |
|
943 * |
|
944 * @param aIsEmergencyNumber Output parameter used to indicate whether the |
|
945 * aNumber parameter is an emergency number. ETrue if it is, EFalse otherwise. |
|
946 * |
|
947 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
948 * or another error code to indicate the failure otherwise. |
|
949 */ |
|
950 { |
|
951 LOGTEXT(_L8("[Ltsy CallControl] Starting CLtsyCallControlHandler::HandleQueryIsEmergencyNumberSyncL()")); |
|
952 |
|
953 TInt nEmergencyCallId = iGloblePhone->GetCallInfoManager().FindEmergencyCallId(); |
|
954 if (nEmergencyCallId != KErrNotFound) |
|
955 { |
|
956 const TLtsyCallInformation& tCallInfo(iGloblePhone->GetCallInfoManager().GetCallInformationByCallId(nEmergencyCallId)); |
|
957 if (TLtsyCallInformation::EHeldCall != tCallInfo.GetCallState()) |
|
958 { |
|
959 return KErrNotSupported; |
|
960 } |
|
961 } |
|
962 |
|
963 //Check Emergency call number |
|
964 if (aNumber.CompareF(KLtsyEmergencyCallNumber911) == 0 || |
|
965 aNumber.CompareF(KLtsyEmergencyCallNumber112) == 0 ) |
|
966 { |
|
967 aIsEmergencyNumber = ETrue; |
|
968 } |
|
969 else |
|
970 { |
|
971 aIsEmergencyNumber = EFalse; |
|
972 } |
|
973 |
|
974 return KErrNone; |
|
975 } // CLtsyCallControlHandler::HandleQueryIsEmergencyNumberSyncL |
|
976 |
|
977 |
|
978 TInt CLtsyCallControlHandler::HandleGetAlsPpSupportL() |
|
979 /** |
|
980 * This request is completed by invoking |
|
981 * CCtsyDispatcherCallback::CallbackCallControlGetAlsPpSupportComp() |
|
982 * |
|
983 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
984 * or another error code to indicate the failure otherwise. |
|
985 */ |
|
986 { |
|
987 TSYLOGENTRYEXIT; |
|
988 |
|
989 TInt ret = KErrNotSupported; |
|
990 |
|
991 // TODO: Add implementation here....... |
|
992 |
|
993 |
|
994 return TSYLOGSETEXITERR(ret); |
|
995 } // CLtsyCallControlHandler::HandleGetAlsPp |
|
996 |
|
997 TInt CLtsyCallControlHandler::HandleGetAlsBlockedStatusL() |
|
998 /** |
|
999 * This request is completed by invoking |
|
1000 * CCtsyDispatcherCallback::CallbackCallControlGetAlsBlockedStatusComp() |
|
1001 * |
|
1002 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
1003 * or another error code to indicate the failure otherwise. |
|
1004 */ |
|
1005 { |
|
1006 TSYLOGENTRYEXIT; |
|
1007 |
|
1008 TInt ret = KErrNotSupported; |
|
1009 |
|
1010 // TODO: Add implementation here....... |
|
1011 |
|
1012 |
|
1013 return TSYLOGSETEXITERR(ret); |
|
1014 } // CLtsyCallControlHandler::HandleGetAlsBlockedStatus |
|
1015 |
|
1016 TInt CLtsyCallControlHandler::HandleSetAlsBlockedL(RMmCustomAPI::TSetAlsBlock /*aBlocked*/) |
|
1017 /** |
|
1018 * This request is completed by invoking |
|
1019 * CCtsyDispatcherCallback::CallbackCallControlSetAlsBlockedComp() |
|
1020 * |
|
1021 * |
|
1022 * @param aBlocked RMmCustomAPI::EDeactivateBlock when the ALS blocked needs to be deactivate, |
|
1023 * RMmCustomAPI::EActivateBlock when the ALS blocked needs to be activate. |
|
1024 * |
|
1025 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
1026 * or another error code to indicate the failure otherwise. |
|
1027 */ |
|
1028 { |
|
1029 TSYLOGENTRYEXIT; |
|
1030 |
|
1031 TInt ret = KErrNotSupported; |
|
1032 |
|
1033 // TODO: Add implementation here....... |
|
1034 |
|
1035 |
|
1036 return TSYLOGSETEXITERR(ret); |
|
1037 } // CLtsyCallControlHandler::HandleSetAlsBlockedL |
|
1038 |
|
1039 TInt CLtsyCallControlHandler::HandleGetLifeTimeL() |
|
1040 /** |
|
1041 * This request is completed by invoking |
|
1042 * CCtsyDispatcherCallback::CallbackCallControlGetLifeTimeComp() |
|
1043 * |
|
1044 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
1045 * or another error code to indicate the failure otherwise. |
|
1046 */ |
|
1047 { |
|
1048 TSYLOGENTRYEXIT; |
|
1049 |
|
1050 TInt ret = KErrNotSupported; |
|
1051 |
|
1052 // TODO: Add implementation here....... |
|
1053 |
|
1054 |
|
1055 return TSYLOGSETEXITERR(ret); |
|
1056 } // CLtsyCallControlHandler::HandleGetLifeTime |
|
1057 |
|
1058 TInt CLtsyCallControlHandler::HandleTerminateErrorCallL(TInt /*aCallId*/) |
|
1059 /** |
|
1060 * This request is completed by invoking |
|
1061 * CCtsyDispatcherCallback::CallbackCallControlTerminateErrorCallComp() |
|
1062 * |
|
1063 * |
|
1064 * @param aCallId The Call ID of the call to terminate. |
|
1065 * |
|
1066 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
1067 * or another error code to indicate the failure otherwise. |
|
1068 */ |
|
1069 { |
|
1070 TSYLOGENTRYEXIT; |
|
1071 |
|
1072 TInt ret = KErrNotSupported; |
|
1073 |
|
1074 // TODO: Add implementation here....... |
|
1075 |
|
1076 |
|
1077 return TSYLOGSETEXITERR(ret); |
|
1078 } // CLtsyCallControlHandler::HandleTerminateErrorCallL |
|
1079 |
|
1080 TInt CLtsyCallControlHandler::HandleTerminateAllCallsL() |
|
1081 /** |
|
1082 * This request is completed by invoking |
|
1083 * CCtsyDispatcherCallback::::CallbackCallControlTerminateAllCallsComp() |
|
1084 * |
|
1085 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
1086 * or another error code to indicate the failure otherwise. |
|
1087 */ |
|
1088 { |
|
1089 LOGTEXT(_L8("[Ltsy CallControl] Starting CLtsyCallControlHandler::HandleTerminateAllCallsL()")); |
|
1090 |
|
1091 TInt nRet = iGloblePhone->CheckGlobalPhoneStatus(); |
|
1092 if (nRet == KErrNone) |
|
1093 { |
|
1094 //Setting Port active |
|
1095 iGloblePhone->iEventSignalActive = ETrue; |
|
1096 |
|
1097 //Reset Ring state |
|
1098 iGloblePhone->GetCallInfoManager().SetIncomingCallFlag(EFalse); |
|
1099 |
|
1100 CATHangUp* cTerminateAllCalls = CATHangUp::NewL((*iGloblePhone), iCtsyDispatcherCallback); |
|
1101 iGloblePhone->SetActiveRequest(cTerminateAllCalls); |
|
1102 cTerminateAllCalls->SetHangupOperator(CATHangUp::ECustomAPI); |
|
1103 cTerminateAllCalls->StartRequest(); |
|
1104 } |
|
1105 |
|
1106 return nRet; |
|
1107 } // CLtsyCallControlHandler::HandleTerminateAllCallsL |
|
1108 |
|
1109 TInt CLtsyCallControlHandler::HandleGetCallForwardingIndicatorL() |
|
1110 /** |
|
1111 * This request is completed by invoking |
|
1112 * CCtsyDispatcherCallback::CallbackCallControlGetCallForwardingIndicatorComp() |
|
1113 * |
|
1114 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
1115 * or another error code to indicate the failure otherwise. |
|
1116 */ |
|
1117 { |
|
1118 TSYLOGENTRYEXIT; |
|
1119 |
|
1120 TInt ret = KErrNotSupported; |
|
1121 |
|
1122 // TODO: Add implementation here....... |
|
1123 |
|
1124 |
|
1125 return TSYLOGSETEXITERR(ret); |
|
1126 } // CLtsyCallControlHandler::HandleGetCallForwardingIndicator |
|
1127 |
|
1128 TInt CLtsyCallControlHandler::HandleUpdateLifeTimerReqL(TUint32 /*aDuration*/) |
|
1129 /** |
|
1130 * This request is completed by invoking |
|
1131 * CCtsyDispatcherCallback::CallbackCallControlUpdateLifeTimerComp |
|
1132 * |
|
1133 * @param aDuration Time spent on call since the last invocation of this method. |
|
1134 * |
|
1135 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
1136 * or another error code to indicate the failure otherwise. |
|
1137 */ |
|
1138 { |
|
1139 TSYLOGENTRYEXIT; |
|
1140 |
|
1141 TInt ret = KErrNotSupported; |
|
1142 |
|
1143 // TO DO: Add implementation here....... |
|
1144 |
|
1145 |
|
1146 return TSYLOGSETEXITERR(ret); |
|
1147 } // CLtsyCallControlHandler:::HandleUpdateLifeTimerReqL |
|
1148 |
|
1149 |
|
1150 MLtsyUnsolicitedCommandObserver* CLtsyCallControlHandler::GetUnsolicitedCallControlHandler() const |
|
1151 { |
|
1152 return static_cast<MLtsyUnsolicitedCommandObserver*>(iUnsolicitedHandler); |
|
1153 } |
|
1154 |
|
1155 //End of file |
|