imagehandlingutilities/thumbnailmanager/thumbagdaemon/src/thumbagcameraobserver.cpp
branchRCL_3
changeset 21 6257223ede8a
parent 20 2b4b06654caa
child 22 9d4d3445ce6e
--- a/imagehandlingutilities/thumbnailmanager/thumbagdaemon/src/thumbagcameraobserver.cpp	Thu Aug 19 10:13:51 2010 +0300
+++ b/imagehandlingutilities/thumbnailmanager/thumbagdaemon/src/thumbagcameraobserver.cpp	Tue Aug 31 15:30:59 2010 +0300
@@ -28,6 +28,10 @@
 #include "thumbnaillog.h"
 #include "thumbnailmanagerconstants.h"
 #include "thumbnailmanagerprivatecrkeys.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "thumbagcameraobserverTraces.h"
+#endif
 
 
 // ---------------------------------------------------------------------------
@@ -37,6 +41,7 @@
 CThumbAGCameraObserver* CThumbAGCameraObserver::NewLC(CThumbAGProcessor* aProcessor)
     {
     TN_DEBUG1( "CThumbAGCameraObserver::NewLC() - begin" );
+    OstTrace0( TRACE_FATAL, CTHUMBAGCAMERAOBSERVER_NEWLC, "CThumbAGCameraObserver::NewLC - begin" );
     
 	CThumbAGCameraObserver* self = new (ELeave) CThumbAGCameraObserver(aProcessor);
 	CleanupStack::PushL( self );
@@ -51,6 +56,7 @@
 CThumbAGCameraObserver* CThumbAGCameraObserver::NewL(CThumbAGProcessor* aProcessor)
 	{
 	TN_DEBUG1( "CThumbAGCameraObserver::NewL() - begin" );
+    OstTrace0( TRACE_FATAL, CTHUMBAGCAMERAOBSERVER_NEWL, "CThumbAGCameraObserver::NewL - begin" );
     
 	CThumbAGCameraObserver* self = CThumbAGCameraObserver::NewLC(aProcessor);
 	CleanupStack::Pop( self );
@@ -74,6 +80,7 @@
 void CThumbAGCameraObserver::ConstructL()
 	{
 	TN_DEBUG1( "CThumbAGCameraObserver::ConstructL() - begin" );
+	OstTrace0( TRACE_FATAL, CTHUMBAGCAMERAOBSERVER_CONSTRUCTL, "CThumbAGCameraObserver::ConstructL - begin" );
 	
 #ifdef _DEBUG
     iAddCounter = 0;
@@ -83,6 +90,7 @@
     InitializeL();
     	
 	TN_DEBUG1( "CThumbAGCameraObserver::ConstructL() - end" );
+	OstTrace0( TRACE_FATAL, DUP1_CTHUMBAGCAMERAOBSERVER_CONSTRUCTL, "CThumbAGCameraObserver::ConstructL - end" );
 	}
 
 // ---------------------------------------------------------------------------
@@ -92,9 +100,11 @@
 void CThumbAGCameraObserver::InitializeL()
     {
     TN_DEBUG1( "CThumbAGCameraObserver::InitializeL() - begin" );
+    OstTrace0( TRACE_FATAL, CTHUMBAGCAMERAOBSERVER_INITIALIZEL, "CThumbAGCameraObserver::InitializeL - begin" );
     
    
         TN_DEBUG1( "CThumbAGCameraObserver::InitializeL() - create observers" );
+        OstTrace0( TRACE_FATAL, DUP1_CTHUMBAGCAMERAOBSERVER_INITIALIZEL, "CThumbAGCameraObserver::InitializeL - create observers" );
         
         // create shutdown observer
         if(iMDSShutdownObserver)
@@ -119,6 +129,7 @@
             }
         
         TN_DEBUG1( "CThumbAGCameraObserver::InitializeL() - connect to MDS" );
+        OstTrace0( TRACE_FATAL, DUP2_CTHUMBAGCAMERAOBSERVER_INITIALIZEL, "CThumbAGCameraObserver::InitializeL - connect to MDS" );
         
         if(iMdESession)
             {
@@ -134,6 +145,7 @@
         iSessionError = EFalse;
       
         TN_DEBUG1( "CThumbAGCameraObserver::InitializeL() - end" );
+        OstTrace0( TRACE_FATAL, DUP3_CTHUMBAGCAMERAOBSERVER_INITIALIZEL, "CThumbAGCameraObserver::InitializeL - end" );
     }
 
 // ---------------------------------------------------------------------------
@@ -143,6 +155,7 @@
 CThumbAGCameraObserver::~CThumbAGCameraObserver()
     {
     TN_DEBUG1( "CThumbAGCameraObserver::~CThumbAGCameraObserver() - begin" );
+    OstTrace0( TRACE_FATAL, CTHUMBAGCAMERAOBSERVER_CTHUMBAGCAMERAOBSERVER, "CThumbAGCameraObserver::~CThumbAGCameraObserver - begin" );
     
     iShutdown = ETrue;    
     
@@ -170,6 +183,7 @@
         }
     
     TN_DEBUG1( "CThumbAGCameraObserver::~CThumbAGCameraObserver() - end" );
+    OstTrace0( TRACE_FATAL, DUP1_CTHUMBAGCAMERAOBSERVER_CTHUMBAGCAMERAOBSERVER, "CThumbAGCameraObserver::~CThumbAGCameraObserver - end" );
     }
 
 // -----------------------------------------------------------------------------
@@ -179,6 +193,7 @@
 void CThumbAGCameraObserver::HandleSessionOpened( CMdESession& /* aSession */, TInt aError )
     {
     TN_DEBUG1( "CThumbAGCameraObserver::HandleSessionOpened");
+    OstTrace0( TRACE_FATAL, CTHUMBAGCAMERAOBSERVER_HANDLESESSIONOPENED, "CThumbAGCameraObserver::HandleSessionOpened" );
     
     if (aError == KErrNone)
         {
@@ -186,11 +201,13 @@
         if (err != KErrNone)
             {
             TN_DEBUG2( "CThumbAGCameraObserver::HandleSessionOpened, AddObserversL error == %d", err );
+            OstTrace1( TRACE_FATAL, DUP1_CTHUMBAGCAMERAOBSERVER_HANDLESESSIONOPENED, "CThumbAGCameraObserver::HandleSessionOpened - AddObserversL error;err=%d", err );
             }
         }
     else
         {
         TN_DEBUG2( "CThumbAGCameraObserver::HandleSessionOpened error == %d", aError );
+        OstTrace1( TRACE_FATAL, DUP2_CTHUMBAGCAMERAOBSERVER_HANDLESESSIONOPENED, "CThumbAGCameraObserver::HandleSessionOpened;aError=%d", aError );
         }
     }
 
@@ -201,6 +218,7 @@
 void CThumbAGCameraObserver::HandleSessionError( CMdESession& /*aSession*/, TInt aError )
     {
     TN_DEBUG2( "CThumbAGCameraObserver::HandleSessionError == %d", aError );
+    OstTrace1( TRACE_FATAL, CTHUMBAGCAMERAOBSERVER_HANDLESESSIONERROR, "CThumbAGCameraObserver::HandleSessionError;aError=%d", aError );
     if (aError != KErrNone && !iSessionError)
         {
         iSessionError = ETrue;
@@ -213,6 +231,7 @@
                                    TCallBack(ReconnectCallBack, this));
                 
                 TN_DEBUG1( "CThumbAGCameraObserver::HandleSessionError() - reconnect timer started" );
+                OstTrace0( TRACE_FATAL, DUP1_CTHUMBAGCAMERAOBSERVER_HANDLESESSIONERROR, "CThumbAGCameraObserver::HandleSessionError - reconnect timer started" );
                 }
             }
 
