|
1 /* |
|
2 * Copyright (c) 2003 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 the License "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 * Declaration of class CBrowserTelService. |
|
16 * |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 // INCLUDE FILES |
|
22 #ifndef __BROWSERTELSERVICE_H |
|
23 #define __BROWSERTELSERVICE_H |
|
24 |
|
25 #include "BrowserTelServiceEtelWatcher.h" |
|
26 |
|
27 #include <e32def.h> //resolve NULL redefinition warning (conflict with time.h). |
|
28 #include <e32base.h> |
|
29 #include <etel.h> |
|
30 #include <etelmm.h> |
|
31 #include <f32file.h> |
|
32 #include <AknProgressDialog.h> |
|
33 #include <AknWaitDialog.h> |
|
34 #include <ConnectionObservers.h> |
|
35 #include <ApEngineConsts.h> |
|
36 #include <errorui.h> |
|
37 #include <bldvariant.hrh> |
|
38 #include <ConeResLoader.h> |
|
39 |
|
40 #ifdef __BROWSER_TEL_SERVICES_CALLUI__ |
|
41 // AIW related headers |
|
42 #include <AiwServiceHandler.h> |
|
43 |
|
44 |
|
45 #include <AiwDialData.h> |
|
46 #include <AiwDialDataExt.h> |
|
47 |
|
48 |
|
49 #endif // __BROWSER_TEL_SERVICES_CALLUI__ |
|
50 |
|
51 #define JAPANESE ( FeatureManager::FeatureSupported( KFeatureIdJapanese ) ) |
|
52 |
|
53 // FORWARD DECLARATIONS |
|
54 class MBrowserTelServiceObserver; |
|
55 class CSendAppUi; |
|
56 class CContactIdArray; |
|
57 class CPbkContactEngine; |
|
58 class CPbkContactItem; |
|
59 |
|
60 // DATA TYPES |
|
61 enum TBrowserTelServiceState |
|
62 { |
|
63 EIdle, |
|
64 EDialing, |
|
65 EDialingDTMF, |
|
66 EConnected |
|
67 }; |
|
68 |
|
69 enum TBrowserTelServiceError |
|
70 { |
|
71 ESendDTMFFailed |
|
72 }; |
|
73 |
|
74 enum TBrowserTelServiceDlgType |
|
75 { |
|
76 EConfirmMakeCall, |
|
77 EConfirmSendDTMF, |
|
78 EConfirmAddToPb, |
|
79 ESendingDTMF |
|
80 }; |
|
81 |
|
82 enum TMatchType |
|
83 { |
|
84 EPhoneNumber, |
|
85 EEmail |
|
86 }; |
|
87 |
|
88 // CONSTANTS |
|
89 |
|
90 const TUid KUidBrowserApplication = { 0x10008D39 }; |
|
91 |
|
92 // The Central Repository key used to determine how BrowserTelService |
|
93 // should handle a 'mailto' attribute of an html link element: |
|
94 // 0 = email; 1 = MMS composer |
|
95 const TUint32 KBrowserMailtoSendingApp = 0x00000004; |
|
96 |
|
97 // Return values |
|
98 const TInt KErrInvocationError = (-200); |
|
99 const TInt KErrNoCallActive = (-108); // KErrGsmNoCallActive |
|
100 const TInt KErrUserNoAnswer = (-107); // KErrGsmCCUserNoAnswer |
|
101 const TInt KErrNoService = (-106); // KErrGsmNoService |
|
102 const TInt KErrUserBusy = (-105); // KErrGsmCCUserBusy |
|
103 const TInt KErrPBPhoneBookFull = (-104); |
|
104 const TInt KErrPBWriteError = (-103); |
|
105 const TInt KErrPBNumberTooLong = (-102); |
|
106 const TInt KErrPBNameTooLong = (-100); |
|
107 const TInt KErrUnspecified = (-1); |
|
108 |
|
109 // CLASS DECLARATION |
|
110 |
|
111 /** |
|
112 * Implements telephony services for browser. |
|
113 * This class implements required telephony services for multipurpose browser. |
|
114 */ |
|
115 class CBrowserTelService : public CActive, |
|
116 public MBrowserTelServiceEtelWatcherObserver, |
|
117 public MConnectionStageObserver, |
|
118 #ifdef __BROWSER_TEL_SERVICES_CALLUI__ |
|
119 public MAiwNotifyCallback, |
|
120 #endif // __BROWSER_TEL_SERVICES_CALLUI__ |
|
121 public MProgressDialogCallback |
|
122 { |
|
123 public: // Constructors and destructor |
|
124 /** |
|
125 * Destructor. |
|
126 */ |
|
127 IMPORT_C ~CBrowserTelService(); |
|
128 |
|
129 /** |
|
130 * Two-phased constructor. Leaves on failure. |
|
131 * @param aObserver The observer for CBrowserTelService. |
|
132 * Defaults to NULL. |
|
133 * @return The constructed CBrowserTelService object. |
|
134 */ |
|
135 IMPORT_C static CBrowserTelService* NewL( MBrowserTelServiceObserver* |
|
136 aObserver = NULL ); |
|
137 IMPORT_C static CBrowserTelService* NewLC( MBrowserTelServiceObserver* |
|
138 aObserver = NULL ); |
|
139 |
|
140 /** |
|
141 * Parses given phone number. If specified number contains DTMF |
|
142 * sequence it will be |
|
143 * extracted from the phone number. |
|
144 * @param aNumber. Phone number with possible DTMF sequence. |
|
145 * @return The extracted DTMF sequence |
|
146 */ |
|
147 IMPORT_C HBufC* ParsePhoneNumberL( TDes* aNumber ); |
|
148 |
|
149 public: // New functions |
|
150 /** |
|
151 * Call the given phone number synchronously. |
|
152 * @param aNumber The phone number to be called. |
|
153 * @return Typically KErrNone or another of the system-wide error codes. |
|
154 * |
|
155 * NOTE: If the specified phone number contains DTMF sequence, it will |
|
156 * be extracted from the number. After the call has been established |
|
157 * the dtmf sequence will be send immediately. This function will |
|
158 * return after the dtmf sending has |
|
159 * been handled. |
|
160 */ |
|
161 IMPORT_C TInt MakeCall( TDesC& aNumber, TBool aSendDTMFAlwaysConfirm ); |
|
162 |
|
163 /** |
|
164 * Call the given phone number asynchronously. |
|
165 * @param aStatus Request status. |
|
166 * @param aNumber The phone number to be called. |
|
167 * @return Typically KErrNone or another of the system-wide error codes. |
|
168 * |
|
169 * NOTE: If the specified phone number contains DTMF sequence then it |
|
170 * will be extracted from the number. After the call has been |
|
171 * established the dtmf sequence will be sent immediately. |
|
172 */ |
|
173 IMPORT_C void MakeCall( TRequestStatus& aStatus, TDesC& aNumber, |
|
174 TBool aSendDTMFAlwaysConfirm ); |
|
175 |
|
176 /** |
|
177 * Cancel the request set with |
|
178 * MakeCallL(TRequestStatus& aStatus,TDesC& aNumber) |
|
179 */ |
|
180 IMPORT_C void CancelMakeCall(); |
|
181 |
|
182 /** |
|
183 * Send given DTMF sequence (needs an active call) synchronously. |
|
184 * @param aNumber DTMF number. |
|
185 * @return Typically KErrNone or another of the system-wide error codes. |
|
186 */ |
|
187 IMPORT_C TInt SendDTMF( TDesC& aNumber, TBool aSendDTMFAlwaysConfirm ); |
|
188 |
|
189 /** |
|
190 * Send given DTMF sequence (needs an active call) asynchronously. |
|
191 * @param aStatus Request status. |
|
192 * @param aNumber DTMF number. |
|
193 * @return Typically KErrNone or another of the system-wide error codes. |
|
194 */ |
|
195 IMPORT_C void SendDTMF( TRequestStatus& aStatus,TDesC& aNumber, |
|
196 TBool aSendDTMFAlwaysConfirm ); |
|
197 |
|
198 /** |
|
199 * Cancel the request set with SendDTMFL(). |
|
200 */ |
|
201 IMPORT_C void CancelSendDTMFL(); |
|
202 |
|
203 /** |
|
204 * Create a new phonebook entry. Draw up a dialog. Fill its names, |
|
205 * and phonenumber fields with the given values. |
|
206 * @param aNumber Phone number |
|
207 * @param aName Name |
|
208 * @param aEmail Email address |
|
209 * @return always KErrNone |
|
210 */ |
|
211 IMPORT_C TInt AddPBEntryL( TDesC& aNumber, |
|
212 TDesC& aName, |
|
213 TDesC& aEmail ); |
|
214 |
|
215 /** |
|
216 * Current state of the engine |
|
217 * @return TBrowserTelServiceState |
|
218 */ |
|
219 IMPORT_C TBrowserTelServiceState State() const; |
|
220 |
|
221 /** |
|
222 * Add observer. Observers are notified whenever |
|
223 * the engine state changes. |
|
224 * @param aObserver The Observer. |
|
225 */ |
|
226 IMPORT_C void AddObserver( MBrowserTelServiceObserver* aObserver ); |
|
227 |
|
228 /** |
|
229 * Remove observer. |
|
230 * @param aObserver The Observer. |
|
231 */ |
|
232 IMPORT_C void RemoveObserver( MBrowserTelServiceObserver* aObserver ); |
|
233 |
|
234 /** |
|
235 * Create the message and open up the email editor as ready to send. |
|
236 * @param aToRecipients To recipients. |
|
237 * @param aCcRecipients Cc recipients. |
|
238 * @param aParams Other parameters ??. |
|
239 * @param aBody Body text. |
|
240 * @return Typically KErrNone or another of the system-wide error codes. |
|
241 */ |
|
242 IMPORT_C TInt SendEmailMessageL( const TDesC& aToRecipients, |
|
243 const TDesC& aCcRecipients, |
|
244 const TDesC& /*aParams*/, |
|
245 const TDesC& aBody ); |
|
246 /** |
|
247 * Create the message and open up the email editor as ready to send. |
|
248 * @param aToRecipients To recipients. |
|
249 * @param aCcRecipients Cc recipients. |
|
250 * @param aParams Other parameters ??. |
|
251 * @param aBody Body text. |
|
252 * @param aLaunchEmbedded information to launch embedded mode or not |
|
253 * @return Typically KErrNone or another of the system-wide error codes. |
|
254 */ |
|
255 IMPORT_C TInt SendEmailMessageL( const TDesC& aToRecipients, |
|
256 const TDesC& aCcRecipients, |
|
257 const TDesC& aParams, |
|
258 const TDesC& aBody, |
|
259 TBool aLaunchEmbedded ); |
|
260 |
|
261 /** |
|
262 * Check for active CSD/HSCSD connection and disconnect if active. |
|
263 */ |
|
264 IMPORT_C void DisconnectActiveCSDConnectionL(); |
|
265 |
|
266 /** |
|
267 * Displays specified type of dialog. |
|
268 * @param aDynamicText. Typically a phone number, |
|
269 * dtmf string or email address. |
|
270 * @param aDlgType. Dialog type. |
|
271 * @return 0 if cancelled otherwise non zero. |
|
272 */ |
|
273 IMPORT_C TInt ShowDialogL( const TDesC& aDynamicText, |
|
274 const TBrowserTelServiceDlgType& aDlgType ); |
|
275 |
|
276 |
|
277 /** |
|
278 * Call the given phone number synchronously. |
|
279 * @param aNumber The phone number to be called. |
|
280 * @return Typically KErrNone or another of the system-wide error codes. |
|
281 * |
|
282 * NOTE: If the specified phone number contains DTMF sequence, it will |
|
283 * be extracted from the number. After the call has been established |
|
284 * the dtmf sequence will be send immediately. This function will |
|
285 * return after the dtmf sending has |
|
286 * been handled. |
|
287 */ |
|
288 IMPORT_C TInt MakeVOIPCall( TDesC& aNumber, TBool aSendDTMFAlwaysConfirm ); |
|
289 |
|
290 |
|
291 protected: // Functions from base classes |
|
292 /** |
|
293 * From CActive |
|
294 */ |
|
295 void DoCancel(); |
|
296 void RunL(); |
|
297 |
|
298 /** |
|
299 * From MProgressDialogCallback |
|
300 * |
|
301 * Get's called when a dialog is dismissed. |
|
302 */ |
|
303 virtual void DialogDismissedL( TInt aButtonId ); |
|
304 |
|
305 #ifdef __BROWSER_TEL_SERVICES_CALLUI__ |
|
306 |
|
307 /** |
|
308 * From MAiwNotifyCallback |
|
309 */ |
|
310 TInt HandleNotifyL( TInt aCmdId, |
|
311 TInt aEventId, |
|
312 CAiwGenericParamList& aEventParamList, |
|
313 const CAiwGenericParamList& aInParamList ); |
|
314 |
|
315 #endif // __BROWSER_TEL_SERVICES_CALLUI__ |
|
316 |
|
317 private: // New functions |
|
318 /** |
|
319 * C++ default constructor. |
|
320 */ |
|
321 CBrowserTelService(); |
|
322 |
|
323 /** |
|
324 * Second phase constructor. Leaves on failure. |
|
325 * @param aObserver The observer for CBrowserTelService. |
|
326 */ |
|
327 void ConstructL( MBrowserTelServiceObserver* aObserver ); |
|
328 |
|
329 /** |
|
330 * Set the internal state of CBrowserTelService. |
|
331 * @param aState The state. |
|
332 */ |
|
333 void SetState( TBrowserTelServiceState aState ); |
|
334 |
|
335 /** |
|
336 * Set the internal state to idle and notify observers. |
|
337 * Just a convenience function. |
|
338 */ |
|
339 void SetStateIdleAndNotifyObservers(); |
|
340 |
|
341 /** |
|
342 * Notify observers of the current state of CBrowserTelService. |
|
343 */ |
|
344 void NotifyObservers(); |
|
345 |
|
346 /** |
|
347 * Notify observers of error that occurred |
|
348 * @param aError The error. |
|
349 */ |
|
350 void NotifyObservers( TBrowserTelServiceError aError ); |
|
351 |
|
352 /** |
|
353 * Initialization before DoMakeCallL |
|
354 * @param aNumber The phone number to be called. |
|
355 * @return Typically KErrNone or another of the system-wide error codes. |
|
356 */ |
|
357 void MakeCallL( TDesC& aNumber, TBool aSendDTMFAlwaysConfirm, TBool voipCall = EFalse ); |
|
358 |
|
359 /** |
|
360 * Called if anything went wrong in MakeCall |
|
361 */ |
|
362 void CleanupBuffers(); |
|
363 |
|
364 /** |
|
365 * Make phone call. |
|
366 */ |
|
367 void DoMakeCallL( TDesC& aNumber, TBool voipCall = 0 ); |
|
368 |
|
369 /** |
|
370 * Leave version of exported SendDTMF function. |
|
371 */ |
|
372 void SendDTMFL( TDesC& aNumber, TBool aSendDTMFAlwaysConfirm ); |
|
373 |
|
374 /** |
|
375 * Leave version of exported SendDTMF function. |
|
376 */ |
|
377 void SendDTMFL( TRequestStatus& aStatus,TDesC& aNumber, |
|
378 TBool aSendDTMFAlwaysConfirm ); |
|
379 |
|
380 /** |
|
381 * Send DTMF sequence. |
|
382 * @param aNumber The DTMF number. |
|
383 */ |
|
384 void DoSendDTMFL( TDesC& aNumber ); |
|
385 |
|
386 /** |
|
387 * Validates the given phone number. Rips all the "-","(",")", |
|
388 * and white spaces off. If the given string has any |
|
389 * alphabetical(excluding w and p) characters, |
|
390 * then NULL will be returned. |
|
391 * @param aNumber The phone number. |
|
392 * @return If the given string has any alphabetical characters, |
|
393 * then NULL will be returned. |
|
394 * Otherwise the validated phone number. |
|
395 */ |
|
396 HBufC* ValidateNumberL( TDesC& aNumber ); |
|
397 |
|
398 /** |
|
399 * Looks for DTMF sequence from a specified phone number. |
|
400 * @param aNumber The phone number that might contain a DTMF sequence |
|
401 * @return NULL if DTMF sequence couldn't be found. |
|
402 * Otherwise the DTMF number. |
|
403 * NOTE: The DTMF sequence will be ripped off from |
|
404 * the given phone number if found. |
|
405 */ |
|
406 HBufC* FindAndRipDTMFSequenceL( TDes* aNumber ); |
|
407 |
|
408 /** |
|
409 * Looks for tel URI parameters from a specified phone number. |
|
410 * @param aNumber The phone number that might contain URI parameters |
|
411 * @return HBufC containing URI parameters, if parameters couldn't |
|
412 * be found the HBufC with zero len is returned |
|
413 * NOTE: The parameters will be ripped off from the given phone |
|
414 * number if found. |
|
415 */ |
|
416 HBufC* FindAndRipURIParametersL( TDes& aNumber ); |
|
417 |
|
418 |
|
419 /** |
|
420 * Looks for voip parameters from a specified phone number. |
|
421 * @param aNumber The phone number that might contain voip parameters |
|
422 * NOTE: The parameters will be ripped off from the given phone |
|
423 * number if found. |
|
424 */ |
|
425 void FindAndRipVoipParametersL( TDes& aNumber ); |
|
426 |
|
427 /** |
|
428 * Validates the given dtmf number. Characters [p w 0...9 * / ,] |
|
429 * are allowed, with the exception that only one "w" or "/" |
|
430 * (wait) in succession is allowed. |
|
431 * @param aNumber The dtmf number do be validated. |
|
432 * NOTE: Removes all invalid characters. |
|
433 */ |
|
434 void ValidateDTMFNumberL( TDes* aNumber ); |
|
435 |
|
436 /** |
|
437 * Parses given string into sequences. Sequences are determined |
|
438 * by [ w / p , ] characters. |
|
439 * Each sequence begins with [ w / p , ] character. |
|
440 */ |
|
441 CArrayPtrFlat<HBufC>* ParseDTMFSequencesL( const TDesC* aDTMFString ); |
|
442 |
|
443 /** |
|
444 * Parses given string to sequences. |
|
445 */ |
|
446 CArrayPtrFlat<HBufC>* ParseDTMFSequencesForDlgL( |
|
447 const TDesC* aDTMFString ); |
|
448 |
|
449 /** |
|
450 * Rips off [ w / p , ] character. |
|
451 * NOTE: Assumes that the wait/pause char is the first character of |
|
452 * the given string. If the first character is not a wait/pause |
|
453 * char then this function does nothing. |
|
454 */ |
|
455 TChar RipWaitChar( TDes* aNumber ); |
|
456 |
|
457 /** |
|
458 * Analyses given number whether the DTMF confirmation query |
|
459 * should be displayed. |
|
460 * @param aNumber |
|
461 * @return ETrue if dialog should be displayed. |
|
462 * NOTE: The given string will be modified if a wait |
|
463 * char [/ w p ,]is found. The |
|
464 * wait char is deleted from the aNumber. |
|
465 */ |
|
466 TBool DisplaySendDTMFDialog( TDes* aNumber ); |
|
467 |
|
468 /** |
|
469 * Seeks given number in phone book. |
|
470 * @param aPhoneNumber The phone number to look for. |
|
471 * @return owner's name of the number, |
|
472 * if not found then NULL will be returned. |
|
473 */ |
|
474 HBufC* SearchPbForMatchL( const TDesC& aPhoneNumber ); |
|
475 CContactIdArray* SearchPbForMatchLC( CPbkContactEngine& aPbkEngine, |
|
476 const TDesC& aToMatch, |
|
477 const TMatchType& aMatchType ); |
|
478 |
|
479 /** |
|
480 * Closes all open etel sessions. |
|
481 */ |
|
482 void CloseAllSessions(); |
|
483 |
|
484 /** |
|
485 * Internal error handling. |
|
486 * @param aError The error. |
|
487 */ |
|
488 void HandleError( TInt aError ); |
|
489 |
|
490 static TInt IdleCallback( TAny* aTelService ); |
|
491 void DoIdleCallback(); |
|
492 |
|
493 /** |
|
494 * |
|
495 * @return EFalse if nothing to handle, otherwise ETrue (processing). |
|
496 */ |
|
497 TBool HandleInternalSendDTMFL(); |
|
498 |
|
499 /** |
|
500 * Brings Browser to the foreground. |
|
501 */ |
|
502 void BringBrowserToForeground(); |
|
503 |
|
504 /** |
|
505 * Check if there are activate voice call on. |
|
506 */ |
|
507 void CheckIsThereActivateVoiceCallOnL(); |
|
508 |
|
509 /** |
|
510 * Check from DTMF number is there any illeagal char's. |
|
511 * aNumber DTMF sequence for check. |
|
512 * Return ETrue if everything OK and EFalse if illeagal char |
|
513 * in DTMF sequence. |
|
514 */ |
|
515 void CheckDTMFNumberL( TDesC& aNumber ); |
|
516 |
|
517 /** |
|
518 * Search for existing contact item, or create a new empty one. |
|
519 * @param aPbkEngine phonebook engine |
|
520 * @param aNumber Phone number |
|
521 * @param aEmail Email address |
|
522 * @param aNewContact ETrue if new contact item created |
|
523 * @return existing/new contact item |
|
524 */ |
|
525 CPbkContactItem* SearchPBItemLC( CPbkContactEngine& aPbkEngine, |
|
526 TDesC& aNumber, |
|
527 TDesC& aEmail, |
|
528 TBool& aNewContact ); |
|
529 |
|
530 /** |
|
531 * Set contact item's field. If field doesn't exist in the contact |
|
532 * item, a new one is added. |
|
533 * @param aField field to set |
|
534 * @param phonebook engine |
|
535 * @param aContactItem contact item of which field is set |
|
536 * @param aFieldValue contact item field value |
|
537 * @param index of field to focus initially in contact editor dialog |
|
538 */ |
|
539 void SetPBEntryFieldL( TInt aField, |
|
540 CPbkContactEngine* aPbkEngine, |
|
541 CPbkContactItem* aContactItem, |
|
542 const TPtrC& aFieldValue, |
|
543 TInt& aFormIndex ); |
|
544 |
|
545 /** |
|
546 * Parse recipients received in aRecipients. |
|
547 * Recipients are separaret by commas. |
|
548 * @param aRecipients Recipient list. Items separated by commas. |
|
549 * @return array of recipients |
|
550 */ |
|
551 CPtrC16Array* ParseRecipientsLC( const TDesC& aRecipients ); |
|
552 /** |
|
553 * Looks for postd from a specified phone number. |
|
554 * @param aNumber The phone number that might contain a postd parameter |
|
555 * @return NULL if postd parameter couldn't be found. |
|
556 * Otherwise the DTMF number. |
|
557 */ |
|
558 HBufC* FindPostdParmL( TDes& aNumber ); |
|
559 |
|
560 private: // Functions from base classes |
|
561 /** |
|
562 * From MBrowserTelServiceEtelWatcherObserver |
|
563 */ |
|
564 void BrowserTelServiceEtelWatcherEvent( RCall::TStatus& aStatus ); |
|
565 |
|
566 /** |
|
567 * From MConnectionStageObserver |
|
568 */ |
|
569 void ConnectionStageAchievedL(); |
|
570 |
|
571 /** |
|
572 * @return the bearer type of connection |
|
573 */ |
|
574 TApBearerType ConnectionTypeL( TUint aApId ); |
|
575 |
|
576 private: |
|
577 |
|
578 void ErrorHandler( TInt aErrorId ); |
|
579 |
|
580 /** |
|
581 * Create the message and open up the mms editor as ready to send. |
|
582 * @param aToRecipients To recipients. |
|
583 * @param aCcRecipients Cc recipients. |
|
584 * @param aParams Other parameters ??. |
|
585 * @param aBody Body text. |
|
586 * @param aLaunchEmbedded information to launch embedded mode or not |
|
587 * @return Typically KErrNone or another of the system-wide error codes. |
|
588 */ |
|
589 TInt SendMmsMessageL( const TDesC& aToRecipients, |
|
590 const TDesC& aCcRecipients, |
|
591 const TDesC& aParams, |
|
592 const TDesC& aBody, |
|
593 TBool aLaunchEmbedded ); |
|
594 |
|
595 #ifdef __BROWSER_TEL_SERVICES_CALLUI__ |
|
596 |
|
597 /** |
|
598 * Show confirmation query before sending dtmf when CallUi is used. |
|
599 * @param aDTMF DTMF sequence |
|
600 * @return TBool User esponse. |
|
601 */ |
|
602 TBool SendDMFConfQueryL( const TDesC& aDTMF ); |
|
603 |
|
604 #endif // __BROWSER_TEL_SERVICES_CALLUI__ |
|
605 |
|
606 private: // Data |
|
607 CArrayPtrFlat<HBufC>* iSendableDTMFNumbers; |
|
608 CArrayPtrFlat<HBufC>* iDlgDTMFNumbers; |
|
609 RPointerArray<MBrowserTelServiceObserver> iObserverList; |
|
610 HBufC* iDTMFNumber; |
|
611 TBrowserTelServiceState iState; |
|
612 RTelServer iRTelServer; |
|
613 RPhone iRPhone; |
|
614 //RAdvGsmPhone iRAdvGsmPhone; |
|
615 RMobilePhone iRAdvGsmPhone; |
|
616 RLine iRLine; |
|
617 RCall iRCall; |
|
618 RCall::TStatus iCallStatus; |
|
619 CBrowserTelServiceEtelWatcher* iWatcher; |
|
620 TBool iSynch; |
|
621 TInt iRetVal; |
|
622 CActiveSchedulerWait iWait; |
|
623 TRequestStatus* iUserRequestStatus; |
|
624 TBool iAgentDisconnected; |
|
625 CAknWaitDialog* iWaitDlg; |
|
626 TBool iInternalDTMFWaitStarted; |
|
627 TBool iConfirmedOnce; |
|
628 TBool iDTMFAlwaysConfirm; |
|
629 CIdle* iIdle; |
|
630 CErrorUI* iErrorUi; |
|
631 |
|
632 TFileName iResourceFileName; ///< Temp storage for the file name. |
|
633 RConeResourceLoader iResourceLoader; ///< Resource loader. |
|
634 TBool iResourceOpened; ///< Indicate if the resource is opened. |
|
635 |
|
636 #ifdef __BROWSER_TEL_SERVICES_CALLUI__ |
|
637 |
|
638 // AIW related members |
|
639 CAiwServiceHandler* iServiceHandler; |
|
640 |
|
641 // DialData. |
|
642 CAiwDialData* iDialData; |
|
643 |
|
644 #endif // __BROWSER_TEL_SERVICES_CALLUI__ |
|
645 |
|
646 }; |
|
647 |
|
648 /** |
|
649 * This class defines a protocol for observing CBrowserTelService stages. |
|
650 * You should inherit from this if you want to observe |
|
651 * CBrowserTelService stages. |
|
652 */ |
|
653 class MBrowserTelServiceObserver |
|
654 { |
|
655 public: // New functions |
|
656 /** |
|
657 * Notification of the state change. |
|
658 * @param aEvent The new state. |
|
659 */ |
|
660 virtual void BrowserTelServiceEvent( |
|
661 TBrowserTelServiceState aEvent ) = 0; |
|
662 |
|
663 /** |
|
664 * Notification of the error that occurred. |
|
665 * @param aError The error. |
|
666 */ |
|
667 virtual void BrowserTelServiceError( |
|
668 TBrowserTelServiceError aError ) = 0; |
|
669 }; |
|
670 |
|
671 #endif // __BROWSERTELSERVICE_H |