1 /* |
|
2 * Copyright (c) 2006-2006 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: Handles Always-On settings in OMA provisioning. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_ALWAYSONADAPTER_H |
|
20 #define C_ALWAYSONADAPTER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <CWPAdapter.h> |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class CRepository; |
|
27 |
|
28 // MODULE DATA STRUCTURES |
|
29 |
|
30 // ENUMERATIONS |
|
31 |
|
32 // CLASS DECLARATION |
|
33 |
|
34 /** |
|
35 * CAlwaysOnAdapter handles AWON-PDPC and T-Retry OTA conifurations. |
|
36 * The processes configurations are stored inside VENDORCONFIG element. |
|
37 * |
|
38 * @lib |
|
39 * @since S60 v3.1 |
|
40 */ |
|
41 class CAlwaysOnAdapter : public CWPAdapter |
|
42 { |
|
43 private: // MODULE DATA STRUCTURES |
|
44 |
|
45 /** |
|
46 * Struct for alwayson vendor config data. |
|
47 */ |
|
48 struct TAlwaysOnVConfigAdapterData |
|
49 { |
|
50 TPtrC iName; |
|
51 TBool iAwonPdpcHPLMN; |
|
52 TBool iAwonPdpcVPLMN; |
|
53 TInt iTRetry; |
|
54 }; |
|
55 |
|
56 public: // Constructors and destructor |
|
57 |
|
58 /** |
|
59 * Two-phased constructor. |
|
60 * @return an instance of class. |
|
61 */ |
|
62 static CAlwaysOnAdapter* NewL(); |
|
63 |
|
64 /** |
|
65 * Destructor |
|
66 */ |
|
67 virtual ~CAlwaysOnAdapter(); |
|
68 |
|
69 public: // Functions from base classes |
|
70 |
|
71 /** |
|
72 * From CWPAdapter |
|
73 */ |
|
74 TInt ItemCount() const; |
|
75 |
|
76 /** |
|
77 * From CWPAdapter |
|
78 */ |
|
79 const TDesC16& SummaryTitle( TInt aIndex ) const; |
|
80 |
|
81 /** |
|
82 * From CWPAdapter |
|
83 */ |
|
84 const TDesC16& SummaryText( TInt aIndex ) const; |
|
85 |
|
86 /** |
|
87 * From CWPAdapter |
|
88 */ |
|
89 TInt DetailsL( TInt aItem, MWPPairVisitor& aVisitor ); |
|
90 |
|
91 /** |
|
92 * From CWPAdapter |
|
93 */ |
|
94 void SaveL( TInt aItem ); |
|
95 |
|
96 /** |
|
97 * From CWPAdapter |
|
98 */ |
|
99 TBool CanSetAsDefault( TInt aItem ) const; |
|
100 |
|
101 /** |
|
102 * From CWPAdapter |
|
103 */ |
|
104 void SetAsDefaultL( TInt aItem ); |
|
105 |
|
106 /** |
|
107 * From CWPAdapter |
|
108 */ |
|
109 void VisitL( CWPCharacteristic& aElement ); |
|
110 |
|
111 /** |
|
112 * From CWPAdapter |
|
113 */ |
|
114 void VisitL( CWPParameter& aElement ); |
|
115 |
|
116 /** |
|
117 * From CWPAdapter |
|
118 */ |
|
119 void VisitLinkL( CWPCharacteristic& aCharacteristic ); |
|
120 |
|
121 private: // Default constructors |
|
122 |
|
123 /** |
|
124 * C++ default constructor. |
|
125 */ |
|
126 CAlwaysOnAdapter(); |
|
127 |
|
128 /** |
|
129 * By default Symbian 2nd phase constructor is private. |
|
130 */ |
|
131 void ConstructL(); |
|
132 |
|
133 private: // New functions |
|
134 |
|
135 /** |
|
136 * Validates the data in iTempVCongigData. |
|
137 */ |
|
138 TBool IsVConfigValid(); |
|
139 |
|
140 /** |
|
141 * Initializes the data in iTempVCongigData. |
|
142 */ |
|
143 void InitTempVConfigL(); |
|
144 |
|
145 /** |
|
146 * Parses an integer from descriptor. |
|
147 */ |
|
148 void ParseIntegerL( const TDesC& aPtr, TInt& aInt ); |
|
149 |
|
150 /** |
|
151 * Parses the AwonPdpc values from integer. |
|
152 */ |
|
153 void ParseAwonPdpcValuesL( TInt aInt ); |
|
154 |
|
155 private: // Data |
|
156 |
|
157 /** |
|
158 * Pointer to validated vendor config data. |
|
159 * Own. |
|
160 */ |
|
161 TAlwaysOnVConfigAdapterData* iVConfigData; |
|
162 |
|
163 /** |
|
164 * Pointer to vendor config data what is not yet validated. |
|
165 * Own. |
|
166 */ |
|
167 TAlwaysOnVConfigAdapterData* iTempVConfigData; |
|
168 |
|
169 /** |
|
170 * Pointer PDPContextManager central repository. |
|
171 * Own. |
|
172 */ |
|
173 CRepository* iPdpCenrep; |
|
174 |
|
175 private: |
|
176 friend class T_CAlwaysOnAdapter; |
|
177 |
|
178 |
|
179 }; |
|
180 |
|
181 #endif // C_ALWAYSONADAPTER_H |
|
182 |
|
183 // End of File |
|