1 /* |
|
2 * Copyright (c) 2007-2008 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: Header for common client-server constants and enums |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef WSFSERVERCOMMON_H |
|
22 #define WSFSERVERCOMMON_H |
|
23 |
|
24 |
|
25 #include <e32base.h> |
|
26 |
|
27 /** |
|
28 * Published name of the sniffer server |
|
29 */ |
|
30 _LIT( KWlanSnifferServerName, "WlanSnifferServer" ); |
|
31 |
|
32 /** |
|
33 * Filename of the server binary |
|
34 */ |
|
35 _LIT( KWlanSnifferServerExe, "wsfserver.exe" ); |
|
36 |
|
37 /** |
|
38 * Version numbers for the sniffer server |
|
39 */ |
|
40 const TUint KWlanSnifferServerMajor = 1; |
|
41 const TUint KWlanSnifferServerMinor = 0; |
|
42 const TUint KWlanSnifferServerBuild = 0; |
|
43 |
|
44 |
|
45 /** |
|
46 * IPC commands recognised by the sniffer server |
|
47 */ |
|
48 enum TWsfWlanSnifferCmds |
|
49 { |
|
50 /** |
|
51 * Asks for the size of the scan results in bytes |
|
52 */ |
|
53 ESnifferCmdWlanDataSize, |
|
54 |
|
55 /** |
|
56 * Asks to be notified of server events |
|
57 */ |
|
58 ESnifferCmdNotifyEvents, |
|
59 |
|
60 /** |
|
61 * Asks to cancel notifications |
|
62 */ |
|
63 ESnifferCmdCancelNotifyEvents, |
|
64 |
|
65 /** |
|
66 * Asks for the wlan scan results |
|
67 */ |
|
68 ESnifferCmdGetWlanInfo, |
|
69 |
|
70 /** |
|
71 * Asks to create a connection |
|
72 */ |
|
73 ESnifferCmdConnect, |
|
74 |
|
75 /** |
|
76 * Asks to disconnect the current connection |
|
77 */ |
|
78 ESnifferCmdDisconnect, |
|
79 |
|
80 /** |
|
81 * Asks to start scanning for WLAN networks |
|
82 */ |
|
83 ESnifferCmdActivateScan, |
|
84 |
|
85 /** |
|
86 * Asks to disable WLAN scanning |
|
87 */ |
|
88 ESnifferCmdDisableScan, |
|
89 |
|
90 /** |
|
91 * Asks for the name of the active WLAN connection |
|
92 */ |
|
93 ESnifferCmdConnectionName, |
|
94 |
|
95 /** |
|
96 * Asks to cancel every operation |
|
97 */ |
|
98 ESnifferCmdCancelAll, |
|
99 |
|
100 /** |
|
101 * Asks explicitly for an immediate scan |
|
102 */ |
|
103 ESnifferCmdRequestScan, |
|
104 |
|
105 /** |
|
106 * Asks to monitor the given IAP |
|
107 */ |
|
108 ESnifferCmdMonitorAp, |
|
109 |
|
110 /** |
|
111 * Queries the scanning status |
|
112 */ |
|
113 ESnifferCmdIsScanEnabled, |
|
114 |
|
115 /** |
|
116 * Queries the connection status |
|
117 */ |
|
118 ESnifferCmdIsConnected, |
|
119 |
|
120 /** |
|
121 * Queries the details of the active WLAN connection |
|
122 */ |
|
123 ESnifferCmdConnectedDetails, |
|
124 |
|
125 /** |
|
126 * Aborts the ongoing scanning |
|
127 */ |
|
128 ESnifferCmdAbortScanning, |
|
129 |
|
130 /** |
|
131 * Aborts the ongoing connection process |
|
132 */ |
|
133 ESnifferCmdAbortConnecting, |
|
134 |
|
135 /** |
|
136 * Sets the persistence property of the currently monitored IAP |
|
137 */ |
|
138 ESnifferCmdSetIapPersistence, |
|
139 |
|
140 /** |
|
141 * Sets the behaviour of the auto-disconnect timer |
|
142 */ |
|
143 ESnifferCmdControlDisconnectTimer |
|
144 }; |
|
145 |
|
146 |
|
147 |
|
148 /** |
|
149 * Structure for passing back the active connection name |
|
150 */ |
|
151 class TWsfQueryConnectedAccount |
|
152 { |
|
153 public: |
|
154 /** |
|
155 * Maximal length of IAP name that the class should be able to store |
|
156 */ |
|
157 static const TInt KWlanNameMaxLength = 50; |
|
158 |
|
159 public: |
|
160 /** |
|
161 * Indicates whether there was a connection |
|
162 */ |
|
163 TBool iConnected; |
|
164 |
|
165 /** |
|
166 * Name of the active WLAN connection |
|
167 */ |
|
168 TBuf<KWlanNameMaxLength> iConnectedAccountName; |
|
169 |
|
170 }; |
|
171 |
|
172 |
|
173 /** |
|
174 * Events in the server that clients are notified of |
|
175 */ |
|
176 enum TWsfEngineEvent |
|
177 { |
|
178 /** |
|
179 * There is a new scan result available. |
|
180 */ |
|
181 EEngineWlanDataChanged, |
|
182 |
|
183 /** |
|
184 * Notifies that scanning has been disabled |
|
185 */ |
|
186 EEngineScanDisabled, |
|
187 |
|
188 /** |
|
189 * Notifies that scanning has been enabled |
|
190 */ |
|
191 EEngineScanEnabled, |
|
192 |
|
193 /** |
|
194 * Notifies that a WLAN connection has been established |
|
195 */ |
|
196 EEngineConnected, |
|
197 |
|
198 /** |
|
199 * Notifies that the active connection was disconnected |
|
200 */ |
|
201 EEngineDisconnected, |
|
202 |
|
203 /** |
|
204 * Notifies that an error occured in the server |
|
205 */ |
|
206 EEngineError, |
|
207 |
|
208 /** |
|
209 * Notifies that the connecting process failed for some reason |
|
210 */ |
|
211 EEngineConnectingFailed |
|
212 }; |
|
213 |
|
214 |
|
215 /** |
|
216 * Data structure for client notification |
|
217 */ |
|
218 class TWsfNotifyEventContainer |
|
219 { |
|
220 public: |
|
221 /** |
|
222 * Server event |
|
223 */ |
|
224 TWsfEngineEvent iEvent; |
|
225 |
|
226 /** |
|
227 * Error code |
|
228 */ |
|
229 TInt iError; |
|
230 }; |
|
231 |
|
232 |
|
233 |
|
234 |
|
235 #endif |
|