sysstatemgmt/systemstarter/src/StartupStateInfo.h
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #if !defined (__STARTUPSTATEINFO_H__)
       
    17 #define __STARTUPSTATEINFO_H__
       
    18 
       
    19 #include "StartupCommand.h"
       
    20 
       
    21 #include <startup.hrh>
       
    22 typedef  RPointerArray<MStartupCommand> CommandList;
       
    23 	
       
    24 /** Definition of the required information for a startup state.
       
    25 @internalComponent
       
    26 @deprecated
       
    27 @see TStartupStateIdentifier
       
    28 */
       
    29 class MStartupStateInfo
       
    30 	{
       
    31 public:
       
    32     virtual ~MStartupStateInfo() {}
       
    33 
       
    34 public:
       
    35 	/** State id for publishing to state-aware applications
       
    36 	*/
       
    37     virtual TUint8 StateId() const = 0;
       
    38     
       
    39     /** State name - for general purposes (e.g. logging)
       
    40     */
       
    41     virtual TPtrC Name() const = 0;
       
    42      
       
    43     /** List of commands to be executed by this state
       
    44     */
       
    45 	virtual const CommandList GetCommandList() const = 0;
       
    46 	
       
    47 	/** Get a count of the number of commands in the list
       
    48 	*/
       
    49 	virtual TInt Count() const = 0;
       
    50 	
       
    51 	/** Number of re-attempts to be made to change state after 
       
    52 	transition failure.
       
    53 	*/
       
    54  	virtual TNoOfRetries NoOfRetries() const = 0;
       
    55  	
       
    56  	/** Action to be taken on state transition failure.
       
    57  	*/
       
    58  	virtual TActionOnStateTransitionFailure ActionOnStateTransitionFailure() const = 0;
       
    59 	
       
    60 	/* Get a command from the list. The implementation should mimic the
       
    61 	action of RPointerArray::operator[] if the index is out of range
       
    62 	*/
       
    63 	virtual MStartupCommand* GetCommand(TInt aIndex) const = 0;
       
    64 	};
       
    65 
       
    66 #endif // __STARTUPSTATEINFO_H__