diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2005-08-03 18:24:08 +0000 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2005-08-03 18:24:08 +0000 |
commit | 50aa5cd62ef4a66da41d68f4a50ddfca97863c38 (patch) | |
tree | 43f1bf415e56ace9eb3e19731d3eaffe064c8d68 /src/librcc.h | |
parent | dcd966ba50fa18853c5ae06125a5b08b0ee6b10d (diff) | |
download | librcc-50aa5cd62ef4a66da41d68f4a50ddfca97863c38.tar.gz librcc-50aa5cd62ef4a66da41d68f4a50ddfca97863c38.tar.bz2 librcc-50aa5cd62ef4a66da41d68f4a50ddfca97863c38.tar.xz librcc-50aa5cd62ef4a66da41d68f4a50ddfca97863c38.zip |
Multithreading
- Multithreaded access to recoding functions using same context
- Engine plugin to select between UTF-8 and ISO8859-1 for Western European Languages
- Fix: 'rccTo' converting FS classes
- FS class support in 'rccConfigSizedToCharset'
Diffstat (limited to 'src/librcc.h')
-rw-r--r-- | src/librcc.h | 49 |
1 files changed, 37 insertions, 12 deletions
diff --git a/src/librcc.h b/src/librcc.h index d08937e..cbd9b3d 100644 --- a/src/librcc.h +++ b/src/librcc.h @@ -624,6 +624,25 @@ rcc_language_config rccCheckConfig(rcc_context ctx, rcc_language_id language_id) */ rcc_language_config rccGetConfig(rcc_context ctx, rcc_language_id language_id); /** + * Checks if supplied language is usable. The usability of language is determined + * regarding #RCC_OPTION_CONFIGURED_LANGUAGES_ONLY option. Depending on that + * option there are several possibilities for language usability: + * Any non-dummy language is usable + * Any configured or AutoEngine enabled language is usable + * Only configured languages are usable + * + * Language configuration is initialized if not yet configured. And pointer on + * that configuration is returned. If default language is supplied (language_id = 0), the + * language id will be resolved to particular language and config of that language + * will be returned. + * + * @param ctx is working context ( or default one if NULL supplied ) + * @param language_id is concerned language id + * @return configuration context. The NULL is returned in the case of errors or + * if unusable language is supplied. + */ +rcc_language_config rccGetUsableConfig(rcc_context ctx, rcc_language_id language_id); +/** * Initializes language configuration if not yet configured and returns pointer on * that configuration. * @@ -642,6 +661,19 @@ rcc_language_config rccGetConfigByName(rcc_context ctx, const char *name); rcc_language_config rccGetCurrentConfig(rcc_context ctx); /** + * Return language associated with supplied configuration. + * + * @param config is language configuration + */ +rcc_language_id rccConfigGetLanguage(rcc_language_config config); +/** + * Return name of the language associated with supplied configuration. + * + * @param config is language configuration + */ +const char *rccConfigGetLanguageName(rcc_language_config config); + +/** * Return supplied engine name * * @param config is language configuration @@ -822,6 +854,8 @@ int rccSetCharsetByName(rcc_context ctx, rcc_class_id class_id, const char *name rcc_charset_id rccGetLocaleCharset(rcc_context ctx, const char *locale_variable); +rcc_autocharset_id rccDetectCharset(rcc_context ctx, rcc_class_id class_id, const char *buf, size_t len); + /******************************************************************************* ************************ Language Configuaration ******************************* *******************************************************************************/ @@ -998,15 +1032,16 @@ char *rccTranslate(rcc_translate translate, const char *buf); * @result is language_id or -1 if autodetection is failed */ rcc_language_id rccDetectLanguage(rcc_context ctx, rcc_class_id class_id, const char *buf, size_t len); + /** * Tries to detect charset of string - * @param ctx is working context ( or default one if NULL supplied ) + * @param config is language configuration * @param class_id is encoding class * @param buf is original string (perhaps not zero terminated) * @param len is exact size of string or 0. In the last case the size is determined using 'strlen' function. * @result is auto_charset_id or -1 if autodetection is failed */ -int rccDetectCharset(rcc_context ctx, rcc_class_id class_id, const char *buf, size_t len); +rcc_autocharset_id rccConfigDetectCharset(rcc_language_config config, rcc_class_id class_id, const char *buf, size_t len); /** * Recode string from specified encoding class to #rcc_string. Encoding detection engines and @@ -1133,16 +1168,6 @@ char *rccSizedRecodeCharsets(rcc_context ctx, const char *from, const char *to, /** - * Tries to detect charset of string - * @param config is language configuration - * @param class_id is encoding class - * @param buf is original string (perhaps not zero terminated) - * @param len is exact size of string or 0. In the last case the size is determined using 'strlen' function. - * @result is auto_charset_id or -1 if autodetection is failed - */ -rcc_autocharset_id rccConfigDetectCharset(rcc_language_config config, rcc_class_id class_id, const char *buf, size_t len); - -/** * Recode string from specified encoding class to #rcc_string. Encoding detection engines and * recoding cache are used (if possible) to detect original 'buf' encoding. Otherwise the * preconfigured encoding of class is assumed. |