phonesrv_plat/phone_settings_api/inc/PsetCallDiverting.h
changeset 0 ff3b6d0fd310
child 19 7d48bed6ce0c
equal deleted inserted replaced
-1:000000000000 0:ff3b6d0fd310
       
     1 /*
       
     2 * Copyright (c) 2002 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:  Call diverting class. Sets and gets call diverting status. 
       
    15 *
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef     PSETCALLDIVERTING_H
       
    21 #define     PSETCALLDIVERTING_H
       
    22 
       
    23 //  INCLUDES           
       
    24 #include <mmretrieve.h>
       
    25 #include "nwdefs.h"             
       
    26 #include "PsetConstants.h"
       
    27 #include "MPsetCallDiverting.h"
       
    28 
       
    29 //  FORWARD DECLARATIONS
       
    30 class CDesC16ArrayFlat;
       
    31 class MPsetDivertObserver;
       
    32 class MPsetRequestObserver;
       
    33 class RVmbxNumber;
       
    34 class CRepository;
       
    35 class TCallDivertNotifySetting;
       
    36 class MPSetCallDiverting;
       
    37 class CPSetCallDivertingFactory;
       
    38 class MCallDiverting;
       
    39 
       
    40 enum TSelectedLine
       
    41     {
       
    42     EPrimaryLine,		// ALS is supported by ME & SIM and Line 1 (Primary Line) is the current line
       
    43     EAuxiliaryLine,		// ALS is supported by ME & SIM and Line 2 (Auxiliary Line) is the current line
       
    44     EUnknownLine,		// ALS is supported by ME & SIM but TSY can not determine line selection
       
    45     ENotSupportedLine	// ALS is not supported either by ME or SIM or both.
       
    46     };
       
    47 
       
    48 //  CLASS DECLARATION  
       
    49 /**
       
    50 *  CPsetCallDiverting class is call diverting SS handler. 
       
    51 *  @lib phonesettings.lib
       
    52 *  @since 1.0
       
    53 */
       
    54 class   CPsetCallDiverting : public CBase,
       
    55                              public MPsetCallDiverting
       
    56     {
       
    57     public: // constructor & destructor
       
    58 
       
    59         /**
       
    60         * Symbian OS 2-phase Constructor.
       
    61         *
       
    62         * @param aObserver Call divert observer.
       
    63         * @param aPhone Provides client access to 
       
    64         *               mobile phone functionality provided by TSY.
       
    65         * @return Created CPsetCallDiverting object.
       
    66         */
       
    67         IMPORT_C static CPsetCallDiverting* NewL( 
       
    68             MPsetDivertObserver& aObserver, 
       
    69             RMobilePhone& aPhone);
       
    70         
       
    71         /* 
       
    72         * Destructor.
       
    73         */
       
    74         IMPORT_C ~CPsetCallDiverting();
       
    75                 
       
    76     public: // From base class.
       
    77 
       
    78         /**
       
    79         * @see MPsetCallDiverting::SetDivertingL().
       
    80         */
       
    81         IMPORT_C void SetDivertingL( const TCallDivertSetting& aDivert, 
       
    82             TBasicServiceGroups aBsc, TBool aVmbx = EFalse ); 
       
    83 
       
    84         /**
       
    85         * @see MPsetCallDiverting::GetDivertingStatusL().
       
    86         */ 
       
    87         IMPORT_C void GetDivertingStatusL( const TServiceGroup aServiceGroup, 
       
    88             const TCallDivertingCondition aCondition, 
       
    89             TBasicServiceGroups aBsc );
       
    90         
       
    91         /**
       
    92         * @see MPsetCallDiverting::CancelCurrentRequest().
       
    93         */ 
       
    94         IMPORT_C TInt CancelCurrentRequest(); 
       
    95     
       
    96     public: //new
       
    97 
       
    98         /**
       
    99         *  Gets the default time for CF No Reply.
       
   100         *  No error checking for return values which should be
       
   101         *  5-30, in steps of 5.
       
   102         *
       
   103         * @return Returns the current timer value.
       
   104         */
       
   105         IMPORT_C TInt GetTimerValueL();    
       
   106     
       
   107         /**
       
   108         *  Sets the default time for CF No Reply.
       
   109         *  No error checking to parameters, which should be on range 5-30,
       
   110         *  using steps of 5.
       
   111         *
       
   112         *  @param aIndex New value for timer.
       
   113         *  @return Returns error code.
       
   114         */
       
   115         IMPORT_C TInt SetTimerValueL( const TInt& aIndex );    
       
   116         
       
   117         /**
       
   118         * The default (last forwarded-to) numbers can be retrieved 
       
   119         * through this method. 
       
   120         *
       
   121         * @param aDefNumbers Read default numbers from shared data.
       
   122         * @return Returns error code or amount of numbers read.
       
   123         */
       
   124         IMPORT_C TInt GetDefaultNumbersL( CDesC16ArrayFlat& aDefNumbers );            
       
   125 
       
   126         /**
       
   127         * Sets new default number to the default numbers list, 
       
   128         * erases the oldest one automatically, if three numbers already in the
       
   129         * shared data.
       
   130         *
       
   131         * @param aNumber New number to be added.
       
   132         * @return Returns error code.
       
   133         */
       
   134         IMPORT_C TInt SetNewDefaultNumberL( TDes& aNumber );    
       
   135 
       
   136         /**
       
   137         * Swaps the most recently used number to first in shared data file.
       
   138         *
       
   139         * @param  aLocation Used number's location (1-3) in shared data.
       
   140         */
       
   141         IMPORT_C void SwapDefaultNumberL( const TInt& aLocation );
       
   142 
       
   143         /**
       
   144         * Saves last used data number to shared data.
       
   145         *
       
   146         * @param  aNumber Number used for data call forwarding.
       
   147         * @return Returns error code.
       
   148         */
       
   149         IMPORT_C TInt SetUsedDataNumberL( TTelNumber& aNumber );
       
   150 
       
   151         /**
       
   152         * Saves last used fax number to shared data.
       
   153         *
       
   154         * @param  aNumber Number used for data fax forwarding.
       
   155         * @return Returns error code.
       
   156         */
       
   157         IMPORT_C TInt SetUsedFaxNumberL( TTelNumber& aNumber );
       
   158 
       
   159         /**
       
   160         * Gets the phone number used for fax call forwarding.
       
   161         *
       
   162         * @return Number used for data call forwarding.
       
   163         */
       
   164         IMPORT_C HBufC* GetUsedFaxNumberLC();
       
   165 
       
   166         /**
       
   167         * Gets the phone number used for data call forwarding.
       
   168         *
       
   169         * @return Number used for data call forwarding.
       
   170         */
       
   171         IMPORT_C HBufC* GetUsedDataNumberLC();
       
   172 
       
   173         /** 
       
   174         * Sets request observer.
       
   175         *
       
   176         * @param aObs Where the request completion should be informed to.
       
   177         */        
       
   178         IMPORT_C void SetRequestObserver( MPsetRequestObserver* aObs );
       
   179 
       
   180         /** 
       
   181         * Queries for voice mail box number. If number is undefined, number 
       
   182         * entry pops up.
       
   183         * @since 2.0
       
   184         * 
       
   185         * @param aTelNumber Vmbx number.
       
   186         */        
       
   187         IMPORT_C void VoiceMailQueryL( TDes& aTelNumber );
       
   188         
       
   189         /** 
       
   190         * Queries for video mailbox number. If number is undefined, number 
       
   191         * entry pops up.
       
   192         * @since 3.1
       
   193         * 
       
   194         * @param aTelNumber Video mailbox number.
       
   195         */         
       
   196         IMPORT_C void VideoMailQueryL( TDes& aTelNumber );
       
   197 
       
   198     private: //new
       
   199         
       
   200         TInt OpenVideoMailboxLC( TDes& aTelNumber, RVmbxNumber& aVmbx );
       
   201         
       
   202     private: // constructors
       
   203               
       
   204         void ConstructL( MPsetDivertObserver& aObserver );
       
   205         
       
   206         CPsetCallDiverting( RMobilePhone& aPhone );
       
   207                
       
   208     private: //member data
       
   209         
       
   210         // Observer for Call divert requests
       
   211         MPsetDivertObserver* iObserver;
       
   212         
       
   213         // Provides client access to mobile phone functionality provided by TSY.
       
   214         RMobilePhone& iPhone;
       
   215         
       
   216         // Request observer
       
   217         MPsetRequestObserver* iReqObserver;
       
   218 
       
   219         // Central repository.
       
   220         CRepository* iRepository;
       
   221         
       
   222         // Call Divert implementation.
       
   223         MCallDiverting* iDivert;
       
   224      };
       
   225 
       
   226 #endif      //  PSETCALLDIVERTING_H
       
   227 
       
   228 // End of File