116
|
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 |
#include <e32base.h>
|
|
21 |
#include <e32event.h>
|
|
22 |
#include <w32std.h>
|
|
23 |
#include <apgcli.h>
|
|
24 |
|
|
25 |
/**
|
|
26 |
* Interface decalre methods to access initialized OS resources
|
|
27 |
*/
|
|
28 |
class MTsResourceManager
|
|
29 |
{
|
|
30 |
public:
|
|
31 |
/**
|
|
32 |
* Access to initialized window server session
|
|
33 |
*/
|
|
34 |
virtual RWsSession& WsSession() =0;
|
|
35 |
|
|
36 |
/**
|
|
37 |
* Access to initilaized APA session
|
|
38 |
*/
|
|
39 |
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 |
|
|
54 |
/**
|
|
55 |
* Destructor
|
|
56 |
*/
|
|
57 |
~CTsResourceManager();
|
|
58 |
|
|
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
|