@@ -228,6 +247,7 @@
                                                const RArray<TItemId>& aObjectIdArray )
     {
     TN_DEBUG1( "CThumbAGCameraObserver::HandleObjectNotification() - begin" );
+    OstTrace0( TRACE_FATAL, CTHUMBAGCAMERAOBSERVER_HANDLEOBJECTNOTIFICATION, "CThumbAGCameraObserver::HandleObjectNotification - begin" );
 
     // no processor or shutting down
     if ( iShutdown || !iProcessor)
@@ -239,11 +259,13 @@
     if (aType == ENotifyAdd)
         {
         TN_DEBUG2( "CThumbAGCameraObserver::HandleObjectNotification() - ENotifyAdd %d", aObjectIdArray.Count() );
+        OstTrace1( TRACE_FATAL, DUP1_CTHUMBAGCAMERAOBSERVER_HANDLEOBJECTNOTIFICATION, "CThumbAGCameraObserver::HandleObjectNotification - ENotifyAdd;aObjectIdArray.Count()=%d", aObjectIdArray.Count() );
         iAddCounter = aObjectIdArray.Count();
         }
     else if (aType == ENotifyModify)
         {
         TN_DEBUG2( "CThumbAGCameraObserver::HandleObjectNotification() - ENotifyModify %d", aObjectIdArray.Count() );
+        OstTrace1( TRACE_FATAL, DUP2_CTHUMBAGCAMERAOBSERVER_HANDLEOBJECTNOTIFICATION, "CThumbAGCameraObserver::HandleObjectNotification - ENotifyModify;aObjectIdArray.Count=%d", aObjectIdArray.Count() );
         iModCounter = aObjectIdArray.Count();
         }
 #endif
@@ -251,6 +273,7 @@
     if ( (aType == ENotifyAdd || aType == ENotifyModify ) && (aObjectIdArray.Count() > 0) )
         {
         TN_DEBUG1( "CThumbAGCameraObserver::HandleObjectNotification() - AddToQueueL" );
+        OstTrace0( TRACE_FATAL, DUP3_CTHUMBAGCAMERAOBSERVER_HANDLEOBJECTNOTIFICATION, "CThumbAGCameraObserver::HandleObjectNotification - AddToQueueL" );
 
         // Add event to processing queue by type and enable force run        
         RPointerArray<HBufC> dummyArray;
@@ -258,20 +281,24 @@
         if (err != KErrNone)
             {
             TN_DEBUG1( "CThumbAGCameraObserver::HandleObjectNotification() - error adding to queue" );
+            OstTrace0( TRACE_FATAL, DUP4_CTHUMBAGCAMERAOBSERVER_HANDLEOBJECTNOTIFICATION, "CThumbAGCameraObserver::HandleObjectNotification - error adding to queue" );
             }
         }
     else
         {
         TN_DEBUG1( "CThumbAGCameraObserver::HandleObjectNotification() - bad notification" );
+        OstTrace0( TRACE_FATAL, DUP5_CTHUMBAGCAMERAOBSERVER_HANDLEOBJECTNOTIFICATION, "CThumbAGCameraObserver::HandleObjectNotification - bad notification" );
         }
     
 #ifdef _DEBUG
     TN_DEBUG3( "CThumbAGCameraObserver::IN-COUNTERS---------- Add = %d Modify = %d", iAddCounter, iModCounter );
+    OstTraceExt2( TRACE_FATAL, DUP6_CTHUMBAGCAMERAOBSERVER_HANDLEOBJECTNOTIFICATION, "CThumbAGCameraObserver::HandleObjectNotification;iAddCounter=%u;iModCounter=%u", iAddCounter, iModCounter );
     iModCounter = 0;
     iAddCounter = 0;
 #endif
 
     TN_DEBUG1( "CThumbAGCameraObserver::HandleObjectNotification() - end" );
+    OstTrace0( TRACE_FATAL, DUP7_CTHUMBAGCAMERAOBSERVER_HANDLEOBJECTNOTIFICATION, "CThumbAGCameraObserver::HandleObjectNotification - end" );
     }
 
 // -----------------------------------------------------------------------------
