|
1 /* |
|
2 * Copyright (c) 2006 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: |
|
15 * Header file for CAPControlListPlugin class. |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef APCONTROLLIST_PLUGIN_H__ |
|
20 #define APCONTROLLIST_PLUGIN_H__ |
|
21 |
|
22 // System includes |
|
23 #include <eikclb.h> |
|
24 #include <gsplugininterface.h> |
|
25 #include <ConeResLoader.h> |
|
26 |
|
27 // This UID is used for both the view UID and the ECOM plugin implementation UID. |
|
28 const TUid KAPControlListPluginUid = { 0x10281BB5 }; |
|
29 |
|
30 |
|
31 // Forward declarations |
|
32 class CAPControlListPluginContainer; |
|
33 class CAPControlListAPIWrapper; |
|
34 class MUiRunnerObserver; |
|
35 class MEikListBoxObserver; |
|
36 class CAPControlListCapsChange; |
|
37 |
|
38 /** |
|
39 * Interface class for AP Settings Handler UI. |
|
40 */ |
|
41 class CAPControlListPlugin : public CGSPluginInterface, |
|
42 public MEikListBoxObserver |
|
43 { |
|
44 public://Constructors & destructors |
|
45 |
|
46 /** |
|
47 * First phase constructor |
|
48 * Creates new Plugin and Launches CAPControlListPlugin |
|
49 * with default parameters |
|
50 * @param aAppUi pointer to the application Ui |
|
51 */ |
|
52 static CAPControlListPlugin* NewL( TAny* aInitParams ); |
|
53 |
|
54 /** |
|
55 * Destructor |
|
56 */ |
|
57 inline ~CAPControlListPlugin(); |
|
58 |
|
59 public: // Functions from base class |
|
60 |
|
61 /** |
|
62 * From CAknView |
|
63 */ |
|
64 TUid Id() const; |
|
65 |
|
66 /** |
|
67 * From CAknView |
|
68 */ |
|
69 void HandleCommandL( TInt aCommand ); |
|
70 |
|
71 /** |
|
72 * From CAknView |
|
73 */ |
|
74 void DoActivateL( const TVwsViewId& aPrevViewId, |
|
75 TUid aCustomMessageId, |
|
76 const TDesC8& aCustomMessage ); |
|
77 |
|
78 /** |
|
79 * From CAknView |
|
80 */ |
|
81 void DoDeactivate(); |
|
82 |
|
83 /** |
|
84 * Exit plugin |
|
85 */ |
|
86 void ExitOnUSIMRemovalL(); |
|
87 |
|
88 |
|
89 public: |
|
90 |
|
91 /** |
|
92 * from CGSPluginInterface |
|
93 */ |
|
94 |
|
95 /** |
|
96 * Method for checking plugin's Uid. Uid identifies this GS plugin. Use |
|
97 * same Uid as the ECOM plugin implementation Uid. |
|
98 * |
|
99 * @return PluginUid |
|
100 */ |
|
101 TUid PluginUid() const; |
|
102 |
|
103 /** |
|
104 * Method for getting caption of this plugin. This should be the |
|
105 * localized name of the settings view to be shown in parent view. |
|
106 * |
|
107 * @param aCaption pointer to Caption variable |
|
108 */ |
|
109 void GetCaptionL( TDes& aCaption ) const; |
|
110 |
|
111 /** |
|
112 * Method for checking, if item has bitmap icon to be shown in list |
|
113 * |
|
114 * @return ETrue if plugin has icon bitmap |
|
115 * @return EFalse if plugin does not have a bitmap |
|
116 */ |
|
117 TBool HasBitmap() const; |
|
118 |
|
119 /** |
|
120 * Method for reading bitmap icon. |
|
121 * |
|
122 * @param aBitmap plugin bitmap |
|
123 * @param aMask plugin icon bitmap mask |
|
124 */ |
|
125 void GetBitmapL( CFbsBitmap* aBitmap, CFbsBitmap* aMask ) const; |
|
126 |
|
127 /** |
|
128 * Method for reading the ID of the plugin provider category. See |
|
129 * |
|
130 * @return Plugin provider category ID defined by |
|
131 * |
|
132 */ |
|
133 TInt PluginProviderCategory() const; |
|
134 |
|
135 /** |
|
136 * Creates a new icon of desired type. Override this to provide custom |
|
137 * icons. Othervise default icon is used. Ownership of the created icon |
|
138 * is transferred to the caller. |
|
139 * |
|
140 * Icon type UIDs (use these defined constants): |
|
141 * KGSIconTypeLbxItem - ListBox item icon. |
|
142 * KGSIconTypeTab - Tab icon. |
|
143 * |
|
144 * @param aIconType UID Icon type UID of the icon to be created. |
|
145 * @return Pointer of the icon. NOTE: Ownership of this icon is |
|
146 * transferred to the caller. |
|
147 */ |
|
148 CGulIcon* CreateIconL( const TUid aIconType ); |
|
149 |
|
150 /** |
|
151 * Method for checking, if plugin should be visible and used in GS FW. |
|
152 * (for example shown in listbox of the parent view). |
|
153 * |
|
154 * On default plugin is visible. Overwrite this function to enable or |
|
155 * disable your plugin dynamically. |
|
156 * |
|
157 * @return ETrue if plugin should be visible in GS. |
|
158 * @return EFalse if plugin should not be visible in GS. |
|
159 */ |
|
160 virtual TBool Visible() const; |
|
161 |
|
162 /** |
|
163 * From MUiRunnerObserver |
|
164 */ |
|
165 void UiComplete( TInt aUirEvent ); |
|
166 |
|
167 /** |
|
168 * From MEikListBoxObserver |
|
169 */ |
|
170 void HandleListBoxEventL( CEikListBox* aListBox, |
|
171 TListBoxEvent aEventType ); |
|
172 |
|
173 /** |
|
174 * Shows a information note. |
|
175 * @param aResourceId Resource id of the showed text . |
|
176 */ |
|
177 void ShowInfoNoteL( TInt aResourceId ); |
|
178 |
|
179 /** |
|
180 * Shows a confirmation note. |
|
181 * @param aResourceId Resource id of the showed text . |
|
182 */ |
|
183 void ShowConfirmNoteL( TInt aResourceId ); |
|
184 |
|
185 /** |
|
186 * Shows a confirmation note. |
|
187 * @param aResourceId Resource id of the showed text . |
|
188 */ |
|
189 void ShowConfirmNoteAPNL( TInt aResourceId, TPtrC& aAPN ); |
|
190 |
|
191 /** |
|
192 * Init menu pane |
|
193 */ |
|
194 virtual void DynInitMenuPaneL( TInt aResourceId, |
|
195 CEikMenuPane* aMenuPane ); |
|
196 |
|
197 /** |
|
198 * Method for getting the container |
|
199 * |
|
200 * @return the container |
|
201 * |
|
202 */ |
|
203 CAPControlListPluginContainer* Container(); |
|
204 |
|
205 /** |
|
206 * Method for getting the APIWrapper |
|
207 * |
|
208 * @return the APIWrapper |
|
209 * |
|
210 */ |
|
211 CAPControlListAPIWrapper* APIWrapper(); |
|
212 |
|
213 protected: |
|
214 |
|
215 /** |
|
216 * Constructor |
|
217 */ |
|
218 CAPControlListPlugin(); |
|
219 |
|
220 private: |
|
221 |
|
222 /** |
|
223 * Second phase constructor |
|
224 */ |
|
225 TAny ConstructL(); |
|
226 |
|
227 |
|
228 private: //data |
|
229 |
|
230 //@var pointer to the container - owned |
|
231 CAPControlListPluginContainer* iContainer; |
|
232 |
|
233 //@var Previous view. |
|
234 TVwsViewId iPrevViewId; |
|
235 |
|
236 //@var resource loader |
|
237 RConeResourceLoader iResources; |
|
238 |
|
239 //@var should the plugin should be visible and used in |
|
240 // the Connection settings. |
|
241 TBool iVisible; |
|
242 |
|
243 //@var class for wrapping asyncron API calls - owned |
|
244 CAPControlListAPIWrapper* iAPIWrapper; |
|
245 |
|
246 //@var Wrapper class for asyncron syncron API call |
|
247 //NotifyIccAccessCapsChange - owned |
|
248 CAPControlListCapsChange* iChangeNotifier; |
|
249 |
|
250 // for the FeatureManager |
|
251 TBool iHelp; |
|
252 }; |
|
253 |
|
254 #endif //APCONTROLLIST_PLUGIN_H__ |
|
255 |
|
256 //End of file |