|
1 /* |
|
2 * Copyright (c) 2001-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 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: Implementation of class CWiFiProtEnterPinDlg. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 //system includes |
|
21 #include <uikon/eiksrvui.h> |
|
22 |
|
23 //user includes |
|
24 #include "wifiprotenterpindlg.h" |
|
25 #include "wifiprotactiverunnercallback.h" |
|
26 #include "wifiprotplugin.hrh" |
|
27 |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 //class MActiveRunnerCallback; |
|
31 |
|
32 // ================= MEMBER FUNCTIONS ======================= |
|
33 // |
|
34 // -------------------------------------------------------------------------- |
|
35 // CWiFiProtEnterPinDlg::CWiFiProtEnterPinDlg |
|
36 // -------------------------------------------------------------------------- |
|
37 // |
|
38 CWiFiProtEnterPinDlg::CWiFiProtEnterPinDlg( |
|
39 MActiveRunnerCallback& aActiveRunnerCallback ): |
|
40 iActiveRunnerCallback ( aActiveRunnerCallback ) |
|
41 { |
|
42 } |
|
43 |
|
44 |
|
45 // -------------------------------------------------------------------------- |
|
46 // CWiFiProtEnterPinDlg::~CWiFiProtEnterPinDlg |
|
47 // -------------------------------------------------------------------------- |
|
48 // |
|
49 CWiFiProtEnterPinDlg::~CWiFiProtEnterPinDlg() |
|
50 { |
|
51 STATIC_CAST( CEikServAppUi*, |
|
52 CCoeEnv::Static()->AppUi() )->SuppressAppSwitching( EFalse ); |
|
53 } |
|
54 |
|
55 // -------------------------------------------------------------------------- |
|
56 // CWiFiProtInitiateEasySetupDlg::ProcessCommandL() |
|
57 // -------------------------------------------------------------------------- |
|
58 // |
|
59 void CWiFiProtEnterPinDlg::ProcessCommandL( TInt aCommandId ) |
|
60 { |
|
61 switch ( aCommandId ) |
|
62 { |
|
63 case EWiFiSoftkeyContinue: |
|
64 { |
|
65 TryExitL(aCommandId); |
|
66 break; |
|
67 } |
|
68 default: |
|
69 { |
|
70 CAknQueryDialog::ProcessCommandL( aCommandId ); |
|
71 break; |
|
72 } |
|
73 } |
|
74 } |
|
75 |
|
76 // -------------------------------------------------------------------------- |
|
77 // CWiFiProtEnterPinDlg::OkToExitL |
|
78 // -------------------------------------------------------------------------- |
|
79 // |
|
80 TBool CWiFiProtEnterPinDlg::OkToExitL( TInt aButtonId ) |
|
81 { |
|
82 if (aButtonId == EAknSoftkeyEmpty) |
|
83 { |
|
84 return EFalse; |
|
85 } |
|
86 else |
|
87 { |
|
88 TInt status = KErrCancel; |
|
89 if ( aButtonId == EAknSoftkeyOk |
|
90 || aButtonId == EAknSoftkeyYes |
|
91 || aButtonId == EAknSoftkeyDone |
|
92 || aButtonId == EWiFiSoftkeyContinue ) |
|
93 { |
|
94 status = KErrNone; |
|
95 } |
|
96 iActiveRunnerCallback.PinQueryExitL( status ); |
|
97 return ETrue; |
|
98 } |
|
99 } |
|
100 |
|
101 |
|
102 // -------------------------------------------------------------------------- |
|
103 // CWiFiProtEnterPinDlg::PreLayoutDynInitL() |
|
104 // -------------------------------------------------------------------------- |
|
105 // |
|
106 void CWiFiProtEnterPinDlg::PreLayoutDynInitL() |
|
107 { |
|
108 CAknQueryDialog::PreLayoutDynInitL(); |
|
109 STATIC_CAST( CEikServAppUi*, |
|
110 CCoeEnv::Static()->AppUi() )->SuppressAppSwitching( ETrue ); |
|
111 } |
|
112 |
|
113 // -------------------------------------------------------------------------- |
|
114 // CWiFiProtEnterPinDlg::RemoveCancel |
|
115 // -------------------------------------------------------------------------- |
|
116 // |
|
117 void CWiFiProtEnterPinDlg::RemoveCancel() |
|
118 { |
|
119 CEikButtonGroupContainer& cba = ButtonGroupContainer(); |
|
120 TRAP_IGNORE( cba.SetCommandL( CEikButtonGroupContainer::ERightSoftkeyPosition, |
|
121 EAknSoftkeyEmpty, KNullDesC) ); |
|
122 cba.DrawNow(); |
|
123 } |
|
124 |
|
125 // End of File |