NBestRecognitionResult.h

00001 /*---------------------------------------------------------------------------*
00002  *  NBestRecognitionResult.h                                                 *
00003  *                                                                           *
00004  *  Copyright 2007 Nuance Communciations, Inc.                               *
00005  *                                                                           *
00006  *  Licensed under the Apache License, Version 2.0 (the 'License');          *
00007  *  you may not use this file except in compliance with the License.         *
00008  *                                                                           *
00009  *  You may obtain a copy of the License at                                  *
00010  *      http://www.apache.org/licenses/LICENSE-2.0                           *
00011  *                                                                           *
00012  *  Unless required by applicable law or agreed to in writing, software      *
00013  *  distributed under the License is distributed on an 'AS IS' BASIS,        *
00014  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
00015  *  See the License for the specific language governing permissions and      *
00016  *  limitations under the License.                                           *
00017  *                                                                           *
00018  *---------------------------------------------------------------------------*/
00019 
00020 #ifndef __UAPI__NBESTRECOGNITIONRESULT
00021 #define __UAPI__NBESTRECOGNITIONRESULT
00022 
00023 #include "exports.h"
00024 #include "RecognitionResult.h"
00025 #include "ReturnCode.h"
00026 #include "SmartProxy.h"
00027 
00028 namespace android
00029 {
00030   namespace speech
00031   {
00032     namespace recognition
00033     {
00034       class VoicetagItemProxy;
00035       class VoicetagItemListenerProxy;
00036     }
00037   }
00038 }
00039 
00040 
00041 namespace android
00042 {
00043   namespace speech
00044   {
00045     namespace recognition
00046     {
00047       class NBestRecognitionResultProxy;
00048       
00055       class NBestRecognitionResult: public RecognitionResult
00056       {
00057         public:
00058           class EntryProxy;
00059           
00066           class UAPI_EXPORT Entry
00067           {
00068             public:
00072               virtual ARRAY_LIMIT getKeyCount() const = 0;
00076               virtual const char* const* getKeys() = 0;
00083               virtual const char* getValue(const char* key,
00084                   ReturnCode::Type& returnCode) const = 0;
00092               virtual const char* getLiteralMeaning(ReturnCode::Type& returnCode)
00093               const = 0;
00101               virtual const char* getSemanticMeaning(ReturnCode::Type& returnCode)
00102               const = 0;
00109               virtual UINT8 getConfidenceScore(ReturnCode::Type& returnCode) const = 0;
00110             protected:
00114               Entry();
00118               virtual ~Entry();
00119               
00120               friend class EntryProxy;
00121           };
00122           
00123           /*
00124            * @see android::speech::recognition::SmartProxy
00125            */
00126           DECLARE_SMARTPROXY(UAPI_EXPORT, EntryProxy, android::speech::recognition::SmartProxy, Entry)
00127           
00128           
00131           virtual ARRAY_LIMIT getSize() const = 0;
00138           virtual EntryProxy getEntry(ARRAY_LIMIT index, ReturnCode::Type& returnCode) const = 0;
00144           virtual VoicetagItemProxy createVoicetagItem(const char* VoicetagId, VoicetagItemListenerProxy listener, ReturnCode::Type& returnCode)
00145           const = 0;
00146         protected:
00150           UAPI_EXPORT NBestRecognitionResult();
00154           UAPI_EXPORT virtual ~NBestRecognitionResult();
00155           
00156           friend class NBestRecognitionResultProxy;
00157       };
00158       
00159       /*
00160        * @see android::speech::recognition::SmartProxy
00161        */
00162       DECLARE_SMARTPROXY(UAPI_EXPORT, NBestRecognitionResultProxy, RecognitionResultProxy,
00163                          NBestRecognitionResult)
00164     }
00165   }
00166 }
00167 
00168 #endif

Generated on Thu May 1 17:16:37 2008 for UAPI by  doxygen 1.5.3