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