speechsrv_plat/vas_api/inc/nssvasmrecognizeeventhandler.h
branchRCL_3
changeset 19 e36f3802f733
parent 0 bf1d17376201
equal deleted inserted replaced
18:cad71a31b7fc 19:e36f3802f733
       
     1 /*
       
     2 * Copyright (c) 2003 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:  The MNssRecognizeEventHandler interface class handles events 
       
    15 *                generated by RecognizeHandler::Recognize().
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef MNSSRECOGNIZEEVENTHANDLER_H
       
    21 #define MNSSRECOGNIZEEVENTHANDLER_H
       
    22 
       
    23 //  INCLUDES
       
    24 
       
    25 #include <e32base.h>
       
    26 #include <e32def.h>
       
    27 #include "nssvasmtag.h"
       
    28 
       
    29 // CLASS DECLARATION
       
    30 
       
    31 /**
       
    32 *
       
    33 *  The MNssRecognizeEventHandler class provides the call back methods to handle 
       
    34 *  the events generated by MNssRecognitionHandler::recognize().
       
    35 *
       
    36 *  @lib NssVASApi.lib
       
    37 *  @since 2.0
       
    38 */
       
    39 
       
    40 class MNssRecognizeEventHandler
       
    41     {
       
    42 
       
    43    public:  //enum
       
    44 
       
    45         enum TNssRecognizeError
       
    46         {
       
    47         EVasErrorNone,
       
    48         EVasRecognizeFailed,
       
    49 	    EVasRecognitionFailedNoSpeech,
       
    50 	    EVasRecognitionFailedTooEarly,
       
    51 	    EVasRecognitionFailedTooLong,
       
    52 	    EVasRecognitionFailedTooShort,
       
    53 	    EVasRecognitionFailedNoMatch,
       
    54         EVasRecognizeAccessDeny,
       
    55         EVasRecognizeUndefinedError10,   // for place holder
       
    56         EVasRecognizeUndefinedError9,
       
    57         EVasRecognizeUndefinedError8,
       
    58         EVasRecognizeUndefinedError7,
       
    59         EVasRecognizeUndefinedError6,
       
    60         EVasRecognizeUndefinedError5,
       
    61         EVasRecognizeUndefinedError4,
       
    62         EVasRecognizeUndefinedError3,
       
    63         EVasRecognizeUndefinedError2,
       
    64         EVasRecognizeUndefinedError1
       
    65         };
       
    66 
       
    67     public: // New functions
       
    68         
       
    69         /**
       
    70         * Record Started Event - Recognizer is recording and ready to
       
    71 		*                        receive the input speech
       
    72         * @since 2.0
       
    73         * @return void
       
    74         */      		
       
    75         virtual void HandleRecordStarted() = 0;
       
    76 
       
    77         /**
       
    78         * End Of Utterance Event - Recognizer has received the input speech
       
    79         * @since 2.0
       
    80         * @return void
       
    81         */
       
    82 		virtual void HandleEouDetected() = 0;
       
    83 
       
    84         /**
       
    85         * Recognize Complete Event - Recognizer has analyzed the input speech.
       
    86         * @since 2.0
       
    87         * @param aClientTagList A list of recognized voice tags returned by 
       
    88 		*                       Recognize. The client is responsible for 
       
    89 		*                       deleting the list and its associated tags.
       
    90 		* @param EVasErrorNone if recognition completed successfully
       
    91         * @return void
       
    92         */
       
    93 		virtual void HandleRecognizeComplete(
       
    94            CArrayPtrFlat<MNssTag> *aClientTagList,
       
    95            TNssRecognizeError aErrorCode ) = 0;
       
    96 
       
    97     };
       
    98 
       
    99 #endif      // MRECOGNIZEEVENTHANDLER_H   
       
   100             
       
   101 // End of File