1 /* |
|
2 * Copyright (c) 2008 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 Setting item list -class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MSSETTINGITEMLIST_H |
|
20 #define MSSETTINGITEMLIST_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <aknsettingitemlist.h> |
|
24 |
|
25 #include "cmcommon.h" |
|
26 #include "msengineobserver.h" |
|
27 #include "msgs.hrh" |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 class CMSSettingsView; |
|
31 class CMSEngine; |
|
32 class CCmMediaServerFull; |
|
33 |
|
34 |
|
35 // CLASS DECLARATION |
|
36 |
|
37 /** |
|
38 * CMSSSettingItemList general class. This class is used to |
|
39 * create setting items to several setting item lists. |
|
40 */ |
|
41 NONSHARABLE_CLASS( CMSSettingItemList ): public CAknSettingItemList, |
|
42 public MMSEngineObserver |
|
43 { |
|
44 public: // Constructor and destructor |
|
45 |
|
46 /** |
|
47 * NewL |
|
48 * 2-phase constructor. |
|
49 * @param aResourceId : resource ID of setting page. |
|
50 * @param aAppUi : application ui. |
|
51 */ |
|
52 static CMSSettingItemList* NewL( TInt aResourceId, |
|
53 CMSSettingsView& aView ); |
|
54 |
|
55 /** |
|
56 * NewLC |
|
57 * 2-phase constructor. |
|
58 * @param aResourceId : resource ID of setting page. |
|
59 * @param aAppUi : application ui. |
|
60 */ |
|
61 static CMSSettingItemList* NewLC( TInt aResourceId, |
|
62 CMSSettingsView& aView ); |
|
63 |
|
64 /** |
|
65 * Constructor. |
|
66 */ |
|
67 CMSSettingItemList( CMSSettingsView& aView ); |
|
68 |
|
69 /** |
|
70 * ConstructL |
|
71 * Second phase constructor. |
|
72 * @param aResourceId : resource ID of setting page. |
|
73 * @param aAppUi : application ui |
|
74 */ |
|
75 void ConstructL( TInt aResourceId ); |
|
76 |
|
77 /** |
|
78 * Destructor. |
|
79 */ |
|
80 virtual ~CMSSettingItemList(); |
|
81 |
|
82 /** |
|
83 * Opens the selected listbox item |
|
84 * |
|
85 * @since S60 5.1 |
|
86 */ |
|
87 void OpenSelectedListboxItemL(); |
|
88 |
|
89 /** |
|
90 * Returns MSEngine |
|
91 * |
|
92 * @since S60 5.1 |
|
93 * @return CMSEngine, application engine |
|
94 */ |
|
95 CMSEngine* MSEngine(); |
|
96 |
|
97 protected: |
|
98 |
|
99 // From base class CAknSettingItemList |
|
100 |
|
101 /** |
|
102 * From CAknSettingItemList |
|
103 * See base class definition |
|
104 */ |
|
105 CAknSettingItem* CreateSettingItemL( TInt aSettingId ); |
|
106 |
|
107 /** |
|
108 * From CAknSettingItemList |
|
109 * See base class definition |
|
110 */ |
|
111 void SizeChanged(); |
|
112 |
|
113 /** |
|
114 * From CAknSettingItemList |
|
115 * See base class definition |
|
116 */ |
|
117 void HandleResourceChange( TInt aType ); |
|
118 |
|
119 /** |
|
120 * From CAknSettingItemList |
|
121 * See base class definition |
|
122 */ |
|
123 void EditItemL ( TInt aIndex, TBool aCalledFromMenu ); |
|
124 |
|
125 /** |
|
126 * From CAknSettingItemList |
|
127 * See base class definition |
|
128 */ |
|
129 void HandleListBoxEventL( CEikListBox *aListBox, |
|
130 TListBoxEvent aEventType ); |
|
131 |
|
132 // From base class MMSEngineObserver |
|
133 |
|
134 /** |
|
135 * From MMSEngineObserver |
|
136 * see base class definition |
|
137 */ |
|
138 void ReadyL( TCmService aService, TInt aError ); |
|
139 |
|
140 // From base class CCoeControl |
|
141 |
|
142 /** |
|
143 * From CCoeControl |
|
144 * see base class definition |
|
145 */ |
|
146 void GetHelpContext(TCoeHelpContext& aContext) const; |
|
147 |
|
148 private: |
|
149 |
|
150 /** |
|
151 * Searches item from the list be item ID |
|
152 * |
|
153 * @since S60 5.1 |
|
154 * @param aId, item id |
|
155 * @return CAknSettingItem, item pointer |
|
156 */ |
|
157 CAknSettingItem* SearchItemById( const TMSSettingItems aId ) const; |
|
158 |
|
159 /** |
|
160 * Reads current profile from cenrep |
|
161 * |
|
162 * @since S60 5.1 |
|
163 * @return TInt, profile |
|
164 */ |
|
165 TInt GetCurrentProfileL() const; |
|
166 |
|
167 /** |
|
168 * Sets memory selection visibility |
|
169 * |
|
170 * @since S60 5.1 |
|
171 */ |
|
172 void SetMemorySelectionL(); |
|
173 |
|
174 private: |
|
175 |
|
176 /** |
|
177 * Reference to AppUi |
|
178 */ |
|
179 CMSEngine* iMSEngine; // owned |
|
180 |
|
181 /** |
|
182 * Parent view |
|
183 */ |
|
184 CMSSettingsView& iView; |
|
185 |
|
186 /** |
|
187 * Pointer to listbox |
|
188 */ |
|
189 CEikFormattedCellListBox* iListBox; // not owned |
|
190 |
|
191 /** |
|
192 * dummy text needed by text setting items |
|
193 */ |
|
194 TBuf<KMaxFileName> iDummyText; |
|
195 |
|
196 /** |
|
197 * Sync selection |
|
198 */ |
|
199 TCmServiceState iSync; |
|
200 |
|
201 /** |
|
202 * Memory manager |
|
203 */ |
|
204 TCmServiceState iMemoryManager; |
|
205 |
|
206 /** |
|
207 * searched servers list |
|
208 */ |
|
209 RPointerArray<CCmMediaServerFull>* iStoredServers; // owned |
|
210 }; |
|
211 |
|
212 #endif // MSSETTINGITEMLIST_H |
|
213 |
|
214 // End of File |
|