|
1 /* |
|
2 * Copyright (c) 2007-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 the License "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 CMMPACKETCONTEXTMESSHANDLER_H |
|
21 #define CMMPACKETCONTEXTMESSHANDLER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <etelpckt.h> |
|
25 #include <etelqos.h> |
|
26 #include "mmmmesshandlerbase.h" |
|
27 #include "cmmphonetreceiver.h" // for MMmMessageReceiver |
|
28 #include "cmmpipecontrol.h" |
|
29 #include "nokiatsy_internal_variation.h" |
|
30 |
|
31 // CONSTANTS |
|
32 // Client connection speed rates between 0 and 2097152 bps |
|
33 const TInt KClientSpeeed0 = 0; |
|
34 const TInt KClientSpeeed8192 = 8192; |
|
35 const TInt KClientSpeeed16384 = 16384; |
|
36 const TInt KClientSpeeed32768 = 32768; |
|
37 const TInt KClientSpeeed65536 = 65536; |
|
38 const TInt KClientSpeeed131072 = 131072; |
|
39 const TInt KClientSpeeed262144 = 262144; |
|
40 const TInt KClientSpeeed524288 = 524288; |
|
41 const TInt KClientSpeeed1048576 = 1048576; |
|
42 const TInt KClientSpeeed2097152 = 2097152; |
|
43 |
|
44 // The maximum lengths for subblocks |
|
45 // See: ISI General Packet Data Server Message Descriptions |
|
46 const TUint16 KMaximumLengthOfGpdsTftInfo = 256; |
|
47 const TUint8 KMaximumLengthOfGpdsTftAuthTokenInfo = 248; |
|
48 const TUint8 KMaximumLengthOfGpdsTftFilterInfo = 148; |
|
49 |
|
50 // Access point buffer 256 |
|
51 const TInt KAccessPointBuffer252 = 252; |
|
52 |
|
53 // Nuber of bytes to be removed from total length for auth token info |
|
54 const TInt KAuthTokenInfoChecking = 4; |
|
55 |
|
56 // Index value 2 |
|
57 const TInt KIndexValue2 = 2; |
|
58 |
|
59 // GPDS_SHARED_TFT_PARAMETER_IP_FLOW_INFO value 2 |
|
60 const TInt KGdpsSharedTftParamIPFlowInfo2 = 2; |
|
61 |
|
62 // GPDS_SHARED_TFT_PARAMETER_IP_FLOW_INFO value 3 |
|
63 const TInt KGdpsSharedTftParamIPFlowInfo3 = 3; |
|
64 |
|
65 // Maximum length of GDPS_ACTIVATE_REQ sub block |
|
66 const TInt KMaxLengthOfGdpsActivateReqSB = 20; |
|
67 |
|
68 // Remove extraordinary bytes from RPacketContext::KMiscProtocolBufferLength |
|
69 // to get size for DNS buffer |
|
70 const TInt KRemoveOtherThanDNSBytes = 3; |
|
71 |
|
72 // DNS Buffer length |
|
73 const TInt KDNSBufferLength = 16; |
|
74 |
|
75 // CSCF Buffer length |
|
76 const TInt KCSCFBufferLength = 16; |
|
77 |
|
78 // CSCF Buffer length |
|
79 const TInt KSignallingFlagBuffer = 1; |
|
80 |
|
81 // Data Length for TLV |
|
82 const TInt KTLVDataLen = 2; |
|
83 |
|
84 // PCO Id len |
|
85 const TInt KPCOIdLen = 1; |
|
86 |
|
87 // Message data buffer size 1 byte |
|
88 const TInt KMessageDataBufSize1 = 1; |
|
89 |
|
90 // Filter array minus value |
|
91 const TInt KFilterArray = 1; |
|
92 |
|
93 // Initializing mask to 0x80 = 1000 0000 b |
|
94 const TInt KInitMask0x80 = 0x80; |
|
95 |
|
96 // Sub block count 1 |
|
97 const TInt KSubBlockCount1 = 1; |
|
98 |
|
99 // Buff size for proxy id for channel |
|
100 const TInt KBuffProxyIdForChannel = 2; |
|
101 |
|
102 // Byte count for ptr to TLV data |
|
103 const TInt KPtrToTLVdata = 4; |
|
104 |
|
105 // Flow id's array index |
|
106 const TInt KFlowIdsArrayIndex1 = 1; |
|
107 |
|
108 // Call mode init value |
|
109 const TInt KCallModeInitValue = 0xFF; |
|
110 |
|
111 // Filler byte for ISI messages |
|
112 const TUint8 KCallPadding = 0x00; |
|
113 |
|
114 // Subbclock length |
|
115 const TInt KSubBlockLengthOffset1 = 1; |
|
116 |
|
117 // masks for detailed cause values. |
|
118 // see 3GPP TS 24.008 V5.16.0 spec |
|
119 const TUint8 KDiagnosticsOctet2( 0x02 ); // B0000_0100 |
|
120 const TUint8 KDiagnosticsOctet3( 0xC0 ); // B1100_0000 |
|
121 const TUint8 KDiagnosticsOctet4( 0x95 ); // B1001_0101 |
|
122 const TUint8 KDiagnosticsOctet5( 0x82 ); // B1000_0010 |
|
123 const TUint8 KDiagnosticsOctet6( 0x02 ); // B0000_0010 |
|
124 |
|
125 // MACROS |
|
126 // None |
|
127 |
|
128 // DATA TYPES |
|
129 // None |
|
130 |
|
131 // FUNCTION PROTOTYPES |
|
132 // None |
|
133 |
|
134 // FORWARD DECLARATIONS |
|
135 class CMmPhoNetSender; |
|
136 class CMmPacketContextMesshandlerList; |
|
137 class TIsiReceiveC; |
|
138 class CMmPacketQoSMessHandler; |
|
139 class CMmMessageRouter; |
|
140 class RPacketContext; |
|
141 class RPacketContext::CTFTMediaAuthorizationV3; |
|
142 struct RPacketContext::CTFTMediaAuthorizationV3::TFlowIdentifier; |
|
143 |
|
144 // CLASS DECLARATION |
|
145 |
|
146 /** |
|
147 * CMmPacketContextMessHandler is used to create and send |
|
148 * GSM-specific Packet Context ISI messages to PhoNet via PhoNetSender. |
|
149 * It also receives GSM-specific Packet Context ISI messages from Phonet |
|
150 * via PhoNetReceiver. |
|
151 */ |
|
152 class CMmPacketContextMessHandler : public CBase, |
|
153 public MMmMessHandlerBase, |
|
154 public MMmMessageReceiver |
|
155 { |
|
156 |
|
157 public: // Constructors and destructor |
|
158 |
|
159 /** |
|
160 * Creates a new packet context message handler object |
|
161 * @param CMmPhoNetSender*: pointer to phonet sender |
|
162 * @param CMmPhoNetReceiver*: pointer to phonet receiver |
|
163 * @param CMmPacketContextMesshandlerList*: pointer to context list |
|
164 * @param CMmPacketQoSMessHandler*: pointer to QoS message handler |
|
165 * @param CMmMessageRouter*: pointer to message router |
|
166 * @return CMmPacketContextMessHandler*: pointer to the message handler |
|
167 */ |
|
168 static CMmPacketContextMessHandler* NewL( |
|
169 CMmPhoNetSender* const aPhoNetSender, |
|
170 CMmPhoNetReceiver* aPhoNetReceiver, |
|
171 CMmPacketContextMesshandlerList* aMmPacketContextMesshandlerList, |
|
172 CMmPacketQoSMessHandler* aMmPacketQoSMessHandler, |
|
173 CMmMessageRouter* aMessageRouter ); |
|
174 |
|
175 /** |
|
176 * Destructor. |
|
177 */ |
|
178 ~CMmPacketContextMessHandler(); |
|
179 |
|
180 public: // New functions |
|
181 |
|
182 /** |
|
183 * Isimsg received by PhonetReceiver, interpret if GSM Packet Context |
|
184 * specific. |
|
185 * @param TIsiReceiveC, reference to the received message. |
|
186 * @return void |
|
187 */ |
|
188 void ReceiveMessageL( const TIsiReceiveC& aIsiMessage ); |
|
189 |
|
190 /** |
|
191 * This function handles pipe related response messages and |
|
192 * completes operations. |
|
193 * @param aMessageId: message id |
|
194 * @param aTransactionId: transaction id |
|
195 * @param aPipeHandle: pipe handle |
|
196 * @param aErrorCause: error cause |
|
197 */ |
|
198 void CompletePipeOperation( |
|
199 const TInt aMessageId, |
|
200 const TUint8 aTransactionId, |
|
201 const TUint8 aPipeHandle, |
|
202 const TUint8 aErrorCause ); |
|
203 |
|
204 public: // Functions from base classes |
|
205 |
|
206 /** |
|
207 * From MMmMessHandlerBase. This method is the single entry point for |
|
208 * requests coming from the Symbian OS layer to this message handler. |
|
209 * ExtFuncL is called by the MessageManager. |
|
210 * @param aIpc: IPC number of the request |
|
211 * @param aDataPackage: datapackage from CommonTSY |
|
212 * @return TInt: KErrNone or error code |
|
213 */ |
|
214 TInt ExtFuncL( TInt aIpc, const CMmDataPackage* aDataPackage ); |
|
215 |
|
216 protected: // New functions |
|
217 // None |
|
218 |
|
219 protected: // Functions from base classes |
|
220 // None |
|
221 |
|
222 private: // Constructors and destructor |
|
223 |
|
224 /** |
|
225 * C++ default constructor. |
|
226 */ |
|
227 CMmPacketContextMessHandler(); |
|
228 |
|
229 /** |
|
230 * By default Symbian 2nd phase constructor is private. |
|
231 */ |
|
232 void ConstructL(); |
|
233 |
|
234 private: // New functions |
|
235 |
|
236 /** |
|
237 * Create an Isi-message for creating a context id. |
|
238 * @param aCreateContextIdTransId: create context id transaction id |
|
239 * @return TInt: error code (return value from PhoNetSender) |
|
240 */ |
|
241 TInt GpdsContextIdCreateReq( |
|
242 const TUint8 aCreateContextIdTransId ) const; |
|
243 |
|
244 /** |
|
245 * Configure a local link between Context and Pipe. |
|
246 * @param aTransactionId: transaction id |
|
247 * @param aContextId: context id |
|
248 * @param aPipeHandle: pipe handle |
|
249 * @return TInt: Error code (return value from PhoNetSender) |
|
250 */ |
|
251 TInt GpdsLlConfigureReq( |
|
252 const TUint8 aTransactionId, |
|
253 const TUint8 aContextId, |
|
254 const TUint8 aPipeHandle ) const; |
|
255 |
|
256 /** |
|
257 * Create an Isi-message for context configuration. |
|
258 * @param aTransactionId: ransaction id |
|
259 * @param aContextId: context id |
|
260 * @param aPdpType: Gpds server's Pdp address type |
|
261 * @param aContextType: Context type |
|
262 * @param aPrimaryContextId: primary context id |
|
263 * @param aDataCompression: data compression flag |
|
264 * @param aHeaderCompression: header compression flag |
|
265 * @param aAccessPointName: Access point name |
|
266 * @param aPacketFilterPtr: packet filter |
|
267 * @param aMediaAuthorization: media authorization |
|
268 * @param aSignallingIndication: signalling indication |
|
269 * @param aPCFCSAddressIndication: PCFCS address request indication |
|
270 * @param aDNSAddressRequestIndication: DNS address request indication |
|
271 * @return TInt: Error code (return value from PhoNetSender) |
|
272 */ |
|
273 TInt GpdsContextConfigureReq( |
|
274 const TUint8 aTransactionId, |
|
275 const TUint8 aContextId, |
|
276 const TUint8 aPdpType, |
|
277 const TUint8 aContextType, |
|
278 const TUint8 aPrimaryContextId, |
|
279 const TUint8 aDataCompression, |
|
280 const TUint8 aHeaderCompression, |
|
281 const TBuf8<KAccessPointBuffer252>& aAccessPointName, |
|
282 CArrayFixFlat<RPacketContext::TPacketFilterV2>* aPacketFilterPtr, |
|
283 RPacketContext::CTFTMediaAuthorizationV3* aMediaAuthorization, |
|
284 TBool aSignallingIndication = EFalse, |
|
285 TBool aPCFCSAddressIndication = EFalse, |
|
286 TBool aDNSAddressRequestIndication = EFalse ); |
|
287 |
|
288 /** |
|
289 * Create an Isi-message for context activation. |
|
290 * @param aTransactionId: transaction id |
|
291 * @param aContextId: context id |
|
292 * @param aPdpAddress: PDP address |
|
293 * @param aPdpType: type of PDP address |
|
294 * @return TInt: Error code (return value from PhoNetSender) |
|
295 */ |
|
296 TInt GpdsContextActivateReq( |
|
297 const TUint8 aTransactionId, |
|
298 const TUint8 aContextId, |
|
299 const TDesC8& aPdpAddress, |
|
300 const TUint8 aPdpType ) const; |
|
301 |
|
302 /** |
|
303 * Deactivate a Context. |
|
304 * @param aDataPackage: data package from CommonTSY |
|
305 * @return TInt: Error code (return value from PhoNetSender) |
|
306 */ |
|
307 TInt GpdsContextDeactivateReq( |
|
308 const CMmDataPackage& aDataPackage ); |
|
309 |
|
310 /** |
|
311 * Request the Context Status info. |
|
312 * @param aDataPackage: data package from CommonTSY |
|
313 * @return TInt: Error code (return value from PhoNetSender) |
|
314 */ |
|
315 TInt GpdsContextStatusReq( |
|
316 const CMmDataPackage& aDataPackage ); |
|
317 |
|
318 /** |
|
319 * Modify a Context. |
|
320 * @param aDataPackage: data package from CommonTSY |
|
321 * @return TInt: Error code (return value from PhoNetSender) |
|
322 */ |
|
323 TInt GpdsContextModifyReq( |
|
324 const CMmDataPackage* aPackage ); |
|
325 |
|
326 /** |
|
327 * Add packet filter info to GPDS Context Configure or Modify request. |
|
328 * @param aPdpType: PDP address type |
|
329 * @param aFilter: packet TFT filter |
|
330 * @param aBuffer: reference to message buffer |
|
331 * @return TUint16: length of PacketFilter |
|
332 */ |
|
333 TUint16 AddPacketFilterInfo( |
|
334 const TUint8 aPdpType, |
|
335 RPacketContext::TPacketFilterV2* aFilter, |
|
336 TDes8& aBuffer ) const; |
|
337 |
|
338 /** |
|
339 * This request is for compound of configuration and authentication. |
|
340 * @param aTransactionId: transaction id |
|
341 * @param aContextId: context id |
|
342 * @param aAuthInfo: authentication info |
|
343 * @param aResponse: response information |
|
344 * @param aChallenge: challenge information |
|
345 * @param aId: TProtocolConfig Id |
|
346 * @return TInt: Error code (return value from PhoNetSender) |
|
347 */ |
|
348 TInt SetAuthenticationConfigReq( |
|
349 const TUint8 aTransactionId, |
|
350 const TUint8 aContextId, |
|
351 RPacketContext::TAuthInfo aAuthInfo, |
|
352 RPacketContext::TAuthData aResponse, |
|
353 RPacketContext::TAuthData aChallenge, |
|
354 TUint8 aId ); |
|
355 |
|
356 /** |
|
357 * Response for Context Id creation. |
|
358 * @param aIsiMsg: received Isi message |
|
359 */ |
|
360 void GpdsContextIdCreateResp( |
|
361 const TIsiReceiveC& aIsiMessage ); |
|
362 |
|
363 /** |
|
364 * Gpds context id create indication. |
|
365 * @param aIsiMsg: received Isi message |
|
366 */ |
|
367 void GpdsContextIdCreateInd( |
|
368 const TIsiReceiveC& aIsiMessage ); |
|
369 |
|
370 /** |
|
371 * Response for Context Local Link configuration. |
|
372 * @param aIsiMsg: received Isi message |
|
373 */ |
|
374 void GpdsLlConfigureResp( |
|
375 const TIsiReceiveC& aIsiMessage ); |
|
376 |
|
377 /** |
|
378 * Response for Context Configuration. |
|
379 * @param aIsiMsg: received Isi message |
|
380 */ |
|
381 void GpdsContextConfigureResp( |
|
382 const TIsiReceiveC& aIsiMessage ); |
|
383 |
|
384 /** |
|
385 * Response for setting the Context Authentication info. |
|
386 * @param aIsiMsg: received Isi message |
|
387 */ |
|
388 void GpdsContextAuthResp( |
|
389 const TIsiReceiveC& aIsiMessage ); |
|
390 |
|
391 /** |
|
392 * Indicate that Context Activation has been started. |
|
393 * @param aIsiMsg: received Isi message |
|
394 */ |
|
395 void GpdsContextActivatingInd( |
|
396 const TIsiReceiveC& aIsiMessage ); |
|
397 |
|
398 /** |
|
399 * Indicate that Context Activation has succeeded. |
|
400 * @param aIsiMsg: received Isi message |
|
401 */ |
|
402 void GpdsContextActivateIndL( |
|
403 const TIsiReceiveC& aIsiMessage ); |
|
404 |
|
405 /** |
|
406 * Indication that Context Activation has failed. |
|
407 * @param aIsiMsg: received Isi message |
|
408 */ |
|
409 void GpdsContextActivateFailInd( |
|
410 const TIsiReceiveC& aIsiMessage ); |
|
411 |
|
412 /** |
|
413 * Indicate the Context Modification. |
|
414 * @param aIsiMsg: received Isi message |
|
415 */ |
|
416 void GpdsContextModifyInd( |
|
417 const TIsiReceiveC& aIsiMessage ); |
|
418 |
|
419 /** |
|
420 * Response for Context Deactivation. |
|
421 * @param aIsiMsg: received Isi message |
|
422 */ |
|
423 void GpdsContextDeactivateRespL( |
|
424 const TIsiReceiveC& aIsiMessageg ); |
|
425 |
|
426 /** |
|
427 * Indicate that Context Deactivation has been started. |
|
428 * @param aIsiMsg: received Isi message |
|
429 */ |
|
430 void GpdsContextDeactivatingInd( |
|
431 const TIsiReceiveC& aIsiMessage ); |
|
432 |
|
433 /** |
|
434 * Indicate that Context Deactivation has succeeded. |
|
435 * @param aIsiMsg: received Isi message |
|
436 */ |
|
437 void GpdsContextDeactivateInd( |
|
438 const TIsiReceiveC& aIsiMessage ); |
|
439 |
|
440 /** |
|
441 * Response for Context Status inquiry. |
|
442 * @param aIsiMsg: received Isi message |
|
443 */ |
|
444 void GpdsContextStatusResp( |
|
445 const TIsiReceiveC& aIsiMessage ); |
|
446 |
|
447 /** |
|
448 * Indicate the final data transferred over the airlink. |
|
449 * @param aIsiMsg: received Isi message |
|
450 */ |
|
451 void GpdsContextStatusInd( |
|
452 const TIsiReceiveC& aIsiMessage ); |
|
453 |
|
454 /** |
|
455 * Indicate that Context Id has been deleted. |
|
456 * @param aIsiMsg: received Isi message |
|
457 */ |
|
458 void GpdsContextIdDeleteInd( |
|
459 const TIsiReceiveC& aIsiMessage ); |
|
460 |
|
461 /** |
|
462 * Response for GPDS modify request. |
|
463 * @param aIsiMsg: received Isi message |
|
464 */ |
|
465 void GpdsContextModifyResp( |
|
466 const TIsiReceiveC& aIsiMessage ); |
|
467 |
|
468 /** |
|
469 * This function starts the three phase context initialisation. |
|
470 * @param aDataPackage: data package from CommonTSY |
|
471 * @return TInt: KErrNone or error code |
|
472 */ |
|
473 TInt InitialiseContext( |
|
474 const CMmDataPackage& aDataPackage ); |
|
475 |
|
476 /** |
|
477 * This function starts the second phase of the context initialisation. |
|
478 * @param aPipeHandle: pipe handle |
|
479 * @return TInt: KErrNone or error code |
|
480 */ |
|
481 TInt InitialiseContextPhase2( |
|
482 TUint8 aPipeHandle ); |
|
483 |
|
484 /** |
|
485 * This function starts the third phase of the context initialisation. |
|
486 * @param aStatus: GPDS Status |
|
487 * @param aContextId: Context Id |
|
488 */ |
|
489 void InitialiseContextPhase3( |
|
490 const TUint8 aStatus, |
|
491 const TUint8 aContextId ); |
|
492 |
|
493 /** |
|
494 * Set configuration data for context. |
|
495 * @param aDataPackage: data package from CommonTSY |
|
496 * @return TInt: KErrNone or error code |
|
497 */ |
|
498 TInt SetConfigL( |
|
499 const CMmDataPackage& aDataPackage ); |
|
500 |
|
501 /** |
|
502 * Add TFT packet filter for context. |
|
503 * @param aDataPackage: data package from CommonTSY |
|
504 * @return TInt: KErrNone or error code |
|
505 */ |
|
506 TInt AddPacketFilter( |
|
507 const CMmDataPackage* aDataPackage ); |
|
508 |
|
509 /** |
|
510 * Delete context related to the network e.g. pipe deletion. |
|
511 * @param aDataPackage: data package from CommonTSY |
|
512 * @return TInt: KErrNone or error code |
|
513 */ |
|
514 TInt Delete( |
|
515 const CMmDataPackage& aDataPackage ); |
|
516 |
|
517 /** |
|
518 * This function starts the second phase of the context activation. |
|
519 * @param aPipeHandle: pipe handle |
|
520 * @param aTransactionId: transaction id |
|
521 */ |
|
522 void ActivatePhase2( |
|
523 const TUint8 aPipeHandle, |
|
524 const TUint8 aTransactionId ); |
|
525 |
|
526 /** |
|
527 * Map the Packet API pdp type to the Gpds server pdp type. |
|
528 * @param aPdpTypeServer: server pdp type |
|
529 * @param aPdpTypeClient: client pdp type |
|
530 * @return TInt: KErrNone or error code |
|
531 */ |
|
532 TInt MapPdpType( |
|
533 TUint8& aPdpTypeServer, |
|
534 const RPacketContext::TProtocolType aPdpTypeClient ); |
|
535 |
|
536 /** |
|
537 * Map the Gpds server speed to the Packet API connection speed. |
|
538 * @param aConnectionSpeedServer: server connection speed rate |
|
539 * @param aConnectionSpeedClient: client connection speed rate |
|
540 */ |
|
541 void MapConnectionSpeed( |
|
542 const TUint8 aConnectionSpeedServer, |
|
543 TInt& aConnectionSpeedClient ); |
|
544 |
|
545 /** |
|
546 * This function generates transaction id for use of current context. |
|
547 * @param contextId |
|
548 * @return TUint8: transaction id |
|
549 */ |
|
550 TUint8 GenerateTraId( |
|
551 const TUint8 aContextId ); |
|
552 |
|
553 /** |
|
554 * Map the Client TFT operation to the Gpds server TFT operation. |
|
555 * @param aClientTypeOperation: client operation |
|
556 * @param aTftOperation: server operation |
|
557 */ |
|
558 void MapTftOperation( |
|
559 const TInt aClientTypeOperation, |
|
560 TUint8& aTftOperation ); |
|
561 |
|
562 /* |
|
563 * Makes request for media authorization params for specific context |
|
564 * @param aDataPackage: data package from CommonTSY |
|
565 * @return TInt: KErrNone or error code |
|
566 */ |
|
567 TInt AddMediaAuthorizationL( |
|
568 const CMmDataPackage* aDataPackage ); |
|
569 |
|
570 /* |
|
571 * Creates subblocks to GpdsContextConfigureOrModifyReq. |
|
572 * @param aMediaAuthorizationArray: media authorization array |
|
573 * @param aBuffer: reference to message buffer |
|
574 * @param aNumOfSbs: number of subblocks |
|
575 * @return TInt: KErrNone or error code |
|
576 */ |
|
577 TInt AddMediaAuthorizationInfo( |
|
578 CArrayFixFlat<RPacketContext::CTFTMediaAuthorizationV3>* |
|
579 aMediaAuthorizationArray, |
|
580 TDes8& aBuffer, |
|
581 TUint8& aNumOfSbs ) const; |
|
582 |
|
583 /* |
|
584 * Appends one media authorization unit. |
|
585 * @param aMediaAuthorization: media authorization data |
|
586 * @param aBuffer: reference to message buffer |
|
587 * @param aNumOfSbs: number of subblocks appended |
|
588 * @return TInt: KErrNone or KErrTooBig if buffer is not big enough to |
|
589 * fit all the information |
|
590 * @note method does not reset aNumOfSbs on entry |
|
591 */ |
|
592 TInt AppendMediaAuthorizationUnit( |
|
593 const RPacketContext::CTFTMediaAuthorizationV3& |
|
594 aMediaAuthorization, |
|
595 TDes8& aBuffer, |
|
596 TUint8& aNumOfSbs ) const; |
|
597 |
|
598 /** |
|
599 * This methods checks if secondary contexts needs to be deactivated |
|
600 * and allows incoming call. |
|
601 * (for allow incoming call feature). |
|
602 */ |
|
603 void AllowIncomingCallActivationL(); |
|
604 |
|
605 /** |
|
606 * Appends GPDS_SHARED_TFT_PARAMETER_AUTH_TOKEN_INFO to the buffer |
|
607 * @param aAuthorizationToken: authorization token to be appended |
|
608 * @param aBuffer: destination buffer |
|
609 * @param aNumOfSbs: number of subblocks appended |
|
610 * @note aNumOfSbs is not reset on entry |
|
611 * @return TInt: KErrNone or KErrTooBig if passed buffer is |
|
612 * not big enough to fit the subblock |
|
613 */ |
|
614 TInt AppendGpdsSharedTFTParameterAuthTokenInfo( |
|
615 const TDesC8& aAuthorizationToken, |
|
616 TDes8& aBuffer, |
|
617 TUint8& aNumOfSbs ) const; |
|
618 |
|
619 /** |
|
620 * Appends GPDS_SHARED_TFT_PARAMETER_IP_FLOW_INFO to the buffer |
|
621 * @param aFlowIdentifier: data to be appended |
|
622 * @param aBuffer: destination buffer |
|
623 * @param aNumOfSbs: number of subblocks appended |
|
624 * @note aNumOfSbs is not reset on entry |
|
625 * @return TInt: KErrNone or KErrTooBig if passed buffer is |
|
626 * not big enough to fit the subblock |
|
627 */ |
|
628 TInt AppendGpdsSharedTFTParameterIPFlowInfo( |
|
629 const RPacketContext::CTFTMediaAuthorizationV3::TFlowIdentifier& |
|
630 aFlowIdentifier, |
|
631 TDes8& aBuffer, |
|
632 TUint8& aNumOfSbs ) const; |
|
633 |
|
634 /** |
|
635 * Fills the buffer as GPDS_TFT_INFO complex subblock. |
|
636 * Caller passes in buffer big enough to hold GPDS_TFT_INFO subblock |
|
637 * @param aOperation: desired operation (constants starting with GPDS_TFT_) |
|
638 * @param aMediaAuthorization: media authorization |
|
639 * @note aMediaAuthorization can be NULL |
|
640 * @param aPacketFilter: packet filters array |
|
641 * @note aPacketFilter can be NULL |
|
642 * @note both aMediaAuthorization and aPacketFilter can not be NULL at |
|
643 * the same time |
|
644 * @param aPdpType: type |
|
645 * @param aBuffer: buffer to be filled |
|
646 * @return TInt: KErrNone or KErrTooBig if any of the subblocks doesnt |
|
647 * fit into the buffer |
|
648 */ |
|
649 TInt FillGpdsTFTInfo( TUint8 aOperation, |
|
650 RPacketContext::CTFTMediaAuthorizationV3* aMediaAuthorization, |
|
651 CArrayFixFlat<RPacketContext::TPacketFilterV2>* aPacketFilterPtr, |
|
652 TUint8 aPdpType, |
|
653 TDes8& aBuffer) const; |
|
654 |
|
655 /** |
|
656 * Fills the buffer as GPDS_QOS99_REQ_INFO subblock. |
|
657 * Caller passes in buffer big enough to hold GPDS_QOS99_REQ_INFO subblock |
|
658 * @param aQos99Params: Qos99 parameters |
|
659 * @param aBuffer: buffer to be filled |
|
660 * @return KErrNone or system-wide error |
|
661 */ |
|
662 TInt FillGpdsQos99ReqInfo( |
|
663 const RPacketQoS::TQoSR99_R4Requested& aQos99Params, |
|
664 TDes8& aBuffer ); |
|
665 |
|
666 /** |
|
667 * Fills the buffer as GPDS_QOS_REQ_INFO subblock. |
|
668 * Caller passes in buffer big enough to hold GPDS_QOS99_REQ_INFO subblock |
|
669 * @param aQos97Params: Qos97 parameters |
|
670 * @param aBuffer: buffer to be filled |
|
671 * @return KErrNone or system-wide error |
|
672 */ |
|
673 TInt FillGpdsQosReqInfo( |
|
674 const RPacketQoS::TQoSGPRSRequested& aQos97Params, |
|
675 TDes8& aBuffer ); |
|
676 |
|
677 /** |
|
678 * Appends GPDS_FILT_FLOW_LABEL_INFO subblock to the passed buffer. |
|
679 * @param aFilter: filter instance |
|
680 * @param aBuffer: destination buffer |
|
681 * @param aNumOfSbs: number of subblocks added |
|
682 * @note aNumOfSbs is not reset on entry |
|
683 * @return TInt: KErrNone or KErrTooBig if destination cant fit the subblock |
|
684 */ |
|
685 TInt AppendGpdsFilterFlowLabelInfo( |
|
686 const RPacketContext::TPacketFilterV2& aFilter, |
|
687 TDes8& aBuffer, |
|
688 TUint8& aNumOfSbs ) const; |
|
689 |
|
690 /** |
|
691 * Appends GPDS_FILT_TOS_INFO subblock to the passed buffer. |
|
692 * @param aFilter: filter instance |
|
693 * @param aBuffer: destination buffer |
|
694 * @param aNumOfSbs: number of subblocks added |
|
695 * @note aNumOfSbs is not reset on entry |
|
696 * @return TInt: KErrNone or KErrTooBig if destination cant fit the subblock |
|
697 */ |
|
698 TInt AppendGpdsFilterTosInfo( |
|
699 const RPacketContext::TPacketFilterV2& aFilter, |
|
700 TDes8& aBuffer, |
|
701 TUint8& aNumOfSbs ) const; |
|
702 |
|
703 /** |
|
704 * Appends GPDS_FILT_SPI_INFO subblock to the passed buffer. |
|
705 * @param aFilter: filter instance |
|
706 * @param aBuffer: destination buffer |
|
707 * @param aNumOfSbs: number of subblocks added |
|
708 * @note aNumOfSbs is not reset on entry |
|
709 * @return TInt: KErrNone or KErrTooBig if destination cant fit the subblock |
|
710 */ |
|
711 TInt AppendGpdsFilterSpiInfo( |
|
712 const RPacketContext::TPacketFilterV2& aFilter, |
|
713 TDes8& aBuffer, |
|
714 TUint8& aNumOfSbs ) const; |
|
715 |
|
716 /** |
|
717 * Appends GPDS_FILT_SRC_PORT_RANGE_INFO subblock to the passed buffer. |
|
718 * @param aFilter: filter instance |
|
719 * @param aBuffer: destination buffer |
|
720 * @param aNumOfSbs: number of subblocks added |
|
721 * @note aNumOfSbs is not reset on entry |
|
722 * @return TInt: KErrNone or KErrTooBig if destination cant fit the subblock |
|
723 */ |
|
724 TInt AppendGpdsFilterSrcPortRangeInfo( |
|
725 const RPacketContext::TPacketFilterV2& aFilter, |
|
726 TDes8& aBuffer, |
|
727 TUint8& aNumOfSbs ) const; |
|
728 |
|
729 /** |
|
730 * Appends GPDS_FILT_DST_PORT_RANGE_INFO subblock to the passed buffer. |
|
731 * @param aFilter: filter instance |
|
732 * @param aBuffer: destination buffer |
|
733 * @param aNumOfSbs: number of subblocks added |
|
734 * @note aNumOfSbs is not reset on entry |
|
735 * @return TInt: KErrNone or KErrTooBig if destination cant fit the subblock |
|
736 */ |
|
737 TInt AppendGpdsFilterDstPortRangeInfo( |
|
738 const RPacketContext::TPacketFilterV2& aFilter, |
|
739 TDes8& aBuffer, |
|
740 TUint8& aNumOfSbs ) const; |
|
741 |
|
742 /** |
|
743 * Appends GPDS_FILT_PROTOCOL_INFO subblock to the passed buffer. |
|
744 * @param aFilter: filter instance |
|
745 * @param aBuffer: destination buffer |
|
746 * @param aNumOfSbs: number of subblocks added |
|
747 * @note aNumOfSbs is not reset on entry |
|
748 * @return TInt: KErrNone or KErrTooBig if destination cant fit the subblock |
|
749 */ |
|
750 TInt AppendGpdsFilterProtocolInfo( |
|
751 const RPacketContext::TPacketFilterV2& aFilter, |
|
752 TDes8& aBuffer, |
|
753 TUint8& aNumOfSbs ) const; |
|
754 |
|
755 /** |
|
756 * Appends GPDS_FILT_SRC_IPV4_ADDR_INFO subblock to the passed buffer. |
|
757 * @param aFilter: filter instance |
|
758 * @param aBuffer: destination buffer |
|
759 * @param aNumOfSbs: number of subblocks added |
|
760 * @note aNumOfSbs is not reset on entry |
|
761 * @return TInt: KErrNone or KErrTooBig if destination cant fit the subblock |
|
762 */ |
|
763 TInt AppendGpdsFilterSrcIPv4AddressInfo( |
|
764 const RPacketContext::TPacketFilterV2& aFilter, |
|
765 TDes8& aBuffer, |
|
766 TUint8& aNumOfSbs ) const; |
|
767 |
|
768 /** |
|
769 * Appends GPDS_FILT_SRC_IPV6_ADDR_INFO subblock to the passed buffer. |
|
770 * @param aFilter: filter instance |
|
771 * @param aBuffer: destination buffer |
|
772 * @param aNumOfSbs: number of subblocks added |
|
773 * @note aNumOfSbs is not reset on entry |
|
774 * @return TInt: KErrNone or KErrTooBig if destination cant fit |
|
775 * the subblock |
|
776 */ |
|
777 TInt AppendGpdsFilterSrcIPv6AddressInfo( |
|
778 const RPacketContext::TPacketFilterV2& aFilter, |
|
779 TDes8& aBuffer, |
|
780 TUint8& aNumOfSbs ) const; |
|
781 |
|
782 /** |
|
783 * Appends GPDS IP source address information to the buffer. |
|
784 * Buffer should be prepared by the caller before sending it here. |
|
785 * Only amount of masked bits and IP address themselves are appended |
|
786 * @param aInputIpAddress: input IP address |
|
787 * @param aInputIpAddressMask: input IP address mask |
|
788 * @param aBuffer: destination buffer |
|
789 * @return TInt: KErrNone or KErrArgument in case invalid IP (black hole) |
|
790 * is specified |
|
791 */ |
|
792 TInt AppendIpAddressInfo( |
|
793 const TDesC8& aInputIpAddress, |
|
794 const TDesC8& aInputIpAddressMask, |
|
795 TDes8& aBuffer ) const; |
|
796 |
|
797 /** |
|
798 * Appends GPDS_TFT_FILTER_INFO subblock. |
|
799 * @param aFilterId: filter id |
|
800 * @param aBuffer: destination buffer |
|
801 * @param aNumOfSbs: destination buffer |
|
802 * @note aNumOfSbs is not reset on entry |
|
803 * @return TInt: KErrNone or KErrTooBig if destination cant fit the subblock |
|
804 */ |
|
805 TInt AppendGpdsTftFilterInfo( |
|
806 TUint8 aFilterId, |
|
807 TDes8& aBuffer, |
|
808 TUint8& aNumOfSbs ) const; |
|
809 |
|
810 /** |
|
811 * Breaks received CallModemResourceInd ISI message. |
|
812 * @param aIsiMessage: received Isi message. |
|
813 */ |
|
814 void CallModemResourceIndL( const TIsiReceiveC &aIsiMessage ); |
|
815 |
|
816 /** |
|
817 * Creates CallModemResourceReq ISI message to modem call server. |
|
818 * @param isiMessage |
|
819 * @return None |
|
820 */ |
|
821 void CallModemResourceReqAllowed(); |
|
822 |
|
823 /** |
|
824 * Breaks received CallModemResourceResp ISI message. |
|
825 * @param aIsiMessage: received Isi message. |
|
826 */ |
|
827 void CallModemResourceResp( const TIsiReceiveC &aIsiMessage ); |
|
828 |
|
829 /** |
|
830 * Creates SendCallmodemResourceDenied ISI message to modem call server. |
|
831 * @param aDatapackage |
|
832 * @return None |
|
833 */ |
|
834 void CallModemResourceReqDenied(); |
|
835 |
|
836 /* |
|
837 * This method completes drive mode functions, if drive mode flag |
|
838 * is enabled |
|
839 * @param aDataPackage: data package |
|
840 * @return TInt: KErrNone |
|
841 */ |
|
842 void CompleteDCMdrivemodeFunctionalityL(); |
|
843 |
|
844 public: // Data |
|
845 // None |
|
846 |
|
847 protected: // Data |
|
848 // None |
|
849 |
|
850 private: // Data |
|
851 |
|
852 // Pointer to the PhonetSender |
|
853 CMmPhoNetSender* iPhoNetSender; |
|
854 |
|
855 // A pointer to the PhonetReceiver. |
|
856 CMmPhoNetReceiver* iPhoNetReceiver; |
|
857 |
|
858 // Pointer to list of opened contexts |
|
859 CMmPacketContextMesshandlerList* iContextList; |
|
860 |
|
861 // Pointer to the CMmPacketQoSMessHandler |
|
862 CMmPacketQoSMessHandler* iMmPacketQoSMessHandler; |
|
863 |
|
864 // Pointer to the message router |
|
865 CMmMessageRouter* iMessageRouter; |
|
866 |
|
867 // Pointer to the pipe controller, created and owned. |
|
868 CMmPipeControl* iMmPipeController; |
|
869 |
|
870 // Primary context id |
|
871 TUint8 iPrimaryContextId; |
|
872 |
|
873 // Context id |
|
874 TUint8 iDialUpContextId; |
|
875 |
|
876 // Dial-up context name |
|
877 TInfoName iDialUpContextName; |
|
878 |
|
879 // Error code used for context id creating |
|
880 TInt iInitialiseError; |
|
881 |
|
882 #ifdef DUMMY_NIF_PEP_FOR_PACKET_DATA_TESTING_DOS |
|
883 // Helps creating transaction id for pipe creation for eacf contexts |
|
884 // before context id available |
|
885 TInt iTransIdForProxies; |
|
886 #endif // DUMMY_NIF_PEP_FOR_PACKET_DATA_TESTING_DOS |
|
887 |
|
888 // Call id for incoming call (for allow incoming call feature) |
|
889 TUint8 iCallModemResourceCallId; |
|
890 |
|
891 // List of contexts to be deactivated (for allow incoming call feature) |
|
892 CArrayFixFlat<TUint8>* iDeactivateContextList; |
|
893 |
|
894 // Buffer for isimessage. Used in resource control |
|
895 HBufC8* iResourceControlMsg; |
|
896 |
|
897 //drive mode flag |
|
898 TBool iDriveModeFlag; |
|
899 |
|
900 }; |
|
901 |
|
902 #endif // CMMPACKETCONTEXTMESSHANDLER_H |
|
903 |
|
904 // End of File |