idlefw/inc/framework/aifw.h
branchRCL_3
changeset 9 d0529222e3f0
parent 0 79c6a41cd166
child 59 a0713522ab97
equal deleted inserted replaced
4:1a2a00e78665 9:d0529222e3f0
    14 * Description:  AI2 main class
    14 * Description:  AI2 main class
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 #ifndef C_AIFW_H
    19 #ifndef _AIFW_H
    20 #define C_AIFW_H
    20 #define _AIFW_H
    21 
    21 
       
    22 // System includes
    22 #include <e32base.h>
    23 #include <e32base.h>
    23 #include <aicontentpublisher.h>
       
    24 #include <centralrepository.h>
       
    25 #include <cenrepnotifyhandler.h>
    24 #include <cenrepnotifyhandler.h>
    26 
    25 
    27 #include "aifwdefs.h"
    26 // User includes
    28 #include "aicontentmodel.h"
    27 #include <aifweventhandler.h>
    29 #include "aifweventhandler.h"
    28 
    30 
    29 // Forward declarations
    31 class CAiUiControllerManager;
    30 class CAiUiControllerManager;
    32 class CAiContentPluginManager;
    31 class CAiStateManager;
       
    32 class CAiStateProvider;
       
    33 class CAiPluginFactory;
       
    34 class CAiEventHandler;
    33 class CAiWsPluginManager;
    35 class CAiWsPluginManager;
    34 class CAiPluginStateManager;
       
    35 class RConeResourceLoader;
       
    36 class CAiContentPublisher;
       
    37 class MAiPSPropertyObserver;
    36 class MAiPSPropertyObserver;
    38 class CAiNetworkListener;
    37 class THsPublisherInfo;
    39 
    38 
       
    39 // Class declaration
    40 /**
    40 /**
    41  * @ingroup group_aifw
    41  * @ingroup group_aifw
    42  * 
    42  * 
    43  * Active Idle Framework main class.
    43  * Active Idle Framework main class.
    44  */
    44  */
    45 NONSHARABLE_CLASS( CAiFw ) : 
    45 NONSHARABLE_CLASS( CAiFw ) : public CBase, public MAiFwEventHandler,                
    46         public CBase,
    46     public MCenRepNotifyHandlerCallback        
    47         public MAiFwEventHandler,
       
    48         public MCenRepNotifyHandlerCallback        
       
    49     {
    47     {
    50 public: // Constructors and destructors    
    48 public: 
       
    49     // constructors and destructor    
    51 
    50 
    52     /**
    51     /**
    53      * Creates and returns a new Active Idle Framework object.
    52      * Creates and returns a new Active Idle Framework object.
    54      *
    53      *
    55      * @return  new Active Idle Framework object. The object is also left
    54      * @return  new Active Idle Framework object. The object is also left
    57      * @exception Any of the system-wide error codes if framework creation
    56      * @exception Any of the system-wide error codes if framework creation
    58      *            fails due to an unrecoverable error.
    57      *            fails due to an unrecoverable error.
    59      */
    58      */
    60     IMPORT_C static CAiFw* NewLC();
    59     IMPORT_C static CAiFw* NewLC();
    61   
    60   
       
    61     /**
       
    62      * Destructor
       
    63      */
    62     ~CAiFw();
    64     ~CAiFw();
    63   
    65   
    64 public: // New functions
    66 public: // New functions
    65       
    67       
    66     /**
    68     /**
    70      * @exception Any of the system-wide error codes if the framework 
    72      * @exception Any of the system-wide error codes if the framework 
    71      *            encounters a fatal initialization or run-time error.
    73      *            encounters a fatal initialization or run-time error.
    72      */
    74      */
    73     IMPORT_C void RunL();
    75     IMPORT_C void RunL();
    74         
    76         
    75 private: // Constructors      
    77 private: 
       
    78     // constructors
       
    79     
       
    80     /**
       
    81      * Default C++ constructor
       
    82      */
    76     CAiFw();
    83     CAiFw();
       
    84     
       
    85     /**
       
    86      * 2nd phase constructor
       
    87      */
    77     void ConstructL();
    88     void ConstructL();
    78   
    89   
    79 private: // From MAiFwEventHandler    
    90 private: 
       
    91     // from MAiFwEventHandler    
    80         
    92         
    81     /**
    93     /**
    82      * @see MAiFwEventHandler
    94      * @see MAiFwEventHandler
    83      */
    95      */
    84     void AppEnvReadyL();
    96     void AppEnvReadyL();
    95     
   107     
    96     /**
   108     /**
    97      * @see MAiFwEventHandler
   109      * @see MAiFwEventHandler
    98      */    
   110      */    
    99     void HandleUiShutdown( CAiUiController& aUiController );
   111     void HandleUiShutdown( CAiUiController& aUiController );
   100     
   112         
   101     /**
       
   102      * @see MAiFwEventHandler
       
   103      */        
       
   104     void HandleLoadPluginL( const TAiPublisherInfo& aPublisherInfo );
       
   105     
       
   106     /**
       
   107      * @see MAiFwEventHandler
       
   108      */        
       
   109     void HandleDestroyPluginL( const TAiPublisherInfo& aPublisherInfo );            
       
   110     
       
   111     /**
   113     /**
   112      * @see MAiFwEventHandler
   114      * @see MAiFwEventHandler
   113      */        
   115      */        
   114     void HandlePluginEvent( const TDesC& aParam );
   116     void HandlePluginEvent( const TDesC& aParam );
   115     
   117     
   116     /**
   118     /**
   117      * @see MAiFwEventHandler
   119      * @see MAiFwEventHandler
   118      */        
   120      */        
   119     void HandlePluginEventL( const TAiPublisherInfo& aPublisherInfo, const TDesC& aParam );
   121     void HandlePluginEventL( 
   120 
   122         const THsPublisherInfo& aPublisherInfo, 
   121     /**
   123         const TDesC& aParam );
   122      * @see MAiFwEventHandler
   124 
   123      */    
   125     /**
   124     TBool HasMenuItemL( const TAiPublisherInfo& aPublisherInfo, const TDesC& aMenuItem );        
   126      * @see MAiFwEventHandler
       
   127      */    
       
   128     TBool HasMenuItemL( 
       
   129         const THsPublisherInfo& aPublisherInfo, 
       
   130         const TDesC& aMenuItem );        
   125 
   131 
   126     /**
   132     /**
   127      * @see MAiFwEventHandler
   133      * @see MAiFwEventHandler
   128      */        
   134      */        
   129     TBool RefreshContent( const TDesC& aContentCid );
   135     TBool RefreshContent( const TDesC& aContentCid );
       
   136 
       
   137     /**
       
   138      * @see MAiFwEventHandler
       
   139      */            
       
   140     TBool RefreshContent( 
       
   141         const THsPublisherInfo& aPublisherInfo,
       
   142         const TDesC& aContentCid );
       
   143 
       
   144     /**
       
   145      * @see MAiFwEventHandler
       
   146      */            
       
   147     TBool SuspendContent( 
       
   148         const THsPublisherInfo& aPublisherInfo,
       
   149         const TDesC& aContentCid );
   130     
   150     
   131     /**
   151     /**
   132      * @see MAiFwEventHandler
   152      * @see MAiFwEventHandler
   133      */        
   153      */        
   134     TBool QueryIsMenuOpen();
   154     TBool QueryIsMenuOpen();
   135 
   155         
   136     /**
   156 private: 
   137      * @see MAiFwEventHandler
   157     // from MCenRepNotifyHandlerCallback
   138      */            
       
   139     void ProcessStateChange( TAifwStates aState );    
       
   140         
       
   141 private: // From MCenRepNotifyHandlerCallback
       
   142 
   158 
   143     /**
   159     /**
   144      * @see MCenRepNotifyHandlerCallback
   160      * @see MCenRepNotifyHandlerCallback
   145      */
   161      */
   146     void HandleNotifyInt( TUint32 aId, TInt aNewValue );
   162     void HandleNotifyInt( TUint32 aId, TInt aNewValue );
   147     
   163     
   148 private: // New functions        
   164 public:
   149                  
   165     // new functions
   150     static TInt HandleFocusChangeEvent( TAny* aSelf );
   166     
       
   167     /**
       
   168      * Get repository
       
   169      * 
       
   170      * @since S60 5.2
       
   171      * @return Repositury
       
   172      */
       
   173     CRepository& Repository() const;
       
   174     
       
   175 private: 
       
   176     // new functions        
       
   177                      
   151     static TInt HandleRestartEvent( TAny* aSelf );
   178     static TInt HandleRestartEvent( TAny* aSelf );
   152     void SwapUiControllerL( TBool aToExtHS );
   179     void SwapUiControllerL( TBool aToExtHS );
   153 
   180 
   154 private: // Data     
   181 private: 
   155     
   182     // data     
   156     /**
   183     
   157      * UI Controller manager, Owned.     
   184     /** UI Controller manager, Owned. */
   158      */
       
   159     CAiUiControllerManager* iUiControllerManager;
   185     CAiUiControllerManager* iUiControllerManager;
   160 
   186     /** Plugin factory, Owned */
   161     /**
   187     CAiPluginFactory* iFactory;
   162      * Content plugin manager, Owned.     
   188     /** State manager, Owned */
   163      */
   189     CAiStateManager* iStateManager;
   164     CAiContentPluginManager* iPluginManager;
   190     /** State provider, Owned */
   165 
   191     CAiStateProvider* iStateProvider;
   166     /**
   192     /** Plugin event handler, Owned. */
   167      * Window server plug-in manager, Owned.
   193     CAiEventHandler* iEventHandler;
   168      */
   194     /** Window server plug-in manager, Owned. */
   169     CAiWsPluginManager* iWsPluginManager;
   195     CAiWsPluginManager* iWsPluginManager;
   170 
   196     /** Notify handler for cenrep, Owned. */
   171     /**
   197     CCenRepNotifyHandler* iNotifyHandler;    
   172      * Notify handler for cenrep, Owned.     
   198     /** Notify handler for cenrep, Owned. */
   173      */
       
   174     CCenRepNotifyHandler* iNotifyHandler;
       
   175     
       
   176     /**
       
   177      * Notify handler for cenrep, Owned.     
       
   178      */    
       
   179     CCenRepNotifyHandler* iNotifyHandlerESS;
   199     CCenRepNotifyHandler* iNotifyHandlerESS;
   180 
   200     /** Idle repository, Owned. */
   181     /**
   201     CRepository* iRepository;    
   182      * Idle repository, Owned.
   202     /** Idle restart PS observer, Owned. */
   183      */
       
   184     CRepository* iAIRepository;
       
   185     
       
   186     /**
       
   187      * Idle restart PS observer, Owned.
       
   188      */
       
   189     MAiPSPropertyObserver* iIdleRestartObserver;
   203     MAiPSPropertyObserver* iIdleRestartObserver;
   190     
   204     
   191     TBool iLibrariesLoaded;
   205     TBool iLibrariesLoaded;
   192     
   206     
   193     RLibrary iLibrary1;
   207     RLibrary iLibrary1;
   194     RLibrary iLibrary2;
   208     RLibrary iLibrary2;
   195     RLibrary iLibrary3;       
   209     RLibrary iLibrary3;       
   196     };
   210     };
   197 
   211 
   198 #endif // C_AIFW_H
   212 #endif // _AIFW_H
   199 
   213