00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
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
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