phoneuis/vmbx/inc/VmAppUi.h
changeset 0 5f000ab63145
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2002-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:  Declares UI class for application.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef VMAPPUI_H
       
    20 #define VMAPPUI_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <aknappui.h>
       
    24 #include <bldvariant.hrh>
       
    25 #include "vm.hrh"
       
    26 #include "VmQueryLauncher.h"
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class CVmContainer;
       
    30 class CAiwServiceHandler;
       
    31 class CRepository;
       
    32 
       
    33 /**
       
    34 * Status of AppUi
       
    35 */
       
    36 enum TVmbxAppUiState
       
    37     {
       
    38     /** idle state of AppUi */
       
    39     EIdle= 0,
       
    40     /** state of that AppUi launch to CVmQueryLauncher
       
    41     * for querying number */
       
    42     ELauncherQueryingNumber
       
    43     };
       
    44 
       
    45 // Constants
       
    46 const TInt KVmCmdAiwVoiceCall = EVmCmdAiwCmdLast;
       
    47 const TInt KVmCmdAiwVideoCall = EVmCmdAiwCmdLast+1;
       
    48 const TInt KVmCmdAiwVoipCall  = EVmCmdAiwCmdLast+2;
       
    49 
       
    50 // CLASS DECLARATION
       
    51 
       
    52 /**
       
    53 *  Application UI class.
       
    54 *  Provides support for the following features:
       
    55 *  - UIKON control architecture
       
    56 *
       
    57 *  @lib ?library
       
    58 *  @since ?Series60_version
       
    59 */
       
    60 class CVmAppUi : public CAknAppUi, public MVmQueryLauncher
       
    61     {
       
    62     public:  // Constructors and destructor
       
    63 
       
    64         /**
       
    65         * Symbian OS default constructor.
       
    66         */
       
    67         void ConstructL();
       
    68 
       
    69         /**
       
    70         * Destructor.
       
    71         */
       
    72         ~CVmAppUi();
       
    73 
       
    74     public: // New functions
       
    75 
       
    76         /**
       
    77         * Loads CBA buttons for MSK
       
    78         * @return void
       
    79         */
       
    80         void DrawCbaButtonsL();
       
    81 
       
    82         /**
       
    83         * Get current AppUi state
       
    84         * @return TVmbxAppUiState, state of AppUi
       
    85         */
       
    86         TVmbxAppUiState GetAppUiState();
       
    87 
       
    88     private: // New functions
       
    89 
       
    90         /**
       
    91         * Adds an item in menu.
       
    92         *
       
    93         * @param aMenuPane menu pane
       
    94         * @param aText item text
       
    95         * @param aCommandId menu command id
       
    96         */
       
    97         void AddMenuItemL( CEikMenuPane* aMenuPane, const TDesC& aText,
       
    98                                                          TInt aCommandId );
       
    99         /**
       
   100         * Defines whether voice mail is started from general settings
       
   101         * @return TBool, ETrue if started from GS else EFalse
       
   102         */
       
   103         TBool IsStartedFromGSL();
       
   104 
       
   105         /**
       
   106          * Set in MenuPane cmomand's item specific property.
       
   107          * @since S60 v5.2
       
   108          * @param aMenuPane curent munu pane
       
   109          * @param aCommandId command Id
       
   110          */
       
   111         void SetItemSpecificL( CEikMenuPane* aMenuPane, TInt aCommandId );
       
   112 
       
   113     private: // Functions from base classes
       
   114 
       
   115         /**
       
   116         * From MEikMenuObserver, dynamically initialises menu pane.
       
   117         */
       
   118         void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
       
   119 
       
   120         /**
       
   121         * From CCoeAppUi, gets a list of help contexts for a particular
       
   122         * application user interface.
       
   123         */
       
   124         CArrayFix<TCoeHelpContext>* HelpContextL() const;
       
   125 
       
   126         /**
       
   127         * From CEikAppUi, takes care of command handling.
       
   128         * @param aCommand command to be handled
       
   129         */
       
   130         void HandleCommandL( TInt aCommand );
       
   131 
       
   132         /**
       
   133         * From CEikAppUi, Handles changes in keyboard focus when an application
       
   134         * switches to,  or from, the foreground.
       
   135         * @param aForeground ETrue if the application is in the foreground,
       
   136         *                     otherwise EFalse.
       
   137         */
       
   138         void HandleForegroundEventL( TBool aForeground );
       
   139 
       
   140        /**
       
   141          * From MVmQueryLauncher,Callback when query number completed
       
   142          *
       
   143          */
       
   144         void NumberQueryComplete();
       
   145 
       
   146         /**
       
   147          * see VmContainer::IsIpVoiceMailboxServices
       
   148          */
       
   149         TBool IsIpVoiceMailboxServices();
       
   150 
       
   151     private: // Data
       
   152 
       
   153         //AppUi container
       
   154         CVmContainer* iAppContainer;
       
   155 
       
   156         //menupane text strings
       
   157         HBufC* iTextShowDetails;  // owned
       
   158         HBufC* iTextClearIcon; // owned
       
   159         HBufC* iTextCallVoiceMail;  // owned
       
   160         HBufC* iTextDefineNumber;  // owned
       
   161         HBufC* iTextDefineVideoNumber;  // owned
       
   162         HBufC* iTextChangeNumber;  // owned
       
   163         HBufC* iTextHelp;  // owned
       
   164         HBufC* iTextExit;  // owned
       
   165         HBufC* iTextActivate; // owned
       
   166         HBufC* iTextCallIntVoiceMail;  // owned
       
   167         HBufC* iTextCancel; // owned
       
   168         HBufC* iTextCheckStatus; // owned
       
   169         HBufC* iTextCheckMessage; // owned
       
   170         HBufC* iTextCallVideoMail;  // owned
       
   171 
       
   172         //type of vmbx
       
   173         TInt iType;
       
   174 
       
   175         //title of the popupList
       
   176         HBufC* iTextRingingTime; // owned
       
   177 
       
   178         //CVmQueryLauncher object for asking vmbx number
       
   179         CVmQueryLauncher* iQueryLauncher;  // owned
       
   180 
       
   181         // AIW
       
   182         CAiwServiceHandler* iServiceHandler; // owned
       
   183 
       
   184         TBool iFeatureManagerInitialized;
       
   185 
       
   186         // Boolean defining whether voice mail is started from
       
   187         // general settings or not
       
   188         TBool iFromGS;
       
   189 
       
   190         // state of AppUi
       
   191         TVmbxAppUiState iAppUiState;
       
   192     };
       
   193 
       
   194 #endif  // VMAPPUI_H
       
   195 
       
   196 // End of File