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: CMSStoreSettingsList class definition |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_MSSTORESETTINGSLIST_H |
|
20 #define C_MSSTORESETTINGSLIST_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <aknsettingitemlist.h> |
|
24 #include "msengineobserver.h" |
|
25 #include "cmcommontypes.h" |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CMSAppUi; |
|
29 class CCmStoreRuleContainer; |
|
30 class CCmStoreRule; |
|
31 class CCmMediaServerFull; |
|
32 class CMSStoreSettingsView; |
|
33 |
|
34 // CLASS DECLARATION |
|
35 |
|
36 /** |
|
37 * CMSStoreSettingsList general class. |
|
38 * |
|
39 * @since S60 5.1 |
|
40 */ |
|
41 NONSHARABLE_CLASS( CMSStoreSettingsList ): public CAknSettingItemList, |
|
42 public MMSEngineObserver |
|
43 { |
|
44 public: |
|
45 |
|
46 /** |
|
47 * Two-phased constructor. |
|
48 * |
|
49 * @since S60 5.1. |
|
50 * @param aResourceId : resource ID of setting page. |
|
51 * @param aAppUi, application UI |
|
52 * @param aView, store settings view |
|
53 * @return pointer to CMSStoreSettingsList |
|
54 */ |
|
55 static CMSStoreSettingsList* NewL( TInt aResourceId, |
|
56 CMSAppUi& aAppUi, |
|
57 CMSStoreSettingsView& aView ); |
|
58 |
|
59 /** |
|
60 * Two-phased constructor. |
|
61 * |
|
62 * @since S60 5.1. |
|
63 * @param aResourceId : resource ID of setting page. |
|
64 * @param aAppUi, application UI |
|
65 * @param aView, store settings view |
|
66 * @return pointer to CMSStoreSettingsList |
|
67 */ |
|
68 static CMSStoreSettingsList* NewLC( TInt aResourceId, |
|
69 CMSAppUi& aAppUi, |
|
70 CMSStoreSettingsView& aView ); |
|
71 |
|
72 /** |
|
73 * Destructor. |
|
74 */ |
|
75 virtual ~CMSStoreSettingsList(); |
|
76 |
|
77 /** |
|
78 * Opens the selected listbox item |
|
79 * @since S60 5.1 |
|
80 * @param None |
|
81 * @return None |
|
82 */ |
|
83 void OpenSelectedListboxItemL(); |
|
84 |
|
85 protected: |
|
86 |
|
87 // From base class CAknSettingItemList |
|
88 |
|
89 /** |
|
90 * From CAknSettingItemList |
|
91 * See base class definition |
|
92 */ |
|
93 CAknSettingItem* CreateSettingItemL( TInt aSettingId ); |
|
94 |
|
95 /** |
|
96 * From CAknSettingItemList |
|
97 * See base class definition |
|
98 */ |
|
99 void HandleListBoxEventL ( CEikListBox *aListBox, |
|
100 TListBoxEvent aEventType ); |
|
101 |
|
102 // From base class CCoeControl |
|
103 |
|
104 /** |
|
105 * From CCoeControl |
|
106 * See base class definition |
|
107 */ |
|
108 void SizeChanged(); |
|
109 |
|
110 /** |
|
111 * From CoeControl |
|
112 * See base class definition |
|
113 */ |
|
114 void HandleResourceChange( TInt aType ); |
|
115 |
|
116 /** |
|
117 * From CoeControl |
|
118 * See base class definition |
|
119 */ |
|
120 void GetHelpContext(TCoeHelpContext& aContext) const; |
|
121 |
|
122 // From base class MMSEngineObserver |
|
123 |
|
124 /** |
|
125 * From MMSEngineObserver |
|
126 * See base class definition |
|
127 */ |
|
128 void ReadyL( TCmService aService, TInt aError ); |
|
129 |
|
130 private: |
|
131 |
|
132 /** |
|
133 * Performs the second phase construction. |
|
134 * |
|
135 * @since S60 5.1 |
|
136 * @param aResourceId, settinglist resource id |
|
137 * @return None |
|
138 */ |
|
139 void ConstructL( TInt aResourceId ); |
|
140 |
|
141 /** |
|
142 * Performs the first phase of two phase construction. |
|
143 * |
|
144 * @since S60 5.1 |
|
145 * @param aAppUi, application UI |
|
146 * @param aView, store settings view |
|
147 * @return None |
|
148 */ |
|
149 CMSStoreSettingsList( CMSAppUi& aAppUi, CMSStoreSettingsView& aView ); |
|
150 |
|
151 /** |
|
152 * Reads rule status |
|
153 * @since S60 5.1 |
|
154 */ |
|
155 void ReadRuleStatus(); |
|
156 |
|
157 /** |
|
158 * Saves 'keep on phone' setting to rule |
|
159 * @since S60 5.1 |
|
160 */ |
|
161 void SaveKeepOnPhoneSetting(); |
|
162 |
|
163 /** |
|
164 * Sets title pane text accordin to media type |
|
165 * @since S60 5.1 |
|
166 */ |
|
167 void SetTitlePaneTextL(); |
|
168 |
|
169 private: |
|
170 |
|
171 /** |
|
172 * pointer to AppUi object |
|
173 */ |
|
174 CMSAppUi& iAppUi; // not owned |
|
175 /** |
|
176 * dummy text needed by CAknTextSettingItem |
|
177 */ |
|
178 TBuf<KMaxFileName> iDummyText; |
|
179 /** |
|
180 * All store rules |
|
181 */ |
|
182 CCmStoreRuleContainer* iStoreRuleContainer; // not owned |
|
183 /** |
|
184 * Store rule |
|
185 */ |
|
186 CCmStoreRule* iStoreRule; // not owned |
|
187 /** |
|
188 * Keep on phone setting |
|
189 */ |
|
190 TInt iKeepOnPhone; |
|
191 /** |
|
192 * Media type |
|
193 */ |
|
194 TCmMediaType iMediaType; |
|
195 /** |
|
196 * Wait note |
|
197 */ |
|
198 CAknWaitDialog* iWaitNoteDialog;// owned |
|
199 /** |
|
200 * Parent view |
|
201 */ |
|
202 CMSStoreSettingsView& iView; |
|
203 }; |
|
204 |
|
205 #endif // C_MSSTORESETTINGSLIST_H |
|
206 |
|
207 // End of File |
|