idlehomescreen/xmluicontroller/inc/appui.h
changeset 0 f72a12da539e
child 9 f966699dea19
equal deleted inserted replaced
-1:000000000000 0:f72a12da539e
       
     1 /*
       
     2 * Copyright (c) 2005-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:  App UI
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_APPUI_H
       
    20 #define C_APPUI_H
       
    21 
       
    22 #include <coeview.h>
       
    23 #include "xnappuiadapter.h"
       
    24 
       
    25 
       
    26 class CAiUiIdleIntegration;
       
    27 class MAiUiFrameworkObserver;
       
    28 
       
    29 namespace AiXmlUiController
       
    30 {        
       
    31 class CContentRenderer;
       
    32 class CXmlUiController;
       
    33 class CAIXuikonEventHandler;
       
    34 class COnlineOfflineHelper;
       
    35 
       
    36 /**
       
    37  *  @ingroup group_xmluicontroller
       
    38  * 
       
    39  *  AppUI class of XML UI Controller application
       
    40  *
       
    41  *  @lib AiXmlUiMain
       
    42  */
       
    43 NONSHARABLE_CLASS( CAppUi ) : public CXnAppUiAdapter, 
       
    44     public MCoeViewActivationObserver
       
    45     {    
       
    46 public:   // Constructors and destructor
       
    47 
       
    48     static CAppUi* NewL( CXmlUiController& aUiCtl );
       
    49 
       
    50     ~CAppUi();
       
    51     
       
    52 public:  
       
    53     // new functions
       
    54     CCoeEnv* CoeEnv() { return iCoeEnv; }
       
    55             
       
    56 private:  
       
    57     // from CXnAppUiAdapter
       
    58     void PrepareToExit();
       
    59     
       
    60     void HandleForegroundEventL( TBool aForeground );
       
    61     
       
    62     void HandleCommandL( TInt aCommand );
       
    63     
       
    64     void HandleResourceChangeL( TInt aType );
       
    65 
       
    66     void HandleXuikonEventL( CXnNodeAppIf& aOrigin, CXnNodeAppIf& aTrigger,  
       
    67          CXnDomNode& aTriggerDefinition, CXnDomNode& aEvent ); 
       
    68                                                           
       
    69     void HandleWsEventL( const TWsEvent& aEvent, 
       
    70             CCoeControl* aDestination );
       
    71 
       
    72     void LoadDataPluginsL( RPointerArray< CXnNodeAppIf >& aList );
       
    73           
       
    74     void DestroyDataPluginsL( RPointerArray< CXnNodeAppIf >& aList );
       
    75            
       
    76     void SetOnlineStateL( RPointerArray< CXnNodeAppIf >& aList );
       
    77     
       
    78     TBool DynInitMenuItemL( const TDesC& aItemType, 
       
    79         RPointerArray< CXnNodeAppIf >* aList = NULL );
       
    80 
       
    81     void HandlePageSwitch();
       
    82     
       
    83     void HandleEnterEditModeL( TBool aEnter );
       
    84 	
       
    85 private:
       
    86     // new functions
       
    87     void LoadNativeDataPluginsL();
       
    88     void DestroyNativeDataPluginsL();
       
    89     
       
    90 private:
       
    91     // from MCoeViewActivationObserver
       
    92     
       
    93     /**
       
    94      * @see MCoeViewActivationObserver
       
    95      */
       
    96     void HandleViewActivation( const TVwsViewId& aNewlyActivatedViewId, 
       
    97         const TVwsViewId& aViewIdToBeDeactivated );
       
    98            
       
    99 public: 
       
   100     // new functions
       
   101     
       
   102     /**
       
   103      * Sets plugins online state
       
   104      * 
       
   105      * @since S60 5.0
       
   106      * @param aOnline ETrue to enter online, EFalse to offline
       
   107      * 
       
   108      */
       
   109     void SetOnlineStateL( TBool aOnline );
       
   110     
       
   111     /**
       
   112      * Gets Ui controller
       
   113      *
       
   114      * @since S60 5.0
       
   115      * @return Ui Controller
       
   116      */
       
   117     CXmlUiController& UiController() const;
       
   118                
       
   119 private: 
       
   120     // Constructors
       
   121 
       
   122     CAppUi( CXmlUiController& aUiCtl, TUid aAppUid );
       
   123     
       
   124     void ConstructL();
       
   125           
       
   126 private:     
       
   127     // data
       
   128 
       
   129     /**
       
   130      * UI Controller implementation. Not own.
       
   131      */
       
   132     CXmlUiController& iUiCtl;
       
   133 
       
   134     /**
       
   135      * Event handler. Own.
       
   136      */
       
   137     CAIXuikonEventHandler* iEventHandler;
       
   138     
       
   139     /**
       
   140      * Content renderer. Own.
       
   141      */
       
   142     CContentRenderer* iContentRenderer;
       
   143     
       
   144     /**
       
   145      * Ui framework event observer. Not own.
       
   146      */
       
   147     MAiUiFrameworkObserver* iUiFwObserver;
       
   148     
       
   149     /**
       
   150      * Idle Integration helper object. Own.
       
   151      */
       
   152     CAiUiIdleIntegration* iIdleIntegration;
       
   153 
       
   154     /**
       
   155      * Online/Offline helper object. Own.
       
   156      */
       
   157     COnlineOfflineHelper* iHelper;    
       
   158     
       
   159     /**
       
   160      * Flag to indicate whether native plugins are loaded.
       
   161      */
       
   162     TBool iNativePluginsLoaded;
       
   163     
       
   164     /**
       
   165      * Flag to indicate whether edit mode is active.
       
   166      */
       
   167     TBool iIsEditModeActive;
       
   168     };
       
   169     
       
   170 }  // namespace AiXmlUiController
       
   171     
       
   172 #endif  // C_APPUI_H
       
   173 
       
   174 // End of File.