24
|
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 CMMPACKETCONTEXTGSMWCDMAEXT_H
|
|
21 |
#define CMMPACKETCONTEXTGSMWCDMAEXT_H
|
|
22 |
|
|
23 |
// INCLUDES
|
|
24 |
#if defined (_MSC_VER) && (_MSC_VER >= 1000)
|
|
25 |
#pragma once
|
|
26 |
#endif
|
|
27 |
|
|
28 |
#include <ctsy/rmmcustomapi.h>
|
|
29 |
#include <ctsy/pluginapi/cmmdatapackage.h>
|
|
30 |
#include "cmmpacketqosgsmwcdmaext.h"
|
|
31 |
#include "CMmPrivateUtility.h"
|
|
32 |
|
|
33 |
// CONSTANTS
|
|
34 |
|
|
35 |
// FORWARD DECLARATIONS
|
|
36 |
class CMmPacketServiceTsy;
|
|
37 |
class CMmPacketContextTsy;
|
|
38 |
class RMmCustomAPI;
|
|
39 |
|
|
40 |
|
|
41 |
// CLASS DECLARATION
|
|
42 |
|
|
43 |
/**
|
|
44 |
* CMmPacketContextGsmWcdmaExt contains mode specific packet context
|
|
45 |
* functionality for GSM/WCDMA Packet Data.
|
|
46 |
*/
|
|
47 |
NONSHARABLE_CLASS( CMmPacketContextGsmWcdmaExt ) : public CBase
|
|
48 |
{
|
|
49 |
|
|
50 |
public: // Constructor and destructor
|
|
51 |
|
|
52 |
/**
|
|
53 |
* Two-phased constructor.
|
|
54 |
* @param aMmPacketContextTsy Pointer to the created object
|
|
55 |
* @param aMmPacketServiceTsy Pointer to Servicetsy
|
|
56 |
* @return CMmCallGsmWcdmaExt* Pointer to the created object
|
|
57 |
*/
|
|
58 |
static CMmPacketContextGsmWcdmaExt* NewL(
|
|
59 |
CMmPacketContextTsy* const aMmPacketContextTsy,
|
|
60 |
CMmPacketServiceTsy* const aMmPacketServiceTsy );
|
|
61 |
|
|
62 |
/**
|
|
63 |
* Destructor.
|
|
64 |
*/
|
|
65 |
virtual ~CMmPacketContextGsmWcdmaExt();
|
|
66 |
|
|
67 |
/**
|
|
68 |
* Initialise a context
|
|
69 |
*
|
|
70 |
* @param aDataChannel Pointer to packet context channelId information
|
|
71 |
* @return error code
|
|
72 |
*/
|
|
73 |
TInt InitialiseContextL(RPacketContext::TDataChannelV2* aDataChannel);
|
|
74 |
|
|
75 |
#ifdef USING_CTSY_DISPATCHER
|
|
76 |
/**
|
|
77 |
* Complete initialise of a context
|
|
78 |
*
|
|
79 |
* @param aChannelId ChannelId from the L-TSY
|
|
80 |
* @param error code
|
|
81 |
*/
|
|
82 |
void CompleteInitialiseContext(const TDesC& aChannelId,
|
|
83 |
const TInt aResult );
|
|
84 |
#else
|
|
85 |
/**
|
|
86 |
* Complete initialise of a context
|
|
87 |
*
|
|
88 |
* @param error code
|
|
89 |
*/
|
|
90 |
void CompleteInitialiseContext( const TInt aResult);
|
|
91 |
#endif // #ifdef USING_CTSY_DISPATCHER
|
|
92 |
|
|
93 |
/**
|
|
94 |
* Activate a context
|
|
95 |
*
|
|
96 |
*
|
|
97 |
* @return error code
|
|
98 |
*/
|
|
99 |
TInt ActivateL();
|
|
100 |
|
|
101 |
/**
|
|
102 |
* Complete the activate request
|
|
103 |
*
|
|
104 |
*
|
|
105 |
* @param aDataPackage Packaged parameters
|
|
106 |
* @param error code
|
|
107 |
*/
|
|
108 |
void CompleteActivate( CMmDataPackage* aDataPackage,
|
|
109 |
const TInt aResult );
|
|
110 |
|
|
111 |
/**
|
|
112 |
* Complete activate phase2
|
|
113 |
*
|
|
114 |
*
|
|
115 |
* @param aDataPackage Packaged parameters
|
|
116 |
* @param error code
|
|
117 |
*/
|
|
118 |
void CompleteActivatePhase2( CMmDataPackage* aDataPackage,
|
|
119 |
const TInt aResult );
|
|
120 |
|
|
121 |
/**
|
|
122 |
* Deactivate a context
|
|
123 |
*
|
|
124 |
*
|
|
125 |
* @return error code
|
|
126 |
*/
|
|
127 |
TInt DeactivateL();
|
|
128 |
|
|
129 |
/**
|
|
130 |
* Complete deactivation of the context.
|
|
131 |
*
|
|
132 |
*
|
|
133 |
* @param error code
|
|
134 |
*/
|
|
135 |
void CompleteDeactivate( const TInt aResult );
|
|
136 |
|
|
137 |
|
|
138 |
/**
|
|
139 |
* Delete a context.
|
|
140 |
*
|
|
141 |
*
|
|
142 |
* @return error code
|
|
143 |
*/
|
|
144 |
TInt DeleteL();
|
|
145 |
|
|
146 |
/**
|
|
147 |
* Complete deletion of the context.
|
|
148 |
*
|
|
149 |
*
|
|
150 |
* @param error code
|
|
151 |
*/
|
|
152 |
void CompleteDelete( const TInt aResult );
|
|
153 |
|
|
154 |
/**
|
|
155 |
* Get the context configuration info.
|
|
156 |
*
|
|
157 |
*
|
|
158 |
* @return aConfig Current context configuration
|
|
159 |
* @return error code
|
|
160 |
*/
|
|
161 |
TInt GetConfig( TPacketDataConfigBase* const aConfig );
|
|
162 |
|
|
163 |
/**
|
|
164 |
* Notify when context configuration info has been changed
|
|
165 |
*
|
|
166 |
*
|
|
167 |
* @param aConfig Current configuration mode
|
|
168 |
* @return KErrNotSupported
|
|
169 |
*/
|
|
170 |
TInt NotifyConfigChanged( TPacketDataConfigBase& aConfig );
|
|
171 |
|
|
172 |
/**
|
|
173 |
* Configure a context
|
|
174 |
*
|
|
175 |
*
|
|
176 |
* @param aConfig Current context configuration data
|
|
177 |
* @return error code
|
|
178 |
*/
|
|
179 |
TInt SetConfigL( TPacketDataConfigBase* const aConfig );
|
|
180 |
|
|
181 |
/**
|
|
182 |
* Complete SetConfig
|
|
183 |
*
|
|
184 |
*
|
|
185 |
* @param error code
|
|
186 |
*/
|
|
187 |
void CompleteSetConfig( const TInt aResult );
|
|
188 |
|
|
189 |
/**
|
|
190 |
* Get the data volume transferred
|
|
191 |
*
|
|
192 |
*
|
|
193 |
* @return error code
|
|
194 |
*/
|
|
195 |
TInt GetDataVolumeTransferredL();
|
|
196 |
|
|
197 |
/**
|
|
198 |
* Complete the GetDataVolumeTransferred request.
|
|
199 |
*
|
|
200 |
*
|
|
201 |
* @param aDataPackage Packaged parameters
|
|
202 |
* @param error code
|
|
203 |
*/
|
|
204 |
void CompleteGetDataVolumeTransferred(
|
|
205 |
const CMmDataPackage* aDataPackage, const TInt aResult );
|
|
206 |
|
|
207 |
/**
|
|
208 |
* Prepare to set or modify packet filter(s) to context
|
|
209 |
*
|
|
210 |
*
|
|
211 |
* @param aPacketFilter Current context TFT filter data
|
|
212 |
* @return error code
|
|
213 |
*/
|
|
214 |
TInt AddPacketFilterL( TDes8* aPacketFilter );
|
|
215 |
|
|
216 |
/**
|
|
217 |
* Prepare to remove packet filter(s) from context.
|
|
218 |
*
|
|
219 |
*
|
|
220 |
* @param aId ID of the TFT filter to be removed
|
|
221 |
* @return error code
|
|
222 |
*/
|
|
223 |
TInt RemovePacketFilter( const TInt aId );
|
|
224 |
|
|
225 |
/**
|
|
226 |
* Add, remove or modify packetfilter(s) and qos to active context.
|
|
227 |
*
|
|
228 |
*
|
|
229 |
* @return error code
|
|
230 |
*/
|
|
231 |
TInt ModifyActiveContextL();
|
|
232 |
|
|
233 |
/**
|
|
234 |
* Complete active context modify operation
|
|
235 |
*
|
|
236 |
*
|
|
237 |
* @param error code
|
|
238 |
* @param aDataPackage Packaged parameters
|
|
239 |
*/
|
|
240 |
void CompleteModifyActiveContext(
|
|
241 |
CMmDataPackage* aDataPackage, const TInt aResult );
|
|
242 |
|
|
243 |
/**
|
|
244 |
* Count packet filters from context.
|
|
245 |
*
|
|
246 |
*
|
|
247 |
* @return aCount Count of the Packet Filters
|
|
248 |
* @return error code
|
|
249 |
*/
|
|
250 |
TInt EnumeratePacketFilters( TInt *aCount );
|
|
251 |
|
|
252 |
/**
|
|
253 |
* Gets packet filter info by index
|
|
254 |
*
|
|
255 |
*
|
|
256 |
* @param aIndex Index of the wanted packet filter
|
|
257 |
* @return aPacketFilterInfo Inforamtion of the TFT filter specified by
|
|
258 |
* index.
|
|
259 |
* @return error code
|
|
260 |
*/
|
|
261 |
TInt GetPacketFilterInfo( const TInt aIndex,
|
|
262 |
TPacketBase* aPacketFilterInfo );
|
|
263 |
|
|
264 |
/**
|
|
265 |
* Return pointer to context configuration GPRS
|
|
266 |
*
|
|
267 |
*
|
|
268 |
* @return aConfig Current context configuration
|
|
269 |
*/
|
|
270 |
RPacketContext::TContextConfigGPRS* ContextConfig() const;
|
|
271 |
|
|
272 |
/**
|
|
273 |
* This method get the DNS info
|
|
274 |
*
|
|
275 |
*
|
|
276 |
* @param aDnsInfo Contains DNS information in return
|
|
277 |
* @return KErrNone.
|
|
278 |
*/
|
|
279 |
TInt GetDnsInfoEtel( TDes8* const aDnsInfo );
|
|
280 |
|
|
281 |
/**
|
|
282 |
* Complete the config changed notification
|
|
283 |
*
|
|
284 |
*
|
|
285 |
* @return None
|
|
286 |
*/
|
|
287 |
void CompleteNotifyConfigChanged();
|
|
288 |
|
|
289 |
/**
|
|
290 |
* Complete the config changed notification
|
|
291 |
*
|
|
292 |
*
|
|
293 |
* @param aDataPackage Packaged parameters
|
|
294 |
* @param error code
|
|
295 |
*/
|
|
296 |
void CompleteNotifyStatusChange( const CMmDataPackage*
|
|
297 |
aDataPackage, const TInt aResult );
|
|
298 |
|
|
299 |
/**
|
|
300 |
* Sets iContextStatusBeforeActivation parameter
|
|
301 |
*
|
|
302 |
*
|
|
303 |
* @param aContextStatusBeforeDeactivation Contains status of the
|
|
304 |
* current context
|
|
305 |
*/
|
|
306 |
void SetContextStatusBeforeDeactivation(
|
|
307 |
const RPacketContext::TContextStatus
|
|
308 |
aContextStatusBeforeDeactivation );
|
|
309 |
|
|
310 |
/**
|
|
311 |
* Tells if context activation is allowed
|
|
312 |
*
|
|
313 |
*
|
|
314 |
* @return TBool ETrue/EFalse
|
|
315 |
*/
|
|
316 |
TBool IsContextActivationAllowed() const;
|
|
317 |
|
|
318 |
/**
|
|
319 |
* Get the context configuration data. This function is called from QoS
|
|
320 |
* when the client has called the SetProfileParameters
|
|
321 |
*
|
|
322 |
* @return aContextName Name of the this context
|
|
323 |
* @return aPdpType Pdp type of the context
|
|
324 |
* @return aContextType Type of the Context
|
|
325 |
* @return aPrimaryContextName Name of the primary context of this
|
|
326 |
* context
|
|
327 |
* @return error code
|
|
328 |
*/
|
|
329 |
TInt GetConfigurationData( TInfoName& aContextName,
|
|
330 |
RPacketContext::TProtocolType& aPdpType, TBool& aContextType,
|
|
331 |
TInfoName& aPrimaryContextName );
|
|
332 |
|
|
333 |
|
|
334 |
/*
|
|
335 |
* Adds media authorization params
|
|
336 |
*
|
|
337 |
*
|
|
338 |
* @param aMediaAuthorization pointer to media authorization class
|
|
339 |
* to be added
|
|
340 |
* @return error code
|
|
341 |
*/
|
|
342 |
TInt AddMediaAuthorizationL( RPacketContext::CTFTMediaAuthorizationV3*
|
|
343 |
const aMediaAuthorization, TBool &aHasMediaAuthorizationBeenCached);
|
|
344 |
|
|
345 |
/*
|
|
346 |
* Removes media authorization params
|
|
347 |
*
|
|
348 |
*
|
|
349 |
* @param aAuthorizationToken token to be removed
|
|
350 |
* @return error code
|
|
351 |
*/
|
|
352 |
TInt RemoveMediaAuthorization( RPacketContext::TAuthorizationToken*
|
|
353 |
const aAuthorizationToken );
|
|
354 |
|
|
355 |
/**
|
|
356 |
* Return context type
|
|
357 |
*
|
|
358 |
*
|
|
359 |
* @return TBool Context Type
|
|
360 |
*/
|
|
361 |
TBool ContextType() const;
|
|
362 |
|
|
363 |
private:
|
|
364 |
|
|
365 |
/**
|
|
366 |
* C++ default constructor.
|
|
367 |
*/
|
|
368 |
CMmPacketContextGsmWcdmaExt();
|
|
369 |
|
|
370 |
/**
|
|
371 |
* Second phase constructor of CMmPacketContextGsmWcdmaExt.
|
|
372 |
*/
|
|
373 |
void ConstructL();
|
|
374 |
|
|
375 |
/**
|
|
376 |
* Initialise miscellaneous internal attributes.
|
|
377 |
*
|
|
378 |
*
|
|
379 |
*/
|
|
380 |
void InitInternalAttributesL();
|
|
381 |
|
|
382 |
|
|
383 |
/**
|
|
384 |
* This is the second phase of context activation.
|
|
385 |
*
|
|
386 |
*
|
|
387 |
*/
|
|
388 |
void ActivatePhase2L();
|
|
389 |
|
|
390 |
public: // Data
|
|
391 |
|
|
392 |
/**
|
|
393 |
* packet context packet fílter operation states
|
|
394 |
*/
|
|
395 |
enum TAddPacketFilterStatusStates
|
|
396 |
{
|
|
397 |
EAddPacketFilterStatusAdd,
|
|
398 |
EAddPacketFilterStatusModify,
|
|
399 |
EAddPacketFilterStatusRemove,
|
|
400 |
EAddPacketFilterStatusUnknown
|
|
401 |
};
|
|
402 |
|
|
403 |
private: // Data
|
|
404 |
|
|
405 |
/**
|
|
406 |
* Context configuration data GPRS
|
|
407 |
* Own.
|
|
408 |
*/
|
|
409 |
RPacketContext::TContextConfigGPRS* iConfig;
|
|
410 |
|
|
411 |
/**
|
|
412 |
* Pointer to the packet context tsy
|
|
413 |
* Not own.
|
|
414 |
*/
|
|
415 |
CMmPacketContextTsy* iMmPacketContextTsy;
|
|
416 |
|
|
417 |
/**
|
|
418 |
* Pointer to the Packet Service TSY
|
|
419 |
* Not own.
|
|
420 |
*/
|
|
421 |
CMmPacketServiceTsy* iMmPacketServiceTsy;
|
|
422 |
|
|
423 |
/**
|
|
424 |
* Temporary context configuration data to GPRS
|
|
425 |
*/
|
|
426 |
RPacketContext::TContextConfigGPRS* iTempConfig;
|
|
427 |
|
|
428 |
/**
|
|
429 |
* Configuration data for NotifyConfigChanged to GPRS
|
|
430 |
*/
|
|
431 |
RPacketContext::TContextConfigGPRS iNotifyConfig;
|
|
432 |
|
|
433 |
/**
|
|
434 |
* Configuration data for NotifyConfigChanged to R99_R4
|
|
435 |
*/
|
|
436 |
RPacketContext::TContextConfigR99_R4 iNotifyConfigR99_R4;
|
|
437 |
|
|
438 |
/**
|
|
439 |
* Connection speed
|
|
440 |
*/
|
|
441 |
TUint iConnectionSpeed;
|
|
442 |
|
|
443 |
/**
|
|
444 |
* Context activation allowed
|
|
445 |
*/
|
|
446 |
TBool iIsActivateAllowed;
|
|
447 |
|
|
448 |
/**
|
|
449 |
* Context initialization allowed
|
|
450 |
*/
|
|
451 |
TBool iIsInitialiseAllowed;
|
|
452 |
|
|
453 |
/**
|
|
454 |
* Context status before deactivation
|
|
455 |
*/
|
|
456 |
RPacketContext::TContextStatus iContextStatusBeforeDeactivation;
|
|
457 |
|
|
458 |
/**
|
|
459 |
* Container to context packet filters
|
|
460 |
* Own.
|
|
461 |
*/
|
|
462 |
CArrayFixFlat<RPacketContext::TPacketFilterV2>* iFilterArray;
|
|
463 |
|
|
464 |
/**
|
|
465 |
* Temporary container to context packet filter(s)
|
|
466 |
* Own.
|
|
467 |
*/
|
|
468 |
CArrayFixFlat<RPacketContext::TPacketFilterV2>* iFilterTemporaryArray;
|
|
469 |
|
|
470 |
/**
|
|
471 |
* Temporary container to remove packet filter Id's
|
|
472 |
*/
|
|
473 |
TInt iFilterIdTemporaryArray[ KMaxNumberOfTftFilters ];
|
|
474 |
|
|
475 |
/**
|
|
476 |
* Filter operation
|
|
477 |
*/
|
|
478 |
TAddPacketFilterStatusStates iFilterStatus;
|
|
479 |
|
|
480 |
/**
|
|
481 |
* Previous filter operation
|
|
482 |
*/
|
|
483 |
TAddPacketFilterStatusStates iPrevFilterStatus;
|
|
484 |
|
|
485 |
/**
|
|
486 |
* Includes context configuration information
|
|
487 |
*/
|
|
488 |
TInt iContextConfigurationType;
|
|
489 |
|
|
490 |
/**
|
|
491 |
* Includes Qos, configuration and packet filter data
|
|
492 |
*/
|
|
493 |
TContextConfiguration iContextConfiguration;
|
|
494 |
|
|
495 |
/**
|
|
496 |
* Temporary container for authorization class Rel5
|
|
497 |
* Own.
|
|
498 |
*/
|
|
499 |
CArrayFixFlat<RPacketContext::CTFTMediaAuthorizationV3>*
|
|
500 |
iTempMediaAuthorizationArray;
|
|
501 |
/**
|
|
502 |
* Indicator
|
|
503 |
*/
|
|
504 |
TBool isAddMediaAuthorizationCalledFirstTime;
|
|
505 |
|
|
506 |
/**
|
|
507 |
* DataChannel for a packet context
|
|
508 |
*/
|
|
509 |
|
|
510 |
RPacketContext::TDataChannelV2* iDataChannel;
|
|
511 |
|
|
512 |
};
|
|
513 |
|
|
514 |
#endif // CMMPACKETCONTEXTGSMWCDMAEXT_H
|
|
515 |
|
|
516 |
// End of File
|