1999-08-16 21:50:52 +00:00
|
|
|
/*
|
|
|
|
********************************************************************************
|
|
|
|
* *
|
|
|
|
* COPYRIGHT: *
|
|
|
|
* (C) Copyright International Business Machines Corporation, 1999 *
|
|
|
|
* Licensed Material - Program-Property of IBM - All Rights Reserved. *
|
|
|
|
* US Government Users Restricted Rights - Use, duplication, or disclosure *
|
|
|
|
* restricted by GSA ADP Schedule Contract with IBM Corp. *
|
|
|
|
* *
|
|
|
|
********************************************************************************
|
|
|
|
*
|
|
|
|
*
|
1999-11-23 23:02:55 +00:00
|
|
|
* ucnv_io.h:
|
1999-08-16 21:50:52 +00:00
|
|
|
* defines variables and functions pertaining to file access, and name resolution
|
|
|
|
* aspect of the library
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef UCNV_IO_H
|
|
|
|
#define UCNV_IO_H
|
|
|
|
|
|
|
|
#include "utypes.h"
|
|
|
|
|
1999-11-24 00:39:43 +00:00
|
|
|
/**
|
|
|
|
* Map a converter alias name to a canonical converter name.
|
|
|
|
* The alias is searched for case-insensitively, the converter name
|
|
|
|
* is returned in mixed-case.
|
|
|
|
* Returns NULL if the alias is not found.
|
|
|
|
*/
|
1999-11-23 23:02:55 +00:00
|
|
|
U_CFUNC const char *
|
|
|
|
ucnv_io_getConverterName(const char *alias, UErrorCode *pErrorCode);
|
1999-08-16 21:50:52 +00:00
|
|
|
|
1999-11-24 00:39:43 +00:00
|
|
|
/**
|
|
|
|
* Search case-insensitively for a converter alias and set aliases to
|
|
|
|
* a pointer to the list of aliases for the actual converter.
|
|
|
|
* The first "alias" is the canonical converter name.
|
|
|
|
* The aliases are stored consecutively, in mixed case, each NUL-terminated.
|
|
|
|
* There are as many strings in this list as the return value specifies.
|
|
|
|
* Returns the number of aliases including the canonical converter name,
|
|
|
|
* or 0 if the alias is not found.
|
|
|
|
*/
|
1999-11-23 23:02:55 +00:00
|
|
|
U_CFUNC uint16_t
|
|
|
|
ucnv_io_getAliases(const char *alias, const char **aliases, UErrorCode *pErrorCode);
|
1999-08-16 21:50:52 +00:00
|
|
|
|
1999-11-24 00:39:43 +00:00
|
|
|
/**
|
|
|
|
* Search case-insensitively for a converter alias and return
|
|
|
|
* the (index)th alias.
|
|
|
|
* Returns NULL if the alias is not found.
|
|
|
|
*/
|
1999-11-23 23:02:55 +00:00
|
|
|
U_CFUNC const char *
|
|
|
|
ucnv_io_getAlias(const char *alias, uint16_t index, UErrorCode *pErrorCode);
|
1999-08-16 21:50:52 +00:00
|
|
|
|
1999-11-24 00:39:43 +00:00
|
|
|
/**
|
|
|
|
* Return the number of all aliases (and converter names).
|
|
|
|
*/
|
1999-11-23 23:02:55 +00:00
|
|
|
U_CFUNC uint16_t
|
|
|
|
ucnv_io_countAvailableAliases(UErrorCode *pErrorCode);
|
1999-08-16 21:50:52 +00:00
|
|
|
|
1999-11-24 00:39:43 +00:00
|
|
|
/**
|
|
|
|
* Return the (index)th alias or converter name in mixed case, or NULL
|
|
|
|
* if there is none (typically, if the data cannot be loaded).
|
|
|
|
* 0<=index<=ucnv_io_countAvailableAliases().
|
|
|
|
*/
|
1999-11-23 23:02:55 +00:00
|
|
|
U_CFUNC const char *
|
|
|
|
ucnv_io_getAvailableAlias(uint16_t index, UErrorCode *pErrorCode);
|
1999-08-16 21:50:52 +00:00
|
|
|
|
1999-11-24 00:39:43 +00:00
|
|
|
/**
|
|
|
|
* Fill an array const char *aliases[ucnv_io_countAvailableAliases()]
|
|
|
|
* with pointers to all aliases and converter names in mixed-case.
|
|
|
|
*/
|
1999-11-23 23:02:55 +00:00
|
|
|
U_CFUNC void
|
|
|
|
ucnv_io_fillAvailableAliases(const char **aliases, UErrorCode *pErrorCode);
|
1999-08-16 21:50:52 +00:00
|
|
|
|
1999-12-04 00:55:54 +00:00
|
|
|
/**
|
|
|
|
* Get the name of the default converter.
|
|
|
|
* This name is already resolved by <code>ucnv_io_getConverterName()</code>.
|
|
|
|
*/
|
|
|
|
U_CFUNC const char *
|
|
|
|
ucnv_io_getDefaultConverterName();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the name of the default converter.
|
|
|
|
*/
|
|
|
|
U_CFUNC void
|
|
|
|
ucnv_io_setDefaultConverterName(const char *name);
|
|
|
|
|
1999-08-16 21:50:52 +00:00
|
|
|
#endif /* _UCNV_IO */
|