|
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 TSRESOURCEMANAGER_H |
|
18 #define TSRESOURCEMANAGER_H |
|
19 |
|
20 #ifndef __E32SVR_H__ |
|
21 #define __E32SVR_H__ |
|
22 #endif |
|
23 #include <e32base.h> |
|
24 #include <e32event.h> |
|
25 #include <w32std.h> |
|
26 #include <apgcli.h> |
|
27 |
|
28 /** |
|
29 * Interface decalre methods to access initialized OS resources |
|
30 */ |
|
31 class MTsResourceManager |
|
32 { |
|
33 public: |
|
34 /** |
|
35 * Access to initialized window server session |
|
36 */ |
|
37 virtual RWsSession& WsSession() =0; |
|
38 |
|
39 /** |
|
40 * Access to initilaized APA session |
|
41 */ |
|
42 virtual RApaLsSession& ApaSession() =0; |
|
43 }; |
|
44 |
|
45 /** |
|
46 * Resource manager implemetatioin |
|
47 */ |
|
48 class CTsResourceManager: public CBase, |
|
49 public MTsResourceManager |
|
50 { |
|
51 public: |
|
52 /** |
|
53 * Two phase constructor |
|
54 */ |
|
55 IMPORT_C static CTsResourceManager* NewL(); |
|
56 |
|
57 /** |
|
58 * Destructor |
|
59 */ |
|
60 IMPORT_C ~CTsResourceManager(); |
|
61 |
|
62 /** |
|
63 * @see MTsResourceManager::WsSession |
|
64 */ |
|
65 IMPORT_C RWsSession& WsSession(); |
|
66 |
|
67 /** |
|
68 * @see MTsResourceManager::ApaSession |
|
69 */ |
|
70 IMPORT_C RApaLsSession& ApaSession(); |
|
71 |
|
72 private: |
|
73 /** |
|
74 * Second phase constructor |
|
75 */ |
|
76 void ConstructL(); |
|
77 |
|
78 private: |
|
79 RWsSession mWsSession; |
|
80 RApaLsSession mApaSeesion; |
|
81 }; |
|
82 |
|
83 |
|
84 |
|
85 #endif // TSRESOURCEMANAGER_H |