widgetmanager/inc/wmplugin.h
changeset 0 f72a12da539e
equal deleted inserted replaced
-1:000000000000 0:f72a12da539e
       
     1 /*
       
     2 * Copyright (c) 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:
       
    15 * widget manager plugin declaration
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef __WMPLUGIN_
       
    20 #define __WMPLUGIN_
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <vwsdef.h>
       
    25 
       
    26 #include <hscontentcontrolui.h>
       
    27 #include <hscontentcontroller.h>
       
    28 #include <hscontentinfo.h>
       
    29 
       
    30 class CAknViewAppUi;
       
    31 class CWmResourceLoader;
       
    32 class CWmMainContainerView;
       
    33 class CWmMainContainer;
       
    34 class CWmEffectManager;
       
    35 
       
    36 /**
       
    37  * CWmPlugin 
       
    38  */
       
    39 NONSHARABLE_CLASS( CWmPlugin ) : public CHsContentControlUi
       
    40     {
       
    41 public:
       
    42 
       
    43     /**
       
    44      * Two-phased constructor.
       
    45      */
       
    46     static CWmPlugin* NewL();
       
    47     
       
    48     /** Destructor */
       
    49     ~CWmPlugin();
       
    50 
       
    51 public: // From MHsContentControlUi
       
    52 
       
    53     /** 
       
    54      * shows the widget manager UI 
       
    55      * 
       
    56      * @see MHsContentControlUi::Activate
       
    57      */
       
    58     void Activate();
       
    59     
       
    60     /** 
       
    61      * Notifies widget list changes 
       
    62      * 
       
    63      * @see MHsContentControlUi::NotifyWidgetListChanged
       
    64      */
       
    65     void NotifyWidgetListChanged();
       
    66         
       
    67 public: // plugin services
       
    68 
       
    69     /** 
       
    70      * whether widget manager UI is showing 
       
    71      * 
       
    72      * @return return ETrue if wm UI is showed 
       
    73      */
       
    74     TBool IsActive();
       
    75 
       
    76     /** 
       
    77      * hides widget manager UI 
       
    78      */
       
    79     void Deactivate();
       
    80 
       
    81     /** 
       
    82      * main view activated. Sets the previous view ID and main container 
       
    83      *
       
    84      * @param aPreviousViewId
       
    85      * @param aWmMainContainer 
       
    86      */
       
    87     void MainViewActivated( 
       
    88             const TVwsViewId& aPreviousViewId,
       
    89             CWmMainContainer* aWmMainContainer );
       
    90 
       
    91     /** 
       
    92      * main view was deactivated 
       
    93      */
       
    94     void MainViewDeactivated();
       
    95 
       
    96     /** 
       
    97      * the CAknViewAppUi reference
       
    98      * 
       
    99      * @return returns CAknViewAppUi 
       
   100      */
       
   101     inline CAknViewAppUi& ViewAppUi();
       
   102 
       
   103     /** 
       
   104      * the resource loader 
       
   105      * 
       
   106      * @return returns CWmResourceLoader
       
   107      */
       
   108     inline CWmResourceLoader& ResourceLoader();
       
   109     
       
   110     /** 
       
   111      * the content controller ref
       
   112      * 
       
   113      * @return returns MHsContentController
       
   114      */
       
   115     inline MHsContentController& ContentController();
       
   116 
       
   117     /**
       
   118      * the shared file server reference
       
   119      */
       
   120     inline RFs& FileServer();
       
   121 
       
   122 private: // Construction
       
   123     CWmPlugin();
       
   124     void ConstructL();
       
   125 
       
   126 private: // data members
       
   127 
       
   128     /**
       
   129      * the host application view app UI (not owned)
       
   130      */
       
   131     CAknViewAppUi*  iViewAppUi;
       
   132 
       
   133     /**
       
   134      * main container (not owned)
       
   135      */
       
   136     CWmMainContainer*  iWmMainContainer;
       
   137     
       
   138     /**
       
   139      * resource loader
       
   140      */
       
   141     CWmResourceLoader* iResourceLoader;
       
   142 
       
   143     /**
       
   144      * previous view ID (shown when main view closed)
       
   145      */
       
   146     TVwsViewId iPreviousViewUid;
       
   147 	
       
   148     /**
       
   149      * Takes care of fancy UI effects
       
   150      */    
       
   151     CWmEffectManager* iEffectManager;
       
   152     
       
   153     /**
       
   154      * The file server session
       
   155      */
       
   156     RFs* iFs;
       
   157 
       
   158     };
       
   159 
       
   160 #include "wmplugin.inl"
       
   161 #endif // __WMPLUGIN_
       
   162