|
1 /* |
|
2 * Copyright (c) 2006-2007 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: ECom interface implementation definition |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef HSSMGMTIMPL_H |
|
21 #define HSSMGMTIMPL_H |
|
22 |
|
23 #include "hssinterface.h" |
|
24 #include "hssscanlist.h" |
|
25 #include "hssmgmtclient.h" |
|
26 #include "hssiapsettings.h" |
|
27 |
|
28 /** |
|
29 * Implementation for MHssMgmtInterface interface. |
|
30 * |
|
31 * This class uses services from RHssInterface class to implement |
|
32 * most of the required functionality. |
|
33 */ |
|
34 class CHssMgmtImpl : public CHssMgmtClient, public MHssSrvNotifications |
|
35 { |
|
36 public: // Methods |
|
37 |
|
38 // Constructors and destructor |
|
39 |
|
40 /** |
|
41 * Static constructor. |
|
42 */ |
|
43 static CHssMgmtImpl* NewL(); |
|
44 |
|
45 /** |
|
46 * Destructor. |
|
47 */ |
|
48 virtual ~CHssMgmtImpl(); |
|
49 |
|
50 // Methods from base classes |
|
51 |
|
52 /** |
|
53 * (From MHssMgmtInterface) Activate the notification service. |
|
54 * |
|
55 * After the client has enabled the notification service, it can |
|
56 * receive asynchronous notifications from the server. |
|
57 * @param aCallback The class that implements the callback interface. |
|
58 */ |
|
59 virtual void ActivateNotificationsL( MHssMgmtNotifications& aCallback ); |
|
60 |
|
61 /** |
|
62 * (From MHssMgmtInterface) Cancel the notification service. |
|
63 */ |
|
64 virtual void CancelNotifications(); |
|
65 |
|
66 /** |
|
67 * (From MHssMgmtInterface) Perform a scan and return the detected WLAN networks. |
|
68 * @param aResults Results of the scan. |
|
69 * @return KErrNone if successful, otherwise one of the system-wide |
|
70 * error codes. |
|
71 */ |
|
72 virtual TInt GetScanResults( CHssMgmtScanInfo& aResults ); |
|
73 |
|
74 /** |
|
75 * (From MHssMgmtInterface) Create and Protect IAP, register Client. |
|
76 * @param aUid UID of the client. |
|
77 * @param aIapName Name of the IAP to be registered. |
|
78 * @param aWaitNote Indication of UI authentication, if in use TRUE, else FALSE. |
|
79 * @return On successful completion returns IAP ID, otherwise return value is 0. |
|
80 */ |
|
81 virtual TUint Register( const TUid aUid, |
|
82 const TDesC& aIapName, |
|
83 const TUint aWaitNote ); |
|
84 |
|
85 /** |
|
86 * (From MHssMgmtInterface) Delete IAP and unregister Client. |
|
87 * |
|
88 * @param aUid UID of the client. |
|
89 * @param aIapId ID of the IAP. |
|
90 * @return KErrNone, if IAP removal successful; |
|
91 * otherwise one of the other system-wide error codes. |
|
92 */ |
|
93 virtual TInt UnRegister( const TUid aUid, |
|
94 const TUint aIapId, |
|
95 const TUint aNetworkId ); |
|
96 |
|
97 /** |
|
98 * (From MHssMgmtInterface) Change IAP settings. |
|
99 * |
|
100 * @param aIapId ID of the IAP. |
|
101 * @param aSettings Settings of the IAP. |
|
102 * @return KErrNone if HotSpot FW was able to receive message; |
|
103 * otherwise one of the other system-wide error codes. |
|
104 */ |
|
105 virtual TInt ChangeSettings( const TUint aIapId, |
|
106 const THssIapSettings &aSettings ); |
|
107 |
|
108 /** |
|
109 * (From MHssMgmtInterface) Associate IAP with network. |
|
110 * |
|
111 * @param aIapId ID of the IAP. |
|
112 * @return KErrNone if HotSpot FW was able to receive message; |
|
113 * otherwise one of the other system-wide error codes. |
|
114 */ |
|
115 virtual TInt Join( const TUint aIapId ); |
|
116 |
|
117 /** |
|
118 * (From MHssMgmtInterface) Cancel IAP association. |
|
119 * |
|
120 * @param aIapId ID of the IAP. |
|
121 * @return KErrNone if HotSpot FW was able to receive message; |
|
122 * otherwise one of the other system-wide error codes. |
|
123 */ |
|
124 virtual TInt CancelStart( const TUint aIapId ); |
|
125 |
|
126 /** |
|
127 * (From MHssMgmtInterface) Stop associating IAP. |
|
128 * |
|
129 * @param aIapId ID of the IAP. |
|
130 * @return KErrNone if HotSpot FW was able to receive message; |
|
131 * otherwise one of the other system-wide error codes. |
|
132 */ |
|
133 virtual TInt Stop( const TUint aIapId ); |
|
134 |
|
135 /** |
|
136 * (From MHssMgmtInterface) Inform login completion. |
|
137 * |
|
138 * @param aIapId, ID of the IAP. |
|
139 * @param aStatus, Result of login procedure. |
|
140 * @return KErrNone if HotSpot FW was able to receive message; |
|
141 * otherwise one of the other system-wide error codes. |
|
142 */ |
|
143 virtual TInt LoginComplete( const TUint aIapId, const TInt aStatus ); |
|
144 |
|
145 /** |
|
146 * (From MHssMgmtInterface) Inform logout completion. |
|
147 * |
|
148 * @param aIapId ID of the IAP. |
|
149 * @return KErrNone if HotSpot FW was able to receive message; |
|
150 * otherwise one of the other system-wide error codes. |
|
151 */ |
|
152 virtual TInt LogoutComplete( const TUint aIapId ); |
|
153 |
|
154 /** |
|
155 * Check status of BackgroundScan. |
|
156 * @return 0 if off, otherwice number as scan interval. |
|
157 */ |
|
158 virtual TUint32 CheckBackgroundScan(); |
|
159 |
|
160 /** |
|
161 * Get the BSSID of the currently connected AP. |
|
162 * @param aBssId, MAC address of a connection |
|
163 * @return KErrNone if successful, |
|
164 * otherwise one of the other system-wide error codes. |
|
165 */ |
|
166 virtual TInt GetConnectionBssid( THssBssid& aBssId ); |
|
167 |
|
168 /** |
|
169 * Add an SSID list to the given IAP. |
|
170 * @param aIapId, IAP ID given. |
|
171 * @param aSsidList, SSID list to add to the IAP. |
|
172 * @return KErrNone if successful, |
|
173 * otherwise one of the other system-wide error codes. |
|
174 */ |
|
175 virtual TInt AddIapSsidList( |
|
176 TUint aIapId, |
|
177 const CArrayFixFlat<THssSsid>& aSsidList ); |
|
178 |
|
179 /** |
|
180 * Set login and logout timers for this client. |
|
181 * @param aClientUid, Client's UID: clients may have own timer values, |
|
182 * @param aLoginTimerValue, login timer value, |
|
183 * @param aLogoutTimerValue, logout timer value. |
|
184 * @return KErrNone if successful, |
|
185 * otherwise one of the other system-wide error codes. |
|
186 */ |
|
187 virtual TInt SetTimerValues( |
|
188 TUid aClientUid, |
|
189 TUint aLoginTimerValue, |
|
190 TUint aLogoutTimerValue ); |
|
191 |
|
192 /** |
|
193 * Gets all Iaps of client |
|
194 * @param aUId, UID of client |
|
195 * @param aIapIdArray, Array for client's Iaps |
|
196 * otherwise one of the other system-wide error codes. |
|
197 */ |
|
198 virtual TInt GetClientIaps( const TUid aUid, RArray<TUint>& aIapIdArray ); |
|
199 |
|
200 protected: // Methods |
|
201 |
|
202 /** |
|
203 * (From MHssNotify) New networks have been detected during scan. |
|
204 * |
|
205 * @param aIapId ID of the IAP. |
|
206 */ |
|
207 virtual void NewNetworksDetected( TUint aIapId ); |
|
208 |
|
209 /** |
|
210 * (From MHssNotify) One or more networks have been lost since the last scan. |
|
211 * |
|
212 * @param aIapId ID of the IAP. |
|
213 */ |
|
214 virtual void OldNetworksLost( TUint aIapId ); |
|
215 |
|
216 private: // Methods |
|
217 |
|
218 /** |
|
219 * C++ default constructor. |
|
220 */ |
|
221 CHssMgmtImpl(); |
|
222 |
|
223 /** |
|
224 * Symbian 2nd phase constructor. |
|
225 */ |
|
226 void ConstructL(); |
|
227 |
|
228 private: // Data |
|
229 |
|
230 // Interface to RWLMServer |
|
231 RHssInterface iServer; |
|
232 |
|
233 // Client notification callback |
|
234 MHssMgmtNotifications* iClientNotification; |
|
235 }; |
|
236 |
|
237 |
|
238 #endif // HSSMGMTIMPL_H |