|
1 /* |
|
2 * Copyright (c) 2010 Ixonos Plc. |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the "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 * Ixonos Plc |
|
14 * |
|
15 * Description: |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef IMAGEEDITORPLUGINRESOURCE_H |
|
22 #define IMAGEEDITORPLUGINRESOURCE_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 #include <badesca.h> |
|
27 #include <eikmenup.h> |
|
28 |
|
29 #include "ImageEditorPluginBaseDefs.h" |
|
30 #include "ImageEditorPluginBase.hrh" |
|
31 |
|
32 // TYPEDEFS |
|
33 typedef CArrayFixSeg<CEikMenuPaneItem::SData> CMenuItemArray; |
|
34 |
|
35 /* CLASS: CPluginResource |
|
36 * |
|
37 * CPluginResource acts as constructable container object for Image Editor |
|
38 * plug-in. |
|
39 * |
|
40 */ |
|
41 class CPluginResource : public CBase |
|
42 { |
|
43 |
|
44 public: |
|
45 |
|
46 /** @name Methods:*/ |
|
47 //@{ |
|
48 |
|
49 /** NewL factory method, pops cleanupstack |
|
50 * |
|
51 * @param aResourcePath - plug-in resource path |
|
52 * @param aResourceFile - plug-in resource file |
|
53 * @return CPluginResource *, pointer to created CPluginResource object |
|
54 */ |
|
55 static CPluginResource * NewL ( |
|
56 const TDesC & aResourcePath, |
|
57 const TDesC & aResourceFile |
|
58 ); |
|
59 |
|
60 /** Destructor |
|
61 * @param - |
|
62 * @return - |
|
63 */ |
|
64 virtual ~CPluginResource (); |
|
65 |
|
66 /** PluginUID - const |
|
67 * |
|
68 * Getter for plug-in UID |
|
69 * |
|
70 * @param - |
|
71 * @return const reference to plug-in UID |
|
72 */ |
|
73 const TPluginInt & PluginUID () const; |
|
74 |
|
75 /** PluginUiType - const |
|
76 * |
|
77 * Getter for plug-in UI type |
|
78 * |
|
79 * @param - |
|
80 * @return const reference to plug-in UI type |
|
81 */ |
|
82 const TPluginUiType & PluginUiType() const; |
|
83 |
|
84 /** PluginFilterType - const |
|
85 * |
|
86 * Getter for plug-in filter type |
|
87 * |
|
88 * @param - |
|
89 * @return const reference to plug-in filter type |
|
90 */ |
|
91 const TPluginFilterType & PluginFilterType() const; |
|
92 |
|
93 /** PluginScope - const |
|
94 * |
|
95 * Getter for plug-in scope |
|
96 * |
|
97 * @param - |
|
98 * @return const reference to plug-in scope |
|
99 */ |
|
100 const TPluginScope & PluginScope() const; |
|
101 |
|
102 /** PluginDisplayOrder - const |
|
103 * |
|
104 * Getter for plug-in display order |
|
105 * |
|
106 * @param - |
|
107 * @return const reference to plug-in display order |
|
108 */ |
|
109 const TPluginInt & PluginDisplayOrder() const; |
|
110 |
|
111 /** PluginName - const |
|
112 * |
|
113 * Getter for plug-in name |
|
114 * |
|
115 * @param - |
|
116 * @return const reference to plug-in name descriptor |
|
117 */ |
|
118 const TPtrC PluginName () const; |
|
119 |
|
120 /** IconFileName - const |
|
121 * |
|
122 * Getter for plug-in icon file name |
|
123 * |
|
124 * @param - |
|
125 * @return const reference to plug-in icon file name |
|
126 */ |
|
127 const TPtrC IconFileName () const; |
|
128 |
|
129 /** FilterFileName - const |
|
130 * |
|
131 * Getter for plug-in filter DLL name |
|
132 * |
|
133 * @param - |
|
134 * @return const reference to plug-in filter DLL name |
|
135 */ |
|
136 const TPtrC FilterFileName () const; |
|
137 |
|
138 /** GetParameters |
|
139 * |
|
140 * Gets parameter descriptor array. |
|
141 * |
|
142 * @param - |
|
143 * @return the parameter name descriptor array |
|
144 */ |
|
145 const CDesCArray * GetParameters () const; |
|
146 |
|
147 /** GetSk1Text |
|
148 * |
|
149 * Gets soft key 1 text. |
|
150 * |
|
151 * @param - |
|
152 * @return the soft key name |
|
153 */ |
|
154 const CDesCArray * Sk1Texts () const; |
|
155 |
|
156 /** GetSk1CommandId |
|
157 * |
|
158 * Gets soft key 1 command ID. |
|
159 * |
|
160 * @param - |
|
161 * @return the soft key name |
|
162 */ |
|
163 const CArrayFix<TInt> * Sk1CommandIds() const; |
|
164 |
|
165 /** GetSk2Text |
|
166 * |
|
167 * Gets soft key 2 text. |
|
168 * |
|
169 * @param - |
|
170 * @return the soft key command ID |
|
171 */ |
|
172 const CDesCArray * Sk2Texts() const; |
|
173 |
|
174 /** GetSk2CommandId |
|
175 * |
|
176 * Gets soft key 2 command ID. |
|
177 * |
|
178 * @param - |
|
179 * @return the soft key command ID |
|
180 */ |
|
181 const CArrayFix<TInt> * Sk2CommandIds() const; |
|
182 |
|
183 /** GetMSKText |
|
184 * |
|
185 * Gets Middle softkey text. |
|
186 * |
|
187 * @param - |
|
188 * @return the soft key command ID |
|
189 */ |
|
190 const CDesCArray * MSKTexts() const; |
|
191 |
|
192 /** GetMSKCommandId |
|
193 * |
|
194 * Gets Middle soft key command ID. |
|
195 * |
|
196 * @param - |
|
197 * @return the soft key command ID |
|
198 */ |
|
199 const CArrayFix<TInt> * MSKCommandIds() const; |
|
200 |
|
201 /** GetMenuItems |
|
202 * |
|
203 * Gets menu items. |
|
204 * |
|
205 * @param - |
|
206 * @return - pointer to menu item array |
|
207 */ |
|
208 const CMenuItemArray * MenuItems() const; |
|
209 |
|
210 //@} |
|
211 |
|
212 protected: |
|
213 |
|
214 /** @name Methods:*/ |
|
215 //@{ |
|
216 |
|
217 //@} |
|
218 |
|
219 /** @name Members:*/ |
|
220 //@{ |
|
221 |
|
222 //@} |
|
223 |
|
224 private: |
|
225 |
|
226 /** @name Methods:*/ |
|
227 //@{ |
|
228 |
|
229 /** Default constructor, cannot leave. |
|
230 * |
|
231 * @param - |
|
232 * @return - |
|
233 */ |
|
234 CPluginResource (); |
|
235 |
|
236 /** Second phase constructor, may leave |
|
237 * |
|
238 * @param aResourcePath - plug-in resource path |
|
239 * @param aResourceFile - plug-in resource file |
|
240 * @return - |
|
241 */ |
|
242 void ConstructL ( |
|
243 const TDesC & aResourcePath, |
|
244 const TDesC & aResourceFile |
|
245 ); |
|
246 |
|
247 /** Copy constructor, disabled |
|
248 */ |
|
249 CPluginResource (const CPluginResource & rhs); |
|
250 |
|
251 /** Assignment operator, disabled |
|
252 */ |
|
253 CPluginResource & operator= (const CPluginResource & rhs); |
|
254 |
|
255 //@} |
|
256 |
|
257 /** @name Members:*/ |
|
258 //@{ |
|
259 /// Plug-in UID |
|
260 TPluginInt iPluginUID; |
|
261 /// Plug-in UI type |
|
262 TPluginUiType iPluginUIType; |
|
263 /// Plug-in filter type |
|
264 TPluginFilterType iPluginFilterType; |
|
265 /// Plug-in scope |
|
266 TPluginScope iPluginScope; |
|
267 /// Plug-in display order |
|
268 TPluginInt iPluginDisplayOrder; |
|
269 /// Plug-in name |
|
270 HBufC * iPluginName; |
|
271 /// Plug-in icon name |
|
272 HBufC * iPluginIconFileName; |
|
273 /// Plug-in filter DLL name |
|
274 HBufC * iPluginFilterDllName; |
|
275 /// Plug-in parameters |
|
276 CDesCArray * iParameters; |
|
277 /// Soft key 1 text |
|
278 CDesCArray * iSk1Texts; |
|
279 /// Soft key 1 command id |
|
280 CArrayFix<TInt> * iSk1Cmds; |
|
281 /// Soft key 2 text |
|
282 CDesCArray * iSk2Texts; |
|
283 /// Soft key 2 command id |
|
284 CArrayFix<TInt> * iSk2Cmds; |
|
285 /// Middle softkey text |
|
286 CDesCArray * iMSKTexts; |
|
287 /// Middle softkey command id |
|
288 CArrayFix<TInt> * iMSKCmds; |
|
289 /// Menu items |
|
290 CMenuItemArray * iMenuItems; |
|
291 //@} |
|
292 |
|
293 }; |
|
294 |
|
295 |
|
296 #endif |