|
1 /* |
|
2 * Copyright (c) 2009 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: Declaration of CSsmPowerSup class. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef C_SSMPOWERSUP_H |
|
19 #define C_SSMPOWERSUP_H |
|
20 |
|
21 #include <e32base.h> |
|
22 #include <ssm/ssmadaptationcli.h> |
|
23 #include <ssm/ssmutility.h> |
|
24 |
|
25 /** |
|
26 * SSM Utility plugin listening for DOS originated reset and shutdown events. |
|
27 */ |
|
28 NONSHARABLE_CLASS( CSsmPowerSup ) : public CActive, public MSsmUtility |
|
29 { |
|
30 |
|
31 public: |
|
32 |
|
33 /** |
|
34 * Two-phase constructor. |
|
35 */ |
|
36 IMPORT_C static MSsmUtility* NewL(); |
|
37 |
|
38 /** |
|
39 * Destructor. |
|
40 */ |
|
41 virtual ~CSsmPowerSup(); |
|
42 |
|
43 private: // From CActive |
|
44 |
|
45 void RunL(); |
|
46 void DoCancel(); |
|
47 |
|
48 private: // From MSsmUtility |
|
49 |
|
50 void InitializeL(); |
|
51 void StartL(); |
|
52 void Release(); |
|
53 |
|
54 private: |
|
55 |
|
56 /** |
|
57 * First phase constructor. |
|
58 */ |
|
59 CSsmPowerSup(); |
|
60 |
|
61 /** |
|
62 * Activate the active object. |
|
63 */ |
|
64 void Activate(); |
|
65 |
|
66 private: // data |
|
67 |
|
68 /** Session with adaptation server. */ |
|
69 RSsmStateAdaptation iAdaptation; |
|
70 |
|
71 /** Event data will be received here. */ |
|
72 TPckgBuf<TSsmCoopSysEventType> iEventBuf; |
|
73 |
|
74 }; |
|
75 |
|
76 #endif // C_SSMPOWERSUP_H |