imagehandlingutilities/thumbnailmanager/tmcommon/src/tmformatobserver.cpp
changeset 43 473df7bf149f
parent 29 4bdfb6b5c9b4
child 41 9d4d3445ce6e
equal deleted inserted replaced
36:c5df59b4ae2d 43:473df7bf149f
    18 #include "tmformatobserver.h"
    18 #include "tmformatobserver.h"
    19 #include "thumbnaillog.h"
    19 #include "thumbnaillog.h"
    20  
    20  
    21 #include <e32base.h>
    21 #include <e32base.h>
    22 #include <f32file.h>
    22 #include <f32file.h>
       
    23 #include "OstTraceDefinitions.h"
       
    24 #ifdef OST_TRACE_COMPILER_IN_USE
       
    25 #include "tmformatobserverTraces.h"
       
    26 #endif
    23 
    27 
    24 
    28 
    25 // ======== MEMBER FUNCTIONS ========
    29 // ======== MEMBER FUNCTIONS ========
    26 
    30 
    27 CTMFormatObserver::CTMFormatObserver ( MTMFormatObserver& aObserver ): 
    31 CTMFormatObserver::CTMFormatObserver ( MTMFormatObserver& aObserver ): 
    28     iObserver( aObserver )
    32     iObserver( aObserver )
    29     {
    33     {
    30     TN_DEBUG1( "CTMFormatObserver::CTMFormatObserver()");
    34     TN_DEBUG1( "CTMFormatObserver::CTMFormatObserver()");
       
    35     OstTrace0( TRACE_NORMAL, CTMFORMATOBSERVER_CTMFORMATOBSERVER, "CTMFormatObserver::CTMFormatObserver" );
    31     }
    36     }
    32     
    37     
    33     
    38     
    34 // ---------------------------------------------------------------------------
    39 // ---------------------------------------------------------------------------
    35 // Second Phase Constructor
    40 // Second Phase Constructor
    36 // ---------------------------------------------------------------------------
    41 // ---------------------------------------------------------------------------
    37 //
    42 //
    38 void CTMFormatObserver::ConstructL()
    43 void CTMFormatObserver::ConstructL()
    39     {
    44     {
    40     TN_DEBUG1("CTMFormatObserver::ConstructL");
    45     TN_DEBUG1("CTMFormatObserver::ConstructL");
       
    46     OstTrace0( TRACE_NORMAL, CTMFORMATOBSERVER_CONSTRUCTL, "CTMFormatObserver::ConstructL" );
    41 
    47 
    42     iBackupSession = CBaBackupSessionWrapper::NewL();
    48     iBackupSession = CBaBackupSessionWrapper::NewL();
    43     iBackupSession->RegisterBackupOperationObserverL( *this );
    49     iBackupSession->RegisterBackupOperationObserverL( *this );
    44     }
    50     }
    45 
    51 
    89 // ---------------------------------------------------------------------------
    95 // ---------------------------------------------------------------------------
    90 //
    96 //
    91 void CTMFormatObserver::PollStatus()
    97 void CTMFormatObserver::PollStatus()
    92     { 
    98     { 
    93     TN_DEBUG1("CTMFormatObserver::PollStatus()");
    99     TN_DEBUG1("CTMFormatObserver::PollStatus()");
       
   100     OstTrace0( TRACE_NORMAL, CTMFORMATOBSERVER_POLLSTATUS, "CTMFormatObserver::PollStatus" );
    94     
   101     
    95     TBool formatting = iBackupSession->IsBackupOperationRunning();
   102     TBool formatting = iBackupSession->IsBackupOperationRunning();
    96     
   103     
    97     if( formatting )
   104     if( formatting )
    98         {     
   105         {     
   107 //
   114 //
   108 void CTMFormatObserver::HandleBackupOperationEventL(
   115 void CTMFormatObserver::HandleBackupOperationEventL(
   109                   const TBackupOperationAttributes& aBackupOperationAttributes)
   116                   const TBackupOperationAttributes& aBackupOperationAttributes)
   110     {
   117     {
   111     TN_DEBUG1("CTMFormatObserver::HandleBackupOperationEventL");
   118     TN_DEBUG1("CTMFormatObserver::HandleBackupOperationEventL");
       
   119     OstTrace0( TRACE_NORMAL, CTMFORMATOBSERVER_HANDLEBACKUPOPERATIONEVENTL, "CTMFormatObserver::HandleBackupOperationEventL" );
   112 
   120 
   113     if( aBackupOperationAttributes.iOperation == EStart )
   121     if( aBackupOperationAttributes.iOperation == EStart )
   114         {
   122         {
   115         iObserver.FormatNotification(ETrue);
   123         iObserver.FormatNotification(ETrue);
   116         }
   124         }