diff -r 3ab5c078b490 -r c63ee96dbe5f taskswitcher/server/inc/hsrunningappserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taskswitcher/server/inc/hsrunningappserver.h Thu Sep 16 12:11:40 2010 +0100 @@ -0,0 +1,93 @@ +/* +* 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 RUNNINGAPPSERVER_H +#define RUNNINGAPPSERVER_H + +// INCLUDES +#include +#include +#include +#include "tsdataobserver.h" + +class CTsResourceManager; +class CTsWindowGroupsMonitor; +class MTsModel; +class CTsRunningAppModel; +class CTsStorage; +class CTsSerializedDataProvider; +class CTsServiceProvider; + +/** + * CRunningAppServer + * + */ +class CRunningAppServer : public CServer2, + public MTsDataObserver, + public MTsDataObserverStorage +{ +public: + /** + * Destructor. + */ + ~CRunningAppServer(); + + /** + * Two-phased constructor. + */ + static CRunningAppServer* NewLC(); + +public: //MHsDataObserver + void DataChanged(); + +public: //MHsDataObserverStorage + void PushL(CTsDataObserver*); + void Pop(CTsDataObserver*); + void Cancel(const RMessage2&); + void Invalidate(const CSession2* session); + +private: + /** + * Constructor for performing 1st stage construction + */ + CRunningAppServer(); + + /** + * Default constructor for performing 2nd stage construction + */ + void ConstructL(); + + /** + * Interface implementation + * @see CServer2::NewSessionL(const TVersion&, const RMessage2&) + */ + CSession2* NewSessionL(const TVersion& version, const RMessage2& message) const; + + void addProviders(RPointerArray &dst, const CTsServiceProvider& serviceProvider); + +private: + RPointerArray mObservers; + RWsSession mWsSession; + CTsResourceManager* mResources; + CTsWindowGroupsMonitor* mMonitor; + CTsSerializedDataProvider* mSerializer; + CTsStorage* mStorage; + CTsServiceProvider* mServiceProvider; + CTsRunningAppModel* mAppsModel; + CBase *mBacksteppingEngine; +}; + +#endif // RUNNINGAPPSERVER_H