tstaskmonitor/server/src/tsrunningappstorage.cpp
changeset 103 b99b84bcd2d1
parent 83 156f692b1687
child 99 7aaf39b772ac
equal deleted inserted replaced
83:156f692b1687 103:b99b84bcd2d1
    13 *
    13 *
    14 * Description:
    14 * Description:
    15 *
    15 *
    16 */
    16 */
    17 #include "tsrunningappstorage.h"
    17 #include "tsrunningappstorage.h"
    18 #include "tsfswengine.h"
    18 #include "tsfswdatalist.h"
    19 #include "tsfswmonitor.h"
       
    20 #include "tsfswentry.h"
    19 #include "tsfswentry.h"
    21 #include <s32strm.h>
    20 #include <s32strm.h>
    22 #include <s32mem.h>
    21 #include <s32mem.h>
    23 // -----------------------------------------------------------------------------
    22 // -----------------------------------------------------------------------------
    24 //
    23 //
    35 //
    34 //
    36 CRunningAppStorage::~CRunningAppStorage()
    35 CRunningAppStorage::~CRunningAppStorage()
    37 {
    36 {
    38     mData.Close();
    37     mData.Close();
    39     delete mEngine;
    38     delete mEngine;
    40     delete mMonitor;
       
    41 }
    39 }
    42 
    40 
    43 // -----------------------------------------------------------------------------
    41 // -----------------------------------------------------------------------------
    44 //
    42 //
    45 // -----------------------------------------------------------------------------
    43 // -----------------------------------------------------------------------------
    46 //
    44 //
    47 CRunningAppStorage* CRunningAppStorage::NewL(MHsDataObserver& observer)
    45 CRunningAppStorage* CRunningAppStorage::NewL(MHsDataObserver& observer,
       
    46                                              MTsResourceManager& resources,
       
    47                                              MTsWindowGroupsMonitor &wsMonitor)
    48 {
    48 {
    49     CRunningAppStorage * self = new (ELeave)CRunningAppStorage(observer);
    49     CRunningAppStorage * self = new (ELeave)CRunningAppStorage(observer);
    50     CleanupStack::PushL(self);
    50     CleanupStack::PushL(self);
    51     self->ConstructL();
    51     self->ConstructL(resources, wsMonitor);
    52     CleanupStack::Pop(self);
    52     CleanupStack::Pop(self);
    53     return self;
    53     return self;
    54 }
    54 }
    55 
    55 
    56 // -----------------------------------------------------------------------------
    56 // -----------------------------------------------------------------------------
    57 //
    57 //
    58 // -----------------------------------------------------------------------------
    58 // -----------------------------------------------------------------------------
    59 //
    59 //
    60 void CRunningAppStorage::ConstructL()
    60 void CRunningAppStorage::ConstructL(MTsResourceManager& resources, 
       
    61                                     MTsWindowGroupsMonitor &wsMonitor)
    61 {
    62 {
    62     mEngine = CTsFswEngine::NewL(*this) ;
    63     mEngine = CTsFswDataList::NewL(resources, wsMonitor, *this) ;
    63     mMonitor = CTsFswMonitor::NewL(*mEngine);
    64     RArray<RWsSession::TWindowGroupChainInfo> wgList;
       
    65     CleanupClosePushL(wgList);
       
    66     User::LeaveIfError(resources.WsSession().WindowGroupList(&wgList));
       
    67     mEngine->HandleWindowGroupChanged(resources, wgList.Array());
       
    68     CleanupStack::PopAndDestroy(&wgList);
    64     DataChangedL();
    69     DataChangedL();
    65 }
    70 }
    66 
    71 
    67 // -----------------------------------------------------------------------------
    72 // -----------------------------------------------------------------------------
    68 //
    73 //