tstaskmonitor/server/src/tsrunningappstorage.cpp
changeset 83 156f692b1687
parent 80 397d00875918
child 98 d2f833ab7940
equal deleted inserted replaced
80:397d00875918 83:156f692b1687
    17 #include "tsrunningappstorage.h"
    17 #include "tsrunningappstorage.h"
    18 #include "tsfswengine.h"
    18 #include "tsfswengine.h"
    19 #include "tsfswmonitor.h"
    19 #include "tsfswmonitor.h"
    20 #include "tsfswentry.h"
    20 #include "tsfswentry.h"
    21 #include <s32strm.h>
    21 #include <s32strm.h>
    22 #include <S32MEM.H>
    22 #include <s32mem.h>
    23 // -----------------------------------------------------------------------------
    23 // -----------------------------------------------------------------------------
    24 //
    24 //
    25 // -----------------------------------------------------------------------------
    25 // -----------------------------------------------------------------------------
    26 //
    26 //
    27 CRunningAppStorage::CRunningAppStorage(MHsDataObserver& observer)
    27 CRunningAppStorage::CRunningAppStorage(MHsDataObserver& observer)
    82     TRAPD( err, DataChangedL() );
    82     TRAPD( err, DataChangedL() );
    83     if ( err == KErrNone)
    83     if ( err == KErrNone)
    84     {
    84     {
    85         mObserver.DataChanged();
    85         mObserver.DataChanged();
    86     }
    86     }
    87     
       
    88     int a=8;
       
    89     if( a==9)
       
    90     {
       
    91         CActiveScheduler::Stop();
       
    92     }
       
    93 }
    87 }
       
    88 
       
    89 // -----------------------------------------------------------------------------
       
    90 //
       
    91 // -----------------------------------------------------------------------------
       
    92 //
    94 void CRunningAppStorage::DataChangedL()
    93 void CRunningAppStorage::DataChangedL()
    95 {
    94 {
    96     RTsFswArray taskList = mEngine->FswDataL();
    95     RTsFswArray taskList = mEngine->FswDataL();
    97     CTsFswEntry* entry = CTsFswEntry::NewLC();
    96     CTsFswEntry* entry = CTsFswEntry::NewLC();
    98     // Create a dynamic flat buffer to hold this object’s member data
    97     // Create a dynamic flat buffer to hold this object’s member data
   108     mData.CreateL( buf->Size() );
   107     mData.CreateL( buf->Size() );
   109     buf->Read(0, mData, buf->Size());
   108     buf->Read(0, mData, buf->Size());
   110     
   109     
   111 
   110 
   112     CleanupStack::PopAndDestroy(buf);
   111     CleanupStack::PopAndDestroy(buf);
   113     CleanupStack::PopAndDestroy(entry); 
   112     CleanupStack::PopAndDestroy(entry);  
   114  
       
   115 }
   113 }
       
   114 
       
   115 // -----------------------------------------------------------------------------
       
   116 //
       
   117 // -----------------------------------------------------------------------------
       
   118 //
       
   119 void CRunningAppStorage::UpdateL(TInt key, const CFbsBitmap& data, TInt /*param*/, TInt priority)
       
   120     {
       
   121     UpdatePriority newpriority = static_cast<UpdatePriority>(priority);
       
   122     mEngine->SetScreenshotL(&data, newpriority, key);
       
   123     }
       
   124 
       
   125 // -----------------------------------------------------------------------------
       
   126 //
       
   127 // -----------------------------------------------------------------------------
       
   128 //
       
   129 void CRunningAppStorage::RemoveL(TInt key, TInt /*param*/)
       
   130     {
       
   131     mEngine->RemoveScreenshotL(key);
       
   132     }