|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 #ifndef RUNNINGAPPSERVER_H |
|
18 #define RUNNINGAPPSERVER_H |
|
19 |
|
20 // INCLUDES |
|
21 #include <e32std.h> |
|
22 #include <e32base.h> |
|
23 #include <w32std.h> |
|
24 #include "tsdataobserver.h" |
|
25 |
|
26 class CTsResourceManager; |
|
27 class CTsWindowGroupsMonitor; |
|
28 class MTsModel; |
|
29 class CTsRunningAppModel; |
|
30 class CTsStorage; |
|
31 class CTsSerializedDataProvider; |
|
32 class CTsServiceProvider; |
|
33 |
|
34 /** |
|
35 * CRunningAppServer |
|
36 * |
|
37 */ |
|
38 class CRunningAppServer : public CServer2, |
|
39 public MTsDataObserver, |
|
40 public MTsDataObserverStorage |
|
41 { |
|
42 public: |
|
43 /** |
|
44 * Destructor. |
|
45 */ |
|
46 ~CRunningAppServer(); |
|
47 |
|
48 /** |
|
49 * Two-phased constructor. |
|
50 */ |
|
51 static CRunningAppServer* NewLC(); |
|
52 |
|
53 public: //MHsDataObserver |
|
54 void DataChanged(); |
|
55 |
|
56 public: //MHsDataObserverStorage |
|
57 void PushL(CTsDataObserver*); |
|
58 void Pop(CTsDataObserver*); |
|
59 void Cancel(const RMessage2&); |
|
60 void Invalidate(const CSession2* session); |
|
61 |
|
62 private: |
|
63 /** |
|
64 * Constructor for performing 1st stage construction |
|
65 */ |
|
66 CRunningAppServer(); |
|
67 |
|
68 /** |
|
69 * Default constructor for performing 2nd stage construction |
|
70 */ |
|
71 void ConstructL(); |
|
72 |
|
73 /** |
|
74 * Interface implementation |
|
75 * @see CServer2::NewSessionL(const TVersion&, const RMessage2&) |
|
76 */ |
|
77 CSession2* NewSessionL(const TVersion& version, const RMessage2& message) const; |
|
78 |
|
79 void addProviders(RPointerArray<MTsModel> &dst, const CTsServiceProvider& serviceProvider); |
|
80 |
|
81 private: |
|
82 RPointerArray<CTsDataObserver> mObservers; |
|
83 RWsSession mWsSession; |
|
84 CTsResourceManager* mResources; |
|
85 CTsWindowGroupsMonitor* mMonitor; |
|
86 CTsSerializedDataProvider* mSerializer; |
|
87 CTsStorage* mStorage; |
|
88 CTsServiceProvider* mServiceProvider; |
|
89 CTsRunningAppModel* mAppsModel; |
|
90 CBase *mBacksteppingEngine; |
|
91 }; |
|
92 |
|
93 #endif // RUNNINGAPPSERVER_H |