voiceui/voiceuivoicerecognition/src/vuicabortstate.cpp
branchRCL_3
changeset 19 e36f3802f733
parent 0 bf1d17376201
equal deleted inserted replaced
18:cad71a31b7fc 19:e36f3802f733
       
     1 /*
       
     2 * Copyright (c) 2006 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:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include <avkon.hrh>
       
    21 
       
    22 #include "vuicstate.h"
       
    23 #include "vuicabortstate.h"
       
    24 #include "vuicexitstate.h"
       
    25 
       
    26 #include "vuicdatastorage.h"
       
    27 
       
    28 #include "vuicvoicerecogdialogimpl.h"
       
    29 #include "vuictoneplayer.h"
       
    30 
       
    31 #include "rubydebug.h"
       
    32     
       
    33 // -----------------------------------------------------------------------------
       
    34 // CAbortState::NewL
       
    35 // Two-phased constructor.
       
    36 // -----------------------------------------------------------------------------
       
    37 //
       
    38 CAbortState* CAbortState::NewL( CDataStorage& aDataStorage, CUiModel& aUiModel )
       
    39     {
       
    40     CAbortState* self = new (ELeave) CAbortState( aDataStorage, aUiModel );
       
    41     CleanupStack::PushL( self );
       
    42     self->ConstructL();
       
    43     CleanupStack::Pop( self );
       
    44     return self;
       
    45     }       
       
    46     
       
    47 // Destructor       
       
    48 CAbortState::~CAbortState()
       
    49     {
       
    50     RUBY_DEBUG0( "CAbortState::~CAbortState START" );
       
    51     
       
    52     RUBY_DEBUG0( "CAbortState::~CAbortState EXIT" );
       
    53     }
       
    54     
       
    55 // ---------------------------------------------------------
       
    56 // CAbortState::HandleEventL
       
    57 // ---------------------------------------------------------
       
    58 //       
       
    59 void CAbortState::HandleEventL( TInt /*aEvent*/ )
       
    60     {
       
    61     RUBY_DEBUG_BLOCK( "CAbortState::HandleEventL" );
       
    62 
       
    63     CState* nextState = CExitState::NewL( DataStorage(), UiModel() );
       
    64 
       
    65     DataStorage().VoiceRecognitionImpl()->ChangeState( nextState );
       
    66     }
       
    67 
       
    68 // ---------------------------------------------------------
       
    69 // CAbortState::ExecuteL
       
    70 // ---------------------------------------------------------
       
    71 //       
       
    72 void CAbortState::ExecuteL()
       
    73     {
       
    74     RUBY_DEBUG_BLOCK( "CAbortState::ExecuteL" );
       
    75 
       
    76     DataStorage().TonePlayer()->PlayTone( EAvkonSIDNameDiallerAbortTone );
       
    77     }
       
    78 
       
    79 // ---------------------------------------------------------
       
    80 // CAbortState::CAbortState
       
    81 // ---------------------------------------------------------
       
    82 //              
       
    83 CAbortState::CAbortState( CDataStorage& aDataStorage, CUiModel& aUiModel )
       
    84  : CState( aDataStorage, aUiModel )
       
    85     {
       
    86     }
       
    87     
       
    88 // End of File
       
    89