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