|
1 // Copyright (c) 1997-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 "mmtsy.h" |
|
17 #include "testdef.h" |
|
18 #include "ETELMM.H" |
|
19 #include <et_clsvr.h> |
|
20 #include "Dmmlog.h" |
|
21 |
|
22 //#define ASYNC_TIMEOUT 300000 // 0.3s |
|
23 |
|
24 // |
|
25 // CCallDMmTsy |
|
26 // |
|
27 CCallDMmTsy* CCallDMmTsy::NewL(CPhoneDMmTsy *aPhone, CPhoneFactoryDummyBase* aFac) |
|
28 { |
|
29 CCallDMmTsy* call=new(ELeave) CCallDMmTsy(aPhone,aFac); |
|
30 CleanupStack::PushL(call); |
|
31 call->ConstructL(); |
|
32 CleanupStack::Pop(); |
|
33 return call; |
|
34 } |
|
35 |
|
36 CCallDMmTsy::CCallDMmTsy(CPhoneDMmTsy *aPhone, CPhoneFactoryDummyBase* aFac) |
|
37 :CCallDummyBase(aFac), iPhone(aPhone) |
|
38 {} |
|
39 |
|
40 void CCallDMmTsy::ConstructL() |
|
41 { |
|
42 CCallDummyBase::ConstructL(); |
|
43 LOGTEXT(_L8("CCallDMmTsy created")); |
|
44 } |
|
45 |
|
46 CCallDMmTsy::~CCallDMmTsy() |
|
47 { |
|
48 LOGTEXT(_L8("CCallDMmTsy destroyed")); |
|
49 } |
|
50 |
|
51 CTelObject* CCallDMmTsy::OpenNewObjectByNameL(const TDesC& aName) |
|
52 { |
|
53 // only fax objects can be opened from call objects |
|
54 if (aName.Compare(_L("FAX"))==KErrNone) |
|
55 return REINTERPRET_CAST(CTelObject*, CFaxDMmTsy::NewL(FacPtr())); |
|
56 else |
|
57 return NULL; |
|
58 } |
|
59 |
|
60 CTelObject* CCallDMmTsy::OpenNewObjectL(TDes& /*aNewName*/) |
|
61 { |
|
62 // opening fax without a name is not supported |
|
63 User::Leave(KErrNotSupported); |
|
64 return NULL; |
|
65 } |
|
66 |
|
67 CTelObject::TReqMode CCallDMmTsy::ReqModeL(const TInt aIpc) |
|
68 { |
|
69 // ReqModeL is called from the server's CTelObject::ReqAnalyserL |
|
70 // in order to check the type of request it has |
|
71 |
|
72 // The following are example request types for this dummy TSY |
|
73 // All TSYs do not have to have these request types but they have been given |
|
74 // "sensible" values in this test code |
|
75 |
|
76 CTelObject::TReqMode ret=0; |
|
77 switch (aIpc) |
|
78 { |
|
79 // |
|
80 // No Flow Control NOR Multiple Completion |
|
81 // |
|
82 case EMobileCallGetMobileCallCaps: |
|
83 case EMobileCallGetMobileCallStatus: |
|
84 case EMobileCallGetMobileCallInfo: |
|
85 case EMobileCallGetMobileDataCallCaps: |
|
86 case EMobileCallGetMobileDataCallRLPRange: |
|
87 case EMobileCallSetDynamicHscsdParams: |
|
88 case EMobileCallGetCurrentHscsdInfo: |
|
89 case EMobileCallSwitchAlternatingCall: |
|
90 case EMobileCallDeflect: |
|
91 case EMobileCallTransfer: |
|
92 case EMobileCallGoOneToOne: |
|
93 case EMobileCallActivateCCBS: |
|
94 case EMobileCallRejectCCBS: |
|
95 case EMobileCallSetPrivacy: |
|
96 case EMobileCallSetTrafficChannel: |
|
97 case EMobileCallNotifyTrafficChannelConfirmation: |
|
98 case EMobileCallGetUUSCaps: |
|
99 case EMobileCallActivateUUS: |
|
100 case EMobileCallSendUUI: |
|
101 case EMobileCallReceiveUUI: |
|
102 case EMobileCallHangupWithUUI: |
|
103 case EMobileCallAnswerWithUUI: |
|
104 case EMobileCallAnswerMultimediaCallAsVoice: |
|
105 case EMobileCallAnswerISV: |
|
106 break; |
|
107 // |
|
108 // Flow Controlled Services |
|
109 // |
|
110 case EMobileCallHold: |
|
111 case EMobileCallResume: |
|
112 case EMobileCallSwap: |
|
113 case EMobileCallDialEmergencyCall: |
|
114 case EMobileCallDialNoFdnCheck: |
|
115 case EMobileCallDialISV: |
|
116 case EMobileCallDialCallControl: |
|
117 ret=KReqModeFlowControlObeyed; |
|
118 break; |
|
119 |
|
120 // |
|
121 // Multiple Completion Services with Immediate Server Repost |
|
122 // (Usually Notifications) |
|
123 // |
|
124 case EMobileCallNotifyMobileCallStatusChange: |
|
125 case EMobileCallNotifyMobileCallCapsChange: |
|
126 case EMobileCallNotifyCallEvent: |
|
127 case EMobileCallNotifyRemotePartyInfoChange: |
|
128 case EMobileCallNotifyMobileDataCallCapsChange: |
|
129 case EMobileCallNotifyHscsdInfoChange: |
|
130 case EMobileCallNotifyVoiceFallback: |
|
131 case EMobileCallNotifyAlternatingCallSwitch: |
|
132 case EMobileCallNotifyPrivacyConfirmation: |
|
133 case EMobileCallNotifyUUSCapsChange: |
|
134 case EMobileCallNotifyAudioToneEvent: |
|
135 ret=KReqModeMultipleCompletionEnabled | KReqModeRePostImmediately; |
|
136 break; |
|
137 // |
|
138 // Not Supported |
|
139 // |
|
140 case EMobileCallNotifyMobileCallStatusChangeCancel: |
|
141 case EMobileCallHoldCancel: |
|
142 case EMobileCallResumeCancel: |
|
143 case EMobileCallSwapCancel: |
|
144 case EMobileCallNotifyMobileCallCapsChangeCancel: |
|
145 case EMobileCallNotifyCallEventCancel: |
|
146 case EMobileCallDialEmergencyCallCancel: |
|
147 case EMobileCallGetMobileCallInfoCancel: |
|
148 case EMobileCallNotifyRemotePartyInfoChangeCancel: |
|
149 case EMobileCallNotifyMobileDataCallCapsChangeCancel: |
|
150 case EMobileCallGetMobileDataCallRLPRangeCancel: |
|
151 case EMobileCallSetDynamicHscsdParamsCancel: |
|
152 case EMobileCallSwitchAlternatingCallCancel: |
|
153 case EMobileCallActivateCCBSCancel: |
|
154 case EMobileCallNotifyPrivacyConfirmationCancel: |
|
155 case EMobileCallNotifyTrafficChannelConfirmationCancel: |
|
156 case EMobileCallNotifyVoiceFallbackCancel: |
|
157 case EMobileCallNotifyUUSCapsChangeCancel: |
|
158 case EMobileCallActivateUUSCancel: |
|
159 case EMobileCallSendUUICancel: |
|
160 case EMobileCallReceiveUUICancel: |
|
161 case EMobileCallHangupWithUUICancel: |
|
162 case EMobileCallAnswerWithUUICancel: |
|
163 case EMobileCallDialNoFdnCheckCancel: |
|
164 case EMobileCallDialCallControlCancel: |
|
165 case EMobileCallAnswerMultimediaCallAsVoiceCancel: |
|
166 case EMobileCallNotifyAudioToneEventCancel: |
|
167 case EMobileCallDialISVCancel: |
|
168 case EMobileCallAnswerISVCancel: |
|
169 User::Leave(KErrNotSupported); |
|
170 break; |
|
171 |
|
172 default: |
|
173 ret=CCallBase::ReqModeL(aIpc); |
|
174 break; |
|
175 } |
|
176 return ret; |
|
177 } |
|
178 |
|
179 |
|
180 TInt CCallDMmTsy::RegisterNotification(const TInt aIpc) |
|
181 { |
|
182 // RegisterNotification is called when the server recognises that this notification |
|
183 // is being posted for the first time on this sub-session object. |
|
184 |
|
185 // It enables the TSY to "turn on" any regular notification messages that it may |
|
186 // receive from the phone |
|
187 |
|
188 switch (aIpc) |
|
189 { |
|
190 case EMobileCallNotifyMobileCallStatusChange: |
|
191 LOGTEXT(_L8("CCallDMmTsy: RegisterNotification - Call Status Change ")); |
|
192 return KErrNone; |
|
193 case EMobileCallNotifyMobileCallCapsChange: |
|
194 LOGTEXT(_L8("CCallDMmTsy: RegisterNotification - Call Control Caps Change ")); |
|
195 return KErrNone; |
|
196 case EMobileCallNotifyCallEvent: |
|
197 LOGTEXT(_L8("CCallDMmTsy: RegisterNotification - Call Event ")); |
|
198 return KErrNone; |
|
199 case EMobileCallNotifyRemotePartyInfoChange: |
|
200 LOGTEXT(_L8("CCallDMmTsy: RegisterNotification - Remote Party Info Change ")); |
|
201 return KErrNone; |
|
202 case EMobileCallNotifyMobileDataCallCapsChange: |
|
203 LOGTEXT(_L8("CCallDMmTsy: RegisterNotification - Data Call Caps Change ")); |
|
204 return KErrNone; |
|
205 case EMobileCallNotifyHscsdInfoChange: |
|
206 LOGTEXT(_L8("CCallDMmTsy: RegisterNotification - Notify Hscsd Info Change ")); |
|
207 return KErrNone; |
|
208 case EMobileCallNotifyVoiceFallback: |
|
209 LOGTEXT(_L8("CCallDMmTsy: RegisterNotification - Notify Voice Fallback ")); |
|
210 return KErrNone; |
|
211 case EMobileCallNotifyAlternatingCallSwitch: |
|
212 LOGTEXT(_L8("CCallDMmTsy: RegisterNotification - Notify Alternating Call Switch ")); |
|
213 return KErrNone; |
|
214 case EMobileCallNotifyPrivacyConfirmation: |
|
215 LOGTEXT(_L8("CCallDMmTsy: RegisterNotification - Notify Privacy Confirmation ")); |
|
216 return KErrNone; |
|
217 case EMobileCallNotifyTrafficChannelConfirmation: |
|
218 LOGTEXT(_L8("CCallDMmTsy: RegisterNotification - Notify Traffic Channel Confirmation ")); |
|
219 return KErrNone; |
|
220 case EMobileCallNotifyUUSCapsChange: |
|
221 LOGTEXT(_L8("CCallDMmTsy: RegisterNotification - Notify UUS Caps Change ")); |
|
222 return KErrNone; |
|
223 case EMobileCallNotifyAudioToneEvent: |
|
224 LOGTEXT(_L8("CCallDMmTsy: RegisterNotification - Notify Audio Tone Event ")); |
|
225 return KErrNone; |
|
226 default: |
|
227 // Unknown or invalid IPC |
|
228 LOGTEXT(_L8("CCallDMmTsy: Register error, unknown IPC")); |
|
229 return KErrNotSupported; |
|
230 } |
|
231 } |
|
232 |
|
233 TInt CCallDMmTsy::DeregisterNotification(const TInt aIpc) |
|
234 { |
|
235 // DeregisterNotification is called when the server recognises that this notification |
|
236 // will not be posted again because the last client to have a handle on this sub-session |
|
237 // object has just closed the handle. |
|
238 |
|
239 // It enables the TSY to "turn off" any regular notification messages that it may |
|
240 // receive from the phone |
|
241 |
|
242 switch (aIpc) |
|
243 { |
|
244 case EMobileCallNotifyMobileCallStatusChange: |
|
245 LOGTEXT(_L8("CCallDMmTsy: DeregisterNotification - Call Status Change ")); |
|
246 return KErrNone; |
|
247 case EMobileCallNotifyMobileCallCapsChange: |
|
248 LOGTEXT(_L8("CCallDMmTsy: DeregisterNotification - Call Control Caps Change ")); |
|
249 return KErrNone; |
|
250 case EMobileCallNotifyCallEvent: |
|
251 LOGTEXT(_L8("CCallDMmTsy: DeregisterNotification - Call Event ")); |
|
252 return KErrNone; |
|
253 case EMobileCallNotifyRemotePartyInfoChange: |
|
254 LOGTEXT(_L8("CCallDMmTsy: DeregisterNotification - Remote Party Info Change ")); |
|
255 return KErrNone; |
|
256 case EMobileCallNotifyMobileDataCallCapsChange: |
|
257 LOGTEXT(_L8("CCallDMmTsy: DeregisterNotification - Data Call Caps Change ")); |
|
258 return KErrNone; |
|
259 case EMobileCallNotifyHscsdInfoChange: |
|
260 LOGTEXT(_L8("CCallDMmTsy: DeregisterNotification - Notify Hscsd Info Change ")); |
|
261 return KErrNone; |
|
262 case EMobileCallNotifyVoiceFallback: |
|
263 LOGTEXT(_L8("CCallDMmTsy: DeregisterNotification - Notify Voice Fallback ")); |
|
264 return KErrNone; |
|
265 case EMobileCallNotifyAlternatingCallSwitch: |
|
266 LOGTEXT(_L8("CCallDMmTsy: DeregisterNotification - Notify Alternating Call Switch ")); |
|
267 return KErrNone; |
|
268 case EMobileCallNotifyPrivacyConfirmation: |
|
269 LOGTEXT(_L8("CCallDMmTsy: DeregisterNotification - Notify Privacy Confirmation ")); |
|
270 return KErrNone; |
|
271 case EMobileCallNotifyTrafficChannelConfirmation: |
|
272 LOGTEXT(_L8("CCallDMmTsy: DeregisterNotification - Notify Traffic Channel Confirmation ")); |
|
273 return KErrNone; |
|
274 case EMobileCallNotifyUUSCapsChange: |
|
275 LOGTEXT(_L8("CCallDMmTsy: DeregisterNotification - Notify UUS Caps Change ")); |
|
276 return KErrNone; |
|
277 case EMobileCallNotifyAudioToneEvent: |
|
278 LOGTEXT(_L8("CCallDMmTsy: DeregisterNotification - Notify Audio Tone Event ")); |
|
279 return KErrNone; |
|
280 default: |
|
281 // Unknown or invalid IPC |
|
282 LOGTEXT(_L8("CCallDMmTsy: Deregister error, unknown IPC")); |
|
283 return KErrNotSupported; |
|
284 } |
|
285 } |
|
286 |
|
287 TInt CCallDMmTsy::NumberOfSlotsL(const TInt aIpc) |
|
288 { |
|
289 // NumberOfSlotsL is called by the server when it is registering a new notification |
|
290 // It enables the TSY to tell the server how many buffer slots to allocate for |
|
291 // "repost immediately" notifications that may trigger before clients collect them |
|
292 |
|
293 TInt numberOfSlots=1; |
|
294 switch (aIpc) |
|
295 { |
|
296 case EMobileCallNotifyMobileCallStatusChange: |
|
297 case EMobileCallNotifyMobileCallCapsChange: |
|
298 case EMobileCallNotifyCallEvent: |
|
299 case EMobileCallNotifyMobileDataCallCapsChange: |
|
300 case EMobileCallNotifyHscsdInfoChange: |
|
301 case EMobileCallNotifyVoiceFallback: |
|
302 case EMobileCallNotifyAlternatingCallSwitch: |
|
303 case EMobileCallNotifyPrivacyConfirmation: |
|
304 case EMobileCallNotifyTrafficChannelConfirmation: |
|
305 case EMobileCallNotifyUUSCapsChange: |
|
306 case EMobileCallNotifyAudioToneEvent: |
|
307 LOGTEXT(_L8("CCallDMmTsy: Registered with 5 slots")); |
|
308 numberOfSlots=5; |
|
309 break; |
|
310 case EMobileCallNotifyRemotePartyInfoChange: |
|
311 |
|
312 LOGTEXT(_L8("CCallDMmTsy: Registered with 1 slot")); |
|
313 break; |
|
314 default: |
|
315 // Unknown or invalid Phone IPC |
|
316 LOGTEXT(_L8("CCallDMmTsy: Number of Slots error, unknown IPC")); |
|
317 User::Leave(KErrNotSupported); |
|
318 break; |
|
319 } |
|
320 return numberOfSlots; |
|
321 } |
|
322 |
|
323 |
|
324 TInt CCallDMmTsy::ExtFunc(const TTsyReqHandle aTsyReqHandle,const TInt aIpc, |
|
325 const TDataPackage& aPackage) |
|
326 { |
|
327 // ExtFunc is called by the server when it has a "extended", i.e. non-core ETel request |
|
328 // for the TSY to process |
|
329 // A request handle, request type and request data are passed to the TSY |
|
330 |
|
331 TAny* dataPtr=aPackage.Ptr1(); |
|
332 TAny* dataPtr2=aPackage.Ptr2(); |
|
333 |
|
334 // The request data has to extracted from TDataPackage and the TAny* pointers have to |
|
335 // be "cast" to the expected request data type |
|
336 |
|
337 switch (aIpc) |
|
338 { |
|
339 // |
|
340 // No Flow Control NOR Multiple Completion |
|
341 // |
|
342 case EMobileCallGetMobileCallCaps: |
|
343 return GetMobileCallCaps(aTsyReqHandle, aPackage.Des1n()); |
|
344 |
|
345 case EMobileCallGetMobileCallStatus: |
|
346 return GetMobileCallStatus(aTsyReqHandle, |
|
347 REINTERPRET_CAST(RMobileCall::TMobileCallStatus*,dataPtr)); |
|
348 |
|
349 case EMobileCallGetMobileCallInfo: |
|
350 return GetMobileCallInfo(aTsyReqHandle, aPackage.Des1n()); |
|
351 |
|
352 case EMobileCallGetMobileDataCallCaps: |
|
353 return GetMobileDataCallCaps(aTsyReqHandle, aPackage.Des1n()); |
|
354 |
|
355 case EMobileCallGetMobileDataCallRLPRange: |
|
356 return GetMobileDataCallRLPRange(aTsyReqHandle, |
|
357 REINTERPRET_CAST(TInt *, dataPtr), |
|
358 aPackage.Des2n()); |
|
359 |
|
360 case EMobileCallSetDynamicHscsdParams: |
|
361 return SetDynamicHscsdParams(aTsyReqHandle, |
|
362 REINTERPRET_CAST(TInt*,dataPtr), |
|
363 REINTERPRET_CAST(TInt*,dataPtr2)); |
|
364 |
|
365 case EMobileCallGetCurrentHscsdInfo: |
|
366 return GetCurrentHscsdInfo(aTsyReqHandle,aPackage.Des1n()); |
|
367 |
|
368 case EMobileCallSwitchAlternatingCall: |
|
369 return SwitchAlternatingCall(aTsyReqHandle); |
|
370 |
|
371 case EMobileCallDeflect: |
|
372 return Deflect(aTsyReqHandle, |
|
373 REINTERPRET_CAST(RMobileCall::TMobileCallDeflect*, dataPtr), |
|
374 REINTERPRET_CAST(RMobilePhone::TMobileAddress*, dataPtr2)); |
|
375 |
|
376 case EMobileCallTransfer: |
|
377 return Transfer(aTsyReqHandle); |
|
378 |
|
379 case EMobileCallGoOneToOne: |
|
380 return GoOneToOne(aTsyReqHandle); |
|
381 |
|
382 case EMobileCallActivateCCBS: |
|
383 return ActivateCCBS(aTsyReqHandle, |
|
384 REINTERPRET_CAST(TInt*, dataPtr)); |
|
385 |
|
386 case EMobileCallRejectCCBS: |
|
387 return RejectCCBS(aTsyReqHandle); |
|
388 |
|
389 case EMobileCallSetPrivacy: |
|
390 return SetPrivacySetting(aTsyReqHandle, |
|
391 REINTERPRET_CAST(RMobilePhone::TMobilePhonePrivacy*, dataPtr)); |
|
392 |
|
393 case EMobileCallNotifyPrivacyConfirmation: |
|
394 return NotifyPrivacyConfirmation(aTsyReqHandle, |
|
395 REINTERPRET_CAST(RMobilePhone::TMobilePhonePrivacy*, dataPtr)); |
|
396 |
|
397 case EMobileCallSetTrafficChannel: |
|
398 return SetTrafficChannel(aTsyReqHandle, |
|
399 REINTERPRET_CAST(RMobileCall::TMobileCallTch*, dataPtr)); |
|
400 |
|
401 case EMobileCallNotifyTrafficChannelConfirmation: |
|
402 return NotifyTrafficChannelConfirmation(aTsyReqHandle, |
|
403 REINTERPRET_CAST(RMobileCall::TMobileCallTch*,dataPtr)); |
|
404 |
|
405 case EMobileCallGetUUSCaps: |
|
406 return GetUUSCaps(aTsyReqHandle, |
|
407 REINTERPRET_CAST(TUint32*,dataPtr)); |
|
408 |
|
409 case EMobileCallActivateUUS: |
|
410 return ActivateUUS(aTsyReqHandle, aPackage.Des1n()); |
|
411 |
|
412 case EMobileCallSendUUI: |
|
413 return SendUUI(aTsyReqHandle, |
|
414 REINTERPRET_CAST(TInt*,dataPtr), aPackage.Des2u()); |
|
415 |
|
416 case EMobileCallReceiveUUI: |
|
417 return ReceiveUUI(aTsyReqHandle, aPackage.Des1u()); |
|
418 |
|
419 case EMobileCallHangupWithUUI: |
|
420 return HangupWithUUI(aTsyReqHandle, aPackage.Des1u()); |
|
421 |
|
422 case EMobileCallAnswerWithUUI: |
|
423 return AnswerIncomingCallWithUUI(aTsyReqHandle, aPackage.Des1n(), aPackage.Des2u()); |
|
424 |
|
425 case EMobileCallAnswerMultimediaCallAsVoice: |
|
426 return AnswerMultimediaCallAsVoice(aTsyReqHandle, |
|
427 aPackage.Des1n(), aPackage.Des2u()); |
|
428 |
|
429 case EMobileCallAnswerISV: |
|
430 return AnswerIncomingCallISV(aTsyReqHandle, aPackage.Des1n()); |
|
431 |
|
432 // |
|
433 // Flow Controlled Services |
|
434 // |
|
435 case EMobileCallHold: |
|
436 return Hold(aTsyReqHandle); |
|
437 |
|
438 case EMobileCallResume: |
|
439 return Resume(aTsyReqHandle); |
|
440 |
|
441 case EMobileCallSwap: |
|
442 return Swap(aTsyReqHandle); |
|
443 |
|
444 case EMobileCallDialEmergencyCall: |
|
445 return DialEmergencyCall(aTsyReqHandle, aPackage.Des1u()); |
|
446 |
|
447 case EMobileCallDialNoFdnCheck: |
|
448 return DialNoFdnCheck(aTsyReqHandle, aPackage.Des1n(), aPackage.Des2u()); |
|
449 |
|
450 case EMobileCallDialISV: |
|
451 return DialISV(aTsyReqHandle, aPackage.Des1n(), aPackage.Des2u()); |
|
452 |
|
453 case EMobileCallDialCallControl: |
|
454 return DialCallControl(aTsyReqHandle, aPackage.Des1n(), aPackage.Des2u()); |
|
455 |
|
456 // |
|
457 // Multiple Completion Services with Immediate Server Repost |
|
458 // (Usually Notifications) |
|
459 // |
|
460 case EMobileCallNotifyMobileCallStatusChange: |
|
461 return NotifyMobileCallStatusChange(aTsyReqHandle, |
|
462 REINTERPRET_CAST(RMobileCall::TMobileCallStatus*, dataPtr)); |
|
463 |
|
464 case EMobileCallNotifyMobileCallCapsChange: |
|
465 return NotifyMobileCallCapsChange(aTsyReqHandle, aPackage.Des1n()); |
|
466 |
|
467 case EMobileCallNotifyCallEvent: |
|
468 return NotifyCallEvent(aTsyReqHandle, |
|
469 REINTERPRET_CAST(RMobileCall::TMobileCallEvent*, dataPtr)); |
|
470 |
|
471 case EMobileCallNotifyRemotePartyInfoChange: |
|
472 return NotifyRemotePartyInfoChange(aTsyReqHandle, aPackage.Des1n()); |
|
473 |
|
474 case EMobileCallNotifyMobileDataCallCapsChange: |
|
475 return NotifyMobileDataCallCapsChange(aTsyReqHandle, aPackage.Des1n()); |
|
476 |
|
477 case EMobileCallNotifyHscsdInfoChange: |
|
478 return NotifyHscsdInfoChange(aTsyReqHandle, aPackage.Des1n()); |
|
479 |
|
480 case EMobileCallNotifyVoiceFallback: |
|
481 return NotifyVoiceFallback(aTsyReqHandle, aPackage.Des1u()); |
|
482 |
|
483 case EMobileCallNotifyAlternatingCallSwitch: |
|
484 return NotifyAlternatingCallSwitch(aTsyReqHandle); |
|
485 |
|
486 case EMobileCallNotifyUUSCapsChange: |
|
487 return NotifyUUSCapsChange(aTsyReqHandle, |
|
488 REINTERPRET_CAST(TUint32*, dataPtr)); |
|
489 |
|
490 case EMobileCallNotifyAudioToneEvent: |
|
491 return NotifyAudioToneEvent(aTsyReqHandle, aPackage.Des1n()); |
|
492 // |
|
493 // Cancels |
|
494 // |
|
495 case EMobileCallNotifyMobileCallStatusChangeCancel: |
|
496 return NotifyMobileCallStatusChangeCancel(aTsyReqHandle); |
|
497 case EMobileCallHoldCancel: |
|
498 return HoldCancel(aTsyReqHandle); |
|
499 case EMobileCallGetMobileCallInfoCancel: |
|
500 return GetMobileCallInfoCancel(aTsyReqHandle); |
|
501 case EMobileCallResumeCancel: |
|
502 return ResumeCancel(aTsyReqHandle); |
|
503 case EMobileCallSwapCancel: |
|
504 return SwapCancel(aTsyReqHandle); |
|
505 case EMobileCallNotifyMobileCallCapsChangeCancel: |
|
506 return NotifyMobileCallCapsChangeCancel(aTsyReqHandle); |
|
507 case EMobileCallNotifyCallEventCancel: |
|
508 return NotifyCallEventCancel(aTsyReqHandle); |
|
509 case EMobileCallDialEmergencyCallCancel: |
|
510 return DialEmergencyCallCancel(aTsyReqHandle); |
|
511 case EMobileCallNotifyRemotePartyInfoChangeCancel: |
|
512 return NotifyRemotePartyInfoChangeCancel(aTsyReqHandle); |
|
513 case EMobileCallNotifyVoiceFallbackCancel: |
|
514 return NotifyVoiceFallbackCancel(aTsyReqHandle); |
|
515 case EMobileCallNotifyUUSCapsChangeCancel: |
|
516 return NotifyUUSCapsChangeCancel(aTsyReqHandle); |
|
517 case EMobileCallDialNoFdnCheckCancel: |
|
518 return DialNoFdnCheckCancel(aTsyReqHandle); |
|
519 case EMobileCallDialCallControlCancel: |
|
520 return DialCallControlCancel(aTsyReqHandle); |
|
521 case EMobileCallNotifyAudioToneEventCancel: |
|
522 return NotifyAudioToneEventCancel(aTsyReqHandle); |
|
523 case EMobileCallDialISVCancel: |
|
524 return DialISVCancel(aTsyReqHandle); |
|
525 case EMobileCallAnswerISVCancel: |
|
526 return AnswerIncomingCallISVCancel(aTsyReqHandle); |
|
527 default: |
|
528 return KErrNotSupported; |
|
529 } |
|
530 } |
|
531 |
|
532 TInt CCallDMmTsy::CancelService(const TInt aIpc, const TTsyReqHandle aTsyReqHandle) |
|
533 { |
|
534 // CancelService is called by the server when it is "cleaning-up" any still outstanding |
|
535 // asynchronous requests before closing a client's sub-session. |
|
536 // This will happen if a client closes its R-class handle without cancelling outstanding |
|
537 // asynchronous requests. |
|
538 |
|
539 switch (aIpc) |
|
540 { |
|
541 case EMobileCallNotifyMobileCallStatusChange: |
|
542 return NotifyMobileCallStatusChangeCancel(aTsyReqHandle); |
|
543 case EMobileCallHold: |
|
544 return HoldCancel(aTsyReqHandle); |
|
545 case EMobileCallGetMobileCallInfo: |
|
546 return GetMobileCallInfoCancel(aTsyReqHandle); |
|
547 case EMobileCallResume: |
|
548 return ResumeCancel(aTsyReqHandle); |
|
549 case EMobileCallSwap: |
|
550 return SwapCancel(aTsyReqHandle); |
|
551 case EMobileCallNotifyMobileCallCapsChange: |
|
552 return NotifyMobileCallCapsChangeCancel(aTsyReqHandle); |
|
553 case EMobileCallNotifyCallEvent: |
|
554 return NotifyCallEventCancel(aTsyReqHandle); |
|
555 case EMobileCallDialEmergencyCall: |
|
556 return DialEmergencyCallCancel(aTsyReqHandle); |
|
557 case EMobileCallNotifyRemotePartyInfoChange: |
|
558 return NotifyRemotePartyInfoChangeCancel(aTsyReqHandle); |
|
559 case EMobileCallNotifyMobileDataCallCapsChange: |
|
560 return NotifyMobileDataCallCapsChangeCancel(aTsyReqHandle); |
|
561 case EMobileCallGetMobileDataCallRLPRange: |
|
562 return GetMobileDataCallRLPRangeCancel(aTsyReqHandle); |
|
563 case EMobileCallSetDynamicHscsdParams: |
|
564 return SetDynamicHscsdParamsCancel(aTsyReqHandle); |
|
565 case EMobileCallNotifyHscsdInfoChange: |
|
566 return NotifyHscsdInfoChangeCancel(aTsyReqHandle); |
|
567 case EMobileCallNotifyVoiceFallback: |
|
568 return NotifyVoiceFallbackCancel(aTsyReqHandle); |
|
569 case EMobileCallNotifyAlternatingCallSwitch: |
|
570 return NotifyAlternatingCallSwitchCancel(aTsyReqHandle); |
|
571 case EMobileCallDeflect: |
|
572 return DeflectCancel(aTsyReqHandle); |
|
573 case EMobileCallTransfer: |
|
574 return TransferCancel(aTsyReqHandle); |
|
575 case EMobileCallGoOneToOne: |
|
576 return GoOneToOneCancel(aTsyReqHandle); |
|
577 case EMobileCallSwitchAlternatingCall: |
|
578 return SwitchAlternatingCallCancel(aTsyReqHandle); |
|
579 case EMobileCallActivateCCBS: |
|
580 return ActivateCCBSCancel(aTsyReqHandle); |
|
581 case EMobileCallNotifyPrivacyConfirmation: |
|
582 return NotifyPrivacyConfirmationCancel(aTsyReqHandle); |
|
583 case EMobileCallNotifyTrafficChannelConfirmation: |
|
584 return NotifyTrafficChannelConfirmationCancel(aTsyReqHandle); |
|
585 case EMobileCallNotifyUUSCapsChange: |
|
586 return NotifyUUSCapsChangeCancel(aTsyReqHandle); |
|
587 case EMobileCallActivateUUS: |
|
588 return ActivateUUSCancel(aTsyReqHandle); |
|
589 case EMobileCallSendUUI: |
|
590 return SendUUICancel(aTsyReqHandle); |
|
591 case EMobileCallReceiveUUI: |
|
592 return ReceiveUUICancel(aTsyReqHandle); |
|
593 case EMobileCallHangupWithUUI: |
|
594 return HangupWithUUICancel(aTsyReqHandle); |
|
595 case EMobileCallAnswerWithUUI: |
|
596 return AnswerIncomingCallWithUUICancel(aTsyReqHandle); |
|
597 case EMobileCallDialNoFdnCheck: |
|
598 return DialNoFdnCheckCancel(aTsyReqHandle); |
|
599 case EMobileCallDialCallControl: |
|
600 return DialCallControlCancel(aTsyReqHandle); |
|
601 case EMobileCallAnswerMultimediaCallAsVoice: |
|
602 return AnswerMultimediaCallAsVoiceCancel(aTsyReqHandle); |
|
603 case EMobileCallNotifyAudioToneEvent: |
|
604 return NotifyAudioToneEventCancel(aTsyReqHandle); |
|
605 case EMobileCallDialISV: |
|
606 return DialISVCancel(aTsyReqHandle); |
|
607 case EMobileCallAnswerISV: |
|
608 return AnswerIncomingCallISVCancel(aTsyReqHandle); |
|
609 default: |
|
610 return CCallBase::CancelService(aIpc,aTsyReqHandle); |
|
611 } |
|
612 } |
|
613 |
|
614 /***********************************************************************************/ |
|
615 // |
|
616 // The following methods are called from ExtFunc and/or CancelService. |
|
617 // Each of these will process a TSY request or cancel a TSY request |
|
618 // Here, example values are returned or checked within this dummy TSY in order to ensure |
|
619 // that the integrity of the data passed to/from client is maintained |
|
620 // |
|
621 /***********************************************************************************/ |
|
622 |
|
623 |
|
624 TInt CCallDMmTsy::GetMobileDataCallCaps(const TTsyReqHandle aTsyReqHandle, TDes8* aCaps) |
|
625 { |
|
626 LOGTEXT(_L8("CCallDMmTsy::GetMobileDataCallCaps called")); |
|
627 InitialiseDataCallCaps(aCaps); |
|
628 ReqCompleted(aTsyReqHandle,KErrNone); |
|
629 return KErrNone; |
|
630 } |
|
631 |
|
632 TInt CCallDMmTsy::NotifyMobileDataCallCapsChange(const TTsyReqHandle aTsyReqHandle, TDes8* aCaps) |
|
633 { |
|
634 if (!iNotifyMobileDataCallCapsChange++) |
|
635 { |
|
636 LOGTEXT(_L8("CCallDMmTsy::NotifyMobileDataCallCapsChange called")); |
|
637 InitialiseDataCallCaps(aCaps); |
|
638 iPhone->AddDelayedReq(aTsyReqHandle,this); |
|
639 } |
|
640 return KErrNone; |
|
641 } |
|
642 |
|
643 TInt CCallDMmTsy::NotifyMobileDataCallCapsChangeCancel(const TTsyReqHandle aTsyReqHandle) |
|
644 { |
|
645 LOGTEXT(_L8("CCallDMmTsy::NotifyMobileDataCallCapsChangeCancel called")); |
|
646 iPhone->RemoveDelayedReq(aTsyReqHandle); |
|
647 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
648 return KErrNone; |
|
649 } |
|
650 |
|
651 void CCallDMmTsy::InitialiseDataCallCaps(TDes8* aCallCaps) |
|
652 { |
|
653 RMobileCall::TMobileCallDataCapsV1Pckg* callCapsV1Pckg = REINTERPRET_CAST(RMobileCall::TMobileCallDataCapsV1Pckg*,aCallCaps); |
|
654 RMobileCall::TMobileCallDataCapsV1& callCapsV1 = (*callCapsV1Pckg)(); |
|
655 |
|
656 callCapsV1.iSpeedCaps = DMMTSY_CALL_DATA_CAPS_SPEED; |
|
657 callCapsV1.iProtocolCaps = DMMTSY_CALL_DATA_CAPS_CARRIER; |
|
658 callCapsV1.iServiceCaps = DMMTSY_CALL_DATA_CAPS_SERVICE; |
|
659 callCapsV1.iHscsdSupport = DMMTSY_CALL_DATA_CAPS_HSCSD; |
|
660 callCapsV1.iMClass = DMMTSY_CALL_DATA_CAPS_MCLASS; |
|
661 callCapsV1.iMaxRxTimeSlots = DMMTSY_CALL_DATA_CAPS_MAXRXTS; |
|
662 callCapsV1.iMaxTxTimeSlots = DMMTSY_CALL_DATA_CAPS_MAXTXTS; |
|
663 callCapsV1.iTotalRxTxTimeSlots = DMMTSY_CALL_DATA_CAPS_TOTRXTXTS; |
|
664 callCapsV1.iCodingCaps = DMMTSY_CALL_DATA_CAPS_CODING; |
|
665 callCapsV1.iAsymmetryCaps = DMMTSY_CALL_DATA_CAPS_ASYMETRY; |
|
666 callCapsV1.iUserInitUpgrade = DMMTSY_CALL_DATA_CAPS_USERIMI; |
|
667 } |
|
668 |
|
669 TInt CCallDMmTsy::GetMobileDataCallRLPRange(const TTsyReqHandle aTsyReqHandle, TInt* aRLPVersion, TDes8* aRLPRange) |
|
670 { |
|
671 LOGTEXT(_L8("CCallDMmTsy::GetMobileDataCallRLPRange called")); |
|
672 |
|
673 RMobileCall::TMobileDataRLPRangesV1Pckg* rlpRangeV1Pckg = REINTERPRET_CAST(RMobileCall::TMobileDataRLPRangesV1Pckg*, aRLPRange); |
|
674 RMobileCall::TMobileDataRLPRangesV1& rlpRangeV1 = (*rlpRangeV1Pckg)(); |
|
675 |
|
676 if(*aRLPVersion == DMMTSY_CALL_RLP_VERSION1) |
|
677 { |
|
678 rlpRangeV1.iIWSMax = DMMTSY_CALL_DATA_RLP_WSMAX; |
|
679 rlpRangeV1.iIWSMin = DMMTSY_CALL_DATA_RLP_WSMIN; |
|
680 rlpRangeV1.iMWSMax = DMMTSY_CALL_DATA_RLP_MWSMAX; |
|
681 rlpRangeV1.iMWSMin = DMMTSY_CALL_DATA_RLP_MWSMIN; |
|
682 rlpRangeV1.iN2Max = DMMTSY_CALL_DATA_RLP_N2MAX; |
|
683 rlpRangeV1.iN2Min = DMMTSY_CALL_DATA_RLP_N2MIN; |
|
684 rlpRangeV1.iT1Max = DMMTSY_CALL_DATA_RLP_T1MAX; |
|
685 rlpRangeV1.iT1Min = DMMTSY_CALL_DATA_RLP_T1MIN; |
|
686 rlpRangeV1.iT4Max = DMMTSY_CALL_DATA_RLP_T4MAX; |
|
687 rlpRangeV1.iT4Min = DMMTSY_CALL_DATA_RLP_T4MIN; |
|
688 |
|
689 iPhone->AddDelayedReq(aTsyReqHandle,this); |
|
690 } |
|
691 return KErrNone; |
|
692 } |
|
693 |
|
694 TInt CCallDMmTsy::GetMobileDataCallRLPRangeCancel(const TTsyReqHandle aTsyReqHandle) |
|
695 { |
|
696 LOGTEXT(_L8("CCallDMmTsy::GetMobileDataCallRLPRangeCancel called")); |
|
697 |
|
698 iPhone->RemoveDelayedReq(aTsyReqHandle); |
|
699 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
700 return KErrNone; |
|
701 } |
|
702 |
|
703 TInt CCallDMmTsy::SetDynamicHscsdParams(const TTsyReqHandle aTsyReqHandle, TInt* aAiur, TInt* aRxTimeslots) |
|
704 { |
|
705 LOGTEXT(_L8("CCallDMmTsy::SetHscsdParams called")); |
|
706 |
|
707 if ((*aAiur != DMMTSY_CALL_HCSD_AIUR) || |
|
708 (*aRxTimeslots != DMMTSY_CALL_HCSD_TS)) |
|
709 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
710 else |
|
711 iPhone->AddDelayedReq(aTsyReqHandle,this); |
|
712 |
|
713 return KErrNone; |
|
714 } |
|
715 |
|
716 TInt CCallDMmTsy::SetDynamicHscsdParamsCancel(const TTsyReqHandle aTsyReqHandle) |
|
717 { |
|
718 LOGTEXT(_L8("CCallDMmTsy::SetHscsdParamsCancel called")); |
|
719 iPhone->RemoveDelayedReq(aTsyReqHandle); |
|
720 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
721 return KErrNone; |
|
722 } |
|
723 |
|
724 TInt CCallDMmTsy::GetCurrentHscsdInfo(const TTsyReqHandle aTsyReqHandle, TDes8* aHSCSDInfo) |
|
725 { |
|
726 RMobileCall::TMobileCallHscsdInfoV1Pckg* HSCSDInfoPckg = REINTERPRET_CAST(RMobileCall::TMobileCallHscsdInfoV1Pckg*,aHSCSDInfo); |
|
727 RMobileCall::TMobileCallHscsdInfoV1& hscsdInfo = (*HSCSDInfoPckg)(); |
|
728 LOGTEXT(_L8("CCallDMmTsy::GetCurrentHscsdInfo called")); |
|
729 InitialiseHscsdInfo(hscsdInfo); |
|
730 |
|
731 if ((hscsdInfo.ExtensionId() == KEtelExtMultimodeV7) || |
|
732 (hscsdInfo.ExtensionId() == KEtelExtMultimodeV8)) |
|
733 { |
|
734 RMobileCall::TMobileCallHscsdInfoV7Pckg* HSCSDInfoV7Pckg = REINTERPRET_CAST(RMobileCall::TMobileCallHscsdInfoV7Pckg*,aHSCSDInfo); |
|
735 RMobileCall::TMobileCallHscsdInfoV7& hscsdInfoV7 = (*HSCSDInfoV7Pckg)(); |
|
736 |
|
737 hscsdInfoV7.iCallParamOrigin = DMMTSY_CALL_PARAM_ORIGIN; |
|
738 hscsdInfoV7.iIconId.iQualifier = DMMTSY_CALL_ICON_ID_QUALIFIER; |
|
739 hscsdInfoV7.iIconId.iIdentifier = DMMTSY_CALL_ICON_ID_IDENTIFIER; |
|
740 hscsdInfoV7.iAlphaId = DMMTSY_CALL_ALPHA_ID; |
|
741 hscsdInfoV7.iParamsCallControlModified = DMMTSY_CALL_PARAMS_CALL_CONTROL_MODIFIED; |
|
742 } |
|
743 if (hscsdInfo.ExtensionId() == KEtelExtMultimodeV8) |
|
744 { |
|
745 RMobileCall::TMobileCallHscsdInfoV8Pckg* HSCSDInfoV8Pckg = REINTERPRET_CAST(RMobileCall::TMobileCallHscsdInfoV8Pckg*,aHSCSDInfo); |
|
746 RMobileCall::TMobileCallHscsdInfoV8& hscsdInfoV8 = (*HSCSDInfoV8Pckg)(); |
|
747 |
|
748 hscsdInfoV8.iSubAddress = DMMTSY_CALL_SUBADDRESS; |
|
749 hscsdInfoV8.iBearerCap1 = DMMTSY_CALL_BEARER_CAP1; |
|
750 hscsdInfoV8.iBearerCap2 = DMMTSY_CALL_BEARER_CAP2; |
|
751 hscsdInfoV8.iBCRepeatIndicator = DMMTSY_CALL_BC_REPEAT_INDICATOR; |
|
752 } |
|
753 |
|
754 |
|
755 ReqCompleted(aTsyReqHandle,KErrNone); |
|
756 return KErrNone; |
|
757 } |
|
758 |
|
759 TInt CCallDMmTsy::NotifyHscsdInfoChange(const TTsyReqHandle aTsyReqHandle, TDes8* aHSCSDInfo) |
|
760 { |
|
761 if (!iNotifyHscsdInfoChange++) |
|
762 { |
|
763 RMobileCall::TMobileCallHscsdInfoV1Pckg* HSCSDInfoPckg = REINTERPRET_CAST(RMobileCall::TMobileCallHscsdInfoV1Pckg*,aHSCSDInfo); |
|
764 RMobileCall::TMobileCallHscsdInfoV1& HSCSDInfo = (*HSCSDInfoPckg)(); |
|
765 |
|
766 LOGTEXT(_L8("CCallDMmTsy::NotifyHscsdInfoChange called")); |
|
767 InitialiseHscsdInfo(HSCSDInfo); |
|
768 iPhone->AddDelayedReq(aTsyReqHandle,this); |
|
769 } |
|
770 return KErrNone; |
|
771 } |
|
772 |
|
773 TInt CCallDMmTsy::NotifyHscsdInfoChangeCancel(const TTsyReqHandle aTsyReqHandle) |
|
774 { |
|
775 LOGTEXT(_L8("CCallDMmTsy::NotifyHscsdInfoChangeCancel called")); |
|
776 iPhone->RemoveDelayedReq(aTsyReqHandle); |
|
777 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
778 return KErrNone; |
|
779 } |
|
780 |
|
781 void CCallDMmTsy::InitialiseHscsdInfo(RMobileCall::TMobileCallHscsdInfoV1& aHSCSDInfo) |
|
782 { |
|
783 aHSCSDInfo.iAiur = DMMTSY_CALL_HCSD_AIUR; |
|
784 aHSCSDInfo.iRxTimeSlots = DMMTSY_CALL_HCSD_TS; |
|
785 aHSCSDInfo.iTxTimeSlots = DMMTSY_CALL_HCSD_TS; |
|
786 aHSCSDInfo.iCodings = DMMTSY_CALL_HCSD_CODING; |
|
787 } |
|
788 |
|
789 TInt CCallDMmTsy::NotifyVoiceFallback(const TTsyReqHandle aTsyReqHandle, TDes* aCallName) |
|
790 { |
|
791 if (!iNotifyVoiceFallback++) |
|
792 { |
|
793 LOGTEXT(_L8("CCallDMmTsy::NotifyVoiceFallback Called")); |
|
794 *aCallName = DMMTSY_VOICE_FALLBACK_CALL_NAME; |
|
795 iPhone->AddDelayedReq(aTsyReqHandle,this); |
|
796 } |
|
797 return KErrNone; |
|
798 } |
|
799 |
|
800 TInt CCallDMmTsy::NotifyVoiceFallbackCancel(const TTsyReqHandle aTsyReqHandle) |
|
801 { |
|
802 LOGTEXT(_L8("CCallDMmTsy::NotifyVoiceFallbackCancel called")); |
|
803 iPhone->RemoveDelayedReq(aTsyReqHandle); |
|
804 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
805 return KErrNone; |
|
806 } |
|
807 |
|
808 TInt CCallDMmTsy::SwitchAlternatingCall(const TTsyReqHandle aTsyReqHandle) |
|
809 { |
|
810 LOGTEXT(_L8("CCallDMmTsy::SwitchAlternatingCall called")); |
|
811 iPhone->AddDelayedReq(aTsyReqHandle,this); |
|
812 return KErrNone; |
|
813 } |
|
814 |
|
815 TInt CCallDMmTsy::SwitchAlternatingCallCancel(const TTsyReqHandle aTsyReqHandle) |
|
816 { |
|
817 LOGTEXT(_L8("CCallDMmTsy::SwitchAlternatingCallCancel called")); |
|
818 iPhone->RemoveDelayedReq(aTsyReqHandle); |
|
819 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
820 return KErrNone; |
|
821 } |
|
822 |
|
823 TInt CCallDMmTsy::NotifyAlternatingCallSwitch(const TTsyReqHandle aTsyReqHandle) |
|
824 { |
|
825 if (!iNotifyAlternatingCallSwitch++) |
|
826 { |
|
827 LOGTEXT(_L8("CCallDMmTsy::NotifyAlternatingCallSwitch called")); |
|
828 iPhone->AddDelayedReq(aTsyReqHandle,this); |
|
829 } |
|
830 return KErrNone; |
|
831 } |
|
832 |
|
833 TInt CCallDMmTsy::NotifyAlternatingCallSwitchCancel(const TTsyReqHandle aTsyReqHandle) |
|
834 { |
|
835 LOGTEXT(_L8("CCallDMmTsy::NotifyAlternatingCallSwitchCancel called")); |
|
836 iPhone->RemoveDelayedReq(aTsyReqHandle); |
|
837 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
838 return KErrNone; |
|
839 } |
|
840 |
|
841 |
|
842 |
|
843 TInt CCallDMmTsy::GetMobileCallCaps(const TTsyReqHandle aTsyReqHandle, TDes8* aCaps) |
|
844 { |
|
845 LOGTEXT(_L8("CCallDMmTsy::GetMobileCallCaps called")); |
|
846 RMobileCall::TMobileCallCapsV1Pckg *capsPckg = REINTERPRET_CAST(RMobileCall::TMobileCallCapsV1Pckg *,aCaps); |
|
847 RMobileCall::TMobileCallCapsV1& caps = (*capsPckg)(); |
|
848 caps.iCallControlCaps=DMMTSY_CALL_CONTROL_CAPS1; |
|
849 caps.iCallEventCaps=DMMTSY_CALL_EVENT_CAPS1; |
|
850 ReqCompleted(aTsyReqHandle,KErrNone); |
|
851 return KErrNone; |
|
852 } |
|
853 |
|
854 TInt CCallDMmTsy::NotifyMobileCallCapsChange(const TTsyReqHandle aTsyReqHandle, TDes8* aCaps) |
|
855 { |
|
856 if(!iNotifyMobileCallCapsChange++) |
|
857 { |
|
858 LOGTEXT(_L8("CCallDMmTsy::NotifyMobileCallCapsChange called")); |
|
859 RMobileCall::TMobileCallCapsV1Pckg *capsPckg = REINTERPRET_CAST(RMobileCall::TMobileCallCapsV1Pckg *,aCaps); |
|
860 RMobileCall::TMobileCallCapsV1& caps = (*capsPckg)(); |
|
861 caps.iCallControlCaps=DMMTSY_CALL_CONTROL_CAPS2; |
|
862 caps.iCallEventCaps=DMMTSY_CALL_EVENT_CAPS2; |
|
863 iPhone->AddDelayedReq(aTsyReqHandle,this); |
|
864 } |
|
865 return KErrNone; |
|
866 } |
|
867 |
|
868 TInt CCallDMmTsy::NotifyMobileCallCapsChangeCancel(const TTsyReqHandle aTsyReqHandle) |
|
869 { |
|
870 LOGTEXT(_L8("CCallDMmTsy::NotifyMobileCallCapsChangeCancel called")); |
|
871 iPhone->RemoveDelayedReq(aTsyReqHandle); |
|
872 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
873 return KErrNone; |
|
874 } |
|
875 |
|
876 TInt CCallDMmTsy::GetMobileCallStatus(const TTsyReqHandle aTsyReqHandle,RMobileCall::TMobileCallStatus* aStatus) |
|
877 { |
|
878 LOGTEXT(_L8("CCallDMmTsy::GetMobileCallStatus called")); |
|
879 *aStatus=DMMTSY_CALL_STATUS1; |
|
880 ReqCompleted(aTsyReqHandle,KErrNone); |
|
881 return KErrNone; |
|
882 } |
|
883 |
|
884 TInt CCallDMmTsy::NotifyMobileCallStatusChange(const TTsyReqHandle aTsyReqHandle,RMobileCall::TMobileCallStatus* aStatus) |
|
885 { |
|
886 if (iNotifyMobileCallStatusChange<DMMTSY_NUMBER_OF_SLOTS_STATUS) |
|
887 { |
|
888 LOGTEXT(_L8("CCallDMmTsy::NotifyMobileCallStatusChange called")); |
|
889 switch(iNotifyMobileCallStatusChange) |
|
890 { |
|
891 case 0: |
|
892 *aStatus=DMMTSY_CALL_STATUS2; |
|
893 break; |
|
894 case 1: |
|
895 *aStatus=DMMTSY_CALL_STATUS3; |
|
896 break; |
|
897 case 2: |
|
898 *aStatus=DMMTSY_CALL_STATUS4; |
|
899 break; |
|
900 default: |
|
901 break; |
|
902 } |
|
903 iNotifyMobileCallStatusChange++; |
|
904 iPhone->AddDelayedReq(aTsyReqHandle,this); |
|
905 } |
|
906 return KErrNone; |
|
907 } |
|
908 |
|
909 TInt CCallDMmTsy::NotifyMobileCallStatusChangeCancel(const TTsyReqHandle aTsyReqHandle) |
|
910 { |
|
911 LOGTEXT(_L8("CCallDMmTsy::NotifyMobileCallStatusChangeCancel called")); |
|
912 iPhone->RemoveDelayedReq(aTsyReqHandle); |
|
913 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
914 return KErrNone; |
|
915 } |
|
916 |
|
917 TInt CCallDMmTsy::Hold(const TTsyReqHandle aTsyReqHandle) |
|
918 { |
|
919 LOGTEXT(_L8("CCallDMmTsy::Hold called")); |
|
920 iPhone->AddDelayedReq(aTsyReqHandle,this); |
|
921 return KErrNone; |
|
922 } |
|
923 |
|
924 TInt CCallDMmTsy::HoldCancel(const TTsyReqHandle aTsyReqHandle) |
|
925 { |
|
926 LOGTEXT(_L8("CCallDMmTsy::HoldCancel called")); |
|
927 iPhone->RemoveDelayedReq(aTsyReqHandle); |
|
928 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
929 return KErrNone; |
|
930 } |
|
931 |
|
932 TInt CCallDMmTsy::Resume(const TTsyReqHandle aTsyReqHandle) |
|
933 { |
|
934 LOGTEXT(_L8("CCallDMmTsy::Resume called")); |
|
935 iPhone->AddDelayedReq(aTsyReqHandle,this); |
|
936 return KErrNone; |
|
937 } |
|
938 |
|
939 TInt CCallDMmTsy::ResumeCancel(const TTsyReqHandle aTsyReqHandle) |
|
940 { |
|
941 LOGTEXT(_L8("CCallDMmTsy::ResumeCancel called")); |
|
942 iPhone->RemoveDelayedReq(aTsyReqHandle); |
|
943 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
944 return KErrNone; |
|
945 } |
|
946 |
|
947 TInt CCallDMmTsy::Swap(const TTsyReqHandle aTsyReqHandle) |
|
948 { |
|
949 LOGTEXT(_L8("CCallDMmTsy::Swap called")); |
|
950 iPhone->AddDelayedReq(aTsyReqHandle,this); |
|
951 return KErrNone; |
|
952 } |
|
953 |
|
954 TInt CCallDMmTsy::SwapCancel(const TTsyReqHandle aTsyReqHandle) |
|
955 { |
|
956 LOGTEXT(_L8("CCallDMmTsy::SwapCancel called")); |
|
957 iPhone->RemoveDelayedReq(aTsyReqHandle); |
|
958 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
959 return KErrNone; |
|
960 } |
|
961 |
|
962 TInt CCallDMmTsy::Deflect(const TTsyReqHandle aTsyReqHandle, RMobileCall::TMobileCallDeflect* aDeflectType, RMobilePhone::TMobileAddress* aDestination) |
|
963 { |
|
964 LOGTEXT(_L8("CCallDMmTsy::Deflect called")); |
|
965 |
|
966 if ((*aDeflectType != DMMTSY_CALL_DEFLECT_TYPE) || |
|
967 (aDestination->iNumberPlan != DMMTSY_PHONE_NPI) || |
|
968 (aDestination->iTypeOfNumber != DMMTSY_PHONE_TON) || |
|
969 (aDestination->iTelNumber.Compare(DMMTSY_PHONE_TEL_NUMBER) != 0)) |
|
970 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
971 else |
|
972 iPhone->AddDelayedReq(aTsyReqHandle,this); |
|
973 return KErrNone; |
|
974 } |
|
975 |
|
976 TInt CCallDMmTsy::DeflectCancel(const TTsyReqHandle aTsyReqHandle) |
|
977 { |
|
978 LOGTEXT(_L8("CCallDMmTsy::DeflectCancel called")); |
|
979 iPhone->RemoveDelayedReq(aTsyReqHandle); |
|
980 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
981 return KErrNone; |
|
982 } |
|
983 |
|
984 TInt CCallDMmTsy::Transfer(const TTsyReqHandle aTsyReqHandle) |
|
985 { |
|
986 LOGTEXT(_L8("CCallDMmTsy::Transfer called")); |
|
987 iPhone->AddDelayedReq(aTsyReqHandle,this); |
|
988 return KErrNone; |
|
989 } |
|
990 |
|
991 TInt CCallDMmTsy::TransferCancel(const TTsyReqHandle aTsyReqHandle) |
|
992 { |
|
993 LOGTEXT(_L8("CCallDMmTsy::TransferCancel called")); |
|
994 iPhone->RemoveDelayedReq(aTsyReqHandle); |
|
995 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
996 return KErrNone; |
|
997 } |
|
998 |
|
999 TInt CCallDMmTsy::GoOneToOne(const TTsyReqHandle aTsyReqHandle) |
|
1000 { |
|
1001 LOGTEXT(_L8("CCallDMmTsy::GoOneToOne called")); |
|
1002 iPhone->AddDelayedReq(aTsyReqHandle,this); |
|
1003 return KErrNone; |
|
1004 } |
|
1005 |
|
1006 TInt CCallDMmTsy::GoOneToOneCancel(const TTsyReqHandle aTsyReqHandle) |
|
1007 { |
|
1008 LOGTEXT(_L8("CCallDMmTsy::GoOneToOneCancel called")); |
|
1009 iPhone->RemoveDelayedReq(aTsyReqHandle); |
|
1010 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
1011 return KErrNone; |
|
1012 } |
|
1013 |
|
1014 TInt CCallDMmTsy::NotifyCallEvent(const TTsyReqHandle aTsyReqHandle, RMobileCall::TMobileCallEvent* aEvent) |
|
1015 { |
|
1016 if(!iNotifyCallEvent++) |
|
1017 { |
|
1018 LOGTEXT(_L8("CCallDMmTsy::NotifyCallEvent called")); |
|
1019 *aEvent=DMMTSY_CALL_EVENT1; |
|
1020 iPhone->AddDelayedReq(aTsyReqHandle,this); |
|
1021 } |
|
1022 return KErrNone; |
|
1023 } |
|
1024 |
|
1025 TInt CCallDMmTsy::NotifyCallEventCancel(const TTsyReqHandle aTsyReqHandle) |
|
1026 { |
|
1027 LOGTEXT(_L8("CCallDMmTsy::NotifyCallEventCancel called")); |
|
1028 iPhone->RemoveDelayedReq(aTsyReqHandle); |
|
1029 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
1030 return KErrNone; |
|
1031 } |
|
1032 |
|
1033 TInt CCallDMmTsy::SetPrivacySetting(const TTsyReqHandle aTsyReqHandle, RMobilePhone::TMobilePhonePrivacy* aPrivacySetting) |
|
1034 { |
|
1035 LOGTEXT(_L8("CCallDMmTsy::Set Privacy called")); |
|
1036 if (*aPrivacySetting != DMMTSY_CALL_SET_PRIVACY) |
|
1037 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
1038 else |
|
1039 ReqCompleted(aTsyReqHandle,KErrNone); |
|
1040 return KErrNone; |
|
1041 } |
|
1042 |
|
1043 TInt CCallDMmTsy::NotifyPrivacyConfirmation(const TTsyReqHandle aTsyReqHandle, RMobilePhone::TMobilePhonePrivacy* aPrivacySetting) |
|
1044 { |
|
1045 if(!iNotifyPrivacyConfirmation++) |
|
1046 { |
|
1047 LOGTEXT(_L8("CCallDMmTsy::Notify Privacy Confirmation Change")); |
|
1048 *aPrivacySetting = DMMTSY_CALL_SET_PRIVACY; |
|
1049 iPhone->AddDelayedReq(aTsyReqHandle,this); |
|
1050 } |
|
1051 return KErrNone; |
|
1052 } |
|
1053 |
|
1054 TInt CCallDMmTsy::NotifyPrivacyConfirmationCancel(const TTsyReqHandle aTsyReqHandle) |
|
1055 { |
|
1056 LOGTEXT(_L8("CCallDMmTsy::Notify Privacy Confirmation Cancel")); |
|
1057 iPhone->RemoveDelayedReq(aTsyReqHandle); |
|
1058 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
1059 return KErrNone; |
|
1060 } |
|
1061 |
|
1062 TInt CCallDMmTsy::SetTrafficChannel(const TTsyReqHandle aTsyReqHandle, RMobileCall::TMobileCallTch* aTchRequest) |
|
1063 { |
|
1064 LOGTEXT(_L8("CCallDMmTsy::Set Traffic Channel called")); |
|
1065 if (*aTchRequest != DMMTSY_CALL_TCH_REQUEST) |
|
1066 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
1067 else |
|
1068 ReqCompleted(aTsyReqHandle,KErrNone); |
|
1069 return KErrNone; |
|
1070 } |
|
1071 |
|
1072 TInt CCallDMmTsy::NotifyTrafficChannelConfirmation(const TTsyReqHandle aTsyReqHandle, RMobileCall::TMobileCallTch* aTchType) |
|
1073 { |
|
1074 if (!iNotifyTrafficChannelConfirmation++) |
|
1075 { |
|
1076 LOGTEXT(_L8("CCallDMmTsy::Notify Traffic Channel Confirmation")); |
|
1077 *aTchType = DMMTSY_CALL_TCH_SETTING; |
|
1078 iPhone->AddDelayedReq(aTsyReqHandle,this); |
|
1079 } |
|
1080 return KErrNone; |
|
1081 } |
|
1082 |
|
1083 TInt CCallDMmTsy::NotifyTrafficChannelConfirmationCancel(const TTsyReqHandle aTsyReqHandle) |
|
1084 { |
|
1085 LOGTEXT(_L8("CCallDMmTsy::Notify Traffic Channel Confirmation Cancel")); |
|
1086 iPhone->RemoveDelayedReq(aTsyReqHandle); |
|
1087 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
1088 return KErrNone; |
|
1089 } |
|
1090 |
|
1091 TInt CCallDMmTsy::GetMobileCallInfo(const TTsyReqHandle aTsyReqHandle, TDes8* aInfo) |
|
1092 { |
|
1093 LOGTEXT(_L8("CCallDMmTsy::GetMobileCallInfo called")); |
|
1094 RMobileCall::TMobileCallInfoV1Pckg* infoV1Pckg = (RMobileCall::TMobileCallInfoV1Pckg*)aInfo; |
|
1095 RMobileCall::TMobileCallInfoV1& infoV1 = (*infoV1Pckg)(); |
|
1096 |
|
1097 infoV1.iCallName=DMMTSY_CALL_NAME1; |
|
1098 infoV1.iLineName=DMMTSY_LINE_VOICE_NAME; |
|
1099 infoV1.iStatus=DMMTSY_CALL_STATUS4; |
|
1100 infoV1.iDuration=DMMTSY_CALL_DURATION1; |
|
1101 infoV1.iCallId=DMMTSY_CALL_ID1; |
|
1102 infoV1.iRemoteParty.iRemoteIdStatus=DMMTSY_CALL_REMOTEPARTYSTATUS1; |
|
1103 infoV1.iRemoteParty.iRemoteNumber.iTelNumber=DMMTSY_CALL_REMOTEPARTYNUMBER1; |
|
1104 infoV1.iRemoteParty.iDirection=DMMTSY_CALL_REMOTEPARTYDIRECTION1; |
|
1105 infoV1.iRemoteParty.iCallingName=DMMTSY_CALL_REMOTEPARTYNAME; |
|
1106 infoV1.iExitCode=DMMTSY_CALL_EXIT_CODE; |
|
1107 infoV1.iEmergency=DMMTSY_CALL_EMERGENCY_FLAG; |
|
1108 infoV1.iForwarded=DMMTSY_CALL_FORWARDED_FLAG; |
|
1109 infoV1.iService = DMMTSY_CALL_SERVICE; |
|
1110 infoV1.iValid = DMMTSY_CALL_VALID_FLAG; |
|
1111 infoV1.iPrivacy = DMMTSY_CALL_PRIVACY; |
|
1112 infoV1.iTch = DMMTSY_CALL_CHANNEL; |
|
1113 infoV1.iAlternatingCall = DMMTSY_CALL_ALTERNATING; |
|
1114 infoV1.iStartTime.Set(DMMTSY_PHONE_NWTINFO_YEAR,DMMTSY_PHONE_NWTINFO_MONTH,DMMTSY_PHONE_NWTINFO_DAY, |
|
1115 DMMTSY_PHONE_NWTINFO_HOUR, DMMTSY_PHONE_NWTINFO_MINUTE, DMMTSY_PHONE_NWTINFO_SECOND, |
|
1116 DMMTSY_PHONE_NWTINFO_MICRO); |
|
1117 |
|
1118 if (infoV1.ExtensionId() == KETelExtMultimodeV3 || |
|
1119 (infoV1.ExtensionId() == KETelExtMultimodeV4)) |
|
1120 { |
|
1121 RMobileCall::TMobileCallInfoV3Pckg* infoV3Pckg = (RMobileCall::TMobileCallInfoV3Pckg*)aInfo; |
|
1122 RMobileCall::TMobileCallInfoV3& infoV3 = (*infoV3Pckg)(); |
|
1123 infoV3.iSecurity = DMMTSY_CALL_SECURITY; |
|
1124 } |
|
1125 |
|
1126 if (infoV1.ExtensionId() == KEtelExtMultimodeV7) |
|
1127 { |
|
1128 RMobileCall::TMobileCallInfoV7Pckg* infoV7Pckg = (RMobileCall::TMobileCallInfoV7Pckg*)aInfo; |
|
1129 RMobileCall::TMobileCallInfoV7& infoV7 = (*infoV7Pckg)(); |
|
1130 infoV7.iSecurity = DMMTSY_CALL_SECURITY; |
|
1131 infoV7.iCallParamOrigin = DMMTSY_CALL_ORIGIN; |
|
1132 infoV7.iIconId.iQualifier = DMMTSY_CALL_ICON_ID_QUALIFIER; |
|
1133 infoV7.iIconId.iIdentifier = DMMTSY_CALL_ICON_ID_IDENTIFIER; |
|
1134 infoV7.iAlphaId = DMMTSY_CALL_ALPHA_ID; |
|
1135 infoV7.iParamsCallControlModified = DMMTSY_CALL_PARAMS_CALL_CONTROL_MODIFIED; |
|
1136 } |
|
1137 if (infoV1.ExtensionId() == KEtelExtMultimodeV8) |
|
1138 { |
|
1139 RMobileCall::TMobileCallInfoV8Pckg* infoV8Pckg = (RMobileCall::TMobileCallInfoV8Pckg*)aInfo; |
|
1140 RMobileCall::TMobileCallInfoV8& infoV8 = (*infoV8Pckg)(); |
|
1141 infoV8.iSecurity = DMMTSY_CALL_SECURITY; |
|
1142 infoV8.iCallParamOrigin = DMMTSY_CALL_ORIGIN; |
|
1143 infoV8.iIconId.iQualifier = DMMTSY_CALL_ICON_ID_QUALIFIER; |
|
1144 infoV8.iIconId.iIdentifier = DMMTSY_CALL_ICON_ID_IDENTIFIER; |
|
1145 infoV8.iAlphaId = DMMTSY_CALL_ALPHA_ID; |
|
1146 infoV8.iParamsCallControlModified = DMMTSY_CALL_PARAMS_CALL_CONTROL_MODIFIED; |
|
1147 infoV8.iSubAddress = DMMTSY_CALL_SUBADDRESS; |
|
1148 infoV8.iBearerCap1 = DMMTSY_CALL_BEARER_CAP1; |
|
1149 infoV8.iBearerCap2 = DMMTSY_CALL_BEARER_CAP2; |
|
1150 infoV8.iBCRepeatIndicator = DMMTSY_CALL_BC_REPEAT_INDICATOR; |
|
1151 } |
|
1152 |
|
1153 iPhone->AddDelayedReq(aTsyReqHandle,this); |
|
1154 return KErrNone; |
|
1155 } |
|
1156 |
|
1157 TInt CCallDMmTsy::GetMobileCallInfoCancel(const TTsyReqHandle aTsyReqHandle) |
|
1158 { |
|
1159 LOGTEXT(_L8("CCallDMmTsy::GetMobileCallInfoCancel called")); |
|
1160 iPhone->RemoveDelayedReq(aTsyReqHandle); |
|
1161 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
1162 return KErrNone; |
|
1163 } |
|
1164 |
|
1165 TInt CCallDMmTsy::NotifyRemotePartyInfoChange(const TTsyReqHandle aTsyReqHandle, TDes8* aRemotePartyInfo) |
|
1166 { |
|
1167 if (!iNotifyRemotePartyInfoChange++) |
|
1168 { |
|
1169 LOGTEXT(_L8("CCallDMmTsy::NotifyRemotePartyInfoChange called")); |
|
1170 RMobileCall::TMobileCallRemotePartyInfoV1Pckg* infoV1Pckg = (RMobileCall::TMobileCallRemotePartyInfoV1Pckg*)aRemotePartyInfo; |
|
1171 RMobileCall::TMobileCallRemotePartyInfoV1& infoV1 = (*infoV1Pckg)(); |
|
1172 |
|
1173 infoV1.iRemoteIdStatus=DMMTSY_CALL_REMOTEPARTYSTATUS2; |
|
1174 infoV1.iRemoteNumber.iTelNumber=DMMTSY_CALL_EMPTY_STRING; |
|
1175 infoV1.iDirection=DMMTSY_CALL_REMOTEPARTYDIRECTION2; |
|
1176 infoV1.iCallingName=DMMTSY_CALL_EMPTY_STRING; |
|
1177 |
|
1178 iPhone->AddDelayedReq(aTsyReqHandle,this); |
|
1179 } |
|
1180 return KErrNone; |
|
1181 } |
|
1182 |
|
1183 TInt CCallDMmTsy::NotifyRemotePartyInfoChangeCancel(const TTsyReqHandle aTsyReqHandle) |
|
1184 { |
|
1185 LOGTEXT(_L8("CCallDMmTsy::NotifyRemotePartyInfoChangeCancel called")); |
|
1186 iPhone->RemoveDelayedReq(aTsyReqHandle); |
|
1187 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
1188 return KErrNone; |
|
1189 } |
|
1190 |
|
1191 TInt CCallDMmTsy::DialNoFdnCheck(const TTsyReqHandle aTsyReqHandle, TDesC8* aCallParams, TDesC* aNumber) |
|
1192 /** |
|
1193 * This method dials the number specified by aNumber. The number used for dialling |
|
1194 * is not checked against those in the Fixed Dialling Number list even if the FDN service is enabled |
|
1195 * |
|
1196 * @param aCallParams Supplies the call parameters for the dial request |
|
1197 * @param aNumber Supplies the number to dial |
|
1198 */ |
|
1199 |
|
1200 { |
|
1201 LOGTEXT(_L8("CCallDMmTsy::DialNoFdnCheck called")); |
|
1202 |
|
1203 TInt error = ValidateCallParams(aCallParams); |
|
1204 |
|
1205 if((error != KErrNone) || (aNumber->Compare(DMMTSY_PHONE_TEL_NUMBER) != 0)) |
|
1206 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
1207 else |
|
1208 { |
|
1209 LOGTEXT(_L8("CCallDMmTsy::DialNoFdnCheck CallParams and DialNumber validated")); |
|
1210 iPhone->AddDelayedReq(aTsyReqHandle,this); |
|
1211 } |
|
1212 |
|
1213 return KErrNone; |
|
1214 } |
|
1215 |
|
1216 TInt CCallDMmTsy::DialNoFdnCheckCancel(const TTsyReqHandle aTsyReqHandle) |
|
1217 /** |
|
1218 * This method cancels the dialling of the number specified by aNumber. The number used for dialling |
|
1219 * is not checked against those in the Fixed Dialling Number list even if the FDN service is enabled |
|
1220 */ |
|
1221 { |
|
1222 LOGTEXT(_L8("CCallDMmTsy::DialNoFdnCheckCancel called")); |
|
1223 iPhone->RemoveDelayedReq(aTsyReqHandle); |
|
1224 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
1225 return KErrNone; |
|
1226 } |
|
1227 |
|
1228 TInt CCallDMmTsy::DialCallControl(const TTsyReqHandle aTsyReqHandle, TDesC8* aCallParams, TDesC* aNumber) |
|
1229 /** |
|
1230 * This method dials the number specified by aNumber. Dialling via |
|
1231 * this function allows the TSY to know that the dial request is |
|
1232 * the result of call control. |
|
1233 * |
|
1234 * @param aCallParams Supplies the call parameters for the dial request |
|
1235 * @param aNumber Supplies the number to dial |
|
1236 */ |
|
1237 |
|
1238 { |
|
1239 LOGTEXT(_L8("CCallDMmTsy::DialCallControl called")); |
|
1240 |
|
1241 TInt error = ValidateCallParams(aCallParams); // Check V1 params |
|
1242 |
|
1243 // TODO need to validate the other params |
|
1244 |
|
1245 if((error != KErrNone) || (aNumber->Compare(DMMTSY_PHONE_TEL_NUMBER) != 0)) |
|
1246 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
1247 else |
|
1248 { |
|
1249 LOGTEXT(_L8("CCallDMmTsy::DialCallControl CallParams and DialNumber validated")); |
|
1250 iPhone->AddDelayedReq(aTsyReqHandle,this); |
|
1251 } |
|
1252 |
|
1253 return KErrNone; |
|
1254 } |
|
1255 |
|
1256 TInt CCallDMmTsy::DialCallControlCancel(const TTsyReqHandle aTsyReqHandle) |
|
1257 /** |
|
1258 * This method cancels the dialling of the number specified by aNumber. |
|
1259 */ |
|
1260 { |
|
1261 LOGTEXT(_L8("CCallDMmTsy::DialCallControlCancel called")); |
|
1262 iPhone->RemoveDelayedReq(aTsyReqHandle); |
|
1263 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
1264 return KErrNone; |
|
1265 } |
|
1266 |
|
1267 TInt CCallDMmTsy::DialEmergencyCall(const TTsyReqHandle aTsyReqHandle, TDesC* aNumber) |
|
1268 { |
|
1269 LOGTEXT(_L8("CCallDMmTsy::DialEmergencyCall called")); |
|
1270 if(aNumber->Compare(DMMTSY_EN_STORE_AMBULANCE_NUM) != 0) |
|
1271 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
1272 else |
|
1273 ReqCompleted(aTsyReqHandle,KErrNone); |
|
1274 |
|
1275 return KErrNone; |
|
1276 } |
|
1277 |
|
1278 TInt CCallDMmTsy::DialEmergencyCallCancel(const TTsyReqHandle aTsyReqHandle) |
|
1279 { |
|
1280 LOGTEXT(_L8("CCallDMmTsy::DialEmergencyCallCancel called")); |
|
1281 iPhone->RemoveDelayedReq(aTsyReqHandle); |
|
1282 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
1283 return KErrNone; |
|
1284 } |
|
1285 |
|
1286 TInt CCallDMmTsy::DialISV(const TTsyReqHandle aTsyReqHandle, TDesC8* aCallParams, TDesC* aNumber) |
|
1287 { |
|
1288 LOGTEXT(_L8("CCallDMmTsy::DialISV called")); |
|
1289 |
|
1290 TInt error = KErrNone; |
|
1291 |
|
1292 if(aCallParams) |
|
1293 { |
|
1294 |
|
1295 RMobileCall::TEtel3rdPartyMobileCallParamsV1Pckg* callparamsPckg= |
|
1296 reinterpret_cast<RMobileCall::TEtel3rdPartyMobileCallParamsV1Pckg*>(const_cast<TDesC8*>(aCallParams)); |
|
1297 RMobileCall::TEtel3rdPartyMobileCallParamsV1& callparams=(*callparamsPckg)(); |
|
1298 |
|
1299 // check that the request is a 3rd party request |
|
1300 if(callparams.ExtensionId() == RMobileCall::KETel3rdPartyCallParamsV1) |
|
1301 { |
|
1302 LOGTEXT(_L8("CCallDMmTsy::DIALISV, request from 3rd party.")); |
|
1303 |
|
1304 //Validate parameters |
|
1305 if ((aNumber->Compare(DMMTSY_PHONE_TEL_NUMBER)!=KErrNone) || |
|
1306 (callparams.iIdRestrict != DMMTSY_CALL_CLI_RESTRICT_SETTING1) || |
|
1307 (callparams.iAutoRedial != DMMTSY_CALL_AUTO_REDIAL_FLAG)) |
|
1308 { |
|
1309 error=KErrCorrupt; |
|
1310 } |
|
1311 } |
|
1312 else |
|
1313 { |
|
1314 LOGTEXT(_L8("CCallDMmTsy::DIALISV, request from non-3rd party.")); |
|
1315 error = KErrAccessDenied; |
|
1316 } |
|
1317 } |
|
1318 |
|
1319 else |
|
1320 { // No call parms data |
|
1321 error = KErrCorrupt; |
|
1322 } |
|
1323 |
|
1324 |
|
1325 if (error != KErrNone) |
|
1326 ReqCompleted(aTsyReqHandle,error); |
|
1327 else |
|
1328 iPhone->AddDelayedReq(aTsyReqHandle,this); |
|
1329 |
|
1330 return KErrNone; |
|
1331 |
|
1332 } |
|
1333 |
|
1334 TInt CCallDMmTsy::DialISVCancel(const TTsyReqHandle aTsyReqHandle) |
|
1335 { |
|
1336 LOGTEXT(_L8("CCallDMmTsy::DialISVCancel called")); |
|
1337 iPhone->RemoveDelayedReq(aTsyReqHandle); |
|
1338 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
1339 return KErrNone; |
|
1340 } |
|
1341 |
|
1342 |
|
1343 |
|
1344 TInt CCallDMmTsy::ActivateCCBS(const TTsyReqHandle aTsyReqHandle, TInt* aIndex) |
|
1345 { |
|
1346 LOGTEXT(_L8("CCallDMmTsy::ActivateCCBS called")); |
|
1347 *aIndex=DMMTSY_PHONE_CCC_INDEX1; |
|
1348 iPhone->AddDelayedReq(aTsyReqHandle,this); |
|
1349 return KErrNone; |
|
1350 } |
|
1351 |
|
1352 TInt CCallDMmTsy::ActivateCCBSCancel(const TTsyReqHandle aTsyReqHandle) |
|
1353 { |
|
1354 LOGTEXT(_L8("CCallDMmTsy::ActivateCCBSCancel called")); |
|
1355 iPhone->RemoveDelayedReq(aTsyReqHandle); |
|
1356 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
1357 return KErrNone; |
|
1358 } |
|
1359 |
|
1360 TInt CCallDMmTsy::RejectCCBS(const TTsyReqHandle aTsyReqHandle) |
|
1361 { |
|
1362 LOGTEXT(_L8("CCallDMmTsy::RejectCCBS called")); |
|
1363 ReqCompleted(aTsyReqHandle,KErrNone); |
|
1364 return KErrNone; |
|
1365 } |
|
1366 |
|
1367 TInt CCallDMmTsy::GetUUSCaps(const TTsyReqHandle aTsyReqHandle, TUint32* aCaps) |
|
1368 { |
|
1369 LOGTEXT(_L8("CCallDMmTsy::GetUUSCaps called")); |
|
1370 *aCaps = DMMTSY_CALL_UUS_CAPS; |
|
1371 |
|
1372 iPhone->AddDelayedReq(aTsyReqHandle,this); |
|
1373 return KErrNone; |
|
1374 } |
|
1375 |
|
1376 TInt CCallDMmTsy::NotifyUUSCapsChange(const TTsyReqHandle aTsyReqHandle, TUint32* aCaps) |
|
1377 { |
|
1378 if (!iNotifyUUSCapsChange++) |
|
1379 { |
|
1380 LOGTEXT(_L8("CCallDMmTsy::NotifyUUSCapsChange called")); |
|
1381 *aCaps = DMMTSY_CALL_UUS_CAPS; |
|
1382 |
|
1383 iPhone->AddDelayedReq(aTsyReqHandle,this); |
|
1384 } |
|
1385 return KErrNone; |
|
1386 } |
|
1387 |
|
1388 TInt CCallDMmTsy::NotifyUUSCapsChangeCancel(const TTsyReqHandle aTsyReqHandle) |
|
1389 { |
|
1390 LOGTEXT(_L8("CCallDMmTsy::NotifyUUSCapsChangeCancel called")); |
|
1391 iPhone->RemoveDelayedReq(aTsyReqHandle); |
|
1392 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
1393 return KErrNone; |
|
1394 } |
|
1395 |
|
1396 TInt CCallDMmTsy::ValidateCallParams(TDesC8* aCallParams) |
|
1397 { |
|
1398 TInt error = KErrNone; |
|
1399 |
|
1400 RCall::TCallParamsPckg* paramsPckgV1 = (RCall::TCallParamsPckg*)aCallParams; |
|
1401 RCall::TCallParams& paramsV1 = (*paramsPckgV1)(); |
|
1402 |
|
1403 iDataCallParams.iSpeakerControl = paramsV1.iSpeakerControl; |
|
1404 iDataCallParams.iSpeakerVolume = paramsV1.iSpeakerVolume; |
|
1405 iDataCallParams.iInterval = paramsV1.iInterval; |
|
1406 iDataCallParams.iWaitForDialTone = paramsV1.iWaitForDialTone; |
|
1407 iMobileCallParams.iSpeakerControl = paramsV1.iSpeakerControl; |
|
1408 iMobileCallParams.iSpeakerVolume = paramsV1.iSpeakerVolume; |
|
1409 iMobileCallParams.iInterval = paramsV1.iInterval; |
|
1410 iMobileCallParams.iWaitForDialTone = paramsV1.iWaitForDialTone; |
|
1411 |
|
1412 if(paramsV1.ExtensionId()==RMobileCall::KETelMobileCallParamsV1) |
|
1413 { |
|
1414 if (iMobileCallParams.iInterval != DMMTSY_CALL_INTERVAL) |
|
1415 error=KErrCorrupt; |
|
1416 |
|
1417 RMobileCall::TMobileCallParamsV1Pckg* mmParamsPckgV1 = (RMobileCall::TMobileCallParamsV1Pckg*)aCallParams; |
|
1418 RMobileCall::TMobileCallParamsV1& mmParamsV1 = (*mmParamsPckgV1)(); |
|
1419 |
|
1420 iMobileCallParams.iIdRestrict = mmParamsV1.iIdRestrict; |
|
1421 iMobileCallParams.iCug = mmParamsV1.iCug; |
|
1422 iMobileCallParams.iAutoRedial = mmParamsV1.iAutoRedial; |
|
1423 |
|
1424 if ((iMobileCallParams.iIdRestrict != DMMTSY_CALL_CLI_RESTRICT_SETTING1) || |
|
1425 (iMobileCallParams.iCug.iExplicitInvoke != DMMTSY_CALL_CUG_INVOKE) || |
|
1426 (iMobileCallParams.iCug.iCugIndex != DMMTSY_CALL_CUG_INDEX) || |
|
1427 (iMobileCallParams.iCug.iSuppressOA != DMMTSY_CALL_CUG_OA) || |
|
1428 (iMobileCallParams.iCug.iSuppressPrefCug != DMMTSY_CALL_CUG_PREF) || |
|
1429 (iMobileCallParams.iAutoRedial != DMMTSY_CALL_AUTO_REDIAL_FLAG)) |
|
1430 |
|
1431 error=KErrCorrupt; |
|
1432 } |
|
1433 else if(paramsV1.ExtensionId()==RMobileCall::KETelMobileCallParamsV2) |
|
1434 { |
|
1435 if (iMobileCallParams.iInterval != DMMTSY_CALL_INTERVAL) |
|
1436 error=KErrCorrupt; |
|
1437 |
|
1438 RMobileCall::TMobileCallParamsV2Pckg* mmParamsPckgV2 = (RMobileCall::TMobileCallParamsV2Pckg*)aCallParams; |
|
1439 RMobileCall::TMobileCallParamsV2& mmParamsV2 = (*mmParamsPckgV2)(); |
|
1440 |
|
1441 iMobileCallParams.iIdRestrict = mmParamsV2.iIdRestrict; |
|
1442 iMobileCallParams.iCug = mmParamsV2.iCug; |
|
1443 iMobileCallParams.iAutoRedial = mmParamsV2.iAutoRedial; |
|
1444 iMobileCallParams.iBearerMode = mmParamsV2.iBearerMode; |
|
1445 |
|
1446 if ((iMobileCallParams.iIdRestrict != DMMTSY_CALL_CLI_RESTRICT_SETTING1) || |
|
1447 (iMobileCallParams.iCug.iExplicitInvoke != DMMTSY_CALL_CUG_INVOKE) || |
|
1448 (iMobileCallParams.iCug.iCugIndex != DMMTSY_CALL_CUG_INDEX) || |
|
1449 (iMobileCallParams.iCug.iSuppressOA != DMMTSY_CALL_CUG_OA) || |
|
1450 (iMobileCallParams.iCug.iSuppressPrefCug != DMMTSY_CALL_CUG_PREF) || |
|
1451 (iMobileCallParams.iAutoRedial != DMMTSY_CALL_AUTO_REDIAL_FLAG) || |
|
1452 (iMobileCallParams.iBearerMode != DMMTSY_CALL_NEW_BEARER)) |
|
1453 { |
|
1454 error=KErrCorrupt; |
|
1455 } |
|
1456 } |
|
1457 else if (paramsV1.ExtensionId()==RMobileCall::KETelMobileCallParamsV7) |
|
1458 { |
|
1459 if (iMobileCallParams.iInterval != DMMTSY_CALL_INTERVAL) |
|
1460 error=KErrCorrupt; |
|
1461 |
|
1462 RMobileCall::TMobileCallParamsV7Pckg* mmParamsPckgV7 = (RMobileCall::TMobileCallParamsV7Pckg*)aCallParams; |
|
1463 RMobileCall::TMobileCallParamsV7& mmParamsV7 = (*mmParamsPckgV7)(); |
|
1464 |
|
1465 iMobileCallParams.iIdRestrict = mmParamsV7.iIdRestrict; |
|
1466 iMobileCallParams.iCug = mmParamsV7.iCug; |
|
1467 iMobileCallParams.iAutoRedial = mmParamsV7.iAutoRedial; |
|
1468 iMobileCallParams.iBearerMode = mmParamsV7.iBearerMode; |
|
1469 iMobileCallParams.iCallParamOrigin = mmParamsV7.iCallParamOrigin; |
|
1470 iMobileCallParams.iSubAddress = mmParamsV7.iSubAddress; |
|
1471 iMobileCallParams.iBearerCap1 = mmParamsV7.iBearerCap1; |
|
1472 iMobileCallParams.iBearerCap2 = mmParamsV7.iBearerCap2; |
|
1473 iMobileCallParams.iBCRepeatIndicator = mmParamsV7.iBCRepeatIndicator; |
|
1474 iMobileCallParams.iIconId.iQualifier = mmParamsV7.iIconId.iQualifier; |
|
1475 iMobileCallParams.iIconId.iIdentifier = mmParamsV7.iIconId.iIdentifier; |
|
1476 iMobileCallParams.iAlphaId = mmParamsV7.iAlphaId; |
|
1477 |
|
1478 if ((iMobileCallParams.iIdRestrict != DMMTSY_CALL_CLI_RESTRICT_SETTING1) || |
|
1479 (iMobileCallParams.iCug.iExplicitInvoke != DMMTSY_CALL_CUG_INVOKE) || |
|
1480 (iMobileCallParams.iCug.iCugIndex != DMMTSY_CALL_CUG_INDEX) || |
|
1481 (iMobileCallParams.iCug.iSuppressOA != DMMTSY_CALL_CUG_OA) || |
|
1482 (iMobileCallParams.iCug.iSuppressPrefCug != DMMTSY_CALL_CUG_PREF) || |
|
1483 (iMobileCallParams.iAutoRedial != DMMTSY_CALL_AUTO_REDIAL_FLAG) || |
|
1484 (iMobileCallParams.iBearerMode != DMMTSY_CALL_NEW_BEARER) || |
|
1485 (iMobileCallParams.iSubAddress != DMMTSY_CALL_SUBADDRESS) || |
|
1486 (iMobileCallParams.iBearerCap1 != DMMTSY_CALL_BEARER_CAP1) || |
|
1487 (iMobileCallParams.iBearerCap2 != DMMTSY_CALL_BEARER_CAP2) || |
|
1488 (iMobileCallParams.iBCRepeatIndicator != DMMTSY_CALL_BC_REPEAT_INDICATOR) || |
|
1489 (iMobileCallParams.iIconId.iQualifier != DMMTSY_CALL_ICON_ID_QUALIFIER) || |
|
1490 (iMobileCallParams.iIconId.iIdentifier != DMMTSY_CALL_ICON_ID_IDENTIFIER) || |
|
1491 (iMobileCallParams.iAlphaId != DMMTSY_CALL_ALPHA_ID)) |
|
1492 { |
|
1493 error=KErrCorrupt; |
|
1494 } |
|
1495 } |
|
1496 |
|
1497 if ((paramsV1.ExtensionId()==RMobileCall::KETelMobileDataCallParamsV1) || |
|
1498 (paramsV1.ExtensionId()==RMobileCall::KETelMobileDataCallParamsV2) || |
|
1499 (paramsV1.ExtensionId()==RMobileCall::KETelMobileDataCallParamsV8)) |
|
1500 { |
|
1501 RMobileCall::TMobileDataCallParamsV1Pckg* dataParamsPckgV1 = (RMobileCall::TMobileDataCallParamsV1Pckg*)aCallParams; |
|
1502 RMobileCall::TMobileDataCallParamsV1& dataParamsV1 = (*dataParamsPckgV1)(); |
|
1503 |
|
1504 iDataCallParams.iService = dataParamsV1.iService; |
|
1505 iDataCallParams.iSpeed = dataParamsV1.iSpeed; |
|
1506 iDataCallParams.iProtocol = dataParamsV1.iProtocol; |
|
1507 iDataCallParams.iQoS = dataParamsV1.iQoS; |
|
1508 iDataCallParams.iRLPVersion = dataParamsV1.iRLPVersion; |
|
1509 iDataCallParams.iV42bisReq = dataParamsV1.iV42bisReq; |
|
1510 iDataCallParams.iUseEdge = dataParamsV1.iUseEdge; |
|
1511 |
|
1512 if ((iDataCallParams.iService != DMMTSY_DATA_CALL_SERVICE) || |
|
1513 (iDataCallParams.iSpeed != DMMTSY_DATA_CALL_SPEED) || |
|
1514 (iDataCallParams.iProtocol != DMMTSY_DATA_CALL_PROTOCOL) || |
|
1515 (iDataCallParams.iQoS != DMMTSY_DATA_CALL_QOS) || |
|
1516 (iDataCallParams.iRLPVersion != DMMTSY_DATA_CALL_RLP) || |
|
1517 (iDataCallParams.iV42bisReq != DMMTSY_DATA_CALL_V42BIS) || |
|
1518 (iDataCallParams.iUseEdge != DMMTSY_DATA_CALL_EGPRS_REQUIRED)) |
|
1519 |
|
1520 error=KErrCorrupt; |
|
1521 } |
|
1522 |
|
1523 if ((paramsV1.ExtensionId()==RMobileCall::KETelMobileDataCallParamsV2) || |
|
1524 (paramsV1.ExtensionId()==RMobileCall::KETelMobileDataCallParamsV8)) |
|
1525 { |
|
1526 RMobileCall::TMobileDataCallParamsV2Pckg* dataParamsPckgV2 = (RMobileCall::TMobileDataCallParamsV2Pckg*)aCallParams; |
|
1527 RMobileCall::TMobileDataCallParamsV2& dataParamsV2 = (*dataParamsPckgV2)(); |
|
1528 |
|
1529 iDataCallParams.iBearerMode = dataParamsV2.iBearerMode; |
|
1530 |
|
1531 if (iDataCallParams.iBearerMode != DMMTSY_PHONE_MULTICALLBEARERMODE_NOTSUPPORTED) |
|
1532 |
|
1533 error=KErrCorrupt; |
|
1534 } |
|
1535 if (paramsV1.ExtensionId()==RMobileCall::KETelMobileDataCallParamsV8) |
|
1536 { |
|
1537 RMobileCall::TMobileDataCallParamsV8Pckg* dataParamsPckgV8 = (RMobileCall::TMobileDataCallParamsV8Pckg*)aCallParams; |
|
1538 RMobileCall::TMobileDataCallParamsV8& dataParamsV8 = (*dataParamsPckgV8)(); |
|
1539 |
|
1540 iDataCallParams.iCallParamOrigin = dataParamsV8.iCallParamOrigin; |
|
1541 iDataCallParams.iSubAddress = dataParamsV8.iSubAddress; |
|
1542 iDataCallParams.iBearerCap1 = dataParamsV8.iBearerCap1; |
|
1543 iDataCallParams.iBearerCap2 = dataParamsV8.iBearerCap2; |
|
1544 iDataCallParams.iBCRepeatIndicator = dataParamsV8.iBCRepeatIndicator; |
|
1545 iDataCallParams.iIconId.iIdentifier = dataParamsV8.iIconId.iIdentifier; |
|
1546 iDataCallParams.iIconId.iQualifier = dataParamsV8.iIconId.iQualifier; |
|
1547 iDataCallParams.iAlphaId = dataParamsV8.iAlphaId; |
|
1548 |
|
1549 if ((iDataCallParams.iCallParamOrigin != DMMTSY_CALL_PARAM_ORIGIN) || |
|
1550 (iDataCallParams.iSubAddress != DMMTSY_CALL_SUBADDRESS) || |
|
1551 (iDataCallParams.iBearerCap1 != DMMTSY_CALL_BEARER_CAP1) || |
|
1552 (iDataCallParams.iBearerCap2 != DMMTSY_CALL_BEARER_CAP2) || |
|
1553 (iDataCallParams.iBCRepeatIndicator != DMMTSY_CALL_BC_REPEAT_INDICATOR)|| |
|
1554 (iDataCallParams.iIconId.iIdentifier != DMMTSY_CALL_ICON_ID_IDENTIFIER) || |
|
1555 (iDataCallParams.iIconId.iQualifier != DMMTSY_CALL_ICON_ID_QUALIFIER) || |
|
1556 (iDataCallParams.iAlphaId != DMMTSY_CALL_ALPHA_ID)) |
|
1557 |
|
1558 error=KErrCorrupt; |
|
1559 } |
|
1560 |
|
1561 if ((paramsV1.ExtensionId()==RMobileCall::KETelMobileHscsdCallParamsV1) || |
|
1562 (paramsV1.ExtensionId()==RMobileCall::KETelMobileHscsdCallParamsV2) || |
|
1563 (paramsV1.ExtensionId()==RMobileCall::KETelMobileHscsdCallParamsV7) || |
|
1564 (paramsV1.ExtensionId()==RMobileCall::KETelMobileHscsdCallParamsV8)) |
|
1565 { |
|
1566 RMobileCall::TMobileHscsdCallParamsV1Pckg* hscsdParamsPckgV1 = (RMobileCall::TMobileHscsdCallParamsV1Pckg*)aCallParams; |
|
1567 RMobileCall::TMobileHscsdCallParamsV1& hscsdParamsV1 = (*hscsdParamsPckgV1)(); |
|
1568 |
|
1569 iDataCallParams.iWantedAiur = hscsdParamsV1.iWantedAiur; |
|
1570 iDataCallParams.iWantedRxTimeSlots = hscsdParamsV1.iWantedRxTimeSlots; |
|
1571 iDataCallParams.iMaxTimeSlots = hscsdParamsV1.iMaxTimeSlots; |
|
1572 iDataCallParams.iCodings = hscsdParamsV1.iCodings; |
|
1573 iDataCallParams.iAsymmetry = hscsdParamsV1.iAsymmetry; |
|
1574 iDataCallParams.iUserInitUpgrade = hscsdParamsV1.iUserInitUpgrade; |
|
1575 |
|
1576 if ((iDataCallParams.iWantedAiur != DMMTSY_CALL_HCSD_AIUR) || |
|
1577 (iDataCallParams.iWantedRxTimeSlots != DMMTSY_CALL_HCSD_TS) || |
|
1578 (iDataCallParams.iMaxTimeSlots != DMMTSY_CALL_HCSD_MAXTS) || |
|
1579 (iDataCallParams.iCodings != DMMTSY_CALL_HCSD_CODING) || |
|
1580 (iDataCallParams.iAsymmetry != DMMTSY_CALL_HCSD_ASYMMETRY) || |
|
1581 (iDataCallParams.iUserInitUpgrade != DMMTSY_CALL_HCSD_USER_IMI)) |
|
1582 |
|
1583 error=KErrCorrupt; |
|
1584 } |
|
1585 if ((paramsV1.ExtensionId()==RMobileCall::KETelMobileHscsdCallParamsV2) || |
|
1586 (paramsV1.ExtensionId()==RMobileCall::KETelMobileHscsdCallParamsV7) || |
|
1587 (paramsV1.ExtensionId()==RMobileCall::KETelMobileHscsdCallParamsV8)) |
|
1588 { |
|
1589 RMobileCall::TMobileHscsdCallParamsV2Pckg* hscsdParamsPckgV2 = (RMobileCall::TMobileHscsdCallParamsV2Pckg*)aCallParams; |
|
1590 RMobileCall::TMobileHscsdCallParamsV2& hscsdParamsV2 = (*hscsdParamsPckgV2)(); |
|
1591 |
|
1592 iDataCallParams.iBearerMode = hscsdParamsV2.iBearerMode; |
|
1593 |
|
1594 if ((iDataCallParams.iBearerMode != DMMTSY_CALL_NEW_BEARER)) |
|
1595 |
|
1596 error=KErrCorrupt; |
|
1597 } |
|
1598 |
|
1599 if ((paramsV1.ExtensionId()==RMobileCall::KETelMobileHscsdCallParamsV7) || |
|
1600 (paramsV1.ExtensionId()==RMobileCall::KETelMobileHscsdCallParamsV8)) |
|
1601 { |
|
1602 RMobileCall::TMobileHscsdCallParamsV7Pckg* hscsdParamsPckgV7 = (RMobileCall::TMobileHscsdCallParamsV7Pckg*)aCallParams; |
|
1603 RMobileCall::TMobileHscsdCallParamsV7& hscsdParamsV7 = (*hscsdParamsPckgV7)(); |
|
1604 |
|
1605 iDataCallParams.iCallParamOrigin = hscsdParamsV7.iCallParamOrigin; |
|
1606 iDataCallParams.iIconId = hscsdParamsV7.iIconId; |
|
1607 iDataCallParams.iAlphaId = hscsdParamsV7.iAlphaId; |
|
1608 |
|
1609 if ((iDataCallParams.iCallParamOrigin != DMMTSY_CALL_PARAM_ORIGIN) || |
|
1610 (iDataCallParams.iAlphaId != DMMTSY_CALL_ALPHA_ID)) |
|
1611 |
|
1612 error=KErrCorrupt; |
|
1613 } |
|
1614 |
|
1615 if (paramsV1.ExtensionId()==RMobileCall::KETelMobileHscsdCallParamsV8) |
|
1616 { |
|
1617 RMobileCall::TMobileHscsdCallParamsV8Pckg* hscsdParamsPckgV8 = (RMobileCall::TMobileHscsdCallParamsV8Pckg*)aCallParams; |
|
1618 RMobileCall::TMobileHscsdCallParamsV8& hscsdParamsV8 = (*hscsdParamsPckgV8)(); |
|
1619 |
|
1620 iDataCallParams.iBearerMode = hscsdParamsV8.iBearerMode; |
|
1621 iDataCallParams.iCallParamOrigin = hscsdParamsV8.iCallParamOrigin; |
|
1622 iDataCallParams.iIconId.iIdentifier = hscsdParamsV8.iIconId.iIdentifier; |
|
1623 iDataCallParams.iIconId.iQualifier = hscsdParamsV8.iIconId.iQualifier; |
|
1624 iDataCallParams.iAlphaId = hscsdParamsV8.iAlphaId; |
|
1625 iDataCallParams.iSubAddress = hscsdParamsV8.iSubAddress; |
|
1626 iDataCallParams.iBearerCap1 = hscsdParamsV8.iBearerCap1; |
|
1627 iDataCallParams.iBearerCap2 = hscsdParamsV8.iBearerCap2; |
|
1628 iDataCallParams.iBCRepeatIndicator = hscsdParamsV8.iBCRepeatIndicator; |
|
1629 |
|
1630 if ((iDataCallParams.iBearerMode != DMMTSY_CALL_NEW_BEARER) || |
|
1631 (iDataCallParams.iCallParamOrigin != DMMTSY_CALL_PARAM_ORIGIN) || |
|
1632 (iDataCallParams.iIconId.iIdentifier != DMMTSY_CALL_ICON_ID_IDENTIFIER) || |
|
1633 (iDataCallParams.iIconId.iQualifier != DMMTSY_CALL_ICON_ID_QUALIFIER) || |
|
1634 (iDataCallParams.iAlphaId != DMMTSY_CALL_ALPHA_ID)|| |
|
1635 (iDataCallParams.iSubAddress != DMMTSY_CALL_SUBADDRESS) || |
|
1636 (iDataCallParams.iBearerCap1 != DMMTSY_CALL_BEARER_CAP1) || |
|
1637 (iDataCallParams.iBearerCap2 != DMMTSY_CALL_BEARER_CAP2) || |
|
1638 (iDataCallParams.iBCRepeatIndicator != DMMTSY_CALL_BC_REPEAT_INDICATOR)) |
|
1639 { |
|
1640 error = KErrCorrupt; |
|
1641 } |
|
1642 } |
|
1643 |
|
1644 return error; |
|
1645 } |
|
1646 |
|
1647 TInt CCallDMmTsy::ActivateUUS(const TTsyReqHandle aTsyReqHandle, TDes8* aUUIRequest) |
|
1648 { |
|
1649 LOGTEXT(_L8("CCallDMmTsy::ActivateUUS called")); |
|
1650 |
|
1651 RMobileCall::TMobileCallUUSRequestV1Pckg* uuiReqPckg = (RMobileCall::TMobileCallUUSRequestV1Pckg*)aUUIRequest; |
|
1652 RMobileCall::TMobileCallUUSRequestV1& uuiReq = (*uuiReqPckg)(); |
|
1653 |
|
1654 if((uuiReq.iServiceReq != DMMTSY_CALL_UUI_SERVICE_REQ) || |
|
1655 (uuiReq.iUUI.Compare(DMMTSY_CALL_UUI_INFO_DIAL) !=0 )) |
|
1656 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
1657 else |
|
1658 iPhone->AddDelayedReq(aTsyReqHandle,this); |
|
1659 |
|
1660 return KErrNone; |
|
1661 } |
|
1662 |
|
1663 TInt CCallDMmTsy::ActivateUUSCancel(const TTsyReqHandle aTsyReqHandle) |
|
1664 { |
|
1665 LOGTEXT(_L8("CCallDMmTsy::ActivateUUSDuringCallCancel called")); |
|
1666 iPhone->RemoveDelayedReq(aTsyReqHandle); |
|
1667 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
1668 return KErrNone; |
|
1669 } |
|
1670 |
|
1671 TInt CCallDMmTsy::SendUUI(const TTsyReqHandle aTsyReqHandle, TBool* aMore, TDesC16* aUUI) |
|
1672 { |
|
1673 LOGTEXT(_L8("CCallDMmTsy::SendUUI called")); |
|
1674 if( (aUUI->Compare(DMMTSY_CALL_UUI_INFO) != 0) || |
|
1675 (*aMore != DMMTSY_CALL_UUI_MORE_INFO) ) |
|
1676 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
1677 else |
|
1678 iPhone->AddDelayedReq(aTsyReqHandle,this); |
|
1679 |
|
1680 return KErrNone; |
|
1681 } |
|
1682 |
|
1683 TInt CCallDMmTsy::SendUUICancel(const TTsyReqHandle aTsyReqHandle) |
|
1684 { |
|
1685 LOGTEXT(_L8("CCallDMmTsy::SendUUICancel called")); |
|
1686 iPhone->RemoveDelayedReq(aTsyReqHandle); |
|
1687 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
1688 return KErrNone; |
|
1689 } |
|
1690 |
|
1691 TInt CCallDMmTsy::ReceiveUUI(const TTsyReqHandle aTsyReqHandle, TDes16* aUUI) |
|
1692 { |
|
1693 LOGTEXT(_L8("CCallDMmTsy::ReceiveUUI called")); |
|
1694 |
|
1695 aUUI->Copy(DMMTSY_CALL_UUI_INFO); |
|
1696 |
|
1697 iPhone->AddDelayedReq(aTsyReqHandle,this); |
|
1698 |
|
1699 return KErrNone; |
|
1700 } |
|
1701 |
|
1702 TInt CCallDMmTsy::ReceiveUUICancel(const TTsyReqHandle aTsyReqHandle) |
|
1703 { |
|
1704 LOGTEXT(_L8("CCallDMmTsy::ReceiveUUICancel called")); |
|
1705 iPhone->RemoveDelayedReq(aTsyReqHandle); |
|
1706 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
1707 return KErrNone; |
|
1708 } |
|
1709 |
|
1710 TInt CCallDMmTsy::HangupWithUUI(const TTsyReqHandle aTsyReqHandle, TDesC16* aUUI) |
|
1711 { |
|
1712 LOGTEXT(_L8("CCallDMmTsy::HangupWithUUI called")); |
|
1713 |
|
1714 if(aUUI->Compare(DMMTSY_CALL_UUI_INFO_HANGUP) != 0) |
|
1715 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
1716 else |
|
1717 iPhone->AddDelayedReq(aTsyReqHandle, this); |
|
1718 |
|
1719 return KErrNone; |
|
1720 } |
|
1721 |
|
1722 TInt CCallDMmTsy::HangupWithUUICancel(const TTsyReqHandle aTsyReqHandle) |
|
1723 { |
|
1724 LOGTEXT(_L8("CCallDMmTsy::HangupWithUUICancel called")); |
|
1725 iPhone->RemoveDelayedReq(aTsyReqHandle); |
|
1726 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
1727 return KErrNone; |
|
1728 } |
|
1729 |
|
1730 TInt CCallDMmTsy::AnswerIncomingCallWithUUI(const TTsyReqHandle aTsyReqHandle, TDesC8* aCallParams, TDesC16* aUUI) |
|
1731 { |
|
1732 LOGTEXT(_L8("CCallDMmTsy::AnswerIncomingCallWithUUI called")); |
|
1733 |
|
1734 TInt error = ValidateCallParams(aCallParams); |
|
1735 |
|
1736 if((error != KErrNone) || (aUUI->Compare(DMMTSY_CALL_UUI_INFO_ANSWER) != 0)) |
|
1737 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
1738 else |
|
1739 iPhone->AddDelayedReq(aTsyReqHandle,this); |
|
1740 |
|
1741 return KErrNone; |
|
1742 } |
|
1743 |
|
1744 TInt CCallDMmTsy::AnswerIncomingCallWithUUICancel(const TTsyReqHandle aTsyReqHandle) |
|
1745 { |
|
1746 LOGTEXT(_L8("CCallDMmTsy::AnswerIncomingCallWithUUICancel called")); |
|
1747 iPhone->RemoveDelayedReq(aTsyReqHandle); |
|
1748 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
1749 return KErrNone; |
|
1750 } |
|
1751 |
|
1752 |
|
1753 TInt CCallDMmTsy::AnswerMultimediaCallAsVoice(const TTsyReqHandle aTsyReqHandle, TDesC8* aCallParams, TDes16* aCallName) |
|
1754 { |
|
1755 LOGTEXT(_L8("CCallDMmTsy::AnswerMultimediaCallAsVoice called")); |
|
1756 |
|
1757 TInt error = ValidateCallParams(aCallParams); |
|
1758 |
|
1759 *aCallName=DMMTSY_LINE_VOICE_NAME; |
|
1760 if(error != KErrNone) |
|
1761 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
1762 else |
|
1763 iPhone->AddDelayedReq(aTsyReqHandle,this); |
|
1764 |
|
1765 return KErrNone; |
|
1766 } |
|
1767 |
|
1768 TInt CCallDMmTsy::AnswerMultimediaCallAsVoiceCancel(const TTsyReqHandle aTsyReqHandle) |
|
1769 { |
|
1770 LOGTEXT(_L8("CCallDMmTsy::AnswerMultimediaCallAsVoiceCancel called")); |
|
1771 iPhone->RemoveDelayedReq(aTsyReqHandle); |
|
1772 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
1773 return KErrNone; |
|
1774 } |
|
1775 |
|
1776 TInt CCallDMmTsy::AnswerIncomingCallISV(const TTsyReqHandle aTsyReqHandle, TDesC8* aCallParams) |
|
1777 { |
|
1778 LOGTEXT(_L8("CCallDMmTsy::AnswerIncomingCallISV called")); |
|
1779 |
|
1780 TInt error = KErrNone; |
|
1781 |
|
1782 if(aCallParams) |
|
1783 { |
|
1784 |
|
1785 RMobileCall::TEtel3rdPartyMobileCallParamsV1Pckg* callparamsPckg= |
|
1786 reinterpret_cast<RMobileCall::TEtel3rdPartyMobileCallParamsV1Pckg*>(const_cast<TDesC8*>(aCallParams)); |
|
1787 RMobileCall::TEtel3rdPartyMobileCallParamsV1& callparams=(*callparamsPckg)(); |
|
1788 |
|
1789 // check that the request is a 3rd party request |
|
1790 if(callparams.ExtensionId() == RMobileCall::KETel3rdPartyCallParamsV1) |
|
1791 { |
|
1792 LOGTEXT(_L8("CCallDMmTsy::ANSWERINCOMINGCALLISV, request from 3rd party.")); |
|
1793 } |
|
1794 else |
|
1795 { |
|
1796 LOGTEXT(_L8("CCallDMmTsy::ANSWERINCOMINGCALLISV, request from non-3rd party.")); |
|
1797 error = KErrAccessDenied; |
|
1798 } |
|
1799 } |
|
1800 |
|
1801 else |
|
1802 { // No call parms data |
|
1803 error = KErrCorrupt; |
|
1804 } |
|
1805 |
|
1806 |
|
1807 if (error != KErrNone) |
|
1808 ReqCompleted(aTsyReqHandle,error); |
|
1809 else |
|
1810 iPhone->AddDelayedReq(aTsyReqHandle,this); |
|
1811 |
|
1812 return KErrNone; |
|
1813 |
|
1814 } |
|
1815 |
|
1816 TInt CCallDMmTsy::AnswerIncomingCallISVCancel(const TTsyReqHandle aTsyReqHandle) |
|
1817 { |
|
1818 LOGTEXT(_L8("CCallDMmTsy::AnswerIncomingCallISVCancel called")); |
|
1819 iPhone->RemoveDelayedReq(aTsyReqHandle); |
|
1820 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
1821 return KErrNone; |
|
1822 } |
|
1823 |
|
1824 TInt CCallDMmTsy::NotifyAudioToneEvent(const TTsyReqHandle aTsyReqHandle, TDes8* aAudioTone) |
|
1825 { |
|
1826 LOGTEXT(_L8("CCallDMmTsy::NotifyAudioToneEventChange called")); |
|
1827 |
|
1828 RMobileCall::TAudioToneV3Pckg* audioPckgV3 = (RMobileCall::TAudioToneV3Pckg*)aAudioTone; |
|
1829 RMobileCall::TAudioToneV3& audioTone = (*audioPckgV3)(); |
|
1830 |
|
1831 switch(iNotifyAudioToneEvent++) |
|
1832 { |
|
1833 case 0: |
|
1834 audioTone.iEvent = DMMTSY_AUDIO_START_TONE; |
|
1835 audioTone.iTone = DMMTSY_AUDIO_CONGESTION_TONE; |
|
1836 audioTone.iPlayedLocally = DMMTSY_AUDIO_PLAYED_LOCALLY; |
|
1837 ReqCompleted(aTsyReqHandle,KErrNone); |
|
1838 break; |
|
1839 case 1: |
|
1840 audioTone.iEvent = DMMTSY_AUDIO_STOP_TONE; |
|
1841 audioTone.iTone = DMMTSY_AUDIO_NO_TONE; |
|
1842 audioTone.iPlayedLocally = DMMTSY_AUDIO_PLAYED_LOCALLY; |
|
1843 iPhone->AddDelayedReq(aTsyReqHandle,this); |
|
1844 break; |
|
1845 default: |
|
1846 break; |
|
1847 } |
|
1848 return KErrNone; |
|
1849 } |
|
1850 |
|
1851 TInt CCallDMmTsy::NotifyAudioToneEventCancel(const TTsyReqHandle aTsyReqHandle) |
|
1852 { |
|
1853 LOGTEXT(_L8("CCallDMmTsy::NotifyAudioToneEventChangeCancel called")); |
|
1854 iPhone->RemoveDelayedReq(aTsyReqHandle); |
|
1855 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
1856 return KErrNone; |
|
1857 } |