sensorservices/tiltcompensationssy/src/tcstate.cpp
changeset 0 4e1aa6a622a0
child 34 b2f9f823b5fb
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 /*
       
     2 * Copyright (c) 2007 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:  CTCState class implementation.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "tcstate.h"
       
    20 #include "trace.h"
       
    21 
       
    22 CTCState::CTCState( TCStateType aType,
       
    23     TCStateId aId,
       
    24     MTCStatePool& aStatePool,
       
    25     MTCTransactionHandler& aTransactionHandler ):
       
    26     iType( aType ),
       
    27     iId( aId ),
       
    28     iStatePool( aStatePool ),
       
    29     iTransactionHandler( aTransactionHandler ),
       
    30     iFlags( 0 )
       
    31     {
       
    32     FUNC_LOG;
       
    33     }
       
    34 
       
    35 // METHODS
       
    36 
       
    37 // ----------------------------------------------------------------------------------
       
    38 // CTCState::Type
       
    39 // ----------------------------------------------------------------------------------
       
    40 //
       
    41 CTCState::TCStateType CTCState::Type() const
       
    42     {
       
    43     FUNC_LOG;
       
    44     
       
    45     return iType;
       
    46     }
       
    47 
       
    48 // ----------------------------------------------------------------------------------
       
    49 // CTCState::Id
       
    50 // ----------------------------------------------------------------------------------
       
    51 //
       
    52 CTCState::TCStateId CTCState::Id() const
       
    53     {
       
    54     FUNC_LOG;
       
    55     
       
    56     return iId;
       
    57     }
       
    58 
       
    59 // ----------------------------------------------------------------------------------
       
    60 // CTCState::Set
       
    61 // ----------------------------------------------------------------------------------
       
    62 //
       
    63 void CTCState::Set( TUint32 aFlag )
       
    64     {
       
    65     FUNC_LOG;
       
    66     
       
    67     iFlags |= aFlag;
       
    68     }
       
    69 
       
    70 // ----------------------------------------------------------------------------------
       
    71 // CTCState::Unset
       
    72 // ----------------------------------------------------------------------------------
       
    73 //
       
    74 void CTCState::Unset( TUint32 aFlag )
       
    75     {
       
    76     FUNC_LOG;
       
    77     
       
    78     iFlags &=~ aFlag;
       
    79     }
       
    80 
       
    81 // ----------------------------------------------------------------------------------
       
    82 // CTCState::IsSet
       
    83 // ----------------------------------------------------------------------------------
       
    84 //
       
    85 TBool CTCState::IsSet( TUint32 /*aFlag*/ )
       
    86     {
       
    87     FUNC_LOG;
       
    88     
       
    89     return ETrue;
       
    90     }
       
    91 
       
    92 // ----------------------------------------------------------------------------------
       
    93 // CTCState::Clear
       
    94 // ----------------------------------------------------------------------------------
       
    95 //
       
    96 void CTCState::Clear()
       
    97     {
       
    98     FUNC_LOG;
       
    99     
       
   100     iFlags = 0;
       
   101     }
       
   102 
       
   103 // End of File