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 "cmmsmsgsmextTraces.h" |
|
23 #endif |
|
24 |
|
25 #include <e32std.h> // error values |
19 #include <e32std.h> // error values |
26 #include <mmlist.h> |
20 #include <mmlist.h> |
27 #include "cmmsmsgsmext.h" |
21 #include "cmmsmsgsmext.h" |
|
22 #include <ctsy/tflogger.h> |
28 #include <ctsy/pluginapi/cmmdatapackage.h> |
23 #include <ctsy/pluginapi/cmmdatapackage.h> |
29 #include "cmmphonetsy.h" |
24 #include "cmmphonetsy.h" |
30 #include <ctsy/serviceapi/cmmsmsutility.h> |
25 #include <ctsy/serviceapi/cmmsmsutility.h> |
31 |
26 |
32 // ======== MEMBER FUNCTIONS ======== |
27 // ======== MEMBER FUNCTIONS ======== |
80 // Copy SMS TPDU |
75 // Copy SMS TPDU |
81 aReceiveMessagePduPtr->Copy( aSmsMsg->iSmsMsg ); |
76 aReceiveMessagePduPtr->Copy( aSmsMsg->iSmsMsg ); |
82 |
77 |
83 if ( KSimSmsNotPresent == aSmsMsg->iMessageStatus ) |
78 if ( KSimSmsNotPresent == aSmsMsg->iMessageStatus ) |
84 { |
79 { |
85 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSGSMEXT_COMPLETERECEIVEMESSAGE_1, "TSY: CMmSmsGsmExt::CompleteReceiveMessage. Class 0, 1 or 3 message"); |
80 TFLOGSTRING("TSY: CMmSmsGsmExt::CompleteReceiveMessage. Class 0, 1 or 3 message"); |
86 |
81 |
87 // SMS message that is routed directly to the TSY. This message is not |
82 // SMS message that is routed directly to the TSY. This message is not |
88 // acknowledge to the network. |
83 // acknowledge to the network. |
89 msgAttributes.iStatus = |
84 msgAttributes.iStatus = |
90 RMobileSmsMessaging::EMtMessageUnstoredClientAck; |
85 RMobileSmsMessaging::EMtMessageUnstoredClientAck; |
92 msgAttributes.iStore.SetLength( 0 ); |
87 msgAttributes.iStore.SetLength( 0 ); |
93 msgAttributes.iStoreIndex = 0; |
88 msgAttributes.iStoreIndex = 0; |
94 } |
89 } |
95 else if ( aSmsMsg->iSmsClass2 && ( 0 != aSmsMsg->iLocation ) ) |
90 else if ( aSmsMsg->iSmsClass2 && ( 0 != aSmsMsg->iLocation ) ) |
96 { |
91 { |
97 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSGSMEXT_COMPLETERECEIVEMESSAGE_2, "TSY: CMmSmsGsmExt::CompleteReceiveMessage. Class 2 message stored in SIM"); |
92 TFLOGSTRING("TSY: CMmSmsGsmExt::CompleteReceiveMessage. Class 2 message stored in SIM"); |
98 // Class 2 SMS message that is stored in SIM. This message is |
93 // Class 2 SMS message that is stored in SIM. This message is |
99 // acknowledged to the network by SMS server. |
94 // acknowledged to the network by SMS server. |
100 msgAttributes.iStatus = RMobileSmsMessaging::EMtMessageUnknownStatus; |
95 msgAttributes.iStatus = RMobileSmsMessaging::EMtMessageUnknownStatus; |
101 // Add storage information |
96 // Add storage information |
102 msgAttributes.iFlags |= RMobileSmsMessaging::KStorageLocation; |
97 msgAttributes.iFlags |= RMobileSmsMessaging::KStorageLocation; |
103 msgAttributes.iStore = KETelIccSmsStore; |
98 msgAttributes.iStore = KETelIccSmsStore; |
104 msgAttributes.iStoreIndex = aSmsMsg->iLocation; |
99 msgAttributes.iStoreIndex = aSmsMsg->iLocation; |
105 } |
100 } |
106 else |
101 else |
107 { |
102 { |
108 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSGSMEXT_COMPLETERECEIVEMESSAGE_3, "TSY: CMmSmsGsmExt::CompleteReceiveMessage. Class 2 message not stored in SIM"); |
103 TFLOGSTRING("TSY: CMmSmsGsmExt::CompleteReceiveMessage. Class 2 message not stored in SIM"); |
109 // Class 2 SMS message that is not stored in SIM. This message is |
104 // Class 2 SMS message that is not stored in SIM. This message is |
110 // acknowledged to the network by SMS server. |
105 // acknowledged to the network by SMS server. |
111 msgAttributes.iStatus = |
106 msgAttributes.iStatus = |
112 RMobileSmsMessaging::EMtMessageUnstoredPhoneAck; |
107 RMobileSmsMessaging::EMtMessageUnstoredPhoneAck; |
113 |
108 |
183 CArrayPtrFlat<TSmsMsg>* aSmsListArray, |
178 CArrayPtrFlat<TSmsMsg>* aSmsListArray, |
184 RMobilePhone::TClientId aReadAllId, |
179 RMobilePhone::TClientId aReadAllId, |
185 CArrayPtrFlat<CListReadAllAttempt>* aSmsReadAllArray, |
180 CArrayPtrFlat<CListReadAllAttempt>* aSmsReadAllArray, |
186 TInt* aReadAllBufSizePtr ) |
181 TInt* aReadAllBufSizePtr ) |
187 { |
182 { |
188 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSGSMEXT_COMPLETEREADALLSMSPHASE1L_1, "TSY: CMmSmsGsmExt::CompleteReadAllSmsPhase1L"); |
183 TFLOGSTRING("TSY: CMmSmsGsmExt::CompleteReadAllSmsPhase1L"); |
189 // read the list, store its content and then return size of this |
184 // read the list, store its content and then return size of this |
190 // buffer to client |
185 // buffer to client |
191 CMobilePhoneGsmSmsList* list = CMobilePhoneGsmSmsList::NewL(); |
186 CMobilePhoneGsmSmsList* list = CMobilePhoneGsmSmsList::NewL(); |
192 CleanupStack::PushL( list ); |
187 CleanupStack::PushL( list ); |
193 |
188 |