47
|
1 |
/*
|
|
2 |
* Copyright (c) 2005 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: Internet-settings
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef __NSMLINTERNETADAPTER_H__
|
|
19 |
#define __NSMLINTERNETADAPTER_H__
|
|
20 |
|
|
21 |
// SyncML device management LoginScript
|
|
22 |
//#define __SYNCML_DM_LSCRIPT 1
|
|
23 |
//#define __SYNCML_DM_WLAN 1
|
|
24 |
// ------------------------------------------------------------------------------------------------
|
|
25 |
// Includes
|
|
26 |
// ------------------------------------------------------------------------------------------------
|
|
27 |
#include <utf.h>
|
|
28 |
#include <bldvariant.hrh>
|
|
29 |
#include <commdb.h>
|
|
30 |
#include <metadatabase.h>
|
|
31 |
#include "smldmadapter.h"
|
|
32 |
#include "nsmlconstants.h"
|
|
33 |
|
|
34 |
#include "NSmlWLanAdapter.h"
|
|
35 |
#include "NSmlWlanSettings.h"
|
|
36 |
|
|
37 |
const TInt KNSmlInternetAdapterFatMinSize = 512;
|
|
38 |
const TInt KNSmlIncompleteAP = -1;
|
|
39 |
// Buffering Stuff
|
|
40 |
const TInt KNSmlAPGranularity = 4;
|
|
41 |
const TUint8 KNSmlDMUriSeparator = 0x2f;
|
|
42 |
|
|
43 |
const TUint8 KNSmlDMDot = 0x2e;
|
|
44 |
const TUint8 KNSmlDMAsciiIntStart = 0x30;
|
|
45 |
const TUint8 KNSmlDMAsciiIntEnd = 0x39;
|
|
46 |
// Other constants
|
|
47 |
const TInt KNSmlApDnsLuidUpperBase = 300000;
|
|
48 |
const TInt KNSmlAp3gpppsLowerBase = 50000;
|
|
49 |
const TInt KNSmlApProxyLowerBase = 100000;
|
|
50 |
const TInt KNSmlApProxyUpperBase = 200000;
|
|
51 |
const TInt KNSmlApWapLowerBase = 9200;
|
|
52 |
const TInt KNSmlApWapUpperBase = 9203;
|
|
53 |
|
|
54 |
//DDF version number
|
|
55 |
_LIT8( KNSmlInternetAdapterDDFversion, "1.1");
|
|
56 |
|
|
57 |
//DDF accepted AP-fieldnames
|
|
58 |
_LIT8( KNSmlDdfAP, "AP" );
|
|
59 |
|
|
60 |
_LIT8( KNSmlDdfPx, "Px" );
|
|
61 |
_LIT8( KNSmlDdfPxName, "Name" );
|
|
62 |
_LIT8( KNSmlDdfPxId, "PxID" );
|
|
63 |
_LIT8( KNSmlDdfPxPW, "PxPW" );
|
|
64 |
_LIT8( KNSmlDdfPPGAuthTy, "PPGAuthTy" );
|
|
65 |
_LIT8( KNSmlDdfDomain, "Domain" );
|
|
66 |
_LIT8( KNSmlDdfDomainL, "DomainL" );
|
|
67 |
_LIT8( KNSmlDdfPxAddr, "PxAddr" );
|
|
68 |
_LIT8( KNSmlDdfToNAPID, "ToNAPID" );
|
|
69 |
_LIT8( KNSmlDdfToNAPIDL, "ToNAPIDL" );
|
|
70 |
_LIT8( KNSmlDdfStartpg, "Startpg" );
|
|
71 |
_LIT8( KNSmlDdfBasAuthId, "BasAuthId" );
|
|
72 |
_LIT8( KNSmlDdfBasAuthPW, "BasAuthPW" );
|
|
73 |
_LIT8( KNSmlDdfPort, "Port" );
|
|
74 |
_LIT8( KNSmlDdfPortNbr, "PortNbr" );
|
|
75 |
_LIT8( KNSmlDdfPxAuthTy, "PxAuthTy" );
|
|
76 |
_LIT8( KNSmlDdfService, "Service" );
|
|
77 |
_LIT8( KNSmlDdfServiceL, "ServiceL" );
|
|
78 |
_LIT8( KNSmlDdfUsePTxtLog, "UsePTxtLog" );
|
|
79 |
|
|
80 |
_LIT8( KNSmlDdfGPRSPDP, "GPRSPDP" );
|
|
81 |
_LIT8( KNSmlDdfDefGW, "DefGW" );
|
|
82 |
_LIT8( KNSmlDdfNetworkMask, "NetworkMask" );
|
|
83 |
|
|
84 |
_LIT8( KNSmlDdfPPPComp, "PPPComp" );
|
|
85 |
|
|
86 |
_LIT8( KNSmlDdfNAPDef, "NAPDef" );
|
|
87 |
_LIT8( KNSmlDdfNAPName, "Name" );
|
|
88 |
_LIT8( KNSmlDdfNAPLinger, "Linger" );
|
|
89 |
_LIT8( KNSmlDdfNAPID, "NAPID" );
|
|
90 |
_LIT8( KNSmlDdfBearer, "Bearer" );
|
|
91 |
_LIT8( KNSmlDdfBearerL, "BearerL" );
|
|
92 |
_LIT8( KNSmlDdfDirection, "Direction" );
|
|
93 |
_LIT8( KNSmlDdfInternet, "Internet" );
|
|
94 |
_LIT8( KNSmlDdfNAPAddr, "NAPAddr" );
|
|
95 |
_LIT8( KNSmlDdfNAPAddrTy, "NAPAddrTy" );
|
|
96 |
_LIT8( KNSmlDdfDNSAddr, "DNSAddr" );
|
|
97 |
_LIT8( KNSmlDdfDNSAddrL, "DNSAddrL" );
|
|
98 |
_LIT8( KNSmlDdfDNSAddrTy, "DNSAddrTy" );
|
|
99 |
_LIT8( KNSmlDdfDNSPriority, "DNSPriority" );
|
|
100 |
_LIT8( KNSmlDdfNAPAuthInf, "NAPAuthInf" );
|
|
101 |
_LIT8( KNSmlDdfAuthName, "AuthName" );
|
|
102 |
_LIT8( KNSmlDdfAuthSecr, "AuthSecr" );
|
|
103 |
_LIT8( KNSmlDdfPxAuthInf, "PxAuthInf" );
|
|
104 |
_LIT8( KNSmlDdfPxAuthId, "PxAuthID" );
|
|
105 |
_LIT8( KNSmlDdfPxAuthPW, "PxAuthPW" );
|
|
106 |
|
|
107 |
_LIT8( KNSmlDdfIPAddrFromServer,"IPAddrFromServer" );
|
|
108 |
_LIT8( KNSmlDdfIPAddr, "IPAddr" );
|
|
109 |
_LIT8( KNSmlDdfDNSAddrFromServer,"IPDNSAddrFromServer" );
|
|
110 |
_LIT8( KNSmlDdfIPv6DNSAddrFromServer,"IPv6DNSAddrFromServer" );
|
|
111 |
_LIT8( KNSmlDdfIfNetworks, "IfNetworks" );
|
|
112 |
_LIT8( KNSmlDdfIAPService, "IAPService" );
|
|
113 |
_LIT8( KNSmlDdfLANService, "LANService" );
|
|
114 |
|
|
115 |
_LIT8( KNSmlDdfIAPSeamlessness, "Seamlessness" );
|
|
116 |
_LIT8( KNSmlDdfIAPMetaData, "MetaData" );
|
|
117 |
|
|
118 |
_LIT8( KNSmlDdfNoPxFor, "NoPxFor" );
|
|
119 |
_LIT8( KNSmlDdfNoPxForL, "NoPxForL" );
|
|
120 |
|
|
121 |
_LIT8( KNSmlDdfNetworks, "Networks" );
|
|
122 |
_LIT8( KNSmlDdfNetworkName, "Name" );
|
|
123 |
_LIT8( KNSmlDdfNetworkID, "ID" );
|
|
124 |
|
|
125 |
//DDF AP-field descriptions
|
|
126 |
_LIT8( KNSmlDdfAPDesc, "AP (Access Point) node" );
|
|
127 |
|
|
128 |
_LIT8( KNSmlDdfPxDesc, "Px (Proxy) node" );
|
|
129 |
_LIT8( KNSmlDdfPxNameDesc, "Px name description" );
|
|
130 |
_LIT8( KNSmlDdfNameDesc, "Displayable name for the Proxy" );
|
|
131 |
_LIT8( KNSmlDdfPxIdDesc, "Define one Proxy entity" );
|
|
132 |
_LIT8( KNSmlDdfPxPWDesc, "Password for one Proxy entity" );
|
|
133 |
_LIT8( KNSmlDdfPPGAuthTyDesc, "Link PxID and PxPW to an authentication method" );
|
|
134 |
_LIT8( KNSmlDdfPxAddrDesc, "Proxy-Address" );
|
|
135 |
_LIT8( KNSmlDdfToNAPIDDesc, "Parent to all Network Access Point link objects" );
|
|
136 |
_LIT8( KNSmlDdfToNAPIDLDesc, "NAPID end" );
|
|
137 |
_LIT8( KNSmlDdfStartpgDesc, "The WAP homepage or start page" );
|
|
138 |
_LIT8( KNSmlDdfBasAuthIdDesc, "Basic authentication identifier" );
|
|
139 |
_LIT8( KNSmlDdfBasAuthPWDesc, "Basic authentication password" );
|
|
140 |
_LIT8( KNSmlDdfPortDesc, "Port node" );
|
|
141 |
_LIT8( KNSmlDdfPortNbrDesc, "Value of the port number" );
|
|
142 |
_LIT8( KNSmlDdfServiceDesc, "Service node" );
|
|
143 |
_LIT8( KNSmlDdfServiceLDesc, "ServiceL" );
|
|
144 |
_LIT8( KNSmlDdfUsePTxtLogDesc, "Plain Text Login is used or not" );
|
|
145 |
|
|
146 |
_LIT8( KNSmlDdfGPRSPDPDesc, "GPRS PDP-type" );
|
|
147 |
_LIT8( KNSmlDdfDefGWDesc, "Default Gateway" );
|
|
148 |
_LIT8( KNSmlDdfNetworkMaskDesc, "Network/Subnet mask" );
|
|
149 |
|
|
150 |
_LIT8( KNSmlDdfPPPCompDesc, "PPP Compression" );
|
|
151 |
|
|
152 |
_LIT8( KNSmlDdfNAPDefDesc, "Network Access Point Definition objects parent" );
|
|
153 |
_LIT8( KNSmlDdfNAPNameDesc, "Displayable name for the NAP" );
|
|
154 |
_LIT8( KNSmlDdfNAPIDDesc, "Used by TO-NAPID link of the Proxy" );
|
|
155 |
_LIT8( KNSmlDdfNAPLingerDesc, "Linger value" );
|
|
156 |
_LIT8( KNSmlDdfBearerDesc, "Bearer node" );
|
|
157 |
_LIT8( KNSmlDdfBearerLDesc, "Bearer valid" );
|
|
158 |
_LIT8( KNSmlDdfDirectionDesc, "Direction for network type" );
|
|
159 |
_LIT8( KNSmlDdfInternetDesc, "IP-routable network segment" );
|
|
160 |
_LIT8( KNSmlDdfNAPAddrDesc, "NAP-Address" );
|
|
161 |
_LIT8( KNSmlDdfNAPAddrTyDesc, "NAP-Address-Type" );
|
|
162 |
_LIT8( KNSmlDdfDNSAddrDesc, "DNSAddr node" );
|
|
163 |
_LIT8( KNSmlDdfDNSAddrLDesc, "Address of a DNS server" );
|
|
164 |
_LIT8( KNSmlDdfDNSAddrTyDesc, "Type of DNS address" );
|
|
165 |
_LIT8( KNSmlDdfDNSPriorityDesc, "Rank of DNS server" );
|
|
166 |
_LIT8( KNSmlDdfNAPAuthInfDesc, "Authentication Info" );
|
|
167 |
_LIT8( KNSmlDdfAuthNameDesc, "Loginname" );
|
|
168 |
_LIT8( KNSmlDdfAuthSecrDesc, "Loginpassword" );
|
|
169 |
_LIT8( KNSmlDdfPxAuthInfDesc, "Proxy Authentication Info" );
|
|
170 |
_LIT8( KNSmlDdfPxAuthIdDesc, "Proxy Loginname" );
|
|
171 |
_LIT8( KNSmlDdfPxAuthPWDesc, "Proxy Loginpassword" );
|
|
172 |
|
|
173 |
_LIT8( KNSmlDdfIPAddrFromServerDesc,"Get IP addresses from server?" );
|
|
174 |
_LIT8( KNSmlDdfIPAddrDesc, "IP-address" );
|
|
175 |
_LIT8( KNSmlDdfDNSAddrFromServerDesc,"Get DNS addresses from server?" );
|
|
176 |
_LIT8( KNSmlDdfIPv6DNSAddrFromServerDesc,"Get IPv6 addresses from server?" );
|
|
177 |
_LIT8( KNSmlDdfIfNetworksDesc, "Comma separated list of network protocols, e.g. PPP" );
|
|
178 |
_LIT8( KNSmlDdfIAPServiceDesc, "IAP service" );
|
|
179 |
|
|
180 |
_LIT8( KNSmlDdfIAPSeamlessnessDesc, "IAP seamlessness value" );
|
|
181 |
_LIT8( KNSmlDdfIAPMetaDataDesc, "IAP meta data value" );
|
|
182 |
|
|
183 |
_LIT8( KNSmlDdfDomainDesc, "Domain desc" );
|
|
184 |
_LIT8( KNSmlDdfDomainLDesc, "Domain, for which the Proxy is responsible" );
|
|
185 |
|
|
186 |
_LIT8( KNSmlDdfNoPxForDesc, "No proxy for listed AP:s" );
|
|
187 |
_LIT8( KNSmlDdfNoPxForLDesc, "No proxy for this AP" );
|
|
188 |
|
|
189 |
_LIT8( KNSmlDdfNetworksDesc, "Networks" );
|
|
190 |
_LIT8( KNSmlDdfNetworkNameDesc, "Network Name" );
|
|
191 |
_LIT8( KNSmlDdfNetworkIDDesc, "Network ID" );
|
|
192 |
|
|
193 |
//Other
|
|
194 |
_LIT8( KNSmlDNS1, "/DNS1" );
|
|
195 |
_LIT8( KNSmlDNS2, "/DNS2" );
|
|
196 |
_LIT8( KNSmlDNS3, "/DNS3" );
|
|
197 |
_LIT8( KNSmlDNS4, "/DNS4" );
|
|
198 |
|
|
199 |
_LIT8(KNSmlAPnode, "NAPDef/Px");
|
|
200 |
|
|
201 |
_LIT8(KNSmlNAPDefGPRSnode, "Name/NAPID/Startpg/Bearer/IPAddr/IPAddrFromServer/IfNetworks/NAPAddr/NAPAddrTy/IPDNSAddrFromServer/IPv6DNSAddrFromServer/DNSAddr/NAPAuthInf/DefGW/NetworkMask/PPPComp/UsePTxtLog/GPRSPDP/Networks/IAPService/Seamlessness/MetaData/Linger");
|
|
202 |
|
|
203 |
//_LIT8(KNSmlNAPDefCSDnode, "Name/NAPID/Bearer/IPAddr/IPAddrFromServer/IfNetworks/NAPAddr/NAPAddrTy/CallTy/IPDNSAddrFromServer/IPv6DNSAddrFromServer/DNSAddr/NAPAuthInf/LnkSpeed/DefGW/NetworkMask/PPPComp/UseCB/CBTy/CBNbr/UsePTxtLog/ModemInit/Networks/IAPService");
|
|
204 |
|
|
205 |
//_LIT8(KNSmlNAPDefGPRSnode, "Name/NAPID/Bearer/IPAddr/IPAddrFromServer/IfNetworks/NAPAddr/NAPAddrTy/CallTy/IPDNSAddrFromServer/IPv6DNSAddrFromServer/DNSAddr/NAPAuthInf/LnkSpeed/DefGW/NetworkMask/PPPComp/UsePTxtLog/GPRSPDP/Networks/IAPService");
|
|
206 |
|
|
207 |
_LIT8(KNSmlPxnode, "Name/PxID/PxAddr/Port/ToNAPID/Startpg/Domain/PxAuthInf/NoPxFor");
|
|
208 |
|
|
209 |
#ifdef __SYNCML_DM_LSCRIPT
|
|
210 |
_LIT8(KNSmlLoginscriptnode, "/LoginTW/LoginScriptData");
|
|
211 |
#endif
|
|
212 |
|
|
213 |
_LIT8(KNSmlDNSAddrNode, "DNSAddrL/DNSAddrTy/DNSPriority" );
|
|
214 |
|
|
215 |
_LIT8(KNSmlWLannode, "/WLAN/SSID/UsedSSID/SSIDHidden/UseWPAPSK/NetworkMode/SecurityMode/WEPAuthMode/WPAPreSharedKey/WLANEAPList/WEPKeyIndex/WEPKey/Data/Length/WEPKeyID/Username/Password/EAPType/Realm/UsePseudonym/Encapsulation/VerifyCertRealm/RequireClientAuthentication/SessionValidityTime/CipherSuite/AllowPEAPv0/AllowPEAPv1/AllowPEAPv2/IssuerName/SubjectName/CertType/SerialNumber/SubjectKeyId/Fingerprint");
|
|
216 |
|
|
217 |
//Default data values
|
|
218 |
_LIT( KNSmlDefName, "APAdapterIns" );
|
|
219 |
_LIT( KNSmlDefAP, "AP" );
|
|
220 |
_LIT8( KNSmlFirstDNSPri, "1" );
|
|
221 |
_LIT8( KNSmlSecondDNSPri, "2" );
|
|
222 |
_LIT8( KNSmlDNSIp, "IP" );
|
|
223 |
_LIT8( KNSmlDNSIp6, "IP6" );
|
|
224 |
_LIT8( KNSmlEmptyIpv4Address8, "0.0.0.0");
|
|
225 |
_LIT( KNSmlEmptyIpv4Address, "0.0.0.0");
|
|
226 |
_LIT8( KNSmlMimeTypeTextPlain, "text/plain" );
|
|
227 |
|
|
228 |
_LIT8( KNSmlDmApValOutgoing, "Outgoing" );
|
|
229 |
_LIT8( KNSmlDmApValIncoming, "Incoming" );
|
|
230 |
_LIT8( KNSmlDmApVal3Gppps, "3GPPPS" );
|
|
231 |
_LIT8( KNSmlDmApValGsmCsd, "GSM-CSD" );
|
|
232 |
_LIT8( KNSmlDmApValGsmGprs, "GSM-GPRS" );
|
|
233 |
_LIT8( KNSmlDmApValGsmHscsd, "GSM-HSCSD" );
|
|
234 |
_LIT8( KNSmlDmApValVpn, "VPN" );
|
|
235 |
_LIT8( KNSmlDmApValWlan, "WLAN" );
|
|
236 |
_LIT8( KNSmlDmApValFSlash, "/" );
|
|
237 |
_LIT8( KNSmlDmApValAnalog, "ANALOG-MODEM" );
|
|
238 |
_LIT8( KNSmlDmApValV110, "V.110" );
|
|
239 |
_LIT8( KNSmlDmApValV120, "V.120" );
|
|
240 |
|
|
241 |
_LIT8( KNSmlDmApValAuto, "Auto" );
|
|
242 |
_LIT8( KNSmlDmApVal2400, "2400" );
|
|
243 |
_LIT8( KNSmlDmApVal4800, "4800" );
|
|
244 |
_LIT8( KNSmlDmApVal9600, "9600" );
|
|
245 |
_LIT8( KNSmlDmApVal14400, "14400" );
|
|
246 |
_LIT8( KNSmlDmApVal19200, "19200" );
|
|
247 |
_LIT8( KNSmlDmApVal28800, "28800" );
|
|
248 |
_LIT8( KNSmlDmApVal32000, "32000" );
|
|
249 |
_LIT8( KNSmlDmApVal33600, "33600" );
|
|
250 |
_LIT8( KNSmlDmApVal38400, "38400" );
|
|
251 |
_LIT8( KNSmlDmApVal43200, "43200" );
|
|
252 |
_LIT8( KNSmlDmApVal48000, "48000" );
|
|
253 |
_LIT8( KNSmlDmApVal56000, "56000" );
|
|
254 |
_LIT8( KNSmlDmApVal57600, "57600" );
|
|
255 |
_LIT8( KNSmlDmApVal64000, "64000" );
|
|
256 |
_LIT8( KNSmlDmApValExtended, "Extended" );
|
|
257 |
_LIT8( KNSmlDmApValIpv4, "IPv4" );
|
|
258 |
_LIT8( KNSmlDmApValIpv6, "IPv6" );
|
|
259 |
_LIT8( KNSmlDmApValTrue, "True" );
|
|
260 |
_LIT8( KNSmlDmApValFalse, "False" );
|
|
261 |
|
|
262 |
//class forwards
|
|
263 |
class CNSmlWLanAdapter;
|
|
264 |
|
|
265 |
struct TNSmlAPAddElement
|
|
266 |
{
|
|
267 |
HBufC8 *iUri;
|
|
268 |
HBufC8 *iData;
|
|
269 |
TInt iStatusRef;
|
|
270 |
HBufC8* iLuid;
|
|
271 |
TBool iLeaf;
|
|
272 |
TBool iDone;
|
|
273 |
};
|
|
274 |
|
|
275 |
enum TNSmlAPLeafType
|
|
276 |
{
|
|
277 |
EDMUpdate, EDMAdd, EDMDelete, EDMUnset
|
|
278 |
};
|
|
279 |
|
|
280 |
struct TNSmlAPBufferElement
|
|
281 |
{
|
|
282 |
CArrayFixFlat<TNSmlAPAddElement> *iNodeBuf;
|
|
283 |
CArrayFixFlat<TNSmlAPAddElement> *iWlanNodeBuf;
|
|
284 |
HBufC8* iMappingName;
|
|
285 |
HBufC8* iName;
|
|
286 |
TBool iExecuted;
|
|
287 |
TInt iLuid;
|
|
288 |
TBool iBearer;
|
|
289 |
TBool iDirection;
|
|
290 |
TBool iNameReceived;
|
|
291 |
TBool iDnsUpdateBuf;
|
|
292 |
};
|
|
293 |
//
|
|
294 |
// ------------------------------------------------------------------------------------------------
|
|
295 |
// CNSmlInternetAdapter
|
|
296 |
// ------------------------------------------------------------------------------------------------
|
|
297 |
class CNSmlInternetAdapter : public CSmlDmAdapter
|
|
298 |
{
|
|
299 |
public:
|
|
300 |
|
|
301 |
enum TNSmlAPFieldType
|
|
302 |
{
|
|
303 |
EStr, EInt, EBin, EBool, ESpec, EWap, EWrong
|
|
304 |
};
|
|
305 |
static CNSmlInternetAdapter* NewL(MSmlDmCallback* aDmCallback);
|
|
306 |
static CNSmlInternetAdapter* NewLC(MSmlDmCallback* aDmCallback);
|
|
307 |
|
|
308 |
virtual ~CNSmlInternetAdapter();
|
|
309 |
|
|
310 |
// Adapter interface
|
|
311 |
void DDFVersionL(CBufBase& aDDFVersion);
|
|
312 |
void DDFStructureL(MSmlDmDDFObject& aDDF);
|
|
313 |
void
|
|
314 |
AddLeafObjectL(const TDesC8& aURI, const TDesC8& aParentLUID,
|
|
315 |
const TDesC8& aObject, const TDesC8& aType,
|
|
316 |
const TInt aStatusRef);
|
|
317 |
void
|
|
318 |
UpdateLeafObjectL(const TDesC8& aURI, const TDesC8& aLUID,
|
|
319 |
const TDesC8& aObject, const TDesC8& aType,
|
|
320 |
const TInt aStatusRef);
|
|
321 |
void UpdateLeafObjectL(const TDesC8& aURI, const TDesC8& aLUID,
|
|
322 |
RWriteStream*& aStream, const TDesC8& aType, TInt aStatusRef);
|
|
323 |
void DeleteObjectL(const TDesC8& aURI, const TDesC8& aLUID,
|
|
324 |
const TInt aStatusRef);
|
|
325 |
void FetchLeafObjectL(const TDesC8& aURI, const TDesC8& aLUID,
|
|
326 |
const TDesC8& aType, const TInt aResultsRef,
|
|
327 |
const TInt aStatusRef);
|
|
328 |
void FetchLeafObjectSizeL(const TDesC8& aURI, const TDesC8& aLUID,
|
|
329 |
const TDesC8& aType, TInt aResultsRef, TInt aStatusRef);
|
|
330 |
void ChildURIListL(const TDesC8& aURI, const TDesC8& aLUID,
|
|
331 |
const CArrayFix<TSmlDmMappingInfo>& aPreviousURISegmentList,
|
|
332 |
const TInt aResultsRef, const TInt aStatusRef);
|
|
333 |
void AddNodeObjectL(const TDesC8& aURI, const TDesC8& aParentLUID,
|
|
334 |
const TInt aStatusRef);
|
|
335 |
void ExecuteCommandL(const TDesC8& aURI, const TDesC8& aLUID,
|
|
336 |
const TDesC8& aArgument, const TDesC8& aType, TInt aStatusRef);
|
|
337 |
void ExecuteCommandL(const TDesC8& aURI, const TDesC8& aLUID,
|
|
338 |
RWriteStream*& aStream, const TDesC8& aType, TInt aStatusRef);
|
|
339 |
void CopyCommandL(const TDesC8& aTargetURI, const TDesC8& aTargetLUID,
|
|
340 |
const TDesC8& aSourceURI, const TDesC8& aSourceLUID,
|
|
341 |
const TDesC8& aType, TInt aStatusRef);
|
|
342 |
void StartAtomicL();
|
|
343 |
void CommitAtomicL();
|
|
344 |
void RollbackAtomicL();
|
|
345 |
TBool StreamingSupport(TInt& aItemSize);
|
|
346 |
void StreamCommittedL();
|
|
347 |
void CompleteOutstandingCmdsL();
|
|
348 |
|
|
349 |
private:
|
|
350 |
void ConstructL();
|
|
351 |
CNSmlInternetAdapter(TAny* aEcomArguments);
|
|
352 |
TDesC8& SetIntObjectLC(const TInt& aObject);
|
|
353 |
TInt SetField(const TDesC8& aSource);
|
|
354 |
TInt GetIntObject8(const TDesC8& aObject);
|
|
355 |
TInt IntLUID(const TDesC8& aLUID);
|
|
356 |
|
|
357 |
void AddNodeBufferL(const TDesC8& aURI, const TDesC8& aParentLUID,
|
|
358 |
const TInt aStatusRef, const TBool aDontAppend,
|
|
359 |
const TBool aWlan = EFalse);
|
|
360 |
|
|
361 |
void AddLeafBufferL(const TDesC8& aURI, const TDesC8& aParentLUID,
|
|
362 |
const TDesC8& aObject, const TDesC8& aType,
|
|
363 |
const TInt aStatusRef, const TBool aWlan = EFalse);
|
|
364 |
|
|
365 |
CSmlDmAdapter::TError FetchLeafObjectL(const TDesC8& aURI,
|
|
366 |
const TDesC8& aLUID, const TDesC8& aType, CBufBase& aObject);
|
|
367 |
TPtrC8 LastURISeg(const TDesC8& aURI);
|
|
368 |
TPtrC8 FirstURISeg(const TDesC8& aURI);
|
|
369 |
TPtrC8 GetDynamicAPNodeUri(const TDesC8& aURI);
|
|
370 |
void ExecuteBufferL(const TDesC8& aURI, const TBool aCompleting = EFalse);
|
|
371 |
TPtrC8 GetAddURISeg(const TDesC8& aURI, const TDesC8& aName);
|
|
372 |
|
|
373 |
CNSmlInternetAdapter::TNSmlAPFieldType
|
|
374 |
GetAPFieldType(const TDesC8& aURI) const;
|
|
375 |
TBool GetAPField(TPtrC& aTableName, TPtrC& aColumn) const;
|
|
376 |
TBool NotValidStrLenght(const TDesC& aSource);
|
|
377 |
|
|
378 |
TDesC8& ConvertTo8LC(const TDesC& aSource);
|
|
379 |
TDesC16& ConvertTo16LC(const TDesC8& aSource);
|
|
380 |
|
|
381 |
TInt InitializeGPRSL(CCommsDbTableView* aTable);
|
|
382 |
TInt InitializeProxyL(CCommsDbTableView* aTable);
|
|
383 |
|
|
384 |
TInt InitializeWAPIAPL(CCommsDbTableView* aTable, const TDesC8& aName);
|
|
385 |
TInt InitializeWAPL(CCommsDbTableView* aTable);
|
|
386 |
TInt InitializeLANServiceL(CCommsDbTableView* aTable);
|
|
387 |
TInt InitializeVPNServiceL(CCommsDbTableView* aTable);
|
|
388 |
TBool IsValidNameL(const TDesC8& aName);
|
|
389 |
TBool IsValidIPv4AddressL(const TDesC8& aNapAddr);
|
|
390 |
void NextAPNameL(const TDesC8& aName);
|
|
391 |
|
|
392 |
TUint32 GetIAPSeamlessnessL(TUint32 aId);
|
|
393 |
TUint32 GetIAPMetaDataL(TUint32 aId);
|
|
394 |
void
|
|
395 |
SetIAPSeamlessnessL(TUint32 apMetaID, TUint32 aSeam,
|
|
396 |
TInt aStatusRef);
|
|
397 |
void SetIAPMetaDataL(TUint32 apMetaID, TUint32 aMeta, TInt aStatusRef);
|
|
398 |
|
|
399 |
TBool CheckEnforcementL();
|
|
400 |
TBool CheckWLANEnforcementL();
|
|
401 |
TInt UnprotectWLANAPItemL(TUint32 aId);
|
|
402 |
TInt DoProtectWAPTablesL(TBool aProtect);
|
|
403 |
void DoLockIAPTablesL(TBool aLock);
|
|
404 |
|
|
405 |
TBool IsIAPRecordLockedL(TUint32 aRecord);
|
|
406 |
TInt DoProtectIAPRecordL(TUint32 aRecord, TBool aProtect);
|
|
407 |
TBool IsProxyRecordLockedL(TUint32 aRecord);
|
|
408 |
TInt DoProtectProxyRecordL(TUint32 aRecord, TBool aProtect);
|
|
409 |
TBool IsServiceRecordLockedL(TUint32 aRecord);
|
|
410 |
TInt DoProtectServiceRecordL(TUint32 aRecord, TBool aProtect);
|
|
411 |
TBool IsWAPAccessPointRecordLockedL(TUint32 aRecord);
|
|
412 |
TInt DoProtectWAPAccessRecordL(TUint32 aRecord, TBool aProtect);
|
|
413 |
|
|
414 |
TBool IsWLANfield(const TDesC8& aURI);
|
|
415 |
TBool IsWlanL(const TDesC8& aURI);
|
|
416 |
TBool GetLanBearerL(TUint32& aId);
|
|
417 |
|
|
418 |
void SaveIAPDataL(const TDesC8& aURI);
|
|
419 |
TBool GetModemBearerL(TUint32& aId);
|
|
420 |
TBool IsInsertAllowedL();
|
|
421 |
TUint32 GetMaxIdL();
|
|
422 |
TBool GetProxyIdL(const TDesC8& aURI);
|
|
423 |
|
|
424 |
TBool APExistsL(TUint32 aId);
|
|
425 |
TBool NAPDefExistsL(TUint32 aId);
|
|
426 |
TBool PxExistsL(TUint32 aId);
|
|
427 |
TBool WapAPExistsL(TUint32 aId);
|
|
428 |
TBool NetworkExistsL(TUint32 aId);
|
|
429 |
TBool NetworkNameExistsL(TUint32& aId, const TDesC8& aObject);
|
|
430 |
TBool AddNetworkL(TUint32& aId, const TDesC8& aObject);
|
|
431 |
|
|
432 |
TBool DeleteAPL(TUint32 aId);
|
|
433 |
TBool DeleteNAPDefL(TUint32 aId);
|
|
434 |
TBool DeleteProxyL(TUint32 aId);
|
|
435 |
TBool DeleteWapAPL(TUint32 aId);
|
|
436 |
|
|
437 |
TUint32 GetAPIdFromURIL(const TDesC8& aURI);
|
|
438 |
void IsWapPort(const TDesC8& aObject);
|
|
439 |
void FillNodeInfoL(MSmlDmDDFObject& aNode, TSmlDmAccessTypes aAccTypes,
|
|
440 |
MSmlDmDDFObject::TOccurence aOccurrence,
|
|
441 |
MSmlDmDDFObject::TScope aScope,
|
|
442 |
MSmlDmDDFObject::TDFFormat aFormat, const TDesC8& aDescription);
|
|
443 |
|
|
444 |
TInt UpdateIAPnameL(TUint32 aId, const TDesC8& aObject);
|
|
445 |
TUint32 GetLocationL();
|
|
446 |
|
|
447 |
TBool
|
|
448 |
InitializeDNSParamsFromBuffL(const TPtrC8 aParentUri,
|
|
449 |
TInt& aDnsPri);
|
|
450 |
TInt
|
|
451 |
DnsToLuid(const UriUtils::TUriHostType aType,
|
|
452 |
const TInt aPriority) const;
|
|
453 |
TInt LuidToDns(UriUtils::TUriHostType& aType, TInt& aPriority,
|
|
454 |
const TInt aLuid) const;
|
|
455 |
TPtrC8 RemoveLastSeg(const TDesC8& aURI) const;
|
|
456 |
|
|
457 |
void ClearBuffer(CArrayFixFlat<TNSmlAPAddElement>* aBuffer);
|
|
458 |
void LingerValueL(const TDesC8& aObject);
|
|
459 |
void AddLingerL(const TInt aIapId, const TInt aLingerInterval);
|
|
460 |
void UpdateLingerL(const TInt aIapId, const TInt aLingerInterval);
|
|
461 |
void GetLingerL(const TInt aIapId, TInt& aLingerInterval);
|
|
462 |
void DeleteLingerL(const TInt aIapId);
|
|
463 |
TBool Notalpha(const TDesC& aValue);
|
|
464 |
TUint32 ConstructTreeL(const TDesC8& aURI);
|
|
465 |
TBool IsAPUriFormatMatchPredefined(const TDesC8 & aURI);
|
|
466 |
|
|
467 |
private:
|
|
468 |
MSmlDmCallback* iCallBack;
|
|
469 |
|
|
470 |
CNSmlWLanAdapter* iWlanAdapter;
|
|
471 |
|
|
472 |
TInt iLUID;
|
|
473 |
TInt iParentLUID;
|
|
474 |
TInt iObject;
|
|
475 |
TBool iWapPort;
|
|
476 |
TInt iDirection;
|
|
477 |
TBool iStaleMapUpdate;
|
|
478 |
HBufC8* iField;
|
|
479 |
TNSmlAPLeafType iLeafType;
|
|
480 |
|
|
481 |
TBuf8<KCommsDbSvrMaxFieldLength> iWAPAccessPoint;
|
|
482 |
TUint32 iWapId;
|
|
483 |
TBuf<KCommsDbSvrMaxFieldLength> iWapBearer;
|
|
484 |
TBuf8<KCommsDbSvrMaxFieldLength> iWapName;
|
|
485 |
TBuf8<KCommsDbSvrMaxFieldLength> iWapUserName;
|
|
486 |
TBuf8<KCommsDbSvrMaxFieldLength> iWapPassword;
|
|
487 |
|
|
488 |
CArrayFixFlat<TNSmlAPBufferElement> *iBuffer;
|
|
489 |
TBool i3GPPPS;
|
|
490 |
|
|
491 |
private:
|
|
492 |
// data
|
|
493 |
CCommsDatabase* iDatabase;
|
|
494 |
|
|
495 |
TBool iIAPExists;
|
|
496 |
|
|
497 |
TInt iDnsIpv4Pri; // 1 or 2
|
|
498 |
TInt iDnsIpv6Pri;
|
|
499 |
TInt iExecutionIndex;
|
|
500 |
TBool iExecutingBuffer;
|
|
501 |
TBool iDnsUpdate;
|
|
502 |
|
|
503 |
TBuf8<KCommsDbSvrMaxFieldLength> iIAPName;
|
|
504 |
|
|
505 |
TUint32 iIAPId;
|
|
506 |
|
|
507 |
TUint32 iISPId;
|
|
508 |
|
|
509 |
TUint32 iProxyId;
|
|
510 |
TUint32 iProxyISP;
|
|
511 |
|
|
512 |
TBuf<KCommsDbSvrMaxFieldLength> iProxyServiceType;
|
|
513 |
TBuf8<KCommsDbSvrMaxFieldLength> iProxyServerName;
|
|
514 |
|
|
515 |
HBufC8* iPrevURI;
|
|
516 |
TInt iPrevLUID;
|
|
517 |
|
|
518 |
TBuf<KCommsDbSvrMaxFieldLength> iBearer;
|
|
519 |
|
|
520 |
TUint32 iBearerType;
|
|
521 |
TInt iNetworkId;
|
|
522 |
TInt iLingerValue;
|
|
523 |
TBool iLingerFlag;
|
|
524 |
TBool iTransactionCommitted;
|
|
525 |
TBool iWAPRelock;
|
|
526 |
RArray<TPtrC> iLockTableList;
|
|
527 |
|
|
528 |
TBool iWlanSupported;
|
|
529 |
TBool isAdd;
|
|
530 |
};
|
|
531 |
|
|
532 |
#endif // __NSMLINTERNETADAPTER_H__
|
|
533 |
// End of File
|