|
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 CSsmShutdownPolicy class. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef C_SSMSHUTDOWNPOLICY_H |
|
19 #define C_SSMSHUTDOWNPOLICY_H |
|
20 |
|
21 #include "ssmstatepolicybase.h" |
|
22 |
|
23 /** |
|
24 * SSM shutdown policy plugin class |
|
25 * |
|
26 */ |
|
27 NONSHARABLE_CLASS( CSsmShutdownPolicy ) : public CSsmStatePolicyBase |
|
28 { |
|
29 |
|
30 public: |
|
31 |
|
32 /** |
|
33 * Constructs a CSsmShutdownPolicy object. |
|
34 * |
|
35 * @return The new object |
|
36 */ |
|
37 IMPORT_C static MSsmStatePolicy* NewL(); |
|
38 |
|
39 /** |
|
40 * Destructor. |
|
41 */ |
|
42 virtual ~CSsmShutdownPolicy(); |
|
43 |
|
44 private: // From MSsmStatePolicy |
|
45 |
|
46 /** |
|
47 * Used to determine the next minor state transition. |
|
48 * |
|
49 * @param aCurrentTransition Contains the last executed state transition. |
|
50 * @param aReason Contains the reason as given by the request |
|
51 * @param aError Contains the completion code from the last executed sub-state transition |
|
52 * @param aSeverity Contains the severity of the failed command in case the sub-state transition ended with an error |
|
53 * @param aNextState The next System State to head for, if there is one |
|
54 * @return ETrue if aNextState contains another System State to head for, or |
|
55 * EFalse if there is no further transitions to do. |
|
56 */ |
|
57 TBool GetNextState( |
|
58 TSsmState aCurrentTransition, |
|
59 TInt aReason, |
|
60 TInt aError, |
|
61 TInt aSeverity, |
|
62 TSsmState& aNextState ); |
|
63 |
|
64 private: // From CSsmPolicyBase |
|
65 |
|
66 void GetCommandListPathL( TDes& aCmdListPath ); |
|
67 |
|
68 private: // From CSsmStatePolicyBase |
|
69 |
|
70 TBool IsAllowedTargetState( const TSsmStateTransition& aRequest ) const; |
|
71 TUint16 TargetSubState( const TUint16 aRequestedSubState ); |
|
72 |
|
73 private: |
|
74 |
|
75 void StoreStartupReasonL( const TInt aReasonCode ); |
|
76 |
|
77 private: |
|
78 |
|
79 /** |
|
80 * First phase constructor. |
|
81 */ |
|
82 CSsmShutdownPolicy(); |
|
83 |
|
84 }; |
|
85 |
|
86 #endif // C_SSMSHUTDOWNPOLICY_H |