SR_Vocabulary.h

00001 /*---------------------------------------------------------------------------*
00002  *  SR_Vocabulary.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 __SR_VOCABULARY_H
00021 #define __SR_VOCABULARY_H
00022 
00023 
00024 
00025 #include "ESR_Locale.h"
00026 #include "ESR_ReturnCode.h"
00027 #include "pstdio.h"
00028 #include "SR_VocabularyPrefix.h"
00029 
00030 
00041 typedef struct SR_Vocabulary_t
00042 {
00049   ESR_ReturnCode(*save)(struct SR_Vocabulary_t* self, const LCHAR* filename);
00050   
00060   ESR_ReturnCode(*getPronunciation)(struct SR_Vocabulary_t* self, const LCHAR* word, LCHAR* pronunciation, size_t* len);
00061   
00068   ESR_ReturnCode(*getLanguage)(struct SR_Vocabulary_t* self, ESR_Locale* locale);
00069   
00075   ESR_ReturnCode(*destroy)(struct SR_Vocabulary_t* self);
00076 }
00077 SR_Vocabulary;
00078 
00097 SREC_VOCABULARY_API ESR_ReturnCode SR_VocabularyCreate(ESR_Locale locale, SR_Vocabulary** self);
00098 
00106 SREC_VOCABULARY_API ESR_ReturnCode SR_VocabularyLoad(const LCHAR* filename, SR_Vocabulary** self);
00107 
00118 SREC_VOCABULARY_API ESR_ReturnCode SR_VocabularySave(SR_Vocabulary* self, const LCHAR* filename);
00119 
00127 SREC_VOCABULARY_API ESR_ReturnCode SR_VocabularyAddWord(SR_Vocabulary* self, const LCHAR* word);
00128 
00129 
00136 SREC_VOCABULARY_API ESR_ReturnCode SR_VocabularyGetLanguage(SR_Vocabulary* self, ESR_Locale* locale);
00137 
00143 SREC_VOCABULARY_API ESR_ReturnCode SR_VocabularyDestroy(SR_Vocabulary* self);
00144 
00154 SREC_VOCABULARY_API ESR_ReturnCode SR_VocabularyGetPronunciation(SR_Vocabulary* self, const LCHAR* word, LCHAR* pronunciation, size_t* len);
00155 
00160 /* To-Do: the following functions need to be removed.  The functions are still used in SR_NameTag.dll  */
00161 SREC_VOCABULARY_API ESR_ReturnCode SR_Vocabulary_etiinf_conv_multichar(ESR_Locale locale, const LCHAR* i, LCHAR* output, size_t max_len);
00162 SREC_VOCABULARY_API ESR_ReturnCode SR_Vocabulary_etiinf_conv_from_multichar(ESR_Locale locale, LCHAR* input, LCHAR* output);
00163 SREC_VOCABULARY_API ESR_ReturnCode SR_Vocabulary_etiinf_init_multichar(ESR_Locale locale);
00164 
00165 #endif /* __SR_VOCABULARY_H */

Generated on Thu May 1 15:37:26 2008 for SREC by  doxygen 1.5.3