|
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 __GPRSP_H__ |
|
19 #define __GPRSP_H__ |
|
20 |
|
21 #include <commsdat.h> |
|
22 #include <commsdattypesv1_1.h> |
|
23 #include <cdblen.h> |
|
24 using namespace CommsDat; |
|
25 |
|
26 class CIpAddress; |
|
27 |
|
28 class CGprsParser : public CBase |
|
29 /** |
|
30 @internalComponent |
|
31 @released |
|
32 */ |
|
33 { |
|
34 public: |
|
35 static CGprsParser* NewLC(); |
|
36 static CGprsParser* NewL(); |
|
37 ~CGprsParser(); |
|
38 |
|
39 void CheckMandatoryFieldsL(CParsedFieldCollection& aIacpFields); |
|
40 |
|
41 void ParseL(CParsedFieldCollection& aIacpFields); |
|
42 void ProcessL(CIacSettingsParser::TIacpConnectionPreferenceFlag& aConnectionPreference); |
|
43 |
|
44 private: |
|
45 |
|
46 enum TDirection{ EOutgoing, EIncoming }; |
|
47 CGprsParser(); |
|
48 void ConstructL(); |
|
49 |
|
50 //commit functions |
|
51 void CreateProxiesTableL(const TDesC& aTableName); |
|
52 |
|
53 void WriteToGPRSTableL(TDirection aDir); |
|
54 void WriteToIAPTableL(); |
|
55 |
|
56 void CreatePreferencesTableL(TCommDbConnectionDirection aDirection, CIacSettingsParser::TIacpConnectionPreferenceFlag& aConnectionPreference); |
|
57 TUint32 GetIapIdL(const TDesC& aTableName); |
|
58 TPtrC LimitStringSize(const TDesC& aString); |
|
59 TPtrC8 LimitStringSize(const TDesC8& aString); |
|
60 |
|
61 private: |
|
62 HBufC* iName; |
|
63 HBufC* iApn; |
|
64 TUint32 iPdpType; |
|
65 CIpAddress* iPdpAddress; |
|
66 CIpAddress* iIfName; |
|
67 HBufC* iLoginName; |
|
68 TBool iLoginPrompt; |
|
69 HBufC* iLoginPass; |
|
70 CIpAddress* iAddr; |
|
71 TBool iDnsFromServer; |
|
72 CIpAddress* iDNS1; |
|
73 CIpAddress* iDNS2; |
|
74 CIpAddress* iNetMask; |
|
75 |
|
76 TBool iNoExistingIpAddr; |
|
77 TBool iNoExistingDNS; |
|
78 |
|
79 //commit data |
|
80 CMDBSession* iDbSession; |
|
81 TUint32 iRecordId; |
|
82 }; |
|
83 #endif |