|
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 |
|
24 #include "hsdataobserver.h" |
|
25 |
|
26 class CRunningAppStorage; |
|
27 /** |
|
28 * CRunningAppServer |
|
29 * |
|
30 */ |
|
31 class CRunningAppServer : public CServer2, |
|
32 public MHsDataObserver, |
|
33 public MHsDataObserverStorage |
|
34 { |
|
35 public: |
|
36 /** |
|
37 * Destructor. |
|
38 */ |
|
39 ~CRunningAppServer(); |
|
40 |
|
41 /** |
|
42 * Two-phased constructor. |
|
43 */ |
|
44 static CRunningAppServer* NewLC(); |
|
45 |
|
46 public: //MHsDataObserver |
|
47 void DataChanged(); |
|
48 |
|
49 public: //MHsDataObserverStorage |
|
50 void PushL(CHsDataObserver*); |
|
51 void Pop(CHsDataObserver*); |
|
52 void Cancel(const RMessage2&); |
|
53 |
|
54 private: |
|
55 /** |
|
56 * Constructor for performing 1st stage construction |
|
57 */ |
|
58 CRunningAppServer(); |
|
59 |
|
60 /** |
|
61 * Default constructor for performing 2nd stage construction |
|
62 */ |
|
63 void ConstructL(); |
|
64 |
|
65 /** |
|
66 * Interface implementation |
|
67 * @see CServer2::NewSessionL(const TVersion&, const RMessage2&) |
|
68 */ |
|
69 CSession2* NewSessionL(const TVersion& version, const RMessage2& message) const; |
|
70 private: |
|
71 RPointerArray<CHsDataObserver> mObservers; |
|
72 CRunningAppStorage* mStorage; |
|
73 }; |
|
74 |
|
75 #endif // RUNNINGAPPSERVER_H |