--- a/telephonyserverplugins/common_tsy/commontsy/src/mmsms/cmmsmsstoragetsy.cpp Tue Aug 31 16:23:08 2010 +0300
+++ b/telephonyserverplugins/common_tsy/commontsy/src/mmsms/cmmsmsstoragetsy.cpp Wed Sep 01 12:40:21 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -16,12 +16,6 @@
// INCLUDE FILES
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "cmmsmsstoragetsyTraces.h"
-#endif
-
#include <etelmm.h>
#include "cmmsmsstoragetsy.h"
#include "cmmphonetsy.h"
@@ -29,6 +23,7 @@
#include "cmmsmsextinterface.h"
#include "MmTsy_numberOfSlots.h"
#include <ctsy/pluginapi/cmmdatapackage.h>
+#include <ctsy/tflogger.h>
// ======== MEMBER FUNCTIONS ========
@@ -39,7 +34,7 @@
void CMmSmsStorageTsy::ConstructL()
{
-OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_CONSTRUCTL_1, "TSY: CMmSmsStorageTsy::ConstructL\n");
+TFLOGSTRING("TSY: CMmSmsStorageTsy::ConstructL\n");
ResetVariables();
iSmsListArray = new ( ELeave ) CArrayPtrFlat<TSmsMsg>( 1 );
@@ -70,7 +65,7 @@
CMmSmsStorageTsy::~CMmSmsStorageTsy()
{
-OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_DTOR_1, "TSY: CMmSmsStorageTsy::~CMmSmsStorageTsy");
+TFLOGSTRING("TSY: CMmSmsStorageTsy::~CMmSmsStorageTsy");
if ( iMmPhone )
{
// deregister tsy object from message manager
@@ -83,9 +78,9 @@
}
iSmsListArray = NULL;
+ iSmsReadAllArray->ResetAndDestroy();
if ( iSmsReadAllArray )
{
- iSmsReadAllArray->ResetAndDestroy();
delete iSmsReadAllArray;
}
iSmsReadAllArray = NULL;
@@ -115,7 +110,7 @@
//
void CMmSmsStorageTsy::Init()
{
-OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_INIT_1, "TSY: CMmSmsStorageTsy::Init.");
+TFLOGSTRING("TSY: CMmSmsStorageTsy::Init.");
// Send request to the Domestic OS layer.
TRAP_IGNORE( iMmPhone->MessageManager()->HandleRequestL(
EMobilePhoneStoreGetInfo ); );
@@ -649,7 +644,7 @@
TInt aResult,
CMmDataPackage* aDataPackage )
{
-OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_COMPLETEREADSMS_1, "TSY: CMmSmsStorageTsy::CompleteReadSms. Error: %d",aResult);
+TFLOGSTRING2("TSY: CMmSmsStorageTsy::CompleteReadSms. Error: %d",aResult);
TTsyReqHandle reqHandle = iMmTsyReqHandleStore->ResetTsyReqHandle(
CMmSmsTsy::EMultimodeSimStSmsReadSms );
@@ -681,7 +676,7 @@
if ( sizeof( RMobilePhoneStore::TMobilePhoneStoreEntryV1 ) > aSmsPckg->Length() )
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_WRITESMSL_1, "TSY: CMmSmsStorageTsy::WriteSms bad size argument");
+ TFLOGSTRING ("TSY: CMmSmsStorageTsy::WriteSms bad size argument");
// Complete the request with appropiate error
return KErrArgument;
}
@@ -736,7 +731,7 @@
TInt aResult,
CMmDataPackage* aDataPackage )
{
-OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_COMPLETEWRITESMS_1, "TSY: CMmSmsStorageTsy::CompleteWriteSms. Error: %d",aResult);
+TFLOGSTRING2("TSY: CMmSmsStorageTsy::CompleteWriteSms. Error: %d",aResult);
TTsyReqHandle reqHandle = iMmTsyReqHandleStore->ResetTsyReqHandle(
CMmSmsTsy::EMultimodeSimStSmsWriteSms );
@@ -832,7 +827,7 @@
void CMmSmsStorageTsy::CompleteDeleteSms(
TInt aResult )
{
-OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_COMPLETEDELETESMS_1, "TSY: CMmSmsStorageTsy::CompleteDeleteSms. Error: %d", aResult);
+TFLOGSTRING2("TSY: CMmSmsStorageTsy::CompleteDeleteSms. Error: %d", aResult);
TTsyReqHandle reqHandle = iMmTsyReqHandleStore->ResetTsyReqHandle(
CMmSmsTsy::EMultimodeSimStSmsEraseSms );
@@ -899,7 +894,7 @@
void CMmSmsStorageTsy::CompleteDeleteAllSms(
TInt aResult )
{
-OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_COMPLETEDELETEALLSMS_1, "TSY: CMmSmsStorageTsy::CompleteDeleteAllSms. Error: %d", aResult );
+TFLOGSTRING2( "TSY: CMmSmsStorageTsy::CompleteDeleteAllSms. Error: %d", aResult );
TTsyReqHandle reqHandle = iMmTsyReqHandleStore->ResetTsyReqHandle(
CMmSmsTsy::EMultimodeSimStSmsEraseAllSms );
@@ -965,12 +960,12 @@
{
// if store has space, get "StoreAdded" notifications
iUsedEntries++;
-OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_COMPLETENOTIFYSTOREEVENT_1, "TSY: CMmSmsStorageTsy::StoreEntryAdded notifications");
+TFLOGSTRING("TSY: CMmSmsStorageTsy::StoreEntryAdded notifications");
if ( iUsedEntries == iTotalEntries )
{
// if store gets full after class2 message, get "StoreAdded and
// StoreFull" notifications
-OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_COMPLETENOTIFYSTOREEVENT_2, "TSY: CMmSmsStorageTsy::StoreEntryAdded and StoreFull notifications");
+TFLOGSTRING("TSY: CMmSmsStorageTsy::StoreEntryAdded and StoreFull notifications");
aEvent = ( RMobilePhoneStore::KStoreFull |
RMobilePhoneStore::KStoreEntryAdded );
}
@@ -982,12 +977,12 @@
// if entry has been deleted from store, get "EntryDeleted"
// notification
iUsedEntries--;
-OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_COMPLETENOTIFYSTOREEVENT_3, "TSY: CMmSmsStorageTsy::StoreEntryDeleted notifications");
+TFLOGSTRING("TSY: CMmSmsStorageTsy::StoreEntryDeleted notifications");
if ( (iUsedEntries+1) == iTotalEntries )
{
// if store has been full, after deleting get notifications
// "EntryDeleted" and "StoreHasSpace"
-OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_COMPLETENOTIFYSTOREEVENT_4, "TSY: CMmSmsStorageTsy::StoreEntryDeleted and StoreHasSpace notifications");
+TFLOGSTRING("TSY: CMmSmsStorageTsy::StoreEntryDeleted and StoreHasSpace notifications");
aEvent = ( RMobilePhoneStore::KStoreHasSpace |
RMobilePhoneStore::KStoreEntryDeleted );
}
@@ -1009,7 +1004,7 @@
*smsStoreEvent = aEvent;
*iNotifySmsStoreEventIndexPtr = aLocation;
-OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_COMPLETENOTIFYSTOREEVENT_5, "TSY: CMmSmsStorageTsy::CompleteNotifyStoreEvent:notified client about event=0x%08x, location=%d", (TUint)aEvent, aLocation );
+TFLOGSTRING3("TSY: CMmSmsStorageTsy::CompleteNotifyStoreEvent:notified client about event=0x%x, location=%d", aEvent, aLocation );
ReqCompleted( reqHandle, KErrNone );
}
}
@@ -1028,7 +1023,7 @@
CRetrieveMobilePhoneSmsList::TBatchRequestData const* aRequest,
TInt* aBufSize )
{
-OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_READALLSMSPHASE1L_1, "TSY: CMmSmsStorageTsy::ReadAllSmsPhase1L");
+TFLOGSTRING("TSY: CMmSmsStorageTsy::ReadAllSmsPhase1L");
TInt ret( KErrNone );
TTsyReqHandle readAllSmsHandle = iMmTsyReqHandleStore->GetTsyReqHandle(
@@ -1050,7 +1045,7 @@
}
else
{
-OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_READALLSMSPHASE1L_2, "TSY: CMmSmsStorageTsy::ReadAllSmsPhase1. SMS reading starts.");
+TFLOGSTRING("TSY: CMmSmsStorageTsy::ReadAllSmsPhase1. SMS reading starts.");
// Client is asking for all SMS store entries
iReadAllBufSizePtr = aBufSize;
iReadAllId = aRequest->iClient;
@@ -1077,7 +1072,7 @@
if ( KErrNone != ret )
{
-OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_READALLSMSPHASE1L_3, "TSY: CMmSmsStorageTsy::ReadAllSmsPhase1L - and the returned value for EMobilePhoneStoreReadAllPhase1:%d", ret);
+TFLOGSTRING2("TSY: CMmSmsStorageTsy::ReadAllSmsPhase1L - and the returned value for EMobilePhoneStoreReadAllPhase1:%d", ret);
(void)iMmTsyReqHandleStore->ResetTsyReqHandle( CMmSmsTsy::EMultimodeSimStSmsReadAllSms );
// the returned value from ResetTsyReqHandle is not needed.
}
@@ -1091,7 +1086,7 @@
// DOS layer returned with error
if ( ret != KErrNone )
{
-OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_READALLSMSPHASE1L_4, "TSY: CMmSmsStorageTsy::ReadAllSmsPhase1L aTsyReqHandle: %u and ret:%d", (TUint)aTsyReqHandle, ret);
+TFLOGSTRING3("TSY: CMmSmsStorageTsy::ReadAllSmsPhase1L aTsyReqHandle: %d and ret:%d", aTsyReqHandle, ret);
ReqCompleted( aTsyReqHandle, ret );
}
@@ -1111,7 +1106,7 @@
RMobilePhone::TClientId const* aId,
TDes8* aBuffer )
{
-OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_READALLSMSPHASE2_1, "TSY: CMmSmsStorageTsy::ReadAllSmsPhase2");
+TFLOGSTRING("TSY: CMmSmsStorageTsy::ReadAllSmsPhase2");
CListReadAllAttempt* read = NULL;
// Find the read attempt from this client
@@ -1148,7 +1143,7 @@
TInt CMmSmsStorageTsy::ReadAllSmsCancel(
const TTsyReqHandle aTsyReqHandle )
{
-OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_READALLSMSCANCEL_1, "TSY: CMmSmsStorageTsy::ReadAllSmsCancel");
+TFLOGSTRING("TSY: CMmSmsStorageTsy::ReadAllSmsCancel");
iMmTsyReqHandleStore->ResetTsyReqHandle(
CMmSmsTsy::EMultimodeSimStSmsReadAllSms );
@@ -1170,7 +1165,7 @@
TInt aResult,
CMmDataPackage* aDataPackage )
{
-OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_RETRIEVESMSLISTREADSMSL_1, "TSY: CMmSmsStorageTsy::RetrieveSmsListReadSmsL");
+TFLOGSTRING("TSY: CMmSmsStorageTsy::RetrieveSmsListReadSmsL");
TTsyReqHandle reqHandle = iMmTsyReqHandleStore->GetTsyReqHandle(
CMmSmsTsy::EMultimodeSimStSmsReadAllSms );
@@ -1231,7 +1226,7 @@
TInt aResult,
TBool aReceivedClass2ToBeReSent )
{
-OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_COMPLETEREADALLSMSPHASE1_1, "TSY: CMmSmsStorageTsy::CompleteReadAllSmsPhase1. Complete read first phase error: %d", aResult);
+TFLOGSTRING2("TSY: CMmSmsStorageTsy::CompleteReadAllSmsPhase1. Complete read first phase error: %d", aResult);
TTsyReqHandle reqHandle = iMmTsyReqHandleStore->ResetTsyReqHandle(
CMmSmsTsy::EMultimodeSimStSmsReadAllSms );
if ( reqHandle )
@@ -1240,7 +1235,7 @@
ReqCompleted( reqHandle, aResult );
iSmsListArray->Reset();
-OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSMSSTORAGETSY_COMPLETEREADALLSMSPHASE1_2, "TSY: CMmSmsStorageTsy::CompleteReadAllSmsPhase1 aReceivedClass2ToBeReSent: %d",aReceivedClass2ToBeReSent);
+TFLOGSTRING2("TSY: CMmSmsStorageTsy::CompleteReadAllSmsPhase1 aReceivedClass2ToBeReSent: %d",aReceivedClass2ToBeReSent);
if ( aReceivedClass2ToBeReSent )
{
// silently IGNORE if call to DOS fails