phonebookui/Phonebook2/UIExtensionManager/inc/CPbk2UIExtensionLoader.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2002-2007 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:  Load UI extensions
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPBK2UIEXTENSIONLOADER_H
       
    20 #define CPBK2UIEXTENSIONLOADER_H
       
    21 
       
    22 // INCLUDE FILES
       
    23 #include <e32base.h>
       
    24 #include <RPbk2LocalizedResourceFile.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CPbk2UIExtensionPlugin;
       
    28 class CPbk2UIExtensionInformation;
       
    29 /**
       
    30  * Load UI extensions
       
    31  */
       
    32 NONSHARABLE_CLASS(CPbk2UIExtensionLoader) : public CBase
       
    33     {
       
    34     public: // Construction and destruction
       
    35 
       
    36         /**
       
    37          * Returns a new instance of this class.
       
    38          * @return A newly created object of this class.
       
    39          */
       
    40         static CPbk2UIExtensionLoader* NewL();
       
    41 
       
    42         /**
       
    43          * Destructor.
       
    44          */
       
    45         ~CPbk2UIExtensionLoader();
       
    46 
       
    47     public: // Interface
       
    48         /**
       
    49          * Checks if the given plug-in implementation is loaded.
       
    50          * @aImplementationUid Plug-in whose loading status to check
       
    51          * @return ETrue if a plug-in with aImplementationUid is loaded,
       
    52          *         EFalse otherwise.
       
    53          */
       
    54         TBool IsLoaded(TUid aImplementationUid);
       
    55 
       
    56         /**
       
    57          * Tries to load a plug-in with implementation UID aImplementationUid
       
    58          * if it is not already loaded.
       
    59          */
       
    60         void EnsureLoadedL(TUid aImplementationUid);
       
    61 
       
    62         /**
       
    63          * Returns a loaded plug-in with implementation UID aImplementationUid
       
    64          * if it exists, NULL otherwise.
       
    65          * @param aImplementationUid Implementation UID of the plug-in that is searched.
       
    66          * @return A oaded plug-in with implementation UID aImplementationUid
       
    67          *         if it exists, NULL otherwise.
       
    68          */
       
    69         CPbk2UIExtensionPlugin* LoadedPlugin(TUid aImplementationUid) const;
       
    70         
       
    71         /**
       
    72          * Returns an array of extension plugin information instances
       
    73          * @return an array of extension plugin information instances
       
    74          */
       
    75         TArray<CPbk2UIExtensionInformation*> PluginInformation() const;
       
    76         
       
    77         /**
       
    78          * Returns an array of loaded plugins.
       
    79          * @return an array of loaded plugins
       
    80          */
       
    81         TArray<CPbk2UIExtensionPlugin*> Plugins() const;
       
    82 
       
    83     private: // Implementation
       
    84         CPbk2UIExtensionLoader();
       
    85         void ConstructL();
       
    86         void LoadExtensionL(
       
    87                 TUid aImplementationUid );
       
    88         void LoadStartUpExtensionsL();
       
    89         TBool IsOkToLoadL(TUid aImplementationUid ); 
       
    90 
       
    91     private: // Data
       
    92         /// Own: Common extension resource file
       
    93         RPbk2LocalizedResourceFile iCommonResourceFile;
       
    94         /// Own: Array of loaded plug-ins.
       
    95         RPointerArray<CPbk2UIExtensionPlugin> iPluginArray;
       
    96         /// Own: Array of plug-in resources.
       
    97         RPointerArray<CPbk2UIExtensionInformation> iPluginInformation;
       
    98 	};
       
    99 
       
   100 #endif // CPBK2UIEXTENSIONLOADER_H
       
   101 //End of file