voiceui/voiceuivoicerecognition/inc/vuicerrorstate.h
branchRCL_3
changeset 19 e36f3802f733
parent 0 bf1d17376201
equal deleted inserted replaced
18:cad71a31b7fc 19:e36f3802f733
       
     1 /*
       
     2 * Copyright (c) 2006-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:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef VUICERRORSTATE_H
       
    20 #define VUICERRORSTATE_H
       
    21 
       
    22 // INCLUDES
       
    23 #include "vuicstate.h"
       
    24 
       
    25 #include "vuicglobalnote.h"
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 
       
    29 
       
    30 // CLASS DECLARATION
       
    31 /**
       
    32 * COMMENT
       
    33 */
       
    34 NONSHARABLE_CLASS( CErrorState ) : public CState
       
    35 {
       
    36     public:     // Constructors and destructor
       
    37 
       
    38         /**
       
    39         * Symbian two-phased constructor.
       
    40         */
       
    41         static CErrorState* NewL( CDataStorage& aDataStorage, CUiModel& aUiModel, TInt aError );
       
    42 
       
    43         /**
       
    44         * Destructor.
       
    45         */
       
    46         virtual ~CErrorState();
       
    47                                 
       
    48     public:     // New functions
       
    49     
       
    50         /**
       
    51         * Handles received event
       
    52         * @param Event to be handled
       
    53         */
       
    54         virtual void HandleEventL( TInt aEvent );
       
    55         
       
    56         /**
       
    57         * Executes the state functionality
       
    58         */
       
    59         virtual void ExecuteL();
       
    60          
       
    61     protected:  // New functions
       
    62         
       
    63         /**
       
    64         * C++ default constructor.
       
    65         */
       
    66         CErrorState( CDataStorage& aDataStorage, CUiModel& aUiModel, TInt aError );
       
    67 
       
    68         /**
       
    69         * Handles timed event
       
    70         */
       
    71         void DoTimedEventL();
       
    72 
       
    73     private:    // Functions
       
    74         
       
    75         /**
       
    76         * Returns which note should be shown
       
    77         * @return One of enumeration values
       
    78         */
       
    79         CGlobalNote::TGlobalNoteState NoteType();
       
    80         
       
    81         /**
       
    82         * Returns which tone should be played
       
    83         * @return KErrNone if no tone should be player, otherwise one of tone enumerations
       
    84         */
       
    85         TInt ToneType();
       
    86                 
       
    87     private:    // Data
       
    88     
       
    89         enum TInternalState
       
    90             {
       
    91             ENotStarted,
       
    92             EStarted,
       
    93             EInitialized,
       
    94             EReady
       
    95             };
       
    96             
       
    97         // For handling internal state logics
       
    98         TInternalState      iInternalState;
       
    99     
       
   100         // Error value received in HandleEventL
       
   101         TInt                iError;
       
   102 };
       
   103 
       
   104 #endif  // VUICERRORSTATE_H
       
   105 
       
   106 // End of File