sysstatemgmt/ssmpolicyplugins/ssmfailpolicy/inc/ssmfailpolicy.h
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     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 CSsmFailPolicy class.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef SSMFAILPOLICY_H
       
    19 #define SSMFAILPOLICY_H
       
    20 
       
    21 #include "ssmstatepolicybase.h"
       
    22 
       
    23 /**
       
    24 *  SSM fail state policy plugin class
       
    25 *
       
    26 */
       
    27 NONSHARABLE_CLASS( CSsmFailPolicy ) : public CSsmStatePolicyBase
       
    28     {
       
    29 
       
    30 public:
       
    31 
       
    32     /**
       
    33     * Constructs a CSsmFailPolicy object.
       
    34     *
       
    35     * @return The new object
       
    36     */
       
    37     IMPORT_C static MSsmStatePolicy* NewL();
       
    38 
       
    39     /**
       
    40     * Destructor.
       
    41     */
       
    42     virtual ~CSsmFailPolicy();
       
    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     /**
       
    76     * First phase constructor.
       
    77     */
       
    78     CSsmFailPolicy();
       
    79 
       
    80     };
       
    81 
       
    82 #endif // SSMFAILPOLICY_H