imagehandlingutilities/thumbnailmanager/thumbnailserver/src/thumbnailmemorycardobserver.cpp
branchRCL_3
changeset 40 6257223ede8a
parent 0 2014ca87e772
child 41 9d4d3445ce6e
equal deleted inserted replaced
38:2b4b06654caa 40:6257223ede8a
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 #include "thumbnailmemorycardobserver.h"
    19 #include "thumbnailmemorycardobserver.h"
    20 #include "thumbnaillog.h"
    20 #include "thumbnaillog.h"
       
    21 #include "OstTraceDefinitions.h"
       
    22 #ifdef OST_TRACE_COMPILER_IN_USE
       
    23 #include "thumbnailmemorycardobserverTraces.h"
       
    24 #endif
       
    25 
    21 
    26 
    22 // ======== MEMBER FUNCTIONS ========
    27 // ======== MEMBER FUNCTIONS ========
    23 
    28 
    24 // ---------------------------------------------------------------------------
    29 // ---------------------------------------------------------------------------
    25 // CThumbnailMemoryCardObserver::NewL()
    30 // CThumbnailMemoryCardObserver::NewL()
    45 CThumbnailMemoryCardObserver::CThumbnailMemoryCardObserver( CThumbnailServer* aServer, RFs& aFs ): 
    50 CThumbnailMemoryCardObserver::CThumbnailMemoryCardObserver( CThumbnailServer* aServer, RFs& aFs ): 
    46     CActive( CActive::EPriorityStandard ), iServer( aServer ), iFs( aFs ) 
    51     CActive( CActive::EPriorityStandard ), iServer( aServer ), iFs( aFs ) 
    47     {
    52     {
    48     TN_DEBUG1( "CThumbnailMemoryCardObserver::CThumbnailMemoryCardObserver()"
    53     TN_DEBUG1( "CThumbnailMemoryCardObserver::CThumbnailMemoryCardObserver()"
    49         );
    54         );
       
    55     OstTrace0( TRACE_NORMAL, CTHUMBNAILMEMORYCARDOBSERVER_CTHUMBNAILMEMORYCARDOBSERVER, "CThumbnailMemoryCardObserver::CThumbnailMemoryCardObserver" );
    50     CActiveScheduler::Add( this );
    56     CActiveScheduler::Add( this );
    51     StartNotify();
    57     StartNotify();
    52     }
    58     }
    53 
    59 
    54 
    60 
    70 //
    76 //
    71 CThumbnailMemoryCardObserver::~CThumbnailMemoryCardObserver()
    77 CThumbnailMemoryCardObserver::~CThumbnailMemoryCardObserver()
    72     {
    78     {
    73     TN_DEBUG1( 
    79     TN_DEBUG1( 
    74         "CThumbnailMemoryCardObserver::~CThumbnailMemoryCardObserver()" );
    80         "CThumbnailMemoryCardObserver::~CThumbnailMemoryCardObserver()" );
       
    81     OstTrace0( TRACE_NORMAL, DUP1_CTHUMBNAILMEMORYCARDOBSERVER_CTHUMBNAILMEMORYCARDOBSERVER, "CThumbnailMemoryCardObserver::~CThumbnailMemoryCardObserver" );
    75     Cancel();
    82     Cancel();
    76     }
    83     }
    77 
    84 
    78 
    85 
    79 // ---------------------------------------------------------------------------
    86 // ---------------------------------------------------------------------------
    81 // ---------------------------------------------------------------------------
    88 // ---------------------------------------------------------------------------
    82 //
    89 //
    83 void CThumbnailMemoryCardObserver::RunL()
    90 void CThumbnailMemoryCardObserver::RunL()
    84     {
    91     {
    85     TN_DEBUG2( "CThumbnailMemoryCardObserver::RunL() iStatus = %d", iStatus.Int());
    92     TN_DEBUG2( "CThumbnailMemoryCardObserver::RunL() iStatus = %d", iStatus.Int());
       
    93     OstTrace1( TRACE_NORMAL, CTHUMBNAILMEMORYCARDOBSERVER_RUNL, "CThumbnailMemoryCardObserver::RunL;iStatus.Int()=%d", iStatus.Int() );
    86     if ( !iStatus.Int() )
    94     if ( !iStatus.Int() )
    87         {
    95         {
    88         // trap because nothing could be done in RunError
    96         // trap because nothing could be done in RunError
    89         TRAP_IGNORE( iServer->MemoryCardStatusChangedL() );
    97         TRAP_IGNORE( iServer->MemoryCardStatusChangedL() );
    90         StartNotify();
    98         StartNotify();
   105 // ---------------------------------------------------------------------------
   113 // ---------------------------------------------------------------------------
   106 //
   114 //
   107 void CThumbnailMemoryCardObserver::StartNotify()
   115 void CThumbnailMemoryCardObserver::StartNotify()
   108     {
   116     {
   109     TN_DEBUG1( "CThumbnailMemoryCardObserver::StartNotify()" );
   117     TN_DEBUG1( "CThumbnailMemoryCardObserver::StartNotify()" );
       
   118     OstTrace0( TRACE_NORMAL, CTHUMBNAILMEMORYCARDOBSERVER_STARTNOTIFY, "CThumbnailMemoryCardObserver::StartNotify" );
   110     
   119     
   111     if (IsActive()) 
   120     if (IsActive()) 
   112         {
   121         {
   113         Cancel();
   122         Cancel();
   114         }
   123         }