00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
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
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
00161
00162 DECLARE_SMARTPROXY(UAPI_EXPORT, NBestRecognitionResultProxy, RecognitionResultProxy,
00163 NBestRecognitionResult)
00164 }
00165 }
00166 }
00167
00168 #endif