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