|
1 /* |
|
2 * Copyright (c) 2002-2008 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: Event monitor interface |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MSATEVENTMONITOR_H |
|
20 #define MSATEVENTMONITOR_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 // CLASS DECLARATION |
|
25 |
|
26 /** |
|
27 * Interface for event monitors. |
|
28 * |
|
29 * @lib EventMonitors.lib |
|
30 * @since Series 60 3.0 |
|
31 */ |
|
32 class MSatEventMonitor |
|
33 { |
|
34 public: // Enums |
|
35 |
|
36 // Monitored events |
|
37 enum TEvent |
|
38 { |
|
39 EUserActivity, |
|
40 EIdleScreenAvailable, |
|
41 ELanguageSelection, |
|
42 ESimRemoved, |
|
43 EBrowserTerminated, |
|
44 EDataAvailable, |
|
45 EChannelStatus |
|
46 }; |
|
47 |
|
48 public: // New functions |
|
49 |
|
50 /** |
|
51 * Cancels event monitoring |
|
52 */ |
|
53 virtual void CancelMonitor() = 0; |
|
54 |
|
55 /** |
|
56 * Updates monitors state. This function call starts or cancels monitor |
|
57 * @param aEvents A list of events to be monitored. If this monitors event |
|
58 * is not on the list, this monitor is cancelled. |
|
59 * @return TInt An error code indicating update status |
|
60 */ |
|
61 virtual TInt UpdateMonitor( TUint aEvents ) = 0; |
|
62 |
|
63 /** |
|
64 * Checks is this event monitor monitoring particular event |
|
65 * @param aEvent Event to check against |
|
66 * @return ETrue if aEvent is the same event this is monitoring |
|
67 */ |
|
68 virtual TBool IsMonitoringEvent( const TInt aEvent ) = 0; |
|
69 |
|
70 /** |
|
71 * Destructor. |
|
72 */ |
|
73 virtual ~MSatEventMonitor() {}; |
|
74 |
|
75 protected: |
|
76 |
|
77 /** |
|
78 * C++ default constructor. |
|
79 */ |
|
80 MSatEventMonitor() {}; |
|
81 |
|
82 private: |
|
83 |
|
84 // Prohibit copy constructor if not deriving from CBase. |
|
85 MSatEventMonitor( const MSatEventMonitor& ); |
|
86 |
|
87 // Prohibit assigment operator if not deriving from CBase. |
|
88 MSatEventMonitor& operator=( const MSatEventMonitor& ); |
|
89 |
|
90 }; |
|
91 |
|
92 #endif // MSATEVENTMONITOR_H |
|
93 |
|
94 // End of file |