|
1 /* |
|
2 * Copyright (c) 2009 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 * |
|
16 */ |
|
17 |
|
18 // INCLUDE FILES |
|
19 #include "sipsettingsplugin.h" |
|
20 |
|
21 // Constants |
|
22 //const TUid KGSSIPSettingsPluginUID = { 0x101FD6D0 }; //SIP Settings ECom plug-in uid |
|
23 const TInt KGSPluginProviderInternal = 87329234; |
|
24 |
|
25 TInt gEditProfileLInvokedTimes = 0; |
|
26 TInt gDeleteProfileLInvokedTimes = 0; |
|
27 TInt gChangeDefaultProfileLInvokedTimes = 0; |
|
28 TInt gHandleCommandLInvokedTimes = 0; |
|
29 |
|
30 |
|
31 // ============================ MEMBER FUNCTIONS =============================== |
|
32 |
|
33 // ----------------------------------------------------------------------------- |
|
34 // CSIPSettingsPlugin::CSIPSettingsPlugin |
|
35 // C++ default constructor can NOT contain any code, that |
|
36 // might leave. |
|
37 // ----------------------------------------------------------------------------- |
|
38 // |
|
39 CSIPSettingsPlugin::CSIPSettingsPlugin() |
|
40 : iResourceLoader( *iCoeEnv ), iMskCommandFlag(ETrue) |
|
41 { |
|
42 |
|
43 } |
|
44 |
|
45 // --------------------------------------------------------------------------- |
|
46 // CSIPSettingsPlugin::~CSIPSettingsPlugin() |
|
47 // Destructor |
|
48 // |
|
49 // --------------------------------------------------------------------------- |
|
50 // |
|
51 CSIPSettingsPlugin::~CSIPSettingsPlugin() |
|
52 { |
|
53 } |
|
54 |
|
55 // ----------------------------------------------------------------------------- |
|
56 // When this method is called, view checks based on highlight focus, if the MSK |
|
57 // label is correct. |
|
58 // ----------------------------------------------------------------------------- |
|
59 // |
|
60 void CSIPSettingsPlugin::CheckMiddleSoftkeyLabelL() |
|
61 { |
|
62 } |
|
63 |
|
64 // ----------------------------------------------------------------------------- |
|
65 // Remove unnecessary commands from Middle softkey. |
|
66 // @flag = ETrue means presently MSK value is "Change" so we remove that |
|
67 // @flag = EFalse means presently no MSK value is currently on |
|
68 // ----------------------------------------------------------------------------- |
|
69 // |
|
70 void CSIPSettingsPlugin::RemoveCommandFromMSK(const TBool /*flag*/ ) |
|
71 { |
|
72 } |
|
73 |
|
74 // --------------------------------------------------------------------------- |
|
75 // Sets middle softkey label. |
|
76 // --------------------------------------------------------------------------- |
|
77 // |
|
78 void CSIPSettingsPlugin::SetMiddleSoftKeyLabelL( |
|
79 const TInt /*aResourceId*/, const TInt /*aCommandId*/ ) |
|
80 { |
|
81 } |
|
82 |
|
83 // --------------------------------------------------------------------------- |
|
84 // CSIPSettingsPlugin::ConstructL(const TRect& aRect) |
|
85 // Symbian OS two-phased constructor |
|
86 // (other items were commented in a header). |
|
87 // --------------------------------------------------------------------------- |
|
88 // |
|
89 void CSIPSettingsPlugin::ConstructL() |
|
90 { |
|
91 } |
|
92 |
|
93 // ----------------------------------------------------------------------------- |
|
94 // CSIPSettingsPlugin::NewL |
|
95 // Static constructor |
|
96 // ----------------------------------------------------------------------------- |
|
97 // |
|
98 CSIPSettingsPlugin* CSIPSettingsPlugin::NewL( TAny* /*aInitParams*/ ) |
|
99 { |
|
100 CSIPSettingsPlugin* self = |
|
101 new ( ELeave ) CSIPSettingsPlugin( ); |
|
102 |
|
103 CleanupStack::PushL( self ); |
|
104 self->ConstructL(); |
|
105 CleanupStack::Pop(self); |
|
106 return self; |
|
107 } |
|
108 |
|
109 // ----------------------------------------------------------------------------- |
|
110 // CSIPSettingsPlugin::Id |
|
111 // |
|
112 // Returns the UID of the view |
|
113 // ----------------------------------------------------------------------------- |
|
114 // |
|
115 TUid CSIPSettingsPlugin::Id() const |
|
116 { |
|
117 return KGSSIPSettingsPluginUID; |
|
118 } |
|
119 |
|
120 // ----------------------------------------------------------------------------- |
|
121 // CSIPSettingsPlugin::HandleClientRectChange |
|
122 // |
|
123 // ----------------------------------------------------------------------------- |
|
124 // |
|
125 void CSIPSettingsPlugin::HandleClientRectChange() |
|
126 { |
|
127 } |
|
128 |
|
129 |
|
130 // ----------------------------------------------------------------------------- |
|
131 // CSIPSettListSIPProfListView::DoActivateL() |
|
132 // Activates the view, creates View and Model |
|
133 // ----------------------------------------------------------------------------- |
|
134 // |
|
135 void CSIPSettingsPlugin::DoActivateL( |
|
136 const TVwsViewId& /*aPrevViewId*/, |
|
137 TUid /*aCustomMessageId*/, |
|
138 const TDesC8& /*aCustomMessage*/ ) |
|
139 { |
|
140 } |
|
141 |
|
142 // ----------------------------------------------------------------------------- |
|
143 // CSIPSettingsPlugin::DoDeactivate() |
|
144 // Deactivates the view |
|
145 // ----------------------------------------------------------------------------- |
|
146 // |
|
147 void CSIPSettingsPlugin::DoDeactivate() |
|
148 { |
|
149 } |
|
150 |
|
151 // ----------------------------------------------------------------------------- |
|
152 // CSIPSettingsPlugin::HandleCommandL |
|
153 // Handles the user interaction |
|
154 // ----------------------------------------------------------------------------- |
|
155 // |
|
156 void CSIPSettingsPlugin::HandleCommandL( TInt /*aCommand*/ ) |
|
157 { |
|
158 gHandleCommandLInvokedTimes++; |
|
159 } |
|
160 |
|
161 // ========================= From CGSPluginInterface ================== |
|
162 |
|
163 // ----------------------------------------------------------------------------- |
|
164 // CSIPSettingsPlugin::GetCaptionL |
|
165 // |
|
166 // Method for getting caption of this plugin. This should be the |
|
167 // localized name of the settings view to be shown in parent view. |
|
168 // ----------------------------------------------------------------------------- |
|
169 // |
|
170 void CSIPSettingsPlugin::GetCaptionL( TDes& /*aCaption*/ ) const |
|
171 { |
|
172 } |
|
173 |
|
174 // ----------------------------------------------------------------------------- |
|
175 // CSIPSettingsPlugin::PluginProviderCategory |
|
176 // Method for reading the ID of the plugin provider category. |
|
177 // ----------------------------------------------------------------------------- |
|
178 // |
|
179 TInt CSIPSettingsPlugin::PluginProviderCategory() const |
|
180 { |
|
181 return KGSPluginProviderInternal; |
|
182 } |
|
183 |
|
184 // --------------------------------------------------------------------------- |
|
185 // CSIPSettingsPlugin::CreateIconL |
|
186 // |
|
187 // Return the icon, if has one. |
|
188 // --------------------------------------------------------------------------- |
|
189 // |
|
190 CGulIcon* CSIPSettingsPlugin::CreateIconL( const TUid /*aIconType*/ ) |
|
191 { |
|
192 //EMbm<Mbm_file_name><Bitmap_name> |
|
193 CGulIcon* icon = NULL; |
|
194 return icon; |
|
195 } |
|
196 |
|
197 // ========================= MEikMenuObserver ================================= |
|
198 |
|
199 // ----------------------------------------------------------------------------- |
|
200 // CSIPSettingsPlugin::HandleListBoxEventL |
|
201 // Handles the list box events |
|
202 // ----------------------------------------------------------------------------- |
|
203 // |
|
204 void CSIPSettingsPlugin::HandleListBoxEventL( |
|
205 CEikListBox* /*aListBox*/, |
|
206 TListBoxEvent /*aEventType*/ ) |
|
207 { |
|
208 } |
|
209 |
|
210 // ----------------------------------------------------------------------------- |
|
211 // CSIPSettingsPlugin::ChangeDefaultProfileL |
|
212 // Shows the pop-up list for changing the default profile |
|
213 // ----------------------------------------------------------------------------- |
|
214 // |
|
215 void CSIPSettingsPlugin::ChangeDefaultProfileL() |
|
216 { |
|
217 gChangeDefaultProfileLInvokedTimes++; |
|
218 } |
|
219 |
|
220 // ----------------------------------------------------------------------------- |
|
221 // CSIPSettingsPlugin::CreateFromExistingProfileL |
|
222 // Shows pop-up list for user to choose the cloned profile |
|
223 // ----------------------------------------------------------------------------- |
|
224 // |
|
225 void CSIPSettingsPlugin::CreateFromExisitingProfileL() |
|
226 { |
|
227 } |
|
228 |
|
229 // ----------------------------------------------------------------------------- |
|
230 // CSIPSettingsPlugin::CreatePopupListL |
|
231 // Creates pop-up list for choosing the cloned profile |
|
232 // ----------------------------------------------------------------------------- |
|
233 // |
|
234 CAknPopupList* CSIPSettingsPlugin::CreatePopupListL( |
|
235 CEikFormattedCellListBox* /*aListBox*/ ) |
|
236 { |
|
237 // Create and initialize the popup list |
|
238 CAknPopupList* popupList = NULL; |
|
239 |
|
240 return popupList; |
|
241 } |
|
242 |
|
243 // ----------------------------------------------------------------------------- |
|
244 // CSIPSettingsPlugin::CreateNewProfileL |
|
245 // Creates a new profile and changes the view to another |
|
246 // ----------------------------------------------------------------------------- |
|
247 // |
|
248 void CSIPSettingsPlugin::CreateNewProfileL( |
|
249 TInt /*aIndex*/ ) |
|
250 { |
|
251 } |
|
252 |
|
253 // ----------------------------------------------------------------------------- |
|
254 // CSIPSettListSIPProfListView::DeleteProfileL |
|
255 // Confirms from the user and then deletes the profile |
|
256 // ----------------------------------------------------------------------------- |
|
257 // |
|
258 void CSIPSettingsPlugin::DeleteProfileL() |
|
259 { |
|
260 gDeleteProfileLInvokedTimes++; |
|
261 } |
|
262 |
|
263 // ----------------------------------------------------------------------------- |
|
264 // CSIPSettingsPlugin::EditProfileL |
|
265 // Edits existing profile |
|
266 // ----------------------------------------------------------------------------- |
|
267 // |
|
268 void CSIPSettingsPlugin::EditProfileL() |
|
269 { |
|
270 gEditProfileLInvokedTimes++; |
|
271 } |
|
272 |
|
273 // ----------------------------------------------------------------------------- |
|
274 // CSIPSettListSIPProfListView::DynInitMenuPaneL |
|
275 // Initializes the menu dynamically before it is shown to the user |
|
276 // ----------------------------------------------------------------------------- |
|
277 // |
|
278 void CSIPSettingsPlugin::DynInitMenuPaneL( |
|
279 TInt /*aResourceId*/, |
|
280 CEikMenuPane* /*aMenuPane*/ ) |
|
281 { |
|
282 } |
|
283 |
|
284 // End of File |
|
285 |