phonesrv_plat/voice_mailbox_number_api/inc/vmnumber.h
changeset 0 ff3b6d0fd310
child 7 a19c8664496d
equal deleted inserted replaced
-1:000000000000 0:ff3b6d0fd310
       
     1 /*
       
     2 * Copyright (c) 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:  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         * Checks whether there is support for USIM(WCDMA)
       
  1023         * @since
       
  1024         * @return ETrue if USim is used
       
  1025         */
       
  1026         TBool IsUsimSupport();
       
  1027 
       
  1028         /**
       
  1029         * Subscribe SAT notifications
       
  1030         * @since
       
  1031         */
       
  1032         void SubscribeSATNotificationsL();
       
  1033 
       
  1034         /**
       
  1035         * Gets MBI-file settings from Sim. MBI-file identifies the usage
       
  1036         * of the mailbox records settings
       
  1037         * @since
       
  1038         * @return ETrue if successed
       
  1039         */
       
  1040         TInt MailboxNumbersIdentifiers();
       
  1041 
       
  1042         /**
       
  1043         * Reading and writing to sim are tested
       
  1044         * @since
       
  1045         */
       
  1046         void TestAndSetSimAccessFlags();
       
  1047 
       
  1048         /**
       
  1049         * The actual size for number must be determine from max length
       
  1050         * returned from GetInfo-method and saved number length on Sim.
       
  1051         * @param aSimNumberLength The length of the number read from sim.
       
  1052         * @since
       
  1053         */
       
  1054         void CalculateActualMaxLengthOnSim( TInt aSimNumberLength );
       
  1055 
       
  1056         /**
       
  1057         * Returns video support state
       
  1058         * @since S60 3.2
       
  1059         * return ETrue if supported
       
  1060         */
       
  1061         TBool VideoSupported();
       
  1062 
       
  1063         /**
       
  1064         * Checks if writing to sim is prohibited
       
  1065         * @since S60 3.2
       
  1066         * return ETrue if writing is not allowed
       
  1067         */
       
  1068         TBool IsReadOnlySIM();
       
  1069 
       
  1070         /**
       
  1071         * Checks is VMBX number defined in phone memory
       
  1072         * @since S60 3.2
       
  1073         * @param aLineNumber Line 1 or 2
       
  1074         * @return ETrue if VMBX number defined in Phone memory
       
  1075         */
       
  1076         TBool VmbxNumDefInPhoneMemory( TInt aLineNumber);
       
  1077 
       
  1078         /**
       
  1079         * Checks is the given number stored in phone memory
       
  1080         * @since S60 3.2
       
  1081         * @param aNumber The number checked
       
  1082         * @param aLineNumber Line 1 or 2
       
  1083         * @return ETrue if number stored in Phone memory
       
  1084         */
       
  1085         TBool NumStoredInPhone( const TDesC& aNumber, TInt aLineNumber );
       
  1086 
       
  1087         /**
       
  1088         * Saves VMBX number to the backup store
       
  1089         * @since S60 3.2
       
  1090         * @param aNumber The number to be saved
       
  1091         * @param aLineNumber Line 1 or 2
       
  1092         * @return Symbian OS error code (KErrNone is successful)
       
  1093         */
       
  1094         TInt BackUpSimNumber( const TDesC& aNumber, TInt aLineNumber );
       
  1095 
       
  1096         /**
       
  1097         * Fetches VMBX number from backup store
       
  1098         * @since S60 3.2
       
  1099         * @param aNumber number
       
  1100         * @param aLineNumber Line 1 or 2
       
  1101         * @return Symbian OS error code (KErrNone is successful)
       
  1102         */
       
  1103         TInt FetchSimNumberBackUp( TDes& aNumber, TInt aLineNumber );
       
  1104 
       
  1105         /**
       
  1106         * Clears VMBX number from the phone memory
       
  1107         * @since S60 3.2
       
  1108         * @param aLineNumber Line 1 or 2
       
  1109         * @return Symbian OS error code (KErrNone is successful)
       
  1110         */
       
  1111         TInt ClearVMBXNumberFromPhone( TInt aLineNumber );
       
  1112 
       
  1113         /**
       
  1114         * Indicates if user has edited VMBX number
       
  1115         * @since S60 3.2
       
  1116         * @param aLineNumber Line 1 or 2
       
  1117         * @return ETrue if VMBX is edited by user
       
  1118         */
       
  1119         TBool UserEditNumber( TInt aLineNumber );
       
  1120 
       
  1121         /**
       
  1122         * Sets the flag indicating that the user has edited
       
  1123         * VMBX number
       
  1124         * @since S60 3.2
       
  1125         * @param aLineNumber Line 1 or 2
       
  1126         * @return Symbian OS error code (KErrNone is successful)
       
  1127         */
       
  1128         TInt SetUserEditNumber( TInt aLineNumber );
       
  1129 
       
  1130         /**
       
  1131         * Resets the flag that indicates that the user has edited
       
  1132         * VMBX number
       
  1133         * @since S60 3.2
       
  1134         * @param aLineNumber Line 1 or 2
       
  1135         * @return Symbian OS error code (KErrNone is successful)
       
  1136         */
       
  1137         TInt ResetUserEditNumber( TInt aLineNumber );
       
  1138 
       
  1139         /**
       
  1140         * Fetches VMBX number stored in SIM if number is
       
  1141         * available
       
  1142         * @since S60 3.2
       
  1143         * @param aNumber number
       
  1144         * @param aLineNumber Line 1 or 2
       
  1145         * @return ETrue if number is fetched
       
  1146         */
       
  1147         TBool UseSimNumIfAvailable( TDes& aNumber, TInt aLineNumber );
       
  1148 
       
  1149         /**
       
  1150         * Handles the updating of a number stores in phone memory
       
  1151         * @since S60 3.2
       
  1152         * @param aLineNumber Line 1 or 2
       
  1153         * @return Symbian OS error code (KErrNone is successful)
       
  1154         */
       
  1155         TInt HandleNumberStores( TInt aLineNumber );
       
  1156 
       
  1157         /**
       
  1158         * Returns if the SIM memory is used on ALS 1
       
  1159         * @since 3.2
       
  1160         * @return ETrue if the SIM memory is used to store ALS1 number
       
  1161         *         EFalse otherwise.
       
  1162         */
       
  1163         TBool UsesSimMemory();
       
  1164 
       
  1165         /**
       
  1166         * check count of VMBX number
       
  1167         * available
       
  1168         * @since S60 3.2.2
       
  1169         * @param out aDefinedNumber a count of defined numbers
       
  1170         * @param out aDefinedFlag a flag of which voice mail services are defined
       
  1171         * @param out aServiceId Id of selected service is set
       
  1172         *
       
  1173         * @return Type of Vmbx, if there is only one mailbox configured, otherwise EVmbxNone
       
  1174         */
       
  1175         TInt CheckDefinedNumberCountL( TInt& aDefinedNumber,
       
  1176                     TInt& aDefinedFlag, TUint& aServiceId );
       
  1177 
       
  1178         /**
       
  1179         * Returns if VMBX number stored in phone memory via external clients
       
  1180         * @since S60 3.2.3
       
  1181         * @param aLineNumber Line 1 or 2
       
  1182         * @return ETrue if number is stored in phone memory via 
       
  1183         *                                               external clients
       
  1184         *         EFalse number is stored in phone memory via internal clients
       
  1185         */
       
  1186         TBool IsPhoneMemForcedEdit( const TInt aLineNumber );
       
  1187 
       
  1188         /**
       
  1189         * Sets the flag indicating that external clients has edited
       
  1190         * VMBX number
       
  1191         * @since S60 3.2.3
       
  1192         * @param aLineNumber Line 1 or 2
       
  1193         * @return Symbian OS error code (KErrNone is successful)
       
  1194         */   
       
  1195         TInt SetPhoneMemForcedEdit( TInt aLineNumber );
       
  1196 
       
  1197         /**
       
  1198          * Displays a note with a text loaded from resource file.
       
  1199          * @since S60 v5.2
       
  1200          * @param aResourceId Resource id for loading text for note
       
  1201          */
       
  1202         void ShowInformationNoteL( const TInt aResourceId ) const;
       
  1203 
       
  1204         /**
       
  1205          * Check whether the note should be shown
       
  1206          * this check is done because phone client calls GetVmbxNumber 
       
  1207          * and then SelectTypeL, which causes note qtn_... to be shown twice
       
  1208          * @since S60 v5.2
       
  1209          * @return ETrue if the note should be shown
       
  1210          */
       
  1211         TBool IsNoNumberNoteAllowed();
       
  1212 
       
  1213     private:  // data
       
  1214 
       
  1215         // Observer for user action for saved vmbx number
       
  1216         MVmbxNotifyHandler* iNotifyCallBack;
       
  1217 
       
  1218         // Observer for user action for als line
       
  1219         MVmbxAlsObserver* iUserAlsObserver;
       
  1220 
       
  1221 
       
  1222         /*****************************************************
       
  1223         *  Series 60 Customer / ETel
       
  1224         *  Series 60 ETel API
       
  1225         *****************************************************/
       
  1226         // Root telephony server session
       
  1227         RTelServer iTelServer;
       
  1228 
       
  1229         /*****************************************************
       
  1230         *  Series 60 Customer / ETel
       
  1231         *  Series 60 ETel API
       
  1232         *****************************************************/
       
  1233         //Mobile phone client
       
  1234         RMobilePhone iPhone;
       
  1235 
       
  1236         /*****************************************************
       
  1237         *  Series 60 Customer / ETel
       
  1238         *  Series 60 ETel API
       
  1239         *****************************************************/
       
  1240         //Phonebook client
       
  1241         RMobilePhoneBookStore iPhoneBook;
       
  1242 
       
  1243         /*****************************************************
       
  1244         *  Series 60 Customer / ETel
       
  1245         *  Series 60 ETel API
       
  1246         *****************************************************/
       
  1247         //  Multimode ETel phone book info structure that will
       
  1248         //  be used to retrieve data from phone book store.
       
  1249         RMobilePhoneBookStore::TMobilePhoneBookInfoV1 iPhoneBookInfo;
       
  1250 
       
  1251         /*****************************************************
       
  1252         *  Series 60 Customer / ETel
       
  1253         *  Series 60 ETel API
       
  1254         *****************************************************/
       
  1255         //  A package for the iPhoneBookInfo.
       
  1256         RMobilePhoneBookStore::TMobilePhoneBookInfoV1Pckg iPhoneBookInfoPckg;
       
  1257 
       
  1258         /*****************************************************
       
  1259         *  Series 60 Customer / ETel
       
  1260         *  Series 60 ETel API
       
  1261         *****************************************************/
       
  1262         //  A package for the iPhoneVoicemailInfo.
       
  1263         RMobilePhone::TMobilePhoneVoicemailIdsV3 iPhoneVoicemailInfo;
       
  1264 
       
  1265         /*****************************************************
       
  1266         *  Series 60 Customer / ETel
       
  1267         *  Series 60 ETel API
       
  1268         *****************************************************/
       
  1269         //  A package for the iPhoneVoicemailInfoPckg.
       
  1270         RMobilePhone::TMobilePhoneVoicemailIdsV3Pckg iPhoneVoicemailInfoPckg;
       
  1271 
       
  1272         /*****************************************************
       
  1273         *  Series 60 Customer / RSAT
       
  1274         *  Series 60 RSAT API
       
  1275         *****************************************************/
       
  1276         RSatSession  iRSatSession; //// Root RSATsession opening RSatClient
       
  1277 
       
  1278         /*****************************************************
       
  1279         *  Series 60 Customer / RSAT
       
  1280         *  Series 60 RSAT API
       
  1281         *****************************************************/
       
  1282         RSatRefresh  iRSatClient; //RSatClient for notification of file changed.
       
  1283 
       
  1284         /*****************************************************
       
  1285         *  Series 60 Customer / RSAT
       
  1286         *  Series 60 RSAT API/ ETel
       
  1287         *  Series 60 ETel API
       
  1288         *****************************************************/
       
  1289         //  A package for the TRefreshFileList.
       
  1290         // list of files, waiting for notification.
       
  1291         RSat::TRefreshFileList iObservedFileList;
       
  1292 
       
  1293         //Central repository observer
       
  1294         CCenRepNotifyHandler* iNotifyHandler;
       
  1295 
       
  1296         //Central repository session
       
  1297         CRepository* iSession;
       
  1298 
       
  1299         //SS setting
       
  1300         RSSSettings iSsSettings;
       
  1301 
       
  1302         // Offset in resourse file
       
  1303         TInt iResourceFileOffset;
       
  1304 
       
  1305         // Vmbx state flags
       
  1306         TInt iFlags;
       
  1307 
       
  1308         // text query dialog
       
  1309         CVmTextQueryDialog* iQuery;  // owned
       
  1310 
       
  1311         // indicates if the RVmbxNumber was closed during a dialog
       
  1312         TBool* iClosedPtr;
       
  1313 
       
  1314         // Control enviroment
       
  1315         CCoeEnv* iCoeEnv;  // not owned
       
  1316 
       
  1317         //PRI settings
       
  1318         // nNumber options
       
  1319         TInt iVmNumOpts;
       
  1320 
       
  1321         //Ui options
       
  1322         TInt iVmUiOpts;
       
  1323 
       
  1324         // Synchronization state
       
  1325         TBool iSynchronize;
       
  1326 
       
  1327         // Vmbx type
       
  1328         TInt iType;
       
  1329 
       
  1330         // Memory location (sim/phone)
       
  1331         TInt iMemoryLocation;
       
  1332 
       
  1333         // Sim query dialog
       
  1334         CVMSimQueryDilaog* iVMSimQueryDialog;
       
  1335 
       
  1336         // USim supported when true
       
  1337         TBool iUSimSupport;
       
  1338 
       
  1339         // Text query dialog
       
  1340         CVmTextQueryDialog* iVideoQuery;  // owned
       
  1341 
       
  1342         // voice mailbox type selection dialog
       
  1343         CAknListQueryDialog* iTypeSelectionQuery; //owned
       
  1344 
       
  1345 
       
  1346         TBool iAlphaStringFound;
       
  1347         // Alpha string which is read from the SIM card
       
  1348         HBufC* iAlphaStringFromSIM;
       
  1349         // True if number in sim
       
  1350         TBool iNumberFound;
       
  1351         //Phonebook type
       
  1352         TUint8 iPhoneBookType;
       
  1353         //Number fetched from Sim when checking write protection
       
  1354         TBuf<KVmbxMaxNumberLength> iNumberFromSim;
       
  1355 
       
  1356         //ETrue when first USim phonebook type is tested
       
  1357         TBool iUSimFirstRoundTest;
       
  1358 
       
  1359 
       
  1360     private:
       
  1361 
       
  1362         /**
       
  1363          * True if Sim access rights are tested
       
  1364          */ 
       
  1365         TBool iStartUpTest;
       
  1366 
       
  1367         /**
       
  1368          * For single item fetch
       
  1369          */ 
       
  1370         CPhCntSingleItemFetch* iCntFetch;
       
  1371 
       
  1372         /**
       
  1373          * To test if mbdn number doesn't exist
       
  1374          */ 
       
  1375         TBool iNoNumberFound;
       
  1376 
       
  1377         /**
       
  1378          * To test if number can be found from vmbx-phonebook
       
  1379          */ 
       
  1380         TBool iMbdnPhonebookOk;
       
  1381 
       
  1382         /**
       
  1383          * querying state of QueryNumberL
       
  1384          */ 
       
  1385         TVmVmQueryStatusType iQueryingState;
       
  1386 
       
  1387         /**
       
  1388          * Type and Id of mailboxes to list in iTypeSelectionQuery, Own
       
  1389          */
       
  1390         RArray<TVmbxServiceSelection> iVmbxServiceSelection;
       
  1391 
       
  1392         /**
       
  1393          * Handles Service proviver Settings, Own.
       
  1394          */
       
  1395         CVmSPSHandler* iVmSpsHandler;
       
  1396 
       
  1397         /**
       
  1398          * Handles Branding Server, Own.
       
  1399          */
       
  1400         CVmBSHandler* iVmBsHandler;
       
  1401         
       
  1402         /**
       
  1403          * Feature manager is initialized
       
  1404          */
       
  1405         TBool iFeatMgrInitialized;
       
  1406         
       
  1407         /**
       
  1408          * Sim card is whether found in ME
       
  1409          */
       
  1410         TBool iSimCardFound;
       
  1411 
       
  1412     };
       
  1413 
       
  1414 #endif  // VMNUMBER_H
       
  1415 
       
  1416 // End of File