|
1 /* |
|
2 * Copyright (c) 2003-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: Management UI Container |
|
15 * |
|
16 */ |
|
17 |
|
18 // INCLUDE FILES |
|
19 #include <eikclbd.h> |
|
20 #include <AknQueryDialog.h> |
|
21 #include <aknnotewrappers.h> |
|
22 #include <ErrorUI.h> |
|
23 #include <sysutil.h> |
|
24 #include <vpnmanagementuirsc.rsg> |
|
25 #include "vpnuiloader.h" |
|
26 #include "vpnmanagementuiservercontainer.h" |
|
27 #include "vpnmanagementuidefs.h" |
|
28 #include "vpnmanagementui.hrh" |
|
29 #include "log_vpnmanagementui.h" |
|
30 |
|
31 #ifdef __SERIES60_HELP |
|
32 #include <csxhelp/vpn.hlp.hrh> // for help context of VPN Management UI |
|
33 #endif //__SERIES60_HELP |
|
34 |
|
35 // ================= MEMBER FUNCTIONS ======================= |
|
36 |
|
37 // --------------------------------------------------------- |
|
38 // CVpnManagementUiServerContainer::CVpnManagementUiServerContainer( |
|
39 // CVpnManagementUiServerView& aParent, CVpnUiLoader& aLoader) |
|
40 // Constructor with parent |
|
41 // --------------------------------------------------------- |
|
42 // |
|
43 CVpnManagementUiServerContainer::CVpnManagementUiServerContainer( |
|
44 CVpnManagementUiServerView& aParent, CVpnUiLoader& aLoader ) : |
|
45 iParent ( aParent ), iLoader ( aLoader ) |
|
46 { |
|
47 } |
|
48 |
|
49 // --------------------------------------------------------- |
|
50 // CVpnManagementUiServerContainer::~CVpnManagementUiServerContainer() |
|
51 // Destructor |
|
52 // --------------------------------------------------------- |
|
53 // |
|
54 CVpnManagementUiServerContainer::~CVpnManagementUiServerContainer() |
|
55 { |
|
56 delete iListBox; |
|
57 } |
|
58 |
|
59 // --------------------------------------------------------- |
|
60 // CVpnManagementUiServerContainer::ConstructL( |
|
61 // const TRect& aRect, TInt& aCurrentPosition, TInt& aTopItem) |
|
62 // EPOC two phased constructor |
|
63 // --------------------------------------------------------- |
|
64 // |
|
65 void CVpnManagementUiServerContainer::ConstructL( |
|
66 const TRect& aRect, TInt& /*aCurrentPosition*/, TInt& /*aTopItem*/ ) |
|
67 { |
|
68 CreateWindowL(); |
|
69 CreateListBoxL(); |
|
70 ShowServersL(); |
|
71 if ((iListItemCount == 0) && (!iLoader.iBackFromServerDefinition)) |
|
72 { |
|
73 iLoader.iShowDefineQuery = ETrue; |
|
74 } |
|
75 iLoader.iBackFromServerDefinition = EFalse; |
|
76 iShowWaitNote = EFalse; |
|
77 SetRect( aRect ); |
|
78 } |
|
79 |
|
80 // --------------------------------------------------------- |
|
81 // CVpnManagementUiServerContainer::ActivateL() |
|
82 // called after the dialog is shown |
|
83 // used to handle empty list - query |
|
84 // --------------------------------------------------------- |
|
85 // |
|
86 void CVpnManagementUiServerContainer::ActivateL() |
|
87 { |
|
88 CCoeControl::ActivateL(); |
|
89 // put empty list checking & required actions here. |
|
90 if ((iListItemCount == 0) && (iLoader.iShowDefineQuery)) |
|
91 { |
|
92 HBufC* temp; |
|
93 temp = StringLoader::LoadLC( R_VPN_QUEST_DEFINE_NEW_SERVER ); |
|
94 CAknQueryDialog* query = CAknQueryDialog::NewL( |
|
95 CAknQueryDialog::EConfirmationTone ); |
|
96 TInt retval = query->ExecuteLD( R_CONFIRMATION_QUERY, *temp ); |
|
97 CleanupStack::PopAndDestroy(); // temp |
|
98 iLoader.iShowDefineQuery = EFalse; |
|
99 if ( retval ) |
|
100 { |
|
101 if (!SysUtil::FFSSpaceBelowCriticalLevelL(0, 0)) |
|
102 { |
|
103 iLoader.ChangeViewL(KChangeViewSettings); |
|
104 } |
|
105 else |
|
106 { |
|
107 CErrorUI* errorUi = CErrorUI::NewLC( *(CCoeEnv::Static()) ); |
|
108 errorUi->ShowGlobalErrorNoteL( KErrDiskFull ); |
|
109 CleanupStack::PopAndDestroy(); // errorUi |
|
110 iLoader.iShowDefineQuery = EFalse; |
|
111 iLoader.iNewServerDefinition = EFalse; |
|
112 } |
|
113 } |
|
114 } |
|
115 /*** NSSM support is discontinued. |
|
116 Code is kept in comments temporarily because similar UI functionality |
|
117 might be needed for another purpose. |
|
118 if (iLoader.iNewServerDefinition) |
|
119 {//Synchronise server query |
|
120 HBufC* temp; |
|
121 temp = StringLoader::LoadLC( R_VPN_QUEST_SYNCHRONISE_SERVER ); |
|
122 CAknQueryDialog* query = CAknQueryDialog::NewL( |
|
123 CAknQueryDialog::EConfirmationTone ); |
|
124 TInt retval = query->ExecuteLD( R_CONFIRMATION_QUERY, *temp ); |
|
125 CleanupStack::PopAndDestroy(); // temp |
|
126 if ( retval ) |
|
127 { |
|
128 //Show wait dialog |
|
129 //Save server index for Connecting via note |
|
130 iLoader.iCurrentServerIndex = iLoader.AcuApiWrapperL().GetLastCreatedServerIndexL(); |
|
131 //ShowWaitNoteL(); |
|
132 iShowWaitNote = ETrue; |
|
133 // Get selection name for connecting via note |
|
134 // and save it to the member variable of iLoader |
|
135 iLoader.GetSelectionNameL( iLoader.iSelectionName ); |
|
136 |
|
137 //Synchronise server |
|
138 iLoader.AcuApiWrapperL().SynchroniseLastCreatedServerL(this); |
|
139 |
|
140 //Set iNewServerDefinition to false, because |
|
141 //we are now synchronised server |
|
142 iLoader.iNewServerDefinition = EFalse; |
|
143 } |
|
144 } ***/ |
|
145 } |
|
146 |
|
147 |
|
148 // --------------------------------------------------------- |
|
149 // CVpnManagementUiServerContainer::SizeChanged() |
|
150 // Called by framework when the view size is changed |
|
151 // --------------------------------------------------------- |
|
152 // |
|
153 void CVpnManagementUiServerContainer::SizeChanged() |
|
154 { |
|
155 iListBox->SetRect(Rect()); |
|
156 } |
|
157 |
|
158 // --------------------------------------------------------- |
|
159 // CVpnManagementUiServerContainer::FocusChanged(TDrawNow aDrawNow) |
|
160 // --------------------------------------------------------- |
|
161 // |
|
162 void CVpnManagementUiServerContainer::FocusChanged(TDrawNow aDrawNow) |
|
163 { |
|
164 if ( iListBox ) |
|
165 { |
|
166 iListBox->SetFocus( IsFocused(), aDrawNow ); |
|
167 } |
|
168 } |
|
169 |
|
170 // --------------------------------------------------------- |
|
171 // CVpnManagementUiServerContainer::HandleResourceChange |
|
172 // --------------------------------------------------------- |
|
173 // |
|
174 void CVpnManagementUiServerContainer::HandleResourceChange( TInt aType ) |
|
175 { |
|
176 CCoeControl::HandleResourceChange(aType); |
|
177 |
|
178 //Handle change in layout orientation |
|
179 if (aType == KEikDynamicLayoutVariantSwitch || aType == KAknsMessageSkinChange ) |
|
180 { |
|
181 iListBox->HandleResourceChange(aType); |
|
182 TRect mainPaneRect; |
|
183 AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, mainPaneRect); |
|
184 SetRect(mainPaneRect); |
|
185 DrawNow(); |
|
186 } |
|
187 } |
|
188 |
|
189 enum { EListBoxControl, ENumberOfControls }; |
|
190 |
|
191 // --------------------------------------------------------- |
|
192 // CVpnManagementUiServerContainer::CountComponentControls() const |
|
193 // --------------------------------------------------------- |
|
194 // |
|
195 TInt CVpnManagementUiServerContainer::CountComponentControls() const |
|
196 { |
|
197 // return number of controls inside this container |
|
198 return ENumberOfControls; // return nbr of controls inside this container |
|
199 } |
|
200 |
|
201 // --------------------------------------------------------- |
|
202 // CVpnManagementUiServerContainer::ComponentControl(TInt aIndex) const |
|
203 // --------------------------------------------------------- |
|
204 // |
|
205 CCoeControl* CVpnManagementUiServerContainer::ComponentControl(TInt aIndex) const |
|
206 { |
|
207 switch ( aIndex ) |
|
208 { |
|
209 case 0: |
|
210 return iListBox; |
|
211 default: |
|
212 return NULL; |
|
213 } |
|
214 } |
|
215 |
|
216 // --------------------------------------------------------- |
|
217 // CVpnManagementUiServerContainer::HandleControlEventL( |
|
218 // CCoeControl* /*aControl*/,TCoeEvent /*aEventType*/) |
|
219 // Cannot be changed to non-leaving function. |
|
220 // L-function is required by the class definition, even if empty. |
|
221 // --------------------------------------------------------- |
|
222 // |
|
223 void CVpnManagementUiServerContainer::HandleControlEventL( |
|
224 CCoeControl* /*aControl*/,TCoeEvent /*aEventType*/) |
|
225 { |
|
226 } |
|
227 |
|
228 // --------------------------------------------------------- |
|
229 // CVpnManagementUiServerContainer::OfferKeyEventL( |
|
230 // const TKeyEvent& aKeyEvent, TEventCode aType) |
|
231 // Handles the key events OK button, arrow keys, delete key. |
|
232 // OK button functionality is different depending on the number of marked items |
|
233 // in the list; zero marked -> show details view, one or more marked -> show |
|
234 // OKOptions list, list empty -> OK inactive. |
|
235 // Delete active only if list not empty. |
|
236 // --------------------------------------------------------- |
|
237 // |
|
238 TKeyResponse CVpnManagementUiServerContainer::OfferKeyEventL( |
|
239 const TKeyEvent& aKeyEvent, TEventCode aType) |
|
240 { |
|
241 TKeyResponse retval = EKeyWasNotConsumed; |
|
242 if ( aType==EEventKey ) |
|
243 { |
|
244 if ( (aKeyEvent.iCode == EKeyOK || aKeyEvent.iCode == EKeyEnter) && //select or enter |
|
245 iListBox->CurrentItemIndex() > -1 ) //This is for empty list |
|
246 { |
|
247 // Selection key pressed |
|
248 iParent.HandleCommandL( EVpnUiCmdEditServer ); |
|
249 retval = EKeyWasConsumed; |
|
250 } |
|
251 |
|
252 else if ( aKeyEvent.iCode == EKeyDelete |
|
253 || aKeyEvent.iCode == EKeyBackspace ) |
|
254 { |
|
255 if ( iListBox->CurrentItemIndex() > -1 ) |
|
256 { |
|
257 iParent.HandleCommandL( EVpnUiCmdDeleteServer ); |
|
258 retval = EKeyWasConsumed; |
|
259 } |
|
260 } |
|
261 else |
|
262 { |
|
263 retval = iListBox->OfferKeyEventL( aKeyEvent, aType ); |
|
264 } |
|
265 } |
|
266 else |
|
267 { |
|
268 retval = iListBox->OfferKeyEventL( aKeyEvent, aType ); |
|
269 } |
|
270 return retval; |
|
271 } |
|
272 |
|
273 // --------------------------------------------------------- |
|
274 // CVpnManagementUiServerContainer::CreateListBoxL() |
|
275 // Creates listbox, sets empty listbox text. |
|
276 // --------------------------------------------------------- |
|
277 // |
|
278 void CVpnManagementUiServerContainer::CreateListBoxL() |
|
279 { |
|
280 iListBox = new( ELeave ) CAknSingleStyleListBox; |
|
281 iListBox->SetContainerWindowL( *this ); |
|
282 iListBox->ConstructL( this, EAknListBoxMarkableList ); |
|
283 iListBox->CreateScrollBarFrameL( ETrue ); |
|
284 iListBox->ScrollBarFrame()-> |
|
285 SetScrollBarVisibilityL( CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto ); |
|
286 |
|
287 HBufC* stringHolder = StringLoader::LoadLC( R_VPN_POLICY_SERVERS_EMPTY ); |
|
288 iListBox->View()->SetListEmptyTextL( *stringHolder ); |
|
289 CleanupStack::PopAndDestroy(); // stringHolder |
|
290 |
|
291 iListBox->SetListBoxObserver (this); |
|
292 } |
|
293 |
|
294 // --------------------------------------------------------- |
|
295 // CVpnManagementUiServerContainer::DrawListBoxL(TInt aCurrentPosition, TInt aTopItem) |
|
296 // Draws listbox, fetches graphic icons for markable list |
|
297 // --------------------------------------------------------- |
|
298 // |
|
299 void CVpnManagementUiServerContainer::DrawListBoxL( TInt aCurrentPosition, TInt aTopItem ) |
|
300 { |
|
301 if (aCurrentPosition >= 0) |
|
302 { |
|
303 iListBox->SetTopItemIndex( aTopItem ); |
|
304 iListBox->SetCurrentItemIndex( aCurrentPosition ); |
|
305 } |
|
306 /*** NSSM support is discontinued. |
|
307 Code is kept in comments temporarily because similar UI functionality |
|
308 might be needed for another purpose. |
|
309 if(iLoader.iNewServerDefinition) |
|
310 { |
|
311 iListBox->SetCurrentItemIndex(iLoader.AcuApiWrapperL().GetLastCreatedServerIndexL()); |
|
312 } ***/ |
|
313 |
|
314 ActivateL(); |
|
315 DrawNow(); |
|
316 } |
|
317 |
|
318 // --------------------------------------------------------- |
|
319 // CVpnManagementUiServerContainer::UpdateListBoxL(TInt& aCurrentPosition) |
|
320 // Refresh listbox after VPN policy server deletion. |
|
321 // --------------------------------------------------------- |
|
322 // |
|
323 void CVpnManagementUiServerContainer::UpdateListBoxL(TInt& aCurrentPosition) |
|
324 { |
|
325 MDesCArray* itemList = iListBox->Model()->ItemTextArray(); |
|
326 CDesCArray* itemArray = ( CDesCArray* )itemList; |
|
327 |
|
328 itemArray->Delete(aCurrentPosition); |
|
329 itemArray->Compress(); |
|
330 |
|
331 iListBox->HandleItemRemovalL(); |
|
332 if(aCurrentPosition > 0) |
|
333 { |
|
334 iListBox->SetCurrentItemIndexAndDraw(aCurrentPosition-1); |
|
335 } |
|
336 if(aCurrentPosition == 0 ) |
|
337 { |
|
338 if (iListItemCount > 1 ) |
|
339 { |
|
340 iListBox->SetCurrentItemIndexAndDraw(aCurrentPosition); |
|
341 } |
|
342 else |
|
343 { |
|
344 HBufC* stringHolder = StringLoader::LoadLC( R_VPN_POLICY_SERVERS_EMPTY ); |
|
345 iListBox->View()->SetListEmptyTextL( *stringHolder ); |
|
346 CleanupStack::PopAndDestroy(); // stringHolder |
|
347 } |
|
348 } |
|
349 iListItemCount = iListItemCount -1; |
|
350 iParent.SetMiddleSoftKeyL(ETrue); |
|
351 DrawNow(); |
|
352 } |
|
353 |
|
354 |
|
355 void CVpnManagementUiServerContainer::ShowServersL() |
|
356 { |
|
357 /*** NSSM support is discontinued. |
|
358 Code is kept in comments temporarily because similar UI functionality |
|
359 might be needed for another purpose. |
|
360 CArrayFix<TAcuApiServerListElem>* serverList = iLoader.AcuApiWrapperL().ServerListL(); |
|
361 |
|
362 CDesCArrayFlat* itemTextArray = static_cast<CDesCArrayFlat*>(iListBox->Model()->ItemTextArray()); |
|
363 |
|
364 itemTextArray->Reset(); |
|
365 iListBox->Reset(); |
|
366 |
|
367 iListItemCount = serverList->Count(); |
|
368 |
|
369 for (TInt i = 0; i < iListItemCount; ++i) |
|
370 { |
|
371 TBuf<KAcuMaxServerNameLocalLth+2> serverName; |
|
372 serverName.Append(_L("\t")); |
|
373 serverName.Append(serverList->At(i).iServerNameLocal); |
|
374 itemTextArray->AppendL(serverName); |
|
375 } |
|
376 |
|
377 |
|
378 iListBox->HandleItemAdditionL(); |
|
379 ***/ |
|
380 } |
|
381 |
|
382 |
|
383 void CVpnManagementUiServerContainer::DeleteServerL(TInt /* aIndex */) |
|
384 { |
|
385 LOG(Log::Printf(_L("CVpnManagementUiServerContainer::DeleteServerL\n"))); |
|
386 |
|
387 /*** NSSM support is discontinued. |
|
388 Code is kept in comments temporarily because similar UI functionality |
|
389 might be needed for another purpose. |
|
390 |
|
391 TBuf<KAcuMaxServerNameLocalLth> serverName; |
|
392 serverName.Append( |
|
393 iLoader.AcuApiWrapperL().ServerListL()->At(aIndex).iServerNameLocal); |
|
394 LOG(Log::Printf(_L("CVpnManagementUiServerContainer::DeleteServerL - server name %S\n"), &serverName)); |
|
395 HBufC* temp; |
|
396 |
|
397 TAcuServerId serverId; |
|
398 serverId = iLoader.AcuApiWrapperL().ServerListL()->At(aIndex).iServerId; |
|
399 |
|
400 //Get server policy count from vpnapiext |
|
401 TInt policyCount = 0; |
|
402 TInt ret = iLoader.VpnApiWrapperL().GetServerPolicyCount( |
|
403 serverId, policyCount); |
|
404 |
|
405 LOG(Log::Printf(_L("CVpnManagementUiServerContainer::DeleteServerL - server policy count %d\n"), policyCount)); |
|
406 |
|
407 if ((ret== KErrNone) && (policyCount > 0)) //at least one policy related to given ACU server is found |
|
408 { |
|
409 // policies related to the server, confirmation query |
|
410 temp = StringLoader::LoadLC( R_VPN_QUEST_DELETE_SERVER_ASSOCIATED ); |
|
411 } |
|
412 else |
|
413 { |
|
414 // no policies related to the server, confirmation query |
|
415 temp = StringLoader::LoadLC( R_VPN_QUEST_DELETE_SERVER, serverName ); |
|
416 } |
|
417 |
|
418 CAknQueryDialog* query = CAknQueryDialog::NewL( CAknQueryDialog::EConfirmationTone ); |
|
419 TInt retval = query->ExecuteLD( R_CONFIRMATION_QUERY, *temp ); |
|
420 CleanupStack::PopAndDestroy(); // temp |
|
421 if ( retval ) |
|
422 { |
|
423 TInt ret = iLoader.AcuApiWrapperL().DeleteServer(aIndex); |
|
424 if(ret == KErrNone) |
|
425 { |
|
426 //Update listbox |
|
427 UpdateListBoxL( aIndex ); |
|
428 //Update iServerList |
|
429 iLoader.AcuApiWrapperL().ServerListL(); |
|
430 |
|
431 //Set iNewServerDefinition to false |
|
432 iLoader.iNewServerDefinition = EFalse; |
|
433 } |
|
434 else if (ret == KErrServerBusy) |
|
435 { |
|
436 //Show an information note that server is currently in use |
|
437 HBufC* noteText; |
|
438 noteText = StringLoader::LoadLC( R_VPN_INFO_POLICY_SERVER_IN_USE ); |
|
439 CAknInformationNote* note = new(ELeave)CAknInformationNote(ETrue); |
|
440 note->SetTimeout(CAknNoteDialog::ELongTimeout); //3sec |
|
441 note->ExecuteLD(noteText->Des()); |
|
442 CleanupStack::PopAndDestroy(); // noteText |
|
443 } |
|
444 } |
|
445 ***/ |
|
446 } |
|
447 |
|
448 void CVpnManagementUiServerContainer::SynchroniseServerL(TInt /* aIndex */) |
|
449 { |
|
450 LOG_("CVpnManagementUiServerContainer::SynchroniseServerL"); |
|
451 |
|
452 /*** NSSM support is discontinued. |
|
453 Code is kept in comments temporarily because similar UI functionality |
|
454 might be needed for another purpose. |
|
455 |
|
456 TBool selectionExists = iLoader.SelectionExistsL( aIndex ); |
|
457 if( selectionExists ) |
|
458 { |
|
459 //Save server index for Connecting via note |
|
460 iLoader.iCurrentServerIndex = aIndex; |
|
461 // Get selection name for connecting via note |
|
462 // and save it to the member variable of iLoader |
|
463 iLoader.GetSelectionNameL( iLoader.iSelectionName ); |
|
464 //Show wait dialog |
|
465 iLoader.ShowWaitNoteL(); |
|
466 |
|
467 iLoader.AcuApiWrapperL().SynchroniseServerL( aIndex,this ); |
|
468 //Set iNewServerDefinition to false, because when |
|
469 //we go to the policy view we don't want to show note |
|
470 //"new server defined synchronise now" |
|
471 iLoader.iNewServerDefinition = EFalse; |
|
472 } ***/ |
|
473 } |
|
474 |
|
475 |
|
476 void CVpnManagementUiServerContainer::NotifyUpdatePolicyCompleteL(TInt /*aResult*/) |
|
477 { |
|
478 } |
|
479 |
|
480 void CVpnManagementUiServerContainer::NotifySynchroniseServerCompleteL(TInt aResult) |
|
481 { |
|
482 LOG(Log::Printf(_L("CVpnManagementUiServerContainer::NotifySynchroniseServerCompleteL - Result %d\n"), aResult)); |
|
483 |
|
484 if ( iLoader.iWaitDialog ) |
|
485 { |
|
486 iLoader.DeleteWaitNoteL();//->iWaitDialog->ProcessFinishedL(); // deletes the wait dialog |
|
487 } |
|
488 |
|
489 |
|
490 if (aResult == KErrNone) |
|
491 { |
|
492 //Confirmation note |
|
493 HBufC* string = StringLoader::LoadLC( R_VPN_CONF_POLICY_SERVER_SYNC_OK ); |
|
494 CAknConfirmationNote* note = new ( ELeave ) CAknConfirmationNote( ETrue ); |
|
495 note->ExecuteLD( *string ); |
|
496 CleanupStack::PopAndDestroy( string ); |
|
497 } |
|
498 /*** NSSM support is discontinued. |
|
499 Code is kept in comments temporarily because similar UI functionality |
|
500 might be needed for another purpose. |
|
501 else if (aResult == KAcuErrServerCertExpiredByPkiService) |
|
502 { |
|
503 //Show an information note |
|
504 HBufC* noteText; |
|
505 noteText = StringLoader::LoadLC( R_VPN_INFO_SERVER_CERT_EXPIRED ); |
|
506 CAknInformationNote* note = new(ELeave)CAknInformationNote(ETrue); |
|
507 note->SetTimeout(CAknNoteDialog::ELongTimeout); //3sec |
|
508 note->ExecuteLD(noteText->Des()); |
|
509 CleanupStack::PopAndDestroy(); // noteText |
|
510 } ***/ |
|
511 else if (aResult == KErrDiskFull) |
|
512 { |
|
513 CErrorUI* errorUi = CErrorUI::NewLC( *(CCoeEnv::Static()) ); |
|
514 errorUi->ShowGlobalErrorNoteL( KErrDiskFull ); |
|
515 CleanupStack::PopAndDestroy(); // errorUi |
|
516 } |
|
517 else if (aResult == KErrCancel) |
|
518 { |
|
519 // No operation, i.e. don't show anything |
|
520 } |
|
521 else |
|
522 { |
|
523 //Show an information note |
|
524 HBufC* noteText; |
|
525 noteText = StringLoader::LoadLC( R_VPN_INFO_POLICY_SERVER_SYNC_ERROR ); |
|
526 CAknInformationNote* note = new(ELeave)CAknInformationNote(ETrue); |
|
527 note->SetTimeout(CAknNoteDialog::ELongTimeout); //3sec |
|
528 note->ExecuteLD(noteText->Des()); |
|
529 CleanupStack::PopAndDestroy(); // noteText |
|
530 } |
|
531 |
|
532 iParent.SetMiddleSoftKeyL(ETrue); |
|
533 } |
|
534 |
|
535 void CVpnManagementUiServerContainer::NotifyStepChangedL(TInt /*aResult*/) |
|
536 { |
|
537 if (iShowWaitNote) |
|
538 { |
|
539 iLoader.ShowWaitNoteL(); |
|
540 iShowWaitNote = EFalse; |
|
541 } |
|
542 if ( iLoader.iWaitDialog ) |
|
543 { |
|
544 iLoader.SetTextL(); |
|
545 } |
|
546 } |
|
547 |
|
548 |
|
549 void CVpnManagementUiServerContainer::HandleListBoxEventL (CEikListBox* /*aListBox*/, |
|
550 TListBoxEvent aEventType) |
|
551 { |
|
552 switch(aEventType) |
|
553 { |
|
554 case EEventEnterKeyPressed: |
|
555 case EEventItemSingleClicked: |
|
556 iParent.HandleCommandL(EVpnUiCmdEditServer); |
|
557 break; |
|
558 default: |
|
559 //Do nothing |
|
560 break; |
|
561 } |
|
562 } |
|
563 |
|
564 |
|
565 // --------------------------------------------------------- |
|
566 // CVpnManagementUiServerContainer::GetHelpContext |
|
567 // This function is called when Help application is launched. |
|
568 // (other items were commented in a header). |
|
569 // --------------------------------------------------------- |
|
570 // |
|
571 #ifdef __SERIES60_HELP |
|
572 void CVpnManagementUiServerContainer::GetHelpContext( |
|
573 TCoeHelpContext& aContext ) const |
|
574 { |
|
575 aContext.iMajor = KUidVpnManagementUi; |
|
576 aContext.iContext = KSET_HLP_VPN_POLICY_SERVERS; |
|
577 } |
|
578 #endif //__SERIES60_HELP |
|
579 |
|
580 // End of File |