tstaskmonitor/server/src/hsrunningappserver.cpp
changeset 83 156f692b1687
parent 80 397d00875918
child 98 d2f833ab7940
--- a/tstaskmonitor/server/src/hsrunningappserver.cpp	Thu May 27 13:11:12 2010 +0300
+++ b/tstaskmonitor/server/src/hsrunningappserver.cpp	Fri Jun 11 13:58:37 2010 +0300
@@ -18,6 +18,8 @@
 #include "hsrunningappserver.h"
 #include "hsrunningappsession.h"
 #include "tsrunningappstorage.h"
+#include "tsscreenshotprovider.h"
+#include "tsbackstepping.h"
 
 _LIT(KErrObserverExists, "Observer already exists");
 // -----------------------------------------------------------------------------
@@ -37,6 +39,8 @@
 //
 CRunningAppServer::~CRunningAppServer()
 {
+    delete mBacksteppingEngine;
+    delete mScreenshotProviderStarter;
     delete mStorage;
     mObservers.ResetAndDestroy();
 }
@@ -60,7 +64,10 @@
 void CRunningAppServer::ConstructL()
 {
     StartL(KRunningAppServerName);
+    User::LeaveIfError(mWsSession.Connect());
     mStorage = CRunningAppStorage::NewL(*this);
+    TRAP_IGNORE(mScreenshotProviderStarter = CTsScreenshotProvider::NewL(*mStorage);
+    mBacksteppingEngine = CTsBackstepping::NewL(mWsSession);)
 }
 
 // -----------------------------------------------------------------------------
@@ -70,6 +77,7 @@
 CSession2* CRunningAppServer::NewSessionL(const TVersion &, const RMessage2&) const
 {
     return CRunningAppSession::NewL(*const_cast<CRunningAppServer *>(this),
+                                    *const_cast<CRunningAppServer *>(this)->mStorage,
                                     *const_cast<CRunningAppServer *>(this)->mStorage);
 }