idlehomescreen/xmluirendering/uiengine/inc/xnappuiadapterimpl.h
branchRCL_3
changeset 83 5456b4e8b3a8
equal deleted inserted replaced
82:5f0182e07bfb 83:5456b4e8b3a8
       
     1 /*
       
     2 * Copyright (c) 2008 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:  Adapter for Avkon for Xuikon
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef XNAPPUIADAPTERIMPL_H
       
    20 #define XNAPPUIADAPTERIMPL_H
       
    21 
       
    22 // System includes
       
    23 #include <e32base.h>
       
    24 #include <AknProgressDialog.h> // for MProgressDialogCallback
       
    25 #include "xnpropertysubscriber.h" // for CXnPropertySubscriber
       
    26 
       
    27 // Forward declarations
       
    28 class CXnUiEngine;
       
    29 class CXnAppUiAdapter;
       
    30 class CXnViewAdapter;
       
    31 class CXnViewManager;
       
    32 class CXnUiStateListener;
       
    33 class CHsContentControlFactory;
       
    34 class MHsContentControlUi;
       
    35 class CHsCcProviderClient;
       
    36 class CXnEffectManager;
       
    37 class MHsContentControl;
       
    38 class CXnWaitDialog;
       
    39 class CXnItemActivator;
       
    40 
       
    41 // Constants
       
    42 
       
    43 // Class declaration
       
    44 
       
    45 /**
       
    46 *  Avkon Adapter for Xuikon
       
    47 *  
       
    48 *  @ingroup group_xnlayoutengine
       
    49 *  @lib xn3layoutengine.lib
       
    50 *  @since Series 60 3.1
       
    51 */
       
    52 NONSHARABLE_CLASS( CXnAppUiAdapterImpl ) : public CBase,
       
    53     public MXnPropertyChangeObserver, public MProgressDialogCallback                                               
       
    54     {
       
    55 public:
       
    56     // Constructors and destructor
       
    57 
       
    58     /**
       
    59      * Second-phase constructor
       
    60      * 
       
    61      * @since Series 60 3.1
       
    62      * @param aApplicationUid App Id 
       
    63      * @param aAdapter An AppUi adapter
       
    64      */
       
    65     static CXnAppUiAdapterImpl* NewL( TUid aApplicationUid,
       
    66         CXnAppUiAdapter& aAdapter );
       
    67 
       
    68     /**
       
    69      * Second-phase constructor
       
    70      * 
       
    71      * @since S60 5.0
       
    72      */
       
    73     void ConstructL();
       
    74     
       
    75     /**
       
    76      * Destructor.
       
    77      */
       
    78     ~CXnAppUiAdapterImpl();
       
    79 
       
    80 public:
       
    81     // New functions
       
    82         
       
    83     /**
       
    84      * Get the UI engine
       
    85      * 
       
    86      * @since Series 60 3.1
       
    87      * @return UI engine
       
    88      */
       
    89     CXnUiEngine& UiEngine() const;
       
    90 
       
    91     /**
       
    92      * Get the View manager
       
    93      * 
       
    94      * @since S60 5.0
       
    95      * @return ViewManager
       
    96      */
       
    97     CXnViewManager& ViewManager() const;
       
    98 
       
    99     /**
       
   100      * Get the View adapter
       
   101      * 
       
   102      * @since S60 5.0
       
   103      * @return ViewAdapter
       
   104      */
       
   105     CXnViewAdapter& ViewAdapter() const;
       
   106     
       
   107     /**
       
   108      * Get the UI state listener
       
   109      * 
       
   110      * @since S60 5.0
       
   111      * @return UiStateListener
       
   112      */
       
   113     CXnUiStateListener& UiStateListener() const;
       
   114     
       
   115     /**
       
   116      * Gets the Content control UI interface
       
   117 	 *
       
   118 	 * @since S60 5.0
       
   119 	 * @param aType Content control UI type
       
   120      * @return Content control UI interface, NULL if not present
       
   121      */
       
   122     MHsContentControlUi* HsContentController( const TDesC8& aType ) const;
       
   123 
       
   124     /**
       
   125      * Gets the Content control factory
       
   126      *
       
   127      * @since S60 5.0
       
   128      * @return Content control factory
       
   129      */
       
   130     CHsContentControlFactory* HsContentControlFactory();
       
   131     
       
   132     /**
       
   133      * Get the effect manager
       
   134      * 
       
   135      * @since S60 5.0
       
   136      * @return Effect manager
       
   137      */
       
   138     CXnEffectManager* EffectManager() const;
       
   139 
       
   140     /**
       
   141      * Gets the Content control server interface
       
   142      *
       
   143      * @since S60 5.0
       
   144      * @return Content control server interface, NULL if not present
       
   145      */
       
   146     MHsContentControl* HsContentControlSrv() const;
       
   147 
       
   148     /**
       
   149      * Gets the Item activator
       
   150      *
       
   151      * @since S60 5.0
       
   152      * @return Item activator
       
   153      */    
       
   154     CXnItemActivator& ItemActivator() const;
       
   155     
       
   156     /**
       
   157      * Reload the UI after application root configuration is changed
       
   158      * 
       
   159      * @since S60 5.0     
       
   160      */
       
   161     void ReloadUiL();
       
   162 
       
   163     /**
       
   164      * Handles a change to the control's resources of type aType
       
   165      * 
       
   166      * @since Series 60 3.1
       
   167      * @param aType Changed resource type
       
   168      */
       
   169     void HandleResourceChangeL( TInt aType );
       
   170     
       
   171 public: // From MProgressDialogCallback
       
   172 
       
   173     /**
       
   174      * Callback method from MProgressDialogCallback interface.
       
   175      * Gets called when a dialog is dismissed.
       
   176      * @param aButtonId Id of the pushed button.
       
   177      */
       
   178     void DialogDismissedL( TInt aButtonId );
       
   179 
       
   180 private:
       
   181     
       
   182     /**
       
   183      * C++ default constructor.
       
   184      */
       
   185     CXnAppUiAdapterImpl( TUid aApplicationUid,    
       
   186             CXnAppUiAdapter& aAdapter );
       
   187 
       
   188 private:    
       
   189     // from MXnPropertyChangeObserver    
       
   190     void PropertyChangedL( const TUint32 aKey, const TInt aValue );
       
   191 
       
   192 private:    
       
   193     // new functions
       
   194     
       
   195     /**
       
   196      * Launches wait dialog during backup/restore.
       
   197      */
       
   198     void DisplayWaitDialogL();
       
   199     
       
   200 private:
       
   201     // Data
       
   202     
       
   203     /** AppUi, Not owned. */
       
   204     CXnAppUiAdapter& iAdapter;    
       
   205     /** Application uid */
       
   206     TUid iApplicationUid;
       
   207     /** UiEngine, Owned */
       
   208     CXnUiEngine* iUiEngine;
       
   209     /** View Adapter, Owned */
       
   210     CXnViewAdapter* iViewAdapter;
       
   211     /** View Manager, Owned */
       
   212     CXnViewManager* iViewManager;
       
   213     /** UI State listener, Owned */
       
   214     CXnUiStateListener* iUiStateListener;
       
   215     /** Content control factory, Owned */
       
   216     CHsContentControlFactory* iContentControlFactory;
       
   217     /** Content control provider client, Owned */
       
   218     CHsCcProviderClient* iCcProviderClient;
       
   219     /** Effect manager, Owned */
       
   220     CXnEffectManager* iEffectManager;
       
   221     /** Backup restore wait dialog, Owned */
       
   222     CXnWaitDialog* iBURWaitDialog;
       
   223     /** Publish&Subscribe observer for Backup & Restore, Owned */
       
   224     CXnPropertySubscriber* iBackupRestoreObserver;  
       
   225     /** Item activator, Owned */
       
   226     CXnItemActivator* iActivator;
       
   227     /** Resource offset */
       
   228     TInt iResourceOffset;
       
   229     };
       
   230 
       
   231 #endif // XNAPPUIADAPTERIMPL_H
       
   232 
       
   233 // End of file