camerauis/cameraxui/cxengine/src/cxestatemachine.cpp
changeset 48 42ba2d16bf40
parent 19 d9aefe59d544
equal deleted inserted replaced
37:64817133cd1d 48:42ba2d16bf40
     1 /*
     1 /*
     2  * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     2  * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
     3  * All rights reserved.
     3  * All rights reserved.
     4  * This component and the accompanying materials are made available
     4  * This component and the accompanying materials are made available
     5  * under the terms of "Eclipse Public License v1.0"
     5  * under the terms of "Eclipse Public License v1.0"
     6  * which accompanies this distribution, and is available
     6  * which accompanies this distribution, and is available
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    12  * Contributors:
    12  * Contributors:
    13  *
    13  *
    14  * Description:
    14  * Description:
    15  *
    15  *
    16  */
    16  */
       
    17  
    17 #include "cxestatemachine.h"
    18 #include "cxestatemachine.h"
    18 #include "cxestate.h"
    19 #include "cxestate.h"
    19 #include "cxutils.h"
    20 #include "cxutils.h"
    20 
    21 
    21 CxeStateMachine::CxeStateMachine( const char* stateMachineName ) :
    22 CxeStateMachine::CxeStateMachine(const char *stateMachineName) :
    22     CxeStateMachineBase(stateMachineName)
    23     CxeStateMachineBase(stateMachineName)
    23 {
    24 {
    24 }
    25 }
    25 
    26 
    26 CxeStateMachine::~CxeStateMachine()
    27 CxeStateMachine::~CxeStateMachine()
    27 {
    28 {
    28 
    29 
    29 }
    30 }
    30 
    31 
    31 bool CxeStateMachine::addState( CxeState* state )
    32 bool CxeStateMachine::addState(CxeState *state)
    32 {
    33 {
    33     CX_DEBUG_ENTER_FUNCTION();
    34     CX_DEBUG_ENTER_FUNCTION();
    34     bool success = CxeStateMachineBase::addState(state);
    35     bool success = CxeStateMachineBase::addState(state);
    35     CX_DEBUG_ASSERT(success);
    36     CX_DEBUG_ASSERT(success);
    36     CX_DEBUG_EXIT_FUNCTION();
    37     CX_DEBUG_EXIT_FUNCTION();
    37     return success;
    38     return success;
    38 }
    39 }
    39 
    40 
    40 bool CxeStateMachine::setState( int stateId, int error )
    41 bool CxeStateMachine::setState(int stateId, CxeError::Id error)
    41 {
    42 {
    42     CX_DEBUG_ENTER_FUNCTION();
    43     CX_DEBUG_ENTER_FUNCTION();
    43     bool success = CxeStateMachineBase::setState(stateId, error);
    44     bool success = CxeStateMachineBase::setState(stateId, error);
    44     CX_DEBUG_ASSERT(success);
    45     CX_DEBUG_ASSERT(success);
    45     CX_DEBUG_EXIT_FUNCTION();
    46     CX_DEBUG_EXIT_FUNCTION();
    46     return success;
    47     return success;
    47 }
    48 }
    48 
    49 
    49 bool CxeStateMachine::setInitialState( int stateId )
    50 bool CxeStateMachine::setInitialState(int stateId)
    50 {
    51 {
    51     CX_DEBUG_ENTER_FUNCTION();
    52     CX_DEBUG_ENTER_FUNCTION();
    52     bool success = CxeStateMachineBase::setInitialState(stateId);
    53     bool success = CxeStateMachineBase::setInitialState(stateId);
    53     CX_DEBUG_ASSERT(success);
    54     CX_DEBUG_ASSERT(success);
    54     CX_DEBUG_EXIT_FUNCTION();
    55     CX_DEBUG_EXIT_FUNCTION();
    55     return success;
    56     return success;
    56 }
    57 }
    57 
       
    58 
       
    59 
       
    60 
       
    61