|
1 /* |
|
2 * Copyright (c) 2002 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: observe system idle event |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef IDLEOBSERVER_H |
|
21 #define IDLEOBSERVER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32property.h> |
|
25 // CONSTANTS |
|
26 // MACROS |
|
27 // DATA TYPES |
|
28 // FUNCTION PROTOTYPES |
|
29 // FORWARD DECLARATIONS |
|
30 class CDRMHelperServer; |
|
31 |
|
32 |
|
33 // CLASS DECLARATION |
|
34 |
|
35 /** |
|
36 * End time based rights storage class |
|
37 * |
|
38 * |
|
39 * @lib DRMHelperServer.lib |
|
40 * @since Series60 2.6 |
|
41 */ |
|
42 class CIdleObserver : public CActive |
|
43 { |
|
44 public: // Constructors and destructor |
|
45 |
|
46 /** |
|
47 * Two-phased constructor. |
|
48 */ |
|
49 static CIdleObserver* NewL(CDRMHelperServer& aServer); |
|
50 |
|
51 /** |
|
52 * Destructor. |
|
53 */ |
|
54 virtual ~CIdleObserver(); |
|
55 |
|
56 |
|
57 public: // New functions |
|
58 /** |
|
59 * StartL starts the system agent and listen to the event |
|
60 * @since Series60 2.6 |
|
61 * @param |
|
62 * @return |
|
63 */ |
|
64 void StartL(); |
|
65 public: // Functions from base classes |
|
66 protected: // New functions |
|
67 |
|
68 /** |
|
69 * From CActive |
|
70 * @since Series60 2.6 |
|
71 */ |
|
72 void RunL(); |
|
73 |
|
74 /** |
|
75 * From CActive |
|
76 * @since Series60 2.6 |
|
77 */ |
|
78 void DoCancel(); |
|
79 |
|
80 |
|
81 protected: // Functions from base classes |
|
82 private: |
|
83 |
|
84 /** |
|
85 * C++ default constructor. |
|
86 */ |
|
87 CIdleObserver( CDRMHelperServer& aServer ); |
|
88 |
|
89 /** |
|
90 * By default Symbian 2nd phase constructor is private. |
|
91 */ |
|
92 void ConstructL(); |
|
93 |
|
94 // Prohibit copy constructor if not deriving from CBase. |
|
95 CIdleObserver( const CIdleObserver& ); |
|
96 // Prohibit assigment operator if not deriving from CBase. |
|
97 CIdleObserver& operator=( const CIdleObserver& ); |
|
98 |
|
99 |
|
100 |
|
101 |
|
102 public: // Data |
|
103 protected: // Data |
|
104 private: // Data |
|
105 // helper server reference |
|
106 CDRMHelperServer& iServer; |
|
107 // For getting notify on idle screen available event. |
|
108 RProperty iProperty; |
|
109 public: // Friend classes |
|
110 protected: // Friend classes |
|
111 private: // Friend classes |
|
112 |
|
113 |
|
114 }; |
|
115 |
|
116 #endif // IDLEOBSERVER_H |
|
117 |
|
118 // End of File |