vtengines/videoteleng/Src/State/CVtEngStateIdle.cpp
changeset 18 d9b6a8729acd
parent 4 6dc066157ed4
child 23 c378a0498b84
child 27 dcbddbbaf8fd
--- a/vtengines/videoteleng/Src/State/CVtEngStateIdle.cpp	Tue Jan 26 12:01:21 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,153 +0,0 @@
-/*
-* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Idle state
-*
-*/
-
-
-// INCLUDE FILES
-#include    "CVtEngStateIdle.h"
-#include    <cvtlogger.h>
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CVtEngStateIdle::CVtEngStateIdle
-// C++ constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CVtEngStateIdle::CVtEngStateIdle( 
-    CVtEngStateManager& aStateManager,
-    CVtEngEventManager& aEventManager )
-    : CVtEngStateBase( aStateManager, aEventManager )
-    {
-    }
-
-// Destructor
-CVtEngStateIdle::~CVtEngStateIdle()
-    {
-    __VTPRINT( DEBUG_DESTRUCT, "~Stateidl")
-    }
-
-
-// -----------------------------------------------------------------------------
-// CVtEngStateIdle::UpdateL
-// Updates state
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CVtEngStateIdle::UpdateL()
-    {
-    __VTPRINTENTER( "StateIdle.Update")
-   
-    const MVtCtlCallControl::TVtCtlState state = SessionHandler().RealState();
-    CVtEngStateBase* newState = NULL;
-    
-    if( iStateManager.PreviousSessionState() == MVtEngSessionInfo::EUnknown )
-        {
-        switch ( state )
-            {
-            case MVtCtlCallControl::EInitializing:
-                newState = NewStateL( MVtEngSessionInfo::EInitializing );
-                break;
-            case MVtCtlCallControl::EAlerting:
-                newState = NewStateL( MVtEngSessionInfo::ERemoteAlerting );
-                break;
-            case MVtCtlCallControl::ERinging:
-                newState = NewStateL( MVtEngSessionInfo::EReceiving );
-                break;
-            case MVtCtlCallControl::EConnected:
-                newState = NegotiatingOrConnectedStateL();
-                break;
-            default:
-                break;
-            }
-        if ( newState )
-            {
-            CVtEngUtility* utils = CVtEngUtility::EngineUtils();
-            
-            // Notify UI about initial autolock state. UI must have this
-            // information early enough to deduce if it is allowed to 
-            // go to foreground.
-            utils->NotifyLockState();            
-            utils->StartSATListenL();
-            newState->OpenL( this );
-            }
-        }
-    else
-        {
-        __VTPRINT( DEBUG_GEN, "StateIdle.Update wrong previous state, ignoring")        
-        }
-    __VTPRINTEXIT( "StateIdle.Update")
-    }
-
-// -----------------------------------------------------------------------------
-// CVtEngStateIdle::OpenL
-// State transition to idle.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CVtEngStateIdle::DoOpenL()
-    {
-    __VTPRINTENTER( "StateIdle.Open")
-    // Reset settings
-    CVtEngSettings& settings = CVtEngUtility::Settings();
-    settings.ResetAll();
-    
-    NotifyStateChange( MVtEngSessionInfo::EIdle );
-    __VTPRINTEXIT( "StateIdle.Open")
-    }
-
-// -----------------------------------------------------------------------------
-// CVtEngStateIdle::ValidateCommand
-// Returns if a command is valid in idle state.
-// 
-// -----------------------------------------------------------------------------
-//
-TBool CVtEngStateIdle::ValidateCommand(
-            const TVtEngCommandId aCommandId )
-    {
-    __VTPRINT( DEBUG_DETAIL | DEBUG_GEN, "StateIdle.Validate")
-    TBool okToPerform( EFalse );
-    switch ( aCommandId )
-        {
-        case KVtEngPrepareViewFinder:        
-        case KVtEngPrepareRemoteRenderDSA:
-        case KVtEngPrepareRemoteRenderDP:
-        case KVtEngPrepareRemoteRender:
-        case KVtEngPrepareRemoteRenderNGA:
-            okToPerform = ETrue;
-            break;
-        default:
-            okToPerform = CVtEngStateBase::ValidateCommand( aCommandId );
-            break;
-        }
-    return okToPerform;
-    }
-
-// -----------------------------------------------------------------------------
-// CVtEngStateIdle::State
-// Returns session state.
-// 
-// -----------------------------------------------------------------------------
-//
-MVtEngSessionInfo::TSessionState CVtEngStateIdle::State() const
-    {
-    return MVtEngSessionInfo::EIdle;
-    }
-
-
-// End of File