equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 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: Shutdown watcher header file |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef _SWIDAEMON_SHUTDOWNWATHCER_H |
|
20 #define _SWIDAEMON_SHUTDOWNWATHCER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <e32property.h> |
|
24 |
|
25 /** |
|
26 * Shutdown observer |
|
27 * Gets notification when the system is going down |
|
28 * |
|
29 * @since S60 v5.0 |
|
30 */ |
|
31 class MShutdownObserver |
|
32 { |
|
33 public: |
|
34 /** |
|
35 * Notification when system is shutting down |
|
36 */ |
|
37 virtual void NotifyShuttingDown()=0; |
|
38 }; |
|
39 |
|
40 /** |
|
41 * Shutdown watcher |
|
42 * Notifies MShutdownObserver when the system is going down |
|
43 * |
|
44 * @since S60 v5.0 |
|
45 */ |
|
46 class CShutdownWatcher : public CActive |
|
47 { |
|
48 public: |
|
49 static CShutdownWatcher* NewL( MShutdownObserver& aObserver ); |
|
50 ~CShutdownWatcher(); |
|
51 |
|
52 /** |
|
53 * Starts to watch shutdown status |
|
54 * @return none |
|
55 */ |
|
56 void Start(); |
|
57 |
|
58 private: |
|
59 CShutdownWatcher( MShutdownObserver& aObserver ); |
|
60 void ConstructL(); |
|
61 void IssueRequest(); |
|
62 |
|
63 // from CActive |
|
64 void DoCancel(); |
|
65 void RunL(); |
|
66 |
|
67 private: |
|
68 MShutdownObserver& iObserver; |
|
69 RProperty iProperty; |
|
70 }; |
|
71 |
|
72 #endif //_SWIDAEMON_SHUTDOWNWATHCER_H |