|
1 /* |
|
2 * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CMMCALLGSMWCDMAEXT_H |
|
21 #define CMMCALLGSMWCDMAEXT_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <featmgr/featurecontrol.h> |
|
25 #include "cmmcallextinterface.h" |
|
26 #include "CMmPrivateUtility.h" |
|
27 |
|
28 #include "ctsysystemstatepluginhandler.h" |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 class CMmCallTsy; |
|
32 class CMmMessageManagerBase; |
|
33 |
|
34 // CLASS DECLARATION |
|
35 |
|
36 /** |
|
37 * CMmCallGsmWcdmaExt contains mode-dependent phone functionality for GSM |
|
38 * Calls. Extension request handles are stored in MM Call objects. |
|
39 */ |
|
40 NONSHARABLE_CLASS( CMmCallGsmWcdmaExt ) : public CMmCallExtInterface, public MCtsySsmPluginCallback |
|
41 { |
|
42 public: // Constructors and destructor |
|
43 |
|
44 /** |
|
45 * Two-phased constructor. |
|
46 * |
|
47 * |
|
48 * @param aMmCallTsy Pointer to the created object |
|
49 * @param aMmCallMessHandler Pointer to call message handler |
|
50 * @param aMode Call mode |
|
51 * @param aMessageManager Pointer to the Message Manager |
|
52 * @return Pointer to the created object |
|
53 */ |
|
54 static CMmCallGsmWcdmaExt* NewL( CMmCallTsy* aMmCallTsy, |
|
55 RMobilePhone::TMobileService aMode, |
|
56 CMmMessageManagerBase* aMessageManager ); |
|
57 |
|
58 |
|
59 /** |
|
60 * Destructor. |
|
61 * |
|
62 * |
|
63 */ |
|
64 ~CMmCallGsmWcdmaExt(); |
|
65 |
|
66 /** |
|
67 * This method sets RF state |
|
68 * |
|
69 * |
|
70 * @param aRfState New RF state |
|
71 * @param aSsmPluginCallback pointer to callback interface |
|
72 */ |
|
73 void SetRfState( TRfStateInfo aRfState, MCtsySsmPluginCallback* aSsmPluginCallback, TCtsySsmCallbackData& aCallbackData ); |
|
74 |
|
75 |
|
76 /** |
|
77 * From CMmCallExtInterface Dials a voice call |
|
78 * |
|
79 * |
|
80 * @param aAlsLineInfo ALS line information |
|
81 * @param aCallParams Call parameters |
|
82 * @param aTelNumber Phone number to be called |
|
83 * @param aExtensionId |
|
84 * @return KErrNone or error code |
|
85 */ |
|
86 TInt DialL( RMobilePhone::TMobileService aAlsLineInfo, |
|
87 const TDesC8* aCallParams, |
|
88 const TDesC* aTelNumber, |
|
89 TInt aExtensionId ); |
|
90 |
|
91 /** |
|
92 * From CMmCallExtInterface Answer incoming call |
|
93 * |
|
94 * |
|
95 * @param aCallId Call ID of the call to be answered |
|
96 * @param aExtensionId |
|
97 * @return KErrNone or error code |
|
98 */ |
|
99 TInt AnswerIncomingCallL( TInt aCallId, TInt aExtensionId ); |
|
100 |
|
101 /** |
|
102 * From CMmCallExtInterface Get GSM specific call parameters |
|
103 * |
|
104 * |
|
105 * @param aParams Pointer to parameters package |
|
106 */ |
|
107 void GetCallParams( TDes8* aParams ); |
|
108 |
|
109 /** |
|
110 * From CMmCallExtInterface This method is used to hold an active call |
|
111 * |
|
112 * @param aCallId Call Id of the operation's target call |
|
113 * @return KErrNone or error code |
|
114 */ |
|
115 TInt HoldL( TInt aCallId ); |
|
116 |
|
117 /** |
|
118 * From CMmCallExtInterface This method is used to resume a held call |
|
119 * |
|
120 * |
|
121 * @param aCallId Call Id of the operation's target call |
|
122 * @return KErrNone or error code |
|
123 */ |
|
124 TInt ResumeL( TInt aCallId ); |
|
125 |
|
126 /** |
|
127 * From CMmCallExtInterface This method is used to swap between active |
|
128 * and held calls |
|
129 * |
|
130 * |
|
131 * @param aCallId Call Id of the operation's target call |
|
132 * @return KErrNone or error code |
|
133 */ |
|
134 TInt SwapL( TInt aCallId ); |
|
135 |
|
136 /** |
|
137 * From CMmCallExtInterface This method requests a private communication |
|
138 * to the remote party of one call within a conference call. |
|
139 * |
|
140 * |
|
141 * @param aCallId Call Id of the operation's target call |
|
142 * @return KErrNone or error code |
|
143 */ |
|
144 TInt GoOneToOneL( TInt aCallId ); |
|
145 |
|
146 /** |
|
147 * From CMmCallExtInterface Dial an emergency call |
|
148 * |
|
149 * |
|
150 * @param aCallbackData |
|
151 * @return KErrNone or error code |
|
152 */ |
|
153 TInt DialEmergencyCall(TCtsySsmCallbackData& aCallbackData ); |
|
154 |
|
155 |
|
156 /** |
|
157 * From CMmCallExtInterface Deflect an incoming call to another |
|
158 * destination |
|
159 * |
|
160 * |
|
161 * @param aData Packaged parameters |
|
162 * @return KErrNone or error code |
|
163 */ |
|
164 TInt DeflectL( const TDataPackage& aData ); |
|
165 |
|
166 /** |
|
167 * From CMmCallExtInterface Informs GSM extension about the current |
|
168 * status. |
|
169 * |
|
170 * |
|
171 * @param aCallStatus Current call status |
|
172 * @return KErrNone or error code |
|
173 */ |
|
174 TInt CompleteNotifyStatusChange( |
|
175 RMobileCall::TMobileCallStatus aCallStatus ); |
|
176 |
|
177 /** |
|
178 * From CMmCallExtInterface Get GSM specific mobile call capabilities. |
|
179 * |
|
180 * |
|
181 * @param aCallCapsV1: a reference to the parameter object to be filled |
|
182 */ |
|
183 void GetMobileCallCapsV1( |
|
184 RMobileCall::TMobileCallCapsV1& aCallCapsV1 ); |
|
185 |
|
186 |
|
187 /** |
|
188 * From CMmCallExtInterface Set GSM specific mobile call capabilities. |
|
189 * |
|
190 * |
|
191 * @return aCaps New call capabilities |
|
192 */ |
|
193 void SetGSMCallCaps( |
|
194 const RMobileCall::TMobileCallCapsV1* aCaps ); |
|
195 |
|
196 /** |
|
197 * From CMmCallExtInterface Adds requested caps to GSM specific mobile |
|
198 * call capabilities. |
|
199 * |
|
200 * |
|
201 * @param aCaps Call capabilities to be added |
|
202 */ |
|
203 void AddGSMCallCaps( TUint32 aCaps ); |
|
204 |
|
205 /** |
|
206 * From CMmCallExtInterface Removes requested caps from GSM specific |
|
207 * mobile call capabilities. |
|
208 * |
|
209 * |
|
210 * @param aCaps Call capabilities to be removed |
|
211 */ |
|
212 void RemoveGSMCallCaps( TUint32 aCaps ); |
|
213 |
|
214 /** |
|
215 * From CMmCallExtInterface Transfer call to another destination |
|
216 * |
|
217 * |
|
218 * @return KErrNone or error code |
|
219 */ |
|
220 TInt TransferL(); |
|
221 |
|
222 /** |
|
223 * From CMmCallExtInterface Resets call internal attributes. |
|
224 * |
|
225 * |
|
226 */ |
|
227 void ResetInternalAttributes(); |
|
228 |
|
229 /** |
|
230 * From CMmCallExtInterface Fill mobile call information in the infoV1 |
|
231 * given as parameter |
|
232 * |
|
233 * |
|
234 * @return aInfoV1 Current Mobile Call Information |
|
235 * @return KErrNone or error code |
|
236 */ |
|
237 TInt FillMobileCallInfo( |
|
238 RMobileCall::TMobileCallInfoV1* aInfoV1 ); |
|
239 |
|
240 |
|
241 /** |
|
242 * From CMmCallExtInterface Fill mobile call information in the infoV3 |
|
243 * given as parameter |
|
244 * |
|
245 * |
|
246 * @return aInfoV3 Current Mobile Call Information |
|
247 * @return KErrNone or error code |
|
248 */ |
|
249 TInt FillMobileCallInfoV3( |
|
250 RMobileCall::TMobileCallInfoV3* aInfoV3 ); |
|
251 |
|
252 /** |
|
253 * From CMmCallExtInterface Fill mobile call information in the infoV7 |
|
254 * given as parameter |
|
255 * |
|
256 * |
|
257 * @return aInfoV7 Current Mobile Call Information |
|
258 * @return KErrNone or error code |
|
259 */ |
|
260 TInt FillMobileCallInfoV7( |
|
261 RMobileCall::TMobileCallInfoV7* aInfoV7 ); |
|
262 |
|
263 /** |
|
264 * From CMmCallExtInterface Fill mobile call information in the infoV8 |
|
265 * given as parameter |
|
266 * |
|
267 * |
|
268 * @return aInfoV8 Current Mobile Call Information |
|
269 * @return KErrNone or error code |
|
270 */ |
|
271 TInt FillMobileCallInfoV8( |
|
272 RMobileCall::TMobileCallInfoV8* aInfoV8); |
|
273 |
|
274 /** |
|
275 * From CMmCallExtInterface Fills in the remote party info in the |
|
276 * infoV1Pckg given as parameter |
|
277 * |
|
278 * |
|
279 * @return aInfoV1Pckg Current remote party information |
|
280 */ |
|
281 TInt GetRemotePartyInfo( |
|
282 RMobileCall::TMobileCallRemotePartyInfoV1Pckg* aInfoV1Pckg ); |
|
283 |
|
284 /** |
|
285 * From CMmCallExtInterface Sets mobile call data |
|
286 * |
|
287 * |
|
288 * @param aDataPackage New mobile call data |
|
289 * @param aCallDirection New call direction |
|
290 */ |
|
291 void SetMobileCallData( |
|
292 CMmDataPackage* aDataPackage, |
|
293 RMobileCall::TMobileCallDirection aCallDirection ); |
|
294 |
|
295 //CSD/HSCSD methods |
|
296 |
|
297 /** |
|
298 * Return GSM specific data call capabilities. |
|
299 * |
|
300 * |
|
301 * @param aCallDataCapsV1: a reference to the parameter object to be filled |
|
302 */ |
|
303 void GetMobileDataCallCapsV1( |
|
304 RMobileCall::TMobileCallDataCapsV1& aCallDataCapsV1 ); |
|
305 |
|
306 /** |
|
307 * Received GSM specific data call capabilities. |
|
308 * |
|
309 * |
|
310 * @param aCaps: New data call caps |
|
311 */ |
|
312 void ReceivedMobileDataCallCaps( |
|
313 RMobileCall::TMobileCallDataCapsV1* aCaps ); |
|
314 |
|
315 /** |
|
316 * Set GSM specific dynamic HSCSD parameters. |
|
317 * |
|
318 * |
|
319 * @param RMobileCall::TMobileCallAiur* aAiur: Wanted rate |
|
320 * @param TInt* aRxTimeslots: Wanted RX timeslots |
|
321 * @return: KErrNone or KErrNotFound |
|
322 */ |
|
323 TInt SetDynamicHscsdParamsL( |
|
324 RMobileCall::TMobileCallAiur* aAiur, |
|
325 TInt* aRxTimeslots ); |
|
326 |
|
327 /** |
|
328 * Return GSM specific current HSCSD info. |
|
329 * |
|
330 * |
|
331 * @param Current HSCSD info |
|
332 * @return KErrNone or KErrETelCallNotActive |
|
333 */ |
|
334 TInt GetCurrentHscsdInfo( TDes8* aHSCSDInfo ); |
|
335 |
|
336 /** |
|
337 * Return GSM specific bearer service info. |
|
338 * |
|
339 * |
|
340 * @param RCall::TBearerService* aBearerService: Bearer service info |
|
341 * @return : KErrNone |
|
342 */ |
|
343 TInt GetBearerServiceInfo( |
|
344 RCall::TBearerService* aBearerService ); |
|
345 |
|
346 /** |
|
347 * Dial for data calls. |
|
348 * |
|
349 * |
|
350 * @parama CallMode: call mode |
|
351 * @parama CallParams: call parameters |
|
352 * @param aTelNumber: phone number to be called |
|
353 * @return : KErrNone or error code from DP |
|
354 */ |
|
355 TInt DialDataCallL( |
|
356 RMobilePhone::TMobileService aCallMode, |
|
357 const TDesC8* aCallParams, |
|
358 const TDesC* aTelNumber ); |
|
359 |
|
360 /** |
|
361 * From CMmCallExtInterface Answer incoming data call |
|
362 * |
|
363 * |
|
364 * @param aCallId Call ID of the call to be answered |
|
365 * @return KErrNone or error code |
|
366 */ |
|
367 TInt AnswerIncomingDataCallL( TInt aCallId ); |
|
368 |
|
369 /** |
|
370 * Copy received bearer service info. |
|
371 * |
|
372 * |
|
373 * @param Bearer service info |
|
374 */ |
|
375 void ReceivedBearerServiceInfo( |
|
376 RCall::TBearerService aBearerService ); |
|
377 |
|
378 /** |
|
379 * Sets correct data call attributes. |
|
380 * |
|
381 * |
|
382 * @param Call parameters |
|
383 */ |
|
384 void Connect( const TDesC8* aCallParams ); |
|
385 |
|
386 /** |
|
387 * Stores new CALL/CSD parameters. |
|
388 * |
|
389 * |
|
390 * @param aDataPackage: call parameters |
|
391 */ |
|
392 void ReceivedCallParams( |
|
393 const CMmDataPackage* aDataPackage ); |
|
394 |
|
395 /** |
|
396 * Copies data call parameters to another variable without extension |
|
397 * id |
|
398 * |
|
399 * |
|
400 * @param destination parameter |
|
401 * @param source parameter |
|
402 */ |
|
403 void CopyMobileDataCallParams( |
|
404 RMobileCall::TMobileDataCallParamsV1& aDestination, |
|
405 const RMobileCall::TMobileDataCallParamsV1& aSource ) const; |
|
406 |
|
407 /** |
|
408 * Received extension specific HSCSD info. |
|
409 * |
|
410 * |
|
411 * @param aDataPackage |
|
412 */ |
|
413 void ReceivedHscsdInfo( |
|
414 CMmDataPackage* aDataPackage ); |
|
415 |
|
416 /** |
|
417 * Received extension specific data call capabilities. |
|
418 * |
|
419 * |
|
420 * @param New data call capabilities and |
|
421 * data call mode |
|
422 */ |
|
423 void ReceivedMobileDataCallCaps( |
|
424 CMmDataPackage* aDataPackage ); |
|
425 |
|
426 public: // Functions from MCtsySsmPluginCallback |
|
427 |
|
428 /** CMmCallGsmWcdmaExt::SsmPluginCallback |
|
429 * This is callback |
|
430 * This method is called from System State Manager (or from CMmCallGsmWcdmaExt, if there |
|
431 * is no reason to change RF state), after RF state changing |
|
432 * |
|
433 * @param aResult -- result returned either from SSM |
|
434 */ |
|
435 void SsmPluginCallback(TInt aResult, TCtsySsmCallbackData& aCallbackData); |
|
436 |
|
437 |
|
438 private: // Constructors and destructor |
|
439 |
|
440 /** |
|
441 * C++ default constructor. |
|
442 * |
|
443 * |
|
444 */ |
|
445 CMmCallGsmWcdmaExt(); |
|
446 |
|
447 /** |
|
448 * Second phase constructor of CMmCallGsmWcdmaExt. |
|
449 * |
|
450 * |
|
451 */ |
|
452 void ConstructL(); |
|
453 |
|
454 /** |
|
455 * This method updates call capabilities in case that there is only |
|
456 * one non-idle call |
|
457 * |
|
458 * |
|
459 * @param aCallStatus Current status of this call |
|
460 * @return KErrNone or error code |
|
461 */ |
|
462 TInt UpdateSingleCallControlCaps( |
|
463 RMobileCall::TMobileCallStatus aCallStatus ); |
|
464 |
|
465 /** |
|
466 * This method updates call capabilities in case that there are two |
|
467 * calls in non-idle state and they are not in a conference. |
|
468 * |
|
469 * |
|
470 * @param aCallStatus Current status of this call |
|
471 * @return KErrNone or error code |
|
472 */ |
|
473 TInt UpdateDoubleCallControlCaps( |
|
474 RMobileCall::TMobileCallStatus aCallStatus ); |
|
475 |
|
476 /** |
|
477 * This method updates call capabilities in case that conference call |
|
478 * is going on. |
|
479 * |
|
480 * |
|
481 * @param aCallStatus Current status of this call |
|
482 * @return KErrNone or error code |
|
483 */ |
|
484 TInt UpdateMultipleCallControlCaps( |
|
485 RMobileCall::TMobileCallStatus aCallStatus); |
|
486 |
|
487 //CSD/HSCSD methods |
|
488 /** |
|
489 * Sets data call service, protocol and QoS caps in CSD/HSCSD |
|
490 * |
|
491 * |
|
492 * @param const aCallParams: Call parameters |
|
493 * @return KErrNone |
|
494 */ |
|
495 void SetDataCaps( const TDesC8* aCallParams ); |
|
496 |
|
497 |
|
498 private: // Data |
|
499 |
|
500 /** |
|
501 * Pointer to the mode independent call object |
|
502 */ |
|
503 CMmCallTsy* iMmCallTsy; |
|
504 |
|
505 /** |
|
506 * call mode |
|
507 */ |
|
508 RMobilePhone::TMobileService iSymbianCallMode; |
|
509 |
|
510 /** |
|
511 * Call parameters |
|
512 */ |
|
513 RMobileCall::TMobileCallParamsV7 iCallParams; |
|
514 |
|
515 /** |
|
516 * Dynamic call capabilities |
|
517 */ |
|
518 RMobileCall::TMobileCallCapsV1 iMobileCallCaps; |
|
519 |
|
520 /** |
|
521 * Current mobile call info |
|
522 */ |
|
523 RMobileCall::TMobileCallInfoV8 iMobileCallInfo; |
|
524 |
|
525 /** |
|
526 * Tells if Join flag should be enabled for this calls when it enters |
|
527 * the connected state |
|
528 */ |
|
529 TBool iEnableJoinFlag; |
|
530 |
|
531 /** |
|
532 * pointer to the message manager |
|
533 * Not own. |
|
534 */ |
|
535 CMmMessageManagerBase* iMessageManager; |
|
536 |
|
537 /** |
|
538 * Data call mode (CSD or HSCSD) |
|
539 */ |
|
540 TDataCallMode iDataCallMode; |
|
541 |
|
542 /** |
|
543 * Bearer service information for data call |
|
544 */ |
|
545 RCall::TBearerService iBearerService; |
|
546 |
|
547 /** |
|
548 * Dynamic data call caps |
|
549 */ |
|
550 RMobileCall::TMobileCallDataCapsV1* iDataCallCaps; |
|
551 |
|
552 /** |
|
553 * CSD parameters |
|
554 */ |
|
555 RMobileCall::TMobileDataCallParamsV1* iCSDParams; |
|
556 |
|
557 /** |
|
558 * HSCSD parameters |
|
559 */ |
|
560 RMobileCall::TMobileHscsdCallParamsV1* iHSCSDParams; |
|
561 |
|
562 /** |
|
563 * Current HSCSD call info |
|
564 */ |
|
565 RMobileCall::TMobileCallHscsdInfoV8* iCurrentHSCSDInfo; |
|
566 |
|
567 /** |
|
568 * Tells if HSCSD info has been received or not |
|
569 */ |
|
570 TBool iInformationReceived; |
|
571 |
|
572 /** |
|
573 * Used to query for supported features |
|
574 */ |
|
575 RFeatureControl iFeatureControl; |
|
576 |
|
577 /** |
|
578 * Tells if Feature Manager is available. Will be EFalse if |
|
579 * RFeatureControl::Open fails to connect to the Feature Manager |
|
580 */ |
|
581 TBool iUsingFeatureManager; |
|
582 |
|
583 // Pointer to SystemStatePlugin |
|
584 CCtsySystemStatePluginHandler* iSystemStatePluginHandler; |
|
585 }; |
|
586 |
|
587 #endif // CMMCALLGSMWCDMAEXT_H |
|
588 |
|
589 // End of File |