|
1 /* |
|
2 * Copyright (c) 2009 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: Global discreet popup data class. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef T_AKNDISCREETPOPUPDATA_H |
|
19 #define T_AKNDISCREETPOPUPDATA_H |
|
20 |
|
21 #include <AknsConstants.h> |
|
22 |
|
23 const TInt KMaxTextSize( 100 ); |
|
24 |
|
25 /** |
|
26 * Class for storing global discreet popup data. |
|
27 * |
|
28 * @lib avkon |
|
29 * @since S60 v5.2 |
|
30 */ |
|
31 NONSHARABLE_CLASS( TAknDiscreetPopupData ) |
|
32 { |
|
33 |
|
34 public: |
|
35 |
|
36 /** Popup data type definition. */ |
|
37 enum TAknDiscreetPopupDataType |
|
38 { |
|
39 EAknPopupTypeUndefined = 1, |
|
40 EAknPopupTypeParam, |
|
41 EAknPopupTypeResource, |
|
42 EAknPopupTypeCancelRequest, |
|
43 EAknPopupTypeQueryInUseRect |
|
44 }; |
|
45 |
|
46 /** |
|
47 * C++ constructor. |
|
48 */ |
|
49 inline TAknDiscreetPopupData(); |
|
50 |
|
51 /** |
|
52 * Provides popup data type. |
|
53 */ |
|
54 inline const TInt Type(); |
|
55 |
|
56 protected: |
|
57 |
|
58 /** |
|
59 * Popup data type. |
|
60 */ |
|
61 TInt iType; |
|
62 |
|
63 }; |
|
64 |
|
65 |
|
66 /** |
|
67 * Discreet popup request cancellation data class. |
|
68 * |
|
69 * @lib avkon |
|
70 * @since S60 v5.2 |
|
71 */ |
|
72 NONSHARABLE_CLASS( TAknDiscreetPopupCancelRequestData ) : public TAknDiscreetPopupData |
|
73 { |
|
74 |
|
75 public: |
|
76 |
|
77 /** |
|
78 * C++ constructor. |
|
79 */ |
|
80 inline TAknDiscreetPopupCancelRequestData(); |
|
81 |
|
82 /** |
|
83 * Returns request status handle. |
|
84 * |
|
85 * @return Request status handle. |
|
86 */ |
|
87 inline const TUint& StatusHandle(); |
|
88 |
|
89 /** |
|
90 * Sets request status handle. |
|
91 * |
|
92 * @param aHandle Request status handle. |
|
93 */ |
|
94 void SetStatusHandle( const TUint& aHandle ); |
|
95 |
|
96 private: |
|
97 |
|
98 /** |
|
99 * Request status handle. |
|
100 */ |
|
101 TUint iStatusHandle; |
|
102 |
|
103 }; |
|
104 |
|
105 |
|
106 /** |
|
107 * Super class for global discreet popup data classes. |
|
108 * |
|
109 * @lib avkon |
|
110 * @since S60 v5.2 |
|
111 */ |
|
112 NONSHARABLE_CLASS( TAknDiscreetPopupLaunchData ) : public TAknDiscreetPopupData |
|
113 { |
|
114 |
|
115 public: |
|
116 |
|
117 |
|
118 /** |
|
119 * Provides app uid. |
|
120 * |
|
121 * @return App uid. |
|
122 */ |
|
123 inline const TUid& AppUid(); |
|
124 |
|
125 /** |
|
126 * Provides view uid. |
|
127 * |
|
128 * @return View uid. |
|
129 */ |
|
130 inline const TUid& ViewUid(); |
|
131 |
|
132 /** |
|
133 * Returns ETrue if popup has action when tapped. |
|
134 * |
|
135 * @return ETrue if popup has action when tapped. |
|
136 */ |
|
137 inline const TBool& Action(); |
|
138 |
|
139 /** |
|
140 * Provides popup id. |
|
141 * |
|
142 * @return Popup id. |
|
143 */ |
|
144 inline const TInt PopupId(); |
|
145 |
|
146 /** |
|
147 * Sets app uid. |
|
148 * |
|
149 * @param aAppUid App uid. |
|
150 */ |
|
151 void SetAppUid( const TUid& aAppUid ); |
|
152 |
|
153 /** |
|
154 * Sets view uid. |
|
155 * |
|
156 * @param aViewUid View uid. |
|
157 */ |
|
158 void SetViewUid( const TUid& aViewUid ); |
|
159 |
|
160 /** |
|
161 * Sets action parameter. |
|
162 * |
|
163 * @param aAction ETrue if popup has action when tapped. |
|
164 */ |
|
165 void SetAction( const TBool& aAction ); |
|
166 |
|
167 /** |
|
168 * Sets popup id. |
|
169 * |
|
170 * @param aPopupId Popup id. |
|
171 */ |
|
172 void SetPopupId( const TInt& aPopupId ); |
|
173 |
|
174 |
|
175 private: |
|
176 |
|
177 /** |
|
178 * Application uid. |
|
179 */ |
|
180 TUid iAppUid; |
|
181 |
|
182 /** |
|
183 * View uid. |
|
184 */ |
|
185 TUid iViewUid; |
|
186 |
|
187 /** |
|
188 * ETrue if popup has action when tapped. |
|
189 */ |
|
190 TBool iAction; |
|
191 |
|
192 /** |
|
193 * Unique popup id. |
|
194 */ |
|
195 TInt iPopupId; |
|
196 |
|
197 }; |
|
198 |
|
199 |
|
200 /** |
|
201 * Class for storing global discreet popup parameter data. |
|
202 * |
|
203 * @lib avkon |
|
204 * @since S60 v5.2 |
|
205 */ |
|
206 NONSHARABLE_CLASS( TAknDiscreetPopupParamData ) : public TAknDiscreetPopupLaunchData |
|
207 { |
|
208 |
|
209 public: |
|
210 |
|
211 /** |
|
212 * C++ constructor. |
|
213 */ |
|
214 inline TAknDiscreetPopupParamData(); |
|
215 |
|
216 /** |
|
217 * Provides title text. |
|
218 * |
|
219 * @return Title text. |
|
220 */ |
|
221 inline const TDesC& TitleText(); |
|
222 |
|
223 /** |
|
224 * Provides body text. |
|
225 * |
|
226 * @return Body text. |
|
227 */ |
|
228 inline const TDesC& BodyText(); |
|
229 |
|
230 /** |
|
231 * Provides skin id. |
|
232 * |
|
233 * @return Skin id. |
|
234 */ |
|
235 inline const TAknsItemID& SkinId(); |
|
236 |
|
237 /** |
|
238 * Provides bitmap file. |
|
239 * |
|
240 * @return Bitmap file. |
|
241 */ |
|
242 inline const TDesC& BitmapFile(); |
|
243 |
|
244 /** |
|
245 * Provides bitmap id. |
|
246 * |
|
247 * @return Bitmap id. |
|
248 */ |
|
249 inline const TInt BitmapId(); |
|
250 |
|
251 /** |
|
252 * Provides mask id. |
|
253 * |
|
254 * @return Mask id. |
|
255 */ |
|
256 inline const TInt MaskId(); |
|
257 |
|
258 /** |
|
259 * Provides flags. |
|
260 * |
|
261 * @return Flags. |
|
262 */ |
|
263 inline const TInt Flags(); |
|
264 |
|
265 /** |
|
266 * Sets title text. |
|
267 * |
|
268 * @param aTitleText Title text. |
|
269 */ |
|
270 void SetTitleText( const TDesC& aTitleText ); |
|
271 |
|
272 /** |
|
273 * Sets body text. |
|
274 * |
|
275 * @param aBodyText Body text. |
|
276 */ |
|
277 void SetBodyText( const TDesC& aBodyText ); |
|
278 |
|
279 /** |
|
280 * Sets skin id. |
|
281 * |
|
282 * @param aBodyText Skin id. |
|
283 */ |
|
284 void SetSkinId( const TAknsItemID& aSkinId ); |
|
285 |
|
286 /** |
|
287 * Sets bitmap file. |
|
288 * |
|
289 * @param aBitmapFile Bitmap file. |
|
290 */ |
|
291 void SetBitmapFile( const TDesC& aBitmapFile ); |
|
292 |
|
293 /** |
|
294 * Sets bitmap id. |
|
295 * |
|
296 * @param aBitmapId Bitmap id. |
|
297 */ |
|
298 void SetBitmapId( const TInt& aBitmapId ); |
|
299 |
|
300 /** |
|
301 * Sets mask id. |
|
302 * |
|
303 * @param aMaskId Mask id. |
|
304 */ |
|
305 void SetMaskId( const TInt& aMaskId ); |
|
306 |
|
307 /** |
|
308 * Sets flags. |
|
309 * |
|
310 * @param aFlags Flags. |
|
311 */ |
|
312 void SetFlags( const TInt& aFlags ); |
|
313 |
|
314 private: |
|
315 |
|
316 /** |
|
317 * Title text. |
|
318 */ |
|
319 TBuf<KMaxTextSize> iTitleText; |
|
320 |
|
321 /** |
|
322 * Body text. |
|
323 */ |
|
324 TBuf<KMaxTextSize> iBodyText; |
|
325 |
|
326 /** |
|
327 * Skin id. |
|
328 */ |
|
329 TAknsItemID iSkinId; |
|
330 |
|
331 /** |
|
332 * Bitmap file. |
|
333 */ |
|
334 TFileName iBitmapFile; |
|
335 |
|
336 /** |
|
337 * Bitmap id. |
|
338 */ |
|
339 TInt iBitmapId; |
|
340 |
|
341 /** |
|
342 * Mask id. |
|
343 */ |
|
344 TInt iMaskId; |
|
345 |
|
346 /** |
|
347 * Flags. |
|
348 */ |
|
349 TInt iFlags; |
|
350 |
|
351 }; |
|
352 |
|
353 /** |
|
354 * Class for storing global discreet popup resource data. |
|
355 * |
|
356 * @lib avkon |
|
357 * @since S60 v5.2 |
|
358 */ |
|
359 NONSHARABLE_CLASS( TAknDiscreetPopupResourceData ) : public TAknDiscreetPopupLaunchData |
|
360 { |
|
361 |
|
362 public: |
|
363 |
|
364 /** |
|
365 * C++ constructor. |
|
366 */ |
|
367 inline TAknDiscreetPopupResourceData(); |
|
368 |
|
369 /** |
|
370 * Provides resource file. |
|
371 * |
|
372 * @return Resource file. |
|
373 */ |
|
374 inline const TDesC& ResourceFile(); |
|
375 |
|
376 /** |
|
377 * Provides resource id. |
|
378 * |
|
379 * @return Resource id. |
|
380 */ |
|
381 inline const TInt ResourceId(); |
|
382 |
|
383 /** |
|
384 * Sets resource file. |
|
385 * |
|
386 * @param aResourceFile Resource file. |
|
387 */ |
|
388 void SetResourceFile( const TDesC& aResourceFile ); |
|
389 |
|
390 /** |
|
391 * Sets resource id. |
|
392 * |
|
393 * @param aResourceId Resource id. |
|
394 */ |
|
395 void SetResourceId( const TInt& aResourceId ); |
|
396 |
|
397 private: |
|
398 |
|
399 /** |
|
400 * Resource file. |
|
401 */ |
|
402 TFileName iResourceFile; |
|
403 |
|
404 /** |
|
405 * Resource id. |
|
406 */ |
|
407 TInt iResourceId; |
|
408 |
|
409 }; |
|
410 |
|
411 /** |
|
412 * Class for storing in use global discreet popup rectangle data. |
|
413 * |
|
414 * @lib avkon |
|
415 * @since S60 v5.2 |
|
416 */ |
|
417 NONSHARABLE_CLASS( TAknDiscreetPopupRectData ) : public TAknDiscreetPopupData |
|
418 { |
|
419 |
|
420 public: |
|
421 |
|
422 /** |
|
423 * C++ constructor. |
|
424 */ |
|
425 inline TAknDiscreetPopupRectData(const TRect& aRect); |
|
426 |
|
427 inline const TRect Rect(); |
|
428 |
|
429 private: |
|
430 |
|
431 TRect iRect; |
|
432 |
|
433 }; |
|
434 |
|
435 #include "akndiscreetpopupdata.inl" |
|
436 |
|
437 #endif // T_AKNDISCREETPOPUPDATA_H |
|
438 // End of File |