|
1 /* |
|
2 * Copyright (c) 2002-2006 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: Interface for Publish and suscripe change notifier. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef MSATSYSTEMSTATECHANGENOTIFIER_H |
|
21 #define MSATSYSTEMSTATECHANGENOTIFIER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32std.h> |
|
25 |
|
26 // CONSTANTS |
|
27 // Indicates that the observer doesn't want to specify any value, when it should |
|
28 // be notified. In this case, the changed value is sent to observer |
|
29 const TInt KNotifyValueNotSet = -1; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * Change notifier for Publish & Subscribe. |
|
35 * |
|
36 * @lib SatSystemState |
|
37 * @since Series 60 3.0 |
|
38 */ |
|
39 class MSatSystemStateChangeNotifier |
|
40 { |
|
41 public: // Constructors and destructor |
|
42 |
|
43 /** |
|
44 * Destructor. |
|
45 */ |
|
46 virtual ~MSatSystemStateChangeNotifier() {}; |
|
47 |
|
48 public: // New functions |
|
49 |
|
50 /** |
|
51 * Request a notification of a change in system state. |
|
52 * The request is standing as long as it is canceled. |
|
53 */ |
|
54 virtual void NotifyChangeL() = 0; |
|
55 |
|
56 /** |
|
57 * Cancels the notification request. |
|
58 */ |
|
59 virtual void CancelNotify() = 0; |
|
60 |
|
61 /** |
|
62 * Gets the current value. |
|
63 * @return Current value for earlier request. |
|
64 */ |
|
65 virtual TInt GetValueInt() { return KNotifyValueNotSet; }; |
|
66 |
|
67 protected: // New functions |
|
68 |
|
69 /** |
|
70 * C++ default constructor. |
|
71 */ |
|
72 MSatSystemStateChangeNotifier() {}; |
|
73 |
|
74 private: |
|
75 |
|
76 // Prohibit copy constructor if not deriving from CBase. |
|
77 MSatSystemStateChangeNotifier( const MSatSystemStateChangeNotifier& ); |
|
78 |
|
79 // Prohibit assigment operator if not deriving from CBase. |
|
80 MSatSystemStateChangeNotifier& operator=( const MSatSystemStateChangeNotifier& ); |
|
81 |
|
82 }; |
|
83 |
|
84 #endif // MSATSYSTEMSTATECHANGENOTIFIER_H |
|
85 |
|
86 // End of File |