sysstatemgmt/systemstatemgr/inc/ssmstate.h
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 // Copyright (c) 2007-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 #ifndef __SSMSTATE_H__
       
    17 #define __SSMSTATE_H__
       
    18 
       
    19 #include <e32std.h>
       
    20 #include <ssm/ssmstates.hrh>
       
    21 
       
    22 /**
       
    23  The maximum length of a System State Name
       
    24  
       
    25  @see TSsmState
       
    26  
       
    27  @publishedPartner
       
    28  @released
       
    29  */
       
    30 const TInt KMaxSsmStateName = 11;
       
    31 
       
    32 /**
       
    33  A buffer for a System State Name
       
    34  
       
    35  @see TSsmState
       
    36   
       
    37  @publishedPartner
       
    38 @released
       
    39  */
       
    40 typedef TBuf<KMaxSsmStateName> TSsmStateName;
       
    41 
       
    42 /**
       
    43  Encapsulates the System State.
       
    44  
       
    45  @publishedPartner
       
    46 @released
       
    47  */
       
    48 NONSHARABLE_CLASS(TSsmState)
       
    49 	{
       
    50 public:
       
    51 	IMPORT_C TSsmState();
       
    52 	IMPORT_C TSsmState(TSsmMainSystemStates aMainState, TUint16 aSubState);
       
    53 	IMPORT_C TSsmState(TUint16 aMainState, TUint16 aSubState);
       
    54 	IMPORT_C TSsmState(const TSsmState& aState);
       
    55 	IMPORT_C TUint16 MainState() const;
       
    56 	IMPORT_C TUint16 SubState() const;
       
    57 	IMPORT_C void Set(TUint16 aMainState, TUint16 aSubState);
       
    58 	IMPORT_C TUint32 Int() const;
       
    59 	IMPORT_C void SetFromInt(TUint32 aValue);
       
    60 	IMPORT_C TSsmStateName Name() const;
       
    61 	IMPORT_C TSsmState& operator=(const TSsmState& aState);
       
    62 	IMPORT_C TBool operator==(const TSsmState& aState) const;
       
    63 	IMPORT_C TBool operator!=(const TSsmState& aState) const;
       
    64 private:
       
    65 	TUint16 iMainState;
       
    66 	TUint16 iSubState;
       
    67 	};
       
    68 
       
    69 #endif