125
|
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 TSWINDOWGROUPMONITORIMP_H
|
|
18 |
#define TSWINDOWGROUPMONITORIMP_H
|
|
19 |
|
|
20 |
#include "tswindowgroupsmonitor.h"
|
127
|
21 |
#include "tsdatastorage.h"
|
|
22 |
|
|
23 |
class CTsRunningAppStorage;
|
125
|
24 |
|
|
25 |
/**
|
|
26 |
* Window server monitor implementation.
|
|
27 |
*/
|
|
28 |
class CTsWindowGroupsMonitor: public CActive,
|
127
|
29 |
public MTsWindowGroupsMonitor,
|
|
30 |
public MTsDataStorage
|
125
|
31 |
{
|
|
32 |
public:
|
|
33 |
/**
|
|
34 |
* Two phase constructor
|
|
35 |
*/
|
|
36 |
static CTsWindowGroupsMonitor* NewL(MTsResourceManager &);
|
|
37 |
|
|
38 |
/**
|
|
39 |
* Destructor
|
|
40 |
*/
|
|
41 |
~CTsWindowGroupsMonitor();
|
|
42 |
|
|
43 |
/**
|
|
44 |
* @see MTsWindowGroupsMonitor::SubscribeL
|
|
45 |
*/
|
|
46 |
void SubscribeL(MTsWindowGroupsObserver &);
|
|
47 |
|
|
48 |
/**
|
|
49 |
* @see MTsWindowGroupsMonitor::Cancel
|
|
50 |
*/
|
|
51 |
void Cancel(MTsWindowGroupsObserver &);
|
127
|
52 |
const MTsRunningApplicationStorage& Storage() const;
|
|
53 |
|
|
54 |
public://from MTsDataStorage
|
|
55 |
TBool IsSupported(TInt aFunction) const;
|
|
56 |
void HandleDataL(TInt aFunction, RReadStream& aDataStream);
|
125
|
57 |
|
|
58 |
protected:
|
|
59 |
/**
|
|
60 |
* @see CActive::RunL
|
|
61 |
*/
|
|
62 |
void RunL();
|
|
63 |
|
|
64 |
/**
|
|
65 |
* @see CActive::DoCancel
|
|
66 |
*/
|
|
67 |
void DoCancel();
|
|
68 |
|
|
69 |
/**
|
|
70 |
* @see CActive::RunError
|
|
71 |
*/
|
|
72 |
TInt RunError(TInt error);
|
|
73 |
|
|
74 |
private:
|
|
75 |
/**
|
|
76 |
* First phase constructor
|
|
77 |
*/
|
|
78 |
CTsWindowGroupsMonitor(MTsResourceManager &);
|
|
79 |
|
|
80 |
/**
|
|
81 |
* Second phase constructor
|
|
82 |
*/
|
|
83 |
void ConstructL();
|
|
84 |
|
|
85 |
/**
|
|
86 |
* Function subscribe for event to window server and activate object
|
|
87 |
*/
|
|
88 |
void Subscribe();
|
|
89 |
|
|
90 |
/**
|
|
91 |
* Function provide window server event to observers
|
|
92 |
*/
|
|
93 |
void ProvideEventL();
|
|
94 |
|
127
|
95 |
void RefreshCacheL();
|
|
96 |
|
125
|
97 |
private:
|
|
98 |
/**
|
|
99 |
* Registry of subscribed observers
|
|
100 |
*/
|
|
101 |
RPointerArray<MTsWindowGroupsObserver> iObservers;
|
|
102 |
|
|
103 |
/**
|
|
104 |
* Resources manager
|
|
105 |
*/
|
|
106 |
MTsResourceManager& iResources;
|
|
107 |
|
|
108 |
/**
|
|
109 |
* Monitor window group
|
|
110 |
*/
|
|
111 |
RWindowGroup iWg;
|
127
|
112 |
|
|
113 |
/**
|
|
114 |
*
|
|
115 |
*/
|
|
116 |
CTsRunningAppStorage* iCache;
|
125
|
117 |
};
|
|
118 |
#endif//TSWINDOWGROUPMONITORIMP_H
|