idlefw/inc/framework/aicontentpluginmanager.h
branchRCL_3
changeset 9 d0529222e3f0
parent 4 1a2a00e78665
child 10 5ef93ea513cb
child 18 bd874ee5e5e2
equal deleted inserted replaced
4:1a2a00e78665 9:d0529222e3f0
     1 /*
       
     2 * Copyright (c) 2005-2006 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:  Content plugin manager class for Active idle framework.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_AICONTENTPLUGINMANAGER_H
       
    21 #define C_AICONTENTPLUGINMANAGER_H
       
    22 
       
    23 #include <e32base.h>
       
    24 #include "aicontentmodel.h"
       
    25 #include "aicontentpublisher.h"
       
    26 #include "aifwdefs.h"
       
    27 #include "aipluginsettings.h"
       
    28 #include "aipluginfactory.h"
       
    29 
       
    30 class MAiContentObserver;
       
    31 class MAiEventHandlerExtension;
       
    32 class MAiPluginTool;
       
    33 class CAiContentPublisher;
       
    34 class CAiPluginStateManager;
       
    35 class CAiUiController;
       
    36 class CImplementationInformation;
       
    37 
       
    38 /**
       
    39  * @ingroup group_aifw
       
    40  * 
       
    41  *  Content plugin manager class for Active idle framework.
       
    42  *
       
    43  *  @lib aifw
       
    44  *  @since S60 3.2
       
    45  */
       
    46 NONSHARABLE_CLASS( CAiContentPluginManager ) : public CBase
       
    47                                                
       
    48 	{
       
    49 public: // Constructor and destructor	        	
       
    50 		
       
    51     static CAiContentPluginManager* NewL();
       
    52                                               
       
    53     virtual ~CAiContentPluginManager();
       
    54 		    
       
    55 public: // New functions
       
    56     
       
    57     /**
       
    58      * Forward plugin event to plugins.
       
    59      *
       
    60      * @since S60 3.2
       
    61      * @param aParam event string.
       
    62      */
       
    63     void HandlePluginEvent( const TDesC& aParam );
       
    64 
       
    65     /**
       
    66      * Forward plugin event to plugins.
       
    67      *
       
    68      * @since S60 5.0
       
    69      * @param aPublisherInfo publisher info.
       
    70      * @param aParam event string.
       
    71      */
       
    72     void HandlePluginEventL( const TAiPublisherInfo& aPublisherInfo, const TDesC& aParam ); 
       
    73             
       
    74     /**
       
    75      * Queries wheter a plugin has settigns or not.
       
    76      */
       
    77     TBool HasMenuItemL( const TAiPublisherInfo& aPublisherInfo, const TDesC& aMenuItem );
       
    78 
       
    79     /**
       
    80      * Requests a Content publisher plug-in to refresh a content item.
       
    81      */
       
    82     TBool RefreshContent( const TDesC& aContentCid );
       
    83 
       
    84     /**
       
    85      * Sets plugins to online/offline
       
    86      * 
       
    87      * @since S60 5.0
       
    88      * @param aOnline ETrue to set plugins online, EFalse to offline
       
    89      * @paran aPublishers List of publishers
       
    90      */    
       
    91     void ProcessOnlineState( TBool aOnline );
       
    92             
       
    93     /**
       
    94      * Gets plugin state manager.     
       
    95      *
       
    96      * @since S60 5.0
       
    97      * @return plugin state manager.
       
    98      */        
       
    99     CAiPluginStateManager& StateManager() const;
       
   100 
       
   101     /**
       
   102      * Gets plugin factory.     
       
   103      *
       
   104      * @since S60 5.0
       
   105      * @return plugin factory.
       
   106      */        
       
   107     CAiPluginFactory& PluginFactory() const;
       
   108     
       
   109     
       
   110 private: // Constructors
       
   111 
       
   112     CAiContentPluginManager();
       
   113                              
       
   114     void ConstructL();
       
   115 
       
   116 private: // New functions
       
   117                                         
       
   118     void GetIdL( CAiContentPublisher& aContentPublisher,
       
   119                  TAiPublisherProperty aProperty,            
       
   120                  const TDesC& aName, TInt& aId ); 
       
   121             
       
   122     TInt RefreshContentL( const TDesC& aContentCid );
       
   123 
       
   124 private: // Data
       
   125 
       
   126     /**
       
   127      * Plugins array.
       
   128      * Owned. 
       
   129      */
       
   130     RPointerArray< CAiContentPublisher > iPlugins;
       
   131 
       
   132     /**
       
   133      * Plugin factory.
       
   134      * Owned.
       
   135      */
       
   136     CAiPluginFactory* iPluginFactory;
       
   137     
       
   138     /**
       
   139      * System state observer.
       
   140      * Owned.
       
   141      */    
       
   142     CAiPluginStateManager* iStateManager;
       
   143     
       
   144     /**
       
   145      * Plugin tool from utility lib.
       
   146      * Owned.
       
   147      */
       
   148     MAiPluginTool* iPluginTool;     
       
   149     };
       
   150 
       
   151 #endif // C_AICONTENTPLUGINMANAGER_H
       
   152 
       
   153 // End of File.