|
1 // Copyright (c) 1998-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 // Internet Service Provider Settings |
|
15 // |
|
16 // |
|
17 |
|
18 #ifndef __ISPP_H__ |
|
19 #define __ISPP_H__ |
|
20 #include <cdbcols.h> |
|
21 #include <ipaddr.h> |
|
22 |
|
23 #include <commsdat.h> |
|
24 #include <commsdattypesv1_1.h> |
|
25 using namespace CommsDat; |
|
26 #include <cdblen.h> |
|
27 |
|
28 class CIspParser : public CBase |
|
29 /** |
|
30 @internalComponent |
|
31 @released |
|
32 */ |
|
33 { |
|
34 public: |
|
35 static CIspParser* NewLC(TInt aSmsType); |
|
36 static CIspParser* NewL(TInt aSmsType); |
|
37 ~CIspParser(); |
|
38 |
|
39 void CheckMandatoryFieldsL(CParsedFieldCollection& aIacpFields); |
|
40 |
|
41 void ParseL(CParsedFieldCollection& aIacpFields); |
|
42 void ProcessL(CIacSettingsParser::TIacpConnectionPreferenceFlag& aConnectionPreference); |
|
43 TUint32 IapEntryId(); |
|
44 |
|
45 private: |
|
46 CIspParser(TInt aSmsType); |
|
47 void ConstructL(); |
|
48 |
|
49 void WriteToDialOutISPTableL(); |
|
50 void WriteToDialOutIAPTableL(); |
|
51 void WriteToPreferencesTableL(TCommDbConnectionDirection aDirection,CIacSettingsParser::TIacpConnectionPreferenceFlag& aConnectionPreference); |
|
52 void WriteToProxiesTableL(); |
|
53 |
|
54 void SetIapIdsL(); |
|
55 void GetIapIdL(const TDesC& aTableName, TUint32& aId); |
|
56 TPtrC LimitStringSize(const TDesC& aString); |
|
57 TPtrC8 LimitStringSize(const TDesC8& aString); |
|
58 |
|
59 void SetGlobalIapL(const TDesC& aTable, TUint32 aIAP); |
|
60 |
|
61 private: |
|
62 TInt iSmsType; //Basic or Extended IAP |
|
63 //Global Setting data |
|
64 TUint32 iIapIsp; |
|
65 TUint32 iProxyIsp; |
|
66 TUint32 iIapModem; |
|
67 TUint32 iIapLocation; |
|
68 TUint32 iIapChargeCard; |
|
69 |
|
70 //Basic IAP data (Dial Out ISP) |
|
71 HBufC* iName; |
|
72 HBufC* iDefaultTelNum; |
|
73 HBufC* iLoginName; |
|
74 TBool iLoginPrompt; |
|
75 HBufC* iLoginPass; |
|
76 HBufC8* iModemInit; |
|
77 CIpAddress* iAddr; |
|
78 CIpAddress* iDNS1; |
|
79 CIpAddress* iDNS2; |
|
80 CIpAddress* iNetMask; |
|
81 CIpAddress* iGateway; |
|
82 |
|
83 //Extended IAP data (Proxies Table) |
|
84 CIpAddress* iProxyExeptions; //SMS_PROXY_EXCEPTIONS |
|
85 CIpAddress* iProxyServerName; //SMS_PROXY_SERVER_NAME |
|
86 TUint32 iProxyPortNum; //SMS_PROXY_PORT_NUMBER |
|
87 CIpAddress* iSecureProxySrv; //SMS_SECURE_PROXY |
|
88 TUint32 iSecurePortNum; //SMS_SECURE_PORT |
|
89 TBool iSecureProxy; |
|
90 HBufC* iLoginCustomisation; //SMS_LOGIN_CUSTOMISATION |
|
91 TBool iSWCompressionEnabled; //SMS_ENABLE_SW_COMP //PPP compression "Y"|"N" |
|
92 |
|
93 TBool iNoExistingIpAddr; |
|
94 TBool iNoExistingDNS; |
|
95 |
|
96 TUint32 iDialOutIap; |
|
97 |
|
98 CMDBSession* iDbSession; |
|
99 TUint32 iRecordId; |
|
100 |
|
101 }; |
|
102 #endif |