emailservices/emailframework/inc/CFSMailPluginManager.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 14 Sep 2010 20:48:24 +0300
branchRCL_3
changeset 26 968773a0b6ef
parent 25 3533d4323edc
permissions -rw-r--r--
Revision: 201033 Kit: 201035

/*
* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). 
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  common mailbox object
*
*/


#ifndef CFSMAILPLUGINMANAGER_H
#define CFSMAILPLUGINMANAGER_H


//  INCLUDES
#include <e32std.h>
#include <e32base.h>
#include <ecom/ecom.h>

#include "cfsmailplugin.h"

#include "cfsmailrequesthandler.h"

/** plugin configuration at start up */
enum TFsFwConfiguration
	{
		EFSListPlugins = 1,
		EFSLoadPlugins,
		EFSLoadPluginsAndMockup,
		EFSLoadMockupOnly
	};

/**
 *  email framework plugin manager
 *
 *  @lib FSFWCommonLib
 *  @since S60 v3.1
 */
class CFSMailPluginManager : public CFSMailRequestHandler
	{

public:

  
    /**
     * destructor
     */  
  	 ~CFSMailPluginManager();

    /**
     * two based constructor
     */
  	 static CFSMailPluginManager* NewL(TInt aConfiguration);
  	
    /**
     * two based constructor
     */
  	 static CFSMailPluginManager* NewLC(TInt aConfiguration);

    /**
     * adds new plugin to plugin list
     *
     */  
	 void AppendPluginL(CFSMailPlugin* aPlugin,CImplementationInformation* aPluginInfo);

    /**
     * returns plugin pointer by plugin table index
     *
     * @return plugin pointer
     */  
	 CFSMailPlugin* GetPluginByIndex(TUint aIndex);

    /**
     * get plugin id by plugin table index
     *
     */  
	 TUid GetPluginIdByIndex(TUint aIndex);
	 	 
    /**
     * returns count of existing plugins
     *
     */  
	 TUint GetPluginCount( );
	 
    /**
     * loads plugin identified by plugin id
     *
     */  
	 void LoadPluginL(TUid aPluginId);

    /**
     * list ids of existing plugins
     *
     */  
	 void ListPlugins( RArray<TUid>& aPluginList );
	 
    /**
     * lists plugin pointers & plugin info
     *
     */  
	 void ListImplementationsL( RPointerArray<CFSMailPlugin>& aImplementations,
	                            RPointerArray<CImplementationInformation>& aInfo );
	
     /**
      * Recheck existing plugins
      *
      * Returns ETrue if all plugins loaded.      
      */                 								 
     TBool RecheckPluginsL( );
     
protected:

    /**
     * C++ default constructor.
     *
     */
 
  	 CFSMailPluginManager();

    /**
     * ConstructL
     */
	void ConstructL(TInt aConfiguration);
	
private: // data

    /** plugin information table */  
	 RPointerArray<CImplementationInformation> 	iPluginInfo;
	 
    };
    

#endif  // CFSMAILPLUGINMANAGER_H

// End of File