phonebookui/Phonebook2/UIExtensionManager/inc/CPbk2UIExtensionFactory.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2005-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:  Phonebook 2 UI extension factory.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPBK2UIEXTENSIONFACTORY_H
       
    20 #define CPBK2UIEXTENSIONFACTORY_H
       
    21 
       
    22 // INCLUDE FILES
       
    23 #include <e32base.h>
       
    24 #include <MPbk2UIExtensionFactory.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CPbk2UIExtensionLoader;
       
    28 class CPbk2UIExtensionManager;
       
    29 class CPbk2ThinUIExtensionLoader;
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34  * Phonebook 2 UI extension factory.
       
    35  * Responsible for creating extension objects provided by extension plugins.
       
    36  */
       
    37 NONSHARABLE_CLASS(CPbk2UIExtensionFactory) : public CBase,
       
    38                                              public MPbk2UIExtensionFactory
       
    39     {
       
    40     public: // Construction and destruction
       
    41 
       
    42         /**
       
    43          * Returns a new instance of this class.
       
    44          *
       
    45          * @param aExtensionLoader      Extension loader.
       
    46          * @param aThinExtensionLoader  Thin extension loader.
       
    47          * @param aExtensionManager     Extension manager.
       
    48          * @return  A new instance of this class.
       
    49          */
       
    50         static CPbk2UIExtensionFactory* NewL(
       
    51                 CPbk2UIExtensionLoader& aExtensionLoader,
       
    52                 CPbk2ThinUIExtensionLoader& aThinExtensionLoader,
       
    53                 CPbk2UIExtensionManager& aExtensionManager );
       
    54 
       
    55         /**
       
    56          * Destructor.
       
    57          */
       
    58         ~CPbk2UIExtensionFactory();
       
    59 
       
    60     public: // From MPbk2UIExtensionFactory
       
    61         MPbk2ContactEditorExtension* CreatePbk2ContactEditorExtensionL(
       
    62                 CVPbkContactManager& aContactManager,
       
    63                 MVPbkStoreContact& aContact,
       
    64                 MPbk2ContactEditorControl& aEditorControl );
       
    65         MPbk2ContactUiControlExtension* CreatePbk2UiControlExtensionL(
       
    66                 CVPbkContactManager& aContactManager );
       
    67         MPbk2SettingsViewExtension* CreatePbk2SettingsViewExtensionL(
       
    68                 CVPbkContactManager& aContactManager );
       
    69         MPbk2AppUiExtension* CreatePbk2AppUiExtensionL(
       
    70                 CVPbkContactManager& aContactManager );
       
    71         MPbk2Command* CreatePbk2CommandForIdL(
       
    72                 TInt aCommandId,
       
    73                 MPbk2ContactUiControl& aUiControl ) const;
       
    74         MPbk2AiwInterestItem* CreatePbk2AiwInterestForIdL(
       
    75                 TInt aInterestId,
       
    76                 CAiwServiceHandler& aServiceHandler ) const;
       
    77         CAknView* CreatePhonebook2ViewL(
       
    78                 TUid aId );
       
    79 
       
    80     private: // Implementation
       
    81         CPbk2UIExtensionFactory(
       
    82                 CPbk2UIExtensionLoader& aExtensionLoader,
       
    83                 CPbk2ThinUIExtensionLoader& aThinExtensionLoader,
       
    84                 CPbk2UIExtensionManager& aExtensionManager );
       
    85 
       
    86     private: // Data
       
    87         /// Ref: UI extension loader
       
    88         CPbk2UIExtensionLoader& iExtensionLoader;
       
    89         /// Ref: Thin UI extension loader
       
    90         CPbk2ThinUIExtensionLoader& iThinExtensionLoader;
       
    91         /// Ref: UI extension manager
       
    92         CPbk2UIExtensionManager& iExtensionManager;
       
    93         /// Own: An array for plugin UIDs that overwrite Phonebook 2 commands
       
    94         mutable RArray<TUid> iPluginUidArray;
       
    95     };
       
    96 
       
    97 #endif // CPBK2UIEXTENSIONFACTORY_H
       
    98 
       
    99 // End of File