20
|
1 |
/*
|
|
2 |
* Copyright (c) 2010 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: Interface for fetching/saving the vmbx number and querying
|
|
15 |
* for it.
|
|
16 |
* Also notify on a number change is supported.
|
|
17 |
*
|
|
18 |
*/
|
|
19 |
|
|
20 |
|
|
21 |
#ifndef VMNUMBER_H
|
|
22 |
#define VMNUMBER_H
|
|
23 |
|
|
24 |
// INCLUDES
|
|
25 |
/*****************************************************
|
|
26 |
* Series 60 Customer / ETel
|
|
27 |
* Series 60 ETel API
|
|
28 |
*****************************************************/
|
|
29 |
#include <etelmm.h>
|
|
30 |
#include <etelsat.h>
|
|
31 |
#include <mmtsy_names.h>
|
|
32 |
|
|
33 |
#include <PhCltTypes.h> // from PhoneClient
|
|
34 |
|
|
35 |
#include <MSSSettingsObserver.h>
|
|
36 |
#include <msatrefreshobserver.h>
|
|
37 |
#include <rsatsession.h>
|
|
38 |
#include <rsatrefresh.h>
|
|
39 |
#include <centralrepository.h>
|
|
40 |
#include <cenrepnotifyhandler.h>
|
|
41 |
#include <aknappui.h>
|
|
42 |
#include <AknQueryDialog.h>
|
|
43 |
#include <CPhCltEmergencyCall.h> // CPhCltEmergencyCall
|
|
44 |
#include <MPhCltEmergencyCallObserver.h>
|
|
45 |
|
|
46 |
// FORWARD DECLARATIONS
|
|
47 |
|
|
48 |
class CVmSPSHandler;
|
|
49 |
|
|
50 |
// CONSTANTS
|
|
51 |
|
|
52 |
|
|
53 |
_LIT( KEmptyVoiceMailNumber, "" );
|
|
54 |
|
|
55 |
enum TVmbxQueryType
|
|
56 |
{
|
|
57 |
EVmbxNotDefinedQuery, // use this
|
|
58 |
EVmbxChangeNumberQuery // this is only for vmbx application
|
|
59 |
};
|
|
60 |
|
|
61 |
enum TVmbxNumberEntry
|
|
62 |
{
|
|
63 |
EAlsActiveLineEntry = 0, // currently active ALS line
|
|
64 |
EAlsLine1Entry = 1, // ALS primary line
|
|
65 |
EAlsLine2Entry = 2 // ALS auxiliary line
|
|
66 |
};
|
|
67 |
|
|
68 |
enum TVmbxAlsLine
|
|
69 |
{
|
|
70 |
EAlsLine1 = 1,
|
|
71 |
EAlsLine2 = 2
|
|
72 |
};
|
|
73 |
|
|
74 |
enum TVmbxPhonebookOperation
|
|
75 |
{
|
|
76 |
EVmbxPhonebookGetInfo,
|
|
77 |
EVmbxPhonebookRead,
|
|
78 |
EVmbxPhonebookWrite,
|
|
79 |
EVmbxPhonebookDelete
|
|
80 |
};
|
|
81 |
|
|
82 |
|
|
83 |
enum TVmbxMemoryLocation
|
|
84 |
{
|
|
85 |
EVmbxSimMemory = 0,
|
|
86 |
EVmbxPhoneMemory
|
|
87 |
};
|
|
88 |
|
|
89 |
_LIT( KVmbxPanicCategory, "RVmbxNumber");
|
|
90 |
|
|
91 |
enum TVmbxPanic
|
|
92 |
{
|
|
93 |
EVmbxNotConnected = 0,
|
|
94 |
EVmbxDescriptorTooSmall = 1,
|
|
95 |
EVmbxNumberTooLong = 2,
|
|
96 |
EVmbxNoNotifyHandler = 3,
|
|
97 |
EVmbxNoCoeEnv = 4,
|
|
98 |
EVmbxUnhandledOperation = 5
|
|
99 |
};
|
|
100 |
|
|
101 |
enum TVmbxSimNumAcceptance
|
|
102 |
{
|
|
103 |
EVmbxSimNumNotAccepted = 0,
|
|
104 |
EVmbxSimNumAccepted
|
|
105 |
};
|
|
106 |
|
|
107 |
enum TVmbxUserEditIndicator
|
|
108 |
{
|
|
109 |
EVmbxNotUserEdit = 0,
|
|
110 |
EVmbxUserEdit,
|
|
111 |
EvmbxPhoneMemForcedEdit
|
|
112 |
};
|
|
113 |
|
|
114 |
const TInt KVmbxMaxNumberLength = KPhCltTelephoneNumberLength;
|
|
115 |
const TInt KVmbxMaxAddressLength = 100;
|
|
116 |
|
|
117 |
// Phonebook entry name length
|
|
118 |
const TInt KVmbxPhoneBookEntryNameLength = 5;
|
|
119 |
|
|
120 |
// Branding id
|
|
121 |
const TInt KVmSettingsUiBrandingIdLength = 512;
|
|
122 |
|
|
123 |
// Publish & Subscribe property category definition
|
|
124 |
|
|
125 |
enum TVmbxNumType
|
|
126 |
{
|
|
127 |
EVmbxMDN,
|
|
128 |
EVmbxMIN
|
|
129 |
};
|
|
130 |
|
|
131 |
enum TVmbxType
|
|
132 |
{
|
|
133 |
EVmbx,
|
|
134 |
EVmbxIP,
|
|
135 |
EVmbxVideo,
|
|
136 |
EVmbxNone
|
|
137 |
};
|
|
138 |
|
|
139 |
enum TVmbxTitle
|
|
140 |
{
|
|
141 |
EVmbxCall,
|
|
142 |
EVmbxDefine
|
|
143 |
};
|
|
144 |
|
|
145 |
// Phonebook types (VMBX = 6f17)
|
|
146 |
enum TVmSimPhoneBookTypes
|
|
147 |
{
|
|
148 |
EVMBXPhoneBook = 0,
|
|
149 |
EMBDNPhoneBook
|
|
150 |
};
|
|
151 |
|
|
152 |
|
|
153 |
// FORWARD DECLARATIONS
|
|
154 |
class CVmTextQueryDialog;
|
|
155 |
class CCoeEnv;
|
|
156 |
class CVPbkContactManager;
|
|
157 |
class CPhCntSingleItemFetch;
|
|
158 |
class CVMSimQueryDilaog;
|
|
159 |
class CVmListQueryDialog;
|
|
160 |
class CVmBSHandler;
|
|
161 |
// CLASS DECLARATION
|
|
162 |
|
|
163 |
/**
|
|
164 |
* TVmbxEntry
|
|
165 |
* Contains vmbx sim entry data.
|
|
166 |
*
|
|
167 |
* @lib vmbx.lib
|
|
168 |
* @since 2.0
|
|
169 |
**/
|
|
170 |
class TVmbxEntry
|
|
171 |
{
|
|
172 |
public: // Constructors and destructor
|
|
173 |
|
|
174 |
/**
|
|
175 |
* C++ default constructor.
|
|
176 |
*/
|
|
177 |
TVmbxEntry() : iIndex( 0 )
|
|
178 |
{
|
|
179 |
iTelNumber.FillZ();
|
|
180 |
iTelNumber.Zero();
|
|
181 |
};
|
|
182 |
|
|
183 |
public: // Data
|
|
184 |
|
|
185 |
// Data index
|
|
186 |
TInt iIndex;
|
|
187 |
|
|
188 |
// Telefony number
|
|
189 |
TBuf16<KVmbxMaxNumberLength> iTelNumber;
|
|
190 |
|
|
191 |
// Phonebook entry name
|
|
192 |
TBuf16<KVmbxPhoneBookEntryNameLength> iText;
|
|
193 |
};
|
|
194 |
|
|
195 |
/**
|
|
196 |
* MVmbxNotifyHandler
|
|
197 |
*
|
|
198 |
* @lib vmbx.lib
|
|
199 |
* @since
|
|
200 |
**/
|
|
201 |
class MVmbxNotifyHandler
|
|
202 |
{
|
|
203 |
public:
|
|
204 |
/**
|
|
205 |
* Does the action user wants when a vmbx number has been changed.
|
|
206 |
* If the parameter aNotifyOnActiveLineOnly was ETrue in notify request,
|
|
207 |
* only a change of the vmbx number of the active ALS line causes
|
|
208 |
* calling this.
|
|
209 |
*
|
|
210 |
* @param aLine ALS line of which number was changed ( 1 or 2 )
|
|
211 |
* @param aValue the new vmbx number of that line.
|
|
212 |
* (this reference is only valid in scope of this method)
|
|
213 |
*/
|
|
214 |
virtual void HandleNotifyL( TInt aLine, const TDesC& aValue ) = 0;
|
|
215 |
};
|
|
216 |
|
|
217 |
|
|
218 |
/**
|
|
219 |
* Observer interface for ServiceNotifier.
|
|
220 |
*
|
|
221 |
* @since S60 3.2
|
|
222 |
**/
|
|
223 |
class MServiceNotifyHandler
|
|
224 |
{
|
|
225 |
public:
|
|
226 |
|
|
227 |
/**
|
|
228 |
* Called when a Service profile has been changed.
|
|
229 |
*/
|
|
230 |
virtual void HandleServiceNotifyL() = 0;
|
|
231 |
};
|
|
232 |
|
|
233 |
/**
|
|
234 |
* MVmbxAlsObserver
|
|
235 |
*
|
|
236 |
* @lib vmbx.lib
|
|
237 |
* @since
|
|
238 |
**/
|
|
239 |
class MVmbxAlsObserver
|
|
240 |
{
|
|
241 |
public:
|
|
242 |
/**
|
|
243 |
* Does the action user wants when the active ALS line has been changed.
|
|
244 |
*
|
|
245 |
* @param aLine new ALS line number ( 1 or 2 )
|
|
246 |
**/
|
|
247 |
virtual void HandleAlsChangeL( TVmbxAlsLine aLine ) = 0;
|
|
248 |
|
|
249 |
};
|
|
250 |
|
|
251 |
|
|
252 |
/**
|
|
253 |
* TVmbxServiceInfo, contains Service information.
|
|
254 |
*
|
|
255 |
* @since S60 3.2
|
|
256 |
**/
|
|
257 |
class TVmbxServiceInfo
|
|
258 |
{
|
|
259 |
public: // Constructors and destructor
|
|
260 |
|
|
261 |
TVmbxServiceInfo()
|
|
262 |
{
|
|
263 |
iServiceId = 0;
|
|
264 |
iSnapId = 0;
|
|
265 |
}
|
|
266 |
|
|
267 |
public: // Data
|
|
268 |
|
|
269 |
// Service's Id
|
|
270 |
TUint iServiceId;
|
|
271 |
|
|
272 |
// Service's SNAP Id
|
|
273 |
TUint32 iSnapId;
|
|
274 |
|
|
275 |
// Service's name.
|
|
276 |
TBuf<64> iName;
|
|
277 |
|
|
278 |
// Service's address.
|
|
279 |
TBuf<KVmbxMaxAddressLength> iAddress;
|
|
280 |
};
|
|
281 |
|
|
282 |
|
|
283 |
/**
|
|
284 |
* TVmbxServiceSelection, contains selected service information.
|
|
285 |
*
|
|
286 |
* @since S60 3.2
|
|
287 |
**/
|
|
288 |
class TVmbxServiceSelection
|
|
289 |
{
|
|
290 |
public: // Constructors and destructor
|
|
291 |
|
|
292 |
TVmbxServiceSelection( TVmbxType aServiceType = EVmbxNone,
|
|
293 |
TUint aServiceId = 0 )
|
|
294 |
{
|
|
295 |
iServiceType = aServiceType;
|
|
296 |
iServiceId = aServiceId;
|
|
297 |
}
|
|
298 |
|
|
299 |
public: // Data
|
|
300 |
|
|
301 |
// Service type
|
|
302 |
TVmbxType iServiceType;
|
|
303 |
|
|
304 |
// Service Id
|
|
305 |
TUint iServiceId;
|
|
306 |
|
|
307 |
};
|
|
308 |
|
|
309 |
|
|
310 |
/**
|
|
311 |
* RVmbxNumber
|
|
312 |
*
|
|
313 |
* @lib vmbx.lib
|
|
314 |
* @since
|
|
315 |
**/
|
|
316 |
class RVmbxNumber : public MCenRepNotifyHandlerCallback,
|
|
317 |
public MSSSettingsObserver,
|
|
318 |
public MSatRefreshObserver,
|
|
319 |
public MPhCltEmergencyCallObserver
|
|
320 |
{
|
|
321 |
public:
|
|
322 |
/**
|
|
323 |
* status for QueryNumberL.
|
|
324 |
* EVmQueryNormal Query number running normal case
|
|
325 |
* EVmQueryProcess Query number running FOREVER case
|
|
326 |
*/
|
|
327 |
enum TVmVmQueryStatusType
|
|
328 |
{
|
|
329 |
EVmQueryNormal = 0,
|
|
330 |
EVmQueryProcess
|
|
331 |
};
|
|
332 |
|
|
333 |
public:
|
|
334 |
|
|
335 |
/**
|
|
336 |
* C++ default constructor.
|
|
337 |
*/
|
|
338 |
IMPORT_C RVmbxNumber();
|
|
339 |
|
|
340 |
/**
|
|
341 |
* Destructor.
|
|
342 |
*/
|
|
343 |
IMPORT_C ~RVmbxNumber();
|
|
344 |
|
|
345 |
public: // New functions
|
|
346 |
|
|
347 |
/**
|
|
348 |
* Opens the resources needed. This or the other overloaded Open() has to
|
|
349 |
* be called successfully before doing anything else.
|
|
350 |
*
|
|
351 |
* ----------------------------------------------------------------------
|
|
352 |
* A new ETel connection is opened when using this method!
|
|
353 |
* ----------------------------------------------------------------------
|
|
354 |
*
|
|
355 |
* @return Symbian OS error code (KErrNone is successful)
|
|
356 |
**/
|
|
357 |
/*****************************************************
|
|
358 |
* Series 60 Customer / ETel
|
|
359 |
* Series 60 ETel API
|
|
360 |
*****************************************************/
|
|
361 |
IMPORT_C TInt Open();
|
|
362 |
|
|
363 |
/**
|
|
364 |
* Opens the resources needed. This or the other overloaded Open() has to
|
|
365 |
* be called successfully before doing anything else.
|
|
366 |
*
|
|
367 |
* Use this overload if you already have ETel connection.
|
|
368 |
*
|
|
369 |
* ----------------------------------------------------------------------
|
|
370 |
* An existing ETel connection is used when using this method!
|
|
371 |
* ----------------------------------------------------------------------
|
|
372 |
*
|
|
373 |
* @param aPhone Phone client
|
|
374 |
* @return Symbian OS error code (KErrNone is successful)
|
|
375 |
**/
|
|
376 |
/*****************************************************
|
|
377 |
* Series 60 Customer / ETel
|
|
378 |
* Series 60 ETel API
|
|
379 |
*****************************************************/
|
|
380 |
IMPORT_C TInt Open( RMobilePhone& aPhone );
|
|
381 |
|
|
382 |
/**
|
|
383 |
* Fetches the specified vmbx number. If there is no vmbx number
|
|
384 |
* saved for the specified ALS line, parameter aNumber remains unchanged
|
|
385 |
* and the return value is KErrNotFound.
|
|
386 |
*
|
|
387 |
* @param aNumber vmbx number is saved here (must be room for at least
|
|
388 |
* KVmbxMaxNumberLength characters)
|
|
389 |
*
|
|
390 |
* @param aEntry determines which vmbx number entry is used:
|
|
391 |
* EAlsLine1Entry = vmbx number entry of primary line
|
|
392 |
* EAlsLine2Entry = vmbx number entry of secondary line
|
|
393 |
* EAlsActiveLineEntry = entry of currently active line
|
|
394 |
*
|
|
395 |
* @return - KErrNone if the number was found.
|
|
396 |
* aNumber will contain the vmbx number.
|
|
397 |
*
|
|
398 |
* - KErrNotFound if the number is not defined
|
|
399 |
*
|
|
400 |
* - Other error code if there was a problem in getting
|
|
401 |
* the number. Clients should show error note if this happens.
|
|
402 |
**/
|
|
403 |
/*****************************************************
|
|
404 |
* Series 60 Customer / ETel
|
|
405 |
* Series 60 ETel API
|
|
406 |
*****************************************************/
|
|
407 |
IMPORT_C TInt GetVmbxNumber( TDes& aNumber,
|
|
408 |
TVmbxNumberEntry aEntry = EAlsActiveLineEntry );
|
|
409 |
|
|
410 |
/**
|
|
411 |
* Check wether the voice mailbox number can be changed. If the number
|
|
412 |
* cannot be edited, the QueryNumberL leaves with and SaveVmbxNumber
|
|
413 |
* returns KErrAccessDenied.
|
|
414 |
* @since 2.7
|
|
415 |
* @return ETrue if editing is allowed.
|
|
416 |
* EFalse if editing is forbidden.
|
|
417 |
*/
|
|
418 |
IMPORT_C TBool AllowedToChangeTheNumber();
|
|
419 |
|
|
420 |
/**
|
|
421 |
* Puts a query on the screen asking for a voice mailbox number.
|
|
422 |
*
|
|
423 |
* IMPORTANT:
|
|
424 |
*
|
|
425 |
* Other subsystems than voice mailbox application should call this
|
|
426 |
* ONLY IF GetVmbxNumber() returned KErrNotFound. Also, only the
|
|
427 |
* parameter EVmbxNotDefinedQuery should be used outside the voice
|
|
428 |
* mailbox application.
|
|
429 |
*
|
|
430 |
* @param aQueryType type of the query, alternatives:
|
|
431 |
* - EVmbxNotDefinedQuery
|
|
432 |
* (use this when no vmbx number is defined)
|
|
433 |
*
|
|
434 |
* - EVmbxChangeNumberQuery
|
|
435 |
* @param aNumber Initial value for the query, AND the result value
|
|
436 |
* of an accepted query. (must be room for at least
|
|
437 |
* KVmbxMaxNumberLength characters. Not allowed to
|
|
438 |
* contain longer initial value than
|
|
439 |
* KVmbxMaxNumberLength)
|
|
440 |
* @param aShowQuery When this is set and the sim has support for vmbx
|
|
441 |
* number the user is shown a list query by which the
|
|
442 |
* storage of sim number can be decided
|
|
443 |
*
|
|
444 |
* @return ETrue if the query was accepted and the vmbx number saved.
|
|
445 |
* This is the case also when user saves empty number!
|
|
446 |
* EFalse if the user canceled the query. No vmbx number changed.
|
|
447 |
**/
|
|
448 |
IMPORT_C TBool QueryNumberL( TVmbxQueryType aQueryType, TDes& aNumber,
|
|
449 |
TBool aShowQuery = EFalse );
|
|
450 |
|
|
451 |
/**
|
|
452 |
* Saves the vmbx number. (in phone file system and SIM)
|
|
453 |
*
|
|
454 |
* @param aNumber vmbx number ( max length is KVmbxMaxNumberLength )
|
|
455 |
* @param aEntry determines in which entry the number is saved:
|
|
456 |
* EAlsLine1Entry = vmbx number entry of ALS primary line
|
|
457 |
* EAlsLine2Entry = vmbx number entry of ALS secondary line
|
|
458 |
* EAlsActiveLineEntry = entry of currently active ALS line
|
|
459 |
*
|
|
460 |
* @return Symbian OS error code (KErrNone is successful)
|
|
461 |
**/
|
|
462 |
/*****************************************************
|
|
463 |
* Series 60 Customer / ETel
|
|
464 |
* Series 60 ETel API
|
|
465 |
*****************************************************/
|
|
466 |
IMPORT_C TInt SaveVmbxNumber( const TDesC& aNumber,
|
|
467 |
TVmbxNumberEntry aEntry );
|
|
468 |
|
|
469 |
/**
|
|
470 |
* Saves vmbx number to Sim
|
|
471 |
* @since
|
|
472 |
* @param aNumber Vmbx number
|
|
473 |
* @param aEntry Als line entry
|
|
474 |
* @return Symbian OS error code (KErrNone is successful)
|
|
475 |
*/
|
|
476 |
TInt SaveVmbxNumberToSim( const TDesC& aNumber,
|
|
477 |
TVmbxNumberEntry aEntry );
|
|
478 |
|
|
479 |
/**
|
|
480 |
* Saves vmbx number to phone memory
|
|
481 |
* @since
|
|
482 |
* @param aNumber Vmbx number
|
|
483 |
* @param aEntry Als line entry
|
|
484 |
* @return Symbian OS error code (KErrNone is successful)
|
|
485 |
*/
|
|
486 |
TInt SaveVmbxNumberToPhone( const TDesC& aNumber,
|
|
487 |
TVmbxNumberEntry aEntry );
|
|
488 |
|
|
489 |
/**
|
|
490 |
* Issues a notify request on a vmbx number change.
|
|
491 |
* User's HandleNotifyL() will be called whenever the vmbx number has
|
|
492 |
* been changed by any subsystem. Only one notify request can be done
|
|
493 |
* per one RVmbxNumber object simultaneously. When issuing a notify
|
|
494 |
* request while one is active already, only parameters aHandler and
|
|
495 |
* aNotifyOnActiveLineOnly are updated in existing request.
|
|
496 |
*
|
|
497 |
* @param aHandler user's notify handler
|
|
498 |
* @param aNotifyOnActiveLineOnly if this is ETrue, notify events will
|
|
499 |
* be generated only if the vmbx number of the active ALS line is
|
|
500 |
* changed, not if the number of the other line is changed. When
|
|
501 |
* there is no ALS support, this has no effect ie. notification
|
|
502 |
* will be generated always.
|
|
503 |
*
|
|
504 |
* Leaves if the notify request could not be done.
|
|
505 |
**/
|
|
506 |
IMPORT_C void NotifyVmbxNumberChangeL( MVmbxNotifyHandler* aHandler,
|
|
507 |
TBool aNotifyOnActiveLineOnly );
|
|
508 |
|
|
509 |
/**
|
|
510 |
* Cancels a notify request on a vmbx number change.
|
|
511 |
**/
|
|
512 |
IMPORT_C void NotifyVmbxNumberChangeCancel();
|
|
513 |
|
|
514 |
/**
|
|
515 |
* Gets the currently active ALS line number ( 1 or 2 ).
|
|
516 |
* Information is fetched from supplementary settings client.
|
|
517 |
* @param aLineNumber line number is returned here. If ALS is not
|
|
518 |
* supported, value 1 is returned.
|
|
519 |
* @return Symbian OS error code (KErrNone is successful)
|
|
520 |
**/
|
|
521 |
IMPORT_C TInt GetAlsLine( TInt& aLineNumber ) const;
|
|
522 |
|
|
523 |
/**
|
|
524 |
* Issues a notify request on active ALS line change. A callback to
|
|
525 |
* user's code is made when the ALS line is changed. The notify request
|
|
526 |
* remains active as long as it is canceled with
|
|
527 |
* NotifyAlsLineChangeCancel(), ie. it is not canceled when the ALS line
|
|
528 |
* is changed. Implementation uses SharedData's notify system.
|
|
529 |
* Leaves if the notify request could not be done.
|
|
530 |
* @param aObserver user's observer
|
|
531 |
**/
|
|
532 |
IMPORT_C void NotifyAlsLineChangeL( MVmbxAlsObserver* aObserver );
|
|
533 |
|
|
534 |
/**
|
|
535 |
* Cancels a notify request on ALS line change.
|
|
536 |
**/
|
|
537 |
IMPORT_C void NotifyAlsLineChangeCancel();
|
|
538 |
|
|
539 |
/**
|
|
540 |
* Closes the resources allocated in Open().
|
|
541 |
*
|
|
542 |
* Cancels all issued notify requests.
|
|
543 |
**/
|
|
544 |
/*****************************************************
|
|
545 |
* Series 60 Customer / ETel
|
|
546 |
* Series 60 ETel API
|
|
547 |
*****************************************************/
|
|
548 |
IMPORT_C void Close();
|
|
549 |
|
|
550 |
|
|
551 |
/**
|
|
552 |
* Puts a query on the screen asking for a voice mailbox address.
|
|
553 |
* @since 3.0
|
|
554 |
*
|
|
555 |
* IMPORTANT:
|
|
556 |
*
|
|
557 |
* Other subsystems than voice mailbox application should call this
|
|
558 |
* ONLY IF GetVmbxNumber() returned KErrNotFound. Also, only the
|
|
559 |
* parameter EVmbxNotDefinedQuery should be used outside the voice
|
|
560 |
* mailbox application.
|
|
561 |
*
|
|
562 |
* @param aQueryType type of the query, alternatives:
|
|
563 |
* - EVmbxNotDefinedQuery
|
|
564 |
* (use this when no vmbx address is defined)
|
|
565 |
*
|
|
566 |
* - EVmbxChangeNumberQuery
|
|
567 |
* @param aNumber Initial value for the query, AND the result value
|
|
568 |
* of an accepted query. (must be room for at least
|
|
569 |
* KVmbxMaxAddressLength characters. Not allowed to
|
|
570 |
* contain longer initial value than
|
|
571 |
* KVmbxMaxAddressLength)
|
|
572 |
* @return ETrue if the query was accepted and the vmbx address saved.
|
|
573 |
* This is the case also when user saves empty address!
|
|
574 |
* EFalse if the user canceled the query. No vmbx address
|
|
575 |
* changed.
|
|
576 |
**/
|
|
577 |
IMPORT_C TBool QueryAddressL( TVmbxQueryType aQueryType,
|
|
578 |
TDes& aNumber );
|
|
579 |
|
|
580 |
/**
|
|
581 |
* Puts a popup on the screen asking for which type of Vmbx is used.
|
|
582 |
* @since 3.0
|
|
583 |
* @param aTitle Vmbx title type ( call / define ).
|
|
584 |
* @return which type of Vmbx is selected.
|
|
585 |
*/
|
|
586 |
IMPORT_C TInt SelectTypeL( TBool aTitle );
|
|
587 |
|
|
588 |
/**
|
|
589 |
* Save address.
|
|
590 |
* @since 3.0
|
|
591 |
* @param aAddress includes saved vmbx address
|
|
592 |
* @return Symbian OS error code (KErrNone is successful)
|
|
593 |
**/
|
|
594 |
IMPORT_C TInt SaveVmbxAddressL( TDes& aAddress );
|
|
595 |
|
|
596 |
/**
|
|
597 |
* Check if VoIP profiles exists.
|
|
598 |
* @since 3.0
|
|
599 |
* @return ETrue if there is at least one VoIP profile, otherwise EFalse
|
|
600 |
*/
|
|
601 |
IMPORT_C TBool IsVoIPProfilesFound();
|
|
602 |
|
|
603 |
/**
|
|
604 |
* Check if VoIP voice mailbox services exists
|
|
605 |
* @since 5.0
|
|
606 |
* @return ETrue if there is at least one service, otherwise EFalse
|
|
607 |
*/
|
|
608 |
IMPORT_C TBool IsIpVoiceMailboxServices();
|
|
609 |
|
|
610 |
/**
|
|
611 |
* Fetches the specified video mailbox number. If there is no video
|
|
612 |
* mailbox number saved for the specified ALS line, parameter aNumber
|
|
613 |
* remains unchanged and the return value is KErrNotFound.
|
|
614 |
* @since 3.1
|
|
615 |
* @param aNumber video mailbox number is saved here (must be room for
|
|
616 |
* at least KVmbxMaxNumberLength characters)
|
|
617 |
* @param aEntry determines which video mbx number entry is used:
|
|
618 |
* EAlsLine1Entry = video mbx number entry of primary line
|
|
619 |
* EAlsLine2Entry = video mbx number entry of secondary line
|
|
620 |
* EAlsActiveLineEntry = entry of currently active line
|
|
621 |
* @return - KErrNone if the number was found.
|
|
622 |
* aNumber will contain the video mbx number.
|
|
623 |
*
|
|
624 |
* - KErrNotFound if the number is not defined
|
|
625 |
*
|
|
626 |
* - Other error code if there was a problem in getting
|
|
627 |
* the number. Clients should show error note if this happens.
|
|
628 |
**/
|
|
629 |
IMPORT_C TInt GetVideoMbxNumber( TDes& aNumber,
|
|
630 |
TVmbxNumberEntry aEntry = EAlsActiveLineEntry );
|
|
631 |
|
|
632 |
/**
|
|
633 |
* Puts a query on the screen asking for a video mailbox number.
|
|
634 |
* @since 3.1
|
|
635 |
*
|
|
636 |
* IMPORTANT:
|
|
637 |
*
|
|
638 |
* Other subsystems than voice mailbox application should call this
|
|
639 |
* ONLY IF GetVideoMbxNumber() returned KErrNotFound. Also, only the
|
|
640 |
* parameter EVmbxNotDefinedQuery should be used outside the voice
|
|
641 |
* mailbox application.
|
|
642 |
*
|
|
643 |
* @param aQueryType type of the query, alternatives:
|
|
644 |
* - EVmbxNotDefinedQuery
|
|
645 |
* (use this when no vmbx number is defined)
|
|
646 |
* - EVmbxChangeNumberQuery
|
|
647 |
* @param aNumber Initial value for the query, AND the result value
|
|
648 |
* of an accepted query. (must be room for at least
|
|
649 |
* KVmbxMaxNumberLength characters. Not allowed to
|
|
650 |
* contain longer initial value than
|
|
651 |
* KVmbxMaxNumberLength)
|
|
652 |
* @return ETrue if the query was accepted and the vmbx number saved.
|
|
653 |
* This is the case also when user saves empty number!
|
|
654 |
* EFalse if the user canceled the query. No vmbx number changed.
|
|
655 |
**/
|
|
656 |
IMPORT_C TBool QueryVideoMbxNumberL( TVmbxQueryType aQueryType,
|
|
657 |
TDes& aNumber );
|
|
658 |
|
|
659 |
/**
|
|
660 |
* Saves the vmbx number. (in phone file system)
|
|
661 |
* @since 3.1
|
|
662 |
* @param aNumber video mbx number ( max length is KVmbxMaxNumberLength )
|
|
663 |
* @param aEntry determines in which entry the number is saved:
|
|
664 |
* EAlsLine1Entry = video mbx number entry of ALS primary
|
|
665 |
* line
|
|
666 |
* EAlsLine2Entry = video mbx number entry of ALS secondary
|
|
667 |
* line
|
|
668 |
* EAlsActiveLineEntry = entry of currently active ALS line
|
|
669 |
* @return Standard Symbian OS errorcode.
|
|
670 |
* KErrNone if number was successfully saved.
|
|
671 |
**/
|
|
672 |
IMPORT_C TInt SaveVideoMbxNumber( const TDesC& aNumber,
|
|
673 |
TVmbxNumberEntry aEntry );
|
|
674 |
|
|
675 |
/**
|
|
676 |
* Returns if the memory location for vmbx is sim memory
|
|
677 |
* @since 3.0
|
|
678 |
* @return ETrue if the vmbx number should be stored in the SIM
|
|
679 |
* EFalse otherwise.
|
|
680 |
*/
|
|
681 |
IMPORT_C TBool IsSimMemory();
|
|
682 |
|
|
683 |
/**
|
|
684 |
* Fetches vmbx address from SPS.
|
|
685 |
* @since 3.0
|
|
686 |
* @param aAddress vmbx address is saved here (must be room for at least
|
|
687 |
* KVmbxMaxAddressLength characters).
|
|
688 |
* @return - KErrNone if the address was found.
|
|
689 |
* aNumber will contain the vmbx address.
|
|
690 |
*
|
|
691 |
* - KErrNotFound if the address is not defined
|
|
692 |
*
|
|
693 |
* - Other error code if there was a problem in getting
|
|
694 |
* the address. Clients should show error note if this happens.
|
|
695 |
*/
|
|
696 |
IMPORT_C TInt GetVmbxAddressL( TDes& aAddress );
|
|
697 |
|
|
698 |
/**
|
|
699 |
* Fetches vmbx address from SPS.
|
|
700 |
* @since 3.2
|
|
701 |
* @param aAddress vmbx address is saved here (must be room for at least
|
|
702 |
* KVmbxMaxAddressLength characters).
|
|
703 |
* @param aServiceId Used Service Id
|
|
704 |
* @return General symbian error code.
|
|
705 |
*/
|
|
706 |
IMPORT_C TInt GetVmbxAddress( TDes& aAddress, TUint aServiceId );
|
|
707 |
|
|
708 |
/**
|
|
709 |
* Puts a popup on the screen asking for which type of Vmbx is used.
|
|
710 |
* @since 3.2
|
|
711 |
* @param aTitle Vmbx title type ( call / define ).
|
|
712 |
* @param aServiceId On completion, contains selected service's
|
|
713 |
* Service Id. If CS or Video Vmbx selected, value is 1, otherwise
|
|
714 |
* service's value is dynamic.
|
|
715 |
* @return which type of Vmbx is selected.
|
|
716 |
*/
|
|
717 |
IMPORT_C TInt SelectTypeL( TBool aTitle, TUint& aServiceId );
|
|
718 |
|
|
719 |
/**
|
|
720 |
* Service Ids getter
|
|
721 |
* @since 3.2
|
|
722 |
* @param aProfileIds On completion, contains all Service Ids.
|
|
723 |
* @return General symbian error code.
|
|
724 |
*/
|
|
725 |
IMPORT_C TInt GetServiceIds( RArray<TUint>& aProfileIds );
|
|
726 |
|
|
727 |
/**
|
|
728 |
* Service info getter
|
|
729 |
* @since 3.2
|
|
730 |
* @param aServiceInfo On completion, contains Service information
|
|
731 |
* @return General symbian error code.
|
|
732 |
*/
|
|
733 |
IMPORT_C TInt GetServiceInfo( TVmbxServiceInfo& aServiceInfo );
|
|
734 |
|
|
735 |
/**
|
|
736 |
* Issues a notify request on a Service profile change.
|
|
737 |
* @param aHandler User's notify handler
|
|
738 |
*/
|
|
739 |
IMPORT_C void NotifyServiceChange( MServiceNotifyHandler* aHandler );
|
|
740 |
|
|
741 |
/**
|
|
742 |
* Cancels a notify request on a Service profile change.
|
|
743 |
*/
|
|
744 |
IMPORT_C void NotifyServiceChangeCancel();
|
|
745 |
|
|
746 |
/**
|
|
747 |
* Get Service's Brand Id
|
|
748 |
* @since S60 3.2
|
|
749 |
* @param aServiceId Used Service Id
|
|
750 |
* @param aBrandId On completion, contains Brand Id
|
|
751 |
*/
|
|
752 |
IMPORT_C void BrandIdL( TInt aServiceId, TDes8& aBrandId );
|
|
753 |
|
|
754 |
/**
|
|
755 |
* Branded icon getter
|
|
756 |
* @since S60 3.2
|
|
757 |
* @param aBrandingId Used branding Id
|
|
758 |
* @param aBrandedBitmap Bitmap for branded icon
|
|
759 |
* @param aBrandedBitmapMask Mask to branded icon
|
|
760 |
*/
|
|
761 |
IMPORT_C void GetBrandedIconL( const TDesC8& aBrandingId,
|
|
762 |
CFbsBitmap*& aBrandedBitmap,
|
|
763 |
CFbsBitmap*& aBrandedBitmapMask );
|
|
764 |
|
|
765 |
/**
|
|
766 |
* Construct default icons(CS, Video and VoIP)
|
|
767 |
* @since S60 3.2
|
|
768 |
* @param aIcons On completion, contains created icons
|
|
769 |
*/
|
|
770 |
IMPORT_C void ConstructDefaultIconsL( CArrayPtr<CGulIcon>* aIcons );
|
|
771 |
|
|
772 |
private:
|
|
773 |
|
|
774 |
/**
|
|
775 |
* Add brand icon if it exist.
|
|
776 |
* @since S60 3.2
|
|
777 |
* @param aIcons On completion, contains new brand icon
|
|
778 |
* @param aServiceId Used Service Id
|
|
779 |
* @param aIconId On completion, contains branded icon's icon list id
|
|
780 |
*/
|
|
781 |
void AddBrandIconL( CArrayPtr<CGulIcon>* aIcons, TUint aServiceId, TInt& aIconId );
|
|
782 |
|
|
783 |
public: // Functions from base classes
|
|
784 |
|
|
785 |
/**
|
|
786 |
* From MCenRepNotifyHandlerCallback, to notify the client about
|
|
787 |
* changes for string value keys
|
|
788 |
**/
|
|
789 |
void HandleNotifyString( TUint32 aKey, const TDesC16& aValue );
|
|
790 |
|
|
791 |
/**
|
|
792 |
* From MCenRepNotifyHandlerCallback, to notify the client about
|
|
793 |
* changes in keys when the whole repository is listened for.
|
|
794 |
**/
|
|
795 |
void HandleNotifyGeneric( TUint32 aKey );
|
|
796 |
|
|
797 |
/**
|
|
798 |
* From MSSSettingsObserver, to notify changes in SS settings in phone
|
|
799 |
**/
|
|
800 |
void PhoneSettingChanged( TSSSettingsSetting aSetting, TInt aNewValue );
|
|
801 |
|
|
802 |
/**
|
|
803 |
* From MVmbxAlsObserver:
|
|
804 |
**/
|
|
805 |
void HandleAlsChangeL( TVmbxAlsLine aLine );
|
|
806 |
/**
|
|
807 |
* Refresh query. Client should determine whether it allow the
|
|
808 |
* refresh to happen.
|
|
809 |
* @since 2.6
|
|
810 |
* @param aType Refresh type.
|
|
811 |
* @param aFiles Elementary files which are to be changed.
|
|
812 |
* May be zero length.
|
|
813 |
* @return ETrue to allow refresh, EFalse to decline refresh.
|
|
814 |
*/
|
|
815 |
TBool AllowRefresh( TSatRefreshType aType, const TSatRefreshFiles& aFiles ) ;
|
|
816 |
|
|
817 |
/**
|
|
818 |
* Notification of refresh.
|
|
819 |
* @since 2.6
|
|
820 |
* @param aType Type of refresh which has happened.
|
|
821 |
* @param aFiles List of elementary files which has been changed.
|
|
822 |
* May be zero length.
|
|
823 |
*/
|
|
824 |
void Refresh( TSatRefreshType aType, const TSatRefreshFiles& aFiles );
|
|
825 |
|
|
826 |
private: // New functions
|
|
827 |
|
|
828 |
/**
|
|
829 |
* Routine to query SIM number
|
|
830 |
* @since
|
|
831 |
* @param aNumber Vmbx number
|
|
832 |
* @param aEntry Als line entry
|
|
833 |
* @return ETrue if user inserted number
|
|
834 |
**/
|
|
835 |
TBool QuerySimNumberL( TDes& aNumber,
|
|
836 |
TVmbxNumberEntry aEntry = EAlsActiveLineEntry );
|
|
837 |
|
|
838 |
|
|
839 |
/**
|
|
840 |
* Loads the resources needed for queries and confirmation notes.
|
|
841 |
* @since
|
|
842 |
**/
|
|
843 |
void LoadResourceL();
|
|
844 |
|
|
845 |
/**
|
|
846 |
* Shows a confirmation note after a saved vmbx number.
|
|
847 |
* @param aResourceId Resource id
|
|
848 |
**/
|
|
849 |
void ShowConfirmationNoteL( TInt aResourceId ) const;
|
|
850 |
|
|
851 |
/**
|
|
852 |
* Verifies that the given string is a valid phone number.
|
|
853 |
* Rules:
|
|
854 |
*
|
|
855 |
* - '+' is only allowed as the first character
|
|
856 |
* - The phone number part must have 3-21 digits
|
|
857 |
* @since
|
|
858 |
* @param aNumber Vmbx number
|
|
859 |
* @return ETrue if valid number
|
|
860 |
**/
|
|
861 |
TBool IsValidPhoneNumber( const TDesC& aNumber ) const;
|
|
862 |
|
|
863 |
/**
|
|
864 |
* Checks if a number is an emergency number.
|
|
865 |
* @since
|
|
866 |
* @param aNumber Vmbx number
|
|
867 |
* @return ETrue if emergency number
|
|
868 |
**/
|
|
869 |
TBool IsEmergencyNumberL( const TDesC& aNumber );
|
|
870 |
|
|
871 |
/**
|
|
872 |
* Fetches information about the SIM phonebook for vmbx numbers.
|
|
873 |
* Updates internal flags KVmFlagSimSupport and
|
|
874 |
* KVmFlagPhonebookBeingCached.
|
|
875 |
*
|
|
876 |
* @return Phonebook's GetInfo() return code.
|
|
877 |
**/
|
|
878 |
/*****************************************************
|
|
879 |
* Series 60 Customer / ETel
|
|
880 |
* Series 60 ETel API
|
|
881 |
*****************************************************/
|
|
882 |
TInt PhoneBookInfo();
|
|
883 |
|
|
884 |
/**
|
|
885 |
* Does a vmbx phonebook operation
|
|
886 |
*
|
|
887 |
* If the phonebook is being cached, defined amount of retries are
|
|
888 |
* made with 0.2 second delay in between.
|
|
889 |
* @param aOperation Operation identifier
|
|
890 |
* @param aEntry Vmbx entry (NULL)
|
|
891 |
* @return Phonebook error code. Specifically, KErrInUse, if
|
|
892 |
* the phonebook is still being cached after retries.
|
|
893 |
**/
|
|
894 |
TInt DoPhonebookOperation( TVmbxPhonebookOperation aOperation,
|
|
895 |
TVmbxEntry* aEntry = NULL );
|
|
896 |
|
|
897 |
// Prohibit copy constructor
|
|
898 |
RVmbxNumber( const RVmbxNumber& );
|
|
899 |
|
|
900 |
// Prohibit assigment operator
|
|
901 |
RVmbxNumber& operator = ( const RVmbxNumber& );
|
|
902 |
|
|
903 |
/**
|
|
904 |
* Reads an entry from the ICC-based phonebook.
|
|
905 |
* @since
|
|
906 |
* @param aEntry Vmbx sim entry data
|
|
907 |
**/
|
|
908 |
/*****************************************************
|
|
909 |
* Series 60 Customer / ETel
|
|
910 |
* Series 60 ETel API
|
|
911 |
*****************************************************/
|
|
912 |
void PhonebookReadL( TVmbxEntry& aEntry );
|
|
913 |
|
|
914 |
/**
|
|
915 |
* Writes an entry into ICC-based phonebook.
|
|
916 |
* @since
|
|
917 |
* @param aEntry Vmbx sim entry data
|
|
918 |
* @return Completion status of a request
|
|
919 |
**/
|
|
920 |
/*****************************************************
|
|
921 |
* Series 60 Customer / ETel
|
|
922 |
* Series 60 ETel API
|
|
923 |
*****************************************************/
|
|
924 |
TInt PhonebookWrite( TVmbxEntry& aEntry );
|
|
925 |
|
|
926 |
/**
|
|
927 |
* Removes an entry from ICC-based phonebook.
|
|
928 |
* @since
|
|
929 |
* @param aEntry Vmbx sim entry data
|
|
930 |
* @return Completion status of a request
|
|
931 |
**/
|
|
932 |
/*****************************************************
|
|
933 |
* Series 60 Customer / ETel
|
|
934 |
* Series 60 ETel API
|
|
935 |
*****************************************************/
|
|
936 |
TInt PhonebookDelete( TVmbxEntry& aEntry );
|
|
937 |
|
|
938 |
/**
|
|
939 |
* Converts a phone number to western format
|
|
940 |
* @param aDes Parameter to change
|
|
941 |
**/
|
|
942 |
void ConvertToWesternDigits( TDes& aDes ) const;
|
|
943 |
|
|
944 |
/**
|
|
945 |
* Create connection to ETel server
|
|
946 |
* @since
|
|
947 |
* @return KErrNone if success
|
|
948 |
**/
|
|
949 |
TInt ConnectETelServer();
|
|
950 |
|
|
951 |
/**
|
|
952 |
* Open phonebook's Single Fetch Dialog
|
|
953 |
* @since
|
|
954 |
* @param aPhoneNumber Phone number
|
|
955 |
*/
|
|
956 |
void FetchNumberFromPhonebook2L( TDes& aPhoneNumber );
|
|
957 |
|
|
958 |
/**
|
|
959 |
* Handling of emergency dial result.
|
|
960 |
* @since 3.2
|
|
961 |
* @see MPhCltEmergencyCallObserver::HandleEmergencyDialL().
|
|
962 |
*/
|
|
963 |
void HandleEmergencyDialL( const TInt aStatus );
|
|
964 |
|
|
965 |
/**
|
|
966 |
* Retrieves voice mailbox number from SIM/R-UIM
|
|
967 |
* @since
|
|
968 |
* @param aNumber Number
|
|
969 |
* @param aLineNumber Line 1 or 2
|
|
970 |
* @return Symbian OS error code (KErrNone is successful)
|
|
971 |
*/
|
|
972 |
TInt GetVmNumFromSIM( TDes& aNumber, TInt aLineNumber );
|
|
973 |
|
|
974 |
/**
|
|
975 |
* Retrieves voice mailbox number from VMN summary info
|
|
976 |
* @since
|
|
977 |
* @param aNumber Number
|
|
978 |
* @return Symbian OS error code (KErrNone is successful)
|
|
979 |
*/
|
|
980 |
TInt GetVmNumFromVMN( TDes& aNumber );
|
|
981 |
|
|
982 |
/**
|
|
983 |
* Retrieves voice mailbox number from NAM
|
|
984 |
* @since
|
|
985 |
* @param aNumber Number
|
|
986 |
* @param aNumType Number type (EVmbxMDN)
|
|
987 |
* @return Symbian OS error code (KErrNone is successful)
|
|
988 |
*/
|
|
989 |
TInt GetVmNumFromNamStore( TDes& aNumber, TInt aNumType = EVmbxMDN );
|
|
990 |
|
|
991 |
/**
|
|
992 |
* Retrieves voice mailbox number from Shared Data
|
|
993 |
* @since
|
|
994 |
* @param aNumber Number
|
|
995 |
* @param aLineNumber Line 1 or 2
|
|
996 |
* @return Symbian OS error code (KErrNone is successful)
|
|
997 |
*/
|
|
998 |
TInt GetVmNumFromSD( TDes& aNumber, TInt aLineNumber );
|
|
999 |
|
|
1000 |
/**
|
|
1001 |
* Closes ETel resources
|
|
1002 |
* @since
|
|
1003 |
*/
|
|
1004 |
void CloseETel();
|
|
1005 |
|
|
1006 |
/**
|
|
1007 |
* Appends string from resource to descriptor array
|
|
1008 |
* @since
|
|
1009 |
* @param aResourceId Resource id
|
|
1010 |
* @param aArray String array
|
|
1011 |
*/
|
|
1012 |
void AppendStrToArrayL( TInt aResourceId, CDesCArray& aArray );
|
|
1013 |
|
|
1014 |
/**
|
|
1015 |
* Set query dialog header text from resource string
|
|
1016 |
* @since
|
|
1017 |
* @param aResourceId Resource id
|
|
1018 |
* @param aDlg Query dialog
|
|
1019 |
*/
|
|
1020 |
void SetHeaderFromResourceL( TInt aResourceId, CAknQueryDialog& aDlg );
|
|
1021 |
|
|
1022 |
/**
|
|
1023 |
* Subscribe SAT notifications
|
|
1024 |
* @since
|
|
1025 |
*/
|
|
1026 |
void SubscribeSATNotificationsL();
|
|
1027 |
|
|
1028 |
/**
|
|
1029 |
* Gets MBI-file settings from Sim. MBI-file identifies the usage
|
|
1030 |
* of the mailbox records settings
|
|
1031 |
* @since
|
|
1032 |
* @return ETrue if successed
|
|
1033 |
*/
|
|
1034 |
TInt MailboxNumbersIdentifiers();
|
|
1035 |
|
|
1036 |
/**
|
|
1037 |
* Reading and writing to sim are tested
|
|
1038 |
* @since
|
|
1039 |
*/
|
|
1040 |
void TestAndSetSimAccessFlags();
|
|
1041 |
|
|
1042 |
/**
|
|
1043 |
* The actual size for number must be determine from max length
|
|
1044 |
* returned from GetInfo-method and saved number length on Sim.
|
|
1045 |
* @param aSimNumberLength The length of the number read from sim.
|
|
1046 |
* @since
|
|
1047 |
*/
|
|
1048 |
void CalculateActualMaxLengthOnSim( TInt aSimNumberLength );
|
|
1049 |
|
|
1050 |
/**
|
|
1051 |
* Returns video support state
|
|
1052 |
* @since S60 3.2
|
|
1053 |
* return ETrue if supported
|
|
1054 |
*/
|
|
1055 |
TBool VideoSupported();
|
|
1056 |
|
|
1057 |
/**
|
|
1058 |
* Checks if writing to sim is prohibited
|
|
1059 |
* @since S60 3.2
|
|
1060 |
* return ETrue if writing is not allowed
|
|
1061 |
*/
|
|
1062 |
TBool IsReadOnlySIM();
|
|
1063 |
|
|
1064 |
/**
|
|
1065 |
* Checks is VMBX number defined in phone memory
|
|
1066 |
* @since S60 3.2
|
|
1067 |
* @param aLineNumber Line 1 or 2
|
|
1068 |
* @return ETrue if VMBX number defined in Phone memory
|
|
1069 |
*/
|
|
1070 |
TBool VmbxNumDefInPhoneMemory( TInt aLineNumber);
|
|
1071 |
|
|
1072 |
/**
|
|
1073 |
* Checks is the given number stored in phone memory
|
|
1074 |
* @since S60 3.2
|
|
1075 |
* @param aNumber The number checked
|
|
1076 |
* @param aLineNumber Line 1 or 2
|
|
1077 |
* @return ETrue if number stored in Phone memory
|
|
1078 |
*/
|
|
1079 |
TBool NumStoredInPhone( const TDesC& aNumber, TInt aLineNumber );
|
|
1080 |
|
|
1081 |
/**
|
|
1082 |
* Saves VMBX number to the backup store
|
|
1083 |
* @since S60 3.2
|
|
1084 |
* @param aNumber The number to be saved
|
|
1085 |
* @param aLineNumber Line 1 or 2
|
|
1086 |
* @return Symbian OS error code (KErrNone is successful)
|
|
1087 |
*/
|
|
1088 |
TInt BackUpSimNumber( const TDesC& aNumber, TInt aLineNumber );
|
|
1089 |
|
|
1090 |
/**
|
|
1091 |
* Fetches VMBX number from backup store
|
|
1092 |
* @since S60 3.2
|
|
1093 |
* @param aNumber number
|
|
1094 |
* @param aLineNumber Line 1 or 2
|
|
1095 |
* @return Symbian OS error code (KErrNone is successful)
|
|
1096 |
*/
|
|
1097 |
TInt FetchSimNumberBackUp( TDes& aNumber, TInt aLineNumber );
|
|
1098 |
|
|
1099 |
/**
|
|
1100 |
* Clears VMBX number from the phone memory
|
|
1101 |
* @since S60 3.2
|
|
1102 |
* @param aLineNumber Line 1 or 2
|
|
1103 |
* @return Symbian OS error code (KErrNone is successful)
|
|
1104 |
*/
|
|
1105 |
TInt ClearVMBXNumberFromPhone( TInt aLineNumber );
|
|
1106 |
|
|
1107 |
/**
|
|
1108 |
* Indicates if user has edited VMBX number
|
|
1109 |
* @since S60 3.2
|
|
1110 |
* @param aLineNumber Line 1 or 2
|
|
1111 |
* @return ETrue if VMBX is edited by user
|
|
1112 |
*/
|
|
1113 |
TBool UserEditNumber( TInt aLineNumber );
|
|
1114 |
|
|
1115 |
/**
|
|
1116 |
* Sets the flag indicating that the user has edited
|
|
1117 |
* VMBX number
|
|
1118 |
* @since S60 3.2
|
|
1119 |
* @param aLineNumber Line 1 or 2
|
|
1120 |
* @return Symbian OS error code (KErrNone is successful)
|
|
1121 |
*/
|
|
1122 |
TInt SetUserEditNumber( TInt aLineNumber );
|
|
1123 |
|
|
1124 |
/**
|
|
1125 |
* Resets the flag that indicates that the user has edited
|
|
1126 |
* VMBX number
|
|
1127 |
* @since S60 3.2
|
|
1128 |
* @param aLineNumber Line 1 or 2
|
|
1129 |
* @return Symbian OS error code (KErrNone is successful)
|
|
1130 |
*/
|
|
1131 |
TInt ResetUserEditNumber( TInt aLineNumber );
|
|
1132 |
|
|
1133 |
/**
|
|
1134 |
* Fetches VMBX number stored in SIM if number is
|
|
1135 |
* available
|
|
1136 |
* @since S60 3.2
|
|
1137 |
* @param aNumber number
|
|
1138 |
* @param aLineNumber Line 1 or 2
|
|
1139 |
* @return ETrue if number is fetched
|
|
1140 |
*/
|
|
1141 |
TBool UseSimNumIfAvailable( TDes& aNumber, TInt aLineNumber );
|
|
1142 |
|
|
1143 |
/**
|
|
1144 |
* Handles the updating of a number stores in phone memory
|
|
1145 |
* @since S60 3.2
|
|
1146 |
* @param aLineNumber Line 1 or 2
|
|
1147 |
* @return Symbian OS error code (KErrNone is successful)
|
|
1148 |
*/
|
|
1149 |
TInt HandleNumberStores( TInt aLineNumber );
|
|
1150 |
|
|
1151 |
/**
|
|
1152 |
* Returns if the SIM memory is used on ALS 1
|
|
1153 |
* @since 3.2
|
|
1154 |
* @return ETrue if the SIM memory is used to store ALS1 number
|
|
1155 |
* EFalse otherwise.
|
|
1156 |
*/
|
|
1157 |
TBool UsesSimMemory();
|
|
1158 |
|
|
1159 |
/**
|
|
1160 |
* check count of VMBX number
|
|
1161 |
* available
|
|
1162 |
* @since S60 3.2.2
|
|
1163 |
* @param out aDefinedNumber a count of defined numbers
|
|
1164 |
* @param out aDefinedFlag a flag of which voice mail services are defined
|
|
1165 |
* @param out aServiceId Id of selected service is set
|
|
1166 |
*
|
|
1167 |
* @return Type of Vmbx, if there is only one mailbox configured, otherwise EVmbxNone
|
|
1168 |
*/
|
|
1169 |
TInt CheckDefinedNumberCountL( TInt& aDefinedNumber,
|
|
1170 |
TInt& aDefinedFlag, TUint& aServiceId );
|
|
1171 |
|
|
1172 |
/**
|
|
1173 |
* Returns if VMBX number stored in phone memory via external clients
|
|
1174 |
* @since S60 3.2.3
|
|
1175 |
* @param aLineNumber Line 1 or 2
|
|
1176 |
* @return ETrue if number is stored in phone memory via
|
|
1177 |
* external clients
|
|
1178 |
* EFalse number is stored in phone memory via internal clients
|
|
1179 |
*/
|
|
1180 |
TBool IsPhoneMemForcedEdit( const TInt aLineNumber );
|
|
1181 |
|
|
1182 |
/**
|
|
1183 |
* Sets the flag indicating that external clients has edited
|
|
1184 |
* VMBX number
|
|
1185 |
* @since S60 3.2.3
|
|
1186 |
* @param aLineNumber Line 1 or 2
|
|
1187 |
* @return Symbian OS error code (KErrNone is successful)
|
|
1188 |
*/
|
|
1189 |
TInt SetPhoneMemForcedEdit( TInt aLineNumber );
|
|
1190 |
|
|
1191 |
/**
|
|
1192 |
* Displays a note with a text loaded from resource file.
|
|
1193 |
* @since S60 v5.2
|
|
1194 |
* @param aResourceId Resource id for loading text for note
|
|
1195 |
*/
|
|
1196 |
void ShowInformationNoteL( const TInt aResourceId ) const;
|
|
1197 |
|
|
1198 |
/**
|
|
1199 |
* Check whether the note should be shown
|
|
1200 |
* this check is done because phone client calls GetVmbxNumber
|
|
1201 |
* and then SelectTypeL, which causes note qtn_... to be shown twice
|
|
1202 |
* @since S60 v5.2
|
|
1203 |
* @return ETrue if the note should be shown
|
|
1204 |
*/
|
|
1205 |
TBool IsNoNumberNoteAllowed();
|
|
1206 |
|
|
1207 |
/**
|
|
1208 |
* Check whether the number had been edited in inactive line
|
|
1209 |
* @since S60 v5.2
|
|
1210 |
* @param aInactiveLineNumber the inactive line number
|
|
1211 |
* @return ETrue if the number had been edited in inactive line
|
|
1212 |
*/
|
|
1213 |
TBool IsInactiveLineEdited( TInt& aInactiveLineNumber );
|
|
1214 |
|
|
1215 |
private: // data
|
|
1216 |
|
|
1217 |
// Observer for user action for saved vmbx number
|
|
1218 |
MVmbxNotifyHandler* iNotifyCallBack;
|
|
1219 |
|
|
1220 |
// Observer for user action for als line
|
|
1221 |
MVmbxAlsObserver* iUserAlsObserver;
|
|
1222 |
|
|
1223 |
|
|
1224 |
/*****************************************************
|
|
1225 |
* Series 60 Customer / ETel
|
|
1226 |
* Series 60 ETel API
|
|
1227 |
*****************************************************/
|
|
1228 |
// Root telephony server session
|
|
1229 |
RTelServer iTelServer;
|
|
1230 |
|
|
1231 |
/*****************************************************
|
|
1232 |
* Series 60 Customer / ETel
|
|
1233 |
* Series 60 ETel API
|
|
1234 |
*****************************************************/
|
|
1235 |
//Mobile phone client
|
|
1236 |
RMobilePhone iPhone;
|
|
1237 |
|
|
1238 |
/*****************************************************
|
|
1239 |
* Series 60 Customer / ETel
|
|
1240 |
* Series 60 ETel API
|
|
1241 |
*****************************************************/
|
|
1242 |
//Phonebook client
|
|
1243 |
RMobilePhoneBookStore iPhoneBook;
|
|
1244 |
|
|
1245 |
/*****************************************************
|
|
1246 |
* Series 60 Customer / ETel
|
|
1247 |
* Series 60 ETel API
|
|
1248 |
*****************************************************/
|
|
1249 |
// Multimode ETel phone book info structure that will
|
|
1250 |
// be used to retrieve data from phone book store.
|
|
1251 |
RMobilePhoneBookStore::TMobilePhoneBookInfoV1 iPhoneBookInfo;
|
|
1252 |
|
|
1253 |
/*****************************************************
|
|
1254 |
* Series 60 Customer / ETel
|
|
1255 |
* Series 60 ETel API
|
|
1256 |
*****************************************************/
|
|
1257 |
// A package for the iPhoneBookInfo.
|
|
1258 |
RMobilePhoneBookStore::TMobilePhoneBookInfoV1Pckg iPhoneBookInfoPckg;
|
|
1259 |
|
|
1260 |
/*****************************************************
|
|
1261 |
* Series 60 Customer / ETel
|
|
1262 |
* Series 60 ETel API
|
|
1263 |
*****************************************************/
|
|
1264 |
// A package for the iPhoneVoicemailInfo.
|
|
1265 |
RMobilePhone::TMobilePhoneVoicemailIdsV3 iPhoneVoicemailInfo;
|
|
1266 |
|
|
1267 |
/*****************************************************
|
|
1268 |
* Series 60 Customer / ETel
|
|
1269 |
* Series 60 ETel API
|
|
1270 |
*****************************************************/
|
|
1271 |
// A package for the iPhoneVoicemailInfoPckg.
|
|
1272 |
RMobilePhone::TMobilePhoneVoicemailIdsV3Pckg iPhoneVoicemailInfoPckg;
|
|
1273 |
|
|
1274 |
/*****************************************************
|
|
1275 |
* Series 60 Customer / RSAT
|
|
1276 |
* Series 60 RSAT API
|
|
1277 |
*****************************************************/
|
|
1278 |
RSatSession iRSatSession; //// Root RSATsession opening RSatClient
|
|
1279 |
|
|
1280 |
/*****************************************************
|
|
1281 |
* Series 60 Customer / RSAT
|
|
1282 |
* Series 60 RSAT API
|
|
1283 |
*****************************************************/
|
|
1284 |
RSatRefresh iRSatClient; //RSatClient for notification of file changed.
|
|
1285 |
|
|
1286 |
/*****************************************************
|
|
1287 |
* Series 60 Customer / RSAT
|
|
1288 |
* Series 60 RSAT API/ ETel
|
|
1289 |
* Series 60 ETel API
|
|
1290 |
*****************************************************/
|
|
1291 |
// A package for the TRefreshFileList.
|
|
1292 |
// list of files, waiting for notification.
|
|
1293 |
RSat::TRefreshFileList iObservedFileList;
|
|
1294 |
|
|
1295 |
//Central repository observer
|
|
1296 |
CCenRepNotifyHandler* iNotifyHandler;
|
|
1297 |
|
|
1298 |
//Central repository session
|
|
1299 |
CRepository* iSession;
|
|
1300 |
|
|
1301 |
//SS setting
|
|
1302 |
RSSSettings iSsSettings;
|
|
1303 |
|
|
1304 |
// Offset in resourse file
|
|
1305 |
TInt iResourceFileOffset;
|
|
1306 |
|
|
1307 |
// Vmbx state flags
|
|
1308 |
TInt iFlags;
|
|
1309 |
|
|
1310 |
// text query dialog
|
|
1311 |
CVmTextQueryDialog* iQuery; // owned
|
|
1312 |
|
|
1313 |
// indicates if the RVmbxNumber was closed during a dialog
|
|
1314 |
TBool* iClosedPtr;
|
|
1315 |
|
|
1316 |
// Control enviroment
|
|
1317 |
CCoeEnv* iCoeEnv; // not owned
|
|
1318 |
|
|
1319 |
//PRI settings
|
|
1320 |
// nNumber options
|
|
1321 |
TInt iVmNumOpts;
|
|
1322 |
|
|
1323 |
//Ui options
|
|
1324 |
TInt iVmUiOpts;
|
|
1325 |
|
|
1326 |
// Synchronization state
|
|
1327 |
TBool iSynchronize;
|
|
1328 |
|
|
1329 |
// Vmbx type
|
|
1330 |
TInt iType;
|
|
1331 |
|
|
1332 |
// Memory location (sim/phone)
|
|
1333 |
TInt iMemoryLocation;
|
|
1334 |
|
|
1335 |
// Sim query dialog
|
|
1336 |
CVMSimQueryDilaog* iVMSimQueryDialog;
|
|
1337 |
|
|
1338 |
// Text query dialog
|
|
1339 |
CVmTextQueryDialog* iVideoQuery; // owned
|
|
1340 |
|
|
1341 |
// voice mailbox type selection dialog
|
|
1342 |
CAknListQueryDialog* iTypeSelectionQuery; //owned
|
|
1343 |
|
|
1344 |
|
|
1345 |
TBool iAlphaStringFound;
|
|
1346 |
// Alpha string which is read from the SIM card
|
|
1347 |
HBufC* iAlphaStringFromSIM;
|
|
1348 |
// True if number in sim
|
|
1349 |
TBool iNumberFound;
|
|
1350 |
//Phonebook type
|
|
1351 |
TUint8 iPhoneBookType;
|
|
1352 |
//Number fetched from Sim when checking write protection
|
|
1353 |
TBuf<KVmbxMaxNumberLength> iNumberFromSim;
|
|
1354 |
|
|
1355 |
//ETrue when first USim phonebook type is tested
|
|
1356 |
TBool iUSimFirstRoundTest;
|
|
1357 |
|
|
1358 |
|
|
1359 |
private:
|
|
1360 |
|
|
1361 |
/**
|
|
1362 |
* True if Sim access rights are tested
|
|
1363 |
*/
|
|
1364 |
TBool iStartUpTest;
|
|
1365 |
|
|
1366 |
/**
|
|
1367 |
* For single item fetch
|
|
1368 |
*/
|
|
1369 |
CPhCntSingleItemFetch* iCntFetch;
|
|
1370 |
|
|
1371 |
/**
|
|
1372 |
* To test if mbdn number doesn't exist
|
|
1373 |
*/
|
|
1374 |
TBool iNoNumberFound;
|
|
1375 |
|
|
1376 |
/**
|
|
1377 |
* To test if number can be found from vmbx-phonebook
|
|
1378 |
*/
|
|
1379 |
TBool iMbdnPhonebookOk;
|
|
1380 |
|
|
1381 |
/**
|
|
1382 |
* querying state of QueryNumberL
|
|
1383 |
*/
|
|
1384 |
TVmVmQueryStatusType iQueryingState;
|
|
1385 |
|
|
1386 |
/**
|
|
1387 |
* Type and Id of mailboxes to list in iTypeSelectionQuery, Own
|
|
1388 |
*/
|
|
1389 |
RArray<TVmbxServiceSelection> iVmbxServiceSelection;
|
|
1390 |
|
|
1391 |
/**
|
|
1392 |
* Handles Service proviver Settings, Own.
|
|
1393 |
*/
|
|
1394 |
CVmSPSHandler* iVmSpsHandler;
|
|
1395 |
|
|
1396 |
/**
|
|
1397 |
* Handles Branding Server, Own.
|
|
1398 |
*/
|
|
1399 |
CVmBSHandler* iVmBsHandler;
|
|
1400 |
|
|
1401 |
/**
|
|
1402 |
* Feature manager is initialized
|
|
1403 |
*/
|
|
1404 |
TBool iFeatMgrInitialized;
|
|
1405 |
|
|
1406 |
/**
|
|
1407 |
* Sim card is whether found in ME
|
|
1408 |
*/
|
|
1409 |
TBool iSimCardFound;
|
|
1410 |
|
|
1411 |
};
|
|
1412 |
|
|
1413 |
#endif // VMNUMBER_H
|
|
1414 |
|
|
1415 |
// End of File
|