uiservicetab/vimpststorage/src/cvimpststoragemanager.cpp
branchRCL_3
changeset 9 9fdee5e1da30
parent 0 5e5d6b214f4f
--- a/uiservicetab/vimpststorage/src/cvimpststoragemanager.cpp	Wed Mar 31 21:14:49 2010 +0300
+++ b/uiservicetab/vimpststorage/src/cvimpststoragemanager.cpp	Wed Apr 14 15:46:18 2010 +0300
@@ -24,7 +24,7 @@
 
 #include "cvimpststoragemanager.h"
 #include "tvimpststoragepanics.h"
-#include "vimpstdebugtrace.h"
+#include "uiservicetabtracer.h"
 
 
 // ============================ MEMBER FUNCTIONS ===============================
@@ -36,7 +36,7 @@
 //
 void CVIMPSTStorageManager::InitialiseLibraryL()
     {
-    TRACE( T_LIT("CVIMPSTStorageManager::InitialiseLibraryL() begin") );
+	TRACER_AUTO;
     //see whether there is an instance in the TLS
     //if not create the instance and set the same in TLS
     CVIMPSTStorageManager *sm = static_cast<CVIMPSTStorageManager*>( Dll::Tls() );
@@ -49,7 +49,6 @@
         User::LeaveIfError( Dll::SetTls( static_cast<TAny*>( sm ) ) );
         CleanupStack::Pop( manager );
         }
-    TRACE( T_LIT("CVIMPSTStorageManager::InitialiseLibraryL() end") );
     }
 
 // -----------------------------------------------------------------------------
@@ -59,7 +58,7 @@
 //
 TInt CVIMPSTStorageManager::Release()
     {
-    TRACE( T_LIT("CVIMPSTStorageManager::Release() begin") );
+	TRACER_AUTO;
     //if any instance in TLS get the same and delete it    
     CVIMPSTStorageManager *storage = static_cast<CVIMPSTStorageManager*>( Dll::Tls() );
     if ( storage )
@@ -67,7 +66,6 @@
         delete storage;
         Dll::SetTls( NULL );
         }
-    TRACE( T_LIT("CVIMPSTStorageManager::Release() end") );
     return KErrNone;
     }
 
@@ -79,13 +77,12 @@
 //
 CVIMPSTStorageManager& CVIMPSTStorageManager::Instance()
     {
+	TRACER_AUTO;
     //get the instance frm TLS and return the same
-    TRACE( T_LIT("CVIMPSTStorageManager::Instance() begin") );
     CVIMPSTStorageManager *storage = static_cast<CVIMPSTStorageManager*>( Dll::Tls() );
     
     __ASSERT_ALWAYS( storage,
         User::Panic( KPanicCategory, KLIBNOTINITIALIZED ) );
-	TRACE( T_LIT("CVIMPSTStorageManager::Instance() end") );
     return *storage;
     }    
     
@@ -97,13 +94,12 @@
 //
  CVIMPSTStorageManager* CVIMPSTStorageManager::NewL()
     {
-    TRACE( T_LIT("CVIMPSTStorageManager::NewL() begin") );
+		TRACER_AUTO;
     //creates the instance
     CVIMPSTStorageManager* self = new( ELeave ) CVIMPSTStorageManager;
     CleanupStack::PushL( self );
     self->ConstructL();
     CleanupStack::Pop( self );
-    TRACE( T_LIT("CVIMPSTStorageManager::NewL() end") );
     return self;
     }
     
@@ -114,8 +110,7 @@
 //
 void CVIMPSTStorageManager::ConstructL()
 	{
-    TRACE( T_LIT("CVIMPSTStorageManager::ConstructL() begin") );
-    TRACE( T_LIT("CVIMPSTStorageManager::ConstructL() end") );
+	TRACER_AUTO;
     }
     
     
@@ -125,10 +120,9 @@
 // 
  CVIMPSTStorageManager::~CVIMPSTStorageManager()
     {
-    TRACE( T_LIT("CVIMPSTStorageManager::~CVIMPSTStorageManager() begin") );
+		TRACER_AUTO;
     //release  all the existing views
 	iServiceViewList.ResetAndDestroy();	
-    TRACE( T_LIT("CVIMPSTStorageManager::~CVIMPSTStorageManager() end") );
     }
     
 // -----------------------------------------------------------------------------
