1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
14 // |
14 // |
15 |
15 |
16 |
16 |
17 |
17 |
18 // INCLUDE FILES |
18 // INCLUDE FILES |
|
19 |
|
20 #include "OstTraceDefinitions.h" |
|
21 #ifdef OST_TRACE_COMPILER_IN_USE |
|
22 #include "CmmpacketservicetsyTraces.h" |
|
23 #endif |
|
24 |
19 #include "Cmmpacketservicetsy.h" |
25 #include "Cmmpacketservicetsy.h" |
20 #include <ctsy/tflogger.h> |
|
21 #include <ctsy/serviceapi/mmtsy_defaults.h> |
26 #include <ctsy/serviceapi/mmtsy_defaults.h> |
22 #include "MmTsy_timeoutdefs.h" |
27 #include "MmTsy_timeoutdefs.h" |
23 #include "MmTsy_numberOfSlots.h" |
28 #include "MmTsy_numberOfSlots.h" |
24 #include "CMmCommonStaticUtility.h" |
29 #include "CMmCommonStaticUtility.h" |
25 #include "Cmmpacketcontextlist.h" |
30 #include "Cmmpacketcontextlist.h" |
44 CMmPacketServiceTsy* CMmPacketServiceTsy::NewL( |
49 CMmPacketServiceTsy* CMmPacketServiceTsy::NewL( |
45 CMmPhoneTsy* const aMmPhone, |
50 CMmPhoneTsy* const aMmPhone, |
46 CMmMessageManagerBase* const aMessageManager, |
51 CMmMessageManagerBase* const aMessageManager, |
47 MLtsyFactoryBase* aFactory ) |
52 MLtsyFactoryBase* aFactory ) |
48 { |
53 { |
49 TFLOGSTRING("TSY: CMmPacketServiceTsy::NewL" ); |
54 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_NEWL_1, "TSY: CMmPacketServiceTsy::NewL" ); |
50 CMmPacketServiceTsy* const packetService = |
55 CMmPacketServiceTsy* const packetService = |
51 new ( ELeave ) CMmPacketServiceTsy(); |
56 new ( ELeave ) CMmPacketServiceTsy(); |
52 |
57 |
53 CleanupClosePushL( *packetService ); |
58 CleanupClosePushL( *packetService ); |
54 packetService->iMmPhone = aMmPhone; |
59 packetService->iMmPhone = aMmPhone; |
55 packetService->iMessageManager = aMessageManager; |
60 packetService->iMessageManager = aMessageManager; |
56 packetService->ConstructL( aFactory ); |
61 packetService->ConstructL( aFactory ); |
57 CleanupStack::Pop(); |
62 CleanupStack::Pop(); |
58 |
63 |
59 TFLOGSTRING("TSY: CMmPacketServiceTsy::NewL." ); |
64 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_NEWL_2, "TSY: CMmPacketServiceTsy::NewL." ); |
60 return packetService; |
65 return packetService; |
61 |
66 |
62 } |
67 } |
63 |
68 |
64 void CMmPacketServiceTsy::ConstructL( MLtsyFactoryBase* aFactory ) |
69 void CMmPacketServiceTsy::ConstructL( MLtsyFactoryBase* aFactory ) |
76 |
81 |
77 } |
82 } |
78 |
83 |
79 CMmPacketServiceTsy::~CMmPacketServiceTsy() |
84 CMmPacketServiceTsy::~CMmPacketServiceTsy() |
80 { |
85 { |
81 TFLOGSTRING("TSY: CMmPacketServiceTsy::~CMmPacketServiceTsy" ); |
86 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_DTOR_1, "TSY: CMmPacketServiceTsy::~CMmPacketServiceTsy" ); |
82 |
87 |
83 if ( iMmPhone ) |
88 if ( iMmPhone ) |
84 { |
89 { |
85 // deregister tsy object from message manager |
90 // deregister tsy object from message manager |
86 iMmPhone->MessageManager()->DeregisterTsyObject(this); |
91 iMmPhone->MessageManager()->DeregisterTsyObject(this); |
106 delete iGetMbmsMonitoredServiceLists; |
111 delete iGetMbmsMonitoredServiceLists; |
107 } |
112 } |
108 |
113 |
109 if ( NULL != iDialUpContext ) |
114 if ( NULL != iDialUpContext ) |
110 { |
115 { |
111 TFLOGSTRING("TSY: CMmPacketServiceTsy::~CMmPacketServiceTsy: Close Dial-up Object." ); |
116 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_DTOR_2, "TSY: CMmPacketServiceTsy::~CMmPacketServiceTsy: Close Dial-up Object." ); |
112 |
117 |
113 iDialUpContext->Close(); |
118 iDialUpContext->Close(); |
114 } |
119 } |
115 |
120 |
116 if ( NULL != iSecondaryDialUpContext ) |
121 if ( NULL != iSecondaryDialUpContext ) |
117 { |
122 { |
118 TFLOGSTRING("TSY: CMmPacketServiceTsy::~CMmPacketServiceTsy: Close Secondary Dial-up Object." ); |
123 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_DTOR_3, "TSY: CMmPacketServiceTsy::~CMmPacketServiceTsy: Close Secondary Dial-up Object." ); |
119 |
124 |
120 iSecondaryDialUpContext->Close(); |
125 iSecondaryDialUpContext->Close(); |
121 } |
126 } |
122 |
127 |
123 TFLOGSTRING("TSY: CMmPacketServiceTsy::~CMmPacketServiceTsy: Closing iMutex Object." ); |
128 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_DTOR_4, "TSY: CMmPacketServiceTsy::~CMmPacketServiceTsy: Closing iMutex Object." ); |
124 iMutex.Close(); |
129 iMutex.Close(); |
125 |
130 |
126 #ifdef USING_CTSY_DISPATCHER |
131 #ifdef USING_CTSY_DISPATCHER |
127 //CTSY defect (memory leak) this maybe allocated, but it is never deleted. |
132 //CTSY defect (memory leak) this maybe allocated, but it is never deleted. |
128 //no need for NULL check as C++ guarantees that operator delete checks its argument for null-ness. |
133 //no need for NULL check as C++ guarantees that operator delete checks its argument for null-ness. |
300 // set service status EStatusAttached |
305 // set service status EStatusAttached |
301 CMmPacketServiceTsy::CompleteNotifyStatusChange( |
306 CMmPacketServiceTsy::CompleteNotifyStatusChange( |
302 RPacketService::EStatusAttached, KErrNone ); |
307 RPacketService::EStatusAttached, KErrNone ); |
303 |
308 |
304 } |
309 } |
305 TFLOGSTRING2("TSY: CMmPacketServiceTsy::UpdateAttachedPacketStatus. Service Status: %d", iInternalSavedData.iServiceStatus ); |
310 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_UPDATEATTACHEDPACKETSTATUS_1, "TSY: CMmPacketServiceTsy::UpdateAttachedPacketStatus. Service Status: %d", iInternalSavedData.iServiceStatus ); |
306 } |
311 } |
307 |
312 |
308 //---------------------------------------------------------------------------- |
313 //---------------------------------------------------------------------------- |
309 // CMmPacketServiceTsy::CompletePacketStatusChanged |
314 // CMmPacketServiceTsy::CompletePacketStatusChanged |
310 // Called from active extension to notify service that transfer status |
315 // Called from active extension to notify service that transfer status |
360 } |
365 } |
361 } |
366 } |
362 |
367 |
363 if ( iDialUpContext != NULL ) |
368 if ( iDialUpContext != NULL ) |
364 { |
369 { |
365 TFLOGSTRING("TSY: CMmPacketServiceTsy::CompletePacketStatusChanged. DialUp Context Resumed" ); |
370 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETEPACKETSTATUSCHANGED_1, "TSY: CMmPacketServiceTsy::CompletePacketStatusChanged. DialUp Context Resumed" ); |
366 |
371 |
367 iDialUpContext->ContextResumed(); |
372 iDialUpContext->ContextResumed(); |
368 } |
373 } |
369 |
374 |
370 if ( iSecondaryDialUpContext != NULL ) |
375 if ( iSecondaryDialUpContext != NULL ) |
371 { |
376 { |
372 TFLOGSTRING("TSY: CMmPacketServiceTsy::CompletePacketStatusChanged. Secondary DialUp Context Resumed" ); |
377 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETEPACKETSTATUSCHANGED_2, "TSY: CMmPacketServiceTsy::CompletePacketStatusChanged. Secondary DialUp Context Resumed" ); |
373 |
378 |
374 iSecondaryDialUpContext->ContextResumed(); |
379 iSecondaryDialUpContext->ContextResumed(); |
375 } |
380 } |
376 |
381 |
377 // Get service status before suspend |
382 // Get service status before suspend |
508 } |
513 } |
509 } |
514 } |
510 |
515 |
511 if ( iDialUpContext != NULL ) |
516 if ( iDialUpContext != NULL ) |
512 { |
517 { |
513 TFLOGSTRING("TSY: CMmPacketServiceTsy::CompletePacketStatusChanged. DialUp Context Suspended" ); |
518 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETEPACKETSTATUSCHANGED_3, "TSY: CMmPacketServiceTsy::CompletePacketStatusChanged. DialUp Context Suspended" ); |
514 iDialUpContext->ContextSuspended(); |
519 iDialUpContext->ContextSuspended(); |
515 } |
520 } |
516 |
521 |
517 if ( iSecondaryDialUpContext != NULL ) |
522 if ( iSecondaryDialUpContext != NULL ) |
518 { |
523 { |
519 TFLOGSTRING("TSY: CMmPacketServiceTsy::CompletePacketStatusChanged. DialUp Context Suspended" ); |
524 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETEPACKETSTATUSCHANGED_4, "TSY: CMmPacketServiceTsy::CompletePacketStatusChanged. DialUp Context Suspended" ); |
520 iSecondaryDialUpContext->ContextSuspended(); |
525 iSecondaryDialUpContext->ContextSuspended(); |
521 } |
526 } |
522 |
527 |
523 // Complete status change notification with |
528 // Complete status change notification with |
524 // EStatusSuspended |
529 // EStatusSuspended |
530 break; |
535 break; |
531 default: |
536 default: |
532 break; |
537 break; |
533 } |
538 } |
534 } |
539 } |
535 TFLOGSTRING2("TSY: CMmPacketServiceTsy::CompletePacketStatusChanged. Service Status: %d", iInternalSavedData.iServiceStatus ); |
540 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETEPACKETSTATUSCHANGED_5, "TSY: CMmPacketServiceTsy::CompletePacketStatusChanged. Service Status: %d", iInternalSavedData.iServiceStatus ); |
536 } |
541 } |
537 |
542 |
538 //---------------------------------------------------------------------------- |
543 //---------------------------------------------------------------------------- |
539 // CMmPacketServiceTsy::ContextStatusChanged |
544 // CMmPacketServiceTsy::ContextStatusChanged |
540 // Context status is changed from the Service point of view. |
545 // Context status is changed from the Service point of view. |
545 //---------------------------------------------------------------------------- |
550 //---------------------------------------------------------------------------- |
546 // |
551 // |
547 void CMmPacketServiceTsy::ContextStatusChanged( |
552 void CMmPacketServiceTsy::ContextStatusChanged( |
548 const RPacketContext::TContextStatus aContextStatus ) |
553 const RPacketContext::TContextStatus aContextStatus ) |
549 { |
554 { |
550 TFLOGSTRING2("TSY: CMmPacketServiceTsy::ContextStatusChanged. Context Status: %d", aContextStatus ); |
555 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_CONTEXTSTATUSCHANGED_1, "TSY: CMmPacketServiceTsy::ContextStatusChanged. Context Status: %d", aContextStatus ); |
551 |
556 |
552 if ( !iSuspended && ( RPacketService::EStatusUnattached != |
557 if ( !iSuspended && ( RPacketService::EStatusUnattached != |
553 iInternalSavedData.iServiceStatus ) ) |
558 iInternalSavedData.iServiceStatus ) ) |
554 { |
559 { |
555 |
560 |
602 { |
607 { |
603 RPacketService::TPreferredBearer preferredBearer; |
608 RPacketService::TPreferredBearer preferredBearer; |
604 |
609 |
605 aPackage->UnPackData( preferredBearer ); |
610 aPackage->UnPackData( preferredBearer ); |
606 |
611 |
607 TFLOGSTRING2("TSY: CMmPacketServiceTsy::PreferredBearerChanged. PreferredBearer: %d", preferredBearer ); |
612 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_PREFERREDBEARERCHANGED_1, "TSY: CMmPacketServiceTsy::PreferredBearerChanged. PreferredBearer: %d", preferredBearer ); |
608 |
613 |
609 iInternalSavedData.iPreferredBearer = preferredBearer; |
614 iInternalSavedData.iPreferredBearer = preferredBearer; |
610 |
615 |
611 } |
616 } |
612 |
617 |
618 // KErrAlreadyExists should be returned. |
623 // KErrAlreadyExists should be returned. |
619 //---------------------------------------------------------------------------- |
624 //---------------------------------------------------------------------------- |
620 // |
625 // |
621 TInt CMmPacketServiceTsy::AttachL() |
626 TInt CMmPacketServiceTsy::AttachL() |
622 { |
627 { |
623 TFLOGSTRING("TSY: CMmPacketServiceTsy::AttachL." ); |
628 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_ATTACHL_1, "TSY: CMmPacketServiceTsy::AttachL." ); |
624 |
629 |
625 TInt ret( KErrAlreadyExists ); |
630 TInt ret( KErrAlreadyExists ); |
626 |
631 |
627 if ( RPacketService::EStatusUnattached == |
632 if ( RPacketService::EStatusUnattached == |
628 iInternalSavedData.iServiceStatus ) |
633 iInternalSavedData.iServiceStatus ) |
663 //---------------------------------------------------------------------------- |
668 //---------------------------------------------------------------------------- |
664 // |
669 // |
665 void CMmPacketServiceTsy::CompleteAttach( |
670 void CMmPacketServiceTsy::CompleteAttach( |
666 const TInt aError ) //error value |
671 const TInt aError ) //error value |
667 { |
672 { |
668 TFLOGSTRING2("TSY: CMmPacketServiceTsy::CompleteAttach. Error Value: %d", aError ); |
673 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETEATTACH_1, "TSY: CMmPacketServiceTsy::CompleteAttach. Error Value: %d", aError ); |
669 |
674 |
670 // Reset request handle. Returns the deleted request handle |
675 // Reset request handle. Returns the deleted request handle |
671 const TTsyReqHandle reqHandle( iTsyReqHandleStore->ResetTsyReqHandle( |
676 const TTsyReqHandle reqHandle( iTsyReqHandleStore->ResetTsyReqHandle( |
672 EMultimodePacketServiceAttach ) ); |
677 EMultimodePacketServiceAttach ) ); |
673 |
678 |
687 // error KErrInUse should be returned. |
692 // error KErrInUse should be returned. |
688 //---------------------------------------------------------------------------- |
693 //---------------------------------------------------------------------------- |
689 // |
694 // |
690 TInt CMmPacketServiceTsy::DetachL() |
695 TInt CMmPacketServiceTsy::DetachL() |
691 { |
696 { |
692 TFLOGSTRING("TSY: CMmPacketServiceTsy::DetachL." ); |
697 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_DETACHL_1, "TSY: CMmPacketServiceTsy::DetachL." ); |
693 |
698 |
694 TInt ret( KErrAlreadyExists ); |
699 TInt ret( KErrAlreadyExists ); |
695 |
700 |
696 if ( RPacketService::EStatusUnattached != |
701 if ( RPacketService::EStatusUnattached != |
697 iInternalSavedData.iServiceStatus ) |
702 iInternalSavedData.iServiceStatus ) |
760 //---------------------------------------------------------------------------- |
765 //---------------------------------------------------------------------------- |
761 // |
766 // |
762 void CMmPacketServiceTsy::CompleteDetachL( |
767 void CMmPacketServiceTsy::CompleteDetachL( |
763 const TInt aError ) |
768 const TInt aError ) |
764 { |
769 { |
765 TFLOGSTRING2("TSY: CMmPacketServiceTsy::CompleteDetachL. Error Value: %d", aError ); |
770 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETEDETACHL_1, "TSY: CMmPacketServiceTsy::CompleteDetachL. Error Value: %d", aError ); |
766 |
771 |
767 // Reset request handle. Returns the deleted request handle |
772 // Reset request handle. Returns the deleted request handle |
768 const TTsyReqHandle reqHandle( iTsyReqHandleStore->ResetTsyReqHandle( |
773 const TTsyReqHandle reqHandle( iTsyReqHandleStore->ResetTsyReqHandle( |
769 EMultimodePacketServiceDetach ) ); |
774 EMultimodePacketServiceDetach ) ); |
770 |
775 |
795 TInt* const aMaxAllowed ) |
800 TInt* const aMaxAllowed ) |
796 { |
801 { |
797 *aCount = iPacketContextList->NumberOfContexts(); |
802 *aCount = iPacketContextList->NumberOfContexts(); |
798 *aMaxAllowed = KMmMaxNumberOfContexts; |
803 *aMaxAllowed = KMmMaxNumberOfContexts; |
799 |
804 |
800 TFLOGSTRING3("TSY: CMmPacketServiceTsy::EnumerateContexts. Count: %d Max Allowed: %d", *aCount, *aMaxAllowed ); |
805 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_ENUMERATECONTEXTS_1, "TSY: CMmPacketServiceTsy::EnumerateContexts. Count: %d Max Allowed: %d", *aCount, *aMaxAllowed ); |
801 // Complete the request with KErrNone |
806 // Complete the request with KErrNone |
802 CMmPacketServiceTsy::ReqCompleted( iTsyReqHandle, KErrNone ); |
807 CMmPacketServiceTsy::ReqCompleted( iTsyReqHandle, KErrNone ); |
803 |
808 |
804 return KErrNone; |
809 return KErrNone; |
805 } |
810 } |
810 //---------------------------------------------------------------------------- |
815 //---------------------------------------------------------------------------- |
811 // |
816 // |
812 TInt CMmPacketServiceTsy::GetAttachModeL( |
817 TInt CMmPacketServiceTsy::GetAttachModeL( |
813 RPacketService::TAttachMode* const aMode ) |
818 RPacketService::TAttachMode* const aMode ) |
814 { |
819 { |
815 TFLOGSTRING2("TSY: CMmPacketServiceTsy::GetAttachModeL. Mode:%d", *aMode ); |
820 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_GETATTACHMODEL_1, "TSY: CMmPacketServiceTsy::GetAttachModeL. Mode:%d", *aMode ); |
816 |
821 |
817 TInt ret( KErrServerBusy ); |
822 TInt ret( KErrServerBusy ); |
818 |
823 |
819 const TTsyReqHandle reqHandle( iTsyReqHandleStore->GetTsyReqHandle( |
824 const TTsyReqHandle reqHandle( iTsyReqHandleStore->GetTsyReqHandle( |
820 EMultimodePacketServiceGetAttachMode ) ); |
825 EMultimodePacketServiceGetAttachMode ) ); |
841 //---------------------------------------------------------------------------- |
846 //---------------------------------------------------------------------------- |
842 // |
847 // |
843 void CMmPacketServiceTsy::CompleteGetAttachMode( |
848 void CMmPacketServiceTsy::CompleteGetAttachMode( |
844 const RPacketService::TAttachMode aAttachMode, TInt aResult ) |
849 const RPacketService::TAttachMode aAttachMode, TInt aResult ) |
845 { |
850 { |
846 TFLOGSTRING2("TSY: CMmPacketServiceTsy::CompleteGetAttachMode. Attach Mode: %d", aAttachMode ); |
851 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETEGETATTACHMODE_1, "TSY: CMmPacketServiceTsy::CompleteGetAttachMode. Attach Mode: %d", aAttachMode ); |
847 |
852 |
848 // Reset request handle. Returns the deleted request handle |
853 // Reset request handle. Returns the deleted request handle |
849 const TTsyReqHandle reqHandle( iTsyReqHandleStore->ResetTsyReqHandle( |
854 const TTsyReqHandle reqHandle( iTsyReqHandleStore->ResetTsyReqHandle( |
850 EMultimodePacketServiceGetAttachMode ) ); |
855 EMultimodePacketServiceGetAttachMode ) ); |
851 |
856 |
878 { |
883 { |
879 // Call GetContextNameByIndex() to set context name to aInfo->iName |
884 // Call GetContextNameByIndex() to set context name to aInfo->iName |
880 ret = iPacketContextList->GetContextNameByIndex( |
885 ret = iPacketContextList->GetContextNameByIndex( |
881 *aIndex, aInfo->iName ); |
886 *aIndex, aInfo->iName ); |
882 |
887 |
883 TFLOGSTRING3("TSY: CMmPacketServiceTsy::GetContextInfo. Context Status: %d Context Name: %S", aInfo->iStatus, &aInfo->iName ); |
888 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_GETCONTEXTINFO_1, "TSY: CMmPacketServiceTsy::GetContextInfo. Context Status: %d Context Name: %S", aInfo->iStatus, aInfo->iName ); |
884 } |
889 } |
885 |
890 |
886 // Complete request with ret |
891 // Complete request with ret |
887 CMmPacketServiceTsy::ReqCompleted( iTsyReqHandle, ret ); |
892 CMmPacketServiceTsy::ReqCompleted( iTsyReqHandle, ret ); |
888 |
893 |
900 TInt CMmPacketServiceTsy::GetDynamicCaps( |
905 TInt CMmPacketServiceTsy::GetDynamicCaps( |
901 RPacketService::TDynamicCapsFlags* const aCaps ) |
906 RPacketService::TDynamicCapsFlags* const aCaps ) |
902 { |
907 { |
903 // Call DynamicCaps() from extension |
908 // Call DynamicCaps() from extension |
904 iMmPacketServiceGsmWcdmaExt->GetDynamicCaps( aCaps ); |
909 iMmPacketServiceGsmWcdmaExt->GetDynamicCaps( aCaps ); |
905 TFLOGSTRING("TSY: CMmPacketServiceTsy::GetDynamicCaps." ); |
910 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_GETDYNAMICCAPS_1, "TSY: CMmPacketServiceTsy::GetDynamicCaps." ); |
906 |
911 |
907 // Complete the request with KErrNone |
912 // Complete the request with KErrNone |
908 CMmPacketServiceTsy::ReqCompleted( iTsyReqHandle, KErrNone ); |
913 CMmPacketServiceTsy::ReqCompleted( iTsyReqHandle, KErrNone ); |
909 |
914 |
910 return KErrNone; |
915 return KErrNone; |
923 RPacketService::TMSClass* const aCurrentClass, |
928 RPacketService::TMSClass* const aCurrentClass, |
924 RPacketService::TMSClass* const aMaxClass ) |
929 RPacketService::TMSClass* const aMaxClass ) |
925 { |
930 { |
926 *aCurrentClass = iInternalSavedData.iMsClass; |
931 *aCurrentClass = iInternalSavedData.iMsClass; |
927 *aMaxClass = KMaxMsClass; |
932 *aMaxClass = KMaxMsClass; |
928 TFLOGSTRING3("TSY: CMmPacketServiceTsy::GetMSClass. Current Class: %d Max Class: %d", *aCurrentClass, *aMaxClass ); |
933 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_GETMSCLASS_1, "TSY: CMmPacketServiceTsy::GetMSClass. Current Class: %d Max Class: %d", *aCurrentClass, *aMaxClass ); |
929 |
934 |
930 // Complete the request with KErrNone |
935 // Complete the request with KErrNone |
931 CMmPacketServiceTsy::ReqCompleted( iTsyReqHandle, KErrNone ); |
936 CMmPacketServiceTsy::ReqCompleted( iTsyReqHandle, KErrNone ); |
932 |
937 |
933 return KErrNone; |
938 return KErrNone; |
942 //------------------------------------------------------------------------------ |
947 //------------------------------------------------------------------------------ |
943 // |
948 // |
944 TInt CMmPacketServiceTsy::GetNtwkRegStatusL( |
949 TInt CMmPacketServiceTsy::GetNtwkRegStatusL( |
945 RPacketService::TRegistrationStatus* const aRegistrationStatus ) |
950 RPacketService::TRegistrationStatus* const aRegistrationStatus ) |
946 { |
951 { |
947 TFLOGSTRING2("TSY: CMmPacketServiceTsy::GetNtwkRegStatusL. Tsy Req Handle: %d", iTsyReqHandle ); |
952 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_GETNTWKREGSTATUSL_1, "TSY: CMmPacketServiceTsy::GetNtwkRegStatusL. Tsy Req Handle: %d", iTsyReqHandle ); |
948 |
953 |
949 const TTsyReqHandle regHandle( iTsyReqHandleStore->GetTsyReqHandle( |
954 const TTsyReqHandle regHandle( iTsyReqHandleStore->GetTsyReqHandle( |
950 EMultimodePacketServiceGetNtwkRegStatus ) ); |
955 EMultimodePacketServiceGetNtwkRegStatus ) ); |
951 |
956 |
952 TInt ret( KErrServerBusy ); |
957 TInt ret( KErrServerBusy ); |
998 { |
1003 { |
999 // Request was sent during initialisation from active extension |
1004 // Request was sent during initialisation from active extension |
1000 CMmPacketServiceTsy::CompleteNotifyChangeOfNtwkRegStatus( |
1005 CMmPacketServiceTsy::CompleteNotifyChangeOfNtwkRegStatus( |
1001 aRegistrationStatus ); |
1006 aRegistrationStatus ); |
1002 } |
1007 } |
1003 TFLOGSTRING3("TSY: CMmPacketServiceTsy::CompleteGetNtwkRegStatus. TSY Req Handle: %d Registration Status: %d", reqHandle, aRegistrationStatus ); |
1008 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETEGETNTWKREGSTATUS_1, "TSY: CMmPacketServiceTsy::CompleteGetNtwkRegStatus. TSY Req Handle: %d Registration Status: %d", reqHandle, aRegistrationStatus ); |
1004 } |
1009 } |
1005 |
1010 |
1006 //---------------------------------------------------------------------------- |
1011 //---------------------------------------------------------------------------- |
1007 // CMmPacketServiceTsy::GetPreferredBearer |
1012 // CMmPacketServiceTsy::GetPreferredBearer |
1008 // Returns preferred bearer. |
1013 // Returns preferred bearer. |
1014 // |
1019 // |
1015 TInt CMmPacketServiceTsy::GetPreferredBearer( |
1020 TInt CMmPacketServiceTsy::GetPreferredBearer( |
1016 RPacketService::TPreferredBearer* const aBearer ) |
1021 RPacketService::TPreferredBearer* const aBearer ) |
1017 { |
1022 { |
1018 *aBearer = iInternalSavedData.iPreferredBearer; |
1023 *aBearer = iInternalSavedData.iPreferredBearer; |
1019 TFLOGSTRING2("TSY: CMmPacketServiceTsy::GetPreferredBearer. Preferred Bearer: %d", *aBearer ); |
1024 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_GETPREFERREDBEARER_1, "TSY: CMmPacketServiceTsy::GetPreferredBearer. Preferred Bearer: %d", *aBearer ); |
1020 |
1025 |
1021 // Complete the request with KErrNone |
1026 // Complete the request with KErrNone |
1022 CMmPacketServiceTsy::ReqCompleted( iTsyReqHandle, KErrNone ); |
1027 CMmPacketServiceTsy::ReqCompleted( iTsyReqHandle, KErrNone ); |
1023 |
1028 |
1024 return KErrNone; |
1029 return KErrNone; |
1042 case RPacketContext::EPdpTypeIPv6: |
1047 case RPacketContext::EPdpTypeIPv6: |
1043 case RPacketContext::EPdpTypeX25: |
1048 case RPacketContext::EPdpTypeX25: |
1044 case RPacketContext::EPdpTypePPP: |
1049 case RPacketContext::EPdpTypePPP: |
1045 case RPacketContext::EPdpTypeCDPD: |
1050 case RPacketContext::EPdpTypeCDPD: |
1046 iMmPacketServiceGsmWcdmaExt->GetStaticCaps( aCaps ); |
1051 iMmPacketServiceGsmWcdmaExt->GetStaticCaps( aCaps ); |
1047 TFLOGSTRING("TSY: CMmPacketServiceTsy::GetStaticCaps." ); |
1052 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_GETSTATICCAPS_1, "TSY: CMmPacketServiceTsy::GetStaticCaps." ); |
1048 |
1053 |
1049 // Complete the request with KErrNone |
1054 // Complete the request with KErrNone |
1050 CMmPacketServiceTsy::ReqCompleted( iTsyReqHandle, ret ); |
1055 CMmPacketServiceTsy::ReqCompleted( iTsyReqHandle, ret ); |
1051 break; |
1056 break; |
1052 default: |
1057 default: |
1065 TInt CMmPacketServiceTsy::GetStatus( |
1070 TInt CMmPacketServiceTsy::GetStatus( |
1066 RPacketService::TStatus* const aPacketStatus ) |
1071 RPacketService::TStatus* const aPacketStatus ) |
1067 { |
1072 { |
1068 *aPacketStatus = iInternalSavedData.iServiceStatus; |
1073 *aPacketStatus = iInternalSavedData.iServiceStatus; |
1069 |
1074 |
1070 TFLOGSTRING2("TSY: CMmPacketServiceTsy::GetStatus. Service Status: %d", *aPacketStatus ); |
1075 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_GETSTATUS_1, "TSY: CMmPacketServiceTsy::GetStatus. Service Status: %d", *aPacketStatus ); |
1071 |
1076 |
1072 // Complete the request with KErrNone |
1077 // Complete the request with KErrNone |
1073 CMmPacketServiceTsy::ReqCompleted( iTsyReqHandle, KErrNone ); |
1078 CMmPacketServiceTsy::ReqCompleted( iTsyReqHandle, KErrNone ); |
1074 |
1079 |
1075 return KErrNone; |
1080 return KErrNone; |
1083 //---------------------------------------------------------------------------- |
1088 //---------------------------------------------------------------------------- |
1084 // |
1089 // |
1085 TInt CMmPacketServiceTsy::NotifyChangeOfNtwkRegStatus( |
1090 TInt CMmPacketServiceTsy::NotifyChangeOfNtwkRegStatus( |
1086 RPacketService::TRegistrationStatus* const aRegistrationStatus ) |
1091 RPacketService::TRegistrationStatus* const aRegistrationStatus ) |
1087 { |
1092 { |
1088 TFLOGSTRING("TSY: CMmPacketServiceTsy::NotifyChangeOfNtwkRegStatus." ); |
1093 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_NOTIFYCHANGEOFNTWKREGSTATUS_1, "TSY: CMmPacketServiceTsy::NotifyChangeOfNtwkRegStatus." ); |
1089 |
1094 |
1090 // Set request handle and save pointer to aRegistrationStatus |
1095 // Set request handle and save pointer to aRegistrationStatus |
1091 iNotifyDataPointers.iChangeOfNtwkRegStatus = aRegistrationStatus; |
1096 iNotifyDataPointers.iChangeOfNtwkRegStatus = aRegistrationStatus; |
1092 iReqHandleType = EMultimodePacketServiceNotifyNtwkRegStatusChange; |
1097 iReqHandleType = EMultimodePacketServiceNotifyNtwkRegStatusChange; |
1093 |
1098 |
1100 //---------------------------------------------------------------------------- |
1105 //---------------------------------------------------------------------------- |
1101 // |
1106 // |
1102 void CMmPacketServiceTsy::CompleteNotifyChangeOfNtwkRegStatus( |
1107 void CMmPacketServiceTsy::CompleteNotifyChangeOfNtwkRegStatus( |
1103 const RPacketService::TRegistrationStatus aRegistrationStatus ) |
1108 const RPacketService::TRegistrationStatus aRegistrationStatus ) |
1104 { |
1109 { |
1105 TFLOGSTRING3("TSY: CMmPacketServiceTsy::CompleteNotifyChangeOfNtwkRegStatus. Current reg Status: %d New reg Status: %d", iInternalSavedData.iRegistrationStatus, aRegistrationStatus ); |
1110 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETENOTIFYCHANGEOFNTWKREGSTATUS_1, "TSY: CMmPacketServiceTsy::CompleteNotifyChangeOfNtwkRegStatus. Current reg Status: %d New reg Status: %d", iInternalSavedData.iRegistrationStatus, aRegistrationStatus ); |
1106 |
1111 |
1107 // If registration status changed |
1112 // If registration status changed |
1108 if ( aRegistrationStatus != iInternalSavedData.iRegistrationStatus ) |
1113 if ( aRegistrationStatus != iInternalSavedData.iRegistrationStatus ) |
1109 { |
1114 { |
1110 // Save new status internally |
1115 // Save new status internally |
1134 //---------------------------------------------------------------------------- |
1139 //---------------------------------------------------------------------------- |
1135 // |
1140 // |
1136 void CMmPacketServiceTsy::CompleteNotifyChangeOfNtwkRegStatus( |
1141 void CMmPacketServiceTsy::CompleteNotifyChangeOfNtwkRegStatus( |
1137 CMmDataPackage* aDataPackage, TInt aResult ) |
1142 CMmDataPackage* aDataPackage, TInt aResult ) |
1138 { |
1143 { |
1139 TFLOGSTRING("TSY: CMmPacketServiceTsy::CompleteNotifyChangeOfNtwkRegStatus."); |
1144 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETENOTIFYCHANGEOFNTWKREGSTATUS1_1, "TSY: CMmPacketServiceTsy::CompleteNotifyChangeOfNtwkRegStatus."); |
1140 |
1145 |
1141 //Unpack necessary data from datapackage |
1146 //Unpack necessary data from datapackage |
1142 RPacketService::TRegistrationStatus registrationStatus; |
1147 RPacketService::TRegistrationStatus registrationStatus; |
1143 aDataPackage->UnPackData( registrationStatus ); |
1148 aDataPackage->UnPackData( registrationStatus ); |
1144 |
1149 |
1179 //---------------------------------------------------------------------------- |
1184 //---------------------------------------------------------------------------- |
1180 // |
1185 // |
1181 TInt CMmPacketServiceTsy::NotifyContextActivationRequested( |
1186 TInt CMmPacketServiceTsy::NotifyContextActivationRequested( |
1182 TPacketDataConfigBase* const aContextParameters ) |
1187 TPacketDataConfigBase* const aContextParameters ) |
1183 { |
1188 { |
1184 TFLOGSTRING("TSY: CMmPacketServiceTsy::NotifyContextActivationRequested." ); |
1189 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_NOTIFYCONTEXTACTIVATIONREQUESTED_1, "TSY: CMmPacketServiceTsy::NotifyContextActivationRequested." ); |
1185 |
1190 |
1186 TInt ret = KErrNone; |
1191 TInt ret = KErrNone; |
1187 |
1192 |
1188 // If class of aContextParameters is TContextConfigGPRS |
1193 // If class of aContextParameters is TContextConfigGPRS |
1189 if ( TPacketDataConfigBase::KConfigGPRS == |
1194 if ( TPacketDataConfigBase::KConfigGPRS == |
1239 //---------------------------------------------------------------------------- |
1244 //---------------------------------------------------------------------------- |
1240 // |
1245 // |
1241 void CMmPacketServiceTsy::CompleteNotifyContextActivationRequested( |
1246 void CMmPacketServiceTsy::CompleteNotifyContextActivationRequested( |
1242 CMmDataPackage* aDataPackage ) //contains initial data |
1247 CMmDataPackage* aDataPackage ) //contains initial data |
1243 { |
1248 { |
1244 TFLOGSTRING("TSY: CMmPacketServiceTsy::CompleteNotifyContextActivationRequested."); |
1249 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETENOTIFYCONTEXTACTIVATIONREQUESTED_1, "TSY: CMmPacketServiceTsy::CompleteNotifyContextActivationRequested."); |
1245 |
1250 |
1246 //Check if there is client request |
1251 //Check if there is client request |
1247 if ( EMultimodePacketServiceReqHandleUnknown != |
1252 if ( EMultimodePacketServiceReqHandleUnknown != |
1248 CMmPacketServiceTsy::TsyReqHandleStore()->GetTsyReqHandle( |
1253 CMmPacketServiceTsy::TsyReqHandleStore()->GetTsyReqHandle( |
1249 CMmPacketServiceTsy:: |
1254 CMmPacketServiceTsy:: |
1472 //---------------------------------------------------------------------------- |
1477 //---------------------------------------------------------------------------- |
1473 // |
1478 // |
1474 TInt CMmPacketServiceTsy::NotifyContextAdded( |
1479 TInt CMmPacketServiceTsy::NotifyContextAdded( |
1475 const TDataPackage& aPackage ) |
1480 const TDataPackage& aPackage ) |
1476 { |
1481 { |
1477 TFLOGSTRING("TSY: CMmPacketServiceTsy::NotifyContextAdded." ); |
1482 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_NOTIFYCONTEXTADDED_1, "TSY: CMmPacketServiceTsy::NotifyContextAdded." ); |
1478 |
1483 |
1479 TDes* const context = aPackage.Des1u(); |
1484 TDes* const context = aPackage.Des1u(); |
1480 |
1485 |
1481 // Save request handle type and context Name |
1486 // Save request handle type and context Name |
1482 iReqHandleType = EMultimodePacketServiceNotifyContextAdded; |
1487 iReqHandleType = EMultimodePacketServiceNotifyContextAdded; |
1505 TInt trapError( KErrNone ); |
1510 TInt trapError( KErrNone ); |
1506 TInt ret( KErrNone ); |
1511 TInt ret( KErrNone ); |
1507 |
1512 |
1508 aPackage->UnPackData( contextName, result ); |
1513 aPackage->UnPackData( contextName, result ); |
1509 |
1514 |
1510 TFLOGSTRING("TSY: CMmPacketServiceTsy::CompleteNotifyContextAdded." ); |
1515 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETENOTIFYCONTEXTADDED_1, "TSY: CMmPacketServiceTsy::CompleteNotifyContextAdded." ); |
1511 |
1516 |
1512 if ( KErrNone != result ) |
1517 if ( KErrNone != result ) |
1513 { |
1518 { |
1514 //if one Dial-up context is created |
1519 //if one Dial-up context is created |
1515 if ( iDialUpContext ) |
1520 if ( iDialUpContext ) |
1516 { |
1521 { |
1517 // External context, service has no control to the context. |
1522 // External context, service has no control to the context. |
1518 // Context name forced to External2. |
1523 // Context name forced to External2. |
1519 contextName.Copy( KStringExternal2 ); |
1524 contextName.Copy( KStringExternal2 ); |
1520 |
1525 |
1521 TFLOGSTRING("TSY: CMmPacketServiceTsy::CompleteNotifyContextAdded :Create Secondary Dial-up Object." ); |
1526 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETENOTIFYCONTEXTADDED_2, "TSY: CMmPacketServiceTsy::CompleteNotifyContextAdded :Create Secondary Dial-up Object." ); |
1522 |
1527 |
1523 // Create object for externally created dial-up context |
1528 // Create object for externally created dial-up context |
1524 TRAP( trapError, iSecondaryDialUpContext = CMmPacketContextTsy::NewL( |
1529 TRAP( trapError, iSecondaryDialUpContext = CMmPacketContextTsy::NewL( |
1525 this, tempHostCID, contextName ); ); |
1530 this, tempHostCID, contextName ); ); |
1526 } |
1531 } |
1529 { |
1534 { |
1530 // External context, service has no control to the context. |
1535 // External context, service has no control to the context. |
1531 // Context name forced to External. |
1536 // Context name forced to External. |
1532 contextName.Copy( KStringExternal ); |
1537 contextName.Copy( KStringExternal ); |
1533 |
1538 |
1534 TFLOGSTRING("TSY: CMmPacketServiceTsy::CompleteNotifyContextAdded :Create Dial-up Object." ); |
1539 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETENOTIFYCONTEXTADDED_3, "TSY: CMmPacketServiceTsy::CompleteNotifyContextAdded :Create Dial-up Object." ); |
1535 |
1540 |
1536 // Create object for externally created dial-up context |
1541 // Create object for externally created dial-up context |
1537 TRAP( trapError, iDialUpContext = CMmPacketContextTsy::NewL( |
1542 TRAP( trapError, iDialUpContext = CMmPacketContextTsy::NewL( |
1538 this, tempHostCID, contextName ); ); |
1543 this, tempHostCID, contextName ); ); |
1539 } |
1544 } |
1579 } |
1584 } |
1580 |
1585 |
1581 //Check if dial-up context is created, and set default params |
1586 //Check if dial-up context is created, and set default params |
1582 if ( contextName.Compare( KStringExternal2 ) == 0 ) |
1587 if ( contextName.Compare( KStringExternal2 ) == 0 ) |
1583 { |
1588 { |
1584 TFLOGSTRING("TSY: CMmPacketServiceTsy::CompleteNotifyContextAdded :Reset Secondary Dial-up Object." ); |
1589 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETENOTIFYCONTEXTADDED_4, "TSY: CMmPacketServiceTsy::CompleteNotifyContextAdded :Reset Secondary Dial-up Object." ); |
1585 // Reset secondary dial-up context |
1590 // Reset secondary dial-up context |
1586 if(iSecondaryDialUpContext) |
1591 if(iSecondaryDialUpContext) |
1587 { |
1592 { |
1588 iSecondaryDialUpContext->ResetDialUpContext(); |
1593 iSecondaryDialUpContext->ResetDialUpContext(); |
1589 } |
1594 } |
1590 |
1595 |
1591 } |
1596 } |
1592 else if ( contextName.Compare( KStringExternal ) == 0 ) |
1597 else if ( contextName.Compare( KStringExternal ) == 0 ) |
1593 { |
1598 { |
1594 TFLOGSTRING("TSY: CMmPacketServiceTsy::CompleteNotifyContextAdded :Reset Dial-up Object." ); |
1599 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETENOTIFYCONTEXTADDED_5, "TSY: CMmPacketServiceTsy::CompleteNotifyContextAdded :Reset Dial-up Object." ); |
1595 // Reset dial-up context |
1600 // Reset dial-up context |
1596 if(iDialUpContext) |
1601 if(iDialUpContext) |
1597 { |
1602 { |
1598 iDialUpContext->ResetDialUpContext(); |
1603 iDialUpContext->ResetDialUpContext(); |
1599 } |
1604 } |
1608 if ( EMultimodePacketServiceReqHandleUnknown != reqHandle ) |
1613 if ( EMultimodePacketServiceReqHandleUnknown != reqHandle ) |
1609 { |
1614 { |
1610 // Add context name to the etel side memory |
1615 // Add context name to the etel side memory |
1611 *iNotifyDataPointers.iContextAdded = contextName; |
1616 *iNotifyDataPointers.iContextAdded = contextName; |
1612 iNotifyDataPointers.iContextAdded = NULL; |
1617 iNotifyDataPointers.iContextAdded = NULL; |
1613 TFLOGSTRING2("TSY: CMmPacketServiceTsy::CompleteNotifyContextAdded. Context Name: %S", &contextName ); |
1618 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETENOTIFYCONTEXTADDED_6, "TSY: CMmPacketServiceTsy::CompleteNotifyContextAdded. Context Name: %S", contextName ); |
1614 |
1619 |
1615 // Complete request with KErrNone |
1620 // Complete request with KErrNone |
1616 CMmPacketServiceTsy::ReqCompleted( reqHandle, KErrNone ); |
1621 CMmPacketServiceTsy::ReqCompleted( reqHandle, KErrNone ); |
1617 } |
1622 } |
1618 } |
1623 } |
1629 //---------------------------------------------------------------------------- |
1634 //---------------------------------------------------------------------------- |
1630 // |
1635 // |
1631 TInt CMmPacketServiceTsy::NotifyDynamicCapsChange( |
1636 TInt CMmPacketServiceTsy::NotifyDynamicCapsChange( |
1632 RPacketService::TDynamicCapsFlags* const aCaps ) |
1637 RPacketService::TDynamicCapsFlags* const aCaps ) |
1633 { |
1638 { |
1634 TFLOGSTRING("TSY: CMmPacketServiceTsy::NotifyDynamicCapsChange." ); |
1639 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_NOTIFYDYNAMICCAPSCHANGE_1, "TSY: CMmPacketServiceTsy::NotifyDynamicCapsChange." ); |
1635 |
1640 |
1636 // Save pointer to aCaps |
1641 // Save pointer to aCaps |
1637 iNotifyDataPointers.iDynamicCapsChange = aCaps; |
1642 iNotifyDataPointers.iDynamicCapsChange = aCaps; |
1638 |
1643 |
1639 // Set request handle type |
1644 // Set request handle type |
1648 //---------------------------------------------------------------------------- |
1653 //---------------------------------------------------------------------------- |
1649 // |
1654 // |
1650 void CMmPacketServiceTsy::CompleteNotifyDynamicCapsChange( |
1655 void CMmPacketServiceTsy::CompleteNotifyDynamicCapsChange( |
1651 const RPacketService::TDynamicCapsFlags aCaps ) |
1656 const RPacketService::TDynamicCapsFlags aCaps ) |
1652 { |
1657 { |
1653 TFLOGSTRING("TSY: CMmPacketServiceTsy::CompleteNotifyDynamicCapsChange." ); |
1658 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETENOTIFYDYNAMICCAPSCHANGE_1, "TSY: CMmPacketServiceTsy::CompleteNotifyDynamicCapsChange." ); |
1654 |
1659 |
1655 // Reset request handle. Returns the deleted request handle |
1660 // Reset request handle. Returns the deleted request handle |
1656 const TTsyReqHandle reqHandle( iTsyReqHandleStore->ResetTsyReqHandle( |
1661 const TTsyReqHandle reqHandle( iTsyReqHandleStore->ResetTsyReqHandle( |
1657 EMultimodePacketServiceNotifyDynamicCapsChange ) ); |
1662 EMultimodePacketServiceNotifyDynamicCapsChange ) ); |
1658 |
1663 |
1674 //---------------------------------------------------------------------------- |
1679 //---------------------------------------------------------------------------- |
1675 // |
1680 // |
1676 TInt CMmPacketServiceTsy::NotifyMSClassChange( |
1681 TInt CMmPacketServiceTsy::NotifyMSClassChange( |
1677 RPacketService::TMSClass* const aNewClass ) |
1682 RPacketService::TMSClass* const aNewClass ) |
1678 { |
1683 { |
1679 TFLOGSTRING("TSY: CMmPacketServiceTsy::NotifyMSClassChange." ); |
1684 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_NOTIFYMSCLASSCHANGE_1, "TSY: CMmPacketServiceTsy::NotifyMSClassChange." ); |
1680 |
1685 |
1681 // Save aNewClass internally |
1686 // Save aNewClass internally |
1682 iNotifyDataPointers.iMSClassChange = aNewClass; |
1687 iNotifyDataPointers.iMSClassChange = aNewClass; |
1683 |
1688 |
1684 iReqHandleType = EMultimodePacketServiceNotifyMSClassChange; |
1689 iReqHandleType = EMultimodePacketServiceNotifyMSClassChange; |
1692 //---------------------------------------------------------------------------- |
1697 //---------------------------------------------------------------------------- |
1693 // |
1698 // |
1694 void CMmPacketServiceTsy::CompleteNotifyMSClassChange( |
1699 void CMmPacketServiceTsy::CompleteNotifyMSClassChange( |
1695 CMmDataPackage* aDataPackage ) |
1700 CMmDataPackage* aDataPackage ) |
1696 { |
1701 { |
1697 TFLOGSTRING("TSY: CMmPacketServiceTsy::CompleteNotifyMSClassChange." ); |
1702 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETENOTIFYMSCLASSCHANGE_1, "TSY: CMmPacketServiceTsy::CompleteNotifyMSClassChange." ); |
1698 |
1703 |
1699 RPacketService::TMSClass newClass; |
1704 RPacketService::TMSClass newClass; |
1700 aDataPackage->UnPackData( newClass ); |
1705 aDataPackage->UnPackData( newClass ); |
1701 |
1706 |
1702 if ( newClass != iInternalSavedData.iMsClass ) |
1707 if ( newClass != iInternalSavedData.iMsClass ) |
1712 { |
1717 { |
1713 // Save changed MS Class to ETel side memory |
1718 // Save changed MS Class to ETel side memory |
1714 *iNotifyDataPointers.iMSClassChange = newClass; |
1719 *iNotifyDataPointers.iMSClassChange = newClass; |
1715 iNotifyDataPointers.iMSClassChange = NULL; |
1720 iNotifyDataPointers.iMSClassChange = NULL; |
1716 |
1721 |
1717 TFLOGSTRING2("TSY: CMmPacketServiceTsy::CompleteNotifyMSClassChange. New Ms Class: %d", newClass ); |
1722 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETENOTIFYMSCLASSCHANGE_2, "TSY: CMmPacketServiceTsy::CompleteNotifyMSClassChange. New Ms Class: %d", newClass ); |
1718 // Complete request with KErrNone |
1723 // Complete request with KErrNone |
1719 CMmPacketServiceTsy::ReqCompleted( reqHandle, KErrNone ); |
1724 CMmPacketServiceTsy::ReqCompleted( reqHandle, KErrNone ); |
1720 } |
1725 } |
1721 } |
1726 } |
1722 } |
1727 } |
1730 //---------------------------------------------------------------------------- |
1735 //---------------------------------------------------------------------------- |
1731 // |
1736 // |
1732 TInt CMmPacketServiceTsy::NotifyStatusChange( |
1737 TInt CMmPacketServiceTsy::NotifyStatusChange( |
1733 RPacketService::TStatus* const aPacketStatus ) |
1738 RPacketService::TStatus* const aPacketStatus ) |
1734 { |
1739 { |
1735 TFLOGSTRING("TSY: CMmPacketServiceTsy::NotifyStatusChange." ); |
1740 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_NOTIFYSTATUSCHANGE_1, "TSY: CMmPacketServiceTsy::NotifyStatusChange." ); |
1736 |
1741 |
1737 // Save aPacketStatus to internal memory |
1742 // Save aPacketStatus to internal memory |
1738 iNotifyDataPointers.iStatusChange = aPacketStatus; |
1743 iNotifyDataPointers.iStatusChange = aPacketStatus; |
1739 |
1744 |
1740 // Set request handle type |
1745 // Set request handle type |
1750 // |
1755 // |
1751 void CMmPacketServiceTsy::CompleteNotifyStatusChange( |
1756 void CMmPacketServiceTsy::CompleteNotifyStatusChange( |
1752 const RPacketService::TStatus& aPacketStatus, |
1757 const RPacketService::TStatus& aPacketStatus, |
1753 TInt aErrorCode ) |
1758 TInt aErrorCode ) |
1754 { |
1759 { |
1755 TFLOGSTRING("TSY: CMmPacketServiceTsy::CompleteNotifyStatusChange." ); |
1760 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETENOTIFYSTATUSCHANGE_1, "TSY: CMmPacketServiceTsy::CompleteNotifyStatusChange." ); |
1756 if ( aPacketStatus != iInternalSavedData.iServiceStatus ) |
1761 if ( aPacketStatus != iInternalSavedData.iServiceStatus ) |
1757 { |
1762 { |
1758 iInternalSavedData.iServiceStatus = aPacketStatus; |
1763 iInternalSavedData.iServiceStatus = aPacketStatus; |
1759 |
1764 |
1760 // Reset req handle. Returns the deleted req handle |
1765 // Reset req handle. Returns the deleted req handle |
1764 if ( EMultimodePacketServiceReqHandleUnknown != reqHandle ) |
1769 if ( EMultimodePacketServiceReqHandleUnknown != reqHandle ) |
1765 { |
1770 { |
1766 *iNotifyDataPointers.iStatusChange = aPacketStatus; |
1771 *iNotifyDataPointers.iStatusChange = aPacketStatus; |
1767 iNotifyDataPointers.iStatusChange = NULL; |
1772 iNotifyDataPointers.iStatusChange = NULL; |
1768 |
1773 |
1769 TFLOGSTRING2("TSY: CMmPacketServiceTsy::CompleteNotifyStatusChange. Service Status:%d", aPacketStatus ); |
1774 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETENOTIFYSTATUSCHANGE_2, "TSY: CMmPacketServiceTsy::CompleteNotifyStatusChange. Service Status:%d", aPacketStatus ); |
1770 CMmPacketServiceTsy::ReqCompleted( reqHandle, aErrorCode ); |
1775 CMmPacketServiceTsy::ReqCompleted( reqHandle, aErrorCode ); |
1771 } |
1776 } |
1772 } |
1777 } |
1773 } |
1778 } |
1774 |
1779 |
1784 // that the activation request should be re-sent up to five times. |
1789 // that the activation request should be re-sent up to five times. |
1785 //---------------------------------------------------------------------------- |
1790 //---------------------------------------------------------------------------- |
1786 // |
1791 // |
1787 TInt CMmPacketServiceTsy::RejectActivationRequestL() |
1792 TInt CMmPacketServiceTsy::RejectActivationRequestL() |
1788 { |
1793 { |
1789 TFLOGSTRING("TSY: CMmPacketServiceTsy::RejectActivationRequestL." ); |
1794 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_REJECTACTIVATIONREQUESTL_1, "TSY: CMmPacketServiceTsy::RejectActivationRequestL." ); |
1790 |
1795 |
1791 const TTsyReqHandle tsyRegHandle( iTsyReqHandleStore->GetTsyReqHandle( |
1796 const TTsyReqHandle tsyRegHandle( iTsyReqHandleStore->GetTsyReqHandle( |
1792 EMultimodePacketServiceRejectActivationRequest ) ); |
1797 EMultimodePacketServiceRejectActivationRequest ) ); |
1793 |
1798 |
1794 TInt ret( KErrServerBusy ); |
1799 TInt ret( KErrServerBusy ); |
1814 // Completes asynchronous reject activation request. |
1819 // Completes asynchronous reject activation request. |
1815 //---------------------------------------------------------------------------- |
1820 //---------------------------------------------------------------------------- |
1816 // |
1821 // |
1817 void CMmPacketServiceTsy::CompleteRejectActivationRequest() |
1822 void CMmPacketServiceTsy::CompleteRejectActivationRequest() |
1818 { |
1823 { |
1819 TFLOGSTRING("TSY: CMmPacketServiceTsy::CompleteRejectActivationRequest." ); |
1824 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETEREJECTACTIVATIONREQUEST_1, "TSY: CMmPacketServiceTsy::CompleteRejectActivationRequest." ); |
1820 |
1825 |
1821 // Reset request handle. Returns the deleted request handle |
1826 // Reset request handle. Returns the deleted request handle |
1822 const TTsyReqHandle reqHandle( iTsyReqHandleStore->ResetTsyReqHandle( |
1827 const TTsyReqHandle reqHandle( iTsyReqHandleStore->ResetTsyReqHandle( |
1823 EMultimodePacketServiceRejectActivationRequest ) ); |
1828 EMultimodePacketServiceRejectActivationRequest ) ); |
1824 |
1829 |
1835 //---------------------------------------------------------------------------- |
1840 //---------------------------------------------------------------------------- |
1836 // |
1841 // |
1837 TInt CMmPacketServiceTsy::SetAttachModeL( |
1842 TInt CMmPacketServiceTsy::SetAttachModeL( |
1838 const RPacketService::TAttachMode* aMode ) |
1843 const RPacketService::TAttachMode* aMode ) |
1839 { |
1844 { |
1840 TFLOGSTRING("TSY: CMmPacketServiceTsy::SetAttachModeL." ); |
1845 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_SETATTACHMODEL_1, "TSY: CMmPacketServiceTsy::SetAttachModeL." ); |
1841 |
1846 |
1842 iAttachMode = *aMode; |
1847 iAttachMode = *aMode; |
1843 |
1848 |
1844 TInt ret( KErrServerBusy ); |
1849 TInt ret( KErrServerBusy ); |
1845 const TTsyReqHandle reqHandle( iTsyReqHandleStore->GetTsyReqHandle( |
1850 const TTsyReqHandle reqHandle( iTsyReqHandleStore->GetTsyReqHandle( |
1866 //---------------------------------------------------------------------------- |
1871 //---------------------------------------------------------------------------- |
1867 // |
1872 // |
1868 void CMmPacketServiceTsy::CompleteSetAttachMode( |
1873 void CMmPacketServiceTsy::CompleteSetAttachMode( |
1869 const TInt aError ) //error value |
1874 const TInt aError ) //error value |
1870 { |
1875 { |
1871 TFLOGSTRING2("TSY: CMmPacketServiceTsy::CompleteSetAttachMode. Error Value: %d", aError ); |
1876 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETESETATTACHMODE_1, "TSY: CMmPacketServiceTsy::CompleteSetAttachMode. Error Value: %d", aError ); |
1872 |
1877 |
1873 // Reset request handle. Returns the deleted request handle |
1878 // Reset request handle. Returns the deleted request handle |
1874 const TTsyReqHandle reqHandle( iTsyReqHandleStore->ResetTsyReqHandle( |
1879 const TTsyReqHandle reqHandle( iTsyReqHandleStore->ResetTsyReqHandle( |
1875 EMultimodePacketServiceSetAttachMode ) ); |
1880 EMultimodePacketServiceSetAttachMode ) ); |
1876 |
1881 |
1894 TInt CMmPacketServiceTsy::SetPreferredBearerL( |
1899 TInt CMmPacketServiceTsy::SetPreferredBearerL( |
1895 const TDataPackage& aPackage ) |
1900 const TDataPackage& aPackage ) |
1896 { |
1901 { |
1897 TAny* const dataPtr = aPackage.Ptr1(); |
1902 TAny* const dataPtr = aPackage.Ptr1(); |
1898 |
1903 |
1899 TFLOGSTRING2("TSY: CMmPacketServiceTsy::SetPreferredBearerL. Preferred Bearer: %d", &dataPtr ); |
1904 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_SETPREFERREDBEARERL_1, "TSY: CMmPacketServiceTsy::SetPreferredBearerL. Preferred Bearer: %d", &dataPtr ); |
1900 |
1905 |
1901 const TTsyReqHandle reqHandle( iTsyReqHandleStore->GetTsyReqHandle( |
1906 const TTsyReqHandle reqHandle( iTsyReqHandleStore->GetTsyReqHandle( |
1902 EMultimodePacketServiceSetPreferredBearer ) ); |
1907 EMultimodePacketServiceSetPreferredBearer ) ); |
1903 |
1908 |
1904 TInt ret( KErrServerBusy ); |
1909 TInt ret( KErrServerBusy ); |
1929 //---------------------------------------------------------------------------- |
1934 //---------------------------------------------------------------------------- |
1930 // |
1935 // |
1931 void CMmPacketServiceTsy::CompleteSetPreferredBearer( |
1936 void CMmPacketServiceTsy::CompleteSetPreferredBearer( |
1932 const TInt aError ) //epoc error code |
1937 const TInt aError ) //epoc error code |
1933 { |
1938 { |
1934 TFLOGSTRING2("TSY: CMmPacketServiceTsy::CompleteSetPreferredBearer. Error: %d", aError ); |
1939 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETESETPREFERREDBEARER_1, "TSY: CMmPacketServiceTsy::CompleteSetPreferredBearer. Error: %d", aError ); |
1935 |
1940 |
1936 // Reset request handle. Returns the deleted request handle |
1941 // Reset request handle. Returns the deleted request handle |
1937 const TTsyReqHandle reqHandle( iTsyReqHandleStore->ResetTsyReqHandle( |
1942 const TTsyReqHandle reqHandle( iTsyReqHandleStore->ResetTsyReqHandle( |
1938 EMultimodePacketServiceSetPreferredBearer ) ); |
1943 EMultimodePacketServiceSetPreferredBearer ) ); |
1939 |
1944 |
1941 { |
1946 { |
1942 if ( KErrNone == aError ) |
1947 if ( KErrNone == aError ) |
1943 { |
1948 { |
1944 iInternalSavedData.iPreferredBearer = |
1949 iInternalSavedData.iPreferredBearer = |
1945 iTemporarySavedData.iPreferredBearer; |
1950 iTemporarySavedData.iPreferredBearer; |
1946 TFLOGSTRING2("TSY: CMmPacketServiceTsy::CompleteSetPreferredBearer. Preferred Bearer: %d", iInternalSavedData.iPreferredBearer ); |
1951 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETESETPREFERREDBEARER_2, "TSY: CMmPacketServiceTsy::CompleteSetPreferredBearer. Preferred Bearer: %d", iInternalSavedData.iPreferredBearer ); |
1947 } |
1952 } |
1948 |
1953 |
1949 // Complete the client request |
1954 // Complete the client request |
1950 CMmPacketServiceTsy::ReqCompleted( reqHandle, aError ); |
1955 CMmPacketServiceTsy::ReqCompleted( reqHandle, aError ); |
1951 } |
1956 } |
1961 TInt CMmPacketServiceTsy::ExtFunc( |
1966 TInt CMmPacketServiceTsy::ExtFunc( |
1962 const TTsyReqHandle aTsyReqHandle, |
1967 const TTsyReqHandle aTsyReqHandle, |
1963 const TInt aIpc, |
1968 const TInt aIpc, |
1964 const TDataPackage& aPackage ) |
1969 const TDataPackage& aPackage ) |
1965 { |
1970 { |
1966 TFLOGSTRING2("TSY: CMmPacketServiceTsy::ExtFunc. IPC: %d", aIpc ); |
1971 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_EXTFUNC_1, "TSY: CMmPacketServiceTsy::ExtFunc. IPC: %d", aIpc ); |
1967 |
1972 |
1968 TInt ret( KErrNone ); |
1973 TInt ret( KErrNone ); |
1969 TInt trapError( KErrNone ); |
1974 TInt trapError( KErrNone ); |
1970 |
1975 |
1971 // Ensure the ReqHandleType is unset. |
1976 // Ensure the ReqHandleType is unset. |
2020 // |
2025 // |
2021 TInt CMmPacketServiceTsy::DoExtFuncL( |
2026 TInt CMmPacketServiceTsy::DoExtFuncL( |
2022 const TInt aIpc, |
2027 const TInt aIpc, |
2023 const TDataPackage& aPackage ) |
2028 const TDataPackage& aPackage ) |
2024 { |
2029 { |
2025 TFLOGSTRING3("TSY: CMmPacketServiceTsy::DoExtFuncL. IPC: %d TSY Req Handle:%d", aIpc, iTsyReqHandle); |
2030 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_DOEXTFUNCL_1, "TSY: CMmPacketServiceTsy::DoExtFuncL. IPC: %d TSY Req Handle:%d", aIpc, iTsyReqHandle); |
2026 |
2031 |
2027 TInt ret( KErrNotSupported ); |
2032 TInt ret( KErrNotSupported ); |
2028 |
2033 |
2029 TAny* const dataPtr = aPackage.Ptr1(); |
2034 TAny* const dataPtr = aPackage.Ptr1(); |
2030 TAny* const dataPtr2 = aPackage.Ptr2(); |
2035 TAny* const dataPtr2 = aPackage.Ptr2(); |
2227 //---------------------------------------------------------------------------- |
2232 //---------------------------------------------------------------------------- |
2228 // |
2233 // |
2229 CTelObject::TReqMode CMmPacketServiceTsy::ReqModeL( |
2234 CTelObject::TReqMode CMmPacketServiceTsy::ReqModeL( |
2230 const TInt aIpc ) |
2235 const TInt aIpc ) |
2231 { |
2236 { |
2232 TFLOGSTRING2("TSY: CMmPacketServiceTsy::ReqModeL. IPC: %d", aIpc ); |
2237 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_REQMODEL_1, "TSY: CMmPacketServiceTsy::ReqModeL. IPC: %d", aIpc ); |
2233 |
2238 |
2234 CTelObject::TReqMode reqMode( 0 ); |
2239 CTelObject::TReqMode reqMode( 0 ); |
2235 switch ( aIpc ) |
2240 switch ( aIpc ) |
2236 { |
2241 { |
2237 // All disabled TSYs wishing to implement their own buffering |
2242 // All disabled TSYs wishing to implement their own buffering |
2305 //---------------------------------------------------------------------------- |
2310 //---------------------------------------------------------------------------- |
2306 // |
2311 // |
2307 TInt CMmPacketServiceTsy::NumberOfSlotsL( |
2312 TInt CMmPacketServiceTsy::NumberOfSlotsL( |
2308 const TInt aIpc ) |
2313 const TInt aIpc ) |
2309 { |
2314 { |
2310 TFLOGSTRING2("TSY: CMmPacketServiceTsy::NumberOfSlotsL. IPC: %d", aIpc ); |
2315 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_NUMBEROFSLOTSL_1, "TSY: CMmPacketServiceTsy::NumberOfSlotsL. IPC: %d", aIpc ); |
2311 |
2316 |
2312 TInt numberOfSlots( 0 ); |
2317 TInt numberOfSlots( 0 ); |
2313 switch ( aIpc ) |
2318 switch ( aIpc ) |
2314 { |
2319 { |
2315 |
2320 |
2358 // |
2363 // |
2359 TInt CMmPacketServiceTsy::CancelService( |
2364 TInt CMmPacketServiceTsy::CancelService( |
2360 const TInt aIpc, |
2365 const TInt aIpc, |
2361 const TTsyReqHandle aTsyReqHandle ) |
2366 const TTsyReqHandle aTsyReqHandle ) |
2362 { |
2367 { |
2363 TFLOGSTRING3("TSY: CMmPacketServiceTsy::CancelService. IPC: %d Tsy Req Handle:%d", aIpc, aTsyReqHandle); |
2368 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_CANCELSERVICE_1, "TSY: CMmPacketServiceTsy::CancelService. IPC: %d Tsy Req Handle:%d", aIpc, aTsyReqHandle); |
2364 |
2369 |
2365 TInt ret( KErrNone ); |
2370 TInt ret( KErrNone ); |
2366 |
2371 |
2367 // Ensure the ReqHandleType is unset. |
2372 // Ensure the ReqHandleType is unset. |
2368 // This will detect cases where this method indirectly calls itself |
2373 // This will detect cases where this method indirectly calls itself |
2500 //---------------------------------------------------------------------------- |
2505 //---------------------------------------------------------------------------- |
2501 // |
2506 // |
2502 TInt CMmPacketServiceTsy::RegisterNotification( |
2507 TInt CMmPacketServiceTsy::RegisterNotification( |
2503 const TInt aIpc ) |
2508 const TInt aIpc ) |
2504 { |
2509 { |
2505 TFLOGSTRING2("TSY: CMmPacketServiceTsy::RegisterNotification. IPC: %d", aIpc ); |
2510 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_REGISTERNOTIFICATION_1, "TSY: CMmPacketServiceTsy::RegisterNotification. IPC: %d", aIpc ); |
2506 |
2511 |
2507 TInt ret( KErrNone ); |
2512 TInt ret( KErrNone ); |
2508 |
2513 |
2509 switch ( aIpc ) |
2514 switch ( aIpc ) |
2510 { |
2515 { |
2533 //---------------------------------------------------------------------------- |
2538 //---------------------------------------------------------------------------- |
2534 // |
2539 // |
2535 TInt CMmPacketServiceTsy::DeregisterNotification( |
2540 TInt CMmPacketServiceTsy::DeregisterNotification( |
2536 const TInt aIpc ) |
2541 const TInt aIpc ) |
2537 { |
2542 { |
2538 TFLOGSTRING2("TSY: CMmPacketServiceTsy::DeregisterNotification. IPC: %d", aIpc ); |
2543 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_DEREGISTERNOTIFICATION_1, "TSY: CMmPacketServiceTsy::DeregisterNotification. IPC: %d", aIpc ); |
2539 |
2544 |
2540 TInt ret( KErrNone ); |
2545 TInt ret( KErrNone ); |
2541 |
2546 |
2542 switch ( aIpc ) |
2547 switch ( aIpc ) |
2543 { |
2548 { |
2568 // |
2573 // |
2569 TInt CMmPacketServiceTsy::GetMbmsNetworkServiceStatus( |
2574 TInt CMmPacketServiceTsy::GetMbmsNetworkServiceStatus( |
2570 TBool aAttemptAttach, |
2575 TBool aAttemptAttach, |
2571 TMbmsNetworkServiceStatus* aMBMSServiceStatus ) |
2576 TMbmsNetworkServiceStatus* aMBMSServiceStatus ) |
2572 { |
2577 { |
2573 TFLOGSTRING2("TSY: CMmPacketServiceTsy:: TMbmsNetworkServiceStatus = %d", aMBMSServiceStatus ); |
2578 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_GETMBMSNETWORKSERVICESTATUS_1, "TSY: CMmPacketServiceTsy:: TMbmsNetworkServiceStatus = %d", aMBMSServiceStatus ); |
2574 |
2579 |
2575 const TTsyReqHandle regHandle( iTsyReqHandleStore->GetTsyReqHandle( |
2580 const TTsyReqHandle regHandle( iTsyReqHandleStore->GetTsyReqHandle( |
2576 EMultimodePacketServiceGetMBMSStatus ) ); |
2581 EMultimodePacketServiceGetMBMSStatus ) ); |
2577 |
2582 |
2578 TInt ret( KErrServerBusy ); |
2583 TInt ret( KErrServerBusy ); |
2620 //----------------------------------------------------------------------------- |
2625 //----------------------------------------------------------------------------- |
2621 // |
2626 // |
2622 void CMmPacketServiceTsy::CompleteGetMbmsNetworkServiceStatus( |
2627 void CMmPacketServiceTsy::CompleteGetMbmsNetworkServiceStatus( |
2623 CMmDataPackage* aDataPackage, TInt aError ) |
2628 CMmDataPackage* aDataPackage, TInt aError ) |
2624 { |
2629 { |
2625 TFLOGSTRING("TSY: CMmPacketServiceTsy::CompleteGetMbmsNetworkServiceStatus."); |
2630 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETEGETMBMSNETWORKSERVICESTATUS_1, "TSY: CMmPacketServiceTsy::CompleteGetMbmsNetworkServiceStatus."); |
2626 |
2631 |
2627 //Update the cache |
2632 //Update the cache |
2628 TMbmsNetworkServiceStatus mbmsNetworkServiceStatus = EMbmsSupportUnknown; |
2633 TMbmsNetworkServiceStatus mbmsNetworkServiceStatus = EMbmsSupportUnknown; |
2629 if ( KErrNone == aError ) |
2634 if ( KErrNone == aError ) |
2630 { |
2635 { |
2661 // |
2666 // |
2662 |
2667 |
2663 TInt CMmPacketServiceTsy::NotifyMbmsNetworkServiceStatusChange( |
2668 TInt CMmPacketServiceTsy::NotifyMbmsNetworkServiceStatusChange( |
2664 TMbmsNetworkServiceStatus* aMBMSServiceStatus ) |
2669 TMbmsNetworkServiceStatus* aMBMSServiceStatus ) |
2665 { |
2670 { |
2666 TFLOGSTRING2("TSY: CMmPacketServiceTsy::NotifyMbmsNetworkServiceStatusChange TMbmsNetworkServiceStatus = %d", aMBMSServiceStatus ); |
2671 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_NOTIFYMBMSNETWORKSERVICESTATUSCHANGE_1, "TSY: CMmPacketServiceTsy::NotifyMbmsNetworkServiceStatusChange TMbmsNetworkServiceStatus = %d", aMBMSServiceStatus ); |
2667 |
2672 |
2668 // Set request handle and save pointer to aMBMSServiceStatus |
2673 // Set request handle and save pointer to aMBMSServiceStatus |
2669 iNotifyDataPointers.iMBMSStatusChange = aMBMSServiceStatus; |
2674 iNotifyDataPointers.iMBMSStatusChange = aMBMSServiceStatus; |
2670 iReqHandleType = EMultimodePacketServiceNotifyMBMSStatusChange; |
2675 iReqHandleType = EMultimodePacketServiceNotifyMBMSStatusChange; |
2671 |
2676 |
2678 //----------------------------------------------------------------------------- |
2683 //----------------------------------------------------------------------------- |
2679 // |
2684 // |
2680 void CMmPacketServiceTsy::CompleteNotifyMbmsNetworkServiceStatusChange( |
2685 void CMmPacketServiceTsy::CompleteNotifyMbmsNetworkServiceStatusChange( |
2681 CMmDataPackage* aDataPackage, TInt aResult ) |
2686 CMmDataPackage* aDataPackage, TInt aResult ) |
2682 { |
2687 { |
2683 TFLOGSTRING("TSY: CMmPacketServiceTsy::NotifyMbmsNetworkServiceStatusChange."); |
2688 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETENOTIFYMBMSNETWORKSERVICESTATUSCHANGE_1, "TSY: CMmPacketServiceTsy::NotifyMbmsNetworkServiceStatusChange."); |
2684 |
2689 |
2685 TInt result = aResult; |
2690 TInt result = aResult; |
2686 if (aResult == KErrNone) |
2691 if (aResult == KErrNone) |
2687 { |
2692 { |
2688 //Unpack necessary data from datapackage |
2693 //Unpack necessary data from datapackage |
2732 // MBMS network service is detected. |
2737 // MBMS network service is detected. |
2733 //----------------------------------------------------------------------------- |
2738 //----------------------------------------------------------------------------- |
2734 // |
2739 // |
2735 TInt CMmPacketServiceTsy::NotifyMbmsServiceAvailabilityChange() |
2740 TInt CMmPacketServiceTsy::NotifyMbmsServiceAvailabilityChange() |
2736 { |
2741 { |
2737 TFLOGSTRING("TSY: CMmPacketServiceTsy::NotifyMbmsServiceAvailabilityChange."); |
2742 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_NOTIFYMBMSSERVICEAVAILABILITYCHANGE_1, "TSY: CMmPacketServiceTsy::NotifyMbmsServiceAvailabilityChange."); |
2738 |
2743 |
2739 // Set request handle |
2744 // Set request handle |
2740 iReqHandleType = EMultimodePacketServiceNotifyMbmsServiceAvailabilityChange; |
2745 iReqHandleType = EMultimodePacketServiceNotifyMbmsServiceAvailabilityChange; |
2741 |
2746 |
2742 return KErrNone; |
2747 return KErrNone; |
2817 { |
2822 { |
2818 aCount = 0; |
2823 aCount = 0; |
2819 } |
2824 } |
2820 aMaxAllowed = iMaxMonitoredServices; |
2825 aMaxAllowed = iMaxMonitoredServices; |
2821 |
2826 |
2822 TFLOGSTRING("TSY: CMmPacketServiceTsy::EnumerateMonitorServiceList." ); |
2827 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_ENUMERATEMONITORSERVICELIST_1, "TSY: CMmPacketServiceTsy::EnumerateMonitorServiceList." ); |
2823 |
2828 |
2824 // Complete the request with KErrNone |
2829 // Complete the request with KErrNone |
2825 CMmPacketServiceTsy::ReqCompleted( iTsyReqHandle, KErrNone ); |
2830 CMmPacketServiceTsy::ReqCompleted( iTsyReqHandle, KErrNone ); |
2826 |
2831 |
2827 return KErrNone; |
2832 return KErrNone; |
2890 return ret; |
2895 return ret; |
2891 |
2896 |
2892 } |
2897 } |
2893 |
2898 |
2894 //---------------------------------------------------------------------------- |
2899 //---------------------------------------------------------------------------- |
2895 // CMmPacketServiceTsy::CompleteUpdateMbmsMonitorServiceList |
2900 // CMmPacketServiceTsy::CompleteUpdateMbmsMonitorServiceListL |
2896 // Completes update monitored service list request |
2901 // Completes update monitored service list request |
2897 //---------------------------------------------------------------------------- |
2902 //---------------------------------------------------------------------------- |
2898 // |
2903 // |
2899 void CMmPacketServiceTsy::CompleteUpdateMbmsMonitorServiceList( |
2904 void CMmPacketServiceTsy::CompleteUpdateMbmsMonitorServiceList( |
2900 CMmDataPackage* aDataPackage, |
2905 CMmDataPackage* aDataPackage, |
2901 const TInt aResult) |
2906 const TInt aResult) |
2902 { |
2907 { |
2903 TFLOGSTRING( "TSY: CMmPacketServiceTsy::CompleteUpdateMbmsMonitorServiceListL." ); |
2908 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETEUPDATEMBMSMONITORSERVICELIST_1, "TSY: CMmPacketServiceTsy::CompleteUpdateMbmsMonitorServiceListL." ); |
2904 |
2909 |
2905 TInt result= aResult; |
2910 TInt result= aResult; |
2906 TInt err(KErrNone); |
2911 TInt err(KErrNone); |
2907 // Reset request handle. Returns the deleted request handle |
2912 // Reset request handle. Returns the deleted request handle |
2908 const TTsyReqHandle reqHandle( iTsyReqHandleStore->ResetTsyReqHandle( |
2913 const TTsyReqHandle reqHandle( iTsyReqHandleStore->ResetTsyReqHandle( |
2948 // Completes update monitored service list request |
2953 // Completes update monitored service list request |
2949 //---------------------------------------------------------------------------- |
2954 //---------------------------------------------------------------------------- |
2950 // |
2955 // |
2951 TInt CMmPacketServiceTsy::UpdateMbmsMonitorServiceListCancel( TTsyReqHandle aTsyReqHandle ) |
2956 TInt CMmPacketServiceTsy::UpdateMbmsMonitorServiceListCancel( TTsyReqHandle aTsyReqHandle ) |
2952 { |
2957 { |
2953 TFLOGSTRING2( "TSY: CMmPacketServiceTsy::UpdateMbmsMonitorServiceListCancel ReqHandle %d", aTsyReqHandle ); |
2958 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_UPDATEMBMSMONITORSERVICELISTCANCEL_1, "TSY: CMmPacketServiceTsy::UpdateMbmsMonitorServiceListCancel ReqHandle %d", aTsyReqHandle ); |
2954 |
2959 |
2955 if ( aTsyReqHandle != EMultimodePacketServiceReqHandleUnknown ) |
2960 if ( aTsyReqHandle != EMultimodePacketServiceReqHandleUnknown ) |
2956 { |
2961 { |
2957 // Reset tsy request handle |
2962 // Reset tsy request handle |
2958 iTsyReqHandleStore->ResetTsyReqHandle( EMultimodePacketServiceUpdateMBMSMonitorServiceList ); |
2963 iTsyReqHandleStore->ResetTsyReqHandle( EMultimodePacketServiceUpdateMBMSMonitorServiceList ); |
2971 // Returns size of the monitored service list. |
2976 // Returns size of the monitored service list. |
2972 //---------------------------------------------------------------------------- |
2977 //---------------------------------------------------------------------------- |
2973 // |
2978 // |
2974 TInt CMmPacketServiceTsy::GetMbmsMonitoredServicesPhase1L(RMobilePhone::TClientId* aClient, TUint& aBufSize) |
2979 TInt CMmPacketServiceTsy::GetMbmsMonitoredServicesPhase1L(RMobilePhone::TClientId* aClient, TUint& aBufSize) |
2975 { |
2980 { |
2976 TFLOGSTRING("TSY: CMmPacketServiceTsy::GetMbmsMonitoredServicesPhase1L called."); |
2981 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_GETMBMSMONITOREDSERVICESPHASE1L_1, "TSY: CMmPacketServiceTsy::GetMbmsMonitoredServicesPhase1L called."); |
2977 // Initialize ret value |
2982 // Initialize ret value |
2978 TInt ret( KErrNone ); |
2983 TInt ret( KErrNone ); |
2979 TInt leaveCode( KErrNone ); |
2984 TInt leaveCode( KErrNone ); |
2980 |
2985 |
2981 |
2986 |
3007 // --------------------------------------------------------------------------- |
3012 // --------------------------------------------------------------------------- |
3008 // |
3013 // |
3009 TInt CMmPacketServiceTsy::GetSizeOfMonitoredServiceListL(RMobilePhone::TClientId* aClient, TUint& aBufSize) |
3014 TInt CMmPacketServiceTsy::GetSizeOfMonitoredServiceListL(RMobilePhone::TClientId* aClient, TUint& aBufSize) |
3010 { |
3015 { |
3011 // read the list, store its content and then return size of this buffer to client |
3016 // read the list, store its content and then return size of this buffer to client |
3012 TFLOGSTRING("TSY: CMmPacketServiceTsy::GetSizeOfMonitoredServiceList called."); |
3017 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_GETSIZEOFMONITOREDSERVICELISTL_1, "TSY: CMmPacketServiceTsy::GetSizeOfMonitoredServiceList called."); |
3013 // create new list |
3018 // create new list |
3014 CPcktMbmsMonitoredServiceList* currentList=CPcktMbmsMonitoredServiceList::NewL(); |
3019 CPcktMbmsMonitoredServiceList* currentList=CPcktMbmsMonitoredServiceList::NewL(); |
3015 CleanupStack::PushL(currentList); |
3020 CleanupStack::PushL(currentList); |
3016 RPacketService::TMbmsServiceAvailabilityV1 entry; |
3021 RPacketService::TMbmsServiceAvailabilityV1 entry; |
3017 |
3022 |
3039 iGetMbmsMonitoredServiceLists->AppendL(read); |
3044 iGetMbmsMonitoredServiceLists->AppendL(read); |
3040 CleanupStack::Pop(); // pop the CListReadAllAttempt; the read will be destroy in phase 2 |
3045 CleanupStack::Pop(); // pop the CListReadAllAttempt; the read will be destroy in phase 2 |
3041 |
3046 |
3042 // return the CBufFlat's size to client |
3047 // return the CBufFlat's size to client |
3043 aBufSize=(read->iListBuf)->Size(); |
3048 aBufSize=(read->iListBuf)->Size(); |
3044 TFLOGSTRING2("TSY: CMmPacketServiceTsy::GetSizeOfMonitoredServiceList: size=%d",aBufSize); |
3049 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_GETSIZEOFMONITOREDSERVICELISTL_2, "TSY: CMmPacketServiceTsy::GetSizeOfMonitoredServiceList: size=%d",aBufSize); |
3045 // Complete first phase of list retrieval |
3050 // Complete first phase of list retrieval |
3046 ReqCompleted( iTsyReqHandle, KErrNone ); |
3051 ReqCompleted( iTsyReqHandle, KErrNone ); |
3047 CleanupStack::PopAndDestroy( currentList ); // Pop & destroy list |
3052 CleanupStack::PopAndDestroy( currentList ); // Pop & destroy list |
3048 return KErrNone; |
3053 return KErrNone; |
3049 } |
3054 } |
3056 TInt CMmPacketServiceTsy::GetMbmsMonitoredServicesPhase2(RMobilePhone::TClientId* aClient, TDes8* aBuf) |
3061 TInt CMmPacketServiceTsy::GetMbmsMonitoredServicesPhase2(RMobilePhone::TClientId* aClient, TDes8* aBuf) |
3057 { |
3062 { |
3058 // Initialize ret value |
3063 // Initialize ret value |
3059 TInt ret( KErrNotFound ); |
3064 TInt ret( KErrNotFound ); |
3060 |
3065 |
3061 TFLOGSTRING("TSY: CMmPacketServiceTsy::GetMbmsMonitoredServicesPhase2 called"); |
3066 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_GETMBMSMONITOREDSERVICESPHASE2_1, "TSY: CMmPacketServiceTsy::GetMbmsMonitoredServicesPhase2 called"); |
3062 CListReadAllAttempt* read=NULL; |
3067 CListReadAllAttempt* read=NULL; |
3063 |
3068 |
3064 // Find the get Mbms monitored services from this client |
3069 // Find the get Mbms monitored services from this client |
3065 for (TInt i=0; i<iGetMbmsMonitoredServiceLists->Count(); ++i) |
3070 for (TInt i=0; i<iGetMbmsMonitoredServiceLists->Count(); ++i) |
3066 { |
3071 { |
3106 //----------------------------------------------------------------------------- |
3111 //----------------------------------------------------------------------------- |
3107 // |
3112 // |
3108 TInt CMmPacketServiceTsy::GetMbmsMonitoredServicesCancel( TTsyReqHandle aTsyReqHandle ) |
3113 TInt CMmPacketServiceTsy::GetMbmsMonitoredServicesCancel( TTsyReqHandle aTsyReqHandle ) |
3109 { |
3114 { |
3110 |
3115 |
3111 TFLOGSTRING("TSY: CMmPacketServiceTsy::GetMbmsMonitoredServicesPhase1LCancel called"); |
3116 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_GETMBMSMONITOREDSERVICESCANCEL_1, "TSY: CMmPacketServiceTsy::GetMbmsMonitoredServicesPhase1LCancel called"); |
3112 // Remove the read all attempt |
3117 // Remove the read all attempt |
3113 CListReadAllAttempt* read = NULL; |
3118 CListReadAllAttempt* read = NULL; |
3114 |
3119 |
3115 // Check that read all array does not contain any data. |
3120 // Check that read all array does not contain any data. |
3116 // If it does, delete it. |
3121 // If it does, delete it. |
3146 //---------------------------------------------------------------------------- |
3151 //---------------------------------------------------------------------------- |
3147 // |
3152 // |
3148 CTelObject* CMmPacketServiceTsy::OpenNewObjectL( |
3153 CTelObject* CMmPacketServiceTsy::OpenNewObjectL( |
3149 TDes& aNewName ) |
3154 TDes& aNewName ) |
3150 { |
3155 { |
3151 TFLOGSTRING2("TSY: CMmPacketServiceTsy::OpenNewObjectL. %S", &aNewName ); |
3156 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_OPENNEWOBJECTL_1, "TSY: CMmPacketServiceTsy::OpenNewObjectL. %S", aNewName ); |
3152 CTelObject* newContext = NULL; |
3157 CTelObject* newContext = NULL; |
3153 TUint8 proxyId( 0 ); |
3158 TUint8 proxyId( 0 ); |
3154 TInt ret( KErrNone ); |
3159 TInt ret( KErrNone ); |
3155 |
3160 |
3156 if(0 == aNewName.Compare(KMBMSContextName)) |
3161 if(0 == aNewName.Compare(KMBMSContextName)) |
3157 { |
3162 { |
3158 ret = iMBMSContextList->GenerateNewContextName( aNewName, proxyId, iMaxActiveServices ); |
3163 ret = iMBMSContextList->GenerateNewContextName( aNewName, proxyId, iMaxActiveServices ); |
3159 |
3164 |
3160 if( KErrNone != ret ) |
3165 if( KErrNone != ret ) |
3161 { |
3166 { |
3162 TFLOGSTRING2("TSY: CMmPacketServiceTsy::OpenNewObjectL. Mbms Leaves with: %d", ret ); |
3167 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_OPENNEWOBJECTL_2, "TSY: CMmPacketServiceTsy::OpenNewObjectL. Mbms Leaves with: %d", ret ); |
3163 User::Leave( ret ); |
3168 User::Leave( ret ); |
3164 } |
3169 } |
3165 |
3170 |
3166 CMmMBMSContextTsy* context = CMmMBMSContextTsy::NewL( this, aNewName, proxyId ); |
3171 CMmMBMSContextTsy* context = CMmMBMSContextTsy::NewL( this, aNewName, proxyId ); |
3167 ret = iMBMSContextList->AddObject( context ); |
3172 ret = iMBMSContextList->AddObject( context ); |
3169 { |
3174 { |
3170 // Created context couldn't save. |
3175 // Created context couldn't save. |
3171 // Call Close() to context to remove it completely |
3176 // Call Close() to context to remove it completely |
3172 context->Close(); |
3177 context->Close(); |
3173 context = NULL; |
3178 context = NULL; |
3174 TFLOGSTRING2("TSY: CMmPacketServiceTsy::OpenNewObjectL. Mbms Leaves with: %d", ret ); |
3179 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_OPENNEWOBJECTL_3, "TSY: CMmPacketServiceTsy::OpenNewObjectL. Mbms Leaves with: %d", ret ); |
3175 User::Leave( ret ); |
3180 User::Leave( ret ); |
3176 } |
3181 } |
3177 else |
3182 else |
3178 { |
3183 { |
3179 TFLOGSTRING3("TSY: CMmPacketServiceTsy::OpenNewObjectL. New MBMS Context Name: %S Proxy Id: %d",&aNewName, proxyId ); |
3184 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_OPENNEWOBJECTL_4, "TSY: CMmPacketServiceTsy::OpenNewObjectL. New MBMS Context Name: %S Proxy Id: %d",aNewName, proxyId ); |
3180 newContext = context; |
3185 newContext = context; |
3181 } |
3186 } |
3182 } |
3187 } |
3183 else |
3188 else |
3184 { |
3189 { |
3189 // Reason to leave is that maximum number of Contexts already exists. |
3194 // Reason to leave is that maximum number of Contexts already exists. |
3190 // Leaving from here requires that TSY is configurated with max number |
3195 // Leaving from here requires that TSY is configurated with max number |
3191 // of context supported by this phone ( value KMmMaxNumberOfContexts ) |
3196 // of context supported by this phone ( value KMmMaxNumberOfContexts ) |
3192 ret = CMmCommonStaticUtility::EpocErrorCode( |
3197 ret = CMmCommonStaticUtility::EpocErrorCode( |
3193 KErrOverflow, KErrUmtsMaxNumOfContextExceededByPhone ); |
3198 KErrOverflow, KErrUmtsMaxNumOfContextExceededByPhone ); |
3194 TFLOGSTRING2("TSY: CMmPacketServiceTsy::OpenNewObjectL. Leaves with: %d", ret ); |
3199 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_OPENNEWOBJECTL_5, "TSY: CMmPacketServiceTsy::OpenNewObjectL. Leaves with: %d", ret ); |
3195 User::Leave( ret ); |
3200 User::Leave( ret ); |
3196 } |
3201 } |
3197 CMmPacketContextTsy* context = CMmPacketContextTsy::NewL( this, iHostCID, aNewName, proxyId ); |
3202 CMmPacketContextTsy* context = CMmPacketContextTsy::NewL( this, iHostCID, aNewName, proxyId ); |
3198 |
3203 |
3199 // reset cotext name |
3204 // reset cotext name |
3203 { |
3208 { |
3204 // Created context couldn't save. |
3209 // Created context couldn't save. |
3205 // Call Close() to context to remove it completely |
3210 // Call Close() to context to remove it completely |
3206 context->Close(); |
3211 context->Close(); |
3207 context = NULL; |
3212 context = NULL; |
3208 TFLOGSTRING2("TSY: CMmPacketServiceTsy::OpenNewObjectL. Leaves with: %d", ret ); |
3213 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_OPENNEWOBJECTL_6, "TSY: CMmPacketServiceTsy::OpenNewObjectL. Leaves with: %d", ret ); |
3209 User::Leave( ret ); |
3214 User::Leave( ret ); |
3210 } |
3215 } |
3211 else |
3216 else |
3212 { |
3217 { |
3213 TFLOGSTRING3("TSY: CMmPacketServiceTsy::OpenNewObjectL. New Context Name: %S Proxy Id: %d",&aNewName, proxyId ); |
3218 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_OPENNEWOBJECTL_7, "TSY: CMmPacketServiceTsy::OpenNewObjectL. New Context Name: %S Proxy Id: %d",aNewName, proxyId ); |
3214 newContext = context; |
3219 newContext = context; |
3215 } |
3220 } |
3216 } |
3221 } |
3217 return newContext; |
3222 return newContext; |
3218 } |
3223 } |
3223 //---------------------------------------------------------------------------- |
3228 //---------------------------------------------------------------------------- |
3224 // |
3229 // |
3225 CTelObject* CMmPacketServiceTsy::OpenNewObjectByNameL( |
3230 CTelObject* CMmPacketServiceTsy::OpenNewObjectByNameL( |
3226 const TDesC& aName ) |
3231 const TDesC& aName ) |
3227 { |
3232 { |
3228 TFLOGSTRING2("TSY: CMmPacketServiceTsy::OpenNewObjectByNameL. Context Name: %S", &aName ); |
3233 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_OPENNEWOBJECTBYNAMEL_1, "TSY: CMmPacketServiceTsy::OpenNewObjectByNameL. Context Name: %S", aName ); |
3229 |
3234 |
3230 // length of object's name cannot be over 16 chars |
3235 // length of object's name cannot be over 16 chars |
3231 if ( 16 < aName.Length() ) |
3236 if ( 16 < aName.Length() ) |
3232 { |
3237 { |
3233 TFLOGSTRING2("TSY: CMmPacketServiceTsy::OpenNewObjectByNameL. Leaves with: %d", KErrOverflow ); |
3238 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_OPENNEWOBJECTBYNAMEL_2, "TSY: CMmPacketServiceTsy::OpenNewObjectByNameL. Leaves with: %d", KErrOverflow ); |
3234 User::Leave( KErrOverflow ); |
3239 User::Leave( KErrOverflow ); |
3235 } |
3240 } |
3236 |
3241 |
3237 const TInfoName mmPacketContextName( aName ); |
3242 const TInfoName mmPacketContextName( aName ); |
3238 CMmPacketContextTsy* mmPacketContext = NULL; |
3243 CMmPacketContextTsy* mmPacketContext = NULL; |
3239 |
3244 |
3240 if ( mmPacketContextName.Compare( KStringExternal ) == 0 ) |
3245 if ( mmPacketContextName.Compare( KStringExternal ) == 0 ) |
3241 { |
3246 { |
3242 TFLOGSTRING("TSY: CMmPacketServiceTsy::OpenNewObjectByNameL :Open Existing Dial-up Object." ); |
3247 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_OPENNEWOBJECTBYNAMEL_3, "TSY: CMmPacketServiceTsy::OpenNewObjectByNameL :Open Existing Dial-up Object." ); |
3243 mmPacketContext = iDialUpContext; |
3248 mmPacketContext = iDialUpContext; |
3244 } |
3249 } |
3245 else if ( mmPacketContextName.Compare( KStringExternal2 ) == 0 ) |
3250 else if ( mmPacketContextName.Compare( KStringExternal2 ) == 0 ) |
3246 { |
3251 { |
3247 TFLOGSTRING("TSY: CMmPacketServiceTsy::OpenNewObjectByNameL :Open Existing Secondary Dial-up Object." ); |
3252 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_OPENNEWOBJECTBYNAMEL_4, "TSY: CMmPacketServiceTsy::OpenNewObjectByNameL :Open Existing Secondary Dial-up Object." ); |
3248 mmPacketContext = iSecondaryDialUpContext; |
3253 mmPacketContext = iSecondaryDialUpContext; |
3249 } |
3254 } |
3250 else |
3255 else |
3251 { |
3256 { |
3252 mmPacketContext = |
3257 mmPacketContext = |
3254 } |
3259 } |
3255 |
3260 |
3256 // If not found, Leaves |
3261 // If not found, Leaves |
3257 if ( NULL == mmPacketContext ) |
3262 if ( NULL == mmPacketContext ) |
3258 { |
3263 { |
3259 TFLOGSTRING2("TSY: CMmPacketServiceTsy::OpenNewObjectByNameL. Leaves with: %d", KErrNotFound ); |
3264 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_OPENNEWOBJECTBYNAMEL_5, "TSY: CMmPacketServiceTsy::OpenNewObjectByNameL. Leaves with: %d", KErrNotFound ); |
3260 User::Leave( KErrNotFound ); |
3265 User::Leave( KErrNotFound ); |
3261 } |
3266 } |
3262 |
3267 |
3263 return mmPacketContext; |
3268 return mmPacketContext; |
3264 } |
3269 } |
3423 // Call service's Complete() |
3428 // Call service's Complete() |
3424 Complete( aReqHandleType, aError ); |
3429 Complete( aReqHandleType, aError ); |
3425 } |
3430 } |
3426 else if ( aObject == iDialUpContext && NULL != iDialUpContext ) |
3431 else if ( aObject == iDialUpContext && NULL != iDialUpContext ) |
3427 { |
3432 { |
3428 TFLOGSTRING("TSY: CMmPacketServiceTsy::OpenNewObjectByNameL :Complete Dial-up Object Request." ); |
3433 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETE_1, "TSY: CMmPacketServiceTsy::OpenNewObjectByNameL :Complete Dial-up Object Request." ); |
3429 |
3434 |
3430 iDialUpContext->Complete( aReqHandleType, aError ); |
3435 iDialUpContext->Complete( aReqHandleType, aError ); |
3431 } |
3436 } |
3432 else if ( aObject == iSecondaryDialUpContext |
3437 else if ( aObject == iSecondaryDialUpContext |
3433 && NULL != iSecondaryDialUpContext ) |
3438 && NULL != iSecondaryDialUpContext ) |
3434 { |
3439 { |
3435 TFLOGSTRING("TSY: CMmPacketServiceTsy::OpenNewObjectByNameL :Complete Dial-up Object Request." ); |
3440 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETE_2, "TSY: CMmPacketServiceTsy::OpenNewObjectByNameL :Complete Dial-up Object Request." ); |
3436 |
3441 |
3437 iSecondaryDialUpContext->Complete( aReqHandleType, aError ); |
3442 iSecondaryDialUpContext->Complete( aReqHandleType, aError ); |
3438 |
3443 |
3439 } |
3444 } |
3440 else |
3445 else |
3569 // |
3574 // |
3570 void CMmPacketServiceTsy::ReqCompleted( |
3575 void CMmPacketServiceTsy::ReqCompleted( |
3571 const TTsyReqHandle aTsyReqHandle, |
3576 const TTsyReqHandle aTsyReqHandle, |
3572 const TInt aError ) |
3577 const TInt aError ) |
3573 { |
3578 { |
3574 TFLOGSTRING3("TSY: CMmPacketServiceTsy::Request Completed. TSY Req Handle: %d Error:%d", aTsyReqHandle, aError ); |
3579 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_REQCOMPLETED_1, "TSY: CMmPacketServiceTsy::Request Completed. TSY Req Handle: %d Error:%d", aTsyReqHandle, aError ); |
3575 |
3580 |
3576 CTelObject::ReqCompleted( aTsyReqHandle, aError ); |
3581 CTelObject::ReqCompleted( aTsyReqHandle, aError ); |
3577 } |
3582 } |
3578 |
3583 |
3579 #endif // TF_LOGGING_ENABLED |
3584 #endif // TF_LOGGING_ENABLED |
3619 //---------------------------------------------------------------------------- |
3624 //---------------------------------------------------------------------------- |
3620 // |
3625 // |
3621 TInt CMmPacketServiceTsy::EnumerateNifs( |
3626 TInt CMmPacketServiceTsy::EnumerateNifs( |
3622 TInt* aCount ) |
3627 TInt* aCount ) |
3623 { |
3628 { |
3624 TFLOGSTRING("TSY: CMmPacketServiceTsy::EnumerateNifs." ); |
3629 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_ENUMERATENIFS_1, "TSY: CMmPacketServiceTsy::EnumerateNifs." ); |
3625 |
3630 |
3626 iPacketContextList->EnumerateNifs( aCount ); |
3631 iPacketContextList->EnumerateNifs( aCount ); |
3627 |
3632 |
3628 CMmPacketServiceTsy::ReqCompleted( iTsyReqHandle, KErrNone ); |
3633 CMmPacketServiceTsy::ReqCompleted( iTsyReqHandle, KErrNone ); |
3629 |
3634 |
3637 // |
3642 // |
3638 TInt CMmPacketServiceTsy::GetNifInfo( |
3643 TInt CMmPacketServiceTsy::GetNifInfo( |
3639 TInt* aIndex, |
3644 TInt* aIndex, |
3640 RPacketService::TNifInfoV2* aNifInfoV2 ) |
3645 RPacketService::TNifInfoV2* aNifInfoV2 ) |
3641 { |
3646 { |
3642 TFLOGSTRING("TSY: CMmPacketServiceTsy::GetNifInfo." ); |
3647 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_GETNIFINFO_1, "TSY: CMmPacketServiceTsy::GetNifInfo." ); |
3643 |
3648 |
3644 TInt ret = iPacketContextList->GetNifInfo( aIndex, aNifInfoV2 ); |
3649 TInt ret = iPacketContextList->GetNifInfo( aIndex, aNifInfoV2 ); |
3645 |
3650 |
3646 CMmPacketServiceTsy::ReqCompleted( iTsyReqHandle, ret ); |
3651 CMmPacketServiceTsy::ReqCompleted( iTsyReqHandle, ret ); |
3647 |
3652 |
3659 // |
3664 // |
3660 TInt CMmPacketServiceTsy::EnumerateContextsInNif( |
3665 TInt CMmPacketServiceTsy::EnumerateContextsInNif( |
3661 TDesC* aExistingContextName, |
3666 TDesC* aExistingContextName, |
3662 TInt* aCount ) |
3667 TInt* aCount ) |
3663 { |
3668 { |
3664 TFLOGSTRING("TSY: CMmPacketServiceTsy::EnumerateContextsInNif." ); |
3669 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_ENUMERATECONTEXTSINNIF_1, "TSY: CMmPacketServiceTsy::EnumerateContextsInNif." ); |
3665 |
3670 |
3666 TInt ret = KErrNone; |
3671 TInt ret = KErrNone; |
3667 if (aExistingContextName->Length() > KMaxInfoName) |
3672 if (aExistingContextName->Length() > KMaxInfoName) |
3668 { |
3673 { |
3669 ret = KErrArgument; |
3674 ret = KErrArgument; |
3687 // |
3692 // |
3688 TInt CMmPacketServiceTsy::GetContextNameInNif( |
3693 TInt CMmPacketServiceTsy::GetContextNameInNif( |
3689 RPacketService::TContextNameInNif* aContextNameInNif, |
3694 RPacketService::TContextNameInNif* aContextNameInNif, |
3690 TDes* aContextName ) |
3695 TDes* aContextName ) |
3691 { |
3696 { |
3692 TFLOGSTRING("TSY: CMmPacketServiceTsy::GetContextNameInNif." ); |
3697 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_GETCONTEXTNAMEINNIF_1, "TSY: CMmPacketServiceTsy::GetContextNameInNif." ); |
3693 |
3698 |
3694 TInt ret = iPacketContextList->GetContextNameInNif( aContextNameInNif, |
3699 TInt ret = iPacketContextList->GetContextNameInNif( aContextNameInNif, |
3695 aContextName ); |
3700 aContextName ); |
3696 |
3701 |
3697 CMmPacketServiceTsy::ReqCompleted( iTsyReqHandle, ret ); |
3702 CMmPacketServiceTsy::ReqCompleted( iTsyReqHandle, ret ); |
3705 //---------------------------------------------------------------------------- |
3710 //---------------------------------------------------------------------------- |
3706 // |
3711 // |
3707 TInt CMmPacketServiceTsy::SetDefaultContextParamsL( |
3712 TInt CMmPacketServiceTsy::SetDefaultContextParamsL( |
3708 const TDataPackage& aPackage ) |
3713 const TDataPackage& aPackage ) |
3709 { |
3714 { |
3710 TFLOGSTRING("TSY: CMmPacketServiceTsy::SetDefaultContextParamsL." ); |
3715 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_SETDEFAULTCONTEXTPARAMSL_1, "TSY: CMmPacketServiceTsy::SetDefaultContextParamsL." ); |
3711 |
3716 |
3712 TInt ret(KErrServerBusy); |
3717 TInt ret(KErrServerBusy); |
3713 |
3718 |
3714 const TTsyReqHandle reqHandle( iTsyReqHandleStore->GetTsyReqHandle( |
3719 const TTsyReqHandle reqHandle( iTsyReqHandleStore->GetTsyReqHandle( |
3715 EMultimodePacketServiceSetDefaultContextParams ) ); |
3720 EMultimodePacketServiceSetDefaultContextParams ) ); |
3735 //---------------------------------------------------------------------------- |
3740 //---------------------------------------------------------------------------- |
3736 // |
3741 // |
3737 void CMmPacketServiceTsy::CompleteSetDefaultContextParams( |
3742 void CMmPacketServiceTsy::CompleteSetDefaultContextParams( |
3738 TInt aCause ) |
3743 TInt aCause ) |
3739 { |
3744 { |
3740 TFLOGSTRING2("TSY: CMmPacketServiceTsy::CompleteSetDefaultContextParams. aCause: %d", aCause ); |
3745 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETESETDEFAULTCONTEXTPARAMS_1, "TSY: CMmPacketServiceTsy::CompleteSetDefaultContextParams. aCause: %d", aCause ); |
3741 |
3746 |
3742 // Reset request handle. Returns the deleted request handle |
3747 // Reset request handle. Returns the deleted request handle |
3743 const TTsyReqHandle reqHandle( iTsyReqHandleStore->ResetTsyReqHandle( |
3748 const TTsyReqHandle reqHandle( iTsyReqHandleStore->ResetTsyReqHandle( |
3744 EMultimodePacketServiceSetDefaultContextParams ) ); |
3749 EMultimodePacketServiceSetDefaultContextParams ) ); |
3745 |
3750 |
3756 //---------------------------------------------------------------------------- |
3761 //---------------------------------------------------------------------------- |
3757 // |
3762 // |
3758 TInt CMmPacketServiceTsy::GetDefaultContextParams( |
3763 TInt CMmPacketServiceTsy::GetDefaultContextParams( |
3759 TPacketDataConfigBase* aContextConfig ) |
3764 TPacketDataConfigBase* aContextConfig ) |
3760 { |
3765 { |
3761 TFLOGSTRING("TSY: CMmPacketServiceTsy::GetDefaultContextParams." ); |
3766 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_GETDEFAULTCONTEXTPARAMS_1, "TSY: CMmPacketServiceTsy::GetDefaultContextParams." ); |
3762 |
3767 |
3763 TInt ret = iMmPacketServiceGsmWcdmaExt->GetDefaultContextParams( |
3768 TInt ret = iMmPacketServiceGsmWcdmaExt->GetDefaultContextParams( |
3764 aContextConfig ); |
3769 aContextConfig ); |
3765 |
3770 |
3766 CMmPacketServiceTsy::ReqCompleted( iTsyReqHandle, ret ); |
3771 CMmPacketServiceTsy::ReqCompleted( iTsyReqHandle, ret ); |
3792 RCall::TStatus status = call->Status(); |
3797 RCall::TStatus status = call->Status(); |
3793 |
3798 |
3794 if ( RCall::EStatusUnknown != status && |
3799 if ( RCall::EStatusUnknown != status && |
3795 RCall::EStatusIdle != status ) |
3800 RCall::EStatusIdle != status ) |
3796 { |
3801 { |
3797 TFLOGSTRING("TSY: CMmPacketServiceTsy::IsActivationAllowed. CS call active, Context Activation not allowed" ); |
3802 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_ISACTIVATIONALLOWED_1, "TSY: CMmPacketServiceTsy::IsActivationAllowed. CS call active, Context Activation not allowed" ); |
3798 isAllowed = EFalse; |
3803 isAllowed = EFalse; |
3799 i = iMmPhone->CallList()->GetNumberOfObjects(); |
3804 i = iMmPhone->CallList()->GetNumberOfObjects(); |
3800 } |
3805 } |
3801 } |
3806 } |
3802 } |
3807 } |
3821 //---------------------------------------------------------------------------- |
3826 //---------------------------------------------------------------------------- |
3822 // |
3827 // |
3823 void CMmPacketServiceTsy::CompleteNotifyEGprsInfoChange( |
3828 void CMmPacketServiceTsy::CompleteNotifyEGprsInfoChange( |
3824 CMmDataPackage* aDataPackage ) |
3829 CMmDataPackage* aDataPackage ) |
3825 { |
3830 { |
3826 TFLOGSTRING("TSY: CMmPacketServiceTsy::CompleteNotifyEGprsInfoChange." ); |
3831 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETENOTIFYEGPRSINFOCHANGE_1, "TSY: CMmPacketServiceTsy::CompleteNotifyEGprsInfoChange." ); |
3827 |
3832 |
3828 //Unpack data |
3833 //Unpack data |
3829 TBool lastEdgeGprsSupport; |
3834 TBool lastEdgeGprsSupport; |
3830 aDataPackage->UnPackData( lastEdgeGprsSupport ); |
3835 aDataPackage->UnPackData( lastEdgeGprsSupport ); |
3831 |
3836 |
3885 RMobilePhone::TMobilePhoneNetworkMode ntwkMode( |
3890 RMobilePhone::TMobilePhoneNetworkMode ntwkMode( |
3886 RMobilePhone::ENetworkModeUnknown ); |
3891 RMobilePhone::ENetworkModeUnknown ); |
3887 //Unpack data |
3892 //Unpack data |
3888 aDataPackage->UnPackData( ntwkMode ); |
3893 aDataPackage->UnPackData( ntwkMode ); |
3889 |
3894 |
3890 TFLOGSTRING2("TSY: CMmPacketServiceTsy::CompleteNetworkModeChange. ntwkMode: %d", ntwkMode ); |
3895 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETENETWORKMODECHANGE_1, "TSY: CMmPacketServiceTsy::CompleteNetworkModeChange. ntwkMode: %d", ntwkMode ); |
3891 iCurrentMode = ntwkMode; |
3896 iCurrentMode = ntwkMode; |
3892 } |
3897 } |
3893 |
3898 |
3894 //---------------------------------------------------------------------------- |
3899 //---------------------------------------------------------------------------- |
3895 // CMmPacketServiceTsy::Context |
3900 // CMmPacketServiceTsy::Context |
3914 // Returns unnamed mutex handle owned by TSY |
3919 // Returns unnamed mutex handle owned by TSY |
3915 //---------------------------------------------------------------------------- |
3920 //---------------------------------------------------------------------------- |
3916 // |
3921 // |
3917 RHandleBase* CMmPacketServiceTsy::GlobalKernelObjectHandle() |
3922 RHandleBase* CMmPacketServiceTsy::GlobalKernelObjectHandle() |
3918 { |
3923 { |
3919 TFLOGSTRING("TSY: CMmPacketServiceTsy::GlobalKernelObjectHandle" ); |
3924 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_GLOBALKERNELOBJECTHANDLE_1, "TSY: CMmPacketServiceTsy::GlobalKernelObjectHandle" ); |
3920 |
3925 |
3921 if ( KNullHandle == iMutex.Handle() ) |
3926 if ( KNullHandle == iMutex.Handle() ) |
3922 { |
3927 { |
3923 TInt ret = iMutex.CreateLocal( EOwnerProcess ); |
3928 TInt ret = iMutex.CreateLocal( EOwnerProcess ); |
3924 |
3929 |
3925 if ( KErrNone == ret ) |
3930 if ( KErrNone == ret ) |
3926 { |
3931 { |
3927 TFLOGSTRING("TSY: CMmPacketServiceTsy::GlobalKernelObjectHandle - Mutex created" ); |
3932 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_GLOBALKERNELOBJECTHANDLE_2, "TSY: CMmPacketServiceTsy::GlobalKernelObjectHandle - Mutex created" ); |
3928 } |
3933 } |
3929 else |
3934 else |
3930 { |
3935 { |
3931 TFLOGSTRING("TSY: CMmPacketServiceTsy::GlobalKernelObjectHandle - Mutex creation failed" ); |
3936 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_GLOBALKERNELOBJECTHANDLE_3, "TSY: CMmPacketServiceTsy::GlobalKernelObjectHandle - Mutex creation failed" ); |
3932 } |
3937 } |
3933 } |
3938 } |
3934 else |
3939 else |
3935 { |
3940 { |
3936 TFLOGSTRING("TSY: CMmPacketServiceTsy::GlobalKernelObjectHandle - Mutex creation skipped" ); |
3941 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_GLOBALKERNELOBJECTHANDLE_4, "TSY: CMmPacketServiceTsy::GlobalKernelObjectHandle - Mutex creation skipped" ); |
3937 } |
3942 } |
3938 |
3943 |
3939 return &iMutex; |
3944 return &iMutex; |
3940 } |
3945 } |
3941 |
3946 |
3946 // |
3951 // |
3947 TInt CMmPacketServiceTsy::SetAlwaysOnL( |
3952 TInt CMmPacketServiceTsy::SetAlwaysOnL( |
3948 TTsyReqHandle aTsyReqHandle, |
3953 TTsyReqHandle aTsyReqHandle, |
3949 RMmCustomAPI::TSetAlwaysOnMode aMode ) |
3954 RMmCustomAPI::TSetAlwaysOnMode aMode ) |
3950 { |
3955 { |
3951 TFLOGSTRING2("TSY: CMmPacketServiceTsy::SetAlwaysOn Mode = %d", aMode ); |
3956 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_SETALWAYSONL_1, "TSY: CMmPacketServiceTsy::SetAlwaysOn Mode = %d", aMode ); |
3952 TFLOGSTRING2( "TSY: CMmPacketServiceTsy::CompleteSetAlwaysOn ReqHandle %d", aTsyReqHandle ); |
3957 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_SETALWAYSONL_2, "TSY: CMmPacketServiceTsy::SetAlwaysOn ReqHandle %d", aTsyReqHandle ); |
3953 TInt ret( KErrServerBusy ); |
3958 TInt ret( KErrServerBusy ); |
3954 |
3959 |
3955 //Check if request is allready pending |
3960 //Check if request is allready pending |
3956 TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle( |
3961 TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle( |
3957 EMultimodePacketSetAlwaysOn ); |
3962 EMultimodePacketSetAlwaysOn ); |
3982 //----------------------------------------------------------------------------- |
3987 //----------------------------------------------------------------------------- |
3983 // |
3988 // |
3984 void CMmPacketServiceTsy::CompleteSetAlwaysOn( |
3989 void CMmPacketServiceTsy::CompleteSetAlwaysOn( |
3985 TInt aError ) |
3990 TInt aError ) |
3986 { |
3991 { |
3987 TFLOGSTRING2( "TSY: CMmPacketServiceTsy::CompleteSetAlwaysOn Error %d", aError ); |
3992 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETESETALWAYSON_1, "TSY: CMmPacketServiceTsy::CompleteSetAlwaysOn Error %d", aError ); |
3988 |
3993 |
3989 const TTsyReqHandle reqHandle( iTsyReqHandleStore->ResetTsyReqHandle( |
3994 const TTsyReqHandle reqHandle( iTsyReqHandleStore->ResetTsyReqHandle( |
3990 EMultimodePacketSetAlwaysOn ) ); |
3995 EMultimodePacketSetAlwaysOn ) ); |
3991 |
3996 |
3992 TFLOGSTRING2( "TSY: CMmPacketServiceTsy::CompleteSetAlwaysOn ReqHandle %d", reqHandle ); |
3997 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETESETALWAYSON_2, "TSY: CMmPacketServiceTsy::CompleteSetAlwaysOn ReqHandle %d", reqHandle ); |
3993 |
3998 |
3994 if ( EMultimodePacketServiceReqHandleUnknown != reqHandle ) |
3999 if ( EMultimodePacketServiceReqHandleUnknown != reqHandle ) |
3995 { |
4000 { |
3996 CMmCustomTsy* customTsy = CMmPacketServiceTsy::CustomTsy(); |
4001 CMmCustomTsy* customTsy = CMmPacketServiceTsy::CustomTsy(); |
3997 |
4002 |
4013 //----------------------------------------------------------------------------- |
4018 //----------------------------------------------------------------------------- |
4014 // |
4019 // |
4015 void CMmPacketServiceTsy::CancelSetAlwaysOn( |
4020 void CMmPacketServiceTsy::CancelSetAlwaysOn( |
4016 TTsyReqHandle aTsyReqHandle ) |
4021 TTsyReqHandle aTsyReqHandle ) |
4017 { |
4022 { |
4018 TFLOGSTRING2( "TSY: CMmPacketServiceTsy::CancelSetAlwaysOn ReqHandle %d", aTsyReqHandle ); |
4023 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_CANCELSETALWAYSON_1, "TSY: CMmPacketServiceTsy::CancelSetAlwaysOn ReqHandle %d", aTsyReqHandle ); |
4019 |
4024 |
4020 if ( aTsyReqHandle != EMultimodePacketServiceReqHandleUnknown ) |
4025 if ( aTsyReqHandle != EMultimodePacketServiceReqHandleUnknown ) |
4021 { |
4026 { |
4022 // Reset tsy request handle |
4027 // Reset tsy request handle |
4023 iTsyReqHandleStore->ResetTsyReqHandle( EMultimodePacketSetAlwaysOn ); |
4028 iTsyReqHandleStore->ResetTsyReqHandle( EMultimodePacketSetAlwaysOn ); |
4032 // Enumerates all active services |
4037 // Enumerates all active services |
4033 //----------------------------------------------------------------------------- |
4038 //----------------------------------------------------------------------------- |
4034 // |
4039 // |
4035 TInt CMmPacketServiceTsy::EnumerateMbmsActiveServiceList( TInt &aCount, TInt &aMaxAllowed ) |
4040 TInt CMmPacketServiceTsy::EnumerateMbmsActiveServiceList( TInt &aCount, TInt &aMaxAllowed ) |
4036 { |
4041 { |
4037 TFLOGSTRING2( "TSY: CMmPacketServiceTsy::EnumerateMbmsActiveServiceList. max: %d", aMaxAllowed ); |
4042 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_ENUMERATEMBMSACTIVESERVICELIST_1, "TSY: CMmPacketServiceTsy::EnumerateMbmsActiveServiceList. max: %d", aMaxAllowed ); |
4038 |
4043 |
4039 aCount = EnumerateMbmsActiveServices(); |
4044 aCount = EnumerateMbmsActiveServices(); |
4040 aMaxAllowed = iMaxActiveServices; |
4045 aMaxAllowed = iMaxActiveServices; |
4041 |
4046 |
4042 TFLOGSTRING3( "TSY: CMmPacketServiceTsy::EnumerateActiveServiceList Count: %d, Max allowed %d", aCount, aMaxAllowed ); |
4047 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_ENUMERATEMBMSACTIVESERVICELIST_2, "TSY: CMmPacketServiceTsy::EnumerateActiveServiceList Count: %d, Max allowed %d", aCount, aMaxAllowed ); |
4043 // Complete the request with KErrNone |
4048 // Complete the request with KErrNone |
4044 CMmPacketServiceTsy::ReqCompleted( iTsyReqHandle, KErrNone ); |
4049 CMmPacketServiceTsy::ReqCompleted( iTsyReqHandle, KErrNone ); |
4045 return KErrNone; |
4050 return KErrNone; |
4046 } |
4051 } |
4047 |
4052 |
4050 // Enumerates all active services |
4055 // Enumerates all active services |
4051 //----------------------------------------------------------------------------- |
4056 //----------------------------------------------------------------------------- |
4052 // |
4057 // |
4053 TInt CMmPacketServiceTsy::EnumerateMbmsActiveServices() |
4058 TInt CMmPacketServiceTsy::EnumerateMbmsActiveServices() |
4054 { |
4059 { |
4055 TFLOGSTRING2( "TSY: CMmPacketServiceTsy::EnumerateMbmsActiveService. max: %d", iMaxActiveServices ); |
4060 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_ENUMERATEMBMSACTIVESERVICES_1, "TSY: CMmPacketServiceTsy::EnumerateMbmsActiveService. max: %d", iMaxActiveServices ); |
4056 TInt ret( 0 ); |
4061 TInt ret( 0 ); |
4057 |
4062 |
4058 for( TInt i = 0; i< iMBMSContextList->NumberOfContexts(); i++ ) |
4063 for( TInt i = 0; i< iMBMSContextList->NumberOfContexts(); i++ ) |
4059 { |
4064 { |
4060 CMmMBMSContextTsy* context = iMBMSContextList->ContextByIndex( i ); |
4065 CMmMBMSContextTsy* context = iMBMSContextList->ContextByIndex( i ); |
4087 // |
4092 // |
4088 void CMmPacketServiceTsy::CompleteEnumerateMbmsActiveServiceList( |
4093 void CMmPacketServiceTsy::CompleteEnumerateMbmsActiveServiceList( |
4089 CMmDataPackage* aDataPackage, |
4094 CMmDataPackage* aDataPackage, |
4090 const TInt aResult) |
4095 const TInt aResult) |
4091 { |
4096 { |
4092 TFLOGSTRING2( "TSY: CMmPacketServiceTsy::CompleteEnumerateMbmsActiveServiceList. Error: %d", aResult ); |
4097 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETSERVICETSY_COMPLETEENUMERATEMBMSACTIVESERVICELIST_1, "TSY: CMmPacketServiceTsy::CompleteEnumerateMbmsActiveServiceList. Error: %d", aResult ); |
4093 |
4098 |
4094 if( KErrNone == aResult && NULL != aDataPackage ) |
4099 if( KErrNone == aResult && NULL != aDataPackage ) |
4095 { |
4100 { |
4096 aDataPackage->UnPackData( iMaxActiveServices ); |
4101 aDataPackage->UnPackData( iMaxActiveServices ); |
4097 } |
4102 } |