1 /* |
|
2 * Copyright (c) 2004 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: Declaration of the class CProcessorGlobal. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef CDCPROCESSORGLOBAL_H |
|
22 #define CDCPROCESSORGLOBAL_H |
|
23 |
|
24 |
|
25 // INCLUDE FILES |
|
26 |
|
27 #include <e32base.h> |
|
28 |
|
29 #include <metadatabase.h> |
|
30 |
|
31 #include "cdcprocessorbase.h" |
|
32 |
|
33 using namespace CommsDat; |
|
34 |
|
35 // FORWARD DECLARATIONS |
|
36 class RCmConnectionMethodExt; |
|
37 class RCmDestinationExt; |
|
38 class CReaderBase; |
|
39 class CommsDat::CMDBSession; |
|
40 struct TCmGenConnSettings; |
|
41 class RCmManagerExt; |
|
42 |
|
43 // CLASS DECLARATION |
|
44 |
|
45 /** |
|
46 * CProcessorGlobal |
|
47 * Inhertits from the class CProcessorBase. |
|
48 * Reads Access Points related settings from CTagContainer. |
|
49 */ |
|
50 class CProcessorGlobal : public CProcessorBase |
|
51 { |
|
52 public: |
|
53 /** |
|
54 * Two-phase constructor. |
|
55 * @param aFileReader pointer to the file reader |
|
56 * @param aCmManager |
|
57 * @return CProcessorGlobal instance. |
|
58 */ |
|
59 static CProcessorGlobal* NewL( |
|
60 CReaderBase* aFileReader, |
|
61 RCmManagerExt& aCmManager, |
|
62 RPointerArray< RCmConnectionMethodExt >& aPluginArray, |
|
63 RPointerArray< HBufC >& aPluginNames, |
|
64 RPointerArray< RCmDestinationExt >& aDestArray, |
|
65 RPointerArray< HBufC >& aDestNames ); |
|
66 |
|
67 /** |
|
68 * Destructor. |
|
69 */ |
|
70 virtual ~CProcessorGlobal(); |
|
71 |
|
72 protected: |
|
73 |
|
74 /** |
|
75 * Constructor. |
|
76 * @param aFileReader pointer to the file reader |
|
77 */ |
|
78 CProcessorGlobal( CReaderBase* aFileReader, |
|
79 RCmManagerExt& aCmManager, |
|
80 RPointerArray< RCmConnectionMethodExt >& aPluginArray, |
|
81 RPointerArray< HBufC >& aPluginNames, |
|
82 RPointerArray< RCmDestinationExt >& aDestArray, |
|
83 RPointerArray< HBufC >& aDestNames ); |
|
84 |
|
85 /** |
|
86 * Second phase constructor. Leaves on failure. |
|
87 */ |
|
88 void ConstructL(); |
|
89 |
|
90 /** |
|
91 * From CProcessorBase. Processes the actual tag. |
|
92 * @param aFieldIDPresent shows if field id is read from input file |
|
93 * @return TInt The result of the process, KErrNone if the actual tag is |
|
94 * valid. |
|
95 */ |
|
96 virtual void ProcessTagL( TBool aFieldIDPresent ); |
|
97 |
|
98 /** |
|
99 * From CProcessorBase. Processes the actual access point. |
|
100 * @return The result of the processing |
|
101 */ |
|
102 virtual void ProcessAPL(); |
|
103 |
|
104 |
|
105 private: |
|
106 |
|
107 /** |
|
108 * Updates bearer priority array with the specified bearers priority or |
|
109 * UI priority. |
|
110 * @param aField Identifier of the the bearer whose priority/UI-priority |
|
111 * is to be updated. |
|
112 * @param aPrio The new priority. |
|
113 */ |
|
114 void UpdateGlobalBearerArrayL |
|
115 ( TDbCreatorGlobalSettings aField, TUint32 aPrio ); |
|
116 |
|
117 |
|
118 /** |
|
119 * Sets the WLAN Usage parameter in general connection settings. |
|
120 * @param aPtrTag string containing the parameter's value. |
|
121 */ |
|
122 void SetGenConnSettingWlanUsage( HBufC16* aPtrTag ); |
|
123 |
|
124 /** |
|
125 * Sets the "cellular data usage in home networks" |
|
126 * parameter in general connection settings. |
|
127 * @param aPtrTag string containing the parameter's value. |
|
128 */ |
|
129 void SetGenConnSettingCellularDataUsageHome( HBufC16* aPtrTag ); |
|
130 |
|
131 /** |
|
132 * Sets the "cellular data usage in visitor networks" |
|
133 * parameter in general connection settings. |
|
134 * @param aPtrTag string containing the parameter's value. |
|
135 */ |
|
136 void SetGenConnSettingCellularDataUsageVisitor( HBufC16* aPtrTag ); |
|
137 |
|
138 // Stores the general connection settings, using CMM |
|
139 void SetGenConnSettingsL(); |
|
140 |
|
141 // Stores the WLAN parameters |
|
142 void SaveGlobalWlanParameterL( const TUint32 aTableType, |
|
143 const TDbCreatorGlobalSettings aField, |
|
144 const HBufC16* const aValue ); |
|
145 |
|
146 private: |
|
147 |
|
148 |
|
149 // @var GPRS attach mode : whenneeded/whenavailable |
|
150 TBool iAttachWhenNeeded; |
|
151 |
|
152 RArray< TBearerPriority > iBearerArray; |
|
153 TBool iBearerArrayChanged; |
|
154 |
|
155 // @var Stores the general connection settings |
|
156 TCmGenConnSettings* iGenConnSettings; |
|
157 |
|
158 //@var session - Owned |
|
159 CMDBSession* iSession; |
|
160 |
|
161 //@var WLAN supported flag |
|
162 TBool iIsWlanS; |
|
163 }; |
|
164 |
|
165 #endif CDCPROCESSORGLOBAL_H |
|
166 |
|
167 // End of File. |
|