mmsharing/mmshui/inc/musuiappui.h
branchRCL_3
changeset 33 bc78a40cd63c
child 35 6c57ef9392d2
equal deleted inserted replaced
32:73a1feb507fb 33:bc78a40cd63c
       
     1 /*
       
     2 * Copyright (c) 2005 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:  The MUS application's UI class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MUSUIAPPUI_H
       
    20 #define MUSUIAPPUI_H
       
    21 
       
    22 #include "musuieventobserver.h"
       
    23 #include "musuiqueryobserver.h"
       
    24 
       
    25 #include <eikapp.h>
       
    26 #include <eikdoc.h>
       
    27 #include <e32std.h>
       
    28 #include <coeccntx.h>
       
    29 #include <aknViewAppUi.h>
       
    30 #include <remconcoreapitargetobserver.h>
       
    31 #include <coecobs.h>
       
    32 
       
    33 class CMusUiStatusPaneHandler;
       
    34 class CMusUiActiveQueryDialog;
       
    35 class CRemConInterfaceSelector;
       
    36 class CRemConCoreApiTarget;
       
    37 
       
    38 /**
       
    39  *  The MUS application's UI class.
       
    40  *
       
    41  *  @lib musui.exe
       
    42  */
       
    43 class CMusUiAppUi : public CAknViewAppUi, 
       
    44                     public MMusUiEventObserver,
       
    45                     public MMusUiQueryObserver,
       
    46                     public MRemConCoreApiTargetObserver,
       
    47                     public MCoeControlObserver
       
    48     {
       
    49 
       
    50 public:  // constructors and destructor
       
    51 
       
    52     /**
       
    53     * EPOC default constructor.
       
    54     */      
       
    55     void ConstructL( );
       
    56 
       
    57     /**
       
    58      * Destructor.
       
    59      */
       
    60     ~CMusUiAppUi();
       
    61 
       
    62 public: // New functions
       
    63 
       
    64 	CMusUiStatusPaneHandler* MusStatusPane();
       
    65     
       
    66     TBool ExitValue();
       
    67     
       
    68 
       
    69 public: // from base class CEikAppUi
       
    70 
       
    71     void HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination );
       
    72 
       
    73     void HandleForegroundEventL( TBool aForeground );
       
    74     
       
    75 public: // from MRemConCoreApiTargetObserver
       
    76 
       
    77     void MrccatoCommand( TRemConCoreApiOperationId aOperationId, 
       
    78                          TRemConCoreApiButtonAction aButtonAct );
       
    79                          
       
    80 
       
    81 public:	// from MMusUiQueryObserver
       
    82 
       
    83     virtual void QueryAcceptedL( TBool aAccepted );
       
    84 
       
    85     /**
       
    86      * Error handler for QueryAcceptedL.
       
    87      *
       
    88      * @param aError is error to be handled.
       
    89      * @return KErrNone means handled value. All other values will lead to
       
    90      *         a panic.
       
    91      */
       
    92     virtual TInt HandleQueryError( TInt aError );
       
    93 
       
    94 
       
    95 public:	// from MMusUiEventObserver
       
    96 
       
    97     virtual void ActivateLocalMusViewL( TUid aViewId );
       
    98 	
       
    99 	virtual void ActivateLocalMusViewL( TUid aViewId,
       
   100 	                            TUid aCustomMessageId, 
       
   101 	                            const TDesC8& aCustomMessage );
       
   102 
       
   103     virtual void ShowAsyncConfirmationQueryDialogL( const TDesC& aPrompt );
       
   104 
       
   105     virtual void SetToolbarVisibility( TBool aVisible );
       
   106 
       
   107     virtual void ShowNaviPaneIconL( TMusUiNaviMediaDecorator aIcon );
       
   108 
       
   109     virtual CEikonEnv* EikonEnv( ) const;
       
   110     
       
   111     virtual void TerminateCall();
       
   112     
       
   113     virtual CAknAppUiBase::TAppUiOrientation AppOrientation() const;
       
   114 
       
   115     /**
       
   116      * Switch the active view's orientation, if it's in the foreground,
       
   117      * from landscape to portrait, or vice versa.
       
   118      */
       
   119     virtual void SwitchOrientationL( TAppUiOrientation aAppOrientation );
       
   120     
       
   121     virtual void HandleError( const TInt aReason );
       
   122 
       
   123     virtual void HandleExit();
       
   124     
       
   125     virtual TBool OrientationCanBeChanged() const;
       
   126     
       
   127     virtual TInt GetUiVolumeValue();
       
   128     
       
   129     virtual CMusUiResourceHandler* ResourceHandler();
       
   130 
       
   131 private: // from base class CEikAppUi
       
   132 
       
   133     /**
       
   134      * Takes care of command handling.
       
   135      *
       
   136      * @param aCommand The command to be handled.
       
   137      */
       
   138     void HandleCommandL( TInt aCommand );
       
   139 
       
   140     /**
       
   141      * Handles a change to the application's resources which are shared
       
   142      * across the environment.
       
   143      *
       
   144      * @param aType The type of resources that have changed.
       
   145      */
       
   146     void HandleResourceChangeL( TInt aType );
       
   147     
       
   148     TKeyResponse HandleKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
       
   149     
       
   150     // Help context from CCoeAppUi
       
   151     CArrayFix<TCoeHelpContext>* HelpContextL() const;
       
   152     
       
   153 private:
       
   154     
       
   155     //from MCoeControlObserver
       
   156     void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
       
   157 
       
   158 private:
       
   159     
       
   160     void DoHandleForegroundEventL( TInt aEventType );
       
   161     
       
   162     void FindWindowGroupIdentifiersL();
       
   163 
       
   164     
       
   165 private: // data
       
   166 
       
   167     /**  Owns. Handle to status pane handler */
       
   168     CMusUiStatusPaneHandler* iStatusPaneHandler;
       
   169 	
       
   170 	CMusUiActiveQueryDialog* iConfirmationQuery;
       
   171     
       
   172     CRemConInterfaceSelector* iInterfaceSelector;
       
   173 
       
   174     CRemConCoreApiTarget* iCoreTarget;
       
   175 
       
   176 	TBool iExit;
       
   177 	
       
   178 	TInt iLastKeyCode;
       
   179 	
       
   180 	/**
       
   181     * ETrue if operator specific functionality is needed 
       
   182     */
       
   183     TBool iOperatorSpecificFunctionality;
       
   184     
       
   185     // Window group id of this application.
       
   186     TInt iThisApplicationWgId;
       
   187     
       
   188     // Window group id of eikon server.
       
   189     TInt iEikonServerWgId;
       
   190     
       
   191     // Window group id for AknCapServer
       
   192     TInt iAknCapServerWgId;
       
   193     
       
   194     // Window group id for Akn Notifier Server
       
   195     TInt iAknNfyServerWgId;
       
   196     
       
   197     TBool iForeground;
       
   198     
       
   199     CMusUiResourceHandler* iResourceHandler;
       
   200 
       
   201 	
       
   202     };
       
   203 
       
   204 #endif // MUSUIAPPUI_H
       
   205 
       
   206 // end of file