imagehandlingutilities/thumbnailmanager/thumbnailclient/src/thumbnailsession.cpp
branchRCL_3
changeset 21 6257223ede8a
parent 17 ff2fb7658ff7
child 22 9d4d3445ce6e
--- a/imagehandlingutilities/thumbnailmanager/thumbnailclient/src/thumbnailsession.cpp	Thu Aug 19 10:13:51 2010 +0300
+++ b/imagehandlingutilities/thumbnailmanager/thumbnailclient/src/thumbnailsession.cpp	Tue Aug 31 15:30:59 2010 +0300
@@ -20,6 +20,10 @@
 #include "thumbnailsession.h"
 #include "thumbnailmanagerconstants.h"
 #include "thumbnaillog.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "thumbnailsessionTraces.h"
+#endif
 
 // ======== MEMBER FUNCTIONS ========
 
@@ -32,6 +36,7 @@
     {
     // No implementation required
     TN_DEBUG1( "RThumbnailSession::RThumbnailSession");
+    OstTrace0( TRACE_NORMAL, RTHUMBNAILSESSION_RTHUMBNAILSESSION, "RThumbnailSession::RThumbnailSession" );
     }
 
 
@@ -42,6 +47,7 @@
 TInt RThumbnailSession::Connect()
     { 
     TN_DEBUG1( "RThumbnailSession::Connect - start");
+    OstTrace0( TRACE_NORMAL, RTHUMBNAILSESSION_CONNECT, "RThumbnailSession::Connect - start" );
     
     StartServer();
     
@@ -58,6 +64,7 @@
     while (retry <= 10 && err != KErrNone)
         {
         TN_DEBUG1( "RThumbnailSession::Connect - retry");
+        OstTrace0( TRACE_NORMAL, DUP1_RTHUMBNAILSESSION_CONNECT, "RThumbnailSession::Connect - retry" );
     
         User::After(retry * 50000);
         StartServer();
@@ -66,6 +73,7 @@
         }
     
     TN_DEBUG1( "RThumbnailSession::Connect - end");
+    OstTrace0( TRACE_NORMAL, DUP2_RTHUMBNAILSESSION_CONNECT, "RThumbnailSession::Connect - end" );
     
     return err;
     }
@@ -79,6 +87,7 @@
 void RThumbnailSession::Close()
     {
     TN_DEBUG1( "RThumbnailSession::Close");
+    OstTrace0( TRACE_NORMAL, RTHUMBNAILSESSION_CLOSE, "RThumbnailSession::Close" );
     
     RSessionBase::Close();
     }
@@ -104,6 +113,7 @@
 TInt RThumbnailSession::StartServer()
     {
     TN_DEBUG1( "RThumbnailSession::StartServer - start");
+    OstTrace0( TRACE_NORMAL, RTHUMBNAILSESSION_STARTSERVER, "RThumbnailSession::StartServer - start" );
     
     TInt res( KErrNone );
     // create server - if one of this name does not already exist
@@ -114,6 +124,7 @@
         // we don't exist already
         {
         TN_DEBUG1( "RThumbnailSession::StartServer - server process doesn't exist yet");
+        OstTrace0( TRACE_NORMAL, DUP1_RTHUMBNAILSESSION_STARTSERVER, "RThumbnailSession::StartServer - server process doesn't exist yet" );
     
         RProcess server;
         // Create the server process
@@ -122,10 +133,12 @@
         if ( res != KErrNone )
             {
             TN_DEBUG2( "RThumbnailSession::StartServer - error creating process: %d", res);
+            OstTrace1( TRACE_NORMAL, DUP2_RTHUMBNAILSESSION_STARTSERVER, "RThumbnailSession::StartServer;res=%d", res );
             return res;
             }
         
         TN_DEBUG1( "RThumbnailSession::StartServer - process created");
+        OstTrace0( TRACE_NORMAL, DUP3_RTHUMBNAILSESSION_STARTSERVER, "RThumbnailSession::StartServer - process created" );
 
         // Process created successfully
         TRequestStatus status;
@@ -138,6 +151,7 @@
         if ( status != KErrNone )
             {
             TN_DEBUG2( "RThumbnailSession::StartServer - status: %d, closing", status.Int() );
+            OstTrace1( TRACE_NORMAL, DUP4_RTHUMBNAILSESSION_STARTSERVER, "RThumbnailSession::StartServer;status.Int()=%d", status.Int() );
         
             server.Close();
             return status.Int();
@@ -148,6 +162,7 @@
         }
     
     TN_DEBUG1( "RThumbnailSession::StartServer - end");
+    OstTrace0( TRACE_NORMAL, DUP5_RTHUMBNAILSESSION_STARTSERVER, "RThumbnailSession::StartServer - end" );
     
     return res;
     }
@@ -225,6 +240,7 @@
     if( !aBuffer )
         {
         TN_DEBUG1( "RThumbnailSession::RequestSetThumbnailL() - !aBuffer KErrArgument");
+        OstTrace0( TRACE_NORMAL, RTHUMBNAILSESSION_REQUESTSETTHUMBNAILL, "RThumbnailSession::RequestSetThumbnailL - !aBuffer KErrArgument" );
         User::Leave( KErrArgument );
         }
     
@@ -241,6 +257,7 @@
     if( !aBitmapHandle )
         {
         TN_DEBUG1( "RThumbnailSession::RequestSetThumbnailL() - !aBitmapHandle KErrArgument");
+        OstTrace0( TRACE_NORMAL, DUP1_RTHUMBNAILSESSION_REQUESTSETTHUMBNAILL, "RThumbnailSession::RequestSetThumbnailL - !aBitmapHandle KErrArgument" );
         User::Leave( KErrArgument );
         }
     
@@ -259,6 +276,7 @@
     while ( err == KErrServerBusy )
         {
         TN_DEBUG1( "RThumbnailSession::ReleaseBitmap() - server slots full");
+        OstTrace0( TRACE_NORMAL, RTHUMBNAILSESSION_RELEASEBITMAP, "RThumbnailSession::ReleaseBitmap - server slots full" );
     
         err = Send( EReleaseBitmap, TIpcArgs( aBitmapHandle ));
         }
@@ -275,6 +293,7 @@
     while ( err == KErrServerBusy )
         {
         TN_DEBUG1( "RThumbnailSession::CancelRequest() - server slots full");
+        OstTrace0( TRACE_NORMAL, RTHUMBNAILSESSION_CANCELREQUEST, "RThumbnailSession::CancelRequest - server slots full" );
     
         err = Send( ECancelRequest, TIpcArgs( aRequestId ));
         }
@@ -293,6 +312,7 @@
     while ( err == KErrServerBusy )
         {
         TN_DEBUG1( "RThumbnailSession::ChangePriority() - server slots full");
+        OstTrace0( TRACE_NORMAL, RTHUMBNAILSESSION_CHANGEPRIORITY, "RThumbnailSession::ChangePriority - server slots full" );
     
         err = Send( EChangePriority, TIpcArgs( aRequestId, aNewPriority ));
         }