taskswitcher/server/inc/hsrunningappsession.h
changeset 117 c63ee96dbe5f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/taskswitcher/server/inc/hsrunningappsession.h	Thu Sep 16 12:11:40 2010 +0100
@@ -0,0 +1,76 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#ifndef RUNNINGAPPSESSION_H
+#define RUNNINGAPPSESSION_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+#include "tsdataobserver.h"
+#include "tsdataprovider.h"
+#include "tsdatastorage.h"
+/**
+ *  CActivitySession
+ * 
+ */
+class CRunningAppSession : public CSession2
+{
+public:
+    // Constructors and destructor
+
+    /**
+     * Destructor.
+     */
+    ~CRunningAppSession();
+
+    /**
+     * Two-phased constructor.
+     * @param fileSession - initialized file system session
+     * @param taskStorage - global observers storage
+     * @param storage - data storage
+     */
+    static CRunningAppSession* NewL(MTsDataObserverStorage& observerStorage, 
+                                    const MTsDataProvider& dataProvider,
+                                    const TArray<MTsDataStorage*> &dataStorages);
+
+private:
+
+    /**
+     * Constructor for performing 1st stage construction
+     */
+    CRunningAppSession(MTsDataObserverStorage& observerStorage, 
+                       const MTsDataProvider& dataProvider);
+
+    /**
+     * EPOC default constructor for performing 2nd stage construction
+     */
+    void ConstructL(const TArray<MTsDataStorage*> &dataStorages);
+
+private:
+    /**
+     * Implements interface
+     * @see void CSession2::ServiceL(const RMessage2&)
+     */
+    void ServiceL(const RMessage2& message);
+
+private:
+    MTsDataObserverStorage& mObserverStorage;
+    const MTsDataProvider& mDataProvider;
+    RPointerArray<MTsDataStorage> mDataStorages;
+};
+
+#endif // RUNNINGAPPSESSION_H