equal
deleted
inserted
replaced
1 // Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2006-2009 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 "CmmpacketcontexttsyTraces.h" |
|
23 #endif |
|
24 |
|
25 #include "Cmmpacketcontexttsy.h" |
19 #include "Cmmpacketcontexttsy.h" |
26 #include "Cmmpacketcontextlist.h" |
20 #include "Cmmpacketcontextlist.h" |
27 #include "cmmpacketservicegsmwcdmaext.h" |
21 #include "cmmpacketservicegsmwcdmaext.h" |
28 #include "CMmPacketTsy.h" |
22 #include "CMmPacketTsy.h" |
|
23 #include <ctsy/tflogger.h> |
29 #include "MmTsy_timeoutdefs.h" |
24 #include "MmTsy_timeoutdefs.h" |
30 #include "MmTsy_numberOfSlots.h" |
25 #include "MmTsy_numberOfSlots.h" |
31 |
26 |
32 // ============================ MEMBER FUNCTIONS =============================== |
27 // ============================ MEMBER FUNCTIONS =============================== |
33 |
28 |
41 CMmPacketServiceTsy* const aMmPacketService, |
36 CMmPacketServiceTsy* const aMmPacketService, |
42 const TInfoName& aHostCID, |
37 const TInfoName& aHostCID, |
43 const TDes& aName, |
38 const TDes& aName, |
44 const TUint8 aProxyId ) |
39 const TUint8 aProxyId ) |
45 { |
40 { |
46 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_NEWL_1, "TSY: CMmPacketContextTsy::NewL. Context name:%S", aName ); |
41 TFLOGSTRING2( "TSY: CMmPacketContextTsy::NewL. Context name:%S", &aName ); |
47 |
42 |
48 CMmPacketContextTsy* packetContext = new ( ELeave ) CMmPacketContextTsy(); |
43 CMmPacketContextTsy* packetContext = new ( ELeave ) CMmPacketContextTsy(); |
49 |
44 |
50 CleanupClosePushL( *packetContext ); |
45 CleanupClosePushL( *packetContext ); |
51 packetContext->iMmPacketService = aMmPacketService; |
46 packetContext->iMmPacketService = aMmPacketService; |
64 InitInternalAttributes(); |
59 InitInternalAttributes(); |
65 } |
60 } |
66 |
61 |
67 CMmPacketContextTsy::~CMmPacketContextTsy() |
62 CMmPacketContextTsy::~CMmPacketContextTsy() |
68 { |
63 { |
69 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_DTOR_1, "TSY: CMmPacketContextTsy::~CMmPacketContextTsy. Context name: %S", iContextName ); |
64 TFLOGSTRING2( "TSY: CMmPacketContextTsy::~CMmPacketContextTsy. Context name: %S", &iContextName ); |
70 |
65 |
71 if( iMmPacketService ) |
66 if( iMmPacketService ) |
72 { |
67 { |
73 |
68 |
74 iMmPacketService->PacketContextList()->RemoveObject( this ); |
69 iMmPacketService->PacketContextList()->RemoveObject( this ); |
162 TInt CMmPacketContextTsy::ExtFunc( |
157 TInt CMmPacketContextTsy::ExtFunc( |
163 const TTsyReqHandle aTsyReqHandle, |
158 const TTsyReqHandle aTsyReqHandle, |
164 const TInt aIpc, |
159 const TInt aIpc, |
165 const TDataPackage& aPackage ) |
160 const TDataPackage& aPackage ) |
166 { |
161 { |
167 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_EXTFUNC_1, "TSY: CMmPacketContextTsy::ExtFunc. IPC: %d Context name:%S", aIpc, iContextName ); |
162 TFLOGSTRING3( "TSY: CMmPacketContextTsy::ExtFunc. IPC: %d Context name:%S", aIpc, &iContextName ); |
168 |
163 |
169 TInt ret( KErrNone ); |
164 TInt ret( KErrNone ); |
170 TInt trapError( KErrNone ); |
165 TInt trapError( KErrNone ); |
171 |
166 |
172 #ifdef ADD_REMOVE_PACKETFILTER_DEFECT_FIXED // search for this up from bottom of file |
167 #ifdef ADD_REMOVE_PACKETFILTER_DEFECT_FIXED // search for this up from bottom of file |
220 TInt CMmPacketContextTsy::DoExtFuncL( |
215 TInt CMmPacketContextTsy::DoExtFuncL( |
221 const TTsyReqHandle aTsyReqHandle, |
216 const TTsyReqHandle aTsyReqHandle, |
222 const TInt aIpc, |
217 const TInt aIpc, |
223 const TDataPackage& aPackage ) |
218 const TDataPackage& aPackage ) |
224 { |
219 { |
225 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_DOEXTFUNCL_1, "TSY: CMmPacketContextTsy::DoExtFuncL. IPC: %d Handle:%d",aIpc, aTsyReqHandle ); |
220 TFLOGSTRING3( "TSY: CMmPacketContextTsy::DoExtFuncL. IPC: %d Handle:%d", |
|
221 aIpc, aTsyReqHandle ); |
226 |
222 |
227 TInt ret( KErrNotSupported ); |
223 TInt ret( KErrNotSupported ); |
228 |
224 |
229 TAny* dataPtr = aPackage.Ptr1(); |
225 TAny* dataPtr = aPackage.Ptr1(); |
230 TAny* dataPtr2 = aPackage.Ptr2(); |
226 TAny* dataPtr2 = aPackage.Ptr2(); |
386 // --------------------------------------------------------------------------- |
382 // --------------------------------------------------------------------------- |
387 // |
383 // |
388 CTelObject::TReqMode CMmPacketContextTsy::ReqModeL( |
384 CTelObject::TReqMode CMmPacketContextTsy::ReqModeL( |
389 const TInt aIpc ) |
385 const TInt aIpc ) |
390 { |
386 { |
391 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_REQMODEL_1, "TSY: CMmPacketContextTsy::ReqModeL. IPC: %d", aIpc ); |
387 TFLOGSTRING2( "TSY: CMmPacketContextTsy::ReqModeL. IPC: %d", aIpc ); |
392 |
388 |
393 CTelObject::TReqMode reqMode( 0 ); |
389 CTelObject::TReqMode reqMode( 0 ); |
394 TBool doLeave( EFalse ); |
390 TBool doLeave( EFalse ); |
395 |
391 |
396 switch ( aIpc ) |
392 switch ( aIpc ) |
529 // Unknown or invalid IPC |
525 // Unknown or invalid IPC |
530 User::Leave( KErrNotSupported ); |
526 User::Leave( KErrNotSupported ); |
531 break; |
527 break; |
532 |
528 |
533 } |
529 } |
534 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_NUMBEROFSLOTSL_1, "TSY: CMmPacketContextTsy::NumberOfSlotsL. IPC: %d Number of slots: %d",aIpc, numberOfSlots ); |
530 TFLOGSTRING3( "TSY: CMmPacketContextTsy::NumberOfSlotsL. IPC: %d Number of slots: %d", |
|
531 aIpc, numberOfSlots ); |
535 |
532 |
536 return numberOfSlots; |
533 return numberOfSlots; |
537 |
534 |
538 } |
535 } |
539 |
536 |
551 // |
548 // |
552 TInt CMmPacketContextTsy::CancelService( |
549 TInt CMmPacketContextTsy::CancelService( |
553 const TInt aIpc, |
550 const TInt aIpc, |
554 const TTsyReqHandle aTsyReqHandle ) |
551 const TTsyReqHandle aTsyReqHandle ) |
555 { |
552 { |
556 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_CANCELSERVICE_1, "TSY: CMmPacketContextTsy::CancelService. IPC: %d Handle:%d",aIpc, aTsyReqHandle ); |
553 TFLOGSTRING3( "TSY: CMmPacketContextTsy::CancelService. IPC: %d Handle:%d", |
|
554 aIpc, aTsyReqHandle ); |
557 |
555 |
558 TInt ret( KErrNone ); |
556 TInt ret( KErrNone ); |
559 TTsyReqHandle reqHandle( NULL ); |
557 TTsyReqHandle reqHandle( NULL ); |
560 |
558 |
561 #ifdef ADD_REMOVE_PACKETFILTER_DEFECT_FIXED // search for this up from bottom of file |
559 #ifdef ADD_REMOVE_PACKETFILTER_DEFECT_FIXED // search for this up from bottom of file |
675 // --------------------------------------------------------------------------- |
673 // --------------------------------------------------------------------------- |
676 // |
674 // |
677 TInt CMmPacketContextTsy::RegisterNotification( |
675 TInt CMmPacketContextTsy::RegisterNotification( |
678 const TInt aIpc ) |
676 const TInt aIpc ) |
679 { |
677 { |
680 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_REGISTERNOTIFICATION_1, "TSY: CMmPacketContextTsy::RegisterNotification. IPC: %d", aIpc ); |
678 TFLOGSTRING2( "TSY: CMmPacketContextTsy::RegisterNotification. IPC: %d", aIpc ); |
681 |
679 |
682 TInt ret( KErrNone ); |
680 TInt ret( KErrNone ); |
683 |
681 |
684 switch ( aIpc ) |
682 switch ( aIpc ) |
685 { |
683 { |
717 // --------------------------------------------------------------------------- |
715 // --------------------------------------------------------------------------- |
718 // |
716 // |
719 TInt CMmPacketContextTsy::DeregisterNotification( |
717 TInt CMmPacketContextTsy::DeregisterNotification( |
720 const TInt aIpc ) |
718 const TInt aIpc ) |
721 { |
719 { |
722 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_DEREGISTERNOTIFICATION_1, "TSY: CMmPacketContextTsy::DeregisterNotification. IPC: %d", aIpc ); |
720 TFLOGSTRING2( "TSY: CMmPacketContextTsy::DeregisterNotification. IPC: %d", aIpc ); |
723 |
721 |
724 TInt ret( KErrNone ); |
722 TInt ret( KErrNone ); |
725 |
723 |
726 switch ( aIpc ) |
724 switch ( aIpc ) |
727 { |
725 { |
754 // --------------------------------------------------------------------------- |
752 // --------------------------------------------------------------------------- |
755 // |
753 // |
756 CTelObject* CMmPacketContextTsy::OpenNewObjectL( |
754 CTelObject* CMmPacketContextTsy::OpenNewObjectL( |
757 TDes& aNewName ) |
755 TDes& aNewName ) |
758 { |
756 { |
759 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_OPENNEWOBJECTL_1, "TSY: CMmPacketContextTsy::OpenNewObjectL." ); |
757 TFLOGSTRING( "TSY: CMmPacketContextTsy::OpenNewObjectL." ); |
760 |
758 |
761 // Each context can have only one QoS |
759 // Each context can have only one QoS |
762 if ( NULL != iQoSProfile ) |
760 if ( NULL != iQoSProfile ) |
763 { |
761 { |
764 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_OPENNEWOBJECTL_2, "TSY: CMmPacketContextTsy::OpenNewObjectL. Leaves with: %d", KErrAlreadyExists ); |
762 TFLOGSTRING2( "TSY: CMmPacketContextTsy::OpenNewObjectL. Leaves with: %d", KErrAlreadyExists ); |
765 User::Leave( KErrAlreadyExists ); |
763 User::Leave( KErrAlreadyExists ); |
766 } |
764 } |
767 |
765 |
768 else |
766 else |
769 { |
767 { |
771 iQoSProfile = CMmPacketQoSTsy::NewL( iMmPacketService, this ); |
769 iQoSProfile = CMmPacketQoSTsy::NewL( iMmPacketService, this ); |
772 |
770 |
773 iQoSProfileName.Copy( iContextName ); |
771 iQoSProfileName.Copy( iContextName ); |
774 aNewName.Copy( iQoSProfileName ); |
772 aNewName.Copy( iQoSProfileName ); |
775 } |
773 } |
776 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_OPENNEWOBJECTL_3, "TSY: CMmPacketContextTsy::OpenNewObjectL. aNewName: %S", aNewName ); |
774 TFLOGSTRING2( "TSY: CMmPacketContextTsy::OpenNewObjectL. aNewName: %S", &aNewName ); |
777 |
775 |
778 return iQoSProfile; |
776 return iQoSProfile; |
779 } |
777 } |
780 |
778 |
781 // --------------------------------------------------------------------------- |
779 // --------------------------------------------------------------------------- |
787 // --------------------------------------------------------------------------- |
785 // --------------------------------------------------------------------------- |
788 // |
786 // |
789 CTelObject* CMmPacketContextTsy::OpenNewObjectByNameL( |
787 CTelObject* CMmPacketContextTsy::OpenNewObjectByNameL( |
790 const TDesC& aName ) |
788 const TDesC& aName ) |
791 { |
789 { |
792 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_OPENNEWOBJECTBYNAMEL_1, "TSY: CMmPacketContextTsy::OpenNewObjectByNameL. aName: %S", aName ); |
790 TFLOGSTRING2( "TSY: CMmPacketContextTsy::OpenNewObjectByNameL. aName: %S", &aName ); |
793 |
791 |
794 if ( aName != iQoSProfileName ) |
792 if ( aName != iQoSProfileName ) |
795 { |
793 { |
796 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_OPENNEWOBJECTBYNAMEL_2, "TSY: CMmPacketContextTsy::OpenNewObjectByNameL. Leaves with: %d", KErrNotFound ); |
794 TFLOGSTRING2( "TSY: CMmPacketContextTsy::OpenNewObjectByNameL. Leaves with: %d", KErrNotFound ); |
797 User::Leave( KErrNotFound ); |
795 User::Leave( KErrNotFound ); |
798 } |
796 } |
799 |
797 |
800 return iQoSProfile; |
798 return iQoSProfile; |
801 } |
799 } |
806 // (other items were commented in a header). |
804 // (other items were commented in a header). |
807 // --------------------------------------------------------------------------- |
805 // --------------------------------------------------------------------------- |
808 // |
806 // |
809 TInt CMmPacketContextTsy::InitialiseContextL(RPacketContext::TDataChannelV2* aDataChannel ) |
807 TInt CMmPacketContextTsy::InitialiseContextL(RPacketContext::TDataChannelV2* aDataChannel ) |
810 { |
808 { |
811 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_INITIALISECONTEXTL_1, "TSY: CMmPacketContextTsy::InitialiseContextL." ); |
809 TFLOGSTRING( "TSY: CMmPacketContextTsy::InitialiseContextL." ); |
812 |
810 |
813 TInt ret( KErrNone ); |
811 TInt ret( KErrNone ); |
814 |
812 |
815 // Initialise Context |
813 // Initialise Context |
816 ret = iMmPacketContextGsmWcdmaExt->InitialiseContextL(aDataChannel); |
814 ret = iMmPacketContextGsmWcdmaExt->InitialiseContextL(aDataChannel); |
830 // (other items were commented in a header). |
828 // (other items were commented in a header). |
831 // --------------------------------------------------------------------------- |
829 // --------------------------------------------------------------------------- |
832 // |
830 // |
833 void CMmPacketContextTsy::CompleteInitialiseContext(const TInt aResult ) |
831 void CMmPacketContextTsy::CompleteInitialiseContext(const TInt aResult ) |
834 { |
832 { |
835 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_COMPLETEINITIALISECONTEXT_1, "TSY: CMmPacketContextTsy::CompleteInitialiseContext. Error: %d", aResult ); |
833 TFLOGSTRING2( "TSY: CMmPacketContextTsy::CompleteInitialiseContext. Error: %d", aResult ); |
836 |
834 |
837 // Reset the req handle. Returns the deleted req handle |
835 // Reset the req handle. Returns the deleted req handle |
838 TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( |
836 TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( |
839 EMultimodePacketContextInitialiseContext ); |
837 EMultimodePacketContextInitialiseContext ); |
840 |
838 |
857 // (other items were commented in a header). |
855 // (other items were commented in a header). |
858 // --------------------------------------------------------------------------- |
856 // --------------------------------------------------------------------------- |
859 // |
857 // |
860 TInt CMmPacketContextTsy::ActivateL() |
858 TInt CMmPacketContextTsy::ActivateL() |
861 { |
859 { |
862 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_ACTIVATEL_1, "TSY: CMmPacketContextTsy::ActivateL. Context name:%S", iContextName ); |
860 TFLOGSTRING2( "TSY: CMmPacketContextTsy::ActivateL. Context name:%S", &iContextName ); |
863 |
861 |
864 TInt ret( KErrGprsServicesNotAllowed ); |
862 TInt ret( KErrGprsServicesNotAllowed ); |
865 |
863 |
866 if ( iMmPacketService->IsActivationAllowed() ) |
864 if ( iMmPacketService->IsActivationAllowed() ) |
867 { |
865 { |
885 // --------------------------------------------------------------------------- |
883 // --------------------------------------------------------------------------- |
886 // |
884 // |
887 void CMmPacketContextTsy::CompleteActivate( |
885 void CMmPacketContextTsy::CompleteActivate( |
888 const TInt aResult ) |
886 const TInt aResult ) |
889 { |
887 { |
890 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_COMPLETEACTIVATE_1, "TSY: CMmPacketContextTsy::CompleteActivate. Error: %d", aResult ); |
888 TFLOGSTRING2( "TSY: CMmPacketContextTsy::CompleteActivate. Error: %d", aResult ); |
891 // Reset the req handle. Returns the deleted req handle |
889 // Reset the req handle. Returns the deleted req handle |
892 TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( |
890 TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( |
893 EMultimodePacketContextActivate ); |
891 EMultimodePacketContextActivate ); |
894 |
892 |
895 if ( EMultimodePacketContextReqHandleUnknown != reqHandle ) |
893 if ( EMultimodePacketContextReqHandleUnknown != reqHandle ) |
906 // (other items were commented in a header). |
904 // (other items were commented in a header). |
907 // --------------------------------------------------------------------------- |
905 // --------------------------------------------------------------------------- |
908 // |
906 // |
909 TInt CMmPacketContextTsy::DeactivateL() |
907 TInt CMmPacketContextTsy::DeactivateL() |
910 { |
908 { |
911 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_DEACTIVATEL_1, "TSY: CMmPacketContextTsy::DeactivateL. Context name:%S", iContextName ); |
909 TFLOGSTRING2( "TSY: CMmPacketContextTsy::DeactivateL. Context name:%S", &iContextName ); |
912 TInt ret( KErrNone ); |
910 TInt ret( KErrNone ); |
913 |
911 |
914 // Call Deactivate |
912 // Call Deactivate |
915 ret = iMmPacketContextGsmWcdmaExt->DeactivateL(); |
913 ret = iMmPacketContextGsmWcdmaExt->DeactivateL(); |
916 |
914 |
930 // --------------------------------------------------------------------------- |
928 // --------------------------------------------------------------------------- |
931 // |
929 // |
932 void CMmPacketContextTsy::CompleteDeactivate( |
930 void CMmPacketContextTsy::CompleteDeactivate( |
933 const TInt aResult ) |
931 const TInt aResult ) |
934 { |
932 { |
935 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_COMPLETEDEACTIVATE_1, "TSY: CMmPacketContextTsy::CompleteDeactivate. Error: %d", aResult ); |
933 TFLOGSTRING2( "TSY: CMmPacketContextTsy::CompleteDeactivate. Error: %d", aResult ); |
936 // Reset the req handle. Returns the deleted req handle |
934 // Reset the req handle. Returns the deleted req handle |
937 TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( |
935 TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( |
938 EMultimodePacketContextDeactivate ); |
936 EMultimodePacketContextDeactivate ); |
939 |
937 |
940 if ( EMultimodePacketContextReqHandleUnknown != reqHandle ) |
938 if ( EMultimodePacketContextReqHandleUnknown != reqHandle ) |
954 // (other items were commented in a header). |
952 // (other items were commented in a header). |
955 // --------------------------------------------------------------------------- |
953 // --------------------------------------------------------------------------- |
956 // |
954 // |
957 TInt CMmPacketContextTsy::DeleteL() |
955 TInt CMmPacketContextTsy::DeleteL() |
958 { |
956 { |
959 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_DELETEL_1, "TSY: CMmPacketContextTsy::DeleteL. Context name:%S", iContextName ); |
957 TFLOGSTRING2( "TSY: CMmPacketContextTsy::DeleteL. Context name:%S", &iContextName ); |
960 |
958 |
961 TInt ret( KErrNone ); |
959 TInt ret( KErrNone ); |
962 |
960 |
963 // Call DeleteL |
961 // Call DeleteL |
964 ret = iMmPacketContextGsmWcdmaExt->DeleteL(); |
962 ret = iMmPacketContextGsmWcdmaExt->DeleteL(); |
979 // --------------------------------------------------------------------------- |
977 // --------------------------------------------------------------------------- |
980 // |
978 // |
981 void CMmPacketContextTsy::CompleteDelete( |
979 void CMmPacketContextTsy::CompleteDelete( |
982 const TInt aResult ) |
980 const TInt aResult ) |
983 { |
981 { |
984 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_COMPLETEDELETE_1, "TSY: CMmPacketContextTsy::CompleteDelete. Error: %d", aResult ); |
982 TFLOGSTRING2( "TSY: CMmPacketContextTsy::CompleteDelete. Error: %d", aResult ); |
985 // Reset the req handle. Returns the deleted req handle |
983 // Reset the req handle. Returns the deleted req handle |
986 TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( |
984 TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( |
987 EMultimodePacketContextDelete ); |
985 EMultimodePacketContextDelete ); |
988 |
986 |
989 if ( EMultimodePacketContextReqHandleUnknown != reqHandle ) |
987 if ( EMultimodePacketContextReqHandleUnknown != reqHandle ) |
1001 // |
999 // |
1002 TInt CMmPacketContextTsy::GetConfig( |
1000 TInt CMmPacketContextTsy::GetConfig( |
1003 const TTsyReqHandle aTsyReqHandle, |
1001 const TTsyReqHandle aTsyReqHandle, |
1004 TPacketDataConfigBase* const aConfig ) |
1002 TPacketDataConfigBase* const aConfig ) |
1005 { |
1003 { |
1006 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_GETCONFIG_1, "TSY: CMmPacketContextTsy::GetConfig. Context name:%S", iContextName ); |
1004 TFLOGSTRING2( "TSY: CMmPacketContextTsy::GetConfig. Context name:%S", &iContextName ); |
1007 |
1005 |
1008 // Get config |
1006 // Get config |
1009 TInt ret = iMmPacketContextGsmWcdmaExt->GetConfig( aConfig ); |
1007 TInt ret = iMmPacketContextGsmWcdmaExt->GetConfig( aConfig ); |
1010 |
1008 |
1011 // Complete Request |
1009 // Complete Request |
1022 // |
1020 // |
1023 TInt CMmPacketContextTsy::GetConnectionSpeed( |
1021 TInt CMmPacketContextTsy::GetConnectionSpeed( |
1024 const TTsyReqHandle aTsyReqHandle, |
1022 const TTsyReqHandle aTsyReqHandle, |
1025 TUint* const aRate ) |
1023 TUint* const aRate ) |
1026 { |
1024 { |
1027 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_GETCONNECTIONSPEED_1, "TSY: CMmPacketContextTsy::GetConnectionSpeed. Context name: %S Connection Speed:%u bps",iContextName, iConnectionSpeed ); |
1025 TFLOGSTRING3( "TSY: CMmPacketContextTsy::GetConnectionSpeed. Context name: %S Connection Speed:%d bps", |
|
1026 &iContextName, iConnectionSpeed ); |
1028 |
1027 |
1029 // Get current connection speed rate |
1028 // Get current connection speed rate |
1030 *aRate = iConnectionSpeed; |
1029 *aRate = iConnectionSpeed; |
1031 |
1030 |
1032 // Complete Request |
1031 // Complete Request |
1043 // |
1042 // |
1044 TInt CMmPacketContextTsy::GetDataVolumeTransferredL( |
1043 TInt CMmPacketContextTsy::GetDataVolumeTransferredL( |
1045 const TTsyReqHandle aTsyReqHandle, |
1044 const TTsyReqHandle aTsyReqHandle, |
1046 RPacketContext::TDataVolume* const aVolume ) |
1045 RPacketContext::TDataVolume* const aVolume ) |
1047 { |
1046 { |
1048 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_GETDATAVOLUMETRANSFERREDL_1, "TSY: CMmPacketContextTsy::GetDataVolumeTransferredL. Context name:%S", iContextName ); |
1047 TFLOGSTRING2( "TSY: CMmPacketContextTsy::GetDataVolumeTransferredL. Context name:%S", &iContextName ); |
1049 |
1048 |
1050 TInt ret( KErrNone ); |
1049 TInt ret( KErrNone ); |
1051 |
1050 |
1052 if ( RPacketContext::EStatusDeleted != iContextStatus ) |
1051 if ( RPacketContext::EStatusDeleted != iContextStatus ) |
1053 { |
1052 { |
1080 // --------------------------------------------------------------------------- |
1079 // --------------------------------------------------------------------------- |
1081 // |
1080 // |
1082 void CMmPacketContextTsy::CompleteGetDataVolumeTransferred( |
1081 void CMmPacketContextTsy::CompleteGetDataVolumeTransferred( |
1083 const TInt aResult ) |
1082 const TInt aResult ) |
1084 { |
1083 { |
1085 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_COMPLETEGETDATAVOLUMETRANSFERRED_1, "TSY: CMmPacketContextTsy::CompleteGetDataVolumeTransferred. Error: %d", aResult ); |
1084 TFLOGSTRING2( "TSY: CMmPacketContextTsy::CompleteGetDataVolumeTransferred. Error: %d", aResult ); |
1086 |
1085 |
1087 // Reset the req handle. Returns the deleted req handle |
1086 // Reset the req handle. Returns the deleted req handle |
1088 TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( |
1087 TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( |
1089 EMultimodePacketContextGetDataVolumeTransferred ); |
1088 EMultimodePacketContextGetDataVolumeTransferred ); |
1090 |
1089 |
1113 // |
1112 // |
1114 TInt CMmPacketContextTsy::GetLastErrorCause( |
1113 TInt CMmPacketContextTsy::GetLastErrorCause( |
1115 const TTsyReqHandle aTsyReqHandle, |
1114 const TTsyReqHandle aTsyReqHandle, |
1116 TInt* const aError ) |
1115 TInt* const aError ) |
1117 { |
1116 { |
1118 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_GETLASTERRORCAUSE_1, "TSY: CMmPacketContextTsy::GetLastErrorCause. Context name:%S Last error cause: %d",iContextName, iLastErrorCause ); |
1117 TFLOGSTRING3( "TSY: CMmPacketContextTsy::GetLastErrorCause. Context name:%S Last error cause: %d", |
|
1118 &iContextName, iLastErrorCause ); |
1119 |
1119 |
1120 *aError = iLastErrorCause; |
1120 *aError = iLastErrorCause; |
1121 CMmPacketContextTsy::ReqCompleted( aTsyReqHandle, KErrNone ); |
1121 CMmPacketContextTsy::ReqCompleted( aTsyReqHandle, KErrNone ); |
1122 |
1122 |
1123 return KErrNone; |
1123 return KErrNone; |
1143 { |
1143 { |
1144 // QoS profile not found |
1144 // QoS profile not found |
1145 aQoSProfile->Zero(); |
1145 aQoSProfile->Zero(); |
1146 } |
1146 } |
1147 |
1147 |
1148 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_GETPROFILENAME_1, "TSY: CMmPacketContextTsy::GetProfileName. Context name: %S QoS Profile Name: %S",iContextName, *aQoSProfile ); |
1148 TFLOGSTRING3( "TSY: CMmPacketContextTsy::GetProfileName. Context name: %S QoS Profile Name: %S", |
|
1149 &iContextName, aQoSProfile ); |
1149 |
1150 |
1150 CMmPacketContextTsy::ReqCompleted( aTsyReqHandle, KErrNone ); |
1151 CMmPacketContextTsy::ReqCompleted( aTsyReqHandle, KErrNone ); |
1151 return KErrNone; |
1152 return KErrNone; |
1152 } |
1153 } |
1153 |
1154 |
1159 // |
1160 // |
1160 TInt CMmPacketContextTsy::GetStatus( |
1161 TInt CMmPacketContextTsy::GetStatus( |
1161 const TTsyReqHandle aTsyReqHandle, |
1162 const TTsyReqHandle aTsyReqHandle, |
1162 RPacketContext::TContextStatus* const aContextStatus ) |
1163 RPacketContext::TContextStatus* const aContextStatus ) |
1163 { |
1164 { |
1164 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_GETSTATUS_1, "TSY: CMmPacketContextTsy::GetStatus. Context name: %S Context Status:%d",iContextName, iContextStatus ); |
1165 TFLOGSTRING3( "TSY: CMmPacketContextTsy::GetStatus. Context name: %S Context Status:%d", |
|
1166 &iContextName, iContextStatus ); |
1165 *aContextStatus = iContextStatus; |
1167 *aContextStatus = iContextStatus; |
1166 CMmPacketContextTsy::ReqCompleted( aTsyReqHandle, KErrNone ); |
1168 CMmPacketContextTsy::ReqCompleted( aTsyReqHandle, KErrNone ); |
1167 |
1169 |
1168 return KErrNone; |
1170 return KErrNone; |
1169 } |
1171 } |
1175 // --------------------------------------------------------------------------- |
1177 // --------------------------------------------------------------------------- |
1176 // |
1178 // |
1177 TInt CMmPacketContextTsy::NotifyConfigChanged( |
1179 TInt CMmPacketContextTsy::NotifyConfigChanged( |
1178 TPacketDataConfigBase* const aConfig ) |
1180 TPacketDataConfigBase* const aConfig ) |
1179 { |
1181 { |
1180 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_NOTIFYCONFIGCHANGED_1, "TSY: CMmPacketContextTsy::NotifyConfigChanged." ); |
1182 TFLOGSTRING( "TSY: CMmPacketContextTsy::NotifyConfigChanged." ); |
1181 |
1183 |
1182 // Call NotifyConfigChanged from extension |
1184 // Call NotifyConfigChanged from extension |
1183 TInt ret = iMmPacketContextGsmWcdmaExt->NotifyConfigChanged( *aConfig ); |
1185 TInt ret = iMmPacketContextGsmWcdmaExt->NotifyConfigChanged( *aConfig ); |
1184 |
1186 |
1185 if ( KErrNone == ret ) |
1187 if ( KErrNone == ret ) |
1210 // (other items were commented in a header). |
1212 // (other items were commented in a header). |
1211 // --------------------------------------------------------------------------- |
1213 // --------------------------------------------------------------------------- |
1212 // |
1214 // |
1213 void CMmPacketContextTsy::CompleteNotifyConfigChanged() |
1215 void CMmPacketContextTsy::CompleteNotifyConfigChanged() |
1214 { |
1216 { |
1215 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_COMPLETENOTIFYCONFIGCHANGED_1, "TSY: CMmPacketContextTsy::CompleteNotifyConfigChanged. Context name:%S",iContextName ); |
1217 TFLOGSTRING2( "TSY: CMmPacketContextTsy::CompleteNotifyConfigChanged. Context name:%S", |
|
1218 &iContextName ); |
1216 |
1219 |
1217 // Get and reset req handle for R97/98 config notify |
1220 // Get and reset req handle for R97/98 config notify |
1218 TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( |
1221 TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( |
1219 EMultimodePacketContextNotifyConfigChanged ); |
1222 EMultimodePacketContextNotifyConfigChanged ); |
1220 |
1223 |
1250 // --------------------------------------------------------------------------- |
1253 // --------------------------------------------------------------------------- |
1251 // |
1254 // |
1252 TInt CMmPacketContextTsy::NotifyConnectionSpeedChange( |
1255 TInt CMmPacketContextTsy::NotifyConnectionSpeedChange( |
1253 TUint* const aRate ) |
1256 TUint* const aRate ) |
1254 { |
1257 { |
1255 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_NOTIFYCONNECTIONSPEEDCHANGE_1, "TSY: CMmPacketContextTsy::NotifyConnectionSpeedChange." ); |
1258 TFLOGSTRING( "TSY: CMmPacketContextTsy::NotifyConnectionSpeedChange." ); |
1256 |
1259 |
1257 // Store pointer |
1260 // Store pointer |
1258 iRetNotifyConnectionSpeed = aRate; |
1261 iRetNotifyConnectionSpeed = aRate; |
1259 // Store req handle type |
1262 // Store req handle type |
1260 iReqHandleType = EMultimodePacketContextNotifyConnectionSpeedChange; |
1263 iReqHandleType = EMultimodePacketContextNotifyConnectionSpeedChange; |
1273 { |
1276 { |
1274 iConnectionSpeed = aConnectionSpeed; |
1277 iConnectionSpeed = aConnectionSpeed; |
1275 |
1278 |
1276 if ( iNotifyConnectionSpeed != iConnectionSpeed ) |
1279 if ( iNotifyConnectionSpeed != iConnectionSpeed ) |
1277 { |
1280 { |
1278 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_COMPLETENOTIFYCONNECTIONSPEEDCHANGE_1, "TSY: CMmPacketContextTsy::CompleteNotifyConnectionSpeedChange. Context name:%S Connection Speed:%u bps",iContextName, iConnectionSpeed ); |
1281 TFLOGSTRING3( "TSY: CMmPacketContextTsy::CompleteNotifyConnectionSpeedChange. Context name:%S Connection Speed:%d bps", |
|
1282 &iContextName, iConnectionSpeed ); |
1279 |
1283 |
1280 // Store the connection speed internally |
1284 // Store the connection speed internally |
1281 iNotifyConnectionSpeed = iConnectionSpeed; |
1285 iNotifyConnectionSpeed = iConnectionSpeed; |
1282 |
1286 |
1283 // Get and reset req handle |
1287 // Get and reset req handle |
1303 // --------------------------------------------------------------------------- |
1307 // --------------------------------------------------------------------------- |
1304 // |
1308 // |
1305 TInt CMmPacketContextTsy::NotifyStatusChange( |
1309 TInt CMmPacketContextTsy::NotifyStatusChange( |
1306 RPacketContext::TContextStatus* const aContextStatus ) |
1310 RPacketContext::TContextStatus* const aContextStatus ) |
1307 { |
1311 { |
1308 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_NOTIFYSTATUSCHANGE_1, "TSY: CMmPacketContextTsy::NotifyStatusChange. Context name:%S", iContextName ); |
1312 TFLOGSTRING2( "TSY: CMmPacketContextTsy::NotifyStatusChange. Context name:%S", &iContextName ); |
1309 iRetNotifyStatus = aContextStatus; |
1313 iRetNotifyStatus = aContextStatus; |
1310 iReqHandleType = EMultimodePacketContextNotifyStatusChange; |
1314 iReqHandleType = EMultimodePacketContextNotifyStatusChange; |
1311 |
1315 |
1312 return KErrNone; |
1316 return KErrNone; |
1313 } |
1317 } |
1323 { |
1327 { |
1324 |
1328 |
1325 if ( aContextStatus != iContextStatus ) |
1329 if ( aContextStatus != iContextStatus ) |
1326 { |
1330 { |
1327 iContextStatus = aContextStatus; |
1331 iContextStatus = aContextStatus; |
1328 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_COMPLETENOTIFYSTATUSCHANGE_1, "TSY: CMmPacketContextTsy::CompleteNotifyStatusChange. Context name: %S Context status:%d",iContextName, iContextStatus ); |
1332 TFLOGSTRING3( "TSY: CMmPacketContextTsy::CompleteNotifyStatusChange. Context name: %S Context status:%d", |
|
1333 &iContextName, iContextStatus ); |
1329 |
1334 |
1330 if ( RPacketContext::EStatusActive == iContextStatus || |
1335 if ( RPacketContext::EStatusActive == iContextStatus || |
1331 RPacketContext::EStatusInactive == iContextStatus || |
1336 RPacketContext::EStatusInactive == iContextStatus || |
1332 RPacketContext::EStatusDeleted == iContextStatus ) |
1337 RPacketContext::EStatusDeleted == iContextStatus ) |
1333 { |
1338 { |
1362 // --------------------------------------------------------------------------- |
1367 // --------------------------------------------------------------------------- |
1363 // |
1368 // |
1364 TInt CMmPacketContextTsy::SetConfigL( |
1369 TInt CMmPacketContextTsy::SetConfigL( |
1365 TPacketDataConfigBase* const aConfig ) |
1370 TPacketDataConfigBase* const aConfig ) |
1366 { |
1371 { |
1367 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_SETCONFIGL_1, "TSY: CMmPacketContextTsy::SetConfigL. Context name:%S", iContextName ); |
1372 TFLOGSTRING2( "TSY: CMmPacketContextTsy::SetConfigL. Context name:%S", &iContextName ); |
1368 |
1373 |
1369 // Call SetConfigL |
1374 // Call SetConfigL |
1370 TInt ret = iMmPacketContextGsmWcdmaExt->SetConfigL( aConfig ); |
1375 TInt ret = iMmPacketContextGsmWcdmaExt->SetConfigL( aConfig ); |
1371 |
1376 |
1372 if ( KErrNone == ret ) |
1377 if ( KErrNone == ret ) |
1386 // |
1391 // |
1387 void CMmPacketContextTsy::CompleteSetConfig( |
1392 void CMmPacketContextTsy::CompleteSetConfig( |
1388 const TInt aError, |
1393 const TInt aError, |
1389 TBool aIsAddMediaAuthorizationCalled ) |
1394 TBool aIsAddMediaAuthorizationCalled ) |
1390 { |
1395 { |
1391 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_COMPLETESETCONFIG_1, "TSY: CMmPacketContextTsy::CompleteSetConfig. Error: %d", aError ); |
1396 TFLOGSTRING2( "TSY: CMmPacketContextTsy::CompleteSetConfig. Error: %d", aError ); |
1392 |
1397 |
1393 TTsyReqHandle reqHandle( EMultimodePacketContextReqHandleUnknown ); |
1398 TTsyReqHandle reqHandle( EMultimodePacketContextReqHandleUnknown ); |
1394 //if context exists eg. its name length is bigger than zero |
1399 //if context exists eg. its name length is bigger than zero |
1395 if( 0 == CMmPacketContextTsy::HostCID().Length() ) |
1400 if( 0 == CMmPacketContextTsy::HostCID().Length() ) |
1396 { |
1401 { |
1475 void CMmPacketContextTsy::SetDataVolume( |
1480 void CMmPacketContextTsy::SetDataVolume( |
1476 const TInt /* aResult */, |
1481 const TInt /* aResult */, |
1477 RPacketContext::TDataVolume dataVolume ) |
1482 RPacketContext::TDataVolume dataVolume ) |
1478 { |
1483 { |
1479 |
1484 |
1480 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_SETDATAVOLUME_1, "TSY: CMmPacketContextTsy::SetDataVolume" ); |
1485 TFLOGSTRING( "TSY: CMmPacketContextTsy::SetDataVolume" ); |
1481 |
1486 |
1482 if ( dataVolume.iBytesSent < iDataVolume.iBytesSent ) |
1487 if ( dataVolume.iBytesSent < iDataVolume.iBytesSent ) |
1483 { |
1488 { |
1484 // The value of sent data has turned around the 4 GB |
1489 // The value of sent data has turned around the 4 GB |
1485 iDataVolume.iOverflowCounterSent++; |
1490 iDataVolume.iOverflowCounterSent++; |
1509 RPacketContext::EStatusDeactivating == iContextStatus ) |
1514 RPacketContext::EStatusDeactivating == iContextStatus ) |
1510 { |
1515 { |
1511 iLastErrorCause = aErrorCause; |
1516 iLastErrorCause = aErrorCause; |
1512 } |
1517 } |
1513 |
1518 |
1514 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_SETLASTERRORCAUSE_1, "TSY: CMmPacketContextTsy::SetLastErrorCause. aErrorCause: %d iLastErrorCause:%d", aErrorCause, iLastErrorCause ); |
1519 TFLOGSTRING3( "TSY: CMmPacketContextTsy::SetLastErrorCause. aErrorCause: %d iLastErrorCause:%d", |
|
1520 aErrorCause, iLastErrorCause ); |
1515 |
1521 |
1516 } |
1522 } |
1517 |
1523 |
1518 // --------------------------------------------------------------------------- |
1524 // --------------------------------------------------------------------------- |
1519 // CMmPacketContextTsy::ContextStatus |
1525 // CMmPacketContextTsy::ContextStatus |
1532 // (other items were commented in a header). |
1538 // (other items were commented in a header). |
1533 // --------------------------------------------------------------------------- |
1539 // --------------------------------------------------------------------------- |
1534 // |
1540 // |
1535 void CMmPacketContextTsy::ContextSuspended() |
1541 void CMmPacketContextTsy::ContextSuspended() |
1536 { |
1542 { |
1537 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_CONTEXTSUSPENDED_1, "TSY: CMmPacketContextTsy::ContextSuspended. Context status before suspending: %d",iContextStatus ); |
1543 TFLOGSTRING2( "TSY: CMmPacketContextTsy::ContextSuspended. Context status before suspending: %d", |
|
1544 iContextStatus ); |
1538 |
1545 |
1539 if ( ( RPacketContext::EStatusActivating == iContextStatus ) || |
1546 if ( ( RPacketContext::EStatusActivating == iContextStatus ) || |
1540 ( RPacketContext::EStatusActive == iContextStatus ) || |
1547 ( RPacketContext::EStatusActive == iContextStatus ) || |
1541 ( RPacketContext::EStatusDeactivating == iContextStatus ) ) |
1548 ( RPacketContext::EStatusDeactivating == iContextStatus ) ) |
1542 { |
1549 { |
1560 iContextStatusBeforeSuspending ); |
1567 iContextStatusBeforeSuspending ); |
1561 } |
1568 } |
1562 |
1569 |
1563 iContextStatusBeforeSuspending = RPacketContext::EStatusUnknown; |
1570 iContextStatusBeforeSuspending = RPacketContext::EStatusUnknown; |
1564 |
1571 |
1565 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_CONTEXTRESUMED_1, "TSY: CMmPacketContextTsy::ContextResumed. Context status when resumed: %d",iContextStatus ); |
1572 TFLOGSTRING2( "TSY: CMmPacketContextTsy::ContextResumed. Context status when resumed: %d", |
|
1573 iContextStatus ); |
1566 |
1574 |
1567 } |
1575 } |
1568 |
1576 |
1569 // --------------------------------------------------------------------------- |
1577 // --------------------------------------------------------------------------- |
1570 // CMmPacketContextTsy::PacketContextGsmWcdmaExt |
1578 // CMmPacketContextTsy::PacketContextGsmWcdmaExt |
1594 // (other items were commented in a header). |
1602 // (other items were commented in a header). |
1595 // --------------------------------------------------------------------------- |
1603 // --------------------------------------------------------------------------- |
1596 // |
1604 // |
1597 void CMmPacketContextTsy::RemoveQoS() |
1605 void CMmPacketContextTsy::RemoveQoS() |
1598 { |
1606 { |
1599 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_REMOVEQOS_1, "TSY: CMmPacketContextTsy::RemoveQoS." ); |
1607 TFLOGSTRING( "TSY: CMmPacketContextTsy::RemoveQoS." ); |
1600 |
1608 |
1601 iQoSProfile = NULL; |
1609 iQoSProfile = NULL; |
1602 iQoSProfileName.Zero(); |
1610 iQoSProfileName.Zero(); |
1603 } |
1611 } |
1604 |
1612 |
1610 // |
1618 // |
1611 void CMmPacketContextTsy::ReqCompleted( |
1619 void CMmPacketContextTsy::ReqCompleted( |
1612 const TTsyReqHandle aTsyReqHandle, |
1620 const TTsyReqHandle aTsyReqHandle, |
1613 const TInt aError ) |
1621 const TInt aError ) |
1614 { |
1622 { |
1615 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_REQCOMPLETED_1, "TSY: CMmPacketContextTsy::ReqCompleted. Handle:%d Error:%d", aTsyReqHandle, aError ); |
1623 TFLOGSTRING3( "TSY: CMmPacketContextTsy::ReqCompleted. Handle:%d Error:%d", |
|
1624 aTsyReqHandle, aError ); |
1616 |
1625 |
1617 // Set last error cause |
1626 // Set last error cause |
1618 if ( KErrNone != aError ) |
1627 if ( KErrNone != aError ) |
1619 { |
1628 { |
1620 iLastErrorCause = aError; |
1629 iLastErrorCause = aError; |
1776 // --------------------------------------------------------------------------- |
1785 // --------------------------------------------------------------------------- |
1777 // |
1786 // |
1778 void CMmPacketContextTsy::ResetDialUpContext() |
1787 void CMmPacketContextTsy::ResetDialUpContext() |
1779 { |
1788 { |
1780 |
1789 |
1781 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_RESETDIALUPCONTEXT_1, "TSY: CMmPacketContextTsy::ResetDialUpContext." ); |
1790 TFLOGSTRING( "TSY: CMmPacketContextTsy::ResetDialUpContext." ); |
1782 |
1791 |
1783 iDataVolume.iOverflowCounterSent = 0; |
1792 iDataVolume.iOverflowCounterSent = 0; |
1784 iDataVolume.iBytesSent = 0; |
1793 iDataVolume.iBytesSent = 0; |
1785 iDataVolume.iOverflowCounterReceived = 0; |
1794 iDataVolume.iOverflowCounterReceived = 0; |
1786 iDataVolume.iBytesReceived = 0; |
1795 iDataVolume.iBytesReceived = 0; |
1812 // |
1821 // |
1813 TInt CMmPacketContextTsy::AddPacketFilterL( |
1822 TInt CMmPacketContextTsy::AddPacketFilterL( |
1814 const TTsyReqHandle aTsyReqHandle, |
1823 const TTsyReqHandle aTsyReqHandle, |
1815 TDes8* const aPacketFilter ) |
1824 TDes8* const aPacketFilter ) |
1816 { |
1825 { |
1817 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_ADDPACKETFILTERL_1, "TSY: CMmPacketContextTsy::AddPacketFilterL. Context name:%S", iContextName ); |
1826 TFLOGSTRING2( "TSY: CMmPacketContextTsy::AddPacketFilterL. Context name:%S", &iContextName ); |
1818 |
1827 |
1819 TInt ret( KErrGeneral ); |
1828 TInt ret( KErrGeneral ); |
1820 |
1829 |
1821 if ( (0 < iHostCID.Length()) && (aPacketFilter->Length() > 0) ) |
1830 if ( (0 < iHostCID.Length()) && (aPacketFilter->Length() > 0) ) |
1822 { |
1831 { |
1854 #ifndef USING_CTSY_DISPATCHER |
1863 #ifndef USING_CTSY_DISPATCHER |
1855 TInt CMmPacketContextTsy::RemovePacketFilter( |
1864 TInt CMmPacketContextTsy::RemovePacketFilter( |
1856 const TTsyReqHandle aTsyReqHandle, |
1865 const TTsyReqHandle aTsyReqHandle, |
1857 TInt *aID ) |
1866 TInt *aID ) |
1858 { |
1867 { |
1859 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_REMOVEPACKETFILTER_1, "TSY: CMmPacketContextTsy::RemovePacketFilter. RemovedFilter:%d", *aID ); |
1868 TFLOGSTRING2( "TSY: CMmPacketContextTsy::RemovePacketFilter. RemovedFilter:%d", *aID ); |
1860 |
1869 |
1861 TInt ret( KErrArgument ); |
1870 TInt ret( KErrArgument ); |
1862 |
1871 |
1863 // id must be value from 1 to 8 |
1872 // id must be value from 1 to 8 |
1864 if ( 0 < *aID && 8 >= *aID ) |
1873 if ( 0 < *aID && 8 >= *aID ) |
1879 // (other items were commented in a header). |
1888 // (other items were commented in a header). |
1880 // --------------------------------------------------------------------------- |
1889 // --------------------------------------------------------------------------- |
1881 // |
1890 // |
1882 TInt CMmPacketContextTsy::ModifyActiveContextL() |
1891 TInt CMmPacketContextTsy::ModifyActiveContextL() |
1883 { |
1892 { |
1884 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_MODIFYACTIVECONTEXTL_1, "TSY: CMmPacketContextTsy::ModifyActiveContextL. Context name:%S", iContextName ); |
1893 TFLOGSTRING2( "TSY: CMmPacketContextTsy::ModifyActiveContextL. Context name:%S", &iContextName ); |
1885 |
1894 |
1886 TInt ret( KErrNotReady ); |
1895 TInt ret( KErrNotReady ); |
1887 |
1896 |
1888 if ( RPacketContext::EStatusUnknown != ContextStatus() && |
1897 if ( RPacketContext::EStatusUnknown != ContextStatus() && |
1889 RPacketContext::EStatusInactive != ContextStatus() && |
1898 RPacketContext::EStatusInactive != ContextStatus() && |
1908 // --------------------------------------------------------------------------- |
1917 // --------------------------------------------------------------------------- |
1909 // |
1918 // |
1910 void CMmPacketContextTsy::CompleteModifyActiveContext( |
1919 void CMmPacketContextTsy::CompleteModifyActiveContext( |
1911 const TInt aResult ) |
1920 const TInt aResult ) |
1912 { |
1921 { |
1913 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_COMPLETEMODIFYACTIVECONTEXT_1, "TSY: CMmPacketContextTsy::CompleteModifyActiveContext. Context name:%S", iContextName ); |
1922 TFLOGSTRING2( "TSY: CMmPacketContextTsy::CompleteModifyActiveContext. Context name:%S", &iContextName ); |
1914 |
1923 |
1915 TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( |
1924 TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( |
1916 EMultimodePacketContextModifyActiveContext ); |
1925 EMultimodePacketContextModifyActiveContext ); |
1917 |
1926 |
1918 if ( EMultimodePacketContextReqHandleUnknown != reqHandle ) |
1927 if ( EMultimodePacketContextReqHandleUnknown != reqHandle ) |
2107 // |
2116 // |
2108 TInt CMmPacketContextTsy::GetConnectionInfo( |
2117 TInt CMmPacketContextTsy::GetConnectionInfo( |
2109 const TTsyReqHandle aTsyReqHandle, |
2118 const TTsyReqHandle aTsyReqHandle, |
2110 TConnectionInfoBase* const aInfo ) |
2119 TConnectionInfoBase* const aInfo ) |
2111 { |
2120 { |
2112 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_GETCONNECTIONINFO_1, "TSY: CMmPacketContextTsy::GetConnectionInfo. Context name:%S", iContextName ); |
2121 TFLOGSTRING2( "TSY: CMmPacketContextTsy::GetConnectionInfo. Context name:%S", &iContextName ); |
2113 |
2122 |
2114 // Get config |
2123 // Get config |
2115 TInt ret = FillConnectionInfo( aInfo ); |
2124 TInt ret = FillConnectionInfo( aInfo ); |
2116 |
2125 |
2117 // Complete Request |
2126 // Complete Request |
2127 // --------------------------------------------------------------------------- |
2136 // --------------------------------------------------------------------------- |
2128 // |
2137 // |
2129 TInt CMmPacketContextTsy::NotifyConnectionInfoChange( |
2138 TInt CMmPacketContextTsy::NotifyConnectionInfoChange( |
2130 TConnectionInfoBase* const aInfo ) |
2139 TConnectionInfoBase* const aInfo ) |
2131 { |
2140 { |
2132 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_NOTIFYCONNECTIONINFOCHANGE_1, "TSY: CMmPacketContextTsy::NotifyConnectionInfoChange." ); |
2141 TFLOGSTRING( "TSY: CMmPacketContextTsy::NotifyConnectionInfoChange." ); |
2133 |
2142 |
2134 // Store pointer |
2143 // Store pointer |
2135 iRetNotifyConnectionInfo = aInfo; |
2144 iRetNotifyConnectionInfo = aInfo; |
2136 // Store req handle type |
2145 // Store req handle type |
2137 iReqHandleType = EMultimodePacketContextNotifyConnectionInfoChange; |
2146 iReqHandleType = EMultimodePacketContextNotifyConnectionInfoChange; |
2146 // --------------------------------------------------------------------------- |
2155 // --------------------------------------------------------------------------- |
2147 // |
2156 // |
2148 void CMmPacketContextTsy::CompleteNotifyConnectionInfoChange( |
2157 void CMmPacketContextTsy::CompleteNotifyConnectionInfoChange( |
2149 TConnectionInfoBase* const aInfo ) |
2158 TConnectionInfoBase* const aInfo ) |
2150 { |
2159 { |
2151 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_COMPLETENOTIFYCONNECTIONINFOCHANGE_1, "TSY: CMmPacketContextTsy::CompleteNotifyConnectionInfoChange." ); |
2160 TFLOGSTRING( "TSY: CMmPacketContextTsy::CompleteNotifyConnectionInfoChange." ); |
2152 |
2161 |
2153 if ( NULL != aInfo && |
2162 if ( NULL != aInfo && |
2154 TConnectionInfoBase::KConnectionInfoV1 == aInfo->ExtensionId() ) |
2163 TConnectionInfoBase::KConnectionInfoV1 == aInfo->ExtensionId() ) |
2155 { |
2164 { |
2156 RPacketContext::TConnectionInfoV1 connectionInfoV1; |
2165 RPacketContext::TConnectionInfoV1 connectionInfoV1; |
2195 // --------------------------------------------------------------------------- |
2204 // --------------------------------------------------------------------------- |
2196 // |
2205 // |
2197 TInt CMmPacketContextTsy::FillConnectionInfo( |
2206 TInt CMmPacketContextTsy::FillConnectionInfo( |
2198 TConnectionInfoBase* const aInfo ) |
2207 TConnectionInfoBase* const aInfo ) |
2199 { |
2208 { |
2200 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_FILLCONNECTIONINFO_1, "TSY: CMmPacketContextTsy::FillConnectionInfo" ); |
2209 TFLOGSTRING( "TSY: CMmPacketContextTsy::FillConnectionInfo" ); |
2201 |
2210 |
2202 TInt ret = KErrNone; |
2211 TInt ret = KErrNone; |
2203 |
2212 |
2204 if ( NULL != aInfo && |
2213 if ( NULL != aInfo && |
2205 TConnectionInfoBase::KConnectionInfoV1 == aInfo->ExtensionId() ) |
2214 TConnectionInfoBase::KConnectionInfoV1 == aInfo->ExtensionId() ) |