phonebookui/Phonebook2/xSPExtensionManager/src/CExtensionManagerFactory.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 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: 
       
    15 *       ExtensionManager factory.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __CEXTENSIONMANAGERFACTORY_H__
       
    21 #define __CEXTENSIONMANAGERFACTORY_H__
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <CPbk2UIExtensionPlugin.h>
       
    26 
       
    27 #include "CxSPScanner.h"
       
    28 #include "CxSPViewActivator.h"
       
    29 
       
    30 class MxSPFactory;
       
    31 class CxSPViewIdChanger;
       
    32 class CxSPContactManager;
       
    33 class CxSPViewManager;
       
    34 class CxSPAppUiManager;
       
    35 
       
    36 // CLASS DECLARATION
       
    37 /**
       
    38  * Implementation of Extension Manager UI extension plug-in.
       
    39  * Responsible for:
       
    40  * - implementing UI extension plug-in interface
       
    41  */
       
    42 class CExtensionManagerFactory : public CPbk2UIExtensionPlugin
       
    43 	{
       
    44 	public: // Construction and destruction
       
    45         /**
       
    46          * Static factory function that performs the 2-phased construction.
       
    47          *
       
    48          * @return Newly created CExtensionManagerFactory.
       
    49          */
       
    50 		static CExtensionManagerFactory* NewL();
       
    51 
       
    52         /**
       
    53          * Standard C++ destructor.
       
    54          */
       
    55         ~CExtensionManagerFactory();
       
    56 
       
    57 	public: // Implementation
       
    58         /**
       
    59          * Appends an extension factory to this multifactory.
       
    60          * Ownership is not transferred.
       
    61          *
       
    62          * @param aFactory Factory to append.
       
    63          */
       
    64         void AppendL(MxSPFactory* aFactory);
       
    65 
       
    66 
       
    67     private: // From CPbk2UIExtensionPlugin
       
    68         MPbk2UIExtensionView* CreateExtensionViewL(
       
    69                 TUid aViewId,
       
    70                 CPbk2UIExtensionView& aView );
       
    71         void DynInitMenuPaneL(
       
    72                 TInt aResourceId,
       
    73                 CEikMenuPane* aMenuPane,
       
    74                 MPbk2ContactUiControl& aControl );
       
    75         void UpdateStorePropertiesL(
       
    76                 CPbk2StorePropertyArray& aPropertyArray );
       
    77         MPbk2ContactEditorExtension* CreatePbk2ContactEditorExtensionL(
       
    78                 CVPbkContactManager& aContactManager,
       
    79                 MVPbkStoreContact& aContact,
       
    80                 MPbk2ContactEditorControl& aEditorControl );
       
    81         MPbk2ContactUiControlExtension* CreatePbk2UiControlExtensionL(
       
    82                 CVPbkContactManager& aContactManager );
       
    83         MPbk2SettingsViewExtension* CreatePbk2SettingsViewExtensionL(
       
    84                 CVPbkContactManager& aContactManager );
       
    85         MPbk2AppUiExtension* CreatePbk2AppUiExtensionL(
       
    86                 CVPbkContactManager& aContactManager );
       
    87         MPbk2Command* CreatePbk2CommandForIdL(
       
    88                 TInt aCommandId,
       
    89                 MPbk2ContactUiControl& aUiControl ) const;
       
    90         MPbk2AiwInterestItem* CreatePbk2AiwInterestForIdL(
       
    91                 TInt aInterestId,
       
    92                 CAiwServiceHandler& aServiceHandler ) const;
       
    93         TBool GetHelpContextL(
       
    94                 TCoeHelpContext& aContext,
       
    95                 const CPbk2AppViewBase& aView,
       
    96                 MPbk2ContactUiControl& aUiControl );
       
    97         void ApplyDynamicViewGraphChangesL(
       
    98                 CPbk2ViewGraph& aViewGraph);
       
    99 		void ApplyDynamicPluginInformationDataL(
       
   100                 CPbk2UIExtensionInformation& iUiExtensionInformation );
       
   101 
       
   102     private: // Implementation
       
   103         /**
       
   104          * Standard C++ constructor.
       
   105          */
       
   106 		CExtensionManagerFactory();
       
   107 
       
   108         /**
       
   109          * Performs the 2nd phase of the construction.
       
   110          */
       
   111 		void ConstructL();
       
   112 
       
   113 		/**
       
   114 		 * Scans for xSP ECOM plugin extensions
       
   115 		 */
       
   116 		void ScanExtensionsL();
       
   117 
       
   118 		/**
       
   119 		 * Creates xSPs' view extension objects
       
   120 		 */
       
   121 		void CreatePbkViewExtensionL();
       
   122 
       
   123     private: // Data
       
   124 
       
   125          // Extension factories.
       
   126         CArrayPtrFlat<MxSPFactory> iFactories;
       
   127 
       
   128         // Own: scanner
       
   129         CxSPScanner* iScanner;
       
   130 
       
   131         /// Array of extensions
       
   132         CxSPArray iExtensions;
       
   133 
       
   134         /// Own: view id changer
       
   135         CxSPViewIdChanger* iViewIdChanger;
       
   136 
       
   137         /// Own: contact manager
       
   138         CxSPContactManager* iContactManager;
       
   139 
       
   140         /// Flag to check whether sort view exists
       
   141         TBool iSortView;
       
   142 
       
   143         /// Own: view manager
       
   144         CxSPViewManager* iViewManager;
       
   145 
       
   146         /// Not owned: app ui manager
       
   147         CxSPAppUiManager* iAppUiManager;
       
   148 
       
   149         // Own: View activator
       
   150         CxSPViewActivator* iViewActivator;
       
   151 	};
       
   152 
       
   153 #endif // __CEXTENSIONMANAGERFACTORY_H__
       
   154 
       
   155 // End of File