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 "cmmsmsstoragetsyTraces.h" |
|
23 #endif |
|
24 |
19 #include <etelmm.h> |
25 #include <etelmm.h> |
20 #include "cmmsmsstoragetsy.h" |
26 #include "cmmsmsstoragetsy.h" |
21 #include "cmmphonetsy.h" |
27 #include "cmmphonetsy.h" |
22 #include "cmmsmstsy.h" |
28 #include "cmmsmstsy.h" |
23 #include "cmmsmsextinterface.h" |
29 #include "cmmsmsextinterface.h" |
24 #include "MmTsy_numberOfSlots.h" |
30 #include "MmTsy_numberOfSlots.h" |
25 #include <ctsy/pluginapi/cmmdatapackage.h> |
31 #include <ctsy/pluginapi/cmmdatapackage.h> |
26 #include <ctsy/tflogger.h> |
|
27 |
32 |
28 // ======== MEMBER FUNCTIONS ======== |
33 // ======== MEMBER FUNCTIONS ======== |
29 |
34 |
30 CMmSmsStorageTsy::CMmSmsStorageTsy(): |
35 CMmSmsStorageTsy::CMmSmsStorageTsy(): |
31 iReqHandleType(CMmSmsTsy::EMultimodeSmsReqHandleUnknown) |
36 iReqHandleType(CMmSmsTsy::EMultimodeSmsReqHandleUnknown) |
32 { |
37 { |
33 } |
38 } |
34 |
39 |
35 void CMmSmsStorageTsy::ConstructL() |
40 void CMmSmsStorageTsy::ConstructL() |
36 { |
41 { |
37 TFLOGSTRING("TSY: CMmSmsStorageTsy::ConstructL\n"); |
42 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_CONSTRUCTL_1, "TSY: CMmSmsStorageTsy::ConstructL\n"); |
38 ResetVariables(); |
43 ResetVariables(); |
39 |
44 |
40 iSmsListArray = new ( ELeave ) CArrayPtrFlat<TSmsMsg>( 1 ); |
45 iSmsListArray = new ( ELeave ) CArrayPtrFlat<TSmsMsg>( 1 ); |
41 iSmsReadAllArray = new ( ELeave ) CArrayPtrFlat<CListReadAllAttempt>( 1 ); |
46 iSmsReadAllArray = new ( ELeave ) CArrayPtrFlat<CListReadAllAttempt>( 1 ); |
42 |
47 |
63 return subsession; |
68 return subsession; |
64 } |
69 } |
65 |
70 |
66 CMmSmsStorageTsy::~CMmSmsStorageTsy() |
71 CMmSmsStorageTsy::~CMmSmsStorageTsy() |
67 { |
72 { |
68 TFLOGSTRING("TSY: CMmSmsStorageTsy::~CMmSmsStorageTsy"); |
73 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_DTOR_1, "TSY: CMmSmsStorageTsy::~CMmSmsStorageTsy"); |
69 if ( iMmPhone ) |
74 if ( iMmPhone ) |
70 { |
75 { |
71 // deregister tsy object from message manager |
76 // deregister tsy object from message manager |
72 iMmPhone->MessageManager()->DeregisterTsyObject(this); |
77 iMmPhone->MessageManager()->DeregisterTsyObject(this); |
73 } |
78 } |
76 { |
81 { |
77 delete iSmsListArray; |
82 delete iSmsListArray; |
78 } |
83 } |
79 iSmsListArray = NULL; |
84 iSmsListArray = NULL; |
80 |
85 |
81 iSmsReadAllArray->ResetAndDestroy(); |
|
82 if ( iSmsReadAllArray ) |
86 if ( iSmsReadAllArray ) |
83 { |
87 { |
|
88 iSmsReadAllArray->ResetAndDestroy(); |
84 delete iSmsReadAllArray; |
89 delete iSmsReadAllArray; |
85 } |
90 } |
86 iSmsReadAllArray = NULL; |
91 iSmsReadAllArray = NULL; |
87 |
92 |
88 // Set pointers to NULL |
93 // Set pointers to NULL |
108 // (other items were commented in a header). |
113 // (other items were commented in a header). |
109 // --------------------------------------------------------------------------- |
114 // --------------------------------------------------------------------------- |
110 // |
115 // |
111 void CMmSmsStorageTsy::Init() |
116 void CMmSmsStorageTsy::Init() |
112 { |
117 { |
113 TFLOGSTRING("TSY: CMmSmsStorageTsy::Init."); |
118 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_INIT_1, "TSY: CMmSmsStorageTsy::Init."); |
114 // Send request to the Domestic OS layer. |
119 // Send request to the Domestic OS layer. |
115 TRAP_IGNORE( iMmPhone->MessageManager()->HandleRequestL( |
120 TRAP_IGNORE( iMmPhone->MessageManager()->HandleRequestL( |
116 EMobilePhoneStoreGetInfo ); ); |
121 EMobilePhoneStoreGetInfo ); ); |
117 } |
122 } |
118 |
123 |
642 // |
647 // |
643 void CMmSmsStorageTsy::CompleteReadSms( |
648 void CMmSmsStorageTsy::CompleteReadSms( |
644 TInt aResult, |
649 TInt aResult, |
645 CMmDataPackage* aDataPackage ) |
650 CMmDataPackage* aDataPackage ) |
646 { |
651 { |
647 TFLOGSTRING2("TSY: CMmSmsStorageTsy::CompleteReadSms. Error: %d",aResult); |
652 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_COMPLETEREADSMS_1, "TSY: CMmSmsStorageTsy::CompleteReadSms. Error: %d",aResult); |
648 TTsyReqHandle reqHandle = iMmTsyReqHandleStore->ResetTsyReqHandle( |
653 TTsyReqHandle reqHandle = iMmTsyReqHandleStore->ResetTsyReqHandle( |
649 CMmSmsTsy::EMultimodeSimStSmsReadSms ); |
654 CMmSmsTsy::EMultimodeSimStSmsReadSms ); |
650 |
655 |
651 if ( reqHandle ) |
656 if ( reqHandle ) |
652 { |
657 { |
674 TTsyReqHandle writeSmsHandle = iMmTsyReqHandleStore->GetTsyReqHandle( |
679 TTsyReqHandle writeSmsHandle = iMmTsyReqHandleStore->GetTsyReqHandle( |
675 CMmSmsTsy::EMultimodeSimStSmsWriteSms ); |
680 CMmSmsTsy::EMultimodeSimStSmsWriteSms ); |
676 |
681 |
677 if ( sizeof( RMobilePhoneStore::TMobilePhoneStoreEntryV1 ) > aSmsPckg->Length() ) |
682 if ( sizeof( RMobilePhoneStore::TMobilePhoneStoreEntryV1 ) > aSmsPckg->Length() ) |
678 { |
683 { |
679 TFLOGSTRING ("TSY: CMmSmsStorageTsy::WriteSms bad size argument"); |
684 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_WRITESMSL_1, "TSY: CMmSmsStorageTsy::WriteSms bad size argument"); |
680 // Complete the request with appropiate error |
685 // Complete the request with appropiate error |
681 return KErrArgument; |
686 return KErrArgument; |
682 } |
687 } |
683 |
688 |
684 if ( CMmSmsTsy::EMultimodeSmsReqHandleUnknown < writeSmsHandle ) |
689 if ( CMmSmsTsy::EMultimodeSmsReqHandleUnknown < writeSmsHandle ) |
729 // |
734 // |
730 void CMmSmsStorageTsy::CompleteWriteSms( |
735 void CMmSmsStorageTsy::CompleteWriteSms( |
731 TInt aResult, |
736 TInt aResult, |
732 CMmDataPackage* aDataPackage ) |
737 CMmDataPackage* aDataPackage ) |
733 { |
738 { |
734 TFLOGSTRING2("TSY: CMmSmsStorageTsy::CompleteWriteSms. Error: %d",aResult); |
739 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_COMPLETEWRITESMS_1, "TSY: CMmSmsStorageTsy::CompleteWriteSms. Error: %d",aResult); |
735 TTsyReqHandle reqHandle = iMmTsyReqHandleStore->ResetTsyReqHandle( |
740 TTsyReqHandle reqHandle = iMmTsyReqHandleStore->ResetTsyReqHandle( |
736 CMmSmsTsy::EMultimodeSimStSmsWriteSms ); |
741 CMmSmsTsy::EMultimodeSimStSmsWriteSms ); |
737 |
742 |
738 if ( reqHandle ) |
743 if ( reqHandle ) |
739 { |
744 { |
825 // --------------------------------------------------------------------------- |
830 // --------------------------------------------------------------------------- |
826 // |
831 // |
827 void CMmSmsStorageTsy::CompleteDeleteSms( |
832 void CMmSmsStorageTsy::CompleteDeleteSms( |
828 TInt aResult ) |
833 TInt aResult ) |
829 { |
834 { |
830 TFLOGSTRING2("TSY: CMmSmsStorageTsy::CompleteDeleteSms. Error: %d", aResult); |
835 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_COMPLETEDELETESMS_1, "TSY: CMmSmsStorageTsy::CompleteDeleteSms. Error: %d", aResult); |
831 TTsyReqHandle reqHandle = iMmTsyReqHandleStore->ResetTsyReqHandle( |
836 TTsyReqHandle reqHandle = iMmTsyReqHandleStore->ResetTsyReqHandle( |
832 CMmSmsTsy::EMultimodeSimStSmsEraseSms ); |
837 CMmSmsTsy::EMultimodeSimStSmsEraseSms ); |
833 |
838 |
834 if ( reqHandle ) |
839 if ( reqHandle ) |
835 { |
840 { |
892 // --------------------------------------------------------------------------- |
897 // --------------------------------------------------------------------------- |
893 // |
898 // |
894 void CMmSmsStorageTsy::CompleteDeleteAllSms( |
899 void CMmSmsStorageTsy::CompleteDeleteAllSms( |
895 TInt aResult ) |
900 TInt aResult ) |
896 { |
901 { |
897 TFLOGSTRING2( "TSY: CMmSmsStorageTsy::CompleteDeleteAllSms. Error: %d", aResult ); |
902 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_COMPLETEDELETEALLSMS_1, "TSY: CMmSmsStorageTsy::CompleteDeleteAllSms. Error: %d", aResult ); |
898 TTsyReqHandle reqHandle = iMmTsyReqHandleStore->ResetTsyReqHandle( |
903 TTsyReqHandle reqHandle = iMmTsyReqHandleStore->ResetTsyReqHandle( |
899 CMmSmsTsy::EMultimodeSimStSmsEraseAllSms ); |
904 CMmSmsTsy::EMultimodeSimStSmsEraseAllSms ); |
900 |
905 |
901 if ( reqHandle ) |
906 if ( reqHandle ) |
902 { |
907 { |
958 // if new entry has been added to Store, get correct notification |
963 // if new entry has been added to Store, get correct notification |
959 if ( RMobilePhoneStore::KStoreEntryAdded == aEvent ) |
964 if ( RMobilePhoneStore::KStoreEntryAdded == aEvent ) |
960 { |
965 { |
961 // if store has space, get "StoreAdded" notifications |
966 // if store has space, get "StoreAdded" notifications |
962 iUsedEntries++; |
967 iUsedEntries++; |
963 TFLOGSTRING("TSY: CMmSmsStorageTsy::StoreEntryAdded notifications"); |
968 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_COMPLETENOTIFYSTOREEVENT_1, "TSY: CMmSmsStorageTsy::StoreEntryAdded notifications"); |
964 if ( iUsedEntries == iTotalEntries ) |
969 if ( iUsedEntries == iTotalEntries ) |
965 { |
970 { |
966 // if store gets full after class2 message, get "StoreAdded and |
971 // if store gets full after class2 message, get "StoreAdded and |
967 // StoreFull" notifications |
972 // StoreFull" notifications |
968 TFLOGSTRING("TSY: CMmSmsStorageTsy::StoreEntryAdded and StoreFull notifications"); |
973 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_COMPLETENOTIFYSTOREEVENT_2, "TSY: CMmSmsStorageTsy::StoreEntryAdded and StoreFull notifications"); |
969 aEvent = ( RMobilePhoneStore::KStoreFull | |
974 aEvent = ( RMobilePhoneStore::KStoreFull | |
970 RMobilePhoneStore::KStoreEntryAdded ); |
975 RMobilePhoneStore::KStoreEntryAdded ); |
971 } |
976 } |
972 } |
977 } |
973 // if one or more entry has been deleted from store, get correct |
978 // if one or more entry has been deleted from store, get correct |
975 if ( RMobilePhoneStore::KStoreEntryDeleted == aEvent ) |
980 if ( RMobilePhoneStore::KStoreEntryDeleted == aEvent ) |
976 { |
981 { |
977 // if entry has been deleted from store, get "EntryDeleted" |
982 // if entry has been deleted from store, get "EntryDeleted" |
978 // notification |
983 // notification |
979 iUsedEntries--; |
984 iUsedEntries--; |
980 TFLOGSTRING("TSY: CMmSmsStorageTsy::StoreEntryDeleted notifications"); |
985 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_COMPLETENOTIFYSTOREEVENT_3, "TSY: CMmSmsStorageTsy::StoreEntryDeleted notifications"); |
981 if ( (iUsedEntries+1) == iTotalEntries ) |
986 if ( (iUsedEntries+1) == iTotalEntries ) |
982 { |
987 { |
983 // if store has been full, after deleting get notifications |
988 // if store has been full, after deleting get notifications |
984 // "EntryDeleted" and "StoreHasSpace" |
989 // "EntryDeleted" and "StoreHasSpace" |
985 TFLOGSTRING("TSY: CMmSmsStorageTsy::StoreEntryDeleted and StoreHasSpace notifications"); |
990 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_COMPLETENOTIFYSTOREEVENT_4, "TSY: CMmSmsStorageTsy::StoreEntryDeleted and StoreHasSpace notifications"); |
986 aEvent = ( RMobilePhoneStore::KStoreHasSpace | |
991 aEvent = ( RMobilePhoneStore::KStoreHasSpace | |
987 RMobilePhoneStore::KStoreEntryDeleted ); |
992 RMobilePhoneStore::KStoreEntryDeleted ); |
988 } |
993 } |
989 if ( 0 == iUsedEntries ) |
994 if ( 0 == iUsedEntries ) |
990 { |
995 { |
1002 iNotifySmsStoreEventPtr ); |
1007 iNotifySmsStoreEventPtr ); |
1003 |
1008 |
1004 *smsStoreEvent = aEvent; |
1009 *smsStoreEvent = aEvent; |
1005 *iNotifySmsStoreEventIndexPtr = aLocation; |
1010 *iNotifySmsStoreEventIndexPtr = aLocation; |
1006 |
1011 |
1007 TFLOGSTRING3("TSY: CMmSmsStorageTsy::CompleteNotifyStoreEvent:notified client about event=0x%x, location=%d", aEvent, aLocation ); |
1012 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_COMPLETENOTIFYSTOREEVENT_5, "TSY: CMmSmsStorageTsy::CompleteNotifyStoreEvent:notified client about event=0x%08x, location=%d", (TUint)aEvent, aLocation ); |
1008 ReqCompleted( reqHandle, KErrNone ); |
1013 ReqCompleted( reqHandle, KErrNone ); |
1009 } |
1014 } |
1010 } |
1015 } |
1011 |
1016 |
1012 // --------------------------------------------------------------------------- |
1017 // --------------------------------------------------------------------------- |
1021 TInt CMmSmsStorageTsy::ReadAllSmsPhase1L( |
1026 TInt CMmSmsStorageTsy::ReadAllSmsPhase1L( |
1022 const TTsyReqHandle aTsyReqHandle, |
1027 const TTsyReqHandle aTsyReqHandle, |
1023 CRetrieveMobilePhoneSmsList::TBatchRequestData const* aRequest, |
1028 CRetrieveMobilePhoneSmsList::TBatchRequestData const* aRequest, |
1024 TInt* aBufSize ) |
1029 TInt* aBufSize ) |
1025 { |
1030 { |
1026 TFLOGSTRING("TSY: CMmSmsStorageTsy::ReadAllSmsPhase1L"); |
1031 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_READALLSMSPHASE1L_1, "TSY: CMmSmsStorageTsy::ReadAllSmsPhase1L"); |
1027 TInt ret( KErrNone ); |
1032 TInt ret( KErrNone ); |
1028 |
1033 |
1029 TTsyReqHandle readAllSmsHandle = iMmTsyReqHandleStore->GetTsyReqHandle( |
1034 TTsyReqHandle readAllSmsHandle = iMmTsyReqHandleStore->GetTsyReqHandle( |
1030 CMmSmsTsy::EMultimodeSimStSmsReadAllSms ); |
1035 CMmSmsTsy::EMultimodeSimStSmsReadAllSms ); |
1031 |
1036 |
1043 // entries. This feature is not supported. |
1048 // entries. This feature is not supported. |
1044 ReqCompleted( aTsyReqHandle, KErrNotSupported ); |
1049 ReqCompleted( aTsyReqHandle, KErrNotSupported ); |
1045 } |
1050 } |
1046 else |
1051 else |
1047 { |
1052 { |
1048 TFLOGSTRING("TSY: CMmSmsStorageTsy::ReadAllSmsPhase1. SMS reading starts."); |
1053 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_READALLSMSPHASE1L_2, "TSY: CMmSmsStorageTsy::ReadAllSmsPhase1. SMS reading starts."); |
1049 // Client is asking for all SMS store entries |
1054 // Client is asking for all SMS store entries |
1050 iReadAllBufSizePtr = aBufSize; |
1055 iReadAllBufSizePtr = aBufSize; |
1051 iReadAllId = aRequest->iClient; |
1056 iReadAllId = aRequest->iClient; |
1052 |
1057 |
1053 // Lets reset the array |
1058 // Lets reset the array |
1070 ret = iMmPhone->MessageManager()->HandleRequestL( |
1075 ret = iMmPhone->MessageManager()->HandleRequestL( |
1071 EMobilePhoneStoreReadAllPhase1 ); |
1076 EMobilePhoneStoreReadAllPhase1 ); |
1072 |
1077 |
1073 if ( KErrNone != ret ) |
1078 if ( KErrNone != ret ) |
1074 { |
1079 { |
1075 TFLOGSTRING2("TSY: CMmSmsStorageTsy::ReadAllSmsPhase1L - and the returned value for EMobilePhoneStoreReadAllPhase1:%d", ret); |
1080 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_READALLSMSPHASE1L_3, "TSY: CMmSmsStorageTsy::ReadAllSmsPhase1L - and the returned value for EMobilePhoneStoreReadAllPhase1:%d", ret); |
1076 (void)iMmTsyReqHandleStore->ResetTsyReqHandle( CMmSmsTsy::EMultimodeSimStSmsReadAllSms ); |
1081 (void)iMmTsyReqHandleStore->ResetTsyReqHandle( CMmSmsTsy::EMultimodeSimStSmsReadAllSms ); |
1077 // the returned value from ResetTsyReqHandle is not needed. |
1082 // the returned value from ResetTsyReqHandle is not needed. |
1078 } |
1083 } |
1079 } |
1084 } |
1080 // SMS Storage contains 0 messages |
1085 // SMS Storage contains 0 messages |
1084 } |
1089 } |
1085 |
1090 |
1086 // DOS layer returned with error |
1091 // DOS layer returned with error |
1087 if ( ret != KErrNone ) |
1092 if ( ret != KErrNone ) |
1088 { |
1093 { |
1089 TFLOGSTRING3("TSY: CMmSmsStorageTsy::ReadAllSmsPhase1L aTsyReqHandle: %d and ret:%d", aTsyReqHandle, ret); |
1094 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_READALLSMSPHASE1L_4, "TSY: CMmSmsStorageTsy::ReadAllSmsPhase1L aTsyReqHandle: %u and ret:%d", (TUint)aTsyReqHandle, ret); |
1090 ReqCompleted( aTsyReqHandle, ret ); |
1095 ReqCompleted( aTsyReqHandle, ret ); |
1091 } |
1096 } |
1092 |
1097 |
1093 } |
1098 } |
1094 |
1099 |
1104 TInt CMmSmsStorageTsy::ReadAllSmsPhase2( |
1109 TInt CMmSmsStorageTsy::ReadAllSmsPhase2( |
1105 const TTsyReqHandle aTsyReqHandle, |
1110 const TTsyReqHandle aTsyReqHandle, |
1106 RMobilePhone::TClientId const* aId, |
1111 RMobilePhone::TClientId const* aId, |
1107 TDes8* aBuffer ) |
1112 TDes8* aBuffer ) |
1108 { |
1113 { |
1109 TFLOGSTRING("TSY: CMmSmsStorageTsy::ReadAllSmsPhase2"); |
1114 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_READALLSMSPHASE2_1, "TSY: CMmSmsStorageTsy::ReadAllSmsPhase2"); |
1110 CListReadAllAttempt* read = NULL; |
1115 CListReadAllAttempt* read = NULL; |
1111 |
1116 |
1112 // Find the read attempt from this client |
1117 // Find the read attempt from this client |
1113 for ( TInt i = 0 ; i < iSmsReadAllArray->Count() ; ++i ) |
1118 for ( TInt i = 0 ; i < iSmsReadAllArray->Count() ; ++i ) |
1114 { |
1119 { |
1141 // --------------------------------------------------------------------------- |
1146 // --------------------------------------------------------------------------- |
1142 // |
1147 // |
1143 TInt CMmSmsStorageTsy::ReadAllSmsCancel( |
1148 TInt CMmSmsStorageTsy::ReadAllSmsCancel( |
1144 const TTsyReqHandle aTsyReqHandle ) |
1149 const TTsyReqHandle aTsyReqHandle ) |
1145 { |
1150 { |
1146 TFLOGSTRING("TSY: CMmSmsStorageTsy::ReadAllSmsCancel"); |
1151 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_READALLSMSCANCEL_1, "TSY: CMmSmsStorageTsy::ReadAllSmsCancel"); |
1147 iMmTsyReqHandleStore->ResetTsyReqHandle( |
1152 iMmTsyReqHandleStore->ResetTsyReqHandle( |
1148 CMmSmsTsy::EMultimodeSimStSmsReadAllSms ); |
1153 CMmSmsTsy::EMultimodeSimStSmsReadAllSms ); |
1149 |
1154 |
1150 iSmsListArray->Reset(); |
1155 iSmsListArray->Reset(); |
1151 iSmsReadAllArray->ResetAndDestroy(); |
1156 iSmsReadAllArray->ResetAndDestroy(); |
1163 // |
1168 // |
1164 void CMmSmsStorageTsy::RetrieveSmsListReadSmsL( |
1169 void CMmSmsStorageTsy::RetrieveSmsListReadSmsL( |
1165 TInt aResult, |
1170 TInt aResult, |
1166 CMmDataPackage* aDataPackage ) |
1171 CMmDataPackage* aDataPackage ) |
1167 { |
1172 { |
1168 TFLOGSTRING("TSY: CMmSmsStorageTsy::RetrieveSmsListReadSmsL"); |
1173 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_RETRIEVESMSLISTREADSMSL_1, "TSY: CMmSmsStorageTsy::RetrieveSmsListReadSmsL"); |
1169 |
1174 |
1170 TTsyReqHandle reqHandle = iMmTsyReqHandleStore->GetTsyReqHandle( |
1175 TTsyReqHandle reqHandle = iMmTsyReqHandleStore->GetTsyReqHandle( |
1171 CMmSmsTsy::EMultimodeSimStSmsReadAllSms ); |
1176 CMmSmsTsy::EMultimodeSimStSmsReadAllSms ); |
1172 |
1177 |
1173 // Flag which wil indicates if Class2 SMS has been received while |
1178 // Flag which wil indicates if Class2 SMS has been received while |
1224 // |
1229 // |
1225 void CMmSmsStorageTsy::CompleteReadAllSmsPhase1( |
1230 void CMmSmsStorageTsy::CompleteReadAllSmsPhase1( |
1226 TInt aResult, |
1231 TInt aResult, |
1227 TBool aReceivedClass2ToBeReSent ) |
1232 TBool aReceivedClass2ToBeReSent ) |
1228 { |
1233 { |
1229 TFLOGSTRING2("TSY: CMmSmsStorageTsy::CompleteReadAllSmsPhase1. Complete read first phase error: %d", aResult); |
1234 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_COMPLETEREADALLSMSPHASE1_1, "TSY: CMmSmsStorageTsy::CompleteReadAllSmsPhase1. Complete read first phase error: %d", aResult); |
1230 TTsyReqHandle reqHandle = iMmTsyReqHandleStore->ResetTsyReqHandle( |
1235 TTsyReqHandle reqHandle = iMmTsyReqHandleStore->ResetTsyReqHandle( |
1231 CMmSmsTsy::EMultimodeSimStSmsReadAllSms ); |
1236 CMmSmsTsy::EMultimodeSimStSmsReadAllSms ); |
1232 if ( reqHandle ) |
1237 if ( reqHandle ) |
1233 { |
1238 { |
1234 // Complete first phase of list retrieval |
1239 // Complete first phase of list retrieval |
1235 ReqCompleted( reqHandle, aResult ); |
1240 ReqCompleted( reqHandle, aResult ); |
1236 iSmsListArray->Reset(); |
1241 iSmsListArray->Reset(); |
1237 |
1242 |
1238 TFLOGSTRING2("TSY: CMmSmsStorageTsy::CompleteReadAllSmsPhase1 aReceivedClass2ToBeReSent: %d",aReceivedClass2ToBeReSent); |
1243 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_COMPLETEREADALLSMSPHASE1_2, "TSY: CMmSmsStorageTsy::CompleteReadAllSmsPhase1 aReceivedClass2ToBeReSent: %d",aReceivedClass2ToBeReSent); |
1239 if ( aReceivedClass2ToBeReSent ) |
1244 if ( aReceivedClass2ToBeReSent ) |
1240 { |
1245 { |
1241 // silently IGNORE if call to DOS fails |
1246 // silently IGNORE if call to DOS fails |
1242 TInt trapError = 0; |
1247 TInt trapError = 0; |
1243 TRAP( trapError, iMmPhone->MessageManager()->HandleRequestL( |
1248 TRAP( trapError, iMmPhone->MessageManager()->HandleRequestL( |