Main Page | Compound List | File List | Compound Members | File Members

librcc.h

Go to the documentation of this file.
00001 #ifndef _LIBRCC_H
00002 #define _LIBRCC_H
00003 
00004 #include <stdlib.h>
00005 
00006 /*******************************************************************************
00007 ***************************** Global Defines ***********************************
00008 *******************************************************************************/
00009 
00010 #define RCC_MAX_CHARSETS 16
00011 #define RCC_MAX_ENGINES 5
00012 #define RCC_MAX_LANGUAGES 64
00013 #define RCC_MAX_ALIASES 64
00014 #define RCC_MAX_CLASSES 16
00015 
00016 /* ID's */
00024 typedef unsigned char rcc_language_id;
00028 typedef unsigned char rcc_alias_id;
00032 typedef unsigned char rcc_relation_id;
00039 typedef unsigned char rcc_charset_id;
00045 typedef unsigned char rcc_autocharset_id;
00052 typedef unsigned char rcc_engine_id;
00056 typedef int rcc_class_id;
00057 
00058 /* Opaque Pointer's */
00059 typedef struct rcc_context_t *rcc_context; 
00067 typedef struct rcc_engine_context_t *rcc_engine_context; 
00073 typedef struct rcc_language_config_t *rcc_language_config; 
00074 typedef const struct rcc_class_t *rcc_class_ptr; 
00075 
00076 #ifdef __cplusplus
00077 extern "C" {
00078 #endif
00079 
00084 int rccInit();
00085 
00089 void rccFree();
00090 
00091 /*******************************************************************************
00092 **************************** Initialization ************************************
00093 *******************************************************************************/
00097 typedef unsigned int rcc_init_flags;
00098 
00102 #define RCC_FLAG_NO_DEFAULT_CONFIGURATION 1 
00103 
00115 rcc_context rccCreateContext(const char *locale_variable, unsigned int max_languages, unsigned int max_classes, rcc_class_ptr defclasses, rcc_init_flags flags);
00128 int rccInitDefaultContext(const char *locale_variable, unsigned int max_languages, unsigned int max_classes, rcc_class_ptr defclasses, rcc_init_flags flags);
00129 
00135 void rccFreeContext(rcc_context ctx);
00136 
00137 
00141 typedef unsigned int rcc_db4_flags;
00142 
00151 int rccInitDb4(rcc_context ctx, const char *name, rcc_db4_flags flags);
00152 
00153 int rccLockConfiguration(rcc_context ctx, unsigned int lock_code);
00154 int rccUnlockConfiguration(rcc_context ctx, unsigned int lock_code);
00155 
00156 /*******************************************************************************
00157 ******************* Altering Language Configuaration ***************************
00158 *******************************************************************************/
00162 typedef const char *rcc_charset;
00166 typedef rcc_charset rcc_charset_list[RCC_MAX_CHARSETS+1];
00167 
00168 /* Engines */
00172 typedef void *rcc_engine_internal;
00181 typedef rcc_engine_internal (*rcc_engine_init_function)(rcc_engine_context ctx);
00189 typedef rcc_autocharset_id (*rcc_engine_function)(rcc_engine_context ctx, const char *buf, int len);
00193 typedef void (*rcc_engine_free_function)(rcc_engine_context ctx);
00194 
00200 struct rcc_engine_t {
00201     const char *title; 
00202     rcc_engine_init_function init_func; 
00203     rcc_engine_free_function free_func; 
00204     rcc_engine_function func; 
00205     rcc_charset_list charsets; 
00206 };
00207 typedef struct rcc_engine_t rcc_engine;
00208 typedef rcc_engine *rcc_engine_ptr;
00209 typedef rcc_engine_ptr rcc_engine_list[RCC_MAX_ENGINES+1];
00210 
00214 struct rcc_language_t {
00215     const char *sn; 
00216     rcc_charset_list charsets; 
00217     rcc_engine_list engines; 
00218 };
00219 typedef struct rcc_language_t rcc_language;
00220 typedef rcc_language *rcc_language_ptr;
00221 typedef rcc_language_ptr rcc_language_list[RCC_MAX_LANGUAGES+1];
00222 
00227 struct rcc_language_alias_t {
00228     const char *alias; 
00229     const char *lang; 
00230 };
00231 typedef struct rcc_language_alias_t rcc_language_alias;
00232 typedef rcc_language_alias *rcc_language_alias_ptr;
00233 typedef rcc_language_alias_ptr rcc_language_alias_list[RCC_MAX_ALIASES+1];
00234 
00245 struct rcc_language_relation_t {
00246     const char *lang;           
00247     const char *parrent;        
00248 };
00249 typedef struct rcc_language_relation_t rcc_language_relation;
00250 
00257 rcc_language_id rccRegisterLanguage(rcc_context ctx, rcc_language *language);
00264 rcc_charset_id rccLanguageRegisterCharset(rcc_language *language, rcc_charset charset);
00271 rcc_engine_id rccLanguageRegisterEngine(rcc_language *language, rcc_engine *engine);
00278 rcc_alias_id rccRegisterLanguageAlias(rcc_context ctx, rcc_language_alias *alias);
00285 rcc_relation_id rccRegisterLanguageRelation(rcc_context ctx, rcc_language_relation *relation);
00286 
00287 /*******************************************************************************
00288 ************************ Altering Configuaration *******************************
00289 *******************************************************************************/
00293 typedef enum rcc_class_type_t {
00294     RCC_CLASS_INVALID = 0,      
00295     RCC_CLASS_STANDARD,         
00296     RCC_CLASS_KNOWN,            
00297     RCC_CLASS_FS,               
00298     RCC_CLASS_TRANSLATE_LOCALE, 
00299     RCC_CLASS_TRANSLATE_CURRENT,
00300     RCC_CLASS_TRANSLATE_FROM,   
00301 } rcc_class_type;
00302 
00306 struct rcc_class_default_charset_t {
00307     const char *lang;           
00308     const char *charset;        
00309 };
00310 typedef const struct rcc_class_default_charset_t rcc_class_default_charset;
00311 
00313 #define RCC_CLASS_FLAG_CONST                    0x01
00314 
00315 #define RCC_CLASS_FLAG_SKIP_SAVELOAD            0x02    
00316 
00349 struct rcc_class_t {
00350     const char *name;   
00351     const rcc_class_type class_type; 
00352     const char *defvalue; 
00353     rcc_class_default_charset *defcharset; 
00354     const char *fullname; 
00355     const unsigned long flags; 
00356 };
00357 typedef const struct rcc_class_t rcc_class;
00358 typedef rcc_class_ptr rcc_class_list[RCC_MAX_CLASSES+1];
00359 
00366 rcc_class_id rccRegisterClass(rcc_context ctx, rcc_class *cl);
00374 int rccRegisterAdditionalCharsets(rcc_context ctx, rcc_class_id class_id, rcc_charset *charsets);
00382 int rccRegisterDisabledCharsets(rcc_context ctx, rcc_class_id class_id, rcc_charset *charsets);
00390 int rccIsDisabledCharsetName(rcc_context ctx, rcc_class_id class_id, const char *charset);
00391 
00398 rcc_class_type rccGetClassType(rcc_context ctx, rcc_class_id class_id);
00405 const char *rccGetClassName(rcc_context ctx, rcc_class_id class_id);
00412 const char *rccGetClassFullName(rcc_context ctx, rcc_class_id class_id);
00413 
00414 /*******************************************************************************
00415 ************************ Altering Configuaration *******************************
00416 *******************************************************************************/
00417 typedef int rcc_option_value;
00418 
00422 #define RCC_OPTION_LEARNING_FLAG_USE 1
00423 
00426 #define RCC_OPTION_LEARNING_FLAG_LEARN 2
00427 
00428 typedef enum rcc_option_translate_t {
00429     RCC_OPTION_TRANSLATE_OFF = 0,       
00430     RCC_OPTION_TRANSLATE_TRANSLITERATE, 
00431     RCC_OPTION_TRANSLATE_TO_ENGLISH,    
00432     RCC_OPTION_TRANSLATE_SKIP_RELATED,  
00433     RCC_OPTION_TRANSLATE_SKIP_PARRENT,  
00434     RCC_OPTION_TRANSLATE_FULL           
00435 } rcc_option_translate;
00436 
00440 typedef enum rcc_option_t {
00441     RCC_OPTION_LEARNING_MODE = 0,       
00442     RCC_OPTION_AUTODETECT_FS_TITLES,    
00443     RCC_OPTION_AUTODETECT_FS_NAMES,     
00444     RCC_OPTION_CONFIGURED_LANGUAGES_ONLY, 
00445     RCC_OPTION_AUTOENGINE_SET_CURRENT,  
00446     RCC_OPTION_AUTODETECT_LANGUAGE,     
00447     RCC_OPTION_TRANSLATE,               
00448     RCC_OPTION_TIMEOUT,                 
00449     RCC_MAX_OPTIONS,
00450     RCC_OPTION_ALL
00451 } rcc_option;
00452 
00456 typedef enum rcc_option_type_t {
00457     RCC_OPTION_TYPE_INVISIBLE = 0,      
00458     RCC_OPTION_TYPE_STANDARD,           
00459     RCC_OPTION_TYPE_MAX
00460 } rcc_option_type;
00461 
00465 typedef enum rcc_option_range_type_t {
00466     RCC_OPTION_RANGE_TYPE_BOOLEAN = 0,  
00467     RCC_OPTION_RANGE_TYPE_RANGE,        
00468     RCC_OPTION_RANGE_TYPE_FLAGS,        
00469     RCC_OPTION_RANGE_TYPE_MENU,         
00470     RCC_OPTION_RANGE_TYPE_MAX
00471 } rcc_option_range_type;
00472 
00476 typedef struct rcc_option_range_t {
00477     rcc_option_range_type type;         
00478     rcc_option_value min;               
00479     rcc_option_value max;               
00480     rcc_option_value step;              
00481 }rcc_option_range;
00482 
00483 /* lng.c */
00484 
00491 int rccGetLanguageNumber(rcc_context ctx);
00498 int rccGetClassNumber(rcc_context ctx);
00506 const char *rccGetLanguageName(rcc_context ctx, rcc_language_id language_id);
00514 rcc_language_id rccGetLanguageByName(rcc_context ctx, const char *name);
00528 rcc_language_id rccGetRealLanguage(rcc_context ctx, rcc_language_id language_id);
00537 const char *rccGetRealLanguageName(rcc_context ctx, rcc_language_id language_id);
00544 rcc_language_id rccGetSelectedLanguage(rcc_context ctx);
00552 const char *rccGetSelectedLanguageName(rcc_context ctx);
00560 rcc_language_id rccGetCurrentLanguage(rcc_context ctx);
00568 const char *rccGetCurrentLanguageName(rcc_context ctx);
00569 
00570 
00578 int rccSetLanguage(rcc_context ctx, rcc_language_id language_id);
00586 int rccSetLanguageByName(rcc_context ctx, const char *name);
00587 
00588 /* opt.c */
00596 rcc_option_value rccGetOption(rcc_context ctx, rcc_option option);
00604 int rccOptionIsDefault(rcc_context ctx, rcc_option option);
00612 int rccOptionSetDefault(rcc_context ctx, rcc_option option);
00621 int rccSetOption(rcc_context ctx, rcc_option option, rcc_option_value value);
00629 rcc_option_type rccOptionGetType(rcc_context ctx, rcc_option option);
00637 rcc_option_range *rccOptionGetRange(rcc_context ctx, rcc_option option);
00638 
00645 const char *rccGetOptionName(rcc_option option);
00646 
00654 const char *rccGetOptionValueName(rcc_option option, rcc_option_value value);
00661 rcc_option rccGetOptionByName(const char *name);
00669 rcc_option_value rccGetOptionValueByName(rcc_option option, const char *name);
00670 
00671 
00672 /* lngconfig.c */
00684 rcc_language_config rccCheckConfig(rcc_context ctx, rcc_language_id language_id);
00696 rcc_language_config rccGetConfig(rcc_context ctx, rcc_language_id language_id);
00715 rcc_language_config rccGetUsableConfig(rcc_context ctx, rcc_language_id language_id);
00724 rcc_language_config rccGetConfigByName(rcc_context ctx, const char *name);
00732 rcc_language_config rccGetCurrentConfig(rcc_context ctx);
00733 
00739 rcc_language_id rccConfigGetLanguage(rcc_language_config config);
00745 const char *rccConfigGetLanguageName(rcc_language_config config);
00746 
00753 int rccConfigGetCharsetNumber(rcc_language_config config);
00761 int rccConfigGetClassCharsetNumber(rcc_language_config config, rcc_class_id class_id);
00768 int rccConfigGetEngineNumber(rcc_language_config config);
00769 
00777 const char *rccConfigGetEngineName(rcc_language_config config, rcc_engine_id engine_id);
00785 const char *rccConfigGetCharsetName(rcc_language_config config, rcc_charset_id charset_id);
00794 const char *rccConfigGetClassCharsetName(rcc_language_config config, rcc_class_id class_id, rcc_charset_id charset_id);
00795 
00803 rcc_engine_id rccConfigGetEngineByName(rcc_language_config config, const char *name);
00811 rcc_charset_id rccConfigGetCharsetByName(rcc_language_config config, const char *name);
00820 rcc_charset_id rccConfigGetClassCharsetByName(rcc_language_config config, rcc_class_id class_id, const char *name);
00828 int rccConfigIsDisabledCharset(rcc_language_config config, rcc_class_id class_id, rcc_charset_id charset_id);
00838 rcc_engine_id rccConfigGetSelectedEngine(rcc_language_config config);
00846 const char *rccConfigGetSelectedEngineName(rcc_language_config config);
00857 rcc_engine_id rccConfigGetCurrentEngine(rcc_language_config config);
00865 const char *rccConfigGetCurrentEngineName(rcc_language_config config);
00866 
00876 rcc_charset_id rccConfigGetSelectedCharset(rcc_language_config config, rcc_class_id class_id);
00885 const char *rccConfigGetSelectedCharsetName(rcc_language_config config, rcc_class_id class_id);
00901 rcc_charset_id rccConfigGetCurrentCharset(rcc_language_config config, rcc_class_id class_id);
00910 const char *rccConfigGetCurrentCharsetName(rcc_language_config config, rcc_class_id class_id);
00911 
00919 int rccConfigSetEngine(rcc_language_config config, rcc_engine_id engine_id);
00928 int rccConfigSetCharset(rcc_language_config config, rcc_class_id class_id, rcc_charset_id charset_id);
00936 int rccConfigSetEngineByName(rcc_language_config config, const char *name);
00945 int rccConfigSetCharsetByName(rcc_language_config config, rcc_class_id class_id, const char *name);
00946 
00954 rcc_charset_id rccConfigGetLocaleCharset(rcc_language_config config, const char *locale_variable);
00963 rcc_charset_id rccConfigGetLocaleClassCharset(rcc_language_config config, rcc_class_id class_id, const char *locale_variable);
00964 
00965 /* curconfig.c */
00966 int rccGetCharsetNumber(rcc_context ctx);
00967 int rccGetClassCharsetNumber(rcc_context ctx, rcc_class_id class_id);
00968 int rccGetEngineNumber(rcc_context ctx);
00969 
00970 const char *rccGetEngineName(rcc_context ctx, rcc_engine_id engine_id);
00971 const char *rccGetCharsetName(rcc_context ctx, rcc_charset_id charset_id);
00972 const char *rccGetClassCharsetName(rcc_context ctx, rcc_class_id class_id, rcc_charset_id charset_id);
00973 
00974 rcc_engine_id rccGetEngineByName(rcc_context ctx, const char *name);
00975 rcc_charset_id rccGetCharsetByName(rcc_context ctx, const char *name);
00976 rcc_charset_id rccGetClassCharsetByName(rcc_context ctx, rcc_class_id class_id, const char *name);
00977 
00978 int rccIsDisabledCharset(rcc_context ctx, rcc_class_id class_id, rcc_charset_id charset_id);
00979 
00980 rcc_engine_id rccGetSelectedEngine(rcc_context ctx);
00981 const char *rccGetSelectedEngineName(rcc_context ctx);
00982 rcc_engine_id rccGetCurrentEngine(rcc_context ctx);
00983 const char *rccGetCurrentEngineName(rcc_context ctx);
00984 rcc_charset_id rccGetSelectedCharset(rcc_context ctx, rcc_class_id class_id);
00985 const char *rccGetSelectedCharsetName(rcc_context ctx, rcc_class_id class_id);
00986 rcc_charset_id rccGetCurrentCharset(rcc_context ctx, rcc_class_id class_id);
00987 const char *rccGetCurrentCharsetName(rcc_context ctx, rcc_class_id class_id);
00988 
00989 int rccSetEngine(rcc_context ctx, rcc_engine_id engine_id);
00990 int rccSetCharset(rcc_context ctx, rcc_class_id class_id, rcc_charset_id charset_id);
00991 int rccSetEngineByName(rcc_context ctx, const char *name);
00992 int rccSetCharsetByName(rcc_context ctx, rcc_class_id class_id, const char *name);
00993 
00994 rcc_charset_id rccGetLocaleCharset(rcc_context ctx, const char *locale_variable);
00995 rcc_charset_id rccGetLocaleClassCharset(rcc_context ctx, rcc_class_id class_id, const char *locale_variable);
00996 
00997 rcc_autocharset_id rccDetectCharset(rcc_context ctx, rcc_class_id class_id, const char *buf, size_t len);
00998 
00999 /*******************************************************************************
01000 ************************ Language Configuaration *******************************
01001 *******************************************************************************/
01002 
01003 /*******************************************************************************
01004 ************************ RCC_STRING Manipulations ******************************
01005 *******************************************************************************/
01006 /* string.c */
01012 typedef char *rcc_string;
01018 typedef const char *rcc_const_string;
01019 
01025 size_t rccStringCheck(const char *str);
01033 size_t rccStringSizedCheck(const char *str, size_t len);
01034 
01041 rcc_language_id rccStringGetLanguage(rcc_const_string str);
01048 const char *rccStringGetString(rcc_const_string str);
01055 char *rccStringExtractString(rcc_const_string str);
01056 
01064 const char *rccGetString(const char *str);
01073 const char *rccSizedGetString(const char *str, size_t len);
01074 
01075 int rccStringCmp(const char *str1, const char *str2);
01076 int rccStringNCmp(const char *str1, const char *str2, size_t n);
01077 int rccStringCaseCmp(const char *str1, const char *str2);
01078 int rccStringNCaseCmp(const char *str1, const char *str2, size_t n);
01079 
01080 /*******************************************************************************
01081 ******************************** Recoding **************************************
01082 *******************************************************************************/
01083 /* rcciconv.c */
01084 
01088 typedef struct rcc_iconv_t *rcc_iconv;
01089 
01099 rcc_iconv rccIConvOpen(const char *from, const char *to);
01104 void rccIConvClose(rcc_iconv icnv);
01114 char *rccIConv(rcc_iconv icnv, const char *buf, size_t len, size_t *rlen);
01115 
01116 /* rcctranslate.c */
01117 
01121 typedef struct rcc_translate_t *rcc_translate;
01122 
01132 rcc_translate rccTranslateOpen(const char *from, const char *to);
01138 void rccTranslateClose(rcc_translate translate);
01139 
01140 /*
01141  * Set translation timeout
01142  *
01143  * @param translate is translating context 
01144  * @param us is timeout in microseconds (0 - no timeout)
01145  * @return non-zero value is returned in the case of errror
01146  */
01147 int rccTranslateSetTimeout(rcc_translate translate, unsigned long us);
01148 
01156 char *rccTranslate(rcc_translate translate, const char *buf);
01157 
01158 
01159 /* rccspell.c */
01160 
01164 typedef struct rcc_speller_t *rcc_speller;
01165 
01169 typedef enum rcc_speller_result_t {
01170     RCC_SPELLER_INCORRECT = 0,          
01171     RCC_SPELLER_ALMOST_PARRENT,         
01172     RCC_SPELLER_ALMOST_CORRECT,         
01173     RCC_SPELLER_PARRENT,                
01174     RCC_SPELLER_CORRECT                 
01175 } rcc_speller_result;
01176 
01177 int rccSpellerResultIsOwn(rcc_speller_result res);
01178 int rccSpellerResultIsPrecise(rcc_speller_result res);
01179 int rccSpellerResultIsCorrect(rcc_speller_result res);
01180 
01189 rcc_speller rccSpellerCreate(const char *lang);
01195 void rccSpellerFree(rcc_speller speller);
01203 int rccSpellerAddParrent(rcc_speller speller, rcc_speller parrent);
01211 rcc_speller_result rccSpeller(rcc_speller speller, const char *word);
01212 
01213 /* recode.c */
01214 
01223 rcc_language_id rccDetectLanguage(rcc_context ctx, rcc_class_id class_id, const char *buf, size_t len);
01224 
01233 rcc_autocharset_id rccConfigDetectCharset(rcc_language_config config, rcc_class_id class_id, const char *buf, size_t len);
01234 
01246 rcc_string rccSizedFrom(rcc_context ctx, rcc_class_id class_id, const char *buf, size_t len);
01258 char *rccSizedTo(rcc_context ctx, rcc_class_id class_id, rcc_const_string buf, size_t *rlen);
01273 char *rccSizedRecode(rcc_context ctx, rcc_class_id from, rcc_class_id to, const char *buf, size_t len, size_t *rlen);
01293 char *rccFS(rcc_context ctx, rcc_class_id from, rcc_class_id to, const char *fspath, const char *path, const char *filename);
01294 
01304 rcc_string rccSizedFromCharset(rcc_context ctx, const char *charset, const char *buf, size_t len);
01314 char *rccSizedToCharset(rcc_context ctx, const char *charset, rcc_const_string buf, size_t *rlen);
01329 char *rccSizedRecodeToCharset(rcc_context ctx, rcc_class_id class_id, const char *charset, rcc_const_string buf, size_t len, size_t *rlen);
01344 rcc_string rccSizedRecodeFromCharset(rcc_context ctx, rcc_class_id class_id, const char *charset, const char *buf, size_t len, size_t *rlen);
01356 char *rccSizedRecodeCharsets(rcc_context ctx, const char *from, const char *to, const char *buf, size_t len, size_t *rlen);
01357 
01358 
01370 rcc_string rccConfigSizedFrom(rcc_language_config config, rcc_class_id class_id, const char *buf, size_t len);
01382 char *rccConfigSizedTo(rcc_language_config config, rcc_class_id class_id, rcc_const_string buf, size_t *rlen);
01397 char *rccConfigSizedRecode(rcc_language_config config, rcc_class_id from, rcc_class_id to, const char *buf, size_t len, size_t *rlen);
01409 rcc_string rccConfigSizedRecodeFromCharset(rcc_language_config config, rcc_class_id class_id, const char *charset, const char *buf, size_t len, size_t *rlen);
01421 char *rccConfigSizedRecodeToCharset(rcc_language_config config, rcc_class_id class_id, const char *charset, rcc_const_string buf, size_t len, size_t *rlen);
01422 
01423 
01424 #define rccFrom(ctx, class_id, buf) rccSizedFrom(ctx, class_id, buf, 0)
01425 #define rccTo(ctx, class_id, buf) rccSizedTo(ctx, class_id, buf, NULL)
01426 #define rccRecode(ctx, from, to, buf) rccSizedRecode(ctx, from, to, buf, 0, NULL)
01427 
01428 #define rccFromCharset(ctx, charset, buf) rccSizedFromCharset(ctx, charset, buf, 0)
01429 #define rccToCharset(ctx, charset, buf) rccSizedToCharset(ctx, charset, buf, NULL)
01430 #define rccRecodeToCharset(ctx, class_id, charset, buf) rccSizedRecodeToCharset(ctx, class_id, charset, buf, 0, NULL)
01431 #define rccRecodeFromCharset(ctx, class_id, charset, buf) rccSizedRecodeFromCharset(ctx, class_id, charset, buf, 0, NULL)
01432 #define rccRecodeCharsets(ctx, from, to, buf) rccSizedRecodeCharsets(ctx, from, to, buf, 0, NULL)
01433 
01434 #define rccConfigFrom(ctx, class_id, buf) rccConfigSizedFrom(ctx, class_id, buf, 0)
01435 #define rccConfigTo(ctx, class_id, buf) rccConfigSizedTo(ctx, class_id, buf, NULL)
01436 #define rccConfigRecode(ctx, from, to, buf) rccConfigSizedRecode(ctx, from, to, buf, 0, NULL)
01437 #define rccConfigRecodeToCharset(ctx, class_id, charset, buf) rccConfigSizedRecodeToCharset(ctx, class_id, charset, buf, 0, NULL)
01438 #define rccConfigRecodeFromCharset(ctx, class_id, charset, buf) rccConfigSizedRecodeFromCharset(ctx, class_id, charset, buf, 0, NULL)
01439 
01440 /*******************************************************************************
01441 ******************************** Options ***************************************
01442 *******************************************************************************/
01443 
01444 /* xml.c */
01445 typedef void *rcc_config;
01446 rcc_config rccGetConfiguration();
01447 
01455 int rccSave(rcc_context ctx, const char *name);
01463 int rccLoad(rcc_context ctx, const char *name);
01464 
01465 /*******************************************************************************
01466 **************************** Engine Plugins ************************************
01467 *******************************************************************************/
01468 
01469 typedef rcc_engine *(*rcc_plugin_engine_info_function)(const char *lang);
01470 
01471 rcc_engine_internal rccEngineGetInternal(rcc_engine_context ctx);
01472 rcc_language *rccEngineGetLanguage(rcc_engine_context ctx);
01473 rcc_context rccEngineGetRccContext(rcc_engine_context ctx);
01474 
01475 /*******************************************************************************
01476 **************************** Configuration *************************************
01477 *******************************************************************************/
01478 
01482 #define RCC_CC_FLAG_HAVE_BERKLEY_DB                     0x01
01483 
01486 #define RCC_CC_FLAG_HAVE_DYNAMIC_ENGINES                0x02
01487 
01490 #define RCC_CC_FLAG_HAVE_ENCA                           0x04
01491 
01494 #define RCC_CC_FLAG_HAVE_RCD                            0x08
01495 
01498 #define RCC_CC_FLAG_HAVE_LIBTRANSLATE                   0x10
01499 
01503 struct rcc_compiled_configuration_t {
01504     unsigned long flags;        
01505 };
01506 typedef struct rcc_compiled_configuration_t rcc_compiled_configuration_s;
01507 typedef const struct rcc_compiled_configuration_t *rcc_compiled_configuration;
01508 
01512 rcc_compiled_configuration rccGetCompiledConfiguration();
01513 
01514 int rccLocaleGetClassByName(const char *locale);
01515 int rccLocaleGetLanguage(char *result, const char *lv, unsigned int n);
01516 int rccLocaleGetCharset(char *result, const char *lv, unsigned int n);
01517 
01518 #ifdef __cplusplus
01519 }
01520 #endif
01521 
01522 #endif /* _LIBRCC_H */

Generated on Thu Aug 11 01:55:29 2005 for LibRCC by doxygen 1.3.3