|
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 CWiFiProtUiClientImpl. |
|
15 * |
|
16 */ |
|
17 |
|
18 /* |
|
19 * %version: tr1cfwln#11 % |
|
20 */ |
|
21 |
|
22 // INCLUDE FILES |
|
23 |
|
24 #include <bautils.h> |
|
25 #include <StringLoader.h> |
|
26 #include <commdb.h> |
|
27 #include <aknnotewrappers.h> |
|
28 #include <wifiprotuiclient.h> |
|
29 #include <AknsUtils.h> |
|
30 |
|
31 #ifndef __WINS__ |
|
32 #include <wlanmgmtclient.h> |
|
33 #include <WlanCdbCols.h> |
|
34 #endif // ! __WINS__ |
|
35 #include <data_caging_path_literals.hrh> |
|
36 |
|
37 #include "wifiprotuiclientimpl.h" |
|
38 #include "wifiprotlogger.h" |
|
39 |
|
40 |
|
41 // ================= MEMBER FUNCTIONS ======================= |
|
42 |
|
43 // -------------------------------------------------------------------------- |
|
44 // CWiFiProtUiClientImpl::NewL |
|
45 // -------------------------------------------------------------------------- |
|
46 // |
|
47 CWiFiProtUiClientImpl* CWiFiProtUiClientImpl::NewL() |
|
48 { |
|
49 CLOG_ENTERFN( "CWiFiProtUiClientImpl::NewL" ); |
|
50 CWiFiProtUiClientImpl* clientImpl = |
|
51 new ( ELeave ) CWiFiProtUiClientImpl(); |
|
52 CleanupStack::PushL( clientImpl ); |
|
53 clientImpl->ConstructL(); |
|
54 CleanupStack::Pop( clientImpl ); |
|
55 CLOG_LEAVEFN( "CWiFiProtUiClientImpl::NewL" ); |
|
56 return clientImpl; |
|
57 } |
|
58 |
|
59 // -------------------------------------------------------------------------- |
|
60 // CWiFiProtUiClientImpl::~CWiFiProtUiClientImpl |
|
61 // -------------------------------------------------------------------------- |
|
62 // |
|
63 CWiFiProtUiClientImpl::~CWiFiProtUiClientImpl() |
|
64 { |
|
65 CLOG_ENTERFN( "CWiFiProtUiClientImpl::~CWiFiProtUiClientImpl" ); |
|
66 delete iWiFiProtSyncClient; |
|
67 iNotif.Close(); |
|
68 CLOG_LEAVEFN( "CWiFiProtUiClientImpl::~CWiFiProtUiClientImpl" ); |
|
69 } |
|
70 |
|
71 // -------------------------------------------------------------------------- |
|
72 // CWiFiProtUiClientImpl::StartWiFiProtL |
|
73 // -------------------------------------------------------------------------- |
|
74 // |
|
75 void CWiFiProtUiClientImpl::StartWiFiProtL( const TWlanSsid& aSSid, |
|
76 TBool aConnectionNeeded, |
|
77 RArray<TUint32>& aUidsReturned, |
|
78 WiFiProt::TWiFiReturn& aReturnValue, |
|
79 TRequestStatus& aStatus ) |
|
80 { |
|
81 CLOG_ENTERFN( "CWiFiProtUiClientImpl::StartWiFiProtL" ); |
|
82 iNotif.StartWiFiProtL( aSSid, aConnectionNeeded, |
|
83 aUidsReturned, aReturnValue, aStatus ); |
|
84 CLOG_LEAVEFN( "CWiFiProtUiClientImpl::StartWiFiProtL" ); |
|
85 } |
|
86 |
|
87 // -------------------------------------------------------------------------- |
|
88 // CWiFiProtUiClientImpl::StartWiFiProtSyncL |
|
89 // -------------------------------------------------------------------------- |
|
90 // |
|
91 WiFiProt::TWiFiReturn |
|
92 CWiFiProtUiClientImpl::StartWiFiProtSyncL( const TWlanSsid& aSSid, |
|
93 TBool aConnectionNeeded, |
|
94 RArray<TUint32>& aUidsReturned ) |
|
95 { |
|
96 CLOG_WRITE( "CWiFiProtUiClientImpl::StartWiFiProtSyncL" ); |
|
97 if (iWiFiProtSyncClient == NULL) |
|
98 { |
|
99 iWiFiProtSyncClient = CWiFiProtSyncClient::NewL( iNotif ); |
|
100 } |
|
101 return iWiFiProtSyncClient->StartWiFiProtL( aSSid, |
|
102 aConnectionNeeded, aUidsReturned ); |
|
103 } |
|
104 |
|
105 // --------------------------------------------------------- |
|
106 // CWiFiProtUiClientImpl::StartWiFiProtConnL |
|
107 // --------------------------------------------------------- |
|
108 // |
|
109 void CWiFiProtUiClientImpl::StartWiFiProtConnL( const TWlanSsid& aSSid, |
|
110 TWlanProtectedSetupCredentialAttribute& |
|
111 aNetworkSettings, |
|
112 WiFiProt::TWiFiReturn& aReturnValue, |
|
113 TRequestStatus& aStatus ) |
|
114 { |
|
115 CLOG_ENTERFN( "CWiFiProtUiClientImpl::StartWiFiProtConnL" ); |
|
116 iNotif.StartWiFiProtConnL( aSSid, aNetworkSettings, aReturnValue, aStatus ); |
|
117 CLOG_LEAVEFN( "CWiFiProtUiClientImpl::StartWiFiProtConnL" ); |
|
118 } |
|
119 |
|
120 // -------------------------------------------------------------------------- |
|
121 // CWiFiProtUiClientImpl::CancelWiFiProt |
|
122 // -------------------------------------------------------------------------- |
|
123 // |
|
124 void CWiFiProtUiClientImpl::CancelWiFiProt( ) |
|
125 { |
|
126 CLOG_ENTERFN( "CWiFiProtUiClientImpl::CancelWiFiProt()" ); |
|
127 iNotif.CancelWiFiProt( ); |
|
128 CLOG_LEAVEFN( "CWiFiProtUiClientImpl::CancelWiFiProt()" ); |
|
129 } |
|
130 |
|
131 // -------------------------------------------------------------------------- |
|
132 // CWiFiProtUiClientImpl::CWiFiProtUiClientImpl |
|
133 // -------------------------------------------------------------------------- |
|
134 // |
|
135 CWiFiProtUiClientImpl::CWiFiProtUiClientImpl() |
|
136 { |
|
137 } |
|
138 |
|
139 // -------------------------------------------------------------------------- |
|
140 // CWiFiProtUiClientImpl::ConstructL |
|
141 // -------------------------------------------------------------------------- |
|
142 // |
|
143 void CWiFiProtUiClientImpl::ConstructL() |
|
144 { |
|
145 CLOG_ENTERFN( "CWiFiProtUiClientImpl::ConstructL" ); |
|
146 User::LeaveIfError( iNotif.Connect() ); |
|
147 CLOG_LEAVEFN( "CWiFiProtUiClientImpl::ConstructL" ); |
|
148 } |
|
149 // End of File |