cellular/psetnotesui/inc/psuinotemaster.h
changeset 51 12bc758d6a02
parent 48 78df25012fda
child 53 25b8d29b7c59
equal deleted inserted replaced
48:78df25012fda 51:12bc758d6a02
     1 /*
       
     2 * Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  
       
    15 *   CPsuiNoteMaster class is responsible for showing notes. It has also capa-
       
    16 *   bilities to show bsc list that is common for different features.
       
    17 *   Pending supplementary service request can be cancelled by the user.
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 #ifndef CPSUINOTEMASTER_H
       
    23 #define CPSUINOTEMASTER_H
       
    24 
       
    25 // INCLUDES
       
    26 #include <aknnotewrappers.h>
       
    27 #include <bldvariant.hrh>
       
    28 #include "psuiconstants.h" 
       
    29 #include "psuiinternalconstants.h" 
       
    30 #include "psetcalldiverting.h" 
       
    31  
       
    32 // FORWARD DECLARATIONS
       
    33 class MPsetCallWaiting;
       
    34 class MPsetCallBarring;
       
    35 class MPsetCli;
       
    36 class CAknWaitDialog;
       
    37 class CAknGlobalNote;
       
    38 class CAknPopupList;
       
    39 class CAknSinglePopupMenuStyleListBox;
       
    40 class CServiceRequest;
       
    41 class CPsuiReqObserver;
       
    42 class CPsuiQueryDialog;
       
    43 
       
    44 // CLASS DECLARATION
       
    45 
       
    46 /**
       
    47 *  CPsuiNoteMaster class is responsible for showing notes. It has also capa-
       
    48 *  bilities to show bsc list that is common for different features.
       
    49 *  Pending supplementary service request can be cancelled by the user.
       
    50 *  @lib psui.lib
       
    51 *  @since 1.0
       
    52 */
       
    53 class CPsuiNoteMaster : public CBase
       
    54     {
       
    55     public: // Constructors and destructor
       
    56                 
       
    57         /**
       
    58         * Symbian OS two-phased constructor.
       
    59         * 
       
    60         * @return Returns CPsuiNoteMaster-pointer.
       
    61         */
       
    62         static CPsuiNoteMaster* NewL();
       
    63         
       
    64         /**
       
    65         * Destructor 
       
    66         */
       
    67         ~CPsuiNoteMaster();
       
    68     
       
    69     private:
       
    70         /**
       
    71         * Symbian 2nd phase constructor.
       
    72         */
       
    73         void ConstructL();
       
    74     
       
    75     
       
    76     public: //new
       
    77         
       
    78         /**
       
    79         * Sets the connection to engine. 
       
    80         * This is needed to provide user the possibility to cancel
       
    81         * pending requests. All the pointers are set with same
       
    82         * command, if in the future the amount of parameters comes
       
    83         * too large, redesigning might be worth doing. 
       
    84         *
       
    85         * @param aWaitingEngine Reference to Phone Settings' object
       
    86         * @param aBarringEngine Reference to Phone Settings' object
       
    87         * @param aDivertEngine Reference to Phone Settings' object
       
    88         * @param aCliEngine Reference to Phone Settings' object
       
    89         */
       
    90         void SetEngineContacts( MPsetCallWaiting* aWaitingEngine,
       
    91             MPsetCallBarring* aBarringEngine, 
       
    92             MPsetCallDiverting* aDivertEngine,
       
    93             MPsetCli* aCliEngine);
       
    94         
       
    95         /**
       
    96         * Shows the requested note. 
       
    97         *
       
    98         * @param aType Type of note to be shown
       
    99         *    Error, confirmation, warning and waiting notes are supported.
       
   100         * @param aResourceID Content text's resource ID for the note
       
   101         */
       
   102         void ShowNoteL( TPsuiNoteTypes aType, TInt aResourceID );
       
   103         
       
   104         /**
       
   105         * Kills waiting note when the request is completed.
       
   106         */
       
   107         void KillStaticNoteL();
       
   108         
       
   109         /**    
       
   110         * Shows the basic service list assosiated with supplementary service
       
   111         * activation or status check.
       
   112         * 
       
   113         * @param aResourceHeading Heading for the list
       
   114         * @param aBsc List of basic service groups
       
   115         */
       
   116         void ShowBscListL( 
       
   117             TInt aResourceHeading, 
       
   118             TUint8 aBsc[KPSUIMaxBscNumber] );
       
   119         
       
   120         /* 
       
   121         * Same as above, except intended for CF basic service lists.
       
   122         *
       
   123         * @param aResourceHeading Heading for the list
       
   124         * @param aList List of basic service groups and their statuses 
       
   125         *              and settings
       
   126         * @param aCFType Type of call forwarding
       
   127         * @param aIndex Index of list item user has selected
       
   128         * @return user action ID, i.e. what kind of list to show next
       
   129         */
       
   130         /*****************************************************
       
   131         *    Series 60 Customer / ETel
       
   132         *    Series 60  ETel API
       
   133         *****************************************************/ 
       
   134         TCFType ShowBscCFListL( 
       
   135             TInt aResourceHeading, 
       
   136             CMobilePhoneCFList& aList, 
       
   137             TCFType aCFType,
       
   138             TInt& aIndex );
       
   139         
       
   140         /**
       
   141         * Shows detailed info about the selected basic service group.
       
   142         *
       
   143         *   @param  aCFType Type of Call Forwarding, defines softkeys
       
   144         *   @param  aSetting List of basic service groups and their statuses
       
   145         *                    and settings
       
   146         */
       
   147         /*****************************************************
       
   148         *    Series 60 Customer / ETel
       
   149         *    Series 60  ETel API
       
   150         *****************************************************/ 
       
   151         void ShowCfInfoL( 
       
   152             TCFType& aCFType,
       
   153             const RMobilePhone::TMobilePhoneCFInfoEntryV1& aSetting );
       
   154         
       
   155         /**
       
   156         * Shows request cancelled note.
       
   157         */
       
   158         void ShowCancelRequestNoteL();
       
   159         
       
   160         /*
       
   161         * Returns correct resource ID based on error code.
       
   162         * 
       
   163         *   @param aErrorCode Error code for which the resource ID is needed
       
   164         *   @return Resource ID for the string text in the error note
       
   165         */
       
   166         TInt SetErrorNoteResourceID ( const TInt aErrorCode );
       
   167                     
       
   168         /**
       
   169         * Called when service request
       
   170         * is cancelled by the user.
       
   171         */
       
   172         void RequestNoteCancelledL();
       
   173         
       
   174     protected:
       
   175     
       
   176     
       
   177     private: //new
       
   178         
       
   179         void AppendCFNumber( TDes& aString, const TDesC& aNumber);
       
   180 
       
   181         void CreateListBoxL( 
       
   182             TCFType aCFType, CAknSinglePopupMenuStyleListBox* aList );
       
   183 
       
   184         void KillRequestL();
       
   185 
       
   186         void SetTitleL( const TInt& aResourceHeading );        
       
   187 
       
   188         HBufC* SetBsGroupLC( TUint8 aBscCode );                       
       
   189 
       
   190         TBasicServiceGroups ChangeToGSM( const TInt& aBsc );
       
   191         
       
   192     private: // Member variables
       
   193         
       
   194         // General Service request
       
   195         CServiceRequest*        iServiceRequest;
       
   196         // Call Barrings engine
       
   197         MPsetCallBarring*       iBarringEngine; 
       
   198         // Reference to Call Waiting engine
       
   199         MPsetCallWaiting*       iWaitingEngine;
       
   200         // Reference to Call Diverts engine
       
   201         MPsetCallDiverting*     iDivertEngine;
       
   202         // Reference to Calling Identity engine
       
   203         MPsetCli*               iCliEngine;
       
   204         // There is an active request
       
   205         TBool                   iRequesting;
       
   206         // Basic Service Groups list
       
   207         CAknPopupList*          iPopupList;
       
   208         // Request note cancel observer
       
   209         CPsuiReqObserver*       iReqObserver;
       
   210         // Diverts additional information query
       
   211         CPsuiQueryDialog*        iQuery;
       
   212 
       
   213     };       
       
   214 #endif    //CPSUINOTEMASTER_H