|
1 /* |
|
2 * Copyright (c) 2005 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 the License "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: Video Plugin sub-menu in General Settings.* |
|
15 */ |
|
16 |
|
17 |
|
18 // Version : %version: 4 % |
|
19 |
|
20 |
|
21 |
|
22 #ifndef CGSVIDEOPLUGIN_H |
|
23 #define CGSVIDEOPLUGIN_H |
|
24 |
|
25 // INCLUDES |
|
26 #include <gsplugininterface.h> |
|
27 #include <aknview.h> |
|
28 #include <ConeResLoader.h> |
|
29 #include <gsfwviewuids.h> |
|
30 |
|
31 // Move to CPP file |
|
32 #include <gsbaseview.h> |
|
33 |
|
34 // FORWARD DECLARATIONS |
|
35 class CAknNavigationDecorator; |
|
36 class CMPSettingsMainView; |
|
37 class CAknViewAppUi; |
|
38 class CMPSettingsBaseContainer; |
|
39 class CMPSettingsMainContainer; |
|
40 class CAknView; |
|
41 class CGulIcon; |
|
42 class CGSTabHelper; |
|
43 class CMPSettingsModelForROP; |
|
44 |
|
45 class MGSTabbedView; |
|
46 |
|
47 // Constants |
|
48 _LIT( KGSVideoPluginResourceFileName, "z:mediasettings.rsc" ); |
|
49 _LIT( KGSVideoPluginIconFileName, "\\resource\\apps\\mediasettings.mif"); |
|
50 _LIT( KGSDoActivateError, "DoActivateL" ); |
|
51 |
|
52 enum KGSMediaSettingsListViewIndex |
|
53 { |
|
54 EGSMediaSettingsVideoIndex = 0, |
|
55 EGSMediaSettingsStreamingIndex = 1 |
|
56 }; |
|
57 |
|
58 |
|
59 // CLASS DECLARATION |
|
60 /** |
|
61 * CGSVideoPlugin class |
|
62 */ |
|
63 class CGSVideoPlugin : public CGSBaseView |
|
64 { |
|
65 public: // Constructor and destructor |
|
66 |
|
67 enum KGSViewPanicCodes |
|
68 { |
|
69 EGSViewPanicNullPtr = 1 |
|
70 }; |
|
71 |
|
72 /* Symbian OS two-phase Constructor |
|
73 * |
|
74 * @return pointer to CGSVideoPlugin object |
|
75 */ |
|
76 static CGSVideoPlugin* NewL( /* TAny* aInitParams */); |
|
77 |
|
78 /** |
|
79 * Destructor. |
|
80 */ |
|
81 ~CGSVideoPlugin(); |
|
82 |
|
83 public: // Functions from base classes |
|
84 |
|
85 /** |
|
86 * From CAknView, returns the views id. |
|
87 * |
|
88 * @return Returns id of the view. |
|
89 */ |
|
90 TUid Id() const; |
|
91 |
|
92 /** |
|
93 * From MEikCommandObserver, handles the menu based commands. |
|
94 * |
|
95 * @param aCommand identifies the given command. |
|
96 */ |
|
97 void HandleCommandL( TInt aCommand ); |
|
98 |
|
99 /** |
|
100 * Updates specific value to container |
|
101 * @param aListItem item index to update |
|
102 * @param aNewValue new value for the setting |
|
103 */ |
|
104 void UpdateListBoxL( const TInt& aListItem, TInt aNewValue ); |
|
105 |
|
106 /** |
|
107 * See base class. |
|
108 */ |
|
109 void ResetSelectedItemIndex(); |
|
110 |
|
111 /** |
|
112 * See base class. |
|
113 */ |
|
114 void SetCurrentItem( TInt aIndex ); |
|
115 |
|
116 |
|
117 public: // From CGSPluginInterface - See CGSPluginInterface header file. |
|
118 |
|
119 /** |
|
120 * Method for getting caption of this plugin. This should be the |
|
121 * localized name of the settings view to be shown in parent view. |
|
122 * @param aCaption pointer to Caption variable |
|
123 * @since 3.1 |
|
124 */ |
|
125 void GetCaptionL( TDes& aCaption ) const; |
|
126 |
|
127 /** |
|
128 * Creates a new icon of desired type. Override this to provide custom |
|
129 * icons. Othervise default icon is used. Ownership of the created icon |
|
130 * is transferred to the caller. |
|
131 * |
|
132 * Icon type UIDs (use these defined constants): |
|
133 * KGSIconTypeLbxItem - ListBox item icon. |
|
134 * KGSIconTypeTab - Tab icon. |
|
135 * |
|
136 * @param aIconType UID Icon type UID of the icon to be created. |
|
137 * @return Pointer of the icon. NOTE: Ownership of this icon is |
|
138 * transferred to the caller. |
|
139 * @since 3.1 |
|
140 */ |
|
141 CGulIcon* CreateIconL( const TUid aIconType ); |
|
142 |
|
143 /** |
|
144 * Method for reading the ID of the plugin provider category. See |
|
145 * TGSPluginProviderCategory. PluginProviderCategory can be used for |
|
146 * sorting plugins. |
|
147 * |
|
148 * Default value is EGSPluginProvider3rdParty. Override this function |
|
149 * to change the category. |
|
150 * |
|
151 * @return Plugin provider category ID defined by |
|
152 * TGSPluginProviderCategory |
|
153 * @since 3.1 |
|
154 */ |
|
155 TInt PluginProviderCategory() const; |
|
156 |
|
157 /** |
|
158 * From CEikAppUi |
|
159 * Handle skin change event. |
|
160 * @since 3.1 |
|
161 */ |
|
162 void HandleClientRectChange(); |
|
163 |
|
164 /** |
|
165 * From MGSTabbedView |
|
166 * @return Reference to owned tabbed views which should be included in |
|
167 * the sub-view's tab group. |
|
168 * @since 3.1 |
|
169 */ |
|
170 CArrayPtrFlat<MGSTabbedView>* TabbedViews(); |
|
171 |
|
172 /** |
|
173 * From MEikMenuObserver Dynamically customize menu items |
|
174 * @param aResourceId Menu pane resource ID |
|
175 * @param aMenuPane Menu pane pointer |
|
176 */ |
|
177 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
178 |
|
179 |
|
180 public: |
|
181 |
|
182 /** |
|
183 * Get CGSVideoPlugin's container. |
|
184 */ |
|
185 CMPSettingsMainContainer* Container(); |
|
186 |
|
187 void CreateContainerL(); |
|
188 |
|
189 /** |
|
190 * Search drives to locate Resource and Bitmap files |
|
191 * @since 3.2 |
|
192 */ |
|
193 void LocateFilePathL( TFileName& aFileName, TBool aBitmapFile = ETrue ); |
|
194 |
|
195 protected: // from CGSBaseView |
|
196 |
|
197 void NewContainerL(); |
|
198 |
|
199 void HandleListBoxSelectionL(); |
|
200 |
|
201 protected: // from CAknView |
|
202 |
|
203 void DoActivateL( const TVwsViewId& aPrevViewId, |
|
204 TUid /* aCustomMessageId */, |
|
205 const TDesC8& /* aCustomMessage */); |
|
206 |
|
207 void DoDeactivate(); |
|
208 |
|
209 protected: //new |
|
210 |
|
211 /** |
|
212 * Symbian OS default constructor. |
|
213 */ |
|
214 void ConstructL(); |
|
215 |
|
216 /** |
|
217 * C++ Constructor |
|
218 */ |
|
219 CGSVideoPlugin(); |
|
220 |
|
221 private: |
|
222 |
|
223 void CreateLocalViewsL(); |
|
224 |
|
225 |
|
226 private: |
|
227 |
|
228 // resource loader |
|
229 RConeResourceLoader iResources; |
|
230 |
|
231 CArrayFix<TUid>* iViewIds; |
|
232 CMPSettingsMainView* iMainView; |
|
233 CGSTabHelper* iTabHelper; |
|
234 CMPSettingsModelForROP* iModel; |
|
235 CMPSettingsBaseContainer* iContainer; |
|
236 RImplInfoPtrArray iImplInfoArray; |
|
237 TBool iConstructAsGsPlugin; |
|
238 CArrayPtrFlat<MGSTabbedView>* iViewArray; |
|
239 TVwsViewId iPrevViewId; // Previous view. |
|
240 |
|
241 }; |
|
242 |
|
243 |
|
244 #endif //CGSVIDEOPLUGIN_H |
|
245 |
|
246 // End of File |