|
1 /* |
|
2 * Copyright (c) 2006-2007 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: MUSSettingsPlugin implementation. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef C_MUSSETTINGSPLUGIN_H |
|
21 #define C_MUSSETTINGSPLUGIN_H |
|
22 |
|
23 |
|
24 #include <aknview.h> |
|
25 #include <ConeResLoader.h> |
|
26 #include <eikclb.h> |
|
27 #include <gsplugininterface.h> |
|
28 #include <gsbaseview.h> |
|
29 #include <disknotifyhandler.h> |
|
30 |
|
31 |
|
32 class CMusSettingsContainer; |
|
33 class CAknNavigationDecorator; |
|
34 class CAknViewAppUi; |
|
35 class CMusSettingsModel; |
|
36 class CMusSIPProfileModel; |
|
37 |
|
38 |
|
39 /** UID of *this* plugin. */ |
|
40 const TUid KGSVSSettingsPluginUID = { 0x1028238F }; |
|
41 |
|
42 /** VS resource filename. */ |
|
43 _LIT( KVSSettingsResourceFileName, "mussettingsuirsc.rsc" ); |
|
44 |
|
45 /** Name of icon of *this* plugin. Directory is KDC_BITMAP_DIR. */ |
|
46 _LIT( KGSVSSettingsPluginIconDirAndName, "mussettingsplugin.mif"); |
|
47 |
|
48 |
|
49 /** |
|
50 * CMusSettingsPlugin view class. |
|
51 * This class implements view of VS settings plugin. |
|
52 * |
|
53 * @since S60 v3.2 |
|
54 */ |
|
55 class CMusSettingsPlugin : public CGSBaseView, public MDiskNotifyHandlerCallback |
|
56 { |
|
57 public: |
|
58 |
|
59 /** |
|
60 * Two-phased constructor. |
|
61 * @param aInitParams Params from framework. Not used. |
|
62 * @return Newly created instance of CMusSettingsPlugin class. |
|
63 */ |
|
64 static CMusSettingsPlugin* NewL( TAny* aInitParams ); |
|
65 |
|
66 /** |
|
67 * Destructor. |
|
68 */ |
|
69 ~CMusSettingsPlugin(); |
|
70 |
|
71 /** |
|
72 * Returns CGSBaseContainer sub-class. |
|
73 * Hides non-virtual base class function. (PC-Lint warning #1511). |
|
74 * @return CGSBaseContainer sub-class. |
|
75 */ |
|
76 CMusSettingsContainer* Container(); |
|
77 |
|
78 public: // From CAknView. |
|
79 |
|
80 /** |
|
81 * From CAknView. |
|
82 * Returns views id. |
|
83 * @return id for this view. |
|
84 */ |
|
85 virtual TUid Id() const; |
|
86 |
|
87 /** |
|
88 * From CAknView. |
|
89 * Command handling function. Handles user initiated commands. |
|
90 * @param aCommand ID of the command to respond to. |
|
91 */ |
|
92 virtual void HandleCommandL( TInt aCommand ); |
|
93 |
|
94 public: // From CGSPluginInterface. |
|
95 |
|
96 /** |
|
97 * From CGSPluginInterface. |
|
98 * Method for getting caption of this plugin. This should be the |
|
99 * localized name of the settings view to be shown in parent view. |
|
100 * |
|
101 * @param aCaption Reference to descriptor to store caption. |
|
102 */ |
|
103 virtual void GetCaptionL( TDes& aCaption ) const; |
|
104 |
|
105 /** |
|
106 * From CGSPluginInterface. |
|
107 * Creates a new icon of desired type. Overrided to provide custom |
|
108 * icons. Ownership of the created icon is transferred to the caller. |
|
109 * |
|
110 * Icon type UIDs (use these defined constants): |
|
111 * KGSIconTypeLbxItem - ListBox item icon. |
|
112 * KGSIconTypeTab - Tab icon. |
|
113 * |
|
114 * @param aIconType UID Icon type UID of the icon to be created. |
|
115 * @return Pointer of the icon. NOTE: Ownership of this icon is |
|
116 * transferred to the caller. |
|
117 */ |
|
118 virtual CGulIcon* CreateIconL( const TUid aIconType ); |
|
119 |
|
120 /** |
|
121 * From CGSPluginInterface. |
|
122 * Method for reading the ID of the plugin provider category. See |
|
123 * TGSPluginProviderCategory. PluginProviderCategory is used for |
|
124 * sorting plugins. |
|
125 * |
|
126 * @return Plugin provider category ID defined in |
|
127 * TGSPluginProviderCategory. |
|
128 */ |
|
129 virtual TInt PluginProviderCategory() const; |
|
130 |
|
131 |
|
132 public: // From MEikMenuObserver |
|
133 |
|
134 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
135 |
|
136 public: // From observer interface |
|
137 void HandleNotifyDisk( TInt aError, const TDiskEvent& aEvent ); |
|
138 |
|
139 protected: |
|
140 |
|
141 CMusSettingsPlugin(); |
|
142 |
|
143 void ConstructL(); |
|
144 |
|
145 /** |
|
146 * Hides non-virtual member from base class CGSBaseView. |
|
147 * (PC-Lint warning #1511). |
|
148 * Handles a change in client rectangle. |
|
149 */ |
|
150 void HandleClientRectChange(); |
|
151 |
|
152 // from base class CAknView. |
|
153 |
|
154 /** |
|
155 * From CAknView. |
|
156 * Handles a view activation and passes the message of type |
|
157 * @c aCustomMessageId. This function is called by @c AknViewActivatedL(). |
|
158 * @param aPrevViewId Specifies the view previously active. |
|
159 * @param aCustomMessageId Specifies the message type. |
|
160 * @param aCustomMessage The activation message. |
|
161 */ |
|
162 virtual void DoActivateL( const TVwsViewId& aPrevViewId, |
|
163 TUid aCustomMessageId, |
|
164 const TDesC8& aCustomMessage ); |
|
165 |
|
166 /** |
|
167 * From CAknView. |
|
168 * This function is called by AknViewDeactivated() to indicate |
|
169 * deactivation of *this* view. |
|
170 */ |
|
171 virtual void DoDeactivate(); |
|
172 |
|
173 // from base class CGSBaseView. |
|
174 |
|
175 /** |
|
176 * From CGSBaseView. |
|
177 * Creates a container for *this* view. Called by DoActivateL(). |
|
178 */ |
|
179 virtual void NewContainerL(); |
|
180 |
|
181 private: |
|
182 |
|
183 /** |
|
184 * Shows VS activation Setting dialog. |
|
185 */ |
|
186 void ShowVSSettingsActivationSettingDialogL(); |
|
187 |
|
188 /** |
|
189 * Shows Operator specific VS activation Setting dialog. |
|
190 */ |
|
191 void ShowOperatorSpecificActivationSettingDialogL(); |
|
192 |
|
193 /** |
|
194 * Shows Profile Setting dialog. |
|
195 */ |
|
196 void ShowVSSettingsProfileSettingDialogL(); |
|
197 |
|
198 /** |
|
199 * Shows SIP profile selection dialog. |
|
200 */ |
|
201 void ShowVSSettingsSelectSipProfileDialogL(); |
|
202 |
|
203 /** |
|
204 * Shows Recorded Video Saving Setting dialog. |
|
205 */ |
|
206 void ShowVSSettingsRecordedVideoSavingSettingDialogL(); |
|
207 |
|
208 /** |
|
209 * Shows note setting dialog. In standard branch this is the "Capability |
|
210 * auditory note" setting and in operator variant this is the "Alerts" |
|
211 * setting displayed to user. |
|
212 */ |
|
213 void ShowVSSettingsNoteSettingDialogL(); |
|
214 |
|
215 /** |
|
216 * Shows notification of no profiles defined. |
|
217 */ |
|
218 void ShowNoProfilesNotificationL(); |
|
219 |
|
220 /** |
|
221 * Switches between two possible values from one to another. |
|
222 * Leaves with KErrArgument if setting is not recognised, otherwise |
|
223 * tries to toggle specified setting value and on failure leaves on |
|
224 * systemwide errorcode. |
|
225 * @param aValue Id of setting to toggle. |
|
226 */ |
|
227 void SwitchOnOffValueL( TInt aValue ); |
|
228 |
|
229 void ShowGlobalInformationDialogL( TInt aResourceId ); |
|
230 |
|
231 // from base class CGSBaseView. |
|
232 |
|
233 /** |
|
234 * From CGSBaseView. |
|
235 * Handles listbox selection. Called by HandleListBoxEventL. |
|
236 */ |
|
237 virtual void HandleListBoxSelectionL(); |
|
238 |
|
239 protected: // data |
|
240 |
|
241 /** |
|
242 * Instance of SIP profile handler to manage SIP profiles. |
|
243 * Own. |
|
244 */ |
|
245 CMusSIPProfileModel* iHandler; |
|
246 |
|
247 /** |
|
248 * Instance of SIP profile handler to manage SIP profiles. |
|
249 * Own. |
|
250 */ |
|
251 |
|
252 /** |
|
253 * Pointer of model class of this application. |
|
254 * Own. |
|
255 */ |
|
256 CMusSettingsModel* iModel; |
|
257 |
|
258 /** |
|
259 * Resource loader to load resources. |
|
260 */ |
|
261 RConeResourceLoader iResources; |
|
262 |
|
263 /** |
|
264 * Disk notify handler |
|
265 */ |
|
266 CDiskNotifyHandler* iDiskNotifyHandler; |
|
267 }; |
|
268 |
|
269 #endif // C_MUSSETTINGSPLUGIN_H |