sysstatemgmt/ssmpolicyplugins/ssmstartuppolicy/inc/ssmstartuppolicy.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 CSsmStartupPolicy class.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef C_SSMSTARTUPPOLICY_H
       
    19 #define C_SSMSTARTUPPOLICY_H
       
    20 
       
    21 #include "ssmstatepolicybase.h"
       
    22 
       
    23 /**
       
    24 *  SSM startup policy plugin class
       
    25 *
       
    26 */
       
    27 NONSHARABLE_CLASS( CSsmStartupPolicy ) : public CSsmStatePolicyBase
       
    28     {
       
    29 
       
    30 public:
       
    31 
       
    32     /**
       
    33     * Constructs a CSsmStartupPolicy object.
       
    34     *
       
    35     * @return The new object
       
    36     */
       
    37     IMPORT_C static MSsmStatePolicy* NewL();
       
    38 
       
    39     /**
       
    40     * Destructor.
       
    41     */
       
    42     virtual ~CSsmStartupPolicy();
       
    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     TBool IsSimlessOfflineSupported();
       
    76     TUint16 SelectStateAfterSecurityCheck();
       
    77     void ClearResetCounter();
       
    78     void ClearResetCounterL();
       
    79 
       
    80 private:
       
    81 
       
    82     /**
       
    83     * First phase constructor.
       
    84     */
       
    85     CSsmStartupPolicy();
       
    86 
       
    87     /**
       
    88     * Second phase constructor.
       
    89     */
       
    90     void ConstructL();
       
    91 
       
    92 private: // data
       
    93 
       
    94     /**
       
    95     * For future use. Currently always 0.
       
    96     */
       
    97 	TInt iHardwareReason;
       
    98 
       
    99     };
       
   100 
       
   101 #endif // C_SSMSTARTUPPOLICY_H