Tizen Native API
7.0
|
Uidna module provides Internationalizing Domain Names in Applications.
Required Header
#include <utils_i18n.h>
Functions | |
int | i18n_uidna_create (uint32_t options, i18n_uidna_h *uidna) |
Returns a UIDNA instance which implements UTS #46. | |
int | i18n_uidna_destroy (i18n_uidna_h uidna) |
Destroys a UIDNA instance. | |
int | i18n_uidna_label_to_ascii (i18n_uidna_h uidna, const i18n_uchar *label, int32_t length, i18n_uchar *dest, int32_t capacity, i18n_uidna_info_h *info, int32_t *len) |
Converts a single domain name label into its ASCII form for DNS lookup. | |
int | i18n_uidna_label_to_unicode (i18n_uidna_h uidna, const i18n_uchar *label, int32_t length, i18n_uchar *dest, int32_t capacity, i18n_uidna_info_h *info, int32_t *len) |
Converts a single domain name label into its Unicode form for human-readable display. | |
int | i18n_uidna_name_to_ascii (i18n_uidna_h uidna, const i18n_uchar *name, int32_t length, i18n_uchar *dest, int32_t capacity, i18n_uidna_info_h *info, int32_t *len) |
Converts a whole domain name into its ASCII form for DNS lookup. | |
int | i18n_uidna_name_to_unicode (i18n_uidna_h uidna, const i18n_uchar *name, int32_t length, i18n_uchar *dest, int32_t capacity, i18n_uidna_info_h *info, int32_t *len) |
Converts a whole domain name into its Unicode form for human-readable display. | |
int | i18n_uidna_label_to_ascii_UTF8 (i18n_uidna_h uidna, const char *label, int32_t length, char *dest, int32_t capacity, i18n_uidna_info_h *info, int32_t *len) |
Converts a single domain name label (UTF8 encoded) into its ASCII form for DNS lookup. | |
int | i18n_uidna_label_to_unicode_UTF8 (i18n_uidna_h uidna, const char *label, int32_t length, char *dest, int32_t capacity, i18n_uidna_info_h *info, int32_t *len) |
Converts a single domain name label into its Unicode form for human-readable display. | |
int | i18n_uidna_name_to_ascii_UTF8 (i18n_uidna_h uidna, const char *name, int32_t length, char *dest, int32_t capacity, i18n_uidna_info_h *info, int32_t *len) |
Converts a whole domain name into its ASCII form for DNS lookup. | |
int | i18n_uidna_name_to_unicode_UTF8 (i18n_uidna_h uidna, const char *name, int32_t length, char *dest, int32_t capacity, i18n_uidna_info_h *info, int32_t *len) |
Converts a whole domain name into its Unicode form for human-readable display. | |
int | i18n_uidna_info_get_is_trans_different (i18n_uidna_info_h info, i18n_ubool *is_trans_different) |
Gets whether transitional and nontransitional processing produce different results. | |
int | i18n_uidna_info_get_errors (i18n_uidna_info_h info, uint32_t *errors) |
Gets the bit set indicating UIDNA processing errors. | |
int | i18n_uidna_info_destroy (i18n_uidna_info_h info) |
Destroys a UIDNA info handle. | |
Typedefs | |
typedef void * | i18n_uidna_h |
An i18n_uidna_h handle. | |
typedef void * | i18n_uidna_info_h |
An i18n_uidna_info_h handle. |
Typedef Documentation
typedef void* i18n_uidna_h |
typedef void* i18n_uidna_info_h |
An i18n_uidna_info_h handle.
- Since :
- 6.0
Enumeration Type Documentation
enum i18n_uidna_error_e |
UIDNA error bit set values.
When a domain name or label fails a processing step or does not meet the validity criteria, then one or more of these error bits are set.
- Since :
- 6.0
- Enumerator:
enum i18n_uidna_option_e |
IDNA option bit set values.
- Since :
- 6.0
- Enumerator:
Function Documentation
int i18n_uidna_create | ( | uint32_t | options, |
i18n_uidna_h * | uidna | ||
) |
Returns a UIDNA instance which implements UTS #46.
Returns an unmodifiable instance, owned by the caller. Cache it for multiple operations, and i18n_uidna_destroy() it when done. The instance is thread-safe, that is, it can be used concurrently.
- Since :
- 6.0
- Remarks:
- The uidna should be released using i18n_uidna_destroy().
- Parameters:
-
[in] options Bit set to modify the processing and error checking. See i18n_uidna_option_e for options. [out] uidna The UTS #46 UIDNA instance, if successful
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
I18N_ERROR_NONE Successful I18N_ERROR_INVALID_PARAMETER Invalid function parameter I18N_ERROR_OUT_OF_MEMORY Out of memory
- See also:
- i18n_uidna_destroy
int i18n_uidna_destroy | ( | i18n_uidna_h | uidna | ) |
Destroys a UIDNA instance.
- Since :
- 6.0
- Parameters:
-
[in] uidna UIDNA instance to be destroyed
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
I18N_ERROR_NONE Successful I18N_ERROR_INVALID_PARAMETER Invalid function parameter
- See also:
- i18n_uidna_create
int i18n_uidna_info_destroy | ( | i18n_uidna_info_h | info | ) |
Destroys a UIDNA info handle.
- Since :
- 6.0
- Parameters:
-
[in] info The UIDNA info handle to be destroyed
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
I18N_ERROR_NONE Successful I18N_ERROR_INVALID_PARAMETER Invalid function parameter
int i18n_uidna_info_get_errors | ( | i18n_uidna_info_h | info, |
uint32_t * | errors | ||
) |
Gets the bit set indicating UIDNA processing errors.
- Since :
- 6.0
- Parameters:
-
[in] info UIDNA info handle [out] errors Bit set with UIDNA processing errors
0 if no errors, see i18n_uidna_error_e
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
I18N_ERROR_NONE Successful I18N_ERROR_INVALID_PARAMETER Invalid function parameter
int i18n_uidna_info_get_is_trans_different | ( | i18n_uidna_info_h | info, |
i18n_ubool * | is_trans_different | ||
) |
Gets whether transitional and nontransitional processing produce different results.
- Since :
- 6.0
- Parameters:
-
[in] info UIDNA info handle [out] is_trans_different TRUE if transitional and nontransitional processing produce different results.
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
I18N_ERROR_NONE Successful I18N_ERROR_INVALID_PARAMETER Invalid function parameter
int i18n_uidna_label_to_ascii | ( | i18n_uidna_h | uidna, |
const i18n_uchar * | label, | ||
int32_t | length, | ||
i18n_uchar * | dest, | ||
int32_t | capacity, | ||
i18n_uidna_info_h * | info, | ||
int32_t * | len | ||
) |
Converts a single domain name label into its ASCII form for DNS lookup.
The label might be modified according to the types of errors. Labels with severe errors will be left in (or turned into) their Unicode form. The i18n_error_code_e indicates an error only in exceptional cases, such as a I18N_ERROR_OUT_OF_MEMORY.
- Since :
- 6.0
- Remarks:
- info should be released with i18n_uidna_info_destroy().
- Parameters:
-
[in] uidna A UIDNA instance [in] label Input domain name label [in] length Label length, or -1 if NUL-terminated [in] dest Destination string buffer [in] capacity Destination buffer capacity [out] info Output container of IDNA processing details. [out] len Destination string length
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
I18N_ERROR_NONE Successful I18N_ERROR_INVALID_PARAMETER Invalid function parameter I18N_ERROR_OUT_OF_MEMORY Out of memory
int i18n_uidna_label_to_ascii_UTF8 | ( | i18n_uidna_h | uidna, |
const char * | label, | ||
int32_t | length, | ||
char * | dest, | ||
int32_t | capacity, | ||
i18n_uidna_info_h * | info, | ||
int32_t * | len | ||
) |
Converts a single domain name label (UTF8 encoded) into its ASCII form for DNS lookup.
- Since :
- 6.0
- Remarks:
- info should be released with i18n_uidna_info_destroy().
- Parameters:
-
[in] uidna A UIDNA instance [in] label Input domain name label [in] length Label length, or -1 if NUL-terminated [in] dest Destination string buffer [in] capacity Destination buffer capacity [out] info Output container of IDNA processing details. [out] len Destination string length
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
I18N_ERROR_NONE Successful I18N_ERROR_INVALID_PARAMETER Invalid function parameter I18N_ERROR_OUT_OF_MEMORY Out of memory
int i18n_uidna_label_to_unicode | ( | i18n_uidna_h | uidna, |
const i18n_uchar * | label, | ||
int32_t | length, | ||
i18n_uchar * | dest, | ||
int32_t | capacity, | ||
i18n_uidna_info_h * | info, | ||
int32_t * | len | ||
) |
Converts a single domain name label into its Unicode form for human-readable display.
The i18n_error_code_e indicates an error only in exceptional cases, such as a I18N_ERROR_OUT_OF_MEMORY.
- Since :
- 6.0
- Remarks:
- info should be released with i18n_uidna_info_destroy().
- Parameters:
-
[in] uidna A UIDNA instance [in] label Input domain name label [in] length Label length, or -1 if NUL-terminated [in] dest Destination string buffer [in] capacity Destination buffer capacity [out] info Output container of IDNA processing details. [out] len Destination string length
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
I18N_ERROR_NONE Successful I18N_ERROR_INVALID_PARAMETER Invalid function parameter I18N_ERROR_OUT_OF_MEMORY Out of memory
int i18n_uidna_label_to_unicode_UTF8 | ( | i18n_uidna_h | uidna, |
const char * | label, | ||
int32_t | length, | ||
char * | dest, | ||
int32_t | capacity, | ||
i18n_uidna_info_h * | info, | ||
int32_t * | len | ||
) |
Converts a single domain name label into its Unicode form for human-readable display.
UTF-8 version of i18n_uidna_label_to_unicode(), same behavior.
- Since :
- 6.0
- Remarks:
- info should be released with i18n_uidna_info_destroy().
- Parameters:
-
[in] uidna A UIDNA instance [in] label Input domain name label [in] length Label length, or -1 if NUL-terminated [in] dest Destination string buffer [in] capacity Destination buffer capacity [out] info Output container of IDNA processing details. [out] len Destination string length
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
I18N_ERROR_NONE Successful I18N_ERROR_INVALID_PARAMETER Invalid function parameter I18N_ERROR_OUT_OF_MEMORY Out of memory
int i18n_uidna_name_to_ascii | ( | i18n_uidna_h | uidna, |
const i18n_uchar * | name, | ||
int32_t | length, | ||
i18n_uchar * | dest, | ||
int32_t | capacity, | ||
i18n_uidna_info_h * | info, | ||
int32_t * | len | ||
) |
Converts a whole domain name into its ASCII form for DNS lookup.
The domain name might be modified according to the types of errors. Labels with severe errors will be left in (or turned into) their Unicode form. The i18n_error_code_e indicates an error only in exceptional cases, such as a I18N_ERROR_OUT_OF_MEMORY.
- Since :
- 6.0
- Remarks:
- info should be released with i18n_uidna_info_destroy().
- Parameters:
-
[in] uidna A UIDNA instance [in] name Input domain name [in] length Label length, or -1 if NUL-terminated [in] dest Destination string buffer [in] capacity Destination buffer capacity [out] info Output container of IDNA processing details. [out] len Destination string length
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
I18N_ERROR_NONE Successful I18N_ERROR_INVALID_PARAMETER Invalid function parameter I18N_ERROR_OUT_OF_MEMORY Out of memory
int i18n_uidna_name_to_ascii_UTF8 | ( | i18n_uidna_h | uidna, |
const char * | name, | ||
int32_t | length, | ||
char * | dest, | ||
int32_t | capacity, | ||
i18n_uidna_info_h * | info, | ||
int32_t * | len | ||
) |
Converts a whole domain name into its ASCII form for DNS lookup.
UTF-8 version of i18n_uidna_name_to_ascii(), same behavior.
- Since :
- 6.0
- Remarks:
- info should be released with i18n_uidna_info_destroy().
- Parameters:
-
[in] uidna A UIDNA instance [in] name Input domain name [in] length Label length, or -1 if NUL-terminated [in] dest Destination string buffer [in] capacity Destination buffer capacity [out] info Output container of IDNA processing details. [out] len Destination string length
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
I18N_ERROR_NONE Successful I18N_ERROR_INVALID_PARAMETER Invalid function parameter I18N_ERROR_OUT_OF_MEMORY Out of memory
int i18n_uidna_name_to_unicode | ( | i18n_uidna_h | uidna, |
const i18n_uchar * | name, | ||
int32_t | length, | ||
i18n_uchar * | dest, | ||
int32_t | capacity, | ||
i18n_uidna_info_h * | info, | ||
int32_t * | len | ||
) |
Converts a whole domain name into its Unicode form for human-readable display.
The i18n_error_code_e indicates an error only in exceptional cases, such as a I18N_ERROR_OUT_OF_MEMORY.
- Since :
- 6.0
- Remarks:
- info should be released with i18n_uidna_info_destroy().
- Parameters:
-
[in] uidna A UIDNA instance [in] name Input domain name [in] length Label length, or -1 if NUL-terminated [in] dest Destination string buffer [in] capacity Destination buffer capacity [out] info Output container of IDNA processing details. [out] len Destination string length
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
I18N_ERROR_NONE Successful I18N_ERROR_INVALID_PARAMETER Invalid function parameter I18N_ERROR_OUT_OF_MEMORY Out of memory
int i18n_uidna_name_to_unicode_UTF8 | ( | i18n_uidna_h | uidna, |
const char * | name, | ||
int32_t | length, | ||
char * | dest, | ||
int32_t | capacity, | ||
i18n_uidna_info_h * | info, | ||
int32_t * | len | ||
) |
Converts a whole domain name into its Unicode form for human-readable display.
UTF-8 version of i18n_uidna_name_to_unicode(), same behavior.
- Since :
- 6.0
- Remarks:
- info should be released with i18n_uidna_info_destroy().
- Parameters:
-
[in] uidna A UIDNA instance [in] name Input domain name [in] length Label length, or -1 if NUL-terminated [in] dest Destination string buffer [in] capacity Destination buffer capacity [out] info Output container of IDNA processing details. [out] len Destination string length
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
I18N_ERROR_NONE Successful I18N_ERROR_INVALID_PARAMETER Invalid function parameter I18N_ERROR_OUT_OF_MEMORY Out of memory