42
|
1 |
/*
|
|
2 |
* ============================================================================
|
|
3 |
* Name : glxscreensavermonitor.h
|
|
4 |
* Part of : GLX / Collection Data Source Framework
|
|
5 |
* Description :
|
|
6 |
* Version :%version: 1 %
|
|
7 |
* Copyright © 2006-2007 Nokia. All rights reserved.
|
|
8 |
* This material, including documentation and any related computer
|
|
9 |
* programs, is protected by copyright controlled by Nokia. All
|
|
10 |
* rights are reserved. Copying, including reproducing, storing,
|
|
11 |
* adapting or translating, any or all of this material requires the
|
|
12 |
* prior written consent of Nokia. This material also contains
|
|
13 |
* confidential information which may not be disclosed to others
|
|
14 |
* without the prior written consent of Nokia.
|
|
15 |
* ============================================================================
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef PLUGINSCREENSAVERMONITORAO_H_
|
|
19 |
#define PLUGINSCREENSAVERMONITORAO_H_
|
|
20 |
|
|
21 |
#include <e32base.h>
|
|
22 |
#include <e32property.h>
|
|
23 |
|
|
24 |
class MGlxTNObserver
|
|
25 |
{
|
|
26 |
public :
|
|
27 |
/*
|
|
28 |
* Constructor
|
|
29 |
*/
|
|
30 |
MGlxTNObserver() {}
|
|
31 |
/*
|
|
32 |
* Call back to get the number is left to create.
|
|
33 |
*/
|
|
34 |
virtual void updateTNCount(int & count) = 0;
|
|
35 |
/*
|
|
36 |
* Destructor
|
|
37 |
*/
|
|
38 |
virtual ~MGlxTNObserver() {}
|
|
39 |
};
|
|
40 |
|
|
41 |
|
|
42 |
/**
|
|
43 |
* Class for monitoring harvester pause.
|
|
44 |
*/
|
|
45 |
class CGlxTNMonitor: public CActive
|
|
46 |
{
|
|
47 |
public:
|
|
48 |
/** Construction */
|
|
49 |
IMPORT_C static CGlxTNMonitor* NewL( MGlxTNObserver *observer );
|
|
50 |
|
|
51 |
/**
|
|
52 |
* Destructor - virtual and class not intended
|
|
53 |
* for derivation, so not exported.
|
|
54 |
*/
|
|
55 |
virtual ~CGlxTNMonitor();
|
|
56 |
|
|
57 |
protected:
|
|
58 |
|
|
59 |
/**
|
|
60 |
* RunL
|
|
61 |
* From CActive.
|
|
62 |
*/
|
|
63 |
virtual void RunL();
|
|
64 |
|
|
65 |
/**
|
|
66 |
* DoCancel
|
|
67 |
* From CActive.
|
|
68 |
*/
|
|
69 |
virtual void DoCancel();
|
|
70 |
|
|
71 |
/**
|
|
72 |
* RunError. Error handler in case RunL() leaves.
|
|
73 |
* From CActive.
|
|
74 |
* @param aError Leave code from RunL.
|
|
75 |
* @return Error code. KErrNone if error was handled.
|
|
76 |
*/
|
|
77 |
virtual TInt RunError( TInt aError );
|
|
78 |
|
|
79 |
private:
|
|
80 |
/**
|
|
81 |
* constructor
|
|
82 |
*/
|
|
83 |
CGlxTNMonitor( MGlxTNObserver *observer );
|
|
84 |
|
|
85 |
/**
|
|
86 |
* 2nd phase construction.
|
|
87 |
*/
|
|
88 |
void ConstructL();
|
|
89 |
|
|
90 |
private:
|
|
91 |
RProperty iScreenSaverProperty;
|
|
92 |
// TTime iStartTime;
|
|
93 |
// TTime iStopTime;
|
|
94 |
MGlxTNObserver *iObserver;
|
|
95 |
};
|
|
96 |
|
|
97 |
|
|
98 |
#endif
|
|
99 |
|