|
1 /* |
|
2 * Copyright (c) 2006-2009 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 #ifndef CMMPACKETSERVICEGSMWCDMAEXT_H |
|
21 #define CMMPACKETSERVICEGSMWCDMAEXT_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "Cmmpacketservicetsy.h" |
|
25 |
|
26 /** |
|
27 * CMmPacketServiceGsmWcdmaExt contains mode specific packet service |
|
28 * functionality for GSM/WCDMA Packet Data. |
|
29 */ |
|
30 NONSHARABLE_CLASS( CMmPacketServiceGsmWcdmaExt ) : public CBase |
|
31 { |
|
32 |
|
33 public: // Constructors and destructor |
|
34 |
|
35 /** |
|
36 * Two-phased constructor. |
|
37 * |
|
38 * |
|
39 * @param aMmPacketServiceTsy pointer to ServiceTsy |
|
40 * @param aFactory pointer to Ltsy factory base |
|
41 */ |
|
42 static CMmPacketServiceGsmWcdmaExt* NewL( |
|
43 CMmPacketServiceTsy* const aMmPacketServiceTsy, |
|
44 MLtsyFactoryBase* aFactory ); |
|
45 |
|
46 /** |
|
47 * Default destructor. |
|
48 * |
|
49 */ |
|
50 virtual ~CMmPacketServiceGsmWcdmaExt(); |
|
51 |
|
52 public: // New functions |
|
53 |
|
54 /** |
|
55 * Attaches phone to the network. |
|
56 * |
|
57 * |
|
58 * @return error value |
|
59 */ |
|
60 virtual TInt AttachL(); |
|
61 |
|
62 /** |
|
63 * Completes attach phone to the network request. |
|
64 * |
|
65 * |
|
66 * @param aErrorValue error value for completion |
|
67 */ |
|
68 virtual void CompleteAttach( TInt aErrorValue ) const; |
|
69 |
|
70 /** |
|
71 * Detaches phone to the network. |
|
72 * |
|
73 * |
|
74 * @return error value |
|
75 */ |
|
76 virtual TInt DetachL(); |
|
77 |
|
78 /** |
|
79 * Completes detach phone to the network request. |
|
80 * |
|
81 * |
|
82 * @param aErrorValue error value for completion |
|
83 * @return error value for completion |
|
84 */ |
|
85 virtual void CompleteDetachL( TInt aErrorValue ) const; |
|
86 |
|
87 /** |
|
88 * Network registration status request to the network. |
|
89 * |
|
90 * |
|
91 * @return error value for client |
|
92 */ |
|
93 virtual TInt GetNtwkRegStatusL(); |
|
94 |
|
95 /** |
|
96 * Completes network registration status request. |
|
97 * |
|
98 * @param aDataPackage |
|
99 * @param aResult result value for completion |
|
100 */ |
|
101 void CompleteGetNtwkRegStatus( CMmDataPackage* aDataPackage, TInt aResult ); |
|
102 |
|
103 /** |
|
104 * Sets Attach Mode to the DOS. |
|
105 * |
|
106 * |
|
107 * @param aMode includes request related data |
|
108 * @return error value for client |
|
109 */ |
|
110 virtual TInt SetAttachModeL( RPacketService::TAttachMode aMode ); |
|
111 |
|
112 /** |
|
113 * Completes Set Attach Mode request. |
|
114 * |
|
115 * |
|
116 * @param aErrorValue for completion |
|
117 */ |
|
118 void CompleteSetAttachMode( const TInt aErrorValue ) const; |
|
119 |
|
120 /** |
|
121 * Gets Attach Mode from the DOS. |
|
122 * |
|
123 * |
|
124 * @return error value for client |
|
125 */ |
|
126 virtual TInt GetAttachModeL(); |
|
127 |
|
128 /** |
|
129 * Completes Get Attach Mode request. |
|
130 * |
|
131 * |
|
132 * @param aDataPackage contains request related data |
|
133 */ |
|
134 void CompleteGetAttachMode( CMmDataPackage* aDataPackage, |
|
135 TInt aResult) const; |
|
136 |
|
137 /** |
|
138 * Sets default parameters for a dial-up context. |
|
139 * |
|
140 * |
|
141 * @param aPackage request related data |
|
142 * @return error value for client |
|
143 */ |
|
144 TInt SetDefaultContextParamsL( const TDataPackage& aPackage ); |
|
145 |
|
146 /** |
|
147 * Completes call SetDefaultContextParameters. |
|
148 * |
|
149 * |
|
150 * @param aErrorCause error value |
|
151 */ |
|
152 void CompleteSetDefaultContextParams( TInt aErrorCause ); |
|
153 |
|
154 /** |
|
155 * Gets default parameters of dial-up context. |
|
156 * |
|
157 * |
|
158 * @param aContextConfig pointer to context configuration data |
|
159 * @return error value for completion |
|
160 */ |
|
161 TInt GetDefaultContextParams( TPacketDataConfigBase* aContextConfig ); |
|
162 |
|
163 /** |
|
164 * Returns EGprs support in cell |
|
165 * |
|
166 * |
|
167 * @return TBool value for GPRS support in current cell |
|
168 */ |
|
169 virtual TBool EGprsSupportInCell(); |
|
170 |
|
171 |
|
172 #ifdef TF_LOGGING_ENABLED |
|
173 |
|
174 /** |
|
175 * Completes Set Attach Mode To Nvd memory request. |
|
176 * |
|
177 * |
|
178 * @param aStatus not used |
|
179 */ |
|
180 void CompleteSetAttachModeToNvd( const TUint8 aStatus ) const; |
|
181 |
|
182 #endif // TF_LOGGING_ENABLED |
|
183 |
|
184 /** |
|
185 * Sets Preferred Bearer to the DOS. |
|
186 * |
|
187 * @param aPackage includes request related data |
|
188 * @return error value for client |
|
189 */ |
|
190 virtual TInt SetPreferredBearerL( const TDataPackage& aPackage ); |
|
191 |
|
192 /** |
|
193 * Completes Set Preferred Bearer |
|
194 * |
|
195 * |
|
196 * @param aErrorValue error value for completion |
|
197 */ |
|
198 void CompleteSetPreferredBearer( TInt aErrorValue ) const; |
|
199 |
|
200 /** |
|
201 * Gets gsm/wcdma specific dynamic capabilities of the phone. |
|
202 * |
|
203 * |
|
204 * @param aCaps pointer to dynamic capabilities |
|
205 */ |
|
206 virtual void GetDynamicCaps( |
|
207 RPacketService::TDynamicCapsFlags* const aCaps ) const; |
|
208 |
|
209 /** |
|
210 * Sets dynamic capabilities to the service tsy. |
|
211 * |
|
212 * |
|
213 * @param aFlag flag to be changed |
|
214 * @param aIsActionPossible default value ETrue defines if |
|
215 * Set is possible to do |
|
216 */ |
|
217 virtual void SetDynamicCapsFlag( |
|
218 const RPacketService::TDynamicCapsFlags aFlag, |
|
219 const TBool aIsActionPossible ); |
|
220 |
|
221 /** |
|
222 * Gets gsm/wcdma specific static capabilities of the phone. |
|
223 * |
|
224 * |
|
225 * @param aCaps in which static caps is included |
|
226 */ |
|
227 virtual void GetStaticCaps( TUint* const aCaps ) const; |
|
228 |
|
229 /** |
|
230 * Completes dynamic capabilities change to the service tsy. |
|
231 * |
|
232 * |
|
233 * @param aPackage contains required data |
|
234 */ |
|
235 void CompleteDynamicCapsChange( CMmDataPackage* aPackage ); |
|
236 |
|
237 /** |
|
238 * Sets iLastEdgeSupport |
|
239 * |
|
240 * |
|
241 * @param aLastEdgeSupport indicates if Edge is supported |
|
242 */ |
|
243 void SetEdgeGprsSupport( TBool aLastEdgeGprsSupport ); |
|
244 |
|
245 /** |
|
246 * Completes transfer capabilities change to the service tsy. |
|
247 * |
|
248 * @param aPackage contains required data |
|
249 */ |
|
250 void CompleteTransferCapsChange( CMmDataPackage* aPackage ); |
|
251 |
|
252 /** |
|
253 * Completes get capabilities during to the service tsy startup. |
|
254 * |
|
255 * @param aPackage contains required data |
|
256 */ |
|
257 void CompleteGetStaticCaps( CMmDataPackage* aPackage, TInt aError ); |
|
258 |
|
259 |
|
260 private: // New functions |
|
261 |
|
262 /** |
|
263 * C++ default constructor. |
|
264 */ |
|
265 CMmPacketServiceGsmWcdmaExt(); |
|
266 |
|
267 /** |
|
268 * Second phase constructor of CMmPacketServiceGsmWcdmaExt. |
|
269 * |
|
270 * @param aFactory pointer to Ltsy factory base |
|
271 */ |
|
272 void ConstructL( MLtsyFactoryBase* aFactory ); |
|
273 |
|
274 /** |
|
275 * Initialise internal attributes. |
|
276 * |
|
277 * @param aFactory pointer to Ltsy factory base |
|
278 */ |
|
279 void InitInternalAttributesL( MLtsyFactoryBase* aFactory ); |
|
280 |
|
281 |
|
282 private: // Data |
|
283 |
|
284 /** |
|
285 * Pointer to the packet service tsy |
|
286 * Not own. |
|
287 */ |
|
288 CMmPacketServiceTsy* iMmPacketServiceTsy; |
|
289 |
|
290 /** |
|
291 * Dynamic capabilities of gsm/wcdma extension |
|
292 */ |
|
293 RPacketService::TDynamicCapsFlags iDynamicCaps; |
|
294 |
|
295 /** |
|
296 * Last status received from DOS |
|
297 */ |
|
298 RPacketService::TStatus iLastTransferStatus; |
|
299 |
|
300 /** |
|
301 * Last info of circuit switch services availability from DOS |
|
302 */ |
|
303 // |
|
304 TBool iCsServicesIsSupportedOnCell; |
|
305 |
|
306 /** |
|
307 * Last info of gprs support in current cell from DOS |
|
308 */ |
|
309 TBool iGprsIsSupportedOnCell; |
|
310 |
|
311 /** |
|
312 * Static capabilities of gsm/wcdma extension |
|
313 */ |
|
314 TUint iStaticCaps; |
|
315 |
|
316 /** |
|
317 * SetContextDefaultParameter access point name |
|
318 */ |
|
319 RPacketContext::TGSNAddress iAccessPointName; |
|
320 |
|
321 /** |
|
322 * SetContextDefaultParameter temporary access point name |
|
323 */ |
|
324 RPacketContext::TGSNAddress iTempAccessPointName; |
|
325 |
|
326 /** |
|
327 * Client side Pdp Type |
|
328 */ |
|
329 RPacketContext::TProtocolType iPdpType; |
|
330 |
|
331 /** |
|
332 * Client side temporary Pdp Type |
|
333 */ |
|
334 RPacketContext::TProtocolType iTempPdpType; |
|
335 |
|
336 /** |
|
337 * SetContextDefaultParameter pdp compressions |
|
338 */ |
|
339 TUint iPdpCompression; |
|
340 |
|
341 /** |
|
342 * SetContextDefaultParameter temporary pdp compressions |
|
343 */ |
|
344 TUint iTempPdpCompression; |
|
345 |
|
346 /** |
|
347 * Is set default context params method called |
|
348 */ |
|
349 TBool iIsSetDefaultContextParamsCalled; |
|
350 |
|
351 /** |
|
352 * Is edge gprs supported |
|
353 */ |
|
354 TBool iLastEdgeGprsSupport; |
|
355 |
|
356 }; |
|
357 |
|
358 #endif // CMMPACKETSERVICEGSMWCDMAEXT_H |
|
359 |
|
360 // End of File |