1 /* |
|
2 * Copyright (c) 2007 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: Power shutdown -watcher header file |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef _SCONSHUTDOWNWATCHER_H |
|
20 #define _SCONSHUTDOWNWATCHER_H |
|
21 |
|
22 |
|
23 #include <e32base.h> |
|
24 #include <e32property.h> |
|
25 |
|
26 //============================================================ |
|
27 // Class MShutdownObserver declaration |
|
28 //============================================================ |
|
29 class MShutdownObserver |
|
30 { |
|
31 public: |
|
32 virtual void NotifyShutdown()=0; |
|
33 }; |
|
34 |
|
35 //============================================================ |
|
36 // Class CShutdownWatcher declaration |
|
37 //============================================================ |
|
38 NONSHARABLE_CLASS ( CShutdownWatcher ) : public CActive |
|
39 { |
|
40 public: |
|
41 static CShutdownWatcher* NewL( MShutdownObserver* aObserver ); |
|
42 ~CShutdownWatcher(); |
|
43 |
|
44 /** |
|
45 * Starts to watch shutdown status |
|
46 * @return none |
|
47 */ |
|
48 void StartShutdownWatcher(); |
|
49 |
|
50 private: |
|
51 //construct/destruct |
|
52 CShutdownWatcher( MShutdownObserver* aObserver ); |
|
53 void ConstructL(); |
|
54 |
|
55 // from CActive |
|
56 void DoCancel(); |
|
57 void RunL(); |
|
58 |
|
59 private: |
|
60 MShutdownObserver* iObserver; |
|
61 RProperty iProperty; |
|
62 }; |
|
63 |
|
64 #endif //_SCONSHUTDOWNWATCHER_H |
|
65 |
|
66 // End of file |
|