|
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 menu manager. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPBK2UIEXTENSIONMENUMANAGER_H |
|
20 #define CPBK2UIEXTENSIONMENUMANAGER_H |
|
21 |
|
22 // INCLUDE FILES |
|
23 #include <e32base.h> |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class CPbk2UIExtensionLoader; |
|
27 class CPbk2ThinUIExtensionLoader; |
|
28 class CEikMenuPane; |
|
29 class CPbk2UIExtensionInformation; |
|
30 class MPbk2ContactUiControl; |
|
31 |
|
32 /** |
|
33 * Phonebook 2 UI extension menu manager. |
|
34 * |
|
35 * Menu manager that initializes menu pane from resources or loads the |
|
36 * related extension if needed. |
|
37 */ |
|
38 NONSHARABLE_CLASS(CPbk2UIExtensionMenuManager) : public CBase |
|
39 { |
|
40 public: // Construction and destruction |
|
41 |
|
42 /** |
|
43 * Creates a new instance of this class. |
|
44 * |
|
45 * @param aExtensionLoader Extension loader. |
|
46 * @param aThinExtensionLoader Thin extension loader. |
|
47 * @return A new instance of this class. |
|
48 */ |
|
49 static CPbk2UIExtensionMenuManager* NewL( |
|
50 CPbk2UIExtensionLoader& aExtensionLoader, |
|
51 CPbk2ThinUIExtensionLoader& aThinExtensionLoader ); |
|
52 |
|
53 /** |
|
54 * Destructor. |
|
55 */ |
|
56 ~CPbk2UIExtensionMenuManager(); |
|
57 |
|
58 public: // Interface |
|
59 |
|
60 /** |
|
61 * Initializes the menu pane. |
|
62 * |
|
63 * @param aViewId Id of the view whose menu |
|
64 * pane is being initialized. |
|
65 * @param aFilteringFlags Menu filtering flags that are |
|
66 * on in the current state of the UI. |
|
67 * @param aResourceId Resource id of the menu that |
|
68 * is being initialized. |
|
69 * @param aMenuPane Menu pane that is being initialized. |
|
70 * @param aUiControl Current UI control. |
|
71 */ |
|
72 void DynInitMenuPaneL( |
|
73 TUid aViewId, |
|
74 TUint32 aFilteringFlags, |
|
75 TInt aResourceId, |
|
76 CEikMenuPane* aMenuPane, |
|
77 MPbk2ContactUiControl& aUiControl ); |
|
78 |
|
79 /** |
|
80 * Returns UIDs of the plugins that informed to |
|
81 * implement the command. |
|
82 * |
|
83 * @param aCommandId The command id that is checked for. |
|
84 * @param aPluginUids An array for plugin UIDs. |
|
85 */ |
|
86 void PluginForCommandIdL( |
|
87 TInt aCommandId, |
|
88 RArray<TUid>& aPluginUids ) const; |
|
89 |
|
90 private: // Implementation |
|
91 CPbk2UIExtensionMenuManager( |
|
92 CPbk2UIExtensionLoader& aExtensionLoader, |
|
93 CPbk2ThinUIExtensionLoader& aThinExtensionLoader ); |
|
94 void DoDynInitMenuPaneL( |
|
95 CPbk2UIExtensionInformation& aPluginInformation, |
|
96 TUid aViewId, |
|
97 TUint32 aFilteringFlags, |
|
98 TInt aResourceId, |
|
99 CEikMenuPane* aMenuPane, |
|
100 MPbk2ContactUiControl& aUiControl ); |
|
101 |
|
102 private: // Data |
|
103 /// Ref: Extension loader for loading extensions when needed |
|
104 CPbk2UIExtensionLoader& iExtensionLoader; |
|
105 /// Ref: Yhin extension loader |
|
106 CPbk2ThinUIExtensionLoader& iThinExtensionLoader; |
|
107 }; |
|
108 |
|
109 #endif // CPBK2UIEXTENSIONMENUMANAGER_H |
|
110 |
|
111 // End of File |