|
1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Interface Manager API |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 */ |
|
21 |
|
22 |
|
23 #if !defined(__NIFMAN_H__) |
|
24 #define __NIFMAN_H__ |
|
25 |
|
26 #include <es_prot.h> |
|
27 #include <nifvar.h> |
|
28 #include <cdbover.h> |
|
29 |
|
30 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
31 #include <nifman_internal.h> |
|
32 #else |
|
33 #include <es_sock_partner.h> |
|
34 #endif |
|
35 |
|
36 /** |
|
37 @publishedPartner |
|
38 */ |
|
39 enum TAgentConnectType |
|
40 { |
|
41 EAgentStartDialOut, |
|
42 EAgentReconnect, |
|
43 EAgentStartCallBack, |
|
44 EAgentNone, |
|
45 EAgentStartDialIn |
|
46 }; |
|
47 |
|
48 class CNifMan; |
|
49 class MNifIfUser; |
|
50 class CNifFactory : public CObject |
|
51 /** |
|
52 Manager classes |
|
53 |
|
54 @publishedPartner |
|
55 @released |
|
56 */ |
|
57 { |
|
58 friend class CNifMan; |
|
59 public: |
|
60 IMPORT_C CNifFactory(); |
|
61 IMPORT_C virtual TInt Open(); |
|
62 IMPORT_C virtual void Close(); |
|
63 IMPORT_C static void Cleanup(TAny* aObject); |
|
64 IMPORT_C static TInt ControlledDelete(TAny* aFactory); |
|
65 IMPORT_C void InitL(RLibrary& aLib, CObjectCon& aCon); |
|
66 |
|
67 protected: |
|
68 IMPORT_C ~CNifFactory(); |
|
69 virtual void InstallL()=0; |
|
70 RLibrary iLib; |
|
71 CAsyncCallBack* iAsyncDtor; |
|
72 }; |
|
73 |
|
74 |
|
75 /** |
|
76 Client side classes |
|
77 async message for progress notifier |
|
78 |
|
79 @publishedAll |
|
80 @deprecated 7.0s - replaced with RConnection API |
|
81 */ |
|
82 const TInt KDefaultNifSlots = 1; |
|
83 |
|
84 |
|
85 /** |
|
86 @publishedPartner |
|
87 @released |
|
88 @capability NetworkControl These control options affect configuration at the designated level. |
|
89 @ref RConnection::Control |
|
90 */ |
|
91 const TUint KCOLInterface = 100; |
|
92 |
|
93 /** |
|
94 @publishedPartner |
|
95 @released |
|
96 @capability NetworkControl These control options affect configuration at the designated level. |
|
97 @ref RConnection::Control |
|
98 */ |
|
99 const TUint KCOLAgent = 200; |
|
100 |
|
101 |
|
102 // RConnection::Ioctl() level for NIFMAN |
|
103 |
|
104 /** |
|
105 @publishedPartner |
|
106 @released |
|
107 @ref RConnection::Ioctl |
|
108 */ |
|
109 const TUint KCOLConfiguration = 300; |
|
110 |
|
111 // RConnection::Control() options |
|
112 |
|
113 /** |
|
114 @publishedPartner |
|
115 @released |
|
116 @capability NetworkControl Restrict ability to switch on/off idle timers |
|
117 @ref RConnection::Control |
|
118 */ |
|
119 const TUint KConnDisableTimers = KConnReadUserDataBit | 1; |
|
120 |
|
121 /** |
|
122 @publishedPartner |
|
123 @released |
|
124 @ref RConnection::Control |
|
125 */ |
|
126 const TUint KConnGetInterfaceName = KConnReadUserDataBit | KConnWriteUserDataBit | 2; |
|
127 |
|
128 |
|
129 // RConnection::Ioctl() options |
|
130 |
|
131 /** |
|
132 @publishedPartner |
|
133 @released |
|
134 @ref RConnection::Ioctl |
|
135 */ |
|
136 const TUint KConnGetCurrentAddr = KConnWriteUserDataBit | 3; |
|
137 |
|
138 /** |
|
139 @publishedPartner |
|
140 @released |
|
141 @ref RConnection::Ioctl |
|
142 */ |
|
143 const TUint KConnGetServerAddr = KConnWriteUserDataBit | 4; |
|
144 |
|
145 /** |
|
146 @publishedPartner |
|
147 @released |
|
148 @ref RConnection::Ioctl |
|
149 */ |
|
150 const TUint KConnGetAddrLeaseTimeRemain = KConnWriteUserDataBit | 5; |
|
151 |
|
152 /** |
|
153 @publishedPartner |
|
154 @released |
|
155 @capability NetworkControl Restrict ability to release a configured address |
|
156 @ref RConnection::Ioctl |
|
157 */ |
|
158 const TUint KConnAddrRelease = 6; |
|
159 |
|
160 /** |
|
161 @publishedPartner |
|
162 @released |
|
163 @capability NetworkControl Restrict ability to renew a configured address |
|
164 @ref RConnection::Ioctl |
|
165 |
|
166 This option is used for user initiated RENEW request where an attempt |
|
167 is made to renew the lease obtained from the orginal DHCP server. |
|
168 If the server response is not received before the default timeout(RebindTimeT2 - RenewalTimeT1) |
|
169 the dhcp client will then initiate a REBIND.An user defined timeout can also be |
|
170 supplied when using this option which will override the default timeout value. |
|
171 |
|
172 @code |
|
173 RConnection conn; |
|
174 TRequestStatus stat; |
|
175 //Start a connection |
|
176 ..... |
|
177 ..... |
|
178 //Option1: Initiate a Renew request. |
|
179 conn.Ioctl(KCOLConfiguration, KConnAddrRenew, stat); |
|
180 |
|
181 //Option2: Initiate a Renew request with a user defined timeout |
|
182 TInt secValue(2); //Eg timeout set to 2secs |
|
183 TPckg<TInt> val(secValue); |
|
184 conn.Ioctl(KCOLConfiguration, KConnAddrRenew, stat,&val); |
|
185 @endcode |
|
186 */ |
|
187 const TUint KConnAddrRenew = 7; |
|
188 |
|
189 // DHCP specific RConnection::Ioctl options |
|
190 /** |
|
191 @publishedPartner |
|
192 @released |
|
193 @ref RConnection::Ioctl |
|
194 */const TUint KConnGetDhcpRawOptionData = KConnWriteUserDataBit|KConnReadUserDataBit|100; |
|
195 |
|
196 /** |
|
197 @publishedPartner |
|
198 @released |
|
199 @ref RConnection::Ioctl |
|
200 */ |
|
201 const TUint KConnGetSipServerAddr = KConnWriteUserDataBit|KConnReadUserDataBit|101; |
|
202 |
|
203 /** |
|
204 @publishedPartner |
|
205 @released |
|
206 @ref RConnection::Ioctl |
|
207 */ |
|
208 const TUint KConnGetSipServerDomain = KConnWriteUserDataBit|KConnReadUserDataBit|102; |
|
209 |
|
210 /** |
|
211 * This constant is used to retrieve the DHCP Header Sname which is the |
|
212 * host name of the next available server. This is sometimes overloaded |
|
213 * to carry option value 66 which is the TftpServerName. |
|
214 * @publishedPartner |
|
215 * @released |
|
216 * @see RConnection::Ioctl() |
|
217 */ |
|
218 const TUint KConnGetDhcpHdrSname = KConnWriteUserDataBit|KConnReadUserDataBit|104; |
|
219 |
|
220 /** |
|
221 * This constant is used to retrieve the DHCP Header Siaddr which is the |
|
222 * IPAddress of the next available server. |
|
223 * @publishedPartner |
|
224 * @released |
|
225 * @see RConnection::Ioctl() |
|
226 */ |
|
227 const TUint KConnGetDhcpHdrSiaddr = KConnWriteUserDataBit|KConnReadUserDataBit|105; |
|
228 |
|
229 /** |
|
230 * This constant is used to retrieve the DHCP Option 66, Tftp Server Name. |
|
231 * @publishedPartner |
|
232 * @released |
|
233 * @see RConnection::Ioctl() |
|
234 */ |
|
235 const TUint KConnGetTftpServerName = KConnWriteUserDataBit|KConnReadUserDataBit|106; |
|
236 |
|
237 /** |
|
238 * This constant is used to retrieve the DHCP Option 150, Tftp Server Address. |
|
239 * @publishedPartner |
|
240 * @released |
|
241 * @see RConnection::Ioctl() |
|
242 */ |
|
243 const TUint KConnGetTftpServerAddr = KConnWriteUserDataBit|KConnReadUserDataBit|107; |
|
244 |
|
245 |
|
246 /** |
|
247 * This constant is used to retrieve multiple opcode data in a raw format. |
|
248 * @publishedPartner |
|
249 * @released |
|
250 * @see RConnection::Ioctl() |
|
251 */ |
|
252 const TUint KConnDhcpGetMultipleParams = KConnWriteUserDataBit|KConnReadUserDataBit|108; |
|
253 |
|
254 /** |
|
255 @publishedPartner |
|
256 @released |
|
257 */ |
|
258 const TUint KConnMaxInterfaceName = 32; |
|
259 |
|
260 class TConnInterfaceName |
|
261 /** |
|
262 @publishedPartner |
|
263 @released |
|
264 */ |
|
265 { |
|
266 public: |
|
267 TUint iIndex; |
|
268 TBuf<KConnMaxInterfaceName> iName; |
|
269 }; |
|
270 |
|
271 |
|
272 /** |
|
273 * This constant is used to provision hardware address in the DHCP server. This enables DHCP server to assign the only available IP address in |
|
274 * its pool to the authorised hardware address as configured by the application. |
|
275 * @publishedPartner |
|
276 * @released |
|
277 * @see RConnection::Ioctl() |
|
278 */ |
|
279 const TUint KConnDhcpSetHwAddressParams = KConnWriteUserDataBit|KConnReadUserDataBit|109; |
|
280 |
|
281 #ifdef SYMBIAN_TCPIPDHCP_UPDATE |
|
282 /** |
|
283 * This constant is used to retrieve list of domain names to be searched during name resolution. |
|
284 * Ref : RFC 3646 sec 4 |
|
285 * @publishedPartner |
|
286 * @released |
|
287 * @see RConnection::Ioctl |
|
288 */ |
|
289 const TUint KConnGetDomainSearchList = KConnWriteUserDataBit|KConnReadUserDataBit|110; |
|
290 |
|
291 /** |
|
292 * This constant is used to retrieve list of IPv6 addresses of DNS recursive name servers to which a client's DNS |
|
293 resolver will send DNS queries. |
|
294 * Ref: RFC 3646 sec 3 |
|
295 * @publishedPartner |
|
296 * @released |
|
297 * @see RConnection::Ioctl |
|
298 */ |
|
299 const TUint KConnGetDNSServerList = KConnWriteUserDataBit|KConnReadUserDataBit|111; |
|
300 #endif //SYMBIAN_TCPIPDHCP_UPDATE |
|
301 |
|
302 #endif // __NIFMAN_H__ |