@@ -139,7 +133,7 @@
 											const TDesC& aStoreName,
 											const TDesC& aServiceName )
 	{
-	TRACE( T_LIT("CVIMPSTStorageManager::CreateServiceViewL() begin") );
+	TRACER_AUTO;
 	//creates a new view based on the service id.
 	TInt index = KErrNotFound;
 	CVIMPSTStorageServiceView* serviceView = NULL;
@@ -148,26 +142,25 @@
 	index = FindServiceView(aServiceId);
 	if( KErrNotFound == index )
 		{
-		TRACE( T_LIT("CVIMPSTStorageManager::CreateServiceViewL() service does not exit") );
+	TRACE( "service does not exit" );
 		// service view is not found 
 		// check if store name is valid create a service view for aServiceId
 		if( aStoreName.Length() )
 			{
-			TRACE( T_LIT("CVIMPSTStorageManager::CreateServiceViewL() store name is valid") );
+		TRACE(" store name is valid" );
 			serviceView = CVIMPSTStorageServiceView::NewL(aServiceId,
 	    										aStoreName, aServiceName);	
 			iServiceViewList.Append(serviceView); 
-			TRACE( T_LIT("CVIMPSTStorageManager::CreateServiceViewL() new view created for serviceId = %d"),aServiceId );
+			TRACE( "new view created for serviceId = %d",aServiceId );
 			}
 		// if store name is not valid ,return NULL
 		}
     else
 	    {
-	    TRACE( T_LIT("CVIMPSTStorageManager::CreateServiceViewL() service already exist = %d"),aServiceId );
+    TRACE( " service already exist = %d",aServiceId );
 	    serviceView = iServiceViewList[ FindServiceView(aServiceId)];
 	    }
     //return the extisting view from the viewlist
-    TRACE( T_LIT("CVIMPSTStorageManager::CreateServiceViewL() end") );
 	return serviceView;
 	}
 // -----------------------------------------------------------------------------
@@ -176,7 +169,7 @@
 //
 TInt CVIMPSTStorageManager::FindServiceView( TUint32 aServiceId)
 	{
-	TRACE( T_LIT("CVIMPSTStorageManager::FindServiceView() begin") );
+	TRACER_AUTO;
 	//search whether the view exists in the view list.
 	TInt index = KErrNotFound;
     TInt count = iServiceViewList.Count();
@@ -184,12 +177,11 @@
 	    {
     	if( aServiceId == iServiceViewList[ i ]->GetServiceId() )
 			{
-			TRACE( T_LIT("CVIMPSTStorageManager::FindServiceView() aServiceId found = %d") ,aServiceId ); 
+			TRACE( "aServiceId found = %d" ,aServiceId ); 
 			index = i;
 			break;
 			}
 		}
-	TRACE( T_LIT("CVIMPSTStorageManager::FindServiceView() end") );	
 	return index;
 	}
 	
@@ -200,19 +192,18 @@
 //
 void  CVIMPSTStorageManager::RemoveServiceView( TUint32 aServiceId)
 	{
-	TRACE( T_LIT("CVIMPSTStorageManager::RemoveServiceView() begin") );
+	TRACER_AUTO;
 	//searches and removes the view from the view list.
     TInt index = FindServiceView(aServiceId);
 	if( index >= 0 )
 		{
-		TRACE( T_LIT("CVIMPSTStorageManager::RemoveServiceView() aServiceId found = %d") ,aServiceId ); 
+		TRACE( "aServiceId found = %d" ,aServiceId ); 
 		//view exists, so delete and remove the same
 		CVIMPSTStorageServiceView* serviceView = iServiceViewList[ index ];
 		iServiceViewList.Remove( index ); 
 		delete serviceView;
 		iServiceViewList.Compress();     
 		}
-	TRACE( T_LIT("CVIMPSTStorageManager::RemoveServiceView() end") );   
 	}
 
 //  End of File