|
1 // Copyright (c) 2008-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 #include "ccallcontroldispatcher.h" |
|
17 |
|
18 #include <ctsy/ltsy/mltsydispatchcallcontrolinterface.h> |
|
19 #include <ctsy/pluginapi/mmmessagemanagercallback.h> |
|
20 #include <ctsy/serviceapi/mmtsy_ipcdefs.h> |
|
21 |
|
22 #include <ctsy/ltsy/ltsylogger.h> |
|
23 #include "ctsydispatcherpanic.h" |
|
24 #include "tdispatcherholder.h" |
|
25 #include "csatdispatcher.h" |
|
26 |
|
27 CCallControlDispatcher::CCallControlDispatcher( |
|
28 MLtsyDispatchFactoryV1& aLtsyFactory, |
|
29 MmMessageManagerCallback& aMessageManagerCallback, |
|
30 CRequestQueueOneShot& aRequestAsyncOneShot) |
|
31 : iLtsyFactoryV1(aLtsyFactory), |
|
32 iMessageManagerCallback(aMessageManagerCallback), |
|
33 iRequestAsyncOneShot(aRequestAsyncOneShot), |
|
34 iFoundDtmfStop(EFalse), iModeUsedForVoiceCallDial(RMobilePhone::EServiceUnspecified), |
|
35 iFdnCheckPerformed(EFalse),iSwapHeldCallId(KInvalidCallId), |
|
36 iSwapConnectedCallId(KInvalidCallId),iTransferHeldCallId(KInvalidCallId), |
|
37 iTransferSecondCallId(KInvalidCallId) |
|
38 { |
|
39 iDtmfString.Zero(); |
|
40 } // CCallControlDispatcher::CCallControlDispatcher |
|
41 |
|
42 |
|
43 CCallControlDispatcher::~CCallControlDispatcher() |
|
44 { |
|
45 } // CCallControlDispatcher::~CCallControlDispatcher |
|
46 |
|
47 |
|
48 CCallControlDispatcher* CCallControlDispatcher::NewLC( |
|
49 MLtsyDispatchFactoryV1& aLtsyFactory, |
|
50 MmMessageManagerCallback& aMessageManagerCallback, |
|
51 CRequestQueueOneShot& aRequestAsyncOneShot) |
|
52 { |
|
53 TSYLOGENTRYEXIT; |
|
54 CCallControlDispatcher* self = |
|
55 new (ELeave) CCallControlDispatcher(aLtsyFactory, aMessageManagerCallback, aRequestAsyncOneShot); |
|
56 CleanupStack::PushL(self); |
|
57 self->ConstructL(); |
|
58 return self; |
|
59 } // CCallControlDispatcher::NewLC |
|
60 |
|
61 |
|
62 CCallControlDispatcher* CCallControlDispatcher::NewL( |
|
63 MLtsyDispatchFactoryV1& aLtsyFactory, |
|
64 MmMessageManagerCallback& aMessageManagerCallback, |
|
65 CRequestQueueOneShot& aRequestAsyncOneShot) |
|
66 { |
|
67 TSYLOGENTRYEXIT; |
|
68 CCallControlDispatcher* self = |
|
69 CCallControlDispatcher::NewLC(aLtsyFactory, aMessageManagerCallback, aRequestAsyncOneShot); |
|
70 CleanupStack::Pop (self); |
|
71 return self; |
|
72 } // CCallControlDispatcher::NewL |
|
73 |
|
74 |
|
75 void CCallControlDispatcher::ConstructL() |
|
76 /** |
|
77 * Second phase constructor. |
|
78 */ |
|
79 { |
|
80 TSYLOGENTRYEXIT; |
|
81 |
|
82 // Get the Licensee LTSY interfaces related to CallControl functionality |
|
83 // from the factory |
|
84 |
|
85 |
|
86 if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchCallControlFuncUnitId, MLtsyDispatchCallControlAnswer::KLtsyDispatchCallControlAnswerApiId)) |
|
87 { |
|
88 TAny* answerInterface = NULL; |
|
89 iLtsyFactoryV1.GetDispatchHandler( |
|
90 MLtsyDispatchCallControlAnswer::KLtsyDispatchCallControlAnswerApiId, |
|
91 answerInterface); |
|
92 iLtsyDispatchCallControlAnswer = |
|
93 static_cast<MLtsyDispatchCallControlAnswer*>(answerInterface); |
|
94 __ASSERT_DEBUG(iLtsyDispatchCallControlAnswer, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
95 } |
|
96 |
|
97 if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchCallControlFuncUnitId, MLtsyDispatchCallControlHold::KLtsyDispatchCallControlHoldApiId)) |
|
98 { |
|
99 TAny* holdInterface = NULL; |
|
100 iLtsyFactoryV1.GetDispatchHandler( |
|
101 MLtsyDispatchCallControlHold::KLtsyDispatchCallControlHoldApiId, |
|
102 holdInterface); |
|
103 iLtsyDispatchCallControlHold = |
|
104 static_cast<MLtsyDispatchCallControlHold*>(holdInterface); |
|
105 __ASSERT_DEBUG(iLtsyDispatchCallControlHold, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
106 } |
|
107 |
|
108 if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchCallControlFuncUnitId, MLtsyDispatchCallControlDialEmergency::KLtsyDispatchCallControlDialEmergencyApiId)) |
|
109 { |
|
110 TAny* dialEmergencyInterface = NULL; |
|
111 iLtsyFactoryV1.GetDispatchHandler( |
|
112 MLtsyDispatchCallControlDialEmergency::KLtsyDispatchCallControlDialEmergencyApiId, |
|
113 dialEmergencyInterface); |
|
114 iLtsyDispatchCallControlDialEmergency = |
|
115 static_cast<MLtsyDispatchCallControlDialEmergency*>(dialEmergencyInterface); |
|
116 __ASSERT_DEBUG(iLtsyDispatchCallControlDialEmergency, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
117 } |
|
118 |
|
119 if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchCallControlFuncUnitId, MLtsyDispatchCallControlStopDtmfTone::KLtsyDispatchCallControlStopDtmfToneApiId)) |
|
120 { |
|
121 TAny* stopDtmfToneInterface = NULL; |
|
122 iLtsyFactoryV1.GetDispatchHandler( |
|
123 MLtsyDispatchCallControlStopDtmfTone::KLtsyDispatchCallControlStopDtmfToneApiId, |
|
124 stopDtmfToneInterface); |
|
125 iLtsyDispatchCallControlStopDtmfTone = |
|
126 static_cast<MLtsyDispatchCallControlStopDtmfTone*>(stopDtmfToneInterface); |
|
127 __ASSERT_DEBUG(iLtsyDispatchCallControlStopDtmfTone, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
128 } |
|
129 |
|
130 if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchCallControlFuncUnitId, MLtsyDispatchCallControlSetActiveAlsLine::KLtsyDispatchCallControlSetActiveAlsLineApiId)) |
|
131 { |
|
132 TAny* setActiveAlsLineInterface = NULL; |
|
133 iLtsyFactoryV1.GetDispatchHandler( |
|
134 MLtsyDispatchCallControlSetActiveAlsLine::KLtsyDispatchCallControlSetActiveAlsLineApiId, |
|
135 setActiveAlsLineInterface); |
|
136 iLtsyDispatchCallControlSetActiveAlsLine = |
|
137 static_cast<MLtsyDispatchCallControlSetActiveAlsLine*>(setActiveAlsLineInterface); |
|
138 __ASSERT_DEBUG(iLtsyDispatchCallControlSetActiveAlsLine, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
139 } |
|
140 |
|
141 if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchCallControlFuncUnitId, MLtsyDispatchCallControlSendDtmfTonesCancel::KLtsyDispatchCallControlSendDtmfTonesCancelApiId)) |
|
142 { |
|
143 TAny* sendDtmfTonesCancelInterface = NULL; |
|
144 iLtsyFactoryV1.GetDispatchHandler( |
|
145 MLtsyDispatchCallControlSendDtmfTonesCancel::KLtsyDispatchCallControlSendDtmfTonesCancelApiId, |
|
146 sendDtmfTonesCancelInterface); |
|
147 iLtsyDispatchCallControlSendDtmfTonesCancel = |
|
148 static_cast<MLtsyDispatchCallControlSendDtmfTonesCancel*>(sendDtmfTonesCancelInterface); |
|
149 __ASSERT_DEBUG(iLtsyDispatchCallControlSendDtmfTonesCancel, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
150 } |
|
151 |
|
152 if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchCallControlFuncUnitId, MLtsyDispatchCallControlHangUp::KLtsyDispatchCallControlHangUpApiId)) |
|
153 { |
|
154 TAny* hangUpInterface = NULL; |
|
155 iLtsyFactoryV1.GetDispatchHandler( |
|
156 MLtsyDispatchCallControlHangUp::KLtsyDispatchCallControlHangUpApiId, |
|
157 hangUpInterface); |
|
158 iLtsyDispatchCallControlHangUp = |
|
159 static_cast<MLtsyDispatchCallControlHangUp*>(hangUpInterface); |
|
160 __ASSERT_DEBUG(iLtsyDispatchCallControlHangUp, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
161 } |
|
162 |
|
163 if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchCallControlFuncUnitId, MLtsyDispatchCallControlResume::KLtsyDispatchCallControlResumeApiId)) |
|
164 { |
|
165 TAny* resumeInterface = NULL; |
|
166 iLtsyFactoryV1.GetDispatchHandler( |
|
167 MLtsyDispatchCallControlResume::KLtsyDispatchCallControlResumeApiId, |
|
168 resumeInterface); |
|
169 iLtsyDispatchCallControlResume = |
|
170 static_cast<MLtsyDispatchCallControlResume*>(resumeInterface); |
|
171 __ASSERT_DEBUG(iLtsyDispatchCallControlResume, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
172 } |
|
173 |
|
174 if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchCallControlFuncUnitId, MLtsyDispatchCallControlSetDynamicHscsdParams::KLtsyDispatchCallControlSetDynamicHscsdParamsApiId)) |
|
175 { |
|
176 TAny* setDynamicHscsdParamsInterface = NULL; |
|
177 iLtsyFactoryV1.GetDispatchHandler( |
|
178 MLtsyDispatchCallControlSetDynamicHscsdParams::KLtsyDispatchCallControlSetDynamicHscsdParamsApiId, |
|
179 setDynamicHscsdParamsInterface); |
|
180 iLtsyDispatchCallControlSetDynamicHscsdParams = |
|
181 static_cast<MLtsyDispatchCallControlSetDynamicHscsdParams*>(setDynamicHscsdParamsInterface); |
|
182 __ASSERT_DEBUG(iLtsyDispatchCallControlSetDynamicHscsdParams, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
183 } |
|
184 |
|
185 if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchCallControlFuncUnitId, MLtsyDispatchCallControlDialVoice::KLtsyDispatchCallControlDialVoiceApiId)) |
|
186 { |
|
187 TAny* dialInterface = NULL; |
|
188 iLtsyFactoryV1.GetDispatchHandler( |
|
189 MLtsyDispatchCallControlDialVoice::KLtsyDispatchCallControlDialVoiceApiId, |
|
190 dialInterface); |
|
191 iLtsyDispatchCallControlDialVoice = |
|
192 static_cast<MLtsyDispatchCallControlDialVoice*>(dialInterface); |
|
193 __ASSERT_DEBUG(iLtsyDispatchCallControlDialVoice, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
194 } |
|
195 |
|
196 if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchCallControlFuncUnitId, MLtsyDispatchCallControlTransfer::KLtsyDispatchCallControlTransferApiId)) |
|
197 { |
|
198 TAny* transferInterface = NULL; |
|
199 iLtsyFactoryV1.GetDispatchHandler( |
|
200 MLtsyDispatchCallControlTransfer::KLtsyDispatchCallControlTransferApiId, |
|
201 transferInterface); |
|
202 iLtsyDispatchCallControlTransfer = |
|
203 static_cast<MLtsyDispatchCallControlTransfer*>(transferInterface); |
|
204 __ASSERT_DEBUG(iLtsyDispatchCallControlTransfer, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
205 } |
|
206 |
|
207 if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchCallControlFuncUnitId, MLtsyDispatchCallControlSendDtmfTones::KLtsyDispatchCallControlSendDtmfTonesApiId)) |
|
208 { |
|
209 TAny* sendDtmfTonesInterface = NULL; |
|
210 iLtsyFactoryV1.GetDispatchHandler( |
|
211 MLtsyDispatchCallControlSendDtmfTones::KLtsyDispatchCallControlSendDtmfTonesApiId, |
|
212 sendDtmfTonesInterface); |
|
213 iLtsyDispatchCallControlSendDtmfTones = |
|
214 static_cast<MLtsyDispatchCallControlSendDtmfTones*>(sendDtmfTonesInterface); |
|
215 __ASSERT_DEBUG(iLtsyDispatchCallControlSendDtmfTones, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
216 } |
|
217 |
|
218 if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchCallControlFuncUnitId, MLtsyDispatchCallControlGetIdentityServiceStatus::KLtsyDispatchCallControlGetIdentityServiceStatusApiId)) |
|
219 { |
|
220 TAny* getIdentityServiceStatusInterface = NULL; |
|
221 iLtsyFactoryV1.GetDispatchHandler( |
|
222 MLtsyDispatchCallControlGetIdentityServiceStatus::KLtsyDispatchCallControlGetIdentityServiceStatusApiId, |
|
223 getIdentityServiceStatusInterface); |
|
224 iLtsyDispatchCallControlGetIdentityServiceStatus = |
|
225 static_cast<MLtsyDispatchCallControlGetIdentityServiceStatus*>(getIdentityServiceStatusInterface); |
|
226 __ASSERT_DEBUG(iLtsyDispatchCallControlGetIdentityServiceStatus, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
227 } |
|
228 |
|
229 if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchCallControlFuncUnitId, MLtsyDispatchCallControlSwap::KLtsyDispatchCallControlSwapApiId)) |
|
230 { |
|
231 TAny* swapInterface = NULL; |
|
232 iLtsyFactoryV1.GetDispatchHandler( |
|
233 MLtsyDispatchCallControlSwap::KLtsyDispatchCallControlSwapApiId, |
|
234 swapInterface); |
|
235 iLtsyDispatchCallControlSwap = |
|
236 static_cast<MLtsyDispatchCallControlSwap*>(swapInterface); |
|
237 __ASSERT_DEBUG(iLtsyDispatchCallControlSwap, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
238 } |
|
239 |
|
240 if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchCallControlFuncUnitId, MLtsyDispatchCallControlLoanDataPort::KLtsyDispatchCallControlLoanDataPortApiId)) |
|
241 { |
|
242 TAny* loanDataPortInterface = NULL; |
|
243 iLtsyFactoryV1.GetDispatchHandler( |
|
244 MLtsyDispatchCallControlLoanDataPort::KLtsyDispatchCallControlLoanDataPortApiId, |
|
245 loanDataPortInterface); |
|
246 iLtsyDispatchCallControlLoanDataPort = |
|
247 static_cast<MLtsyDispatchCallControlLoanDataPort*>(loanDataPortInterface); |
|
248 __ASSERT_DEBUG(iLtsyDispatchCallControlLoanDataPort, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
249 } |
|
250 |
|
251 if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchCallControlFuncUnitId, MLtsyDispatchCallControlRecoverDataPort::KLtsyDispatchCallControlRecoverDataPortApiId)) |
|
252 { |
|
253 TAny* recoverDataPortInterface = NULL; |
|
254 iLtsyFactoryV1.GetDispatchHandler( |
|
255 MLtsyDispatchCallControlRecoverDataPort::KLtsyDispatchCallControlRecoverDataPortApiId, |
|
256 recoverDataPortInterface); |
|
257 iLtsyDispatchCallControlRecoverDataPort = |
|
258 static_cast<MLtsyDispatchCallControlRecoverDataPort*>(recoverDataPortInterface); |
|
259 __ASSERT_DEBUG(iLtsyDispatchCallControlRecoverDataPort, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
260 } |
|
261 |
|
262 if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchCallControlFuncUnitId, MLtsyDispatchCallControlStartDtmfTone::KLtsyDispatchCallControlStartDtmfToneApiId)) |
|
263 { |
|
264 TAny* startDtmfToneInterface = NULL; |
|
265 iLtsyFactoryV1.GetDispatchHandler( |
|
266 MLtsyDispatchCallControlStartDtmfTone::KLtsyDispatchCallControlStartDtmfToneApiId, |
|
267 startDtmfToneInterface); |
|
268 iLtsyDispatchCallControlStartDtmfTone = |
|
269 static_cast<MLtsyDispatchCallControlStartDtmfTone*>(startDtmfToneInterface); |
|
270 __ASSERT_DEBUG(iLtsyDispatchCallControlStartDtmfTone, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
271 } |
|
272 |
|
273 if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchCallControlFuncUnitId, MLtsyDispatchCallControlGetActiveAlsLine::KLtsyDispatchCallControlGetActiveAlsLineApiId)) |
|
274 { |
|
275 TAny* GetActiveAlsLineInterface = NULL; |
|
276 iLtsyFactoryV1.GetDispatchHandler( |
|
277 MLtsyDispatchCallControlGetActiveAlsLine::KLtsyDispatchCallControlGetActiveAlsLineApiId, |
|
278 GetActiveAlsLineInterface); |
|
279 iLtsyDispatchCallControlGetActiveAlsLine = |
|
280 static_cast<MLtsyDispatchCallControlGetActiveAlsLine*>(GetActiveAlsLineInterface); |
|
281 __ASSERT_DEBUG(iLtsyDispatchCallControlGetActiveAlsLine, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
282 } |
|
283 |
|
284 if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchCallControlFuncUnitId, MLtsyDispatchCallControlDialData::KLtsyDispatchCallControlDialDataApiId)) |
|
285 { |
|
286 TAny* dialDataInterface = NULL; |
|
287 iLtsyFactoryV1.GetDispatchHandler( |
|
288 MLtsyDispatchCallControlDialData::KLtsyDispatchCallControlDialDataApiId, |
|
289 dialDataInterface); |
|
290 iLtsyDispatchCallControlDialData = |
|
291 static_cast<MLtsyDispatchCallControlDialData*>(dialDataInterface); |
|
292 __ASSERT_DEBUG(iLtsyDispatchCallControlDialData, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
293 } |
|
294 |
|
295 if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchCallControlFuncUnitId, MLtsyDispatchCallControlQueryIsEmergencyNumber::KLtsyDispatchCallControlQueryIsEmergencyNumberApiId)) |
|
296 { |
|
297 TAny* queryIsEmergencyNumberInterface = NULL; |
|
298 iLtsyFactoryV1.GetDispatchHandler( |
|
299 MLtsyDispatchCallControlQueryIsEmergencyNumber::KLtsyDispatchCallControlQueryIsEmergencyNumberApiId, |
|
300 queryIsEmergencyNumberInterface); |
|
301 iLtsyDispatchCallControlQueryIsEmergencyNumber = |
|
302 static_cast<MLtsyDispatchCallControlQueryIsEmergencyNumber*>(queryIsEmergencyNumberInterface); |
|
303 __ASSERT_DEBUG(iLtsyDispatchCallControlQueryIsEmergencyNumber, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
304 } |
|
305 |
|
306 if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchCallControlFuncUnitId, MLtsyDispatchCallControlGetAlsPpSupport::KLtsyDispatchCallControlGetAlsPpSupportApiId)) |
|
307 { |
|
308 TAny* getAlsPpSupportInterface = NULL; |
|
309 iLtsyFactoryV1.GetDispatchHandler( |
|
310 MLtsyDispatchCallControlGetAlsPpSupport::KLtsyDispatchCallControlGetAlsPpSupportApiId, |
|
311 getAlsPpSupportInterface); |
|
312 iLtsyDispatchCallControlGetAlsPpSupport = |
|
313 static_cast<MLtsyDispatchCallControlGetAlsPpSupport*>(getAlsPpSupportInterface); |
|
314 __ASSERT_DEBUG(iLtsyDispatchCallControlGetAlsPpSupport, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
315 } |
|
316 |
|
317 if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchCallControlFuncUnitId, MLtsyDispatchCallControlGetAlsBlockedStatus::KLtsyDispatchCallControlGetAlsBlockedStatusApiId)) |
|
318 { |
|
319 TAny* getAlsBlockedStatusInterface = NULL; |
|
320 iLtsyFactoryV1.GetDispatchHandler( |
|
321 MLtsyDispatchCallControlGetAlsBlockedStatus::KLtsyDispatchCallControlGetAlsBlockedStatusApiId, |
|
322 getAlsBlockedStatusInterface); |
|
323 iLtsyDispatchCallControlGetAlsBlockedStatus = |
|
324 static_cast<MLtsyDispatchCallControlGetAlsBlockedStatus*>(getAlsBlockedStatusInterface); |
|
325 __ASSERT_DEBUG(iLtsyDispatchCallControlGetAlsBlockedStatus, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
326 } |
|
327 |
|
328 if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchCallControlFuncUnitId, MLtsyDispatchCallControlSetAlsBlocked::KLtsyDispatchCallControlSetAlsBlockedApiId)) |
|
329 { |
|
330 TAny* setAlsBlockedInterface = NULL; |
|
331 iLtsyFactoryV1.GetDispatchHandler( |
|
332 MLtsyDispatchCallControlSetAlsBlocked::KLtsyDispatchCallControlSetAlsBlockedApiId, |
|
333 setAlsBlockedInterface); |
|
334 iLtsyDispatchCallControlSetAlsBlocked = |
|
335 static_cast<MLtsyDispatchCallControlSetAlsBlocked*>(setAlsBlockedInterface); |
|
336 __ASSERT_DEBUG(iLtsyDispatchCallControlSetAlsBlocked, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
337 } |
|
338 |
|
339 if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchCallControlFuncUnitId, MLtsyDispatchCallControlGetLifeTime::KLtsyDispatchCallControlGetLifeTimeApiId)) |
|
340 { |
|
341 TAny* getLifeTimeInterface = NULL; |
|
342 iLtsyFactoryV1.GetDispatchHandler( |
|
343 MLtsyDispatchCallControlGetLifeTime::KLtsyDispatchCallControlGetLifeTimeApiId, |
|
344 getLifeTimeInterface); |
|
345 iLtsyDispatchCallControlGetLifeTime = |
|
346 static_cast<MLtsyDispatchCallControlGetLifeTime*>(getLifeTimeInterface); |
|
347 __ASSERT_DEBUG(iLtsyDispatchCallControlGetLifeTime, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
348 } |
|
349 |
|
350 if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchCallControlFuncUnitId, MLtsyDispatchCallControlTerminateErrorCall::KLtsyDispatchCallControlTerminateErrorCallApiId)) |
|
351 { |
|
352 TAny* terminateErrorCallInterface = NULL; |
|
353 iLtsyFactoryV1.GetDispatchHandler( |
|
354 MLtsyDispatchCallControlTerminateErrorCall::KLtsyDispatchCallControlTerminateErrorCallApiId, |
|
355 terminateErrorCallInterface); |
|
356 iLtsyDispatchCallControlTerminateErrorCall = |
|
357 static_cast<MLtsyDispatchCallControlTerminateErrorCall*>(terminateErrorCallInterface); |
|
358 __ASSERT_DEBUG(iLtsyDispatchCallControlTerminateErrorCall, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
359 } |
|
360 |
|
361 if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchCallControlFuncUnitId, MLtsyDispatchCallControlTerminateAllCalls::KLtsyDispatchCallControlTerminateAllCallsApiId)) |
|
362 { |
|
363 TAny* terminateAllCallsInterface = NULL; |
|
364 iLtsyFactoryV1.GetDispatchHandler( |
|
365 MLtsyDispatchCallControlTerminateAllCalls::KLtsyDispatchCallControlTerminateAllCallsApiId, |
|
366 terminateAllCallsInterface); |
|
367 iLtsyDispatchCallControlTerminateAllCalls = |
|
368 static_cast<MLtsyDispatchCallControlTerminateAllCalls*>(terminateAllCallsInterface); |
|
369 __ASSERT_DEBUG(iLtsyDispatchCallControlTerminateAllCalls, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
370 } |
|
371 |
|
372 if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchCallControlFuncUnitId, MLtsyDispatchCallControlGetCallForwardingIndicator::KLtsyDispatchCallControlGetCallForwardingIndicatorApiId)) |
|
373 { |
|
374 TAny* getCallForwardingIndicatorInterface = NULL; |
|
375 iLtsyFactoryV1.GetDispatchHandler( |
|
376 MLtsyDispatchCallControlGetCallForwardingIndicator::KLtsyDispatchCallControlGetCallForwardingIndicatorApiId, |
|
377 getCallForwardingIndicatorInterface); |
|
378 iLtsyDispatchCallControlGetCallForwardingIndicator = |
|
379 static_cast<MLtsyDispatchCallControlGetCallForwardingIndicator*>(getCallForwardingIndicatorInterface); |
|
380 __ASSERT_DEBUG(iLtsyDispatchCallControlGetCallForwardingIndicator, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
381 } |
|
382 |
|
383 if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchCallControlFuncUnitId, MLtsyDispatchCallControlUpdateLifeTimer::KLtsyDispatchCallControlUpdateLifeTimerApiId)) |
|
384 { |
|
385 TAny* updateLifeTimerInterface = NULL; |
|
386 iLtsyFactoryV1.GetDispatchHandler( |
|
387 MLtsyDispatchCallControlUpdateLifeTimer::KLtsyDispatchCallControlUpdateLifeTimerApiId, |
|
388 updateLifeTimerInterface); |
|
389 iLtsyDispatchCallControlUpdateLifeTimer = |
|
390 static_cast<MLtsyDispatchCallControlUpdateLifeTimer*>(updateLifeTimerInterface); |
|
391 __ASSERT_DEBUG(iLtsyDispatchCallControlUpdateLifeTimer, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
392 } |
|
393 } // CCallControlDispatcher::ConstructL |
|
394 |
|
395 |
|
396 void CCallControlDispatcher::SetDispatcherHolder(TDispatcherHolder& aDispatcherHolder) |
|
397 /** |
|
398 * Set the dispatcher holder. |
|
399 * |
|
400 * @param aDispatcherHolder Pointer to dispatcher holder. |
|
401 */ |
|
402 { |
|
403 TSYLOGENTRYEXIT; |
|
404 |
|
405 iDispatcherHolder = &aDispatcherHolder; |
|
406 } // CCallControlDispatcher::SetDispatcherHolder |
|
407 |
|
408 |
|
409 TInt CCallControlDispatcher::DispatchAnswerL(const CMmDataPackage* aDataPackage) |
|
410 /** |
|
411 * Unpack data related to EEtelCallAnswer |
|
412 * and pass request on to Licensee LTSY. |
|
413 * |
|
414 * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if |
|
415 * the Licensee LTSY does not support this request. |
|
416 */ |
|
417 { |
|
418 TSYLOGENTRYEXIT; |
|
419 |
|
420 TInt ret = DoDispatchAnswerL(aDataPackage, EFalse); |
|
421 |
|
422 return TSYLOGSETEXITERR(ret); |
|
423 } // CCallControlDispatcher::DispatchAnswerL |
|
424 |
|
425 TInt CCallControlDispatcher::DispatchAnswerIsvL(const CMmDataPackage* aDataPackage) |
|
426 /** |
|
427 * Unpack data related to EEtelCallAnswerIsv |
|
428 * and pass request on to Licensee LTSY. |
|
429 * |
|
430 * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if |
|
431 * the Licensee LTSY does not support this request. |
|
432 */ |
|
433 { |
|
434 TSYLOGENTRYEXIT; |
|
435 |
|
436 TInt ret = DoDispatchAnswerL(aDataPackage, ETrue); |
|
437 |
|
438 return TSYLOGSETEXITERR(ret); |
|
439 } // CCallControlDispatcher::DispatchAnswerIsvL |
|
440 |
|
441 |
|
442 TInt CCallControlDispatcher::DispatchHoldL(const CMmDataPackage* aDataPackage) |
|
443 /** |
|
444 * Unpack data related to EMobileCallHold |
|
445 * and pass request on to Licensee LTSY. |
|
446 * |
|
447 * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if |
|
448 * the Licensee LTSY does not support this request. |
|
449 */ |
|
450 { |
|
451 TSYLOGENTRYEXIT; |
|
452 TInt ret = KErrNotSupported; |
|
453 |
|
454 __ASSERT_DEBUG(aDataPackage, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
455 |
|
456 // Call Handle... method in Licensee LTSY |
|
457 if (iLtsyDispatchCallControlHold) |
|
458 { |
|
459 const CCallDataPackage* dataPackage = static_cast<const CCallDataPackage*>(aDataPackage); |
|
460 TInt callId; |
|
461 RMobilePhone::TMobileService mode; |
|
462 dataPackage->GetCallIdAndMode(callId, mode); |
|
463 ret = iLtsyDispatchCallControlHold->HandleHoldReqL(callId); |
|
464 } |
|
465 |
|
466 return TSYLOGSETEXITERR(ret); |
|
467 } // CCallControlDispatcher::DispatchHoldL |
|
468 |
|
469 TInt CCallControlDispatcher::DispatchDialEmergencyL(const CMmDataPackage* aDataPackage) |
|
470 /** |
|
471 * Unpack data related to EMobileCallDialEmergencyCall |
|
472 * and pass request on to Licensee LTSY. |
|
473 * |
|
474 * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if |
|
475 * the Licensee LTSY does not support this request. |
|
476 */ |
|
477 { |
|
478 TSYLOGENTRYEXIT; |
|
479 TInt ret = KErrNotSupported; |
|
480 |
|
481 __ASSERT_DEBUG(aDataPackage, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
482 |
|
483 // Call Handle... method in Licensee LTSY |
|
484 if (iLtsyDispatchCallControlDialEmergency) |
|
485 { |
|
486 RMobileENStore::TEmergencyNumber* emergencyNumber; |
|
487 aDataPackage->UnPackData(&emergencyNumber); |
|
488 |
|
489 __ASSERT_DEBUG(emergencyNumber, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
490 |
|
491 ret = iLtsyDispatchCallControlDialEmergency->HandleDialEmergencyReqL(*emergencyNumber); |
|
492 } |
|
493 |
|
494 return TSYLOGSETEXITERR(ret); |
|
495 } // CCallControlDispatcher::DispatchDialEmergencyL |
|
496 |
|
497 TInt CCallControlDispatcher::DispatchDialNoFdnCheckL(const CMmDataPackage* aDataPackage) |
|
498 /** |
|
499 * Unpack data related to EMobileCallDialNoFdnCheck |
|
500 * and pass request on to Licensee LTSY. |
|
501 * |
|
502 * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if |
|
503 * the Licensee LTSY does not support this request. |
|
504 */ |
|
505 { |
|
506 TSYLOGENTRYEXIT; |
|
507 |
|
508 __ASSERT_DEBUG(aDataPackage, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
509 |
|
510 TInt ret = DoDispatchDialL(aDataPackage, EFalse, EFalse); |
|
511 |
|
512 return TSYLOGSETEXITERR(ret); |
|
513 } // CCallControlDispatcher::DispatchDialNoFdnCheckL |
|
514 |
|
515 TInt CCallControlDispatcher::DispatchStopDtmfToneL(const CMmDataPackage* aDataPackage) |
|
516 /** |
|
517 * Unpack data related to EMobilePhoneStopDTMFTone |
|
518 * and pass request on to Licensee LTSY. |
|
519 * |
|
520 * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if |
|
521 * the Licensee LTSY does not support this request. |
|
522 */ |
|
523 { |
|
524 TSYLOGENTRYEXIT; |
|
525 TInt ret = KErrNotSupported; |
|
526 |
|
527 __ASSERT_DEBUG(aDataPackage, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
528 // Call Handle... method in Licensee LTSY |
|
529 if (iLtsyDispatchCallControlStopDtmfTone) |
|
530 { |
|
531 TInt* callId; |
|
532 aDataPackage->UnPackData(&callId); |
|
533 ret = iLtsyDispatchCallControlStopDtmfTone->HandleStopDtmfToneReqL(*callId); |
|
534 } |
|
535 |
|
536 return TSYLOGSETEXITERR(ret); |
|
537 } // CCallControlDispatcher::DispatchStopDtmfToneL |
|
538 |
|
539 TInt CCallControlDispatcher::DispatchDialIsvL(const CMmDataPackage* aDataPackage) |
|
540 /** |
|
541 * Unpack data related to EMobileCallDialISV |
|
542 * and pass request on to Licensee LTSY. |
|
543 * |
|
544 * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if |
|
545 * the Licensee LTSY does not support this request. |
|
546 */ |
|
547 { |
|
548 TSYLOGENTRYEXIT; |
|
549 |
|
550 __ASSERT_DEBUG(aDataPackage, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
551 |
|
552 TInt ret = DoDispatchDialL(aDataPackage, ETrue, ETrue); |
|
553 |
|
554 return TSYLOGSETEXITERR(ret); |
|
555 } // CCallControlDispatcher::DispatchDialIsvL |
|
556 |
|
557 TInt CCallControlDispatcher::DispatchSetActiveAlsLineL(const CMmDataPackage* aDataPackage) |
|
558 /** |
|
559 * Unpack data related to EMobilePhoneSetALSLine |
|
560 * and pass request on to Licensee LTSY. |
|
561 * |
|
562 * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if |
|
563 * the Licensee LTSY does not support this request. |
|
564 */ |
|
565 { |
|
566 TSYLOGENTRYEXIT; |
|
567 TInt ret = KErrNotSupported; |
|
568 |
|
569 __ASSERT_DEBUG(aDataPackage, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
570 // Call Handle... method in Licensee LTSY |
|
571 if (iLtsyDispatchCallControlSetActiveAlsLine) |
|
572 { |
|
573 RMobilePhone::TMobilePhoneALSLine* alsLine; |
|
574 aDataPackage->UnPackData(&alsLine); |
|
575 ret = iLtsyDispatchCallControlSetActiveAlsLine->HandleSetActiveAlsLineReqL(*alsLine); |
|
576 } |
|
577 |
|
578 return TSYLOGSETEXITERR(ret); |
|
579 } // CCallControlDispatcher::DispatchSetActiveAlsLineL |
|
580 |
|
581 TInt CCallControlDispatcher::DispatchSendDtmfTonesCancelL(const CMmDataPackage* aDataPackage) |
|
582 /** |
|
583 * Unpack data related to EMobilePhoneSendDTMFTonesCancel |
|
584 * and pass request on to Licensee LTSY. |
|
585 * |
|
586 * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if |
|
587 * the Licensee LTSY does not support this request. |
|
588 */ |
|
589 { |
|
590 TSYLOGENTRYEXIT; |
|
591 TInt ret = KErrNotSupported; |
|
592 |
|
593 __ASSERT_DEBUG(aDataPackage, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
594 |
|
595 // Call Handle... method in Licensee LTSY |
|
596 if (iLtsyDispatchCallControlSendDtmfTonesCancel) |
|
597 { |
|
598 TInt callId; |
|
599 aDataPackage->UnPackData(callId); |
|
600 ret = iLtsyDispatchCallControlSendDtmfTonesCancel->HandleSendDtmfTonesCancelReqL(callId); |
|
601 } |
|
602 |
|
603 return TSYLOGSETEXITERR(ret); |
|
604 } // CCallControlDispatcher::DispatchSendDtmfTonesCancelL |
|
605 |
|
606 TInt CCallControlDispatcher::DispatchHangUpL(const CMmDataPackage* aDataPackage) |
|
607 /** |
|
608 * Unpack data related to EEtelCallHangUp |
|
609 * and pass request on to Licensee LTSY. |
|
610 * |
|
611 * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if |
|
612 * the Licensee LTSY does not support this request. |
|
613 */ |
|
614 { |
|
615 TSYLOGENTRYEXIT; |
|
616 TInt ret = KErrNotSupported; |
|
617 |
|
618 __ASSERT_DEBUG(aDataPackage, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
619 if (iLtsyDispatchCallControlHangUp) |
|
620 { |
|
621 TInt callId; |
|
622 RMobilePhone::TMobileService mode; |
|
623 const CCallDataPackage* callDataPackage = static_cast<const CCallDataPackage*>(aDataPackage); |
|
624 callDataPackage->GetCallIdAndMode(callId, mode); |
|
625 |
|
626 TInt hangupCause; |
|
627 TBool autoStChangeDisable; |
|
628 callDataPackage->UnPackData(hangupCause, autoStChangeDisable); |
|
629 |
|
630 ret = iLtsyDispatchCallControlHangUp->HandleHangUpReqL(callId, hangupCause); |
|
631 } |
|
632 |
|
633 return TSYLOGSETEXITERR(ret); |
|
634 } // CCallControlDispatcher::DispatchHangUpL |
|
635 |
|
636 TInt CCallControlDispatcher::DispatchResumeL(const CMmDataPackage* aDataPackage) |
|
637 /** |
|
638 * Unpack data related to EMobileCallResume |
|
639 * and pass request on to Licensee LTSY. |
|
640 * |
|
641 * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if |
|
642 * the Licensee LTSY does not support this request. |
|
643 */ |
|
644 { |
|
645 TSYLOGENTRYEXIT; |
|
646 TInt ret = KErrNotSupported; |
|
647 |
|
648 __ASSERT_DEBUG(aDataPackage, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
649 // Call Handle... method in Licensee LTSY |
|
650 if (iLtsyDispatchCallControlResume) |
|
651 { |
|
652 const CCallDataPackage* dataPackage = static_cast<const CCallDataPackage*>(aDataPackage); |
|
653 TInt callId; |
|
654 RMobilePhone::TMobileService mode; |
|
655 dataPackage->GetCallIdAndMode(callId, mode); |
|
656 ret = iLtsyDispatchCallControlResume->HandleResumeReqL(callId); |
|
657 } |
|
658 |
|
659 return TSYLOGSETEXITERR(ret); |
|
660 } // CCallControlDispatcher::DispatchResumeL |
|
661 |
|
662 TInt CCallControlDispatcher::DispatchSetDynamicHscsdParamsL(const CMmDataPackage* aDataPackage) |
|
663 /** |
|
664 * Unpack data related to EMobileCallSetDynamicHscsdParams |
|
665 * and pass request on to Licensee LTSY. |
|
666 * |
|
667 * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if |
|
668 * the Licensee LTSY does not support this request. |
|
669 */ |
|
670 { |
|
671 TSYLOGENTRYEXIT; |
|
672 TInt ret = KErrNotSupported; |
|
673 |
|
674 __ASSERT_DEBUG(aDataPackage, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
675 |
|
676 if (iLtsyDispatchCallControlSetDynamicHscsdParams) |
|
677 { |
|
678 const CCallDataPackage* callDataPackage = static_cast<const CCallDataPackage*>(aDataPackage); |
|
679 TInt callId; |
|
680 RMobilePhone::TMobileService mode; |
|
681 callDataPackage->GetCallIdAndMode(callId, mode); |
|
682 RMobileCall::TMobileHscsdCallParamsV1* hscsdParams; |
|
683 aDataPackage->UnPackData(&hscsdParams); |
|
684 ret = iLtsyDispatchCallControlSetDynamicHscsdParams->HandleSetDynamicHscsdParamsReqL(callId, *hscsdParams); |
|
685 } |
|
686 |
|
687 return TSYLOGSETEXITERR(ret); |
|
688 } // CCallControlDispatcher::DispatchSetDynamicHscsdParamsL |
|
689 |
|
690 TInt CCallControlDispatcher::DispatchDialL(const CMmDataPackage* aDataPackage) |
|
691 /** |
|
692 * Unpack data related to EEtelCallDial |
|
693 * and pass request on to Licensee LTSY. |
|
694 * |
|
695 * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if |
|
696 * the Licensee LTSY does not support this request. |
|
697 */ |
|
698 { |
|
699 TSYLOGENTRYEXIT; |
|
700 |
|
701 __ASSERT_DEBUG(aDataPackage, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
702 |
|
703 TInt ret = DoDispatchDialL(aDataPackage, EFalse, ETrue); |
|
704 |
|
705 return TSYLOGSETEXITERR(ret); |
|
706 } // CCallControlDispatcher::DispatchDialL |
|
707 |
|
708 TInt CCallControlDispatcher::DispatchTransferL(const CMmDataPackage* aDataPackage) |
|
709 /** |
|
710 * Unpack data related to EMobileCallTransfer |
|
711 * and pass request on to Licensee LTSY. |
|
712 * |
|
713 * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if |
|
714 * the Licensee LTSY does not support this request. |
|
715 */ |
|
716 { |
|
717 TSYLOGENTRYEXIT; |
|
718 TInt ret = KErrNotSupported; |
|
719 |
|
720 __ASSERT_DEBUG(aDataPackage, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
721 if (iLtsyDispatchCallControlTransfer) |
|
722 { |
|
723 const CCallDataPackage* callDataPackage = static_cast<const CCallDataPackage*>(aDataPackage); |
|
724 RMobilePhone::TMobileService mode; |
|
725 callDataPackage->GetCallIdAndMode(iTransferHeldCallId, mode); |
|
726 callDataPackage->UnPackData(iTransferSecondCallId); |
|
727 ret = iLtsyDispatchCallControlTransfer->HandleTransferReqL(iTransferHeldCallId, iTransferSecondCallId); |
|
728 } |
|
729 |
|
730 return TSYLOGSETEXITERR(ret); |
|
731 } // CCallControlDispatcher::DispatchTransferL |
|
732 |
|
733 TInt CCallControlDispatcher::DispatchSendDtmfTonesL(const CMmDataPackage* aDataPackage) |
|
734 /** |
|
735 * Unpack data related to EMobilePhoneSendDTMFTones |
|
736 * and pass request on to Licensee LTSY. |
|
737 * |
|
738 * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if |
|
739 * the Licensee LTSY does not support this request. |
|
740 */ |
|
741 { |
|
742 TSYLOGENTRYEXIT; |
|
743 TInt ret = KErrNotSupported; |
|
744 |
|
745 __ASSERT_DEBUG(aDataPackage, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
746 if (iLtsyDispatchCallControlSendDtmfTones) |
|
747 { |
|
748 TInt* callId; |
|
749 TDesC* tones; |
|
750 aDataPackage->UnPackData(&callId, &tones); |
|
751 |
|
752 ret = DoSendDtmfTonesL(*callId, *tones); |
|
753 } |
|
754 |
|
755 return TSYLOGSETEXITERR(ret); |
|
756 } // CCallControlDispatcher::DispatchSendDtmfTonesL |
|
757 |
|
758 TInt CCallControlDispatcher::DoSendDtmfTonesL(TInt aCallId, const TDesC& aTones) |
|
759 { |
|
760 TSYLOGENTRYEXIT; |
|
761 |
|
762 TInt ret = KErrNotSupported; |
|
763 |
|
764 // Locate a 'w' (wait) in the DTMF string |
|
765 // Send the part of the string before the 'w' to LTSY, |
|
766 // cache the rest. |
|
767 TChar w('w'); |
|
768 TInt wPos = aTones.LocateF(w); |
|
769 if (wPos == KErrNotFound) |
|
770 { |
|
771 if (iLtsyDispatchCallControlSendDtmfTones) |
|
772 { |
|
773 ret = iLtsyDispatchCallControlSendDtmfTones->HandleSendDtmfTonesReqL(aCallId, aTones); |
|
774 } |
|
775 } |
|
776 else |
|
777 { |
|
778 iFoundDtmfStop = ETrue; |
|
779 iCallIdForDtmf = aCallId; |
|
780 |
|
781 // Send string before 'w' to LTSY |
|
782 TPtrC firstPartOfString = aTones.Left(wPos); |
|
783 if (iLtsyDispatchCallControlSendDtmfTones) |
|
784 { |
|
785 ret = iLtsyDispatchCallControlSendDtmfTones->HandleSendDtmfTonesReqL(aCallId, firstPartOfString); |
|
786 } |
|
787 |
|
788 // Cache string after the 'w' so that client can choose to continue sending |
|
789 // or not. |
|
790 |
|
791 // Buffer needs to be big enough to fit the rest of the string after the first 'w' |
|
792 // (not including the 'w' itself). |
|
793 iDtmfString = aTones.Right(aTones.Length() - wPos - 1); |
|
794 } |
|
795 |
|
796 return TSYLOGSETEXITERR(ret); |
|
797 } // CCallControlDispatcher::DoSendDtmfTonesL |
|
798 |
|
799 |
|
800 TInt CCallControlDispatcher::DispatchGetIdentityServiceStatusL(const CMmDataPackage* aDataPackage) |
|
801 /** |
|
802 * Unpack data related to EMobilePhoneGetIdentityServiceStatus |
|
803 * and pass request on to Licensee LTSY. |
|
804 * |
|
805 * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if |
|
806 * the Licensee LTSY does not support this request. |
|
807 */ |
|
808 { |
|
809 TSYLOGENTRYEXIT; |
|
810 TInt ret = KErrNotSupported; |
|
811 |
|
812 __ASSERT_DEBUG(aDataPackage, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
813 // Call Handle... method in Licensee LTSY |
|
814 if (iLtsyDispatchCallControlGetIdentityServiceStatus) |
|
815 { |
|
816 RMobilePhone::TMobilePhoneIdService idService; |
|
817 aDataPackage->UnPackData(idService); |
|
818 ret = iLtsyDispatchCallControlGetIdentityServiceStatus->HandleGetIdentityServiceStatusReqL(idService); |
|
819 } |
|
820 |
|
821 return TSYLOGSETEXITERR(ret); |
|
822 } // CCallControlDispatcher::DispatchGetIdentityServiceStatusL |
|
823 |
|
824 TInt CCallControlDispatcher::DispatchSwapL(const CMmDataPackage* aDataPackage) |
|
825 /** |
|
826 * Unpack data related to EMobileCallSwap |
|
827 * and pass request on to Licensee LTSY. |
|
828 * |
|
829 * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if |
|
830 * the Licensee LTSY does not support this request. |
|
831 */ |
|
832 { |
|
833 TSYLOGENTRYEXIT; |
|
834 TInt ret = KErrNotSupported; |
|
835 |
|
836 __ASSERT_DEBUG(aDataPackage, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
837 |
|
838 if (iLtsyDispatchCallControlSwap) |
|
839 { |
|
840 const CCallDataPackage* dataPackage = static_cast<const CCallDataPackage*>(aDataPackage); |
|
841 RMobilePhone::TMobileService mode; |
|
842 dataPackage->GetCallIdAndMode(iSwapHeldCallId, mode); |
|
843 dataPackage->UnPackData(iSwapConnectedCallId); |
|
844 ret = iLtsyDispatchCallControlSwap->HandleSwapReqL(iSwapHeldCallId, iSwapConnectedCallId); |
|
845 } |
|
846 |
|
847 return TSYLOGSETEXITERR(ret); |
|
848 } // CCallControlDispatcher::DispatchSwapL |
|
849 |
|
850 TInt CCallControlDispatcher::DispatchContinueDtmfStringSendingL(const CMmDataPackage* aDataPackage) |
|
851 /** |
|
852 * Unpack data related to EMobilePhoneContinueDTMFStringSending |
|
853 * and pass request on to Licensee LTSY. |
|
854 * |
|
855 * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if |
|
856 * the Licensee LTSY does not support this request. |
|
857 */ |
|
858 { |
|
859 TSYLOGENTRYEXIT; |
|
860 TInt ret = KErrNotSupported; |
|
861 |
|
862 __ASSERT_DEBUG(aDataPackage, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
863 |
|
864 TDesC* stringToSend; |
|
865 aDataPackage->UnPackData(&stringToSend); |
|
866 if (stringToSend) |
|
867 { |
|
868 __ASSERT_DEBUG(stringToSend, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
869 ret = DoSendDtmfTonesL(iCallIdForDtmf, *stringToSend); |
|
870 } |
|
871 |
|
872 return TSYLOGSETEXITERR(ret); |
|
873 } // CCallControlDispatcher::DispatchContinueDtmfStringSendingL |
|
874 |
|
875 TInt CCallControlDispatcher::DispatchLoanDataPortL(const CMmDataPackage* aDataPackage) |
|
876 /** |
|
877 * Unpack data related to EEtelCallLoanDataPort |
|
878 * and pass request on to Licensee LTSY. |
|
879 * |
|
880 * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if |
|
881 * the Licensee LTSY does not support this request. |
|
882 */ |
|
883 { |
|
884 TSYLOGENTRYEXIT; |
|
885 TInt ret = KErrNotSupported; |
|
886 |
|
887 __ASSERT_DEBUG(aDataPackage, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
888 if (iLtsyDispatchCallControlLoanDataPort) |
|
889 { |
|
890 const CCallDataPackage* callDataPackage = static_cast<const CCallDataPackage*>(aDataPackage); |
|
891 TInt callId; |
|
892 RMobilePhone::TMobileService mode; |
|
893 callDataPackage->GetCallIdAndMode(callId, mode); |
|
894 RCall::TCommPort* commPort; |
|
895 callDataPackage->UnPackData(&commPort); |
|
896 ret = iLtsyDispatchCallControlLoanDataPort->HandleLoanDataPortSyncL(callId, *commPort); |
|
897 } |
|
898 |
|
899 return TSYLOGSETEXITERR(ret); |
|
900 } // CCallControlDispatcher::DispatchLoanDataPortL |
|
901 |
|
902 TInt CCallControlDispatcher::DispatchRecoverDataPortL(const CMmDataPackage* aDataPackage) |
|
903 /** |
|
904 * Unpack data related to EEtelCallRecoverDataPort |
|
905 * and pass request on to Licensee LTSY. |
|
906 * |
|
907 * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if |
|
908 * the Licensee LTSY does not support this request. |
|
909 */ |
|
910 { |
|
911 TSYLOGENTRYEXIT; |
|
912 TInt ret = KErrNotSupported; |
|
913 |
|
914 __ASSERT_DEBUG(aDataPackage, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
915 if (iLtsyDispatchCallControlRecoverDataPort) |
|
916 { |
|
917 const CCallDataPackage* callDataPackage = static_cast<const CCallDataPackage*>(aDataPackage); |
|
918 TInt callId; |
|
919 RMobilePhone::TMobileService mode; |
|
920 callDataPackage->GetCallIdAndMode(callId, mode); |
|
921 RCall::TCommPort* commPort; |
|
922 callDataPackage->UnPackData(&commPort); |
|
923 ret = iLtsyDispatchCallControlRecoverDataPort->HandleRecoverDataPortSyncL(callId, *commPort); |
|
924 } |
|
925 |
|
926 return TSYLOGSETEXITERR(ret); |
|
927 } // CCallControlDispatcher::DispatchRecoverDataPortL |
|
928 |
|
929 TInt CCallControlDispatcher::DispatchStartDtmfToneL(const CMmDataPackage* aDataPackage) |
|
930 /** |
|
931 * Unpack data related to EMobilePhoneStartDTMFTone |
|
932 * and pass request on to Licensee LTSY. |
|
933 * |
|
934 * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if |
|
935 * the Licensee LTSY does not support this request. |
|
936 */ |
|
937 { |
|
938 TSYLOGENTRYEXIT; |
|
939 TInt ret = KErrNotSupported; |
|
940 |
|
941 __ASSERT_DEBUG(aDataPackage, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
942 // Call Handle... method in Licensee LTSY |
|
943 if (iLtsyDispatchCallControlStartDtmfTone) |
|
944 { |
|
945 TChar* tone; |
|
946 TInt* callId; |
|
947 aDataPackage->UnPackData(&callId, &tone); |
|
948 |
|
949 ret = iLtsyDispatchCallControlStartDtmfTone->HandleStartDtmfToneReqL(*callId, *tone); |
|
950 } |
|
951 |
|
952 return TSYLOGSETEXITERR(ret); |
|
953 } // CCallControlDispatcher::DispatchStartDtmfToneL |
|
954 |
|
955 |
|
956 TInt CCallControlDispatcher::DispatchGetActiveAlsLineL() |
|
957 /** |
|
958 * Unpack data related to RMobilePhone::GetActiveAlsLine |
|
959 * and pass request on to Licensee LTSY. |
|
960 * |
|
961 * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if |
|
962 * the Licensee LTSY does not support this request. |
|
963 */ |
|
964 { |
|
965 TSYLOGENTRYEXIT; |
|
966 TInt ret = KErrNotSupported; |
|
967 |
|
968 // Call Handle... method in Licensee LTSY |
|
969 if (iLtsyDispatchCallControlGetActiveAlsLine) |
|
970 { |
|
971 ret = iLtsyDispatchCallControlGetActiveAlsLine->HandleGetActiveAlsLineReqL(); |
|
972 } |
|
973 |
|
974 return TSYLOGSETEXITERR(ret); |
|
975 } // CCallControlDispatcher::DispatchGetActiveAlsLineL |
|
976 |
|
977 TInt CCallControlDispatcher::DispatchQueryIsEmergencyNumberL(const CMmDataPackage* aDataPackage) |
|
978 /** |
|
979 * Unpack data related to ECustomCheckEmergencyNumberIPC |
|
980 * and pass request on to Licensee LTSY. |
|
981 * |
|
982 * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if |
|
983 * the Licensee LTSY does not support this request. |
|
984 */ |
|
985 { |
|
986 TSYLOGENTRYEXIT; |
|
987 TInt ret = KErrNotSupported; |
|
988 |
|
989 // Call Handle... method in Licensee LTSY |
|
990 if (iLtsyDispatchCallControlQueryIsEmergencyNumber) |
|
991 { |
|
992 __ASSERT_DEBUG(aDataPackage, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
993 |
|
994 RMmCustomAPI::TEmerNumberCheckMode* numberCheckMode; |
|
995 aDataPackage->UnPackData(&numberCheckMode); |
|
996 |
|
997 TBool isEmergencyNumber = ETrue; |
|
998 |
|
999 ret = iLtsyDispatchCallControlQueryIsEmergencyNumber->HandleQueryIsEmergencyNumberSyncL( |
|
1000 numberCheckMode->iNumber, isEmergencyNumber); |
|
1001 |
|
1002 // Trigger async one shot completer |
|
1003 if (ret == KErrNone) |
|
1004 { |
|
1005 // CTSY handling of ECustomCheckEmergencyNumberIPC is as follows... |
|
1006 // It expects the lower layer to do the following: |
|
1007 // |
|
1008 // - If the number is an emergency number, return KErrNone as error code, |
|
1009 // and CMmDataPackage containing the number. |
|
1010 // |
|
1011 // - If the number is not an emergency number, return KErrNone as error code, |
|
1012 // and NULL in the CMmDataPackage. |
|
1013 // |
|
1014 // - If there was a problem checking the number, return error != KErrNone. |
|
1015 |
|
1016 if (isEmergencyNumber) |
|
1017 { |
|
1018 iQueryEmergencyNumber = numberCheckMode->iNumber; |
|
1019 } |
|
1020 else |
|
1021 { |
|
1022 iQueryEmergencyNumber.Zero(); |
|
1023 } |
|
1024 |
|
1025 // For this particular IPC, the CMmDataPackage expected by CTSY on |
|
1026 // callback contains the emergency number sent down originally rather |
|
1027 // than anything explicitly returned by the LTSY in the sync call, |
|
1028 // therefore the number is cached and the CMmDataPackage package is |
|
1029 // constructed on callback. |
|
1030 // dataPackage->iDataPackage is NULL here. |
|
1031 CRequestQueueOneShot::TIpcDataPackage* dataPackage = |
|
1032 new (ELeave) CRequestQueueOneShot::TIpcDataPackage; |
|
1033 dataPackage->iIpc = ECustomCheckEmergencyNumberIPC; |
|
1034 dataPackage->iResultCode = KErrNone; |
|
1035 dataPackage->iDataPackage = NULL; |
|
1036 dataPackage->iDispatcherCallback = this; |
|
1037 iRequestAsyncOneShot.QueueRequest(*dataPackage); |
|
1038 } |
|
1039 } |
|
1040 |
|
1041 return TSYLOGSETEXITERR(ret); |
|
1042 } // CCallControlDispatcher::DispatchQueryIsEmergencyNumberL |
|
1043 |
|
1044 TInt CCallControlDispatcher::DispatchGetAlsPpSupportL() |
|
1045 /** |
|
1046 * Pass ECustomCheckAlsPpSupportIPC request on to Licensee LTSY. |
|
1047 * |
|
1048 * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if |
|
1049 * the Licensee LTSY does not support this request. |
|
1050 */ |
|
1051 { |
|
1052 TSYLOGENTRYEXIT; |
|
1053 TInt ret = KErrNotSupported; |
|
1054 |
|
1055 // Call Handle... method in Licensee LTSY |
|
1056 if (iLtsyDispatchCallControlGetAlsPpSupport) |
|
1057 { |
|
1058 ret = iLtsyDispatchCallControlGetAlsPpSupport->HandleGetAlsPpSupportL(); |
|
1059 } |
|
1060 |
|
1061 return TSYLOGSETEXITERR(ret); |
|
1062 } // CCallControlDispatcher::DispatchGetAlsPpSupportL |
|
1063 |
|
1064 TInt CCallControlDispatcher::DispatchGetAlsBlockedStatusL() |
|
1065 /** |
|
1066 * Pass ECustomGetAlsBlockedIPC request on to Licensee LTSY. |
|
1067 * |
|
1068 * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if |
|
1069 * the Licensee LTSY does not support this request. |
|
1070 */ |
|
1071 { |
|
1072 TSYLOGENTRYEXIT; |
|
1073 TInt ret = KErrNotSupported; |
|
1074 |
|
1075 // Call Handle... method in Licensee LTSY |
|
1076 if (iLtsyDispatchCallControlGetAlsBlockedStatus) |
|
1077 { |
|
1078 ret = iLtsyDispatchCallControlGetAlsBlockedStatus->HandleGetAlsBlockedStatusL(); |
|
1079 } |
|
1080 |
|
1081 return TSYLOGSETEXITERR(ret); |
|
1082 } // CCallControlDispatcher::DispatchGetAlsBlockedStatusL |
|
1083 |
|
1084 TInt CCallControlDispatcher::DispatchSetAlsBlockedL(const CMmDataPackage* aDataPackage) |
|
1085 /** |
|
1086 * Unpack data related to ECustomSetAlsBlockedIPC |
|
1087 * and pass request on to Licensee LTSY. |
|
1088 * |
|
1089 * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if |
|
1090 * the Licensee LTSY does not support this request. |
|
1091 */ |
|
1092 { |
|
1093 TSYLOGENTRYEXIT; |
|
1094 TInt ret = KErrNotSupported; |
|
1095 |
|
1096 __ASSERT_DEBUG(aDataPackage, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
1097 // Call Handle... method in Licensee LTSY |
|
1098 if (iLtsyDispatchCallControlSetAlsBlocked) |
|
1099 { |
|
1100 RMmCustomAPI::TSetAlsBlock alsBlock; |
|
1101 aDataPackage->UnPackData(alsBlock); |
|
1102 ret = iLtsyDispatchCallControlSetAlsBlocked->HandleSetAlsBlockedL(alsBlock); |
|
1103 } |
|
1104 |
|
1105 return TSYLOGSETEXITERR(ret); |
|
1106 } // CCallControlDispatcher::DispatchSetAlsBlockedL |
|
1107 |
|
1108 TInt CCallControlDispatcher::DispatchGetLifeTimeL() |
|
1109 /** |
|
1110 * Pass ECustomGetLifeTimeIPC request on to Licensee LTSY. |
|
1111 * |
|
1112 * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if |
|
1113 * the Licensee LTSY does not support this request. |
|
1114 */ |
|
1115 { |
|
1116 TSYLOGENTRYEXIT; |
|
1117 TInt ret = KErrNotSupported; |
|
1118 |
|
1119 // Call Handle... method in Licensee LTSY |
|
1120 if (iLtsyDispatchCallControlGetLifeTime) |
|
1121 { |
|
1122 ret = iLtsyDispatchCallControlGetLifeTime->HandleGetLifeTimeL(); |
|
1123 } |
|
1124 |
|
1125 return TSYLOGSETEXITERR(ret); |
|
1126 } // CCallControlDispatcher::DispatchGetLifeTimeL |
|
1127 |
|
1128 TInt CCallControlDispatcher::DispatchTerminateCallL(const CMmDataPackage* aDataPackage) |
|
1129 /** |
|
1130 * Unpack data related to ECustomTerminateCallIPC |
|
1131 * and pass request on to Licensee LTSY. |
|
1132 * |
|
1133 * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if |
|
1134 * the Licensee LTSY does not support this request. |
|
1135 */ |
|
1136 { |
|
1137 TSYLOGENTRYEXIT; |
|
1138 TInt ret = KErrNotSupported; |
|
1139 |
|
1140 __ASSERT_DEBUG(aDataPackage, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
1141 // Call Handle... method in Licensee LTSY |
|
1142 if (iLtsyDispatchCallControlTerminateErrorCall && iLtsyDispatchCallControlTerminateAllCalls) |
|
1143 { |
|
1144 TInt callId; |
|
1145 TBool isError; |
|
1146 aDataPackage->UnPackData(callId,isError); |
|
1147 if ((isError) && (callId <= 0)) |
|
1148 { |
|
1149 ret = KErrCorrupt; |
|
1150 } |
|
1151 else if ((!isError) && (callId > 0)) |
|
1152 { |
|
1153 ret = KErrCorrupt; |
|
1154 } |
|
1155 else if(isError) |
|
1156 { |
|
1157 ret = iLtsyDispatchCallControlTerminateErrorCall->HandleTerminateErrorCallL(callId); |
|
1158 } |
|
1159 else |
|
1160 { |
|
1161 // The callId is the negative id of a call in a connecting state (if there is one) |
|
1162 // we shall not pass it to the LTSY since our assumption is that it will know all calls (whether active or in the process of connecting). |
|
1163 ret = iLtsyDispatchCallControlTerminateAllCalls->HandleTerminateAllCallsL(); |
|
1164 } |
|
1165 } |
|
1166 |
|
1167 return TSYLOGSETEXITERR(ret); |
|
1168 } // CCallControlDispatcher::DispatchTerminateCallL |
|
1169 |
|
1170 TInt CCallControlDispatcher::DispatchGetCallForwardingIndicatorL() |
|
1171 /** |
|
1172 * Pass ECustomGetIccCallForwardingStatusIPC request on to Licensee LTSY. |
|
1173 * |
|
1174 * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if |
|
1175 * the Licensee LTSY does not support this request. |
|
1176 */ |
|
1177 { |
|
1178 TSYLOGENTRYEXIT; |
|
1179 TInt ret = KErrNotSupported; |
|
1180 |
|
1181 // Call Handle... method in Licensee LTSY |
|
1182 if (iLtsyDispatchCallControlGetCallForwardingIndicator) |
|
1183 { |
|
1184 ret = iLtsyDispatchCallControlGetCallForwardingIndicator->HandleGetCallForwardingIndicatorL(); |
|
1185 } |
|
1186 |
|
1187 return TSYLOGSETEXITERR(ret); |
|
1188 } // CCallControlDispatcher::DispatchGetCallForwardingIndicatorL |
|
1189 |
|
1190 TInt CCallControlDispatcher::DispatchUpdateLifeTimeL(const CMmDataPackage* aDataPackage) |
|
1191 /** |
|
1192 * Unpack data related to ECtsyUpdateLifeTimeReq / ECtsyUpdateLifeTimeComp IPCs |
|
1193 * and pass request on to Licensee LTSY. |
|
1194 * |
|
1195 * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if |
|
1196 * the Licensee LTSY does not support this request. |
|
1197 */ |
|
1198 { |
|
1199 TSYLOGENTRYEXIT; |
|
1200 TInt ret = KErrNotSupported; |
|
1201 |
|
1202 // Call Handle... method in Licensee LTSY |
|
1203 if (iLtsyDispatchCallControlUpdateLifeTimer) |
|
1204 { |
|
1205 __ASSERT_DEBUG(aDataPackage, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
1206 |
|
1207 TUint32 duration; |
|
1208 aDataPackage->UnPackData(duration); |
|
1209 |
|
1210 ret = iLtsyDispatchCallControlUpdateLifeTimer->HandleUpdateLifeTimerReqL(duration); |
|
1211 } |
|
1212 |
|
1213 return TSYLOGSETEXITERR(ret); |
|
1214 } // CCallControlDispatcher::DispatchUpdateLifeTimeL |
|
1215 |
|
1216 // |
|
1217 // Callback handlers follow |
|
1218 // |
|
1219 |
|
1220 |
|
1221 void CCallControlDispatcher::CallbackNotifyCallStatusChange(TInt aError, |
|
1222 TInt aCallId, RMobileCall::TMobileCallStatus aMobileCallStatus) |
|
1223 /** |
|
1224 * Callback function to be used by the request to complete |
|
1225 * CCtsyDispatcherCallback::CallbackCallControlNotifyCallStatusChangeInd() |
|
1226 * |
|
1227 * Packs data into a format expected by the Common TSY. |
|
1228 * |
|
1229 * @param aError The error code to be returned to the CTSY Dispatcher. |
|
1230 * |
|
1231 * @param aCallId The Call ID of the call aMobileCallStatus refers to. |
|
1232 * |
|
1233 * @param aMobileCallStatus The new status of the call refered to by aCallId. |
|
1234 */ |
|
1235 { |
|
1236 TSYLOGENTRYEXITARGS(_L8("aError=%d, aCallId=%d, aMobileCallStatus=%d"), aError, aCallId, aMobileCallStatus); |
|
1237 |
|
1238 CCallDataPackage dataPackage; |
|
1239 dataPackage.SetCallIdAndMode(aCallId, RMobilePhone::EServiceUnspecified); |
|
1240 dataPackage.PackData(const_cast<RMobileCall::TMobileCallStatus*>(&aMobileCallStatus)); |
|
1241 |
|
1242 iMessageManagerCallback.Complete(EMobileCallNotifyMobileCallStatusChange, &dataPackage, aError); |
|
1243 |
|
1244 // For data calls, CTSY does not complete dial request back to client |
|
1245 if (aMobileCallStatus == RMobileCall::EStatusConnected) |
|
1246 { |
|
1247 if (iFdnCheckPerformed) |
|
1248 { |
|
1249 iMessageManagerCallback.Complete(EEtelCallDial, &dataPackage, aError); |
|
1250 } |
|
1251 else |
|
1252 { |
|
1253 iMessageManagerCallback.Complete(EMobileCallDialNoFdnCheck, &dataPackage, aError); |
|
1254 } |
|
1255 } |
|
1256 |
|
1257 } // CCallControlDispatcher::CallbackNotifyCallStatusChange |
|
1258 |
|
1259 void CCallControlDispatcher::CallbackReceiveUui( |
|
1260 TInt aError, TInt aCallId, const TDesC& aCallUui) |
|
1261 /** |
|
1262 * Callback function to be used by the request to complete |
|
1263 * CCtsyDispatcherCallback::CallbackCallControlReceiveUuiInd(). |
|
1264 * |
|
1265 * @param aError The error code to be returned to the CTSY. |
|
1266 * @param aCallId The Call ID of the call. |
|
1267 * @param aCallUui The UUI information received from the LTSY. |
|
1268 */ |
|
1269 { |
|
1270 TSYLOGENTRYEXITARGS(_L8("aError=%d, aCallId=%d"), aError, aCallId); |
|
1271 |
|
1272 TPtrC callUui(aCallUui); |
|
1273 |
|
1274 // Pack the data to return to the Common TSY |
|
1275 CCallDataPackage dataPackage; |
|
1276 dataPackage.SetCallIdAndMode(aCallId, RMobilePhone::EServiceUnspecified); |
|
1277 dataPackage.PackData(&callUui); |
|
1278 |
|
1279 iMessageManagerCallback.Complete(EMobileCallReceiveUUI, &dataPackage, aError); |
|
1280 } // CCallControlDispatcher::CallbackReceiveUui |
|
1281 |
|
1282 void CCallControlDispatcher::CallbackNotifyDataCallCapsChange(TInt aError, |
|
1283 TInt aCallId, const RMobileCall::TMobileCallDataCapsV1& aMobileCallDataCaps) |
|
1284 /** |
|
1285 * Callback function to be used by the request to complete |
|
1286 * CCtsyDispatcherCallback::CallbackCallControlNotifyDataCallCapsChangeInd() |
|
1287 * |
|
1288 * @param aError The error code to be returned to the CTSY Dispatcher. |
|
1289 * @param aCallId The Call ID of the call whose capabilities have changed. |
|
1290 * @param aMobileCallDataCaps The new capabilities of the data call. |
|
1291 */ |
|
1292 { |
|
1293 TSYLOGENTRYEXITARGS(_L8("aError=%d, aCallId=%d"), aError, aCallId); |
|
1294 |
|
1295 // Pack the data to return to the Common TSY |
|
1296 CCallDataPackage dataPackage; |
|
1297 dataPackage.SetCallIdAndMode(aCallId, RMobilePhone::EServiceUnspecified); |
|
1298 dataPackage.PackData(const_cast<RMobileCall::TMobileCallDataCapsV1*>(&aMobileCallDataCaps)); |
|
1299 |
|
1300 iMessageManagerCallback.Complete(EMobileCallNotifyMobileDataCallCapsChange, &dataPackage, aError); |
|
1301 } // CCallControlDispatcher::CallbackNotifyDataCallCapsChange |
|
1302 |
|
1303 void CCallControlDispatcher::CallbackNotifyIncomingCall(TInt aError, |
|
1304 const RMobileCall::TMobileCallInfoV1& aCallInfo) |
|
1305 /** |
|
1306 * Callback function to be used by the request to complete |
|
1307 * CCtsyDispatcherCallback::CallbackCallControlNotifyIncomingCallInd() |
|
1308 * |
|
1309 * @param aError The error code to be returned to the CTSY Dispatcher. |
|
1310 * @param aCallInfo Call information from LTSY. |
|
1311 */ |
|
1312 { |
|
1313 TSYLOGENTRYEXITARGS(_L8("aError=%d"), aError); |
|
1314 |
|
1315 // Pack the data to return to the Common TSY |
|
1316 CCallDataPackage dataPackage; |
|
1317 dataPackage.SetCallIdAndMode(aCallInfo.iCallId, aCallInfo.iService); |
|
1318 dataPackage.PackData(const_cast<RMobileCall::TMobileCallInfoV1*>(&aCallInfo)); |
|
1319 |
|
1320 iMessageManagerCallback.Complete(EEtelLineNotifyIncomingCall, &dataPackage, aError); |
|
1321 |
|
1322 CallbackNotifyCallStatusChange(aError, aCallInfo.iCallId, RMobileCall::EStatusRinging); |
|
1323 |
|
1324 } // CCallControlDispatcher::CallbackNotifyIncomingCall |
|
1325 |
|
1326 |
|
1327 void CCallControlDispatcher::CallbackNotifyHscsdInfoChange(TInt aError, |
|
1328 TInt aCallId, const RMobileCall::TMobileCallHscsdInfoV8& aCallParams, |
|
1329 const RMobileCall::TMobileCallDataCapsV1& aCallCaps) |
|
1330 /** |
|
1331 * Callback function to be used by the request to complete |
|
1332 * CCtsyDispatcherCallback::CallbackCallControlNotifyHscsdInfoChangeInd(). |
|
1333 * |
|
1334 * @param aError The error code returned from the LTSY. |
|
1335 * @param aCallId The Call ID returned from the LTSY. |
|
1336 * @param aCallParams The call params returned from the LTSY. |
|
1337 * @param aCallInfo The call information returned from the LTSY. |
|
1338 */ |
|
1339 { |
|
1340 TSYLOGENTRYEXITARGS(_L8("aError=%d, aCallId=%d"), aError, aCallId); |
|
1341 |
|
1342 // Pack the data to return to the Common TSY |
|
1343 CCallDataPackage dataPackage; |
|
1344 dataPackage.SetCallIdAndMode(aCallId, RMobilePhone::ECircuitDataService); |
|
1345 dataPackage.PackData(const_cast<RMobileCall::TMobileCallHscsdInfoV8*>(&aCallParams), |
|
1346 const_cast<RMobileCall::TMobileCallDataCapsV1*>(&aCallCaps)); |
|
1347 |
|
1348 iMessageManagerCallback.Complete(EMobileCallNotifyHscsdInfoChange, &dataPackage, aError); |
|
1349 |
|
1350 } // CCallControlDispatcher::CallbackNotifyHscsdInfoChange |
|
1351 |
|
1352 void CCallControlDispatcher::CallbackNotifyCallEvent(TInt aError, |
|
1353 TInt aCallId, RMobileCall::TMobileCallEvent aCallEvent) |
|
1354 /** |
|
1355 * Callback function to be used by the request to complete |
|
1356 * CCtsyDispatcherCallback::CallbackCallControlNotifyCallEventInd() |
|
1357 * |
|
1358 * @param aError The error code to be returned to the CTSY Dispatcher. |
|
1359 * @param aCallId Call ID returned from LTSY |
|
1360 * @param aCallEvent Call event returned from LTSY |
|
1361 */ |
|
1362 { |
|
1363 TSYLOGENTRYEXITARGS(_L8("aError=%d, aCallId=%d, aCallEvent=%d"), aError, aCallId, aCallEvent); |
|
1364 |
|
1365 CCallDataPackage dataPackage; |
|
1366 dataPackage.SetCallIdAndMode(aCallId, RMobilePhone::EServiceUnspecified); |
|
1367 dataPackage.PackData(const_cast<RMobileCall::TMobileCallEvent*>(&aCallEvent)); |
|
1368 |
|
1369 iMessageManagerCallback.Complete(EMobileCallNotifyCallEvent, &dataPackage, aError); |
|
1370 |
|
1371 } // CCallControlDispatcher::CallbackNotifyCallEvent |
|
1372 |
|
1373 void CCallControlDispatcher::CallbackNotifyCallInfoChange( |
|
1374 TInt aError, const RMobileCall::TMobileCallInfoV1& aMobileCallInfo) |
|
1375 /** |
|
1376 * Callback function to be used by the request to complete |
|
1377 * CCtsyDispatcherCallback::CallbackCallControlNotifyCallInfoChangeInd(). |
|
1378 * |
|
1379 * @param aError The error code returned by the LTSY. |
|
1380 * @param aMobileCallInfo The call information relating to the call identified by aCallId. |
|
1381 */ |
|
1382 { |
|
1383 TSYLOGENTRYEXITARGS(_L8("aError=%d, callId=%d, callMode=%d"), aError, aMobileCallInfo.iCallId, aMobileCallInfo.iService); |
|
1384 |
|
1385 // Pack the data to return to the Common TSY |
|
1386 CCallDataPackage dataPackage; |
|
1387 dataPackage.SetCallIdAndMode(aMobileCallInfo.iCallId, aMobileCallInfo.iService); |
|
1388 dataPackage.PackData(const_cast<RMobileCall::TMobileCallInfoV1*>(&aMobileCallInfo)); |
|
1389 |
|
1390 iMessageManagerCallback.Complete(EMobileCallGetMobileCallInfo, &dataPackage, aError); |
|
1391 |
|
1392 } // CCallControlDispatcher::CallbackNotifyCallInfoChange |
|
1393 |
|
1394 void CCallControlDispatcher::CallbackRemoteAlertingToneChange( |
|
1395 TInt aError, RMmCustomAPI::TRemoteAlertingToneStatus aRemoteAlertingTone) |
|
1396 /** |
|
1397 * Callback function to be used by the request to complete |
|
1398 * CCtsyDispatcherCallback::CallbackCallControlRemoteAlertingToneChangeInd(). |
|
1399 * |
|
1400 * @param aError The error code returned by the LTSY. |
|
1401 * @param aRemoteAlertingTone The new remote alerting status (either RMmCustomAPI::EUiRbtTone |
|
1402 * when it is a ringback tone or RMmCustomAPI::EUiStopTone when it's a stop tone) |
|
1403 */ |
|
1404 { |
|
1405 TSYLOGENTRYEXITARGS(_L8("aError=%d, aRemoteAlertingTone=%d"), aError, aRemoteAlertingTone); |
|
1406 |
|
1407 CMmDataPackage dataPackage; |
|
1408 |
|
1409 // Pack the data to return to the Common TSY |
|
1410 if(aRemoteAlertingTone != RMmCustomAPI::EUiNoTone) |
|
1411 { |
|
1412 TBool playRemoteAlertToneLocally = (aRemoteAlertingTone == RMmCustomAPI::EUiRbtTone) ? TRUE : FALSE; |
|
1413 dataPackage.PackData(&playRemoteAlertToneLocally); |
|
1414 |
|
1415 iMessageManagerCallback.Complete(ECustomGetRemoteAlertingToneStatusIPC, &dataPackage, aError); |
|
1416 } |
|
1417 |
|
1418 dataPackage.PackData(&aRemoteAlertingTone); |
|
1419 iMessageManagerCallback.Complete(ECustomNotifyRemoteAlertingToneStatusChangeIPC, &dataPackage, aError); |
|
1420 |
|
1421 |
|
1422 } // CCallControlDispatcher::CallbackRemoteAlertingToneChange |
|
1423 |
|
1424 |
|
1425 void CCallControlDispatcher::CallbackAnswer(TInt aError, TInt aCallId) |
|
1426 /** |
|
1427 * Callback function to be used by the request to complete |
|
1428 * CCtsyDispatcherCallback::CallbackCallControlAnswerComp() |
|
1429 * |
|
1430 * @param aError The error code to be returned to the CTSY Dispatcher. |
|
1431 * @param aCallId The Call ID returned from the LTSY. |
|
1432 */ |
|
1433 { |
|
1434 TSYLOGENTRYEXITARGS(_L8("aError=%d, aCallId=%d"), aError, aCallId); |
|
1435 |
|
1436 // For cases where the answer completes with no error, call status change |
|
1437 // notifications come from the LTSY to indicate the call is connected. |
|
1438 // The EStatusConnected status will complete the client's answer request. |
|
1439 if (aError != KErrNone) |
|
1440 { |
|
1441 CCallDataPackage dataPackage; |
|
1442 dataPackage.SetCallIdAndMode(aCallId, RMobilePhone::EServiceUnspecified); |
|
1443 iMessageManagerCallback.Complete(EEtelCallAnswer, &dataPackage, aError); |
|
1444 } |
|
1445 |
|
1446 } // CCallControlDispatcher::CallbackAnswer |
|
1447 |
|
1448 |
|
1449 void CCallControlDispatcher::CallbackHold(TInt aError, TInt aCallId) |
|
1450 /** |
|
1451 * Callback function to be used by the request to complete |
|
1452 * CCtsyDispatcherCallback::CallbackCallControlHoldComp(). |
|
1453 * |
|
1454 * @param aError The error code to be returned to the CTSY Dispatcher. |
|
1455 * @param aCallId The Call ID of the call which was requested to be held. |
|
1456 */ |
|
1457 { |
|
1458 TSYLOGENTRYEXITARGS(_L8("aError=%d, aCallId=%d"), aError, aCallId); |
|
1459 |
|
1460 CCallDataPackage dataPackage; |
|
1461 dataPackage.SetCallIdAndMode(aCallId, RMobilePhone::EServiceUnspecified); |
|
1462 |
|
1463 if (aError != KErrNone) |
|
1464 { |
|
1465 iMessageManagerCallback.Complete(EMobileCallHold, &dataPackage, aError); |
|
1466 } |
|
1467 |
|
1468 } // CCallControlDispatcher::CallbackHold |
|
1469 |
|
1470 void CCallControlDispatcher::CallbackDialEmergency(TInt aError, |
|
1471 TInt aCallId) |
|
1472 /** |
|
1473 * Callback function to be used by the request to complete |
|
1474 * CCtsyDispatcherCallback::CallbackCallControlDialEmergencyComp() |
|
1475 * |
|
1476 * @param aError The error code to be returned to the CTSY Dispatcher. |
|
1477 * @param aCallId The call ID returned from the LTSY |
|
1478 */ |
|
1479 { |
|
1480 TSYLOGENTRYEXITARGS(_L8("aError=%d, aCallId=%d"), aError, aCallId); |
|
1481 |
|
1482 if (aError == KErrNone) |
|
1483 { |
|
1484 DoCallbackDial(aError, aCallId, RMobilePhone::EVoiceService); |
|
1485 iModeUsedForVoiceCallDial = RMobilePhone::EServiceUnspecified; |
|
1486 } |
|
1487 else |
|
1488 { |
|
1489 // When dialling of an emergency call fails, the CTSY expects a particular |
|
1490 // series of completions |
|
1491 |
|
1492 RMobileCall::TMobileCallInfoV1 callInfo; |
|
1493 callInfo.iService = RMobilePhone::EVoiceService; |
|
1494 callInfo.iCallId = aCallId; |
|
1495 |
|
1496 CCallDataPackage dataPackage; |
|
1497 dataPackage.SetCallIdAndMode(aCallId, callInfo.iService); |
|
1498 dataPackage.PackData(&callInfo); |
|
1499 |
|
1500 CallbackNotifyCallInfoChange(aError, callInfo); |
|
1501 |
|
1502 CallbackNotifyCallStatusChange(aError, aCallId, RMobileCall::EStatusIdle); |
|
1503 } |
|
1504 |
|
1505 } // CCallControlDispatcher::CallbackDialEmergency |
|
1506 |
|
1507 |
|
1508 void CCallControlDispatcher::CallbackStopDtmfTone(TInt aError) |
|
1509 /** |
|
1510 * Callback function to be used by the request to complete |
|
1511 * CCtsyDispatcherCallback::CallbackCallControlStopDtmfToneComp() |
|
1512 * |
|
1513 * @param aError The error code to be returned to the CTSY Dispatcher. |
|
1514 */ |
|
1515 { |
|
1516 TSYLOGENTRYEXITARGS(_L8("aError=%d"), aError); |
|
1517 |
|
1518 iMessageManagerCallback.Complete(EMobilePhoneStopDTMFTone, aError); |
|
1519 |
|
1520 } // CCallControlDispatcher::CallbackStopDtmfTone |
|
1521 |
|
1522 void CCallControlDispatcher::CallbackSetActiveAlsLine(TInt aError) |
|
1523 /** |
|
1524 * Callback function to be used by the request to complete |
|
1525 * CCtsyDispatcherCallback::CallbackCallControlSetActiveAlsLineComp() |
|
1526 * |
|
1527 * @param aError The error code to be returned to the CTSY Dispatcher. |
|
1528 */ |
|
1529 { |
|
1530 TSYLOGENTRYEXITARGS(_L8("aError=%d"), aError); |
|
1531 |
|
1532 iMessageManagerCallback.Complete(EMobilePhoneSetALSLine, aError); |
|
1533 |
|
1534 } // CCallControlDispatcher::CallbackSetActiveAlsLine |
|
1535 |
|
1536 void CCallControlDispatcher::CallbackSendDtmfTonesCancel(TInt aError) |
|
1537 /** |
|
1538 * Callback function to be used by the request to complete |
|
1539 * CCtsyDispatcherCallback::CallbackCallControlSendDtmfTonesCancelComp(). |
|
1540 * |
|
1541 * @param aError The error code to be returned to the CTSY Dispatcher. |
|
1542 */ |
|
1543 { |
|
1544 TSYLOGENTRYEXITARGS(_L8("aError=%d"), aError); |
|
1545 |
|
1546 iMessageManagerCallback.Complete(EMobilePhoneSendDTMFTonesCancel, aError); |
|
1547 } // CCallControlDispatcher::CallbackSendDtmfTonesCancel |
|
1548 |
|
1549 void CCallControlDispatcher::CallbackHangUp(TInt aError, TInt aCallId) |
|
1550 /** |
|
1551 * Callback function to be used by the request to complete |
|
1552 * CCtsyDispatcherCallback::CallbackCallControlHangUpComp() |
|
1553 * |
|
1554 * @param aError The error code to be returned to the CTSY Dispatcher. |
|
1555 * @param aCallId The Call ID of the call which has been hung up. |
|
1556 * |
|
1557 * @see RCall::HangUp |
|
1558 */ |
|
1559 { |
|
1560 TSYLOGENTRYEXITARGS(_L8("aError=%d, aCallId=%d"), aError, aCallId); |
|
1561 |
|
1562 CCallDataPackage dataPackage; |
|
1563 dataPackage.SetCallIdAndMode(aCallId, RMobilePhone::EServiceUnspecified); |
|
1564 |
|
1565 iMessageManagerCallback.Complete(EEtelCallHangUp, &dataPackage, aError); |
|
1566 } // CCallControlDispatcher::CallbackHangUp |
|
1567 |
|
1568 void CCallControlDispatcher::CallbackResume(TInt aError, TInt aCallId) |
|
1569 /** |
|
1570 * Callback function to be used by the request to complete |
|
1571 * CCtsyDispatcherCallback::CallbackCallControlResumeComp() |
|
1572 * |
|
1573 * @param aError The error code to be returned to the CTSY Dispatcher. |
|
1574 * @param aCallId The Call ID returned by CCtsyDispatcherCallback. |
|
1575 */ |
|
1576 { |
|
1577 TSYLOGENTRYEXITARGS(_L8("aError=%d, aCallId=%d"), aError, aCallId); |
|
1578 |
|
1579 CCallDataPackage dataPackage; |
|
1580 dataPackage.SetCallIdAndMode(aCallId, RMobilePhone::EServiceUnspecified); |
|
1581 |
|
1582 if (aError != KErrNone) |
|
1583 { |
|
1584 iMessageManagerCallback.Complete(EMobileCallResume, &dataPackage, aError); |
|
1585 } |
|
1586 |
|
1587 } // CCallControlDispatcher::CallbackResume |
|
1588 |
|
1589 void CCallControlDispatcher::CallbackSetDynamicHscsdParams(TInt aError, |
|
1590 TInt aCallId) |
|
1591 /** |
|
1592 * Callback function to be used by the request to complete |
|
1593 * CCtsyDispatcherCallback::CallbackCallControlSetDynamicHscsdParamsComp() |
|
1594 * |
|
1595 * @param aError The error code to be returned to the CTSY Dispatcher. |
|
1596 * @param aCallId The Call ID returned to the CTSY. |
|
1597 */ |
|
1598 { |
|
1599 TSYLOGENTRYEXITARGS(_L8("aError=%d, aCallId=%d"), aError, aCallId); |
|
1600 |
|
1601 CCallDataPackage dataPackage; |
|
1602 dataPackage.SetCallIdAndMode(aCallId, RMobilePhone::EServiceUnspecified); |
|
1603 |
|
1604 iMessageManagerCallback.Complete(EMobileCallSetDynamicHscsdParams, &dataPackage, aError); |
|
1605 |
|
1606 } // CCallControlDispatcher::CallbackSetDynamicHscsdParams |
|
1607 |
|
1608 |
|
1609 void CCallControlDispatcher::CallbackDialVoice(TInt aError, TInt aCallId) |
|
1610 /** |
|
1611 * Callback function to be used by the request to complete |
|
1612 * CCtsyDispatcherCallback::CallbackCallControlDialVoiceComp() |
|
1613 * |
|
1614 * @param aError The error code to be returned to the CTSY. |
|
1615 * |
|
1616 * @param aCallId The Call ID returned to the CTSY. |
|
1617 * |
|
1618 */ |
|
1619 { |
|
1620 TSYLOGENTRYEXITARGS(_L8("aError=%d, aCallId=%d"), aError, aCallId); |
|
1621 |
|
1622 DoCallbackDial(aError, aCallId, iModeUsedForVoiceCallDial); |
|
1623 iModeUsedForVoiceCallDial = RMobilePhone::EServiceUnspecified; |
|
1624 |
|
1625 } // CCallControlDispatcher::CallbackDialVoice |
|
1626 |
|
1627 void CCallControlDispatcher::CallbackTransfer(TInt aError) |
|
1628 /** |
|
1629 * Callback function to be used by the request to complete |
|
1630 * CCtsyDispatcherCallback::CallbackCallControlTransferComp() |
|
1631 * |
|
1632 * @param aError The error code to be returned to the CTSY Dispatcher. |
|
1633 */ |
|
1634 { |
|
1635 TSYLOGENTRYEXITARGS(_L8("aError=%d"), aError); |
|
1636 |
|
1637 // If the transfer was not called on this call ID, the CTSY will have |
|
1638 // no reqHandle for this IPC so calling both here is OK. |
|
1639 |
|
1640 // Check in case LTSY has completed a transfer when no transfer was called |
|
1641 // Don't complete back to CTSY in this case |
|
1642 CCallDataPackage dataPackage; |
|
1643 |
|
1644 if (iTransferHeldCallId != KInvalidCallId) |
|
1645 { |
|
1646 dataPackage.SetCallIdAndMode(iTransferHeldCallId, RMobilePhone::EServiceUnspecified); |
|
1647 iTransferHeldCallId = KInvalidCallId; |
|
1648 iMessageManagerCallback.Complete(EMobileCallTransfer, &dataPackage, aError); |
|
1649 } |
|
1650 |
|
1651 if (iTransferSecondCallId != KInvalidCallId) |
|
1652 { |
|
1653 dataPackage.SetCallIdAndMode(iTransferSecondCallId, RMobilePhone::EServiceUnspecified); |
|
1654 iSwapConnectedCallId = KInvalidCallId; |
|
1655 iMessageManagerCallback.Complete(EMobileCallTransfer, &dataPackage, aError); |
|
1656 } |
|
1657 |
|
1658 } // CCallControlDispatcher::CallbackTransfer |
|
1659 |
|
1660 void CCallControlDispatcher::CallbackSendDtmfTones(TInt aError) |
|
1661 /** |
|
1662 * Callback function to be used by the request to complete |
|
1663 * CCtsyDispatcherCallback::CallbackCallControlSendDtmfTonesComp() |
|
1664 * |
|
1665 * @param aError The error code to be returned to the CTSY Dispatcher. |
|
1666 */ |
|
1667 { |
|
1668 TSYLOGENTRYEXITARGS(_L8("aError=%d"), aError); |
|
1669 |
|
1670 if (iFoundDtmfStop) |
|
1671 { |
|
1672 // Part of the DTMF string (after the 'w') has been cached, and there is |
|
1673 // still more to send so notify the client of the stop character |
|
1674 // Make a copy of the cached data as CTSY deletes previous pointer |
|
1675 CMmDataPackage dataPackage; |
|
1676 dataPackage.PackData(&iDtmfString); |
|
1677 iMessageManagerCallback.Complete(EMobilePhoneNotifyStopInDTMFString, &dataPackage, aError); |
|
1678 iDtmfString.Zero(); |
|
1679 iFoundDtmfStop = EFalse; |
|
1680 } |
|
1681 else |
|
1682 { |
|
1683 // There was no 'w' in the string, normal completion of send |
|
1684 iMessageManagerCallback.Complete(EMobilePhoneSendDTMFTones, aError); |
|
1685 } |
|
1686 |
|
1687 } // CCallControlDispatcher::CallbackSendDtmfTones |
|
1688 |
|
1689 void CCallControlDispatcher::CallbackGetIdentityServiceStatus(TInt aError, |
|
1690 RMobilePhone::TMobilePhoneIdServiceStatus aIdentityServiceStatus) |
|
1691 /** |
|
1692 * Callback function to be used by the request to complete |
|
1693 * CCtsyDispatcherCallback::CallbackCallControlGetIdentityServiceStatusComp() |
|
1694 * |
|
1695 * @param aError The error code to be returned to the CTSY Dispatcher. |
|
1696 * @param aIdentityServiceStatus The identity service status returned to the CTSY. |
|
1697 */ |
|
1698 { |
|
1699 TSYLOGENTRYEXITARGS(_L8("aError=%d, aIdentityServiceStatus=%d"), aError, aIdentityServiceStatus); |
|
1700 |
|
1701 // Pack the data to return to the Common TSY |
|
1702 CMmDataPackage dataPackage; |
|
1703 dataPackage.PackData(const_cast<RMobilePhone::TMobilePhoneIdServiceStatus*>(&aIdentityServiceStatus)); |
|
1704 |
|
1705 iMessageManagerCallback.Complete(EMobilePhoneGetIdentityServiceStatus, &dataPackage, aError); |
|
1706 |
|
1707 } // CCallControlDispatcher::CallbackGetIdentityServiceStatus |
|
1708 |
|
1709 void CCallControlDispatcher::CallbackSwap(TInt aError) |
|
1710 /** |
|
1711 * Callback function to be used by the request to complete |
|
1712 * CCtsyDispatcherCallback::CallbackCallControlSwapComp() |
|
1713 * |
|
1714 * @param aError The error code to be returned to the CTSY Dispatcher. |
|
1715 */ |
|
1716 { |
|
1717 TSYLOGENTRYEXITARGS(_L8("aError=%d"), aError); |
|
1718 |
|
1719 if (aError != KErrNone) |
|
1720 { |
|
1721 CCallDataPackage dataPackage; |
|
1722 |
|
1723 // If the swap was not called on this call ID, the CTSY will have |
|
1724 // no reqHandle for this IPC so calling both here is OK. |
|
1725 |
|
1726 // Check in case LTSY has completed a swap when no swap was called |
|
1727 // Don't complete back to CTSY in this case |
|
1728 |
|
1729 if (iSwapHeldCallId != KInvalidCallId) |
|
1730 { |
|
1731 dataPackage.SetCallIdAndMode(iSwapHeldCallId, RMobilePhone::EServiceUnspecified); |
|
1732 iSwapHeldCallId = KInvalidCallId; |
|
1733 iMessageManagerCallback.Complete(EMobileCallSwap, &dataPackage, aError); |
|
1734 } |
|
1735 |
|
1736 if (iSwapConnectedCallId != KInvalidCallId) |
|
1737 { |
|
1738 dataPackage.SetCallIdAndMode(iSwapConnectedCallId, RMobilePhone::EServiceUnspecified); |
|
1739 iSwapConnectedCallId = KInvalidCallId; |
|
1740 iMessageManagerCallback.Complete(EMobileCallSwap, &dataPackage, aError); |
|
1741 } |
|
1742 |
|
1743 } |
|
1744 |
|
1745 } // CCallControlDispatcher::CallbackSwap |
|
1746 |
|
1747 void CCallControlDispatcher::CallbackStartDtmfTone(TInt aError) |
|
1748 /** |
|
1749 * Callback function to be used by the request to complete |
|
1750 * CCtsyDispatcherCallback::CallbackCallControlStartDtmfToneComp() |
|
1751 * |
|
1752 * @param aError The error code to be returned to the CTSY Dispatcher. |
|
1753 */ |
|
1754 { |
|
1755 TSYLOGENTRYEXITARGS(_L8("aError=%d"), aError); |
|
1756 |
|
1757 iMessageManagerCallback.Complete(EMobilePhoneStartDTMFTone, aError); |
|
1758 |
|
1759 } // CCallControlDispatcher::CallbackStartDtmfTone |
|
1760 |
|
1761 void CCallControlDispatcher::CallbackGetActiveAlsLine( |
|
1762 TInt aError, RMobilePhone::TMobilePhoneALSLine aAlsLine) |
|
1763 /** |
|
1764 * Packages the data returned by the Licensee LTSY and completes the |
|
1765 * request back to the Common TSY. |
|
1766 * |
|
1767 * @param aError The error code to complete back. |
|
1768 * @param aAlsLine The ALS line returned by the Licensee LTSY. |
|
1769 */ |
|
1770 { |
|
1771 TSYLOGENTRYEXITARGS(_L8("aError=%d aAlsLine=%d"), aError, aAlsLine); |
|
1772 |
|
1773 // Package up data to return to Common TSY |
|
1774 CMmDataPackage dataPackage; |
|
1775 dataPackage.PackData(const_cast<RMobilePhone::TMobilePhoneALSLine*>(&aAlsLine)); |
|
1776 |
|
1777 // Now complete the actual get request |
|
1778 iMessageManagerCallback.Complete(EMobilePhoneGetALSLine, &dataPackage, aError); |
|
1779 |
|
1780 } // CPhoneDispatcher::CallbackGetActiveAlsLine |
|
1781 |
|
1782 void CCallControlDispatcher::CallbackDialData(TInt aError, TInt aCallId) |
|
1783 /** |
|
1784 * Callback function to be used by the request to complete |
|
1785 * CCtsyDispatcherCallback::CallbackCallControlDialDataComp(). |
|
1786 * |
|
1787 * @param aError The error code to be returned to the CTSY. |
|
1788 * |
|
1789 * @param aCallId The Call ID returned to the CTSY. |
|
1790 * |
|
1791 */ |
|
1792 { |
|
1793 TSYLOGENTRYEXITARGS(_L8("aError=%d, aCallId=%d"), aError, aCallId); |
|
1794 |
|
1795 DoCallbackDial(aError, aCallId, RMobilePhone::ECircuitDataService); |
|
1796 iModeUsedForVoiceCallDial = RMobilePhone::EServiceUnspecified; |
|
1797 |
|
1798 } // CCallControlDispatcher::CallbackDialData |
|
1799 |
|
1800 void CCallControlDispatcher::CallbackGetAlsPpSupport(TInt aError, RMmCustomAPI::TAlsSupport aAlsSupport) |
|
1801 /** |
|
1802 * Callback function to be used by the request to complete |
|
1803 * CCtsyDispatcherCallback::CallbackCallControlGetAlsPpSupportComp(). |
|
1804 * |
|
1805 * @param aError The error code to be returned to the CTSY. |
|
1806 * |
|
1807 * @param aAlsSupport The return value from the LTSY. |
|
1808 * |
|
1809 */ |
|
1810 { |
|
1811 TSYLOGENTRYEXITARGS(_L8("aError=%d, aAlsSupport=%d"), aError, aAlsSupport); |
|
1812 |
|
1813 // Package up data to return to Common TSY |
|
1814 CMmDataPackage dataPackage; |
|
1815 dataPackage.PackData(&aAlsSupport); |
|
1816 |
|
1817 // Now complete the actual get request |
|
1818 iMessageManagerCallback.Complete(ECustomCheckAlsPpSupportIPC, &dataPackage, aError); |
|
1819 |
|
1820 } // CCallControlDispatcher::CallbackGetAlsPpSupport |
|
1821 |
|
1822 void CCallControlDispatcher::CallbackGetAlsBlockedStatus(TInt aError, RMmCustomAPI::TGetAlsBlockStatus aAlsStatus) |
|
1823 /** |
|
1824 * Callback function to be used by the request to complete |
|
1825 * CCtsyDispatcherCallback::CallbackCallControlGetAlsBlockedStatusComp(). |
|
1826 * |
|
1827 * @param aError The error code to be returned to the CTSY. |
|
1828 * |
|
1829 * @param aAlsStatus The return value from the LTSY. |
|
1830 * |
|
1831 */ |
|
1832 { |
|
1833 TSYLOGENTRYEXITARGS(_L8("aError=%d, aAlsStatus=%d"), aError, aAlsStatus); |
|
1834 |
|
1835 // Package up data to return to Common TSY |
|
1836 CMmDataPackage dataPackage; |
|
1837 dataPackage.PackData(&aAlsStatus); |
|
1838 |
|
1839 // Now complete the actual get request |
|
1840 iMessageManagerCallback.Complete(ECustomGetAlsBlockedIPC, &dataPackage, aError); |
|
1841 |
|
1842 } // CCallControlDispatcher::CallbackGetAlsBlockedStatus |
|
1843 |
|
1844 void CCallControlDispatcher::CallbackSetAlsBlocked(TInt aError) |
|
1845 /** |
|
1846 * Callback function to be used by the request to complete |
|
1847 * CCtsyDispatcherCallback::CallbackCallControlSetAlsBlockedComp(). |
|
1848 * |
|
1849 * @param aError The error code to be returned to the CTSY. |
|
1850 * |
|
1851 */ |
|
1852 { |
|
1853 TSYLOGENTRYEXITARGS(_L8("aError=%d"), aError); |
|
1854 |
|
1855 // Now complete the actual get request |
|
1856 iMessageManagerCallback.Complete(ECustomSetAlsBlockedIPC, aError); |
|
1857 |
|
1858 } // CCallControlDispatcher::CallbackSetAlsBlocked |
|
1859 |
|
1860 void CCallControlDispatcher::CallbackGetLifeTime(TInt aError) |
|
1861 /** |
|
1862 * Callback function to be used by the request to complete |
|
1863 * CCtsyDispatcherCallback::CallbackCallControlGetLifeTimeComp(). |
|
1864 * |
|
1865 * @param aError The error code to be returned to the CTSY. |
|
1866 * |
|
1867 */ |
|
1868 { |
|
1869 TSYLOGENTRYEXITARGS(_L8("aError=%d"), aError); |
|
1870 |
|
1871 // Package up data to return to Common TSY |
|
1872 RMmCustomAPI::TLifeTimeData data; |
|
1873 data.iCaps = 0; |
|
1874 CMmDataPackage dataPackage; |
|
1875 dataPackage.PackData(&data); |
|
1876 |
|
1877 // Now complete the actual get request |
|
1878 iMessageManagerCallback.Complete(ECustomGetLifeTimeIPC, &dataPackage, aError); |
|
1879 |
|
1880 } // CCallControlDispatcher::CallbackGetLifeTime |
|
1881 |
|
1882 void CCallControlDispatcher::CallbackGetLifeTime(TInt aError, TUint32 aHours, TUint8 aMinutes) |
|
1883 /** |
|
1884 * Callback function to be used by the request to complete |
|
1885 * CCtsyDispatcherCallback::CallbackCallControlGetLifeTimeComp(). |
|
1886 * |
|
1887 * @param aError The error code to be returned to the CTSY. |
|
1888 * |
|
1889 * @param aHours The amount of hours of airtime use since the manufacturing date. The range of the value should be 0-999999. |
|
1890 * @param aMinutes The amount of minutes in addition to the amount of hours represented by aHours. The range of the value is 0-59. |
|
1891 * |
|
1892 */ |
|
1893 { |
|
1894 TSYLOGENTRYEXITARGS(_L8("aError=%d, aHours=%d, aMinutes=%d"), aError, aHours, aMinutes); |
|
1895 |
|
1896 // Package up data to return to Common TSY |
|
1897 RMmCustomAPI::TLifeTimeData data; |
|
1898 data.iCaps = RMmCustomAPI::TLifeTimeData::ELifeTimeDataCapsLifeTime; |
|
1899 data.iHours = aHours; |
|
1900 data.iMinutes = aMinutes; |
|
1901 CMmDataPackage dataPackage; |
|
1902 dataPackage.PackData(&data); |
|
1903 |
|
1904 // Now complete the actual get request |
|
1905 iMessageManagerCallback.Complete(ECustomGetLifeTimeIPC, &dataPackage, aError); |
|
1906 |
|
1907 } // CCallControlDispatcher::CallbackGetLifeTime |
|
1908 |
|
1909 void CCallControlDispatcher::CallbackGetLifeTime(TInt aError, const TDateTime &aManufacturingDate) |
|
1910 /** |
|
1911 * Callback function to be used by the request to complete |
|
1912 * CCtsyDispatcherCallback::CallbackCallControlGetLifeTimeComp(). |
|
1913 * |
|
1914 * @param aError The error code to be returned to the CTSY. |
|
1915 * |
|
1916 * @param aManufacturingDate The date of phone manufacturing. Only the Year, Month and day information is meaningful. |
|
1917 * |
|
1918 */ |
|
1919 { |
|
1920 TSYLOGENTRYEXITARGS(_L8("aError=%d"), aError); |
|
1921 |
|
1922 // Package up data to return to Common TSY |
|
1923 RMmCustomAPI::TLifeTimeData data; |
|
1924 data.iCaps = RMmCustomAPI::TLifeTimeData::ELifeTimeDataCapsManufacturerDate; |
|
1925 data.iManufacturingDate = aManufacturingDate; |
|
1926 CMmDataPackage dataPackage; |
|
1927 dataPackage.PackData(&data); |
|
1928 |
|
1929 // Now complete the actual get request |
|
1930 iMessageManagerCallback.Complete(ECustomGetLifeTimeIPC, &dataPackage, aError); |
|
1931 |
|
1932 } // CCallControlDispatcher::CallbackGetLifeTime |
|
1933 |
|
1934 void CCallControlDispatcher::CallbackGetLifeTime(TInt aError, const TDateTime &aManufacturingDate, TUint32 aHours, TUint8 aMinutes) |
|
1935 /** |
|
1936 * Callback function to be used by the request to complete |
|
1937 * CCtsyDispatcherCallback::CallbackCallControlGetLifeTimeComp(). |
|
1938 * |
|
1939 * @param aError The error code to be returned to the CTSY. |
|
1940 * |
|
1941 * @param aManufacturingDate The date of phone manufacturing. Only the Year, Month and day information is meaningful. |
|
1942 * @param aHours The amount of hours of airtime use since the manufacturing date. The range of the value should be 0-999999. |
|
1943 * @param aMinutes The amount of minutes in addition to the amount of hours represented by aHours. The range of the value is 0-59. |
|
1944 * |
|
1945 */ |
|
1946 { |
|
1947 TSYLOGENTRYEXITARGS(_L8("aError=%d, aHours=%d, aMinutes=%d"), aError, aHours, aMinutes); |
|
1948 |
|
1949 // Package up data to return to Common TSY |
|
1950 RMmCustomAPI::TLifeTimeData data; |
|
1951 data.iCaps = RMmCustomAPI::TLifeTimeData::ELifeTimeDataCapsLifeTime | RMmCustomAPI::TLifeTimeData::ELifeTimeDataCapsManufacturerDate; |
|
1952 data.iHours = aHours; |
|
1953 data.iMinutes = aMinutes; |
|
1954 data.iManufacturingDate = aManufacturingDate; |
|
1955 CMmDataPackage dataPackage; |
|
1956 dataPackage.PackData(&data); |
|
1957 |
|
1958 // Now complete the actual get request |
|
1959 iMessageManagerCallback.Complete(ECustomGetLifeTimeIPC, &dataPackage, aError); |
|
1960 |
|
1961 } // CCallControlDispatcher::CallbackGetLifeTime |
|
1962 |
|
1963 void CCallControlDispatcher::CallbackTerminateErrorCall(TInt aError) |
|
1964 /** |
|
1965 * Callback function to be used by the request to complete |
|
1966 * CCtsyDispatcherCallback::CallbackCallControlTerminateErrorCallComp(). |
|
1967 * |
|
1968 * @param aError The error code to be returned to the CTSY. |
|
1969 * |
|
1970 */ |
|
1971 { |
|
1972 TSYLOGENTRYEXITARGS(_L8("aError=%d"), aError); |
|
1973 |
|
1974 // Now complete the actual get request |
|
1975 iMessageManagerCallback.Complete(ECustomTerminateCallIPC, aError); |
|
1976 |
|
1977 } // CCallControlDispatcher::CallbackTerminateErrorCall |
|
1978 |
|
1979 void CCallControlDispatcher::CallbackTerminateAllCalls(TInt aError) |
|
1980 /** |
|
1981 * Callback function to be used by the request to complete |
|
1982 * CCtsyDispatcherCallback::CallbackCallControlTerminateAllCallsComp(). |
|
1983 * |
|
1984 * @param aError The error code to be returned to the CTSY. |
|
1985 * |
|
1986 */ |
|
1987 { |
|
1988 TSYLOGENTRYEXITARGS(_L8("aError=%d"), aError); |
|
1989 |
|
1990 // Now complete the actual get request |
|
1991 iMessageManagerCallback.Complete(ECustomTerminateCallIPC, aError); |
|
1992 |
|
1993 } // CCallControlDispatcher::CallbackTerminateAllCalls |
|
1994 |
|
1995 void CCallControlDispatcher::CallbackGetCallForwardingIndicator(TInt aError, RMobilePhone::TMobileTON aTypeOfNumber, |
|
1996 RMobilePhone::TMobileNPI aMobilePlan, |
|
1997 const TDesC &aNumber, |
|
1998 RMobilePhone::TCFUIndicatorStatusFlags aCFUIndicatorStatusFlags, |
|
1999 RMobilePhone::TMultipleSubscriberProfileID aMultipleSubscriberProfileId) |
|
2000 /** |
|
2001 * Callback function to be used by the request to complete |
|
2002 * CCtsyDispatcherCallback::CallbackCallControlGetCallForwardingIndicatorComp(). |
|
2003 * |
|
2004 * @param aError The error code to be returned to the CTSY. |
|
2005 * |
|
2006 * @param aTypeOfNumber The call forwarding type of number. |
|
2007 * @param aMobilePlan The call forwarding mobile plan. |
|
2008 * @param aNumber The call forwarding telephone number. |
|
2009 * @param aCFUIndicatorStatusFlags The setting for indicator status. Can contain a number of flags from RMobilePhone::TCFUIndicatorStatus. |
|
2010 * @param aMultipleSubscriberProfileID The multiple subscriber profile ID. |
|
2011 * |
|
2012 */ |
|
2013 { |
|
2014 TSYLOGENTRYEXITARGS(_L8("aError=%d, Flags=%d, ProfileId=%d"), aError, aCFUIndicatorStatusFlags, aMultipleSubscriberProfileId); |
|
2015 |
|
2016 // Package up data to return to Common TSY |
|
2017 RMmCustomAPI::TCFIndicators data; |
|
2018 data.iCFNumber.iTypeOfNumber = aTypeOfNumber; |
|
2019 data.iCFNumber.iNumberPlan = aMobilePlan; |
|
2020 data.iCFNumber.iTelNumber = aNumber; |
|
2021 data.iIndicator = aCFUIndicatorStatusFlags; |
|
2022 switch(aMultipleSubscriberProfileId) |
|
2023 { |
|
2024 case RMobilePhone::KProfileIdentityUnknown: |
|
2025 break; |
|
2026 case RMobilePhone::KProfileIdentityOne: |
|
2027 data.iMultipleSubscriberProfileID = RMmCustomAPI::KProfileIdentityOne; |
|
2028 break; |
|
2029 case RMobilePhone::KProfileIdentityTwo: |
|
2030 data.iMultipleSubscriberProfileID = RMmCustomAPI::KProfileIdentityTwo; |
|
2031 break; |
|
2032 case RMobilePhone::KProfileIdentityThree: |
|
2033 data.iMultipleSubscriberProfileID = RMmCustomAPI::KProfileIdentityThree; |
|
2034 break; |
|
2035 case RMobilePhone::KProfileIdentityFour: |
|
2036 data.iMultipleSubscriberProfileID = RMmCustomAPI::KProfileIdentityFour; |
|
2037 break; |
|
2038 |
|
2039 } |
|
2040 CMmDataPackage dataPackage; |
|
2041 dataPackage.PackData(&data); |
|
2042 |
|
2043 // Now complete the actual get request |
|
2044 iMessageManagerCallback.Complete(ECustomGetIccCallForwardingStatusIPC, &dataPackage, aError); |
|
2045 |
|
2046 } // CCallControlDispatcher::CallbackGetCallForwardingIndicator |
|
2047 |
|
2048 |
|
2049 void CCallControlDispatcher::CallbackQueryIsEmergencyNumber( |
|
2050 CRequestQueueOneShot::TIpcDataPackage* aDataPackage) |
|
2051 /** |
|
2052 * Callback function to be used by the request to complete |
|
2053 * MLtsyDispatchCallControlQueryIsEmergencyNumber::HandleQueryIsEmergencyNumberSyncL. |
|
2054 * |
|
2055 * @param aDataPackage Structure encapulsating data about the request. |
|
2056 */ |
|
2057 { |
|
2058 TSYLOGENTRYEXITARGS(_L8("iResultCode=%d"), aDataPackage->iResultCode); |
|
2059 |
|
2060 if (!aDataPackage->iCleanupOnly) |
|
2061 { |
|
2062 RMmCustomAPI::TMobileTelNumber* numberPtr = NULL; |
|
2063 if (iQueryEmergencyNumber.Length() > 0) |
|
2064 { |
|
2065 numberPtr = &iQueryEmergencyNumber; |
|
2066 } |
|
2067 |
|
2068 CMmDataPackage mmDataPackage; |
|
2069 mmDataPackage.PackData(&numberPtr); |
|
2070 |
|
2071 iMessageManagerCallback.Complete(ECustomCheckEmergencyNumberIPC, &mmDataPackage, aDataPackage->iResultCode); |
|
2072 |
|
2073 iQueryEmergencyNumber.Zero(); |
|
2074 } |
|
2075 |
|
2076 delete aDataPackage; |
|
2077 } // CCallControlDispatcher::CallbackQueryIsEmergencyNumber |
|
2078 |
|
2079 void CCallControlDispatcher::CallbackUpdateLifeTimer(TInt aError) |
|
2080 /** |
|
2081 * Callback function to be used by the request to complete |
|
2082 * MLtsyDispatchCallControlUpdateLifeTimer::HandleUpdateLifeTimerReqL. |
|
2083 * |
|
2084 * @param aError The error code to be returned to the CTSY |
|
2085 */ |
|
2086 { |
|
2087 TSYLOGENTRYEXITARGS(_L8("aError=%d"), aError); |
|
2088 |
|
2089 iMessageManagerCallback.Complete(ECtsyUpdateLifeTimeComp, aError); |
|
2090 |
|
2091 } // CCallControlDispatcher::CallbackUpdateLifeTimer |
|
2092 |
|
2093 TInt CCallControlDispatcher::DoDispatchDialL(const CMmDataPackage* aDataPackage, |
|
2094 TBool aIsIsvCall, TBool aPerformFdnCheck) |
|
2095 { |
|
2096 TSYLOGENTRYEXITARGS(_L8("aIsIsvCall=%d,aPerformFdnCheck=%d"), aIsIsvCall, aPerformFdnCheck); |
|
2097 |
|
2098 TInt ret = KErrNotSupported; |
|
2099 |
|
2100 iFdnCheckPerformed = aPerformFdnCheck; |
|
2101 |
|
2102 TInt callId; |
|
2103 RMobilePhone::TMobileService mode; |
|
2104 const CCallDataPackage* callDataPackage = static_cast<const CCallDataPackage*>(aDataPackage); |
|
2105 callDataPackage->GetCallIdAndMode(callId, mode); |
|
2106 |
|
2107 iModeUsedForVoiceCallDial = mode; |
|
2108 |
|
2109 RMobileCall::TMobileCallInfoV1* callInfo; |
|
2110 RMobileCall::TMobileCallParamsV1Pckg* callParamsPckg; |
|
2111 aDataPackage->UnPackData(&callParamsPckg, &callInfo); |
|
2112 |
|
2113 __ASSERT_DEBUG(iDispatcherHolder, CtsyDispatcherPanic(EInvalidNullPtr)); |
|
2114 |
|
2115 RMobileCall::TCallParamOrigin callOrigin; |
|
2116 |
|
2117 CSatDispatcher& satDispatcher = iDispatcherHolder->GetSatDispatcher(); |
|
2118 if (satDispatcher.IsSimOriginatedCall(callInfo->iDialledParty)) |
|
2119 { |
|
2120 callOrigin = RMobileCall::EOriginatorSIM; |
|
2121 } |
|
2122 else |
|
2123 { |
|
2124 callOrigin = RMobileCall::EOriginatorEtelClient; |
|
2125 } |
|
2126 |
|
2127 // Call Handle... method in Licensee LTSY |
|
2128 if (mode == RMobilePhone::EVoiceService && |
|
2129 iLtsyDispatchCallControlDialVoice) |
|
2130 { |
|
2131 if (!aIsIsvCall) |
|
2132 { |
|
2133 ret = iLtsyDispatchCallControlDialVoice->HandleDialVoiceReqL( |
|
2134 RMobilePhone::EAlternateLinePrimary, callInfo->iDialledParty, |
|
2135 ((*callParamsPckg)()), aIsIsvCall, callOrigin, aPerformFdnCheck); |
|
2136 } |
|
2137 else |
|
2138 { |
|
2139 aDataPackage->UnPackData(&callParamsPckg, &callInfo); |
|
2140 |
|
2141 RMobileCall::TEtel3rdPartyMobileCallParamsV1Pckg* callParams3rdPartyPckg = |
|
2142 reinterpret_cast<RMobileCall::TEtel3rdPartyMobileCallParamsV1Pckg*>(callParamsPckg); |
|
2143 RMobileCall::TEtel3rdPartyMobileCallParamsV1* callParams3rdParty = &((*callParams3rdPartyPckg)()); |
|
2144 |
|
2145 RMobileCall::TMobileCallParamsV1 newCallParamsV1; |
|
2146 RMobileCall::TMobileCallParamsV1Pckg newCallParamsV1Pckg(newCallParamsV1); |
|
2147 |
|
2148 // Pack params from 3rd party to V1 |
|
2149 newCallParamsV1.iAutoRedial = callParams3rdParty->iAutoRedial; |
|
2150 newCallParamsV1.iIdRestrict = callParams3rdParty->iIdRestrict; |
|
2151 |
|
2152 ret = iLtsyDispatchCallControlDialVoice->HandleDialVoiceReqL( |
|
2153 RMobilePhone::EAlternateLinePrimary, callInfo->iDialledParty, |
|
2154 newCallParamsV1, aIsIsvCall, callOrigin, aPerformFdnCheck); |
|
2155 |
|
2156 } |
|
2157 } |
|
2158 else if (mode == RMobilePhone::EAuxVoiceService && |
|
2159 iLtsyDispatchCallControlDialVoice) |
|
2160 { |
|
2161 ret = iLtsyDispatchCallControlDialVoice->HandleDialVoiceReqL( |
|
2162 RMobilePhone::EAlternateLineAuxiliary, callInfo->iDialledParty, |
|
2163 ((*callParamsPckg)()), aIsIsvCall, callOrigin, aPerformFdnCheck); |
|
2164 |
|
2165 } |
|
2166 else if (mode == RMobilePhone::ECircuitDataService && |
|
2167 iLtsyDispatchCallControlDialData) |
|
2168 { |
|
2169 RMobileCall::TMobileCallInfoV1* callInfo; |
|
2170 RMobileCall::TMobileDataCallParamsV1Pckg* callParamsPckg; |
|
2171 aDataPackage->UnPackData(&callParamsPckg, &callInfo); |
|
2172 |
|
2173 ret = iLtsyDispatchCallControlDialData->HandleDialDataReqL( |
|
2174 callInfo->iDialledParty, ((*callParamsPckg)()), aPerformFdnCheck); |
|
2175 } |
|
2176 else |
|
2177 { |
|
2178 CtsyDispatcherPanic(EInvalidParameter); |
|
2179 } |
|
2180 |
|
2181 return TSYLOGSETEXITERR(ret); |
|
2182 } // CCallControlDispatcher::DoDispatchDialL |
|
2183 |
|
2184 TInt CCallControlDispatcher::DoDispatchAnswerL( |
|
2185 const CMmDataPackage* aDataPackage, TBool aIsIsvRequest) |
|
2186 { |
|
2187 TSYLOGENTRYEXIT; |
|
2188 |
|
2189 TInt ret = KErrNotSupported; |
|
2190 |
|
2191 if (iLtsyDispatchCallControlAnswer) |
|
2192 { |
|
2193 const CCallDataPackage* dataPackage = static_cast<const CCallDataPackage*>(aDataPackage); |
|
2194 TInt callId; |
|
2195 RMobilePhone::TMobileService mode; |
|
2196 dataPackage->GetCallIdAndMode(callId, mode); |
|
2197 |
|
2198 ret = iLtsyDispatchCallControlAnswer->HandleAnswerReqL(callId, aIsIsvRequest); |
|
2199 } |
|
2200 |
|
2201 return TSYLOGSETEXITERR(ret); |
|
2202 } // CCallControlDispatcher::DoDispatchAnswerL |
|
2203 |
|
2204 void CCallControlDispatcher::DoCallbackDial(TInt aError, TInt aCallId, |
|
2205 RMobilePhone::TMobileService aMode) |
|
2206 { |
|
2207 TSYLOGENTRYEXIT; |
|
2208 |
|
2209 RMobileCall::TMobileCallInfoV1 callInfo; |
|
2210 callInfo.iService = aMode; |
|
2211 CCallDataPackage dataPackage; |
|
2212 |
|
2213 if (aError == KErrNone) |
|
2214 { |
|
2215 // CTSY expects completion of EMobileCallGetMobileCallInfo when a |
|
2216 // dial is requested to get the call ID in the CTSY call object to be set |
|
2217 // correctly. |
|
2218 dataPackage.SetCallIdAndMode(aCallId, callInfo.iService); |
|
2219 dataPackage.PackData(&callInfo); |
|
2220 iMessageManagerCallback.Complete(EMobileCallGetMobileCallInfo, &dataPackage, aError); |
|
2221 } |
|
2222 else |
|
2223 { |
|
2224 dataPackage.SetCallIdAndMode(0, callInfo.iService); |
|
2225 dataPackage.PackData(&callInfo); |
|
2226 |
|
2227 // CTSY only expects EEtelCallDial IPC on a failure to dial |
|
2228 if (iFdnCheckPerformed) |
|
2229 { |
|
2230 iMessageManagerCallback.Complete(EEtelCallDial, &dataPackage, aError); |
|
2231 } |
|
2232 else |
|
2233 { |
|
2234 iMessageManagerCallback.Complete(EMobileCallDialNoFdnCheck, &dataPackage, aError); |
|
2235 } |
|
2236 } |
|
2237 |
|
2238 } // CCallControlDispatcher::DoCallbackDial |
|
2239 |
|
2240 void CCallControlDispatcher::CallbackNotifyIccCallForwardingStatusChange(TInt aError, |
|
2241 const RMobilePhone::TMobileAddress& aCallForwardingNo, |
|
2242 RMobilePhone::TCFUIndicatorStatusFlags aCallForwardingStatusFlags, |
|
2243 RMmCustomAPI::TMultipleSubscriberProfileID aMultipleSubscriberProfileId |
|
2244 ) |
|
2245 /** |
|
2246 * Callback function to be used by the request to complete |
|
2247 * CCtsyDispatcherCallback::CallbackCallControlNotifyIccCallForwardingStatusChangeInd(). |
|
2248 * |
|
2249 * @param aError The error code to be returned to the CTSY Dispatcher. |
|
2250 * @param aCallForwardingNo the number that is being forwarded. |
|
2251 * @param aCallForwardingStatusFlags flags defined in RMobilePhone::TCFUIndicatorStatus. |
|
2252 * @param aMultipleSubscriberProfileId the Profile ID, in the case of Multiple Subscribers (SIM). |
|
2253 */ |
|
2254 { |
|
2255 TSYLOGENTRYEXITARGS(_L8("aError=%d"), aError); |
|
2256 // Pack the data to return to the Common TSY |
|
2257 RMmCustomAPI::TCFIndicators callForwardingIndicator; |
|
2258 callForwardingIndicator.iCFNumber = aCallForwardingNo; |
|
2259 callForwardingIndicator.iIndicator = aCallForwardingStatusFlags; |
|
2260 callForwardingIndicator.iMultipleSubscriberProfileID = aMultipleSubscriberProfileId; |
|
2261 |
|
2262 CMmDataPackage dataPackage; |
|
2263 dataPackage.PackData(const_cast<RMmCustomAPI::TCFIndicators*>(&callForwardingIndicator)); |
|
2264 |
|
2265 iMessageManagerCallback.Complete(ECustomNotifyIccCallForwardingStatusChangeIPC, &dataPackage, aError); |
|
2266 |
|
2267 } // CSimDispatcher::CallbackNotifyIccCallForwardingStatusChange |
|
2268 |
|
2269 void CCallControlDispatcher::CallbackSync(CRequestQueueOneShot::TIpcDataPackage& aIpcDataPackage) |
|
2270 /** |
|
2271 * Part of the MDispatcherCallback interface. Used to complete requests handled |
|
2272 * synchronously by the Licensee LTSY asynchronously back to the Common TSY. |
|
2273 * |
|
2274 * @param aIpcDataPackage Package encapsulating the request. |
|
2275 * |
|
2276 * @see MDispatcherCallback::CallbackSync() |
|
2277 */ |
|
2278 { |
|
2279 TSYLOGENTRYEXIT; |
|
2280 |
|
2281 switch (aIpcDataPackage.iIpc) |
|
2282 { |
|
2283 case ECustomCheckEmergencyNumberIPC: |
|
2284 CallbackQueryIsEmergencyNumber(&aIpcDataPackage); |
|
2285 break; |
|
2286 default: |
|
2287 LOG(_L8("WARNING: CCallControlDispatcher::CallbackSync unhandled IPC=%d"), aIpcDataPackage.iIpc); |
|
2288 __ASSERT_DEBUG(NULL, CtsyDispatcherPanic(EUnhandledCtsyIpc)); |
|
2289 break; |
|
2290 } // switch (aIpcDataPackage.iIpc) |
|
2291 |
|
2292 } // CCallControlDispatcher::CallbackSync |
|
2293 |