1 /* |
|
2 * Copyright (c) 2008 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __CREATORACCESSPOINTS_H__ |
|
22 #define __CREATORACCESSPOINTS_H__ |
|
23 |
|
24 #include "creator_model.h" |
|
25 #include "creator_modulebase.h" |
|
26 #include "creator_connectionmethodbase.h" |
|
27 |
|
28 #include <e32base.h> |
|
29 #include <commdb.h> |
|
30 #include <ApSelect.h> |
|
31 #include <ApDataHandler.h> |
|
32 #include <ApAccessPointItem.h> |
|
33 #include <ApUtils.h> |
|
34 #include <ApEngineConsts.h> |
|
35 #include <msvapi.h> |
|
36 #include <mtclreg.h> |
|
37 #include <mmsclient.h> |
|
38 |
|
39 |
|
40 class CCreatorEngine; |
|
41 class CAccessPointsParameters; |
|
42 |
|
43 |
|
44 |
|
45 class CCreatorAccessPoints : public CCreatorConnectionSettingsBase, public MMsvSessionObserver |
|
46 { |
|
47 public: |
|
48 static CCreatorAccessPoints* NewL(CCreatorEngine* aEngine); |
|
49 static CCreatorAccessPoints* NewLC(CCreatorEngine* aEngine); |
|
50 ~CCreatorAccessPoints(); |
|
51 |
|
52 private: |
|
53 CCreatorAccessPoints(); |
|
54 void ConstructL(CCreatorEngine* aEngine); // from MCreatorModuleBase |
|
55 |
|
56 void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3); // from MMsvSessionObserver |
|
57 |
|
58 public: |
|
59 TBool AskDataFromUserL(TInt aCommand, TInt& aNumberOfEntries); // from MCreatorModuleBase |
|
60 |
|
61 TInt CreateConnectionSettingsEntryL(CCreatorModuleBaseParameters *aParameters); |
|
62 TUint32 AccessPointNameToIdL(const TDesC& aAPName, TBool aAnyIfNotFound = EFalse ); |
|
63 |
|
64 void DeleteAllL(); |
|
65 void DeleteAllCreatedByCreatorL(); |
|
66 |
|
67 private: |
|
68 CCommsDatabase* iCommsDb; |
|
69 CApDataHandler* iApDataHandler; |
|
70 CApUtils* iApUtils; |
|
71 CAccessPointsParameters* iParameters; |
|
72 RArray<TUint32> iEntryIds; // TUint32 CApDataHandler::CreateFromDataL |
|
73 |
|
74 public: |
|
75 }; |
|
76 |
|
77 |
|
78 class CAccessPointsParameters : public CCreatorModuleBaseParameters |
|
79 { |
|
80 public: |
|
81 HBufC* iConnectionName; // connection name |
|
82 TApBearerType iBearerType; // bearer type |
|
83 HBufC* iWapStartPage; // WAP start page |
|
84 TUint32 iWapWspOption; // connection type |
|
85 HBufC* iGprsAcessPointName; // access point name |
|
86 HBufC* iIspLoginName; // username |
|
87 TBool iSecureAuthentication; // password authentication |
|
88 HBufC* iIspLoginPass; // password |
|
89 TBool iPromptPassword; // prompt password |
|
90 HBufC* iWapGatewayAddress; // WAP gateway address |
|
91 HBufC* iIspIPAddr; // phone IP |
|
92 HBufC* iIspIPNameServer1; // primary name server |
|
93 HBufC* iIspIPNameServer2; // secondary name server |
|
94 HBufC* iIspDefaultTelNumber; // datacall number |
|
95 TUint32 iIspBearerCallTypeIsdn; // datacall type |
|
96 TUint32 iIspBearerSpeed; // max connection speed |
|
97 HBufC* iProxyServerAddress; // proxy address |
|
98 TUint32 iProxyPortNumber; // proxy number |
|
99 |
|
100 void SetRandomCMNameL(CCreatorEngine& aEngine); |
|
101 void SetRandomLoginNameL(CCreatorEngine& aEngine); |
|
102 void SetRandomLoginPassL(CCreatorEngine& aEngine); |
|
103 void SetRandomSecureAuthenticationL(CCreatorEngine& aEngine); |
|
104 void SetRandomPromptPasswordL(CCreatorEngine& aEngine); |
|
105 void SetRandomProxyAddressL(CCreatorEngine& aEngine); |
|
106 void SetRandomProxyPortL(CCreatorEngine& aEngine); |
|
107 void SetRandomStartPageL(CCreatorEngine& aEngine); |
|
108 void SetRandomIPAddressL(CCreatorEngine& aEngine); |
|
109 void SetRandomIP4NameServer1L(CCreatorEngine& aEngine); |
|
110 void SetRandomIP4NameServer2L(CCreatorEngine& aEngine); |
|
111 void SetRandomTelephoneNumberL(CCreatorEngine& aEngine); |
|
112 void SetRandomBearerTypeIsdnL(CCreatorEngine& aEngine); |
|
113 void SetRandomBearerSpeedL(CCreatorEngine& aEngine); |
|
114 void SetRandomWapWspOptionL(CCreatorEngine& aEngine); |
|
115 void SetRandomGatewayAddressL(CCreatorEngine& aEngine); |
|
116 |
|
117 |
|
118 public: |
|
119 CAccessPointsParameters(); |
|
120 ~CAccessPointsParameters(); |
|
121 }; |
|
122 |
|
123 |
|
124 |
|
125 #endif // __CREATORACCESSPOINTS_H__ |
|