equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2009 - 2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
20 #define CMCSPLUGINENGINE_H |
20 #define CMCSPLUGINENGINE_H |
21 |
21 |
22 // System includes |
22 // System includes |
23 #include <e32base.h> |
23 #include <e32base.h> |
24 #include <mcsmenu.h> |
24 #include <mcsmenu.h> |
|
25 #include <mcsmenuitem.h> |
25 #include <mcsmenunotifier.h> |
26 #include <mcsmenunotifier.h> |
26 #include <mcsmenuitem.h> |
|
27 #include <msvapi.h> |
27 #include <msvapi.h> |
28 |
28 |
29 // User includes |
29 // User includes |
30 #include "mcspluginwatcher.h" |
30 #include "mcspluginwatcher.h" |
31 |
31 |
32 // Forward declarations |
32 // Forward declarations |
33 class CGulIcon; |
33 class CGulIcon; |
34 class CMCSPluginData; |
34 class CMCSPluginData; |
35 class TMCSData; |
35 class CMCSData; |
36 class CMCSPlugin; |
36 class CMCSPlugin; |
|
37 |
37 |
38 |
38 /** |
39 /** |
39 * @ingroup group_mcsplugin |
40 * @ingroup group_mcsplugin |
40 * |
41 * |
41 * MCSPluginEngine class |
42 * MCSPluginEngine class |
82 |
83 |
83 public: |
84 public: |
84 // new functions |
85 // new functions |
85 |
86 |
86 /** |
87 /** |
87 * Called during plugin desctruction |
|
88 * Decrements reference counters of all run-time generated items |
|
89 * and deletes those which have reference counter == 0 |
|
90 */ |
|
91 void CleanMCSItemsL(); |
|
92 |
|
93 /** |
|
94 * Gets the menu data. |
88 * Gets the menu data. |
95 * |
89 * |
96 * @param aIndex |
90 * @param aIndex |
97 * @return TMCSData& |
91 * @return TMCSData& |
98 */ |
92 */ |
99 TMCSData& MenuDataL( const TInt& aIndex ); |
93 CMCSData& MenuDataL( const TInt& aIndex ); |
100 |
94 |
101 /** Gets the menu item count |
95 /** Gets the menu item count |
102 * |
96 * |
103 * @return TInt |
97 * @return TInt |
104 */ |
98 */ |
116 * Retrieves the menu item object from MCS. |
110 * Retrieves the menu item object from MCS. |
117 * |
111 * |
118 * @param aMenuItem |
112 * @param aMenuItem |
119 * @return CMenuItem* |
113 * @return CMenuItem* |
120 */ |
114 */ |
121 CMenuItem* FetchMenuItemL( const TMenuItem& aMenuItem ); |
115 CMenuItem* FetchMenuItemL( CMCSData& aData); |
122 |
116 |
123 /** |
117 /** |
124 * Returns icon for given menu item and given attribute |
118 * Returns icon for given menu item and given attribute |
125 * |
119 * |
126 * @param aMenuItem |
120 * @param aMenuItem |
127 * @param aAttr |
121 * @param aAttr |
154 |
148 |
155 /** |
149 /** |
156 * ShowSettingsL |
150 * ShowSettingsL |
157 */ |
151 */ |
158 void ShowSettingsL(); |
152 void ShowSettingsL(); |
159 |
|
160 /** |
|
161 * Helper method. Adds a given constant to a value of reference counter |
|
162 * |
|
163 * @param aItem A Menu Item to update |
|
164 * @param aValueToAdd A constant to add |
|
165 * @return The actual value of updated reference count |
|
166 */ |
|
167 TInt UpdateMenuItemsRefCountL( |
|
168 CMenuItem* aItem, const TInt aValueToAdd ); |
|
169 |
|
170 /** |
|
171 * CreateRuntimeMenuItemsL |
|
172 * @param void |
|
173 * @return void |
|
174 */ |
|
175 void CreateRuntimeMenuItemsL(); |
|
176 |
153 |
177 private: |
154 private: |
178 // from MMCSPluginWatcherObserver |
155 // from MMCSPluginWatcherObserver |
179 |
156 |
180 /** |
157 /** |
218 * @param aMenuItem |
195 * @param aMenuItem |
219 * @return TBool |
196 * @return TBool |
220 */ |
197 */ |
221 TBool ConstructMenuItemForIconL( |
198 TBool ConstructMenuItemForIconL( |
222 const TDesC& aPath, CMenuItem& aMenuItem ); |
199 const TDesC& aPath, CMenuItem& aMenuItem ); |
|
200 |
|
201 /** |
|
202 * Creates bookmark specific MCS menu item. |
|
203 */ |
|
204 CMenuItem* CreateBkmItemL( CMCSData& aData ); |
|
205 |
|
206 /** |
|
207 * Creates mailbox specific MCS menu item. |
|
208 */ |
|
209 CMenuItem* CreateMailboxItemL( CMCSData& aData ); |
|
210 |
|
211 void LaunchFolderItemL( CMCSData& aData ); |
|
212 |
|
213 void LaunchBookmarkItemL( CMCSData& aData ); |
|
214 |
|
215 void LaunchMailboxItemL( CMCSData& aData ); |
|
216 |
|
217 void LaunchMCSItemL( CMCSData& aData ); |
223 |
218 |
224 private: |
219 private: |
225 // data |
220 // data |
226 |
221 |
227 /** Plugin data, owned */ |
222 /** Plugin data, owned */ |
251 }; |
246 }; |
252 |
247 |
253 #endif // CMCSPLUGINENGINE_H |
248 #endif // CMCSPLUGINENGINE_H |
254 |
249 |
255 // End of file |
250 // End of file |
256 |
|