|
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 CMMPACKETSERVICETSY_H |
|
21 #define CMMPACKETSERVICETSY_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "cmmphonetsy.h" |
|
25 #include "Cmmpacketcontexttsy.h" |
|
26 #include "Cmmpacketqostsy.h" |
|
27 #include <ctsy/serviceapi/gsmerror.h> |
|
28 #include <ctsy/rmmcustomapi.h> |
|
29 #include "cmmmessagemanagerbase.h" |
|
30 #include <pcktlist.h> |
|
31 |
|
32 // CONSTANTS |
|
33 |
|
34 // String literals |
|
35 _LIT( KStringExternal, "External" ); |
|
36 _LIT( KStringExternal2, "External2" ); |
|
37 |
|
38 // DUMMY_NIF flag should be off in builds and releases. |
|
39 // DUMMY_NIF flag should be off by default in builds. |
|
40 // DUMMY_NIF flag should be on if want test DUMMY_NIF_PEP_FOR_PACKET_DATA. |
|
41 //#define DUMMY_NIF_PEP_FOR_PACKET_DATA_TESTING |
|
42 |
|
43 // FORWARD DECLARATIONS |
|
44 class CMmMessageManagerBase; |
|
45 class CMmPacketContextList; |
|
46 class CMmPacketContextTsy; |
|
47 class CMmMBMSContextList; |
|
48 class CMmMBMSMonitoredList; |
|
49 class CMmPacketContextGsmWcdmaExt; |
|
50 class CMmPacketServiceGsmWcdmaExt; |
|
51 class CMmPacketQosTsy; |
|
52 |
|
53 // CLASS DECLARATION |
|
54 |
|
55 /** |
|
56 * CMmPacketServiceTsy contains GPRS service related functionality. |
|
57 */ |
|
58 NONSHARABLE_CLASS( CMmPacketServiceTsy ) : public CSubSessionExtBase |
|
59 { |
|
60 public: // Data |
|
61 |
|
62 |
|
63 enum TPacketServiceRequestTypes |
|
64 { |
|
65 EMultimodePacketServiceReqHandleUnknown, //0 |
|
66 EMultimodePacketServiceAttach, //1 |
|
67 EMultimodePacketServiceDetach, //2 |
|
68 EMultimodePacketServiceGetNtwkRegStatus, //3 |
|
69 EMultimodePacketServiceNotifyNtwkRegStatusChange, //4 |
|
70 EMultimodePacketServiceNotifyContextActivationRequested, //5 |
|
71 EMultimodePacketServiceNotifyContextAdded, //6 |
|
72 EMultimodePacketServiceNotifyDynamicCapsChange, //7 |
|
73 EMultimodePacketServiceNotifyMSClassChange, //8 |
|
74 EMultimodePacketServiceNotifyStatusChange, //9 |
|
75 EMultimodePacketServiceSetPreferredBearer, //10 |
|
76 EMultimodePacketServiceSetAttachMode, //11 |
|
77 EMultimodePacketServiceRejectActivationRequest, //12 |
|
78 EMultimodePacketServiceGetAttachMode, //13 |
|
79 EMultimodePacketServiceSetDefaultContextParams, //14 |
|
80 EMultimodePacketServiceGetDefaultContextParams, //15 |
|
81 EMultimodePacketServiceNotifyContextActivationRequested99, //16 |
|
82 EMultimodePacketSetAlwaysOn, //17 |
|
83 EMultimodePacketServiceNotifyMBMSStatusChange, //18 |
|
84 EMultimodePacketServiceGetMBMSStatus, //19 |
|
85 EMultimodePacketServiceNotifyMbmsServiceAvailabilityChange, //20 |
|
86 EMultimodePacketServiceEnumerateMbmsActiveServices, //21 |
|
87 EMultimodePacketServiceUpdateMBMSMonitorServiceList, //22 |
|
88 EMultimodePacketServiceNotifyContextActivationRequested5, //23 |
|
89 |
|
90 // Add new requests here. ENumOfMultimodePacketServiceRequests shows |
|
91 // maximum number of requests in TPacketServiceRequestTypes |
|
92 ENumOfMultimodePacketServiceRequests //24 |
|
93 }; |
|
94 |
|
95 private: // Data |
|
96 |
|
97 /** |
|
98 * Internal saved notify related data pointers in Packet Service |
|
99 * @param iChangeOfNtwkRegStatus pointer to RPacketService::TRegistrationStatus |
|
100 * @param iDynamicCapsChange pointer to RPacketService::TDynamicCapsFlags |
|
101 * @param iMSClassChange pointer to RPacketService::TMSClass |
|
102 * @param iStatusChange pointer to RPacketService::TStatus |
|
103 * @param iContextActivationRequested pointer to RPacketContext::TContextConfigGPRS |
|
104 * @param iContextActivationRequested99 pointer to RPacketContext::TContextConfigR99_R4 |
|
105 * @param iContextActivationRequested5 pointer to RPacketContext::TContextConfig_R5 |
|
106 * @param iContextAdded pointer |
|
107 */ |
|
108 struct TMmNotifyDataPointers |
|
109 { |
|
110 RPacketService::TRegistrationStatus* iChangeOfNtwkRegStatus; |
|
111 RPacketService::TDynamicCapsFlags* iDynamicCapsChange; |
|
112 RPacketService::TMSClass* iMSClassChange; |
|
113 RPacketService::TStatus* iStatusChange; |
|
114 RPacketContext::TContextConfigGPRS* iContextActivationRequested; |
|
115 RPacketContext::TContextConfigR99_R4* iContextActivationRequested99; |
|
116 RPacketContext::TContextConfig_R5* iContextActivationRequested5; |
|
117 TDes* iContextAdded; |
|
118 /** |
|
119 * A client pointer to the MbmsNetworkServiceStatus for notify any status change |
|
120 */ |
|
121 TMbmsNetworkServiceStatus* iMBMSStatusChange; |
|
122 |
|
123 TMmNotifyDataPointers() |
|
124 { |
|
125 iChangeOfNtwkRegStatus = NULL; |
|
126 iDynamicCapsChange = NULL; |
|
127 iMSClassChange = NULL; |
|
128 iStatusChange = NULL; |
|
129 iContextActivationRequested = NULL; |
|
130 iContextActivationRequested99 = NULL; |
|
131 iContextAdded = NULL; |
|
132 iMBMSStatusChange = NULL; |
|
133 } |
|
134 }; |
|
135 |
|
136 /** |
|
137 * Internal saved data in Packet Service |
|
138 * @param iMsClass contains MsClass type |
|
139 * @param iPreferredBearer contains current PreferredBearer |
|
140 * @param iServiceStatus contains service status |
|
141 * @param iServiceStatusBeforeSuspend contains current status before |
|
142 * suspend |
|
143 * @param iRegistrationStatus contains registration status |
|
144 */ |
|
145 struct TMmPacketServiceInternalSavedData |
|
146 { |
|
147 RPacketService::TMSClass iMsClass; |
|
148 RPacketService::TPreferredBearer iPreferredBearer; |
|
149 RPacketService::TStatus iServiceStatus; |
|
150 RPacketService::TStatus iServiceStatusBeforeSuspend; |
|
151 RPacketService::TRegistrationStatus iRegistrationStatus; |
|
152 /** |
|
153 * contain current MBMS network status |
|
154 */ |
|
155 TMbmsNetworkServiceStatus iMbmsStatus; |
|
156 }; |
|
157 |
|
158 /** |
|
159 * Temporary saved data in Packet Service |
|
160 * @param iGetAttachMode pointer to RPacketService::TAttachMode |
|
161 * @param iPreferredBearer preferred bearer |
|
162 */ |
|
163 struct TMmPacketServiceTemporarySavedData |
|
164 { |
|
165 RPacketService::TAttachMode* iGetAttachMode; |
|
166 RPacketService::TPreferredBearer iPreferredBearer; |
|
167 /** |
|
168 * Pointer to the MBMS Status |
|
169 */ |
|
170 TMbmsNetworkServiceStatus* iMbmsStatus; |
|
171 }; |
|
172 |
|
173 public: // Constructors and destructor |
|
174 |
|
175 /** |
|
176 * Two-phased constructor. |
|
177 * @param aMmPhone pointer to PhoneTsy |
|
178 * @param aMessageManager pointer to Messagemanager |
|
179 * @param aFactory pointer to Ltsy factory base |
|
180 */ |
|
181 static CMmPacketServiceTsy* NewL( CMmPhoneTsy* const aMmPhone, |
|
182 CMmMessageManagerBase* const aMessageManager, |
|
183 MLtsyFactoryBase* aFactory ); |
|
184 |
|
185 /** |
|
186 * Default destructor. |
|
187 */ |
|
188 virtual ~CMmPacketServiceTsy(); |
|
189 |
|
190 public: // New functions |
|
191 |
|
192 |
|
193 /** |
|
194 * Returns MBMS context list |
|
195 * |
|
196 * @return CMmMBMSContextList MBMS context list object |
|
197 */ |
|
198 virtual CMmMBMSContextList* MBMSContextList(); |
|
199 |
|
200 /** |
|
201 * Request to update monitored service list. |
|
202 * |
|
203 * @param aAction Action to make changes (add/remove or remove all) |
|
204 * @param aList A descriptor that holds the list of monitored services to update, or NULL for an empty list |
|
205 * @return TInt Error value |
|
206 */ |
|
207 TInt UpdateMbmsMonitorServiceListL( TMbmsAction aAction, |
|
208 TDes8* aList ); |
|
209 |
|
210 /** |
|
211 * Completes update monitored list request |
|
212 * |
|
213 * @param aResult the result of the Update |
|
214 * @param aDataPackage a packed list of all the monitor entries that failed to update |
|
215 */ |
|
216 virtual void CompleteUpdateMbmsMonitorServiceList( CMmDataPackage* aDataPackage, |
|
217 const TInt aResult ); |
|
218 |
|
219 /** |
|
220 * Enumrates monitored service list |
|
221 * |
|
222 * @param aCount Actual number of monitored services is list |
|
223 * @param aMax Maximum number of services in list |
|
224 * @return error code |
|
225 */ |
|
226 TInt EnumerateMonitorServiceList( TInt& aCount, TInt& aMaxAllowed ); |
|
227 |
|
228 |
|
229 /** |
|
230 * Enumerates all active services |
|
231 */ |
|
232 TInt EnumerateMbmsActiveServices(); |
|
233 |
|
234 /** |
|
235 * Returns a pointer to CMmCustomTsy object. |
|
236 * |
|
237 * |
|
238 * @return CMmCustomTsy* |
|
239 */ |
|
240 virtual CMmCustomTsy* CustomTsy() const; |
|
241 |
|
242 /** |
|
243 * Returns a pointer to the active packet service extension. |
|
244 * |
|
245 * |
|
246 * @return CMmPacketServiceGsmWcdmaExt* |
|
247 */ |
|
248 virtual CMmPacketServiceGsmWcdmaExt* ActivePacketServiceExtension(); |
|
249 |
|
250 /** |
|
251 * Returns a pointer to the tsy request handle store. |
|
252 * |
|
253 * |
|
254 * @return CMmTsyReqHandleStore* |
|
255 */ |
|
256 virtual CMmTsyReqHandleStore* TsyReqHandleStore(); |
|
257 |
|
258 /** |
|
259 * Returns a pointer to the packet context list. |
|
260 * |
|
261 * |
|
262 * @return CMmPacketContextList* |
|
263 */ |
|
264 virtual CMmPacketContextList* PacketContextList(); |
|
265 |
|
266 /** |
|
267 * Returns current status of Packet Service. |
|
268 * |
|
269 * |
|
270 * @return RPacketService::TStatus |
|
271 */ |
|
272 virtual RPacketService::TStatus ServiceStatus() const; |
|
273 |
|
274 /** |
|
275 * Context status has changed from the Service point of view. |
|
276 * |
|
277 * |
|
278 * @param aContextStatus |
|
279 */ |
|
280 void ContextStatusChanged( |
|
281 const RPacketContext::TContextStatus aContextStatus ); |
|
282 |
|
283 /** |
|
284 * Starts asynchronous attach request to the network. |
|
285 * |
|
286 * |
|
287 * @return Errorvalue |
|
288 */ |
|
289 TInt AttachL(); |
|
290 |
|
291 /** |
|
292 * Completes asynchronous attach request. |
|
293 * |
|
294 * |
|
295 * @param aError error value for completion |
|
296 */ |
|
297 virtual void CompleteAttach( const TInt aError ); |
|
298 |
|
299 /** |
|
300 * Starts asynchronous detach request to the network. |
|
301 * |
|
302 * |
|
303 * @return error value |
|
304 */ |
|
305 TInt DetachL(); |
|
306 |
|
307 /** |
|
308 * Completes asynchronous detach request. |
|
309 * |
|
310 * |
|
311 * @param aError, errovalue for completion |
|
312 */ |
|
313 virtual void CompleteDetachL( const TInt aError ); |
|
314 |
|
315 /** |
|
316 * Enumerates contexts and completes. |
|
317 * |
|
318 * |
|
319 * @param aCount, number of created contexts |
|
320 * @param aMaxAllowed, maximum number of contexts |
|
321 */ |
|
322 TInt EnumerateContexts( TInt* const aCount,TInt* const aMaxAllowed ); |
|
323 |
|
324 /** |
|
325 * Returns current mode of the GPRS Attach operation. |
|
326 * |
|
327 * |
|
328 * @param aMode attach mode |
|
329 * @return current mode of the GPRS |
|
330 */ |
|
331 TInt GetAttachModeL( RPacketService::TAttachMode* const aMode ); |
|
332 |
|
333 /** |
|
334 * Completes Get GPRS Attach Info operation. |
|
335 * |
|
336 * |
|
337 * @param aAttachMode attach mode |
|
338 */ |
|
339 virtual void CompleteGetAttachMode(const RPacketService::TAttachMode aAttachMode, |
|
340 TInt aResult); |
|
341 |
|
342 /** |
|
343 * Gets Context info of the context defined by aIndex. |
|
344 * |
|
345 * |
|
346 * @param aIndex, index to the context |
|
347 * @param aInfo, context info |
|
348 * @return error value |
|
349 */ |
|
350 TInt GetContextInfo( const TInt* const aIndex, |
|
351 RPacketService::TContextInfo* const aInfo ); |
|
352 |
|
353 /** |
|
354 * Gets the dynamic capabilities of the phone. |
|
355 * |
|
356 * |
|
357 * @param aCaps, dynamic capabilities |
|
358 * @return error value |
|
359 */ |
|
360 TInt GetDynamicCaps( RPacketService::TDynamicCapsFlags* const aCaps ); |
|
361 |
|
362 /** |
|
363 * Gets current and maximum value of the Mobile Station Class. |
|
364 * |
|
365 * |
|
366 * @param aCurrentClass, currently used ms class |
|
367 * @param aMaxClass, maximum possible ms class |
|
368 * @return error value |
|
369 */ |
|
370 TInt GetMSClass( RPacketService::TMSClass* const aCurrentClass, |
|
371 RPacketService::TMSClass* const aMaxClass ); |
|
372 |
|
373 /** |
|
374 * Gets network registration status. |
|
375 * |
|
376 * |
|
377 * @param aRegistrationStatus, status |
|
378 * @return error value |
|
379 */ |
|
380 TInt GetNtwkRegStatusL( |
|
381 RPacketService::TRegistrationStatus* const aRegistrationStatus ); |
|
382 |
|
383 /** |
|
384 * Completes get network registration status request. |
|
385 * |
|
386 * |
|
387 * @param aRegistrationStatus, registration status |
|
388 * @param aError, error code default as KErrNone |
|
389 */ |
|
390 virtual void CompleteGetNtwkRegStatus( |
|
391 const RPacketService::TRegistrationStatus aRegistrationStatus, |
|
392 const TInt aError ); |
|
393 |
|
394 /** |
|
395 * Returns preferred bearer. |
|
396 * |
|
397 * |
|
398 * @param aBearer, preferred bearer |
|
399 * @return error value |
|
400 */ |
|
401 TInt GetPreferredBearer( |
|
402 RPacketService::TPreferredBearer* const aBearer ); |
|
403 |
|
404 /** |
|
405 * Retrieves those capabilities of the TSY that are constant. |
|
406 * |
|
407 * |
|
408 * @param aCaps, static capabilities |
|
409 * @param aPdpType, current Pdp type |
|
410 * @return error value |
|
411 */ |
|
412 TInt GetStaticCaps( TUint* const aCaps, |
|
413 const RPacketContext::TProtocolType* const aPdpType ); |
|
414 |
|
415 /** |
|
416 * Returns current status of the packet service. |
|
417 * |
|
418 * |
|
419 * @param aPacketStatus,packet status |
|
420 * @return error value |
|
421 */ |
|
422 TInt GetStatus( RPacketService::TStatus* const aPacketStatus ); |
|
423 |
|
424 /** |
|
425 * Requests notification of network registration status change. |
|
426 * |
|
427 * |
|
428 * @param aRegistrationStatus, registrationstatus |
|
429 * @return errorvalue |
|
430 */ |
|
431 TInt NotifyChangeOfNtwkRegStatus( |
|
432 RPacketService::TRegistrationStatus* const aRegistrationStatus ); |
|
433 |
|
434 /** |
|
435 * Requests notification of network requests context activation. |
|
436 * |
|
437 * |
|
438 * @param aContextParameters, context parameters |
|
439 * @return error value |
|
440 */ |
|
441 TInt NotifyContextActivationRequested( |
|
442 TPacketDataConfigBase* const aContextParameters ); |
|
443 |
|
444 /** |
|
445 * Requests notification of context has been added. |
|
446 * |
|
447 * |
|
448 * @param aPackage, contains parameters for request |
|
449 * @return error value |
|
450 */ |
|
451 TInt NotifyContextAdded( const TDataPackage& aPackage ); |
|
452 |
|
453 /** |
|
454 * Requests notification of dynamic capabilities change. |
|
455 * |
|
456 * |
|
457 * @param aCaps, dynamic capabilities |
|
458 * @return error value |
|
459 */ |
|
460 TInt NotifyDynamicCapsChange |
|
461 ( |
|
462 RPacketService::TDynamicCapsFlags* const aCaps |
|
463 ); |
|
464 |
|
465 /** |
|
466 * Requests notification of mobile station class change. |
|
467 * |
|
468 * |
|
469 * @param aNewClass, new mobile station class |
|
470 * @return error value |
|
471 */ |
|
472 TInt NotifyMSClassChange( RPacketService::TMSClass* const aNewClass ); |
|
473 |
|
474 /** |
|
475 * Informs client that service status change. |
|
476 * |
|
477 * |
|
478 * @param aPacketStatus, packet status |
|
479 * @return error value |
|
480 */ |
|
481 TInt NotifyStatusChange( |
|
482 RPacketService::TStatus* const aPacketStatus ); |
|
483 |
|
484 /** |
|
485 * Reject activation request from the network. |
|
486 * |
|
487 * |
|
488 * @return error value |
|
489 */ |
|
490 TInt RejectActivationRequestL(); |
|
491 |
|
492 /** |
|
493 * Completes asynchronous reject activation request. |
|
494 * |
|
495 * |
|
496 */ |
|
497 virtual void CompleteRejectActivationRequest(); |
|
498 |
|
499 /* |
|
500 * Sets attach mode given in parameter to the server. |
|
501 * |
|
502 * |
|
503 * @param aPackage, contains parameters for request |
|
504 * @return error value |
|
505 */ |
|
506 TInt SetAttachModeL( const RPacketService::TAttachMode* aMode ); |
|
507 |
|
508 /** |
|
509 * Completes the Set Attach Mode request. |
|
510 * |
|
511 * |
|
512 * @param aError, error value for completion |
|
513 */ |
|
514 virtual void CompleteSetAttachMode( const TInt aError ); |
|
515 |
|
516 /** |
|
517 * Sets preferred bearer given in parameter to the server. |
|
518 * |
|
519 * |
|
520 * @param aPackage, contains parameters for request |
|
521 * @return error value |
|
522 */ |
|
523 TInt SetPreferredBearerL( const TDataPackage& aPackage ); |
|
524 |
|
525 /** |
|
526 * Completes the Set Preferred Bearer request. |
|
527 * |
|
528 * |
|
529 * @param aError, error value for completion |
|
530 */ |
|
531 virtual void CompleteSetPreferredBearer( const TInt aError ); |
|
532 |
|
533 /** |
|
534 * ExtFunc is called by the ETel when it has request for the TSY. |
|
535 * |
|
536 * |
|
537 * @param aTsyReqHandle, request handle |
|
538 * @param aIpc, ipc number of request |
|
539 * @param aPackage, data package |
|
540 * @return error value |
|
541 */ |
|
542 virtual TInt ExtFunc( const TTsyReqHandle aTsyReqHandle, |
|
543 const TInt aIpc, const TDataPackage& aPackage ); |
|
544 |
|
545 /** |
|
546 * Returns request mode for given IPC. |
|
547 * |
|
548 * |
|
549 * @param aIpc, ipc number of request |
|
550 * @return request mode |
|
551 */ |
|
552 virtual CTelObject::TReqMode ReqModeL( const TInt aIpc ); |
|
553 |
|
554 /** |
|
555 * Returns number of slots to be used for given IPC. |
|
556 * |
|
557 * |
|
558 * @param aIpc, ipc number of request |
|
559 * @return number of slots used for given IPC |
|
560 */ |
|
561 virtual TInt NumberOfSlotsL( const TInt aIpc ); |
|
562 |
|
563 /** |
|
564 * Cancels request defined by aIpc. |
|
565 * |
|
566 * |
|
567 * @param aIpc, ipc number of request |
|
568 * @param aTsyReqHandle, request handle of given request |
|
569 * @return error value |
|
570 */ |
|
571 virtual TInt CancelService( const TInt aIpc, |
|
572 const TTsyReqHandle aTsyReqHandle ); |
|
573 |
|
574 /** |
|
575 * This function subscribes given notification from DOS. |
|
576 * |
|
577 * |
|
578 * @param aIpc, ipc number of request |
|
579 * @return error value |
|
580 */ |
|
581 virtual TInt RegisterNotification( const TInt aIpc ); |
|
582 |
|
583 /** |
|
584 * This function unsubscribes given notification from DOS. |
|
585 * |
|
586 * |
|
587 * @param aIpc, ipc number of request |
|
588 */ |
|
589 virtual TInt DeregisterNotification( const TInt aIpc ); |
|
590 |
|
591 /** |
|
592 * Creates new Context object and returns a pointer to it. |
|
593 * |
|
594 * |
|
595 * @param aNewName, a new name of the Context object to be created |
|
596 * @return pointer to created context |
|
597 */ |
|
598 virtual CTelObject* OpenNewObjectL( TDes& aNewName ); |
|
599 |
|
600 /** |
|
601 * Returns context object defined in parameter aName. |
|
602 * |
|
603 * |
|
604 * @param aName, a name of the object to be created |
|
605 * @return pointer to context object |
|
606 */ |
|
607 virtual CTelObject* OpenNewObjectByNameL( const TDesC& aName ); |
|
608 |
|
609 /** |
|
610 * Next created Context will be secondary, gives primary context name |
|
611 * |
|
612 * |
|
613 * @param aPrimaryContextName, Name of the host context |
|
614 * @return error value |
|
615 */ |
|
616 TInt PrepareOpenSecondary( TDes16* aPrimaryContextName ); |
|
617 |
|
618 /** |
|
619 * Initialisation method that is called from ETel Server. |
|
620 * |
|
621 * |
|
622 */ |
|
623 virtual void Init(); |
|
624 |
|
625 /** |
|
626 * Completes network registration status notification to client. |
|
627 * |
|
628 * |
|
629 * @param aRegistrationStatus, reg status |
|
630 */ |
|
631 virtual void CompleteNotifyChangeOfNtwkRegStatus( |
|
632 const RPacketService::TRegistrationStatus aRegistrationStatus ); |
|
633 |
|
634 /** |
|
635 * Completes context activation requested notification to client. |
|
636 * |
|
637 * |
|
638 * @param aDataPackage |
|
639 */ |
|
640 virtual void CompleteNotifyContextActivationRequested( |
|
641 CMmDataPackage* aDataPackage ); |
|
642 |
|
643 /** |
|
644 * Completes the context added notification to client. |
|
645 * |
|
646 * |
|
647 * @param aPackage contains parameters for request |
|
648 */ |
|
649 virtual void CompleteNotifyContextAdded( CMmDataPackage* aPackage ); |
|
650 |
|
651 |
|
652 /** |
|
653 * Completes dynamic capabilities change notification to client. |
|
654 * |
|
655 * |
|
656 * @param aCaps, dynamic capabilities |
|
657 */ |
|
658 virtual void CompleteNotifyDynamicCapsChange( |
|
659 const RPacketService::TDynamicCapsFlags aCaps ); |
|
660 |
|
661 /** |
|
662 * Completes max value of monitored services change. |
|
663 * |
|
664 * |
|
665 * @param aMaxMonitorValue, maximum value of monitored services |
|
666 */ |
|
667 virtual void CompleteMaxMonitoredServicesChange( TInt aMaxMonitorValue ); |
|
668 |
|
669 /** |
|
670 * Completes mobile station class change notification to client. |
|
671 * |
|
672 * |
|
673 * @param aDataPackage contains data used for this notification |
|
674 */ |
|
675 virtual void CompleteNotifyMSClassChange( |
|
676 CMmDataPackage* aDataPackage ); |
|
677 |
|
678 /** |
|
679 * Completes service status change notification to client. |
|
680 * |
|
681 * |
|
682 * @param aPacketStatus, packet service status |
|
683 * @param aErrorCode contains error value if packet status changed because of error |
|
684 */ |
|
685 virtual void CompleteNotifyStatusChange( |
|
686 const RPacketService::TStatus& aPacketStatus, |
|
687 TInt aErrorCode ); |
|
688 |
|
689 /* |
|
690 * Completes packet status change. |
|
691 * |
|
692 * |
|
693 * @param aDataPackage |
|
694 * @param aErrorCode contains error value if packet status changed because of error |
|
695 */ |
|
696 virtual void CompletePacketStatusChanged( |
|
697 CMmDataPackage* aDataPackage, |
|
698 TInt aErrorCode ); |
|
699 |
|
700 /** |
|
701 * Completes preferred bearer change. |
|
702 * |
|
703 * |
|
704 * @param aPreferredBearer preferredbearer |
|
705 * @param aPackage includes request related data |
|
706 */ |
|
707 virtual void PreferredBearerChanged( |
|
708 CMmDataPackage* aPackage ); |
|
709 |
|
710 /** |
|
711 * Returns externally created dial-up context. |
|
712 * |
|
713 * |
|
714 * @param aContextName |
|
715 */ |
|
716 virtual CMmPacketContextTsy* DialUpContext( |
|
717 const TInfoName aContextName ); |
|
718 |
|
719 /** |
|
720 * Resets pointer to dial-up context. |
|
721 * |
|
722 * |
|
723 * @param aContextName |
|
724 */ |
|
725 void ResetPointerToDialUpContext( const TInfoName aContextName ); |
|
726 |
|
727 /** |
|
728 * Enumerate network interfaces. |
|
729 * |
|
730 * |
|
731 * @param aCount, pointer to number of nifs |
|
732 * @return error value |
|
733 */ |
|
734 TInt EnumerateNifs( TInt* aCount ); |
|
735 |
|
736 /** |
|
737 * Get network interface information. |
|
738 * |
|
739 * |
|
740 * @param aIndex, index of wanted nif |
|
741 * @param aNifInfoV2, pointer to nif information |
|
742 * @return error value |
|
743 */ |
|
744 TInt GetNifInfo( TInt* aIndex, |
|
745 RPacketService::TNifInfoV2* aNifInfoV2 ); |
|
746 |
|
747 /** |
|
748 * Number of contexts in network interface. |
|
749 * |
|
750 * |
|
751 * @param aExistingContextName, name of Nif |
|
752 * @param aCount, pointer to number of contexts |
|
753 * @return error value |
|
754 */ |
|
755 TInt EnumerateContextsInNif( TDesC* aExistingContextName, |
|
756 TInt* aCount ); |
|
757 |
|
758 /** |
|
759 * Get name of context in network interface. |
|
760 * |
|
761 * |
|
762 * @param aContextNameInNif, name of Nif and index of context |
|
763 * @param aContextName, wanted context name |
|
764 * @return error value |
|
765 */ |
|
766 TInt GetContextNameInNif( |
|
767 RPacketService::TContextNameInNif* aContextNameInNif, |
|
768 TDes* aContextName ); |
|
769 |
|
770 /** |
|
771 * Set default parameters to context. |
|
772 * |
|
773 * |
|
774 * @param aPackage,contains parameters for request |
|
775 * @return error value |
|
776 */ |
|
777 TInt SetDefaultContextParamsL( const TDataPackage& aPackage ); |
|
778 |
|
779 /** |
|
780 * Completes SetDefaultContextConfiguration request. |
|
781 * |
|
782 * |
|
783 * @param aCause, Error cause |
|
784 */ |
|
785 virtual void CompleteSetDefaultContextParams( TInt aCause ); |
|
786 |
|
787 /** |
|
788 * Get context default parameters. |
|
789 * |
|
790 * |
|
791 * @param aContextConfig, Configuration data |
|
792 * @return error value |
|
793 */ |
|
794 TInt GetDefaultContextParams( TPacketDataConfigBase* aContextConfig ); |
|
795 |
|
796 /** |
|
797 * Is activation of context allowed |
|
798 * |
|
799 * |
|
800 */ |
|
801 TInt IsActivationAllowed(); |
|
802 |
|
803 /** |
|
804 * Returns pointer to CMmMessagemanagerBase. |
|
805 * |
|
806 * |
|
807 * @return pointer to CMmMessagemanagerBase |
|
808 */ |
|
809 virtual CMmMessageManagerBase* MessageManager(); |
|
810 |
|
811 |
|
812 /** |
|
813 * Routes completion to customtsy |
|
814 * |
|
815 * |
|
816 * @param aDataPackage |
|
817 */ |
|
818 void CompleteNotifyEGprsInfoChange( CMmDataPackage* aDataPackage ); |
|
819 |
|
820 /** |
|
821 * Completes network registration status notification to client. |
|
822 * Handles request coming from MessHandler |
|
823 * |
|
824 * |
|
825 * @param aDataPackage includes request related data |
|
826 * @param aResult The result of the notification from the LTSY |
|
827 */ |
|
828 void CompleteNotifyChangeOfNtwkRegStatus( |
|
829 CMmDataPackage* aDataPackage, TInt aResult ); |
|
830 |
|
831 /** |
|
832 * Returns pointer to right Qos |
|
833 * |
|
834 * |
|
835 * @param aMmPacketContextName |
|
836 * @return pointer to right Qos object |
|
837 */ |
|
838 CMmPacketQoSTsy* QosTsy( TInfoName aMmPacketContextName ); |
|
839 |
|
840 /** |
|
841 * Set current network to Service TSY. |
|
842 * |
|
843 * |
|
844 * @param CDataPackage |
|
845 */ |
|
846 virtual void CompleteNetworkModeChange( CMmDataPackage* CDataPackage ); |
|
847 |
|
848 /** |
|
849 * Returns context by name |
|
850 * |
|
851 * |
|
852 * @param contextName, context Name |
|
853 * @return pointer to context object |
|
854 */ |
|
855 CMmPacketContextTsy* ContextTsy( TInfoName& contextName ); |
|
856 |
|
857 virtual RHandleBase* GlobalKernelObjectHandle(); |
|
858 |
|
859 /** |
|
860 * Request Set Always On |
|
861 * |
|
862 * |
|
863 * @param aTsyReqHandle TSY ReqHandle |
|
864 * @param aMode requested mode |
|
865 * @return error value |
|
866 */ |
|
867 TInt SetAlwaysOnL( TTsyReqHandle aTsyReqHandle, |
|
868 RMmCustomAPI::TSetAlwaysOnMode aMode ); |
|
869 |
|
870 /** |
|
871 * Completes SetAlwaysOn request |
|
872 * |
|
873 * |
|
874 * @param aError error value from LTSY |
|
875 */ |
|
876 void CompleteSetAlwaysOn( TInt aError ); |
|
877 |
|
878 /** |
|
879 * Cancels Set Always On |
|
880 * |
|
881 * |
|
882 * @param aTsyReqHandle TSY reghandle |
|
883 */ |
|
884 void CancelSetAlwaysOn( |
|
885 TTsyReqHandle aTsyReqHandle ); |
|
886 |
|
887 /** |
|
888 * Returns current status of MBMS Network Service. |
|
889 * |
|
890 * @param aAttemptAttach a boolean to state whether the mbms should attemt to attach the service |
|
891 * @param aMBMSServiceStatus pointer to a client object to return the MBMS network service status |
|
892 * @return KErrNone if success, system wide error code otherwise |
|
893 */ |
|
894 TInt GetMbmsNetworkServiceStatus(TBool aAttemptAttach, TMbmsNetworkServiceStatus* aMBMSServiceStatus ); |
|
895 |
|
896 /** |
|
897 * Completes get MBMS network service status request. |
|
898 * |
|
899 * |
|
900 * @param aDataPackage, service status |
|
901 * @param aError, error code default as KErrNone |
|
902 */ |
|
903 void CompleteGetMbmsNetworkServiceStatus( CMmDataPackage* aDataPackage, TInt aError ); |
|
904 |
|
905 /** |
|
906 * Requests notification of network service status change. |
|
907 * |
|
908 * |
|
909 * @param aMBMSServiceStatus |
|
910 * @return error value |
|
911 */ |
|
912 TInt NotifyMbmsNetworkServiceStatusChange(TMbmsNetworkServiceStatus* aMBMSServiceStatus ); |
|
913 |
|
914 /** |
|
915 * Completes Network service status change requested notification to client. |
|
916 * |
|
917 * |
|
918 * @param aDataPackage, contains parameters for request |
|
919 */ |
|
920 void CompleteNotifyMbmsNetworkServiceStatusChange( CMmDataPackage* aDataPackage, TInt aResult ); |
|
921 |
|
922 /** |
|
923 * Requests notification of mbms service availability list change. |
|
924 * |
|
925 * |
|
926 */ |
|
927 TInt NotifyMbmsServiceAvailabilityChange(); |
|
928 |
|
929 /** |
|
930 * Completes service available status change requested notification to client. |
|
931 * |
|
932 * |
|
933 * @param aDataPackage a packed list of all the available services, or NULL for empty list |
|
934 * @param aResult The result of the notification from the LTSY |
|
935 */ |
|
936 void CompleteNotifyMbmsServiceAvailabilityChangeL(CMmDataPackage* aDataPackage, TInt aResult); |
|
937 |
|
938 /** |
|
939 * Returns the number of Mbms active service list and the maximum possible number of active service list |
|
940 * |
|
941 * |
|
942 * @param aCount The number of Mbms active service list [out] |
|
943 * @param aMaxAllowed The maximum number of active service lists [out] |
|
944 * @return error code |
|
945 */ |
|
946 TInt EnumerateMbmsActiveServiceList(TInt &aCount, TInt &aMaxAllowed); |
|
947 |
|
948 /** |
|
949 * Completes Enumrate active service list |
|
950 * |
|
951 */ |
|
952 void CompleteEnumerateMbmsActiveServiceList(CMmDataPackage* aDataPackage, TInt aResult); |
|
953 |
|
954 /** |
|
955 * Requests size of the monitored service list. |
|
956 * |
|
957 * |
|
958 * @param aClient a pointer to the client ID |
|
959 * @param aBufSize The return buffer size |
|
960 * @return error code |
|
961 */ |
|
962 TInt GetMbmsMonitoredServicesPhase1L(RMobilePhone::TClientId* aClient, TUint &aBufSize); |
|
963 |
|
964 /** |
|
965 * Get size of monitored service list |
|
966 * |
|
967 * @param aClient, client id |
|
968 * @param aBufSize, TUint size of the buffer |
|
969 * @return error code |
|
970 */ |
|
971 TInt GetSizeOfMonitoredServiceListL(RMobilePhone::TClientId* aClient, TUint& aBufSize); |
|
972 |
|
973 /** |
|
974 * Requests the monitored service list. |
|
975 * |
|
976 * |
|
977 * @param aClient, client id |
|
978 * @param aBuf, client bufer to copy data to |
|
979 * @return error code |
|
980 */ |
|
981 TInt GetMbmsMonitoredServicesPhase2(RMobilePhone::TClientId* aClient, TDes8* aBuf); |
|
982 |
|
983 /** |
|
984 * Return maximum number of active services allowed |
|
985 * |
|
986 * @return TInt Max number of active services |
|
987 */ |
|
988 TInt MaximumActiveServices(); |
|
989 |
|
990 #ifdef REQHANDLE_TIMER |
|
991 /** |
|
992 * Returns a pointer to CMmPhoneTsy object. |
|
993 * |
|
994 * |
|
995 */ |
|
996 CMmPhoneTsy* PhoneTsy(); |
|
997 |
|
998 /** |
|
999 * Called from MmPhoneTsy when timer expire. |
|
1000 * |
|
1001 * |
|
1002 * @param aObject |
|
1003 * @param aReqHandleType |
|
1004 * @param aError |
|
1005 */ |
|
1006 virtual void Complete( const CTelObject* const aObject, |
|
1007 const TInt aReqHandleType, const TInt aError ); |
|
1008 |
|
1009 #endif // REQHANDLE_TIMER |
|
1010 |
|
1011 |
|
1012 #ifdef TF_LOGGING_ENABLED |
|
1013 /** |
|
1014 * Overloads original ReqCompleted for logging purposes. |
|
1015 * |
|
1016 * |
|
1017 * @param aTsyReqHandle |
|
1018 * @param aError |
|
1019 */ |
|
1020 virtual void ReqCompleted( const TTsyReqHandle aTsyReqHandle, |
|
1021 const TInt aError ); |
|
1022 |
|
1023 #endif // TF_LOGGING_ENABLED |
|
1024 |
|
1025 private: // New functions |
|
1026 |
|
1027 /** |
|
1028 * Default constructor. |
|
1029 */ |
|
1030 CMmPacketServiceTsy(); |
|
1031 |
|
1032 /** |
|
1033 * Initialises object attributes. |
|
1034 * |
|
1035 * @param aFactory pointer to Ltsy factory base |
|
1036 */ |
|
1037 void ConstructL( MLtsyFactoryBase* aFactory ); |
|
1038 |
|
1039 /** |
|
1040 * Initialises extension modules for CMmPacketServiceTsy. |
|
1041 * |
|
1042 * @param aFactory pointer to Ltsy factory base |
|
1043 */ |
|
1044 void InitModulesL( MLtsyFactoryBase* aFactory ); |
|
1045 |
|
1046 /** |
|
1047 * Initialises needed stores and lists. |
|
1048 * |
|
1049 * |
|
1050 */ |
|
1051 void InitStoresAndListsL(); |
|
1052 |
|
1053 /** |
|
1054 * Checks if context status is active from service point of view. |
|
1055 * |
|
1056 * |
|
1057 * @param aContextStatus, context status |
|
1058 * @return Boolean True/False |
|
1059 */ |
|
1060 TBool IsContextStatusActive( |
|
1061 const RPacketContext::TContextStatus aContextStatus) const; |
|
1062 |
|
1063 /** |
|
1064 * Sets and completes attached packet status if needed. |
|
1065 * |
|
1066 * |
|
1067 * @param aIsActiveContext, state of context |
|
1068 */ |
|
1069 void UpdateAttachedPacketStatus( const TBool aIsActiveContext ); |
|
1070 |
|
1071 /** |
|
1072 * Calls correct method to handle ETel server request. |
|
1073 * |
|
1074 * |
|
1075 * @param aIpc |
|
1076 * @param aPackage |
|
1077 * @return error value |
|
1078 */ |
|
1079 TInt DoExtFuncL( const TInt aIpc, const TDataPackage& aPackage ); |
|
1080 |
|
1081 /** |
|
1082 * Cancel the Get Mbms Monitored Services |
|
1083 * |
|
1084 * @param aTsyReqHandle the TSY request handle |
|
1085 * @return error code |
|
1086 */ |
|
1087 TInt GetMbmsMonitoredServicesCancel( TTsyReqHandle aTsyReqHandle ); |
|
1088 |
|
1089 /** |
|
1090 * Cancel the Update Mbms Monitor Service List |
|
1091 * |
|
1092 * @param aTsyReqHandle the TSY request handle |
|
1093 * @return error code |
|
1094 */ |
|
1095 TInt UpdateMbmsMonitorServiceListCancel(TTsyReqHandle aTsyReqHandle ); |
|
1096 |
|
1097 |
|
1098 #ifdef REQHANDLE_TIMER |
|
1099 /** |
|
1100 * Chooses the type of response, automatic or common. |
|
1101 * |
|
1102 * |
|
1103 * @param aReqHandleType |
|
1104 */ |
|
1105 void SetTypeOfResponse( const TInt aReqHandleType ); |
|
1106 |
|
1107 /** |
|
1108 * Calls the needed complete method due timer expiration. |
|
1109 * |
|
1110 * |
|
1111 * @param aReqHandleType |
|
1112 * @param aError |
|
1113 */ |
|
1114 void Complete( const TInt aReqHandleType, const TInt aError ); |
|
1115 |
|
1116 #endif // REQHANDLE_TIMER |
|
1117 |
|
1118 private: // Data |
|
1119 |
|
1120 |
|
1121 /** |
|
1122 * MBMS context object |
|
1123 * |
|
1124 */ |
|
1125 CMmMBMSContextList* iMBMSContextList; |
|
1126 |
|
1127 /** |
|
1128 * MBMS monitorted service list |
|
1129 * |
|
1130 */ |
|
1131 CMmMBMSMonitoredList* iMBMSMonitoredList; |
|
1132 |
|
1133 |
|
1134 /** |
|
1135 * Pointer to the packet context list |
|
1136 * Own. |
|
1137 */ |
|
1138 CMmPacketContextList* iPacketContextList; |
|
1139 |
|
1140 /** |
|
1141 * Pointer to the TRegistrationStatus enum defined in Packet Data API |
|
1142 * Not Own. |
|
1143 */ |
|
1144 RPacketService::TRegistrationStatus* iRegistrationStatus; |
|
1145 |
|
1146 /** |
|
1147 * Packet Service Request Handle Type |
|
1148 */ |
|
1149 TPacketServiceRequestTypes iReqHandleType; |
|
1150 |
|
1151 /** |
|
1152 * TSY request handle |
|
1153 */ |
|
1154 TTsyReqHandle iTsyReqHandle; |
|
1155 |
|
1156 /** |
|
1157 * Pointer to the request handle store |
|
1158 * Own. |
|
1159 */ |
|
1160 CMmTsyReqHandleStore* iTsyReqHandleStore; |
|
1161 |
|
1162 /** |
|
1163 * True if service is suspended, otherwise false |
|
1164 */ |
|
1165 TBool iSuspended; |
|
1166 |
|
1167 /** |
|
1168 * A table for packet service request handles |
|
1169 */ |
|
1170 TTsyReqHandle iPacketServiceReqHandles[ |
|
1171 ENumOfMultimodePacketServiceRequests]; |
|
1172 /** |
|
1173 * A pointer to the Phone TSY |
|
1174 * Not own. |
|
1175 */ |
|
1176 CMmPhoneTsy* iMmPhone; |
|
1177 |
|
1178 /** |
|
1179 * A pointer to the Gsm/Wcdma spesific packet service extension |
|
1180 * Own. |
|
1181 */ |
|
1182 CMmPacketServiceGsmWcdmaExt* iMmPacketServiceGsmWcdmaExt; |
|
1183 |
|
1184 /** |
|
1185 * Structure contains notify related data pointers |
|
1186 */ |
|
1187 TMmNotifyDataPointers iNotifyDataPointers; |
|
1188 |
|
1189 /** |
|
1190 * Structure contains data that must be saved in Packet Service |
|
1191 */ |
|
1192 TMmPacketServiceInternalSavedData iInternalSavedData; |
|
1193 |
|
1194 /** |
|
1195 * Structure contains temporary saved data in Packet Service |
|
1196 */ |
|
1197 TMmPacketServiceTemporarySavedData iTemporarySavedData; |
|
1198 |
|
1199 /** |
|
1200 * A pointer to the externally created dial-up context |
|
1201 * Own. |
|
1202 */ |
|
1203 CMmPacketContextTsy* iDialUpContext; |
|
1204 |
|
1205 /** |
|
1206 * A pointer to the externally created dial-up context |
|
1207 * Own. |
|
1208 */ |
|
1209 CMmPacketContextTsy* iSecondaryDialUpContext; |
|
1210 |
|
1211 /** |
|
1212 * Primary Context Name |
|
1213 */ |
|
1214 TInfoName iHostCID; |
|
1215 |
|
1216 /** |
|
1217 * Pointer to CMmMessageManagerBase |
|
1218 * Not own. |
|
1219 */ |
|
1220 CMmMessageManagerBase* iMessageManager; |
|
1221 |
|
1222 /** |
|
1223 * Current network mode |
|
1224 */ |
|
1225 RMobilePhone::TMobilePhoneNetworkMode iCurrentMode; |
|
1226 |
|
1227 /** |
|
1228 * Current attach mode |
|
1229 */ |
|
1230 RPacketService::TAttachMode iAttachMode; |
|
1231 |
|
1232 /** |
|
1233 * Unnamed mutex object owned by TSY |
|
1234 */ |
|
1235 RMutex iMutex; |
|
1236 |
|
1237 /** |
|
1238 * Boolean to indicate MBMS support |
|
1239 */ |
|
1240 TBool iMbmsSupported; |
|
1241 |
|
1242 /** |
|
1243 * Maximum number of monitored service lists |
|
1244 * |
|
1245 */ |
|
1246 TInt iMaxMonitoredServices; |
|
1247 |
|
1248 /** |
|
1249 * Maximum number of active services (= max number of contexts) |
|
1250 */ |
|
1251 TInt iMaxActiveServices; |
|
1252 |
|
1253 /** |
|
1254 * Action type of Update MBMS Monitored Service List |
|
1255 * |
|
1256 */ |
|
1257 TMbmsAction iActionType; |
|
1258 |
|
1259 /** |
|
1260 * indicator of MBMS network service status cache |
|
1261 * |
|
1262 */ |
|
1263 TBool iMbmsStatusCached; |
|
1264 |
|
1265 /** |
|
1266 * Read all entries |
|
1267 */ |
|
1268 CArrayPtrFlat<CListReadAllAttempt>* iGetMbmsMonitoredServiceLists; |
|
1269 |
|
1270 /** |
|
1271 * indicator of MBMS monitorlist max value cache |
|
1272 * |
|
1273 */ |
|
1274 TBool iMbmsMonitorListMaxNumIsCached; |
|
1275 |
|
1276 }; |
|
1277 |
|
1278 #endif // CMMPACKETSERVICETSY_H |
|
1279 |
|
1280 |
|
1281 // End of File |