@@ -281,10 +308,12 @@
 void CThumbAGCameraObserver::ShutdownNotification()
     {
     TN_DEBUG1( "CThumbAGCameraObserver::ShutdownNotification()" );
+    OstTrace0( TRACE_FATAL, CTHUMBAGCAMERAOBSERVER_SHUTDOWNNOTIFICATION, "CThumbAGCameraObserver::ShutdownNotification" );
     
     if (!iShutdown)
         {
         TN_DEBUG1( "CThumbAGCameraObserver::ShutdownNotification() shutdown" );
+        OstTrace0( TRACE_FATAL, DUP1_CTHUMBAGCAMERAOBSERVER_SHUTDOWNNOTIFICATION, "CThumbAGCameraObserver::ShutdownNotification - shutdown" );
         iShutdown = ETrue;
         }
     }
@@ -296,6 +325,7 @@
 void CThumbAGCameraObserver::AddObserversL()
     {
     TN_DEBUG1( "CThumbAGCameraObserver::AddObserversL() - begin" );
+    OstTrace0( TRACE_FATAL, CTHUMBAGCAMERAOBSERVER_ADDOBSERVERSL, "CThumbAGCameraObserver::AddObserversL - begin" );
     
     CMdENamespaceDef& defaultNamespace = iMdESession->GetDefaultNamespaceDefL();
     CMdEObjectDef& objectDef = defaultNamespace.GetObjectDefL( MdeConstants::Object::KBaseObject );
@@ -319,6 +349,7 @@
     CleanupStack::Pop( 4, addCondition );  
      
     TN_DEBUG1( "CThumbAGCameraObserver::AddObserversL() - end" );
+    OstTrace0( TRACE_FATAL, DUP1_CTHUMBAGCAMERAOBSERVER_ADDOBSERVERSL, "CThumbAGCameraObserver::AddObserversL - end" );
     }
 
 // ---------------------------------------------------------------------------
@@ -328,6 +359,7 @@
 TInt CThumbAGCameraObserver::ReconnectCallBack(TAny* aAny)
     {
     TN_DEBUG1( "CThumbAGCameraObserver::ReconnectCallBack() - reinitialize");
+    OstTrace0( TRACE_FATAL, CTHUMBAGCAMERAOBSERVER_RECONNECTCALLBACK, "CThumbAGCameraObserver::ReconnectCallBack - reinitialize" );
     
     CThumbAGCameraObserver* self = static_cast<CThumbAGCameraObserver*>( aAny );
     
@@ -337,6 +369,7 @@
     TRAP_IGNORE( self->InitializeL() );
     
     TN_DEBUG1( "CThumbAGCameraObserver::ReconnectCallBack() - done");
+    OstTrace0( TRACE_FATAL, DUP1_CTHUMBAGCAMERAOBSERVER_RECONNECTCALLBACK, "CThumbAGCameraObserver::ReconnectCallBack - done" );
     
     return KErrNone;
     }