|
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: Definition for mrui dynamic item selection list |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CESMRDYNAMICITEMSELECTIONLIST_H_ |
|
20 #define CESMRDYNAMICITEMSELECTIONLIST_H_ |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 // <cmail> |
|
25 #include "esmrdef.h" |
|
26 // </cmail> |
|
27 #include <bamdesca.h> |
|
28 |
|
29 // FORWARD DECLARATIONS: |
|
30 class CDesC16ArrayFlat; |
|
31 class CAknPopupList; |
|
32 class CEikonEnv; |
|
33 |
|
34 // CLASS DECLARATION |
|
35 |
|
36 /** |
|
37 * CESMRDynamicItemSelectionList provides dynamic selection list |
|
38 * |
|
39 */ |
|
40 NONSHARABLE_CLASS( CESMRDynamicItemSelectionList : public CBase ) |
|
41 { |
|
42 public: |
|
43 enum TESMRSelectionListType |
|
44 { |
|
45 EESMRAddressSelectionList = 0, |
|
46 EESMRRecentLocationList |
|
47 }; |
|
48 |
|
49 public: |
|
50 /** |
|
51 * Two-phased constructor. |
|
52 */ |
|
53 static CESMRDynamicItemSelectionList* NewL(); |
|
54 |
|
55 /** |
|
56 * Destructor. |
|
57 */ |
|
58 ~CESMRDynamicItemSelectionList(); |
|
59 |
|
60 public: //Implementation |
|
61 /* |
|
62 * ExecuteL shows the selection list |
|
63 * and returns the selection |
|
64 * |
|
65 * Formats for selection list: |
|
66 * EESMRAddressSelectionList: Label\tAddressData |
|
67 * EESMRRecentLocationList: Data only |
|
68 * |
|
69 * @param aDataArray the data to be shown in the list |
|
70 * @param aType the type of the list to show the data |
|
71 * @return index of the list query selection or negative for cancel |
|
72 */ |
|
73 TInt ExecuteL( |
|
74 MDesCArray& aDataArray, |
|
75 const TESMRSelectionListType aType ); |
|
76 TInt ExecuteL( |
|
77 const RPointerArray<HBufC>& aDataArray, |
|
78 const TESMRSelectionListType aType ); |
|
79 |
|
80 private: // Constructors |
|
81 CESMRDynamicItemSelectionList(); |
|
82 void ConstructL(); |
|
83 |
|
84 private: // Implementation |
|
85 |
|
86 private: // Data |
|
87 /// Own: Resource offset; |
|
88 TInt iResourceOffset; |
|
89 /// Ref: |
|
90 CEikonEnv* iEnv; |
|
91 }; |
|
92 |
|
93 |
|
94 #endif // CESMRDYNAMICITEMSELECTIONLIST_H_ |
|
95 |
|
96 // End of File |