From 5ee050f3270e5fcf9bc6c1e308636ebfda7b7d43 Mon Sep 17 00:00:00 2001 From: Radoslaw Czerski Date: Wed, 27 Jan 2016 11:20:46 +0100 Subject: [PATCH 01/16] [i18n] Update regarding ICU version change 51.1 -> 54.1 Change-Id: I224273cf60ff07575928fd4f914c32ff0c625511 Signed-off-by: Radoslaw Czerski --- src/include/mobile/utils_i18n_types.h | 509 ++++++++++++++++++++++++++++-- src/include/mobile/utils_i18n_ubrk.h | 7 +- src/include/mobile/utils_i18n_ucollator.h | 9 +- src/include/mobile/utils_i18n_udatepg.h | 3 +- src/include/mobile/utils_i18n_ulocale.h | 58 +++- src/include/mobile/utils_i18n_unumber.h | 6 +- src/include/mobile/utils_i18n_ustring.h | 36 +-- src/utils_i18n_unumber.c | 4 + 8 files changed, 570 insertions(+), 62 deletions(-) diff --git a/src/include/mobile/utils_i18n_types.h b/src/include/mobile/utils_i18n_types.h index cf2dde8..a96cbed 100644 --- a/src/include/mobile/utils_i18n_types.h +++ b/src/include/mobile/utils_i18n_types.h @@ -240,9 +240,9 @@ typedef enum { 0-9 A-F a-f */ I18N_UCHAR_BIDI_CONTROL, - /**< Binary property Bidi_Control. \n - Format controls which have specific functions in the Bidi Algorithm. - */ + /**< Binary property Bidi_Control. \n + Format controls which have specific functions in the Bidi Algorithm. + */ I18N_UCHAR_BIDI_MIRRORED, /**< Binary property Bidi_Mirrored. \n Characters that may change display in RTL text. See Bidi Algorithm, UTR 9. @@ -524,7 +524,9 @@ typedef enum { Returns #i18n_uchar_u_word_break_values_e values. */ I18N_UCHAR_BIDI_PAIRED_BRACKET_TYPE, - /**< Unsupported yet. Please do not use. */ + /**< Enumerated property Bidi_Paired_Bracket_Type. \n + Returns #i18n_uchar_u_bidi_paired_bracket_type_e values . + */ I18N_UCHAR_INT_LIMIT, /**< One more than the last constant for enumerated/integer Unicode properties. */ I18N_UCHAR_GENERAL_CATEGORY_MASK = 0x2000, @@ -565,8 +567,8 @@ typedef enum { /**< String property Titlecase_Mapping. */ I18N_UCHAR_UPPERCASE_MAPPING = 0x400C, /**< String property Uppercase_Mapping. */ - I18N_UCHAR_BIDI_PAIRED_BRACKET, - /**< Unsupported yet. Please do not use. */ + I18N_UCHAR_BIDI_PAIRED_BRACKET = 0x400D, + /**< String property Bidi_Paired_Bracket. */ I18N_UCHAR_STRING_LIMIT, /**< One more than the last constant for string Unicode properties. */ I18N_UCHAR_SCRIPT_EXTENSIONS = 0x7000, @@ -580,6 +582,22 @@ typedef enum { } i18n_uchar_uproperty_e; /** + * @brief Bidi Paired Bracket Type constants. + * @since_tizen 3.0 + * @see I18N_UCHAR_BIDI_PAIRED_BRACKET_TYPE + * + */ +typedef enum { + I18N_UCHAR_U_BPT_NONE, /**< Not a paired bracket. */ + + I18N_UCHAR_U_BPT_OPEN, /**< Open paired bracket. */ + + I18N_UCHAR_U_BPT_CLOSE, /**< Close paired bracket. */ + + I18N_UCHAR_U_BPT_COUNT /**< Count */ +} i18n_uchar_u_bidi_paired_bracket_type_e; + +/** * @brief Constants for Unicode blocks, see the Unicode Data file Blocks.txt. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @@ -798,6 +816,38 @@ typedef enum { I18N_UCHAR_UBLOCK_TRANSPORT_AND_MAP_SYMBOLS, /**< Transport And Map Symbols */ I18N_UCHAR_UBLOCK_ALCHEMICAL_SYMBOLS, /**< Alchemical Symbols */ I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D, /**< CJK Unified Ideographs Extension D */ + I18N_UCHAR_UBLOCK_BASSA_VAH = 221, /**< Bassa Vah (Since 3.0) */ + I18N_UCHAR_UBLOCK_CAUCASIAN_ALBANIAN = 222, /**< Caucasian Albanian (Since 3.0) */ + I18N_UCHAR_UBLOCK_COPTIC_EPACT_NUMBERS = 223, /**< Coptic Epact Numbers (Since 3.0) */ + I18N_UCHAR_UBLOCK_COMBINING_DIACRITICAL_MARKS_EXTENDED = 224, /**< Combining Diacritical Marks Extended (Since 3.0) */ + I18N_UCHAR_UBLOCK_DUPLOYAN = 225, /**< Duployan (Since 3.0) */ + I18N_UCHAR_UBLOCK_ELBASAN = 226, /**< Elbasan (Since 3.0) */ + I18N_UCHAR_UBLOCK_GEOMETRIC_SHAPES_EXTENDED = 227, /**< Geometric Shapes Extended (Since 3.0) */ + I18N_UCHAR_UBLOCK_GRANTHA = 228, /**< Grantha (Since 3.0) */ + I18N_UCHAR_UBLOCK_KHOJKI = 229, /**< Khojki (Since 3.0) */ + I18N_UCHAR_UBLOCK_KHUDAWADI = 230, /**< Khudawadi (Since 3.0) */ + I18N_UCHAR_UBLOCK_LATIN_EXTENDED_E = 231, /**< Latin Extended E (Since 3.0) */ + I18N_UCHAR_UBLOCK_LINEAR_A = 232, /**< Linear A (Since 3.0) */ + I18N_UCHAR_UBLOCK_MAHAJANI = 233, /**< Mahajani (Since 3.0) */ + I18N_UCHAR_UBLOCK_MANICHAEAN = 234, /**< Manichaean (Since 3.0) */ + I18N_UCHAR_UBLOCK_MENDE_KIKAKUI = 235, /**< Mende Kikakui (Since 3.0) */ + I18N_UCHAR_UBLOCK_MODI = 236, /**< Modi (Since 3.0) */ + I18N_UCHAR_UBLOCK_MRO = 237, /**< Mro (Since 3.0) */ + I18N_UCHAR_UBLOCK_MYANMAR_EXTENDED_B = 238, /**< Myanmar Extended B (Since 3.0) */ + I18N_UCHAR_UBLOCK_NABATAEAN = 239, /**< Nabataean (Since 3.0) */ + I18N_UCHAR_UBLOCK_OLD_NORTH_ARABIAN = 240, /**< Old North Arabian (Since 3.0) */ + I18N_UCHAR_UBLOCK_OLD_PERMIC = 241, /**< Old Permic (Since 3.0) */ + I18N_UCHAR_UBLOCK_ORNAMENTAL_DINGBATS = 242, /**< Ornamental Dingbats (Since 3.0) */ + I18N_UCHAR_UBLOCK_PAHAWH_HMONG = 243, /**< Pahawh Hmong (Since 3.0) */ + I18N_UCHAR_UBLOCK_PALMYRENE = 244, /**< Palmyrene (Since 3.0) */ + I18N_UCHAR_UBLOCK_PAU_CIN_HAU = 245, /**< Pau Cin Hau (Since 3.0) */ + I18N_UCHAR_UBLOCK_PSALTER_PAHLAVI = 246, /**< Psalter Pahlavi (Since 3.0) */ + I18N_UCHAR_UBLOCK_SHORTHAND_FORMAT_CONTROLS = 247, /**< Shorthand Format Controls (Since 3.0) */ + I18N_UCHAR_UBLOCK_SIDDHAM = 248, /**< Siddham (Since 3.0) */ + I18N_UCHAR_UBLOCK_SINHALA_ARCHAIC_NUMBERS = 249, /**< Sinhala Archaic Numbers (Since 3.0) */ + I18N_UCHAR_UBLOCK_SUPPLEMENTAL_ARROWS_C = 250, /**< Supplemental Arrows C (Since 3.0) */ + I18N_UCHAR_UBLOCK_TIRHUTA = 251, /**< Tirhuta (Since 3.0) */ + I18N_UCHAR_UBLOCK_WARANG_CITI = 252, /**< Warang Citi (Since 3.0) */ I18N_UCHAR_UBLOCK_COUNT, /**< Count */ I18N_UCHAR_UBLOCK_INVALID_CODE = -1 /**< Invalid Code */ } i18n_uchar_ublock_code_e; @@ -826,6 +876,10 @@ typedef enum { I18N_UCHAR_U_POP_DIRECTIONAL_FORMAT, /**< PDF */ I18N_UCHAR_U_DIR_NON_SPACING_MARK, /**< NSM */ I18N_UCHAR_U_BOUNDARY_NEUTRAL, /**< BN */ + I18N_UCHAR_U_FIRST_STRONG_ISOLATE, /**< FSI (Since 3.0) */ + I18N_UCHAR_U_LEFT_TO_RIGHT_ISOLATE, /**< FSI (Since 3.0) */ + I18N_UCHAR_U_RIGHT_TO_LEFT_ISOLATE, /**< RLI (Since 3.0) */ + I18N_UCHAR_U_POP_DIRECTIONAL_ISOLATE, /**< PDI (Since 3.0) */ I18N_UCHAR_U_CHAR_DIRECTION_COUNT /**< Count */ } i18n_uchar_direction_e; @@ -972,6 +1026,34 @@ typedef enum { I18N_UCHAR_U_JG_FARSI_YEH, /**< Farsi Yeh */ I18N_UCHAR_U_JG_NYA, /**< Nya */ I18N_UCHAR_U_JG_ROHINGYA_YEH, /**< Rohingya Yeh */ + I18N_UCHAR_U_JG_MANICHAEAN_ALEPH, /**< Manichaean Aleph (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_AYIN, /**< Manichaean Ayin (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_BETH, /**< Manichaean Beth (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_DALETH, /**< Manichaean Daleth (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_DHAMEDH, /**< Manichaean Dhamedh (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_FIVE, /**< Manichaean Five (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_GIMEL, /**< Manichaean Gimel (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_HETH, /**< Manichaean Heth (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_HUNDRED, /**< Manichaean Hundred (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_KAPH, /**< Manichaean Kaph (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_LAMEDH, /**< Manichaean Lamedh (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_MEM, /**< Manichaean Mem (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_NUN, /**< Manichaean Nun (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_ONE, /**< Manichaean One (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_PE, /**< Manichaean Pe (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_QOPH, /**< Manichaean Qoph (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_RESH, /**< Manichaean Resh (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_SADHE, /**< Manichaean Sadhe (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_SAMEKH, /**< Manichaean Samekh (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_TAW, /**< Manichaean Taw (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_TEN, /**< Manichaean Ten (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_TETH, /**< Manichaean Teth (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_THAMEDH, /**< Manichaean Thamedh (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_TWENTY, /**< Manichaean Twenty (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_WAW, /**< Manichaean Waw (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_YODH, /**< Manichaean Yodh (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_ZAYIN, /**< Manichaean Zayin (Since 3.0) */ + I18N_UCHAR_U_JG_STRAIGHT_WAW, /**< Manichaean Waw (Since 3.0) */ I18N_UCHAR_U_JG_COUNT /**< Count */ } i18n_uchar_u_joining_group_e; @@ -1102,6 +1184,10 @@ typedef enum { I18N_UCHAR_U_WB_LF, /**< [LF] */ I18N_UCHAR_U_WB_MIDNUMLET, /**< [MB] */ I18N_UCHAR_U_WB_NEWLINE, /**< [NL] */ + I18N_UCHAR_U_WB_REGIONAL_INDICATOR, /**< [RI] (Since 3.0) */ + I18N_UCHAR_U_WB_HEBREW_LETTER, /**< [HL] (Since 3.0) */ + I18N_UCHAR_U_WB_SINGLE_QUOTE, /**< [SQ] (Since 3.0) */ + I18N_UCHAR_U_WB_DOUBLE_QUOTE, /**< [DQ] (Since 3.0) */ I18N_UCHAR_U_WB_COUNT /**< */ } i18n_uchar_u_word_break_values_e; @@ -1253,9 +1339,9 @@ typedef enum { * @since_tizen 2.4 */ typedef enum { - I18N_UNORMALIZATION_NO, /**< The input string is not in the normalization form. */ - I18N_UNORMALIZATION_YES, /**< The input string is in the normalization form. */ - I18N_UNORMALIZATION_MAYBE /**< The input string may or may not be in the normalization form. */ + I18N_UNORMALIZATION_NO, /**< The input string is not in the normalization form. */ + I18N_UNORMALIZATION_YES, /**< The input string is in the normalization form. */ + I18N_UNORMALIZATION_MAYBE /**< The input string may or may not be in the normalization form. */ } i18n_unormalization_check_result_e; /** @@ -1626,6 +1712,281 @@ typedef enum { I18N_UDISPLAY_CONTEXT_CAPITALIZATION_FOR_STANDALONE = (I18N_UDISPCTX_TYPE_CAPITALIZATION<<8) + 4, /**< Capitalization: For standalone */ } i18n_udisplay_context_e; +/* Skeletons for dates. */ + +/** + * @brief Constant for date skeleton with year. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ + +#define I18N_UDATE_YEAR "y" + +/** + * @brief Constant for date skeleton with quarter. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ + +#define I18N_UDATE_QUARTER "QQQQ" + +/** + * @brief Constant for date skeleton with abbreviated quarter. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ + +#define I18N_UDATE_ABBR_QUARTER "QQQ" + +/** + * @brief Constant for date skeleton with year and quarter. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ + +#define I18N_UDATE_YEAR_QUARTER "yQQQQ" + +/** + * @brief Constant for date skeleton with year and abbreviated quarter. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ + +#define I18N_UDATE_YEAR_ABBR_QUARTER "yQQQ" + +/** + * @brief Constant for date skeleton with month. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ + +#define I18N_UDATE_MONTH "MMMM" + +/** + * @brief Constant for date skeleton with abbreviated month. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ + +#define I18N_UDATE_ABBR_MONTH "MMM" + +/** + * @brief Constant for date skeleton with numeric month. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_NUM_MONTH "M" + +/** + * @brief Constant for date skeleton with year and month. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_YEAR_MONTH "yMMMM" + +/** + * @brief Constant for date skeleton with year and abbreviated month. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_YEAR_ABBR_MONTH "yMMM" + +/** + * @brief Constant for date skeleton with year and numeric month. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_YEAR_NUM_MONTH "yM" + +/** + * @brief Constant for date skeleton with day. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_DAY "d" + +/** + * @brief Constant for date skeleton with year, month, and day. + * @details Used in combinations date + time, date + time + zone, or time + zone. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_YEAR_MONTH_DAY "yMMMMd" + +/** + * @brief Constant for date skeleton with year, abbreviated month, and day. + * @details Used in combinations date + time, date + time + zone, or time + zone. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_YEAR_ABBR_MONTH_DAY "yMMMd" + +/** + * @brief Constant for date skeleton with year, numeric month, and day. + * @details Used in combinations date + time, date + time + zone, or time + zone. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_YEAR_NUM_MONTH_DAY "yMd" + +/** + * @brief Constant for date skeleton with weekday. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_WEEKDAY "EEEE" + +/** + * @brief Constant for date skeleton with abbreviated weekday. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_ABBR_WEEKDAY "E" + +/** + * @brief Constant for date skeleton with year, month, weekday, and day. + * @details Used in combinations date + time, date + time + zone, or time + zone. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_YEAR_MONTH_WEEKDAY_DAY "yMMMMEEEEd" + +/** + * @brief Constant for date skeleton with year, abbreviated month, weekday, and day. + * @details Used in combinations date + time, date + time + zone, or time + zone. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_YEAR_ABBR_MONTH_WEEKDAY_DAY "yMMMEd" + +/** + * @brief Constant for date skeleton with year, numeric month, weekday, and day. + * @details Used in combinations date + time, date + time + zone, or time + zone. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_YEAR_NUM_MONTH_WEEKDAY_DAY "yMEd" + +/** + * @brief Constant for date skeleton with long month and day. + * @details Used in combinations date + time, date + time + zone, or time + zone. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_MONTH_DAY "MMMMd" + +/** + * @brief Constant for date skeleton with abbreviated month and day. + * @details Used in combinations date + time, date + time + zone, or time + zone. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_ABBR_MONTH_DAY "MMMd" + +/** + * @brief Constant for date skeleton with numeric month and day. + * @details Used in combinations date + time, date + time + zone, or time + zone. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_NUM_MONTH_DAY "Md" + +/** + * @brief Constant for date skeleton with month, weekday, and day. + * @details Used in combinations date + time, date + time + zone, or time + zone. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_MONTH_WEEKDAY_DAY "MMMMEEEEd" + +/** + * @brief Constant for date skeleton with abbreviated month, weekday, and day. + * @details Used in combinations date + time, date + time + zone, or time + zone. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_ABBR_MONTH_WEEKDAY_DAY "MMMEd" + +/** + * @brief Constant for date skeleton with numeric month, weekday, and day. + * @details Used in combinations date + time, date + time + zone, or time + zone. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_NUM_MONTH_WEEKDAY_DAY "MEd" + +/* Skeletons for times. */ + +/** + * @brief Constant for date skeleton with hour, with the locale's preferred hour format (12 or 24). + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_HOUR "j" + +/** + * @brief Constant for date skeleton with hour in 24-hour presentation. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_HOUR24 "H" + +/** + * @brief Constant for date skeleton with minute. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_MINUTE "m" + +/** + * @brief Constant for date skeleton with hour and minute, with the locale's preferred hour format (12 or 24). + * @details Used in combinations date + time, date + time + zone, or time + zone. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_HOUR_MINUTE "jm" + +/** + * @brief Constant for date skeleton with hour and minute in 24-hour presentation. + * @details Used in combinations date + time, date + time + zone, or time + zone. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_HOUR24_MINUTE "Hm" + +/** + * @brief Constant for date skeleton with second. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_SECOND "s" + +/** + * @brief Constant for date skeleton with hour, minute, and second, + * with the locale's preferred hour format (12 or 24). + * @details Used in combinations date + time, date + time + zone, or time + zone. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_HOUR_MINUTE_SECOND "jms" + +/** + * @brief Constant for date skeleton with hour, minute, and second in + * 24-hour presentation. + * @details Used in combinations date + time, date + time + zone, or time + zone. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_HOUR24_MINUTE_SECOND "Hms" + +/** + * @brief Constant for date skeleton with minute and second. + * @details Used in combinations date + time, date + time + zone, or time + zone. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_MINUTE_SECOND "ms" + /** * @} * @} @@ -1741,7 +2102,7 @@ typedef enum { I18N_UNUMBER_CURRENCY_ISO, /**< Currency format with an ISO currency code, e.g., "USD1.00" */ I18N_UNUMBER_CURRENCY_PLURAL, /**< Currency format with a pluralized currency name, e.g., "1.00 US dollar" and "3.00 US dollars" */ - I18N_UNUMBER_FORMAT_STYLE_COUNT = I18N_UNUMBER_CURRENCY_PLURAL + 2, /**< One more than the highest number format style constant */ + I18N_UNUMBER_FORMAT_STYLE_COUNT, /**< One more than the highest number format style constant */ I18N_UNUMBER_DEFAULT = I18N_UNUMBER_DECIMAL, /**< Default format */ I18N_UNUMBER_IGNORE = I18N_UNUMBER_PATTERN_DECIMAL /**< Alias for #I18N_UNUMBER_PATTERN_DECIMAL */ } i18n_unumber_format_style_e; @@ -1778,7 +2139,7 @@ typedef enum { I18N_UNUMBER_SEVEN_DIGIT_SYMBOL = 24, /**< Seven */ I18N_UNUMBER_EIGHT_DIGIT_SYMBOL = 25, /**< Eight */ I18N_UNUMBER_NINE_DIGIT_SYMBOL = 26, /**< Nine */ - I18N_UNUMBER_FORMAT_SYMBOL_COUNT = 27 /**< Number of enumerators */ + I18N_UNUMBER_FORMAT_SYMBOL_COUNT /**< Number of enumerators */ } i18n_unumber_format_symbol_e; /** @@ -1823,17 +2184,21 @@ typedef enum { * @since_tizen 2.3.1 */ typedef enum { - I18N_UNUMBER_POSITIVE_PREFIX, /**< Positive prefix */ - I18N_UNUMBER_POSITIVE_SUFFIX, /**< Positive suffix */ - I18N_UNUMBER_NEGATIVE_PREFIX, /**< Negative prefix */ - I18N_UNUMBER_NEGATIVE_SUFFIX, /**< Negative suffix */ - I18N_UNUMBER_PADDING_CHARACTER, /**< The character used to pad to the format width */ - I18N_UNUMBER_CURRENCY_CODE, /**< The ISO currency code */ - I18N_UNUMBER_DEFAULT_RULESET, /**< The default rule set, such as "%spellout-numbering-year:", "%spellout-cardinal:", "%spellout-ordinal-masculine-plural:", "%spellout-ordinal-feminine:", or "%spellout-ordinal-neuter:". - The available public rulesets can be listed using i18n_unumber_get_text_attribute() with #I18N_UNUMBER_PUBLIC_RULESETS. This is only available with rule-based formatters */ - I18N_UNUMBER_PUBLIC_RULESETS, /**< The public rule sets. This is only available with rule-based formatters. This is a read-only attribute. - The public rulesets are returned as a single string, with each ruleset name delimited by ';' (semicolon). - See the CLDR LDML spec for more information about RBNF rulesets: http://www.unicode.org/reports/tr35/tr35-numbers.html#Rule-Based_Number_Formatting */ + I18N_UNUMBER_POSITIVE_PREFIX, /**< Positive prefix */ + I18N_UNUMBER_POSITIVE_SUFFIX, /**< Positive suffix */ + I18N_UNUMBER_NEGATIVE_PREFIX, /**< Negative prefix */ + I18N_UNUMBER_NEGATIVE_SUFFIX, /**< Negative suffix */ + I18N_UNUMBER_PADDING_CHARACTER, /**< The character used to pad to the format width */ + I18N_UNUMBER_CURRENCY_CODE, /**< The ISO currency code */ + I18N_UNUMBER_DEFAULT_RULESET, /**< The default rule set, such as "%spellout-numbering-year:", "%spellout-cardinal:", + "%spellout-ordinal-masculine-plural:", "%spellout-ordinal-feminine:" + or "%spellout-ordinal-neuter:". + The available public rulesets can be listed using i18n_unumber_get_text_attribute() + with #I18N_UNUMBER_PUBLIC_RULESETS. This is only available with rule-based formatters */ + I18N_UNUMBER_PUBLIC_RULESETS, /**< The public rule sets. This is only available with rule-based formatters. This is a read-only attribute. + The public rulesets are returned as a single string, with each ruleset name delimited by ';' (semicolon). + See the CLDR LDML spec for more information about RBNF rulesets: + http://www.unicode.org/reports/tr35/tr35-numbers.html#Rule-Based_Number_Formatting */ } i18n_unumber_format_text_attribute_e; /** @@ -1869,6 +2234,99 @@ typedef enum { #define I18N_ULOCALE_US "en_US" /**< Useful constant for en_US. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ /** + * @brief Useful constant for the maximum size of the language part of a locale ID. + * (including the terminating NULL). + * @since_tizen 3.0 + * @see i18n_ulocale_get_keyword_value() + * @see i18n_ulocale_get_language() + */ +#define I18N_ULOCALE_LANG_CAPACITY 12 + +/** + * @brief Useful constant for the maximum size of the country part of a locale ID + * (including the terminating NULL). + * @since_tizen 3.0 + * @see i18n_ulocale_get_keyword_value() + * @see i18n_ulocale_get_country() + */ +#define I18N_ULOCALE_COUNTRY_CAPACITY 4 +/** + * @brief Useful constant for the maximum size of the whole locale ID + * (including the terminating NULL and all keywords). + * @since_tizen 3.0 + * @see i18n_ulocale_get_keyword_value() + */ +#define I18N_ULOCALE_FULLNAME_CAPACITY 157 + +/** + * @brief Useful constant for the maximum size of the script part of a locale ID + * (including the terminating NULL). + * @since_tizen 3.0 + * @see i18n_ulocale_get_keyword_value() + * @see i18n_ulocale_get_script() + */ +#define I18N_ULOCALE_SCRIPT_CAPACITY 6 + +/** + * @brief Useful constant for the maximum size of keywords in a locale + * @since_tizen 3.0 + * @see i18n_ulocale_get_keyword_value() + */ +#define I18N_ULOCALE_KEYWORDS_CAPACITY 96 + +/** + * @brief Useful constant for the maximum total size of keywords and their values in a locale + * @since_tizen 3.0 + * @see i18n_ulocale_get_keyword_value() + */ +#define I18N_ULOCALE_KEYWORD_AND_VALUES_CAPACITY 100 + +/** + * @brief Invariant character separating keywords from the locale string + * @since_tizen 3.0 + * @see i18n_ulocale_get_keyword_value() + */ +#define I18N_ULOCALE_KEYWORD_SEPARATOR '@' + +/** + * @brief Unicode code point for '@' separating keywords from the locale string. + * @since_tizen 3.0 + * @see #I18N_ULOCALE_KEYWORD_SEPARATOR + * @see i18n_ulocale_get_keyword_value() + */ +#define I18N_ULOCALE_KEYWORD_SEPARATOR_UNICODE 0x40 + +/** + * @brief Invariant character for assigning value to a keyword + * @since_tizen 3.0 + * @see i18n_ulocale_get_keyword_value() + */ +#define I18N_ULOCALE_KEYWORD_ASSIGN '=' + +/** + * @brief Unicode code point for '=' for assigning value to a keyword. + * @since_tizen 3.0 + * @see #I18N_ULOCALE_KEYWORD_ASSIGN + * @see i18n_ulocale_get_keyword_value() + */ +#define I18N_ULOCALE_KEYWORD_ASSIGN_UNICODE 0x3D + +/** + * @brief Invariant character separating keywords + * @since_tizen 3.0 + * @see i18n_ulocale_get_keyword_value() + */ +#define I18N_ULOCALE_KEYWORD_ITEM_SEPARATOR ';' + +/** + * @brief Unicode code point for ';' separating keywords + * @since_tizen 3.0 + * @see #I18N_ULOCALE_KEYWORD_ITEM_SEPARATOR + * @see i18n_ulocale_get_keyword_value() + */ +#define I18N_ULOCALE_KEYWORD_ITEM_SEPARATOR_UNICODE 0x3B + +/** * @brief Enumeration for the 'out_result' parameter return value * @since_tizen 2.3.1 * @@ -1924,7 +2382,7 @@ typedef enum { * * @retval character the character represented by the escape sequence at offset * - * @see #i18n_ustring_unescape_at() + * @see i18n_ustring_unescape_at() */ typedef i18n_uchar(* i18n_ustring_unescape_char_at_cb)(int32_t offset, void *context); @@ -2018,6 +2476,7 @@ typedef void* i18n_ubreak_iterator_s; typedef void* i18n_ubreak_iterator_h; /** + * @deprecated Deprecated since Tizen 3.0 * @brief A recommended size (in bytes) for the memory buffer to be passed to i18n_ubrk_safe_clone(). * @since_tizen 2.3.1 */ @@ -2349,11 +2808,11 @@ typedef enum { I18N_USCRIPT_ANATOLIAN_HIEROGLYPHS = 156,/**< Hluw */ I18N_USCRIPT_KHOJKI = 157,/**< Khoj */ I18N_USCRIPT_TIRHUTA = 158,/**< Tirh */ -I18N_USCRIPT_CODE_LIMIT = 159 /**< Count of i18n_uscript_code_e enumerators*/ + I18N_USCRIPT_CODE_LIMIT = 159 /**< Count of i18n_uscript_code_e enumerators*/ } i18n_uscript_code_e; #ifdef __cplusplus } #endif -#endif /* __UTILS_I18N_TYPES_H__*/ +#endif /* __UTILS_I18N_TYPES_H__*/ diff --git a/src/include/mobile/utils_i18n_ubrk.h b/src/include/mobile/utils_i18n_ubrk.h index e755473..4ecdfdf 100755 --- a/src/include/mobile/utils_i18n_ubrk.h +++ b/src/include/mobile/utils_i18n_ubrk.h @@ -177,13 +177,12 @@ int32_t i18n_ubrk_next (i18n_ubreak_iterator_h break_iter); int32_t i18n_ubrk_previous (i18n_ubreak_iterator_h break_iter); /** - * @brief Sets the iterator position to the index of the first character in the text being scanned. - * @details This is not always the same as index @c 0 of the text. - * @remarks The specific error code can be obtained using the get_last_result() method. + * @brief Sets the iterator position to zero, the start of the text being scanned. + * * @remarks The specific error code can be obtained using the get_last_result() method. * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * @param[in] break_iter The break iterator to use. Must not be @c NULL. - * @return The character index of the first character in the text being scanned. + * @return The new iterator position (zero). * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ubrk_last() diff --git a/src/include/mobile/utils_i18n_ucollator.h b/src/include/mobile/utils_i18n_ucollator.h index cd129da..4a40674 100755 --- a/src/include/mobile/utils_i18n_ucollator.h +++ b/src/include/mobile/utils_i18n_ucollator.h @@ -125,7 +125,14 @@ extern "C" { /** * @brief Creates a i18n_ucollator_h for comparing strings. - * @details The i18n_ucollator_h is used in all the calls to the Collation service.\n + * @details For some languages, multiple collation types are available; + * for example, "de@collation=phonebook". + * Collation attributes can be specified via locale keywords as well, + * in the old locale extension syntax ("el@colCaseFirst=upper") + * or in language tag syntax ("el-u-kf-upper"). + * See User Guide: Collation API. + * + * The i18n_ucollator_h is used in all the calls to the Collation service.\n * After finished, collator must be disposed off by calling {@link #i18n_ucollator_destroy()}. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @remarks Must release @a collator using i18n_ucollator_destroy(). diff --git a/src/include/mobile/utils_i18n_udatepg.h b/src/include/mobile/utils_i18n_udatepg.h index 174690b..d46317d 100755 --- a/src/include/mobile/utils_i18n_udatepg.h +++ b/src/include/mobile/utils_i18n_udatepg.h @@ -37,7 +37,8 @@ * @details The Udatepg module provides flexible generation of date format patterns, * like "yy-MM-dd". The user can build up the generator by adding successive patterns. * Once that is done, a query can be made using a "skeleton", which is a pattern that - * just includes the desired fields and lengths. The generator will return the + * just includes the desired fields and lengths(Since Tizen 3.0 constants for skeletons are available - + * see #I18N_UDATE_YEAR and many, many others). The generator will return the * "best fit" pattern corresponding to that skeleton.\n * The main method people will use is i18n_udatepg_get_best_pattern(), since normally * #i18n_udatepg_h is pre-built with data from a particular locale. diff --git a/src/include/mobile/utils_i18n_ulocale.h b/src/include/mobile/utils_i18n_ulocale.h index 51d6e89..a180152 100644 --- a/src/include/mobile/utils_i18n_ulocale.h +++ b/src/include/mobile/utils_i18n_ulocale.h @@ -442,7 +442,8 @@ int32_t i18n_ulocale_get_display_variant ( const char *locale, const char *displ * int32_t keyword_count = 0; * i18n_uchar display_keyword[256]; * int32_t display_keyword_len = 0; - * i18n_uenumeration_h keyword_enum = i18n_ulocale_keywords_create("de_DE@collation=PHONEBOOK;calendar=TRADITIONAL"); + * i18n_uenumeration_h keyword_enum; + * i18n_ulocale_keywords_create("en_US@collation=PHONEBOOK;calendar=TRADITIONAL", &keyword_enum); * * for(keyword_count = i18n_uenumeration_count(keyword_enum); keyword_count > 0; keyword_count--){ * status = get_last_result(); @@ -484,7 +485,8 @@ int32_t i18n_ulocale_get_display_keyword ( const char *keyword, const char *disp /** * @brief Gets the value of the keyword suitable for display for the specified locale. - * @details E.g : for the locale string de_DE\@collation=PHONEBOOK, this API gets the display string for PHONEBOOK, in the display locale, when "collation" is specified as the keyword. + * @details E.g : for the locale string de_DE\@collation=PHONEBOOK, this API gets the display string for PHONEBOOK, + * in the display locale, when "collation" is specified as the keyword. * @remarks The specific error code can be obtained using the get_last_result() method. * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 @@ -567,7 +569,7 @@ const char * const *i18n_ulocale_get_iso_countries ( void ); int32_t i18n_ulocale_get_parent ( const char *locale_id, char *parent, int32_t parent_capacity ); /** - * @brief Gets the full name for the specified locale. + * @brief Gets the full name for the specified locale, like i18n_ulocale_get_name(), but without keywords. * @details Note : This has the effect of 'canonicalizing' the string to a certain extent. * Upper and lower case are set as needed, * and if the components were in 'POSIX' format they are changed to I18N format. @@ -628,13 +630,61 @@ int32_t i18n_ulocale_get_keyword_value ( const char *locale_id, const char *keyw /** * @brief Sets or removes the value of the specified keyword. - * @details For removing all keywords, use i18n_ulocale_get_base_name(). + * @details For removing all keywords(retrieving only locale base name associated with the keywords), + * use i18n_ulocale_get_base_name(). * * NOTE : Unlike almost every other I18N function which takes a * buffer, this function will NOT truncate the output text. If a * #I18N_ERROR_BUFFER_OVERFLOW is received, it means that the original * buffer is untouched. This is done to prevent incorrect or possibly * even malformed locales from being generated and used. + * + * Below code prints following logs in SDK: + * + * Locale and keywords: en_US@abc=12;def=34 + * keyword1: abc + * keyword2: def + * Locale: en_US + * Keyword1 value: 12 + * + * @code + * int32_t buff_size = 50; + * int32_t sub_buff_size = 45; + * char *buff = malloc(sizeof(char)*buff_size); + * char *sub_buff = malloc(sizeof(char)*sub_buff_size); + * char *locale = "en_US"; + * + * snprintf(buff, buff_size, "%s%s",locale, sub_buff); + * + * i18n_ulocale_set_keyword_value("abc", "cba", buff, buff_size); + * i18n_ulocale_set_keyword_value("def", "34", buff, buff_size); + * + * i18n_uenumeration_h keyword_enum; + * i18n_ulocale_keywords_create(buff, &keyword_enum); + * + * int32_t res_len = 0; + * const char *keyw = i18n_uenumeration_next(keyword_enum, &res_len); + * const char *keyw2 = i18n_uenumeration_next(keyword_enum, &res_len); + * + * char *only_locale = malloc(sizeof(char)*10); + * i18n_ulocale_get_base_name(buff, only_locale, 10); + * + * int32_t buff_size_get = 50; + * char *buff_out = malloc(sizeof(char)*buff_size_get); + * i18n_ulocale_get_keyword_value(buff, "abc", buff_out, buff_size_get); + * + * dlog_print(DLOG_DEBUG, "test", "Locale and keywords: %s", buff); + * dlog_print(DLOG_DEBUG, "test", "keyword1: %s", keyw); + * dlog_print(DLOG_DEBUG, "test", "keyword2: %s", keyw2); + * dlog_print(DLOG_DEBUG, "test", "Locale: %s", only_locale); + * dlog_print(DLOG_DEBUG, "test", "Keyword1 value: %s", buff_out); + * + * i18n_uenumeration_destroy(keyword_enum) + * free(buff); + * free(sub_buff); + * free(only_locale); + * free(buff_out); + * @endcode * @remarks The specific error code can be obtained using the get_last_result() method. * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 diff --git a/src/include/mobile/utils_i18n_unumber.h b/src/include/mobile/utils_i18n_unumber.h index c25d665..f1e7cf3 100644 --- a/src/include/mobile/utils_i18n_unumber.h +++ b/src/include/mobile/utils_i18n_unumber.h @@ -74,8 +74,8 @@ extern "C" { /** * @brief Creates and returns a new unumber_format_h for formatting and parsing numbers. - * @details A unumber_format_style_e may be used to format numbers by calling {@link i18n_unumber_create()}. - * The caller must call {@link #i18n_unumber_destroy() } when done to release resources used by this object. + * @details A unumber_format_style_e may be used to format numbers by calling i18n_unumber_create(). + * The caller must call i18n_unumber_destroy() when done to release resources used by this object. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @remarks Must release @a num_format using i18n_unumber_destroy(). * @@ -84,6 +84,8 @@ extern "C" { * #I18N_UNUMBER_CURRENCY, * #I18N_UNUMBER_PERCENT, * #I18N_UNUMBER_SCIENTIFIC, + * #I18N_UNUMBER_CURRENCY_ISO, + * #I18N_UNUMBER_CURRENCY_PLURAL, * #I18N_UNUMBER_SPELLOUT, * #I18N_UNUMBER_ORDINAL, * #I18N_UNUMBER_DURATION, diff --git a/src/include/mobile/utils_i18n_ustring.h b/src/include/mobile/utils_i18n_ustring.h index d4bbc94..dba29a0 100644 --- a/src/include/mobile/utils_i18n_ustring.h +++ b/src/include/mobile/utils_i18n_ustring.h @@ -1142,7 +1142,6 @@ i18n_uchar* i18n_ustring_from_UTF8 ( i18n_uchar *dest, int32_t dest_capacity, in /** * @brief Convert a UTF-16 string to UTF-8. - * @details If the input string is not well-formed, then the #I18N_ERROR_INVALID_CHAR_FOUND error code is set. * Same as #i18n_ustring_to_UTF8() except for the additional sub_char which is output for illegal input sequences, instead of stopping with the #I18N_ERROR_INVALID_CHAR_FOUND error code. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @@ -1162,10 +1161,8 @@ i18n_uchar* i18n_ustring_from_UTF8 ( i18n_uchar *dest, int32_t dest_capacity, in * A substitution character can be any valid Unicode code point (up to U+10FFFF) except for surrogate code points (U+D800..U+DFFF). * The recommended value is U+FFFD "REPLACEMENT CHARACTER". * @param[out] num_substitutions Output parameter receiving the number of substitutions if sub_char>=0. Set to 0 if no substitutions occur or sub_char<0. num_substitutions can be NULL. - * @param[out] error_code Pointer to a standard ICU error code. Its input value must - * pass the U_SUCCESS() test, or else the function returns - * immediately. Check for U_FAILURE() on output or use with - * function chaining. (See User Guide for details.) + * @param[out] error_codeMust be a valid pointer to an error code value, + * which must not indicate a failure before the function call. * @return The pointer to destination buffer. * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -1176,7 +1173,6 @@ char* i18n_ustring_to_UTF8_with_sub ( char *dest, int32_t dest_capacity, int32_t /** * @brief Convert a UTF-8 string to UTF-16. - * @details Same as #i18n_ustring_from_UTF8() except for the additional sub_char which is output for illegal input sequences, instead of stopping with the #I18N_ERROR_INVALID_CHAR_FOUND error code. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest A buffer for the result string.\n @@ -1195,10 +1191,8 @@ char* i18n_ustring_to_UTF8_with_sub ( char *dest, int32_t dest_capacity, int32_t * A substitution character can be any valid Unicode code point (up to U+10FFFF) except for surrogate code points (U+D800..U+DFFF). * The recommended value is U+FFFD "REPLACEMENT CHARACTER". * @param[out] num_substitutions Output parameter receiving the number of substitutions if sub_char>=0. Set to 0 if no substitutions occur or sub_char<0. num_substitutions can be NULL. - * @param[out] error_code Pointer to a standard ICU error code. Its input value must - * pass the U_SUCCESS() test, or else the function returns - * immediately. Check for U_FAILURE() on output or use with - * function chaining. (See User Guide for details.) + * @param[out] error_code Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. * @return The pointer to destination buffer. * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -1236,10 +1230,8 @@ i18n_uchar* i18n_ustring_from_UTF8_with_sub ( i18n_uchar *dest, int32_t dest_cap * @param[in] src The original source string * @param[in] src_len The length of the original string.\n * If @c -1, then @a src must be zero-terminated. - * @param[out] error_code Pointer to a standard ICU error code. Its input value must - * pass the U_SUCCESS() test, or else the function returns - * immediately. Check for U_FAILURE() on output or use with - * function chaining. (See User Guide for details.) + * @param[out] error_code Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. * @return The pointer to destination buffer. * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -1291,7 +1283,6 @@ i18n_uchar32* i18n_ustring_to_UTF32 ( i18n_uchar32 *dest, int32_t dest_capacity, * @param[in] src The original source string * @param[in] src_len The length of the original string.\n * If @c -1, then @a src must be zero-terminated. - * * @param[out] error_code Must be a valid pointer to an error code value, * which must not indicate a failure before the function call. * @return The pointer to destination buffer. @@ -1322,10 +1313,8 @@ i18n_uchar* i18n_ustring_from_UTF32 ( i18n_uchar *dest, int32_t dest_capacity, i * A substitution character can be any valid Unicode code point (up to U+10FFFF) except for surrogate code points (U+D800..U+DFFF). * The recommended value is U+FFFD "REPLACEMENT CHARACTER". * @param[out] num_substitutions Output parameter receiving the number of substitutions if sub_char>=0. Set to 0 if no substitutions occur or sub_char<0. num_substitutions can be NULL. - * @param[out] error_code Pointer to a standard ICU error code. Its input value must - * pass the U_SUCCESS() test, or else the function returns - * immediately. Check for U_FAILURE() on output or use with - * function chaining. (See User Guide for details.) + * @param[out] error_code Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. * @return The pointer to destination buffer. * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -1337,7 +1326,6 @@ i18n_uchar32* i18n_ustring_to_UTF32_with_sub ( i18n_uchar32 *dest, int32_t dest_ /** * @brief Convert a UTF-32 string to UTF-16. - * @details If the input string is not well-formed, then the #I18N_ERROR_INVALID_CHAR_FOUND error code is set. * Same as #i18n_ustring_from_UTF32() except for the additional sub_char which is output for illegal input sequences, instead of stopping with the #I18N_ERROR_INVALID_CHAR_FOUND error code. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @@ -1356,11 +1344,9 @@ i18n_uchar32* i18n_ustring_to_UTF32_with_sub ( i18n_uchar32 *dest, int32_t dest_ * A substitution character can be any valid Unicode code point (up to U+10FFFF) except for surrogate code points (U+D800..U+DFFF). * The recommended value is U+FFFD "REPLACEMENT CHARACTER". * @param[out] num_substitutions Output parameter receiving the number of substitutions if sub_char>=0. Set to 0 if no substitutions occur or sub_char<0. num_substitutions can be NULL. - * @param[out] error_code Pointer to a standard ICU error code. Its input value must - * pass the U_SUCCESS() test, or else the function returns - * immediately. Check for U_FAILURE() on output or use with - * function chaining. (See User Guide for details.) - * @return[out] The pointer to destination buffer. + * @param[out] error_code Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. + * @return The pointer to destination buffer. * * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter diff --git a/src/utils_i18n_unumber.c b/src/utils_i18n_unumber.c index 9815e3e..7908a4d 100755 --- a/src/utils_i18n_unumber.c +++ b/src/utils_i18n_unumber.c @@ -24,6 +24,7 @@ int i18n_unumber_create(i18n_unumber_format_style_e style, const i18n_uchar *pat i18n_unumber_format_h *num_format) { retv_if(num_format == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(style > I18N_UNUMBER_CURRENCY_PLURAL, I18N_ERROR_INVALID_PARAMETER); UErrorCode icu_error = U_ZERO_ERROR; *num_format = @@ -409,6 +410,9 @@ int i18n_unumber_set_symbol(i18n_unumber_format_h fmt, i18n_unumber_format_symbo if (fmt == NULL) return I18N_ERROR_INVALID_PARAMETER; + if (symbol >= I18N_UNUMBER_FORMAT_SYMBOL_COUNT) + return I18N_ERROR_INVALID_PARAMETER; + UErrorCode icu_error = U_ZERO_ERROR; unum_setSymbol(fmt, symbol, value, length, &icu_error); -- 2.7.4 From ae6e5448fec7dc00a147df47b0c2f0d04d36ff2d Mon Sep 17 00:00:00 2001 From: ByungWoo Lee Date: Wed, 3 Feb 2016 10:21:53 +0900 Subject: [PATCH 02/16] Update version - 1.2.1 Change-Id: I04e5bb18c8c9e9cfc8ac584dba4aa7defae39b4a --- packaging/capi-base-utils.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/capi-base-utils.spec b/packaging/capi-base-utils.spec index 388694a..d98fc4b 100755 --- a/packaging/capi-base-utils.spec +++ b/packaging/capi-base-utils.spec @@ -1,6 +1,6 @@ Name: capi-base-utils Summary: Base Utils -Version: 1.1.1 +Version: 1.2.1 Release: 1 Group: Base License: Apache-2.0 and ICU -- 2.7.4 From 3875168caab90819aefd95317cced46474e5d6d8 Mon Sep 17 00:00:00 2001 From: ByungWoo Lee Date: Thu, 11 Feb 2016 11:03:11 +0900 Subject: [PATCH 03/16] Apply changes of mobile to wearable Change-Id: I47a53b690d70b9f28fe9626ab6f46d0efe77ed7e --- src/include/wearable/utils_i18n_types.h | 509 ++++++++++++++++++++++++++-- src/include/wearable/utils_i18n_ubrk.h | 7 +- src/include/wearable/utils_i18n_ucollator.h | 9 +- src/include/wearable/utils_i18n_udatepg.h | 3 +- src/include/wearable/utils_i18n_ulocale.h | 58 +++- src/include/wearable/utils_i18n_unumber.h | 6 +- src/include/wearable/utils_i18n_usearch.h | 2 +- src/include/wearable/utils_i18n_ustring.h | 37 +- 8 files changed, 568 insertions(+), 63 deletions(-) diff --git a/src/include/wearable/utils_i18n_types.h b/src/include/wearable/utils_i18n_types.h index cf2dde8..a96cbed 100644 --- a/src/include/wearable/utils_i18n_types.h +++ b/src/include/wearable/utils_i18n_types.h @@ -240,9 +240,9 @@ typedef enum { 0-9 A-F a-f */ I18N_UCHAR_BIDI_CONTROL, - /**< Binary property Bidi_Control. \n - Format controls which have specific functions in the Bidi Algorithm. - */ + /**< Binary property Bidi_Control. \n + Format controls which have specific functions in the Bidi Algorithm. + */ I18N_UCHAR_BIDI_MIRRORED, /**< Binary property Bidi_Mirrored. \n Characters that may change display in RTL text. See Bidi Algorithm, UTR 9. @@ -524,7 +524,9 @@ typedef enum { Returns #i18n_uchar_u_word_break_values_e values. */ I18N_UCHAR_BIDI_PAIRED_BRACKET_TYPE, - /**< Unsupported yet. Please do not use. */ + /**< Enumerated property Bidi_Paired_Bracket_Type. \n + Returns #i18n_uchar_u_bidi_paired_bracket_type_e values . + */ I18N_UCHAR_INT_LIMIT, /**< One more than the last constant for enumerated/integer Unicode properties. */ I18N_UCHAR_GENERAL_CATEGORY_MASK = 0x2000, @@ -565,8 +567,8 @@ typedef enum { /**< String property Titlecase_Mapping. */ I18N_UCHAR_UPPERCASE_MAPPING = 0x400C, /**< String property Uppercase_Mapping. */ - I18N_UCHAR_BIDI_PAIRED_BRACKET, - /**< Unsupported yet. Please do not use. */ + I18N_UCHAR_BIDI_PAIRED_BRACKET = 0x400D, + /**< String property Bidi_Paired_Bracket. */ I18N_UCHAR_STRING_LIMIT, /**< One more than the last constant for string Unicode properties. */ I18N_UCHAR_SCRIPT_EXTENSIONS = 0x7000, @@ -580,6 +582,22 @@ typedef enum { } i18n_uchar_uproperty_e; /** + * @brief Bidi Paired Bracket Type constants. + * @since_tizen 3.0 + * @see I18N_UCHAR_BIDI_PAIRED_BRACKET_TYPE + * + */ +typedef enum { + I18N_UCHAR_U_BPT_NONE, /**< Not a paired bracket. */ + + I18N_UCHAR_U_BPT_OPEN, /**< Open paired bracket. */ + + I18N_UCHAR_U_BPT_CLOSE, /**< Close paired bracket. */ + + I18N_UCHAR_U_BPT_COUNT /**< Count */ +} i18n_uchar_u_bidi_paired_bracket_type_e; + +/** * @brief Constants for Unicode blocks, see the Unicode Data file Blocks.txt. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @@ -798,6 +816,38 @@ typedef enum { I18N_UCHAR_UBLOCK_TRANSPORT_AND_MAP_SYMBOLS, /**< Transport And Map Symbols */ I18N_UCHAR_UBLOCK_ALCHEMICAL_SYMBOLS, /**< Alchemical Symbols */ I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D, /**< CJK Unified Ideographs Extension D */ + I18N_UCHAR_UBLOCK_BASSA_VAH = 221, /**< Bassa Vah (Since 3.0) */ + I18N_UCHAR_UBLOCK_CAUCASIAN_ALBANIAN = 222, /**< Caucasian Albanian (Since 3.0) */ + I18N_UCHAR_UBLOCK_COPTIC_EPACT_NUMBERS = 223, /**< Coptic Epact Numbers (Since 3.0) */ + I18N_UCHAR_UBLOCK_COMBINING_DIACRITICAL_MARKS_EXTENDED = 224, /**< Combining Diacritical Marks Extended (Since 3.0) */ + I18N_UCHAR_UBLOCK_DUPLOYAN = 225, /**< Duployan (Since 3.0) */ + I18N_UCHAR_UBLOCK_ELBASAN = 226, /**< Elbasan (Since 3.0) */ + I18N_UCHAR_UBLOCK_GEOMETRIC_SHAPES_EXTENDED = 227, /**< Geometric Shapes Extended (Since 3.0) */ + I18N_UCHAR_UBLOCK_GRANTHA = 228, /**< Grantha (Since 3.0) */ + I18N_UCHAR_UBLOCK_KHOJKI = 229, /**< Khojki (Since 3.0) */ + I18N_UCHAR_UBLOCK_KHUDAWADI = 230, /**< Khudawadi (Since 3.0) */ + I18N_UCHAR_UBLOCK_LATIN_EXTENDED_E = 231, /**< Latin Extended E (Since 3.0) */ + I18N_UCHAR_UBLOCK_LINEAR_A = 232, /**< Linear A (Since 3.0) */ + I18N_UCHAR_UBLOCK_MAHAJANI = 233, /**< Mahajani (Since 3.0) */ + I18N_UCHAR_UBLOCK_MANICHAEAN = 234, /**< Manichaean (Since 3.0) */ + I18N_UCHAR_UBLOCK_MENDE_KIKAKUI = 235, /**< Mende Kikakui (Since 3.0) */ + I18N_UCHAR_UBLOCK_MODI = 236, /**< Modi (Since 3.0) */ + I18N_UCHAR_UBLOCK_MRO = 237, /**< Mro (Since 3.0) */ + I18N_UCHAR_UBLOCK_MYANMAR_EXTENDED_B = 238, /**< Myanmar Extended B (Since 3.0) */ + I18N_UCHAR_UBLOCK_NABATAEAN = 239, /**< Nabataean (Since 3.0) */ + I18N_UCHAR_UBLOCK_OLD_NORTH_ARABIAN = 240, /**< Old North Arabian (Since 3.0) */ + I18N_UCHAR_UBLOCK_OLD_PERMIC = 241, /**< Old Permic (Since 3.0) */ + I18N_UCHAR_UBLOCK_ORNAMENTAL_DINGBATS = 242, /**< Ornamental Dingbats (Since 3.0) */ + I18N_UCHAR_UBLOCK_PAHAWH_HMONG = 243, /**< Pahawh Hmong (Since 3.0) */ + I18N_UCHAR_UBLOCK_PALMYRENE = 244, /**< Palmyrene (Since 3.0) */ + I18N_UCHAR_UBLOCK_PAU_CIN_HAU = 245, /**< Pau Cin Hau (Since 3.0) */ + I18N_UCHAR_UBLOCK_PSALTER_PAHLAVI = 246, /**< Psalter Pahlavi (Since 3.0) */ + I18N_UCHAR_UBLOCK_SHORTHAND_FORMAT_CONTROLS = 247, /**< Shorthand Format Controls (Since 3.0) */ + I18N_UCHAR_UBLOCK_SIDDHAM = 248, /**< Siddham (Since 3.0) */ + I18N_UCHAR_UBLOCK_SINHALA_ARCHAIC_NUMBERS = 249, /**< Sinhala Archaic Numbers (Since 3.0) */ + I18N_UCHAR_UBLOCK_SUPPLEMENTAL_ARROWS_C = 250, /**< Supplemental Arrows C (Since 3.0) */ + I18N_UCHAR_UBLOCK_TIRHUTA = 251, /**< Tirhuta (Since 3.0) */ + I18N_UCHAR_UBLOCK_WARANG_CITI = 252, /**< Warang Citi (Since 3.0) */ I18N_UCHAR_UBLOCK_COUNT, /**< Count */ I18N_UCHAR_UBLOCK_INVALID_CODE = -1 /**< Invalid Code */ } i18n_uchar_ublock_code_e; @@ -826,6 +876,10 @@ typedef enum { I18N_UCHAR_U_POP_DIRECTIONAL_FORMAT, /**< PDF */ I18N_UCHAR_U_DIR_NON_SPACING_MARK, /**< NSM */ I18N_UCHAR_U_BOUNDARY_NEUTRAL, /**< BN */ + I18N_UCHAR_U_FIRST_STRONG_ISOLATE, /**< FSI (Since 3.0) */ + I18N_UCHAR_U_LEFT_TO_RIGHT_ISOLATE, /**< FSI (Since 3.0) */ + I18N_UCHAR_U_RIGHT_TO_LEFT_ISOLATE, /**< RLI (Since 3.0) */ + I18N_UCHAR_U_POP_DIRECTIONAL_ISOLATE, /**< PDI (Since 3.0) */ I18N_UCHAR_U_CHAR_DIRECTION_COUNT /**< Count */ } i18n_uchar_direction_e; @@ -972,6 +1026,34 @@ typedef enum { I18N_UCHAR_U_JG_FARSI_YEH, /**< Farsi Yeh */ I18N_UCHAR_U_JG_NYA, /**< Nya */ I18N_UCHAR_U_JG_ROHINGYA_YEH, /**< Rohingya Yeh */ + I18N_UCHAR_U_JG_MANICHAEAN_ALEPH, /**< Manichaean Aleph (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_AYIN, /**< Manichaean Ayin (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_BETH, /**< Manichaean Beth (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_DALETH, /**< Manichaean Daleth (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_DHAMEDH, /**< Manichaean Dhamedh (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_FIVE, /**< Manichaean Five (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_GIMEL, /**< Manichaean Gimel (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_HETH, /**< Manichaean Heth (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_HUNDRED, /**< Manichaean Hundred (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_KAPH, /**< Manichaean Kaph (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_LAMEDH, /**< Manichaean Lamedh (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_MEM, /**< Manichaean Mem (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_NUN, /**< Manichaean Nun (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_ONE, /**< Manichaean One (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_PE, /**< Manichaean Pe (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_QOPH, /**< Manichaean Qoph (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_RESH, /**< Manichaean Resh (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_SADHE, /**< Manichaean Sadhe (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_SAMEKH, /**< Manichaean Samekh (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_TAW, /**< Manichaean Taw (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_TEN, /**< Manichaean Ten (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_TETH, /**< Manichaean Teth (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_THAMEDH, /**< Manichaean Thamedh (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_TWENTY, /**< Manichaean Twenty (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_WAW, /**< Manichaean Waw (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_YODH, /**< Manichaean Yodh (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_ZAYIN, /**< Manichaean Zayin (Since 3.0) */ + I18N_UCHAR_U_JG_STRAIGHT_WAW, /**< Manichaean Waw (Since 3.0) */ I18N_UCHAR_U_JG_COUNT /**< Count */ } i18n_uchar_u_joining_group_e; @@ -1102,6 +1184,10 @@ typedef enum { I18N_UCHAR_U_WB_LF, /**< [LF] */ I18N_UCHAR_U_WB_MIDNUMLET, /**< [MB] */ I18N_UCHAR_U_WB_NEWLINE, /**< [NL] */ + I18N_UCHAR_U_WB_REGIONAL_INDICATOR, /**< [RI] (Since 3.0) */ + I18N_UCHAR_U_WB_HEBREW_LETTER, /**< [HL] (Since 3.0) */ + I18N_UCHAR_U_WB_SINGLE_QUOTE, /**< [SQ] (Since 3.0) */ + I18N_UCHAR_U_WB_DOUBLE_QUOTE, /**< [DQ] (Since 3.0) */ I18N_UCHAR_U_WB_COUNT /**< */ } i18n_uchar_u_word_break_values_e; @@ -1253,9 +1339,9 @@ typedef enum { * @since_tizen 2.4 */ typedef enum { - I18N_UNORMALIZATION_NO, /**< The input string is not in the normalization form. */ - I18N_UNORMALIZATION_YES, /**< The input string is in the normalization form. */ - I18N_UNORMALIZATION_MAYBE /**< The input string may or may not be in the normalization form. */ + I18N_UNORMALIZATION_NO, /**< The input string is not in the normalization form. */ + I18N_UNORMALIZATION_YES, /**< The input string is in the normalization form. */ + I18N_UNORMALIZATION_MAYBE /**< The input string may or may not be in the normalization form. */ } i18n_unormalization_check_result_e; /** @@ -1626,6 +1712,281 @@ typedef enum { I18N_UDISPLAY_CONTEXT_CAPITALIZATION_FOR_STANDALONE = (I18N_UDISPCTX_TYPE_CAPITALIZATION<<8) + 4, /**< Capitalization: For standalone */ } i18n_udisplay_context_e; +/* Skeletons for dates. */ + +/** + * @brief Constant for date skeleton with year. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ + +#define I18N_UDATE_YEAR "y" + +/** + * @brief Constant for date skeleton with quarter. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ + +#define I18N_UDATE_QUARTER "QQQQ" + +/** + * @brief Constant for date skeleton with abbreviated quarter. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ + +#define I18N_UDATE_ABBR_QUARTER "QQQ" + +/** + * @brief Constant for date skeleton with year and quarter. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ + +#define I18N_UDATE_YEAR_QUARTER "yQQQQ" + +/** + * @brief Constant for date skeleton with year and abbreviated quarter. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ + +#define I18N_UDATE_YEAR_ABBR_QUARTER "yQQQ" + +/** + * @brief Constant for date skeleton with month. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ + +#define I18N_UDATE_MONTH "MMMM" + +/** + * @brief Constant for date skeleton with abbreviated month. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ + +#define I18N_UDATE_ABBR_MONTH "MMM" + +/** + * @brief Constant for date skeleton with numeric month. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_NUM_MONTH "M" + +/** + * @brief Constant for date skeleton with year and month. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_YEAR_MONTH "yMMMM" + +/** + * @brief Constant for date skeleton with year and abbreviated month. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_YEAR_ABBR_MONTH "yMMM" + +/** + * @brief Constant for date skeleton with year and numeric month. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_YEAR_NUM_MONTH "yM" + +/** + * @brief Constant for date skeleton with day. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_DAY "d" + +/** + * @brief Constant for date skeleton with year, month, and day. + * @details Used in combinations date + time, date + time + zone, or time + zone. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_YEAR_MONTH_DAY "yMMMMd" + +/** + * @brief Constant for date skeleton with year, abbreviated month, and day. + * @details Used in combinations date + time, date + time + zone, or time + zone. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_YEAR_ABBR_MONTH_DAY "yMMMd" + +/** + * @brief Constant for date skeleton with year, numeric month, and day. + * @details Used in combinations date + time, date + time + zone, or time + zone. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_YEAR_NUM_MONTH_DAY "yMd" + +/** + * @brief Constant for date skeleton with weekday. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_WEEKDAY "EEEE" + +/** + * @brief Constant for date skeleton with abbreviated weekday. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_ABBR_WEEKDAY "E" + +/** + * @brief Constant for date skeleton with year, month, weekday, and day. + * @details Used in combinations date + time, date + time + zone, or time + zone. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_YEAR_MONTH_WEEKDAY_DAY "yMMMMEEEEd" + +/** + * @brief Constant for date skeleton with year, abbreviated month, weekday, and day. + * @details Used in combinations date + time, date + time + zone, or time + zone. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_YEAR_ABBR_MONTH_WEEKDAY_DAY "yMMMEd" + +/** + * @brief Constant for date skeleton with year, numeric month, weekday, and day. + * @details Used in combinations date + time, date + time + zone, or time + zone. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_YEAR_NUM_MONTH_WEEKDAY_DAY "yMEd" + +/** + * @brief Constant for date skeleton with long month and day. + * @details Used in combinations date + time, date + time + zone, or time + zone. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_MONTH_DAY "MMMMd" + +/** + * @brief Constant for date skeleton with abbreviated month and day. + * @details Used in combinations date + time, date + time + zone, or time + zone. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_ABBR_MONTH_DAY "MMMd" + +/** + * @brief Constant for date skeleton with numeric month and day. + * @details Used in combinations date + time, date + time + zone, or time + zone. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_NUM_MONTH_DAY "Md" + +/** + * @brief Constant for date skeleton with month, weekday, and day. + * @details Used in combinations date + time, date + time + zone, or time + zone. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_MONTH_WEEKDAY_DAY "MMMMEEEEd" + +/** + * @brief Constant for date skeleton with abbreviated month, weekday, and day. + * @details Used in combinations date + time, date + time + zone, or time + zone. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_ABBR_MONTH_WEEKDAY_DAY "MMMEd" + +/** + * @brief Constant for date skeleton with numeric month, weekday, and day. + * @details Used in combinations date + time, date + time + zone, or time + zone. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_NUM_MONTH_WEEKDAY_DAY "MEd" + +/* Skeletons for times. */ + +/** + * @brief Constant for date skeleton with hour, with the locale's preferred hour format (12 or 24). + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_HOUR "j" + +/** + * @brief Constant for date skeleton with hour in 24-hour presentation. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_HOUR24 "H" + +/** + * @brief Constant for date skeleton with minute. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_MINUTE "m" + +/** + * @brief Constant for date skeleton with hour and minute, with the locale's preferred hour format (12 or 24). + * @details Used in combinations date + time, date + time + zone, or time + zone. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_HOUR_MINUTE "jm" + +/** + * @brief Constant for date skeleton with hour and minute in 24-hour presentation. + * @details Used in combinations date + time, date + time + zone, or time + zone. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_HOUR24_MINUTE "Hm" + +/** + * @brief Constant for date skeleton with second. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_SECOND "s" + +/** + * @brief Constant for date skeleton with hour, minute, and second, + * with the locale's preferred hour format (12 or 24). + * @details Used in combinations date + time, date + time + zone, or time + zone. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_HOUR_MINUTE_SECOND "jms" + +/** + * @brief Constant for date skeleton with hour, minute, and second in + * 24-hour presentation. + * @details Used in combinations date + time, date + time + zone, or time + zone. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_HOUR24_MINUTE_SECOND "Hms" + +/** + * @brief Constant for date skeleton with minute and second. + * @details Used in combinations date + time, date + time + zone, or time + zone. + * @since_tizen 3.0 + * @see i18n_udatepg_get_best_pattern() + */ +#define I18N_UDATE_MINUTE_SECOND "ms" + /** * @} * @} @@ -1741,7 +2102,7 @@ typedef enum { I18N_UNUMBER_CURRENCY_ISO, /**< Currency format with an ISO currency code, e.g., "USD1.00" */ I18N_UNUMBER_CURRENCY_PLURAL, /**< Currency format with a pluralized currency name, e.g., "1.00 US dollar" and "3.00 US dollars" */ - I18N_UNUMBER_FORMAT_STYLE_COUNT = I18N_UNUMBER_CURRENCY_PLURAL + 2, /**< One more than the highest number format style constant */ + I18N_UNUMBER_FORMAT_STYLE_COUNT, /**< One more than the highest number format style constant */ I18N_UNUMBER_DEFAULT = I18N_UNUMBER_DECIMAL, /**< Default format */ I18N_UNUMBER_IGNORE = I18N_UNUMBER_PATTERN_DECIMAL /**< Alias for #I18N_UNUMBER_PATTERN_DECIMAL */ } i18n_unumber_format_style_e; @@ -1778,7 +2139,7 @@ typedef enum { I18N_UNUMBER_SEVEN_DIGIT_SYMBOL = 24, /**< Seven */ I18N_UNUMBER_EIGHT_DIGIT_SYMBOL = 25, /**< Eight */ I18N_UNUMBER_NINE_DIGIT_SYMBOL = 26, /**< Nine */ - I18N_UNUMBER_FORMAT_SYMBOL_COUNT = 27 /**< Number of enumerators */ + I18N_UNUMBER_FORMAT_SYMBOL_COUNT /**< Number of enumerators */ } i18n_unumber_format_symbol_e; /** @@ -1823,17 +2184,21 @@ typedef enum { * @since_tizen 2.3.1 */ typedef enum { - I18N_UNUMBER_POSITIVE_PREFIX, /**< Positive prefix */ - I18N_UNUMBER_POSITIVE_SUFFIX, /**< Positive suffix */ - I18N_UNUMBER_NEGATIVE_PREFIX, /**< Negative prefix */ - I18N_UNUMBER_NEGATIVE_SUFFIX, /**< Negative suffix */ - I18N_UNUMBER_PADDING_CHARACTER, /**< The character used to pad to the format width */ - I18N_UNUMBER_CURRENCY_CODE, /**< The ISO currency code */ - I18N_UNUMBER_DEFAULT_RULESET, /**< The default rule set, such as "%spellout-numbering-year:", "%spellout-cardinal:", "%spellout-ordinal-masculine-plural:", "%spellout-ordinal-feminine:", or "%spellout-ordinal-neuter:". - The available public rulesets can be listed using i18n_unumber_get_text_attribute() with #I18N_UNUMBER_PUBLIC_RULESETS. This is only available with rule-based formatters */ - I18N_UNUMBER_PUBLIC_RULESETS, /**< The public rule sets. This is only available with rule-based formatters. This is a read-only attribute. - The public rulesets are returned as a single string, with each ruleset name delimited by ';' (semicolon). - See the CLDR LDML spec for more information about RBNF rulesets: http://www.unicode.org/reports/tr35/tr35-numbers.html#Rule-Based_Number_Formatting */ + I18N_UNUMBER_POSITIVE_PREFIX, /**< Positive prefix */ + I18N_UNUMBER_POSITIVE_SUFFIX, /**< Positive suffix */ + I18N_UNUMBER_NEGATIVE_PREFIX, /**< Negative prefix */ + I18N_UNUMBER_NEGATIVE_SUFFIX, /**< Negative suffix */ + I18N_UNUMBER_PADDING_CHARACTER, /**< The character used to pad to the format width */ + I18N_UNUMBER_CURRENCY_CODE, /**< The ISO currency code */ + I18N_UNUMBER_DEFAULT_RULESET, /**< The default rule set, such as "%spellout-numbering-year:", "%spellout-cardinal:", + "%spellout-ordinal-masculine-plural:", "%spellout-ordinal-feminine:" + or "%spellout-ordinal-neuter:". + The available public rulesets can be listed using i18n_unumber_get_text_attribute() + with #I18N_UNUMBER_PUBLIC_RULESETS. This is only available with rule-based formatters */ + I18N_UNUMBER_PUBLIC_RULESETS, /**< The public rule sets. This is only available with rule-based formatters. This is a read-only attribute. + The public rulesets are returned as a single string, with each ruleset name delimited by ';' (semicolon). + See the CLDR LDML spec for more information about RBNF rulesets: + http://www.unicode.org/reports/tr35/tr35-numbers.html#Rule-Based_Number_Formatting */ } i18n_unumber_format_text_attribute_e; /** @@ -1869,6 +2234,99 @@ typedef enum { #define I18N_ULOCALE_US "en_US" /**< Useful constant for en_US. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ /** + * @brief Useful constant for the maximum size of the language part of a locale ID. + * (including the terminating NULL). + * @since_tizen 3.0 + * @see i18n_ulocale_get_keyword_value() + * @see i18n_ulocale_get_language() + */ +#define I18N_ULOCALE_LANG_CAPACITY 12 + +/** + * @brief Useful constant for the maximum size of the country part of a locale ID + * (including the terminating NULL). + * @since_tizen 3.0 + * @see i18n_ulocale_get_keyword_value() + * @see i18n_ulocale_get_country() + */ +#define I18N_ULOCALE_COUNTRY_CAPACITY 4 +/** + * @brief Useful constant for the maximum size of the whole locale ID + * (including the terminating NULL and all keywords). + * @since_tizen 3.0 + * @see i18n_ulocale_get_keyword_value() + */ +#define I18N_ULOCALE_FULLNAME_CAPACITY 157 + +/** + * @brief Useful constant for the maximum size of the script part of a locale ID + * (including the terminating NULL). + * @since_tizen 3.0 + * @see i18n_ulocale_get_keyword_value() + * @see i18n_ulocale_get_script() + */ +#define I18N_ULOCALE_SCRIPT_CAPACITY 6 + +/** + * @brief Useful constant for the maximum size of keywords in a locale + * @since_tizen 3.0 + * @see i18n_ulocale_get_keyword_value() + */ +#define I18N_ULOCALE_KEYWORDS_CAPACITY 96 + +/** + * @brief Useful constant for the maximum total size of keywords and their values in a locale + * @since_tizen 3.0 + * @see i18n_ulocale_get_keyword_value() + */ +#define I18N_ULOCALE_KEYWORD_AND_VALUES_CAPACITY 100 + +/** + * @brief Invariant character separating keywords from the locale string + * @since_tizen 3.0 + * @see i18n_ulocale_get_keyword_value() + */ +#define I18N_ULOCALE_KEYWORD_SEPARATOR '@' + +/** + * @brief Unicode code point for '@' separating keywords from the locale string. + * @since_tizen 3.0 + * @see #I18N_ULOCALE_KEYWORD_SEPARATOR + * @see i18n_ulocale_get_keyword_value() + */ +#define I18N_ULOCALE_KEYWORD_SEPARATOR_UNICODE 0x40 + +/** + * @brief Invariant character for assigning value to a keyword + * @since_tizen 3.0 + * @see i18n_ulocale_get_keyword_value() + */ +#define I18N_ULOCALE_KEYWORD_ASSIGN '=' + +/** + * @brief Unicode code point for '=' for assigning value to a keyword. + * @since_tizen 3.0 + * @see #I18N_ULOCALE_KEYWORD_ASSIGN + * @see i18n_ulocale_get_keyword_value() + */ +#define I18N_ULOCALE_KEYWORD_ASSIGN_UNICODE 0x3D + +/** + * @brief Invariant character separating keywords + * @since_tizen 3.0 + * @see i18n_ulocale_get_keyword_value() + */ +#define I18N_ULOCALE_KEYWORD_ITEM_SEPARATOR ';' + +/** + * @brief Unicode code point for ';' separating keywords + * @since_tizen 3.0 + * @see #I18N_ULOCALE_KEYWORD_ITEM_SEPARATOR + * @see i18n_ulocale_get_keyword_value() + */ +#define I18N_ULOCALE_KEYWORD_ITEM_SEPARATOR_UNICODE 0x3B + +/** * @brief Enumeration for the 'out_result' parameter return value * @since_tizen 2.3.1 * @@ -1924,7 +2382,7 @@ typedef enum { * * @retval character the character represented by the escape sequence at offset * - * @see #i18n_ustring_unescape_at() + * @see i18n_ustring_unescape_at() */ typedef i18n_uchar(* i18n_ustring_unescape_char_at_cb)(int32_t offset, void *context); @@ -2018,6 +2476,7 @@ typedef void* i18n_ubreak_iterator_s; typedef void* i18n_ubreak_iterator_h; /** + * @deprecated Deprecated since Tizen 3.0 * @brief A recommended size (in bytes) for the memory buffer to be passed to i18n_ubrk_safe_clone(). * @since_tizen 2.3.1 */ @@ -2349,11 +2808,11 @@ typedef enum { I18N_USCRIPT_ANATOLIAN_HIEROGLYPHS = 156,/**< Hluw */ I18N_USCRIPT_KHOJKI = 157,/**< Khoj */ I18N_USCRIPT_TIRHUTA = 158,/**< Tirh */ -I18N_USCRIPT_CODE_LIMIT = 159 /**< Count of i18n_uscript_code_e enumerators*/ + I18N_USCRIPT_CODE_LIMIT = 159 /**< Count of i18n_uscript_code_e enumerators*/ } i18n_uscript_code_e; #ifdef __cplusplus } #endif -#endif /* __UTILS_I18N_TYPES_H__*/ +#endif /* __UTILS_I18N_TYPES_H__*/ diff --git a/src/include/wearable/utils_i18n_ubrk.h b/src/include/wearable/utils_i18n_ubrk.h index 23cf7aa..c8a6fa0 100755 --- a/src/include/wearable/utils_i18n_ubrk.h +++ b/src/include/wearable/utils_i18n_ubrk.h @@ -177,13 +177,12 @@ int32_t i18n_ubrk_next (i18n_ubreak_iterator_h break_iter); int32_t i18n_ubrk_previous (i18n_ubreak_iterator_h break_iter); /** - * @brief Sets the iterator position to the index of the first character in the text being scanned. - * @details This is not always the same as index @c 0 of the text. - * @remarks The specific error code can be obtained using the get_last_result() method. + * @brief Sets the iterator position to zero, the start of the text being scanned. + * * @remarks The specific error code can be obtained using the get_last_result() method. * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * @param[in] break_iter The break iterator to use. Must not be @c NULL. - * @return The character index of the first character in the text being scanned. + * @return The new iterator position (zero). * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ubrk_last() diff --git a/src/include/wearable/utils_i18n_ucollator.h b/src/include/wearable/utils_i18n_ucollator.h index cd129da..4a40674 100755 --- a/src/include/wearable/utils_i18n_ucollator.h +++ b/src/include/wearable/utils_i18n_ucollator.h @@ -125,7 +125,14 @@ extern "C" { /** * @brief Creates a i18n_ucollator_h for comparing strings. - * @details The i18n_ucollator_h is used in all the calls to the Collation service.\n + * @details For some languages, multiple collation types are available; + * for example, "de@collation=phonebook". + * Collation attributes can be specified via locale keywords as well, + * in the old locale extension syntax ("el@colCaseFirst=upper") + * or in language tag syntax ("el-u-kf-upper"). + * See User Guide: Collation API. + * + * The i18n_ucollator_h is used in all the calls to the Collation service.\n * After finished, collator must be disposed off by calling {@link #i18n_ucollator_destroy()}. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @remarks Must release @a collator using i18n_ucollator_destroy(). diff --git a/src/include/wearable/utils_i18n_udatepg.h b/src/include/wearable/utils_i18n_udatepg.h index 174690b..d46317d 100755 --- a/src/include/wearable/utils_i18n_udatepg.h +++ b/src/include/wearable/utils_i18n_udatepg.h @@ -37,7 +37,8 @@ * @details The Udatepg module provides flexible generation of date format patterns, * like "yy-MM-dd". The user can build up the generator by adding successive patterns. * Once that is done, a query can be made using a "skeleton", which is a pattern that - * just includes the desired fields and lengths. The generator will return the + * just includes the desired fields and lengths(Since Tizen 3.0 constants for skeletons are available - + * see #I18N_UDATE_YEAR and many, many others). The generator will return the * "best fit" pattern corresponding to that skeleton.\n * The main method people will use is i18n_udatepg_get_best_pattern(), since normally * #i18n_udatepg_h is pre-built with data from a particular locale. diff --git a/src/include/wearable/utils_i18n_ulocale.h b/src/include/wearable/utils_i18n_ulocale.h index 51d6e89..a180152 100644 --- a/src/include/wearable/utils_i18n_ulocale.h +++ b/src/include/wearable/utils_i18n_ulocale.h @@ -442,7 +442,8 @@ int32_t i18n_ulocale_get_display_variant ( const char *locale, const char *displ * int32_t keyword_count = 0; * i18n_uchar display_keyword[256]; * int32_t display_keyword_len = 0; - * i18n_uenumeration_h keyword_enum = i18n_ulocale_keywords_create("de_DE@collation=PHONEBOOK;calendar=TRADITIONAL"); + * i18n_uenumeration_h keyword_enum; + * i18n_ulocale_keywords_create("en_US@collation=PHONEBOOK;calendar=TRADITIONAL", &keyword_enum); * * for(keyword_count = i18n_uenumeration_count(keyword_enum); keyword_count > 0; keyword_count--){ * status = get_last_result(); @@ -484,7 +485,8 @@ int32_t i18n_ulocale_get_display_keyword ( const char *keyword, const char *disp /** * @brief Gets the value of the keyword suitable for display for the specified locale. - * @details E.g : for the locale string de_DE\@collation=PHONEBOOK, this API gets the display string for PHONEBOOK, in the display locale, when "collation" is specified as the keyword. + * @details E.g : for the locale string de_DE\@collation=PHONEBOOK, this API gets the display string for PHONEBOOK, + * in the display locale, when "collation" is specified as the keyword. * @remarks The specific error code can be obtained using the get_last_result() method. * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 @@ -567,7 +569,7 @@ const char * const *i18n_ulocale_get_iso_countries ( void ); int32_t i18n_ulocale_get_parent ( const char *locale_id, char *parent, int32_t parent_capacity ); /** - * @brief Gets the full name for the specified locale. + * @brief Gets the full name for the specified locale, like i18n_ulocale_get_name(), but without keywords. * @details Note : This has the effect of 'canonicalizing' the string to a certain extent. * Upper and lower case are set as needed, * and if the components were in 'POSIX' format they are changed to I18N format. @@ -628,13 +630,61 @@ int32_t i18n_ulocale_get_keyword_value ( const char *locale_id, const char *keyw /** * @brief Sets or removes the value of the specified keyword. - * @details For removing all keywords, use i18n_ulocale_get_base_name(). + * @details For removing all keywords(retrieving only locale base name associated with the keywords), + * use i18n_ulocale_get_base_name(). * * NOTE : Unlike almost every other I18N function which takes a * buffer, this function will NOT truncate the output text. If a * #I18N_ERROR_BUFFER_OVERFLOW is received, it means that the original * buffer is untouched. This is done to prevent incorrect or possibly * even malformed locales from being generated and used. + * + * Below code prints following logs in SDK: + * + * Locale and keywords: en_US@abc=12;def=34 + * keyword1: abc + * keyword2: def + * Locale: en_US + * Keyword1 value: 12 + * + * @code + * int32_t buff_size = 50; + * int32_t sub_buff_size = 45; + * char *buff = malloc(sizeof(char)*buff_size); + * char *sub_buff = malloc(sizeof(char)*sub_buff_size); + * char *locale = "en_US"; + * + * snprintf(buff, buff_size, "%s%s",locale, sub_buff); + * + * i18n_ulocale_set_keyword_value("abc", "cba", buff, buff_size); + * i18n_ulocale_set_keyword_value("def", "34", buff, buff_size); + * + * i18n_uenumeration_h keyword_enum; + * i18n_ulocale_keywords_create(buff, &keyword_enum); + * + * int32_t res_len = 0; + * const char *keyw = i18n_uenumeration_next(keyword_enum, &res_len); + * const char *keyw2 = i18n_uenumeration_next(keyword_enum, &res_len); + * + * char *only_locale = malloc(sizeof(char)*10); + * i18n_ulocale_get_base_name(buff, only_locale, 10); + * + * int32_t buff_size_get = 50; + * char *buff_out = malloc(sizeof(char)*buff_size_get); + * i18n_ulocale_get_keyword_value(buff, "abc", buff_out, buff_size_get); + * + * dlog_print(DLOG_DEBUG, "test", "Locale and keywords: %s", buff); + * dlog_print(DLOG_DEBUG, "test", "keyword1: %s", keyw); + * dlog_print(DLOG_DEBUG, "test", "keyword2: %s", keyw2); + * dlog_print(DLOG_DEBUG, "test", "Locale: %s", only_locale); + * dlog_print(DLOG_DEBUG, "test", "Keyword1 value: %s", buff_out); + * + * i18n_uenumeration_destroy(keyword_enum) + * free(buff); + * free(sub_buff); + * free(only_locale); + * free(buff_out); + * @endcode * @remarks The specific error code can be obtained using the get_last_result() method. * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 diff --git a/src/include/wearable/utils_i18n_unumber.h b/src/include/wearable/utils_i18n_unumber.h index c25d665..f1e7cf3 100644 --- a/src/include/wearable/utils_i18n_unumber.h +++ b/src/include/wearable/utils_i18n_unumber.h @@ -74,8 +74,8 @@ extern "C" { /** * @brief Creates and returns a new unumber_format_h for formatting and parsing numbers. - * @details A unumber_format_style_e may be used to format numbers by calling {@link i18n_unumber_create()}. - * The caller must call {@link #i18n_unumber_destroy() } when done to release resources used by this object. + * @details A unumber_format_style_e may be used to format numbers by calling i18n_unumber_create(). + * The caller must call i18n_unumber_destroy() when done to release resources used by this object. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @remarks Must release @a num_format using i18n_unumber_destroy(). * @@ -84,6 +84,8 @@ extern "C" { * #I18N_UNUMBER_CURRENCY, * #I18N_UNUMBER_PERCENT, * #I18N_UNUMBER_SCIENTIFIC, + * #I18N_UNUMBER_CURRENCY_ISO, + * #I18N_UNUMBER_CURRENCY_PLURAL, * #I18N_UNUMBER_SPELLOUT, * #I18N_UNUMBER_ORDINAL, * #I18N_UNUMBER_DURATION, diff --git a/src/include/wearable/utils_i18n_usearch.h b/src/include/wearable/utils_i18n_usearch.h index eb76f89..8b1e1b9 100755 --- a/src/include/wearable/utils_i18n_usearch.h +++ b/src/include/wearable/utils_i18n_usearch.h @@ -106,7 +106,7 @@ int i18n_usearch_create_new ( const i18n_uchar *pattern, int32_t pattern_len, co /** * @brief Destroys and cleans up the i18n_usearch_h. - * @details If a collator is created in i18n_usearch_create_new(), it will be destroyed here. + * @details If a collator is created in i18n_usearch_create(), it will be destroyed here. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] search_iter The i18n_usearch_h to clean up diff --git a/src/include/wearable/utils_i18n_ustring.h b/src/include/wearable/utils_i18n_ustring.h index 247969d..4e67aa0 100755 --- a/src/include/wearable/utils_i18n_ustring.h +++ b/src/include/wearable/utils_i18n_ustring.h @@ -976,6 +976,7 @@ int32_t i18n_ustring_to_lower ( i18n_uchar *dest, int32_t dest_capacity, const i * only some of the result were written to the destination buffer. * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @see i18n_ustring_to_title() */ int32_t i18n_ustring_to_title_new ( i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, i18n_ubreak_iterator_h title_iter, const char *locale); @@ -1101,7 +1102,6 @@ i18n_uchar* i18n_ustring_from_UTF8 ( i18n_uchar *dest, int32_t dest_capacity, in /** * @brief Convert a UTF-16 string to UTF-8. - * @details If the input string is not well-formed, then the #I18N_ERROR_INVALID_CHAR_FOUND error code is set. * Same as #i18n_ustring_to_UTF8() except for the additional sub_char which is output for illegal input sequences, instead of stopping with the #I18N_ERROR_INVALID_CHAR_FOUND error code. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @@ -1121,10 +1121,8 @@ i18n_uchar* i18n_ustring_from_UTF8 ( i18n_uchar *dest, int32_t dest_capacity, in * A substitution character can be any valid Unicode code point (up to U+10FFFF) except for surrogate code points (U+D800..U+DFFF). * The recommended value is U+FFFD "REPLACEMENT CHARACTER". * @param[out] num_substitutions Output parameter receiving the number of substitutions if sub_char>=0. Set to 0 if no substitutions occur or sub_char<0. num_substitutions can be NULL. - * @param[out] error_code Pointer to a standard ICU error code. Its input value must - * pass the U_SUCCESS() test, or else the function returns - * immediately. Check for U_FAILURE() on output or use with - * function chaining. (See User Guide for details.) + * @param[out] error_codeMust be a valid pointer to an error code value, + * which must not indicate a failure before the function call. * @return The pointer to destination buffer. * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -1135,7 +1133,6 @@ char* i18n_ustring_to_UTF8_with_sub ( char *dest, int32_t dest_capacity, int32_t /** * @brief Convert a UTF-8 string to UTF-16. - * @details Same as #i18n_ustring_from_UTF8() except for the additional sub_char which is output for illegal input sequences, instead of stopping with the #I18N_ERROR_INVALID_CHAR_FOUND error code. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest A buffer for the result string.\n @@ -1154,10 +1151,8 @@ char* i18n_ustring_to_UTF8_with_sub ( char *dest, int32_t dest_capacity, int32_t * A substitution character can be any valid Unicode code point (up to U+10FFFF) except for surrogate code points (U+D800..U+DFFF). * The recommended value is U+FFFD "REPLACEMENT CHARACTER". * @param[out] num_substitutions Output parameter receiving the number of substitutions if sub_char>=0. Set to 0 if no substitutions occur or sub_char<0. num_substitutions can be NULL. - * @param[out] error_code Pointer to a standard ICU error code. Its input value must - * pass the U_SUCCESS() test, or else the function returns - * immediately. Check for U_FAILURE() on output or use with - * function chaining. (See User Guide for details.) + * @param[out] error_code Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. * @return The pointer to destination buffer. * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -1195,10 +1190,8 @@ i18n_uchar* i18n_ustring_from_UTF8_with_sub ( i18n_uchar *dest, int32_t dest_cap * @param[in] src The original source string * @param[in] src_len The length of the original string.\n * If @c -1, then @a src must be zero-terminated. - * @param[out] error_code Pointer to a standard ICU error code. Its input value must - * pass the U_SUCCESS() test, or else the function returns - * immediately. Check for U_FAILURE() on output or use with - * function chaining. (See User Guide for details.) + * @param[out] error_code Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. * @return The pointer to destination buffer. * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -1250,7 +1243,6 @@ i18n_uchar32* i18n_ustring_to_UTF32 ( i18n_uchar32 *dest, int32_t dest_capacity, * @param[in] src The original source string * @param[in] src_len The length of the original string.\n * If @c -1, then @a src must be zero-terminated. - * * @param[out] error_code Must be a valid pointer to an error code value, * which must not indicate a failure before the function call. * @return The pointer to destination buffer. @@ -1281,10 +1273,8 @@ i18n_uchar* i18n_ustring_from_UTF32 ( i18n_uchar *dest, int32_t dest_capacity, i * A substitution character can be any valid Unicode code point (up to U+10FFFF) except for surrogate code points (U+D800..U+DFFF). * The recommended value is U+FFFD "REPLACEMENT CHARACTER". * @param[out] num_substitutions Output parameter receiving the number of substitutions if sub_char>=0. Set to 0 if no substitutions occur or sub_char<0. num_substitutions can be NULL. - * @param[out] error_code Pointer to a standard ICU error code. Its input value must - * pass the U_SUCCESS() test, or else the function returns - * immediately. Check for U_FAILURE() on output or use with - * function chaining. (See User Guide for details.) + * @param[out] error_code Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. * @return The pointer to destination buffer. * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -1296,7 +1286,6 @@ i18n_uchar32* i18n_ustring_to_UTF32_with_sub ( i18n_uchar32 *dest, int32_t dest_ /** * @brief Convert a UTF-32 string to UTF-16. - * @details If the input string is not well-formed, then the #I18N_ERROR_INVALID_CHAR_FOUND error code is set. * Same as #i18n_ustring_from_UTF32() except for the additional sub_char which is output for illegal input sequences, instead of stopping with the #I18N_ERROR_INVALID_CHAR_FOUND error code. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @@ -1315,11 +1304,9 @@ i18n_uchar32* i18n_ustring_to_UTF32_with_sub ( i18n_uchar32 *dest, int32_t dest_ * A substitution character can be any valid Unicode code point (up to U+10FFFF) except for surrogate code points (U+D800..U+DFFF). * The recommended value is U+FFFD "REPLACEMENT CHARACTER". * @param[out] num_substitutions Output parameter receiving the number of substitutions if sub_char>=0. Set to 0 if no substitutions occur or sub_char<0. num_substitutions can be NULL. - * @param[out] error_code Pointer to a standard ICU error code. Its input value must - * pass the U_SUCCESS() test, or else the function returns - * immediately. Check for U_FAILURE() on output or use with - * function chaining. (See User Guide for details.) - * @return[out] The pointer to destination buffer. + * @param[out] error_code Must be a valid pointer to an error code value, + * which must not indicate a failure before the function call. + * @return The pointer to destination buffer. * * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter -- 2.7.4 From 1c015acfd73f1d1e8fb7cbf917ee71a61e4d78eb Mon Sep 17 00:00:00 2001 From: ByungWoo Lee Date: Mon, 28 Mar 2016 14:56:52 +0900 Subject: [PATCH 04/16] Fix bug - don't delete timezone object Change-Id: I3ff6e00affd052eaf11e72b7c995a204c99e0456 --- packaging/capi-base-utils.spec | 2 +- src/utils_i18n_timezone.cpp | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/packaging/capi-base-utils.spec b/packaging/capi-base-utils.spec index d98fc4b..8fbf2de 100755 --- a/packaging/capi-base-utils.spec +++ b/packaging/capi-base-utils.spec @@ -1,6 +1,6 @@ Name: capi-base-utils Summary: Base Utils -Version: 1.2.1 +Version: 1.2.2 Release: 1 Group: Base License: Apache-2.0 and ICU diff --git a/src/utils_i18n_timezone.cpp b/src/utils_i18n_timezone.cpp index fdd706f..bbe4c71 100755 --- a/src/utils_i18n_timezone.cpp +++ b/src/utils_i18n_timezone.cpp @@ -49,9 +49,6 @@ int i18n_timezone_create_gmt(i18n_timezone_h *timezone) *timezone = gmt->clone(); - if (gmt != NULL) - delete gmt; - retv_if(timezone == NULL, I18N_ERROR_OUT_OF_MEMORY); return I18N_ERROR_NONE; -- 2.7.4 From 41a98845406b3797f5d4f30f5ab2c97ec52f4490 Mon Sep 17 00:00:00 2001 From: Jakub Siewierski Date: Mon, 11 Apr 2016 12:57:49 +0200 Subject: [PATCH 05/16] Apply coding rules Change-Id: Ia8993428d637a5f017b4a14a6f4461ef731ba696 Signed-off-by: Jakub Siewierski --- src/include/mobile/utils_i18n_private.h | 6 +- src/include/mobile/utils_i18n_timezone.h | 10 +- src/include/mobile/utils_i18n_types.h | 20 ++-- src/include/mobile/utils_i18n_ubrk.h | 36 +++---- src/include/mobile/utils_i18n_ucalendar.h | 84 +++++++-------- src/include/mobile/utils_i18n_uchar.h | 4 +- src/include/mobile/utils_i18n_ucollator.h | 38 +++---- src/include/mobile/utils_i18n_udate.h | 64 ++++++------ src/include/mobile/utils_i18n_udatepg.h | 60 +++++------ src/include/mobile/utils_i18n_uenumeration.h | 14 +-- src/include/mobile/utils_i18n_ulocale.h | 74 +++++++------- src/include/mobile/utils_i18n_unormalization.h | 4 +- src/include/mobile/utils_i18n_unumber.h | 54 +++++----- src/include/mobile/utils_i18n_usearch.h | 12 +-- src/include/mobile/utils_i18n_uset.h | 112 ++++++++++---------- src/include/mobile/utils_i18n_ustring.h | 124 +++++++++++------------ src/include/wearable/utils_i18n_private.h | 6 +- src/include/wearable/utils_i18n_timezone.h | 10 +- src/include/wearable/utils_i18n_types.h | 20 ++-- src/include/wearable/utils_i18n_ubrk.h | 36 +++---- src/include/wearable/utils_i18n_ucalendar.h | 84 +++++++-------- src/include/wearable/utils_i18n_uchar.h | 4 +- src/include/wearable/utils_i18n_ucollator.h | 40 ++++---- src/include/wearable/utils_i18n_udate.h | 64 ++++++------ src/include/wearable/utils_i18n_udatepg.h | 60 +++++------ src/include/wearable/utils_i18n_uenumeration.h | 14 +-- src/include/wearable/utils_i18n_ulocale.h | 74 +++++++------- src/include/wearable/utils_i18n_unormalization.h | 4 +- src/include/wearable/utils_i18n_unumber.h | 54 +++++----- src/include/wearable/utils_i18n_usearch.h | 10 +- src/include/wearable/utils_i18n_uset.h | 112 ++++++++++---------- src/include/wearable/utils_i18n_ustring.h | 120 +++++++++++----------- 32 files changed, 714 insertions(+), 714 deletions(-) diff --git a/src/include/mobile/utils_i18n_private.h b/src/include/mobile/utils_i18n_private.h index b981e4f..70783e9 100755 --- a/src/include/mobile/utils_i18n_private.h +++ b/src/include/mobile/utils_i18n_private.h @@ -73,7 +73,7 @@ extern "C" { } while (0) #define retex_if(expr, val, fmt, arg...) do { \ - if(expr) { \ + if (expr) { \ ERR(fmt, ##arg); \ val; \ goto CATCH; \ @@ -86,8 +86,8 @@ extern "C" { #define ERR_MAPPING(ICU_ERROR, BASE_UTILS_ERROR) BASE_UTILS_ERROR = \ (i18n_error_code_e)_i18n_error_mapping((int)ICU_ERROR) -int _i18n_error_mapping ( int err ); -int _i18n_error_mapping_reverse ( int err ); +int _i18n_error_mapping(int err); +int _i18n_error_mapping_reverse(int err); #ifdef __cplusplus } diff --git a/src/include/mobile/utils_i18n_timezone.h b/src/include/mobile/utils_i18n_timezone.h index b34e617..fb768ae 100755 --- a/src/include/mobile/utils_i18n_timezone.h +++ b/src/include/mobile/utils_i18n_timezone.h @@ -72,7 +72,7 @@ extern "C" { * @see i18n_timezone_create() * @see i18n_timezone_create_gmt() */ -int i18n_timezone_create_unknown ( i18n_timezone_h *timezone ); +int i18n_timezone_create_unknown(i18n_timezone_h *timezone); /** * @brief The GMT (=UTC) time zone has a raw offset of zero and does not use daylight savings time. @@ -85,7 +85,7 @@ int i18n_timezone_create_unknown ( i18n_timezone_h *timezone ); * @retval #I18N_ERROR_NONE Successful * @see i18n_timezone_create_unknown() */ -int i18n_timezone_create_gmt ( i18n_timezone_h *timezone ); +int i18n_timezone_create_gmt(i18n_timezone_h *timezone); /** * @brief Creates an i18n_timezone_h for the given timezone_id. @@ -96,7 +96,7 @@ int i18n_timezone_create_gmt ( i18n_timezone_h *timezone ); * * @retval #I18N_ERROR_NONE Successful */ -int i18n_timezone_create ( i18n_timezone_h *timezone, const char *timezone_id ); +int i18n_timezone_create(i18n_timezone_h *timezone, const char *timezone_id); /** * @brief Destroys an i18n_timezone_h. @@ -214,7 +214,7 @@ int i18n_timezone_get_equivalent_id(const char *timezone_id, int32_t index, char * * @retval #I18N_ERROR_NONE Successful */ -int i18n_timezone_create_default ( i18n_timezone_h *timezone ); +int i18n_timezone_create_default(i18n_timezone_h *timezone); /** * @brief Sets the default time zone (i.e., what's returned by #i18n_timezone_create_default()) to be the specified time zone. @@ -230,7 +230,7 @@ int i18n_timezone_create_default ( i18n_timezone_h *timezone ); * * @retval #I18N_ERROR_NONE Successful */ -int i18n_timezone_set_default( i18n_timezone_h timezone ); +int i18n_timezone_set_default(i18n_timezone_h timezone); /** * @brief Returns the timezone data version currently used by I18N. diff --git a/src/include/mobile/utils_i18n_types.h b/src/include/mobile/utils_i18n_types.h index a96cbed..15af948 100644 --- a/src/include/mobile/utils_i18n_types.h +++ b/src/include/mobile/utils_i18n_types.h @@ -169,20 +169,20 @@ typedef enum { #if !defined(U_WCHAR_IS_UTF16) && !defined(U_WCHAR_IS_UTF32) # ifdef __STDC_ISO_10646__ -# if (U_SIZEOF_WCHAR_T==2) +# if (U_SIZEOF_WCHAR_T == 2) # define U_WCHAR_IS_UTF16 -# elif (U_SIZEOF_WCHAR_T==4) +# elif (U_SIZEOF_WCHAR_T == 4) # define U_WCHAR_IS_UTF32 # endif # elif defined __UCS2__ -# if (U_PF_OS390 <= U_PLATFORM && U_PLATFORM <= U_PF_OS400) && (U_SIZEOF_WCHAR_T==2) +# if (U_PF_OS390 <= U_PLATFORM && U_PLATFORM <= U_PF_OS400) && (U_SIZEOF_WCHAR_T == 2) # define U_WCHAR_IS_UTF16 # endif # elif defined(__UCS4__) || (U_PLATFORM == U_PF_OS400 && defined(__UTF32__)) -# if (U_SIZEOF_WCHAR_T==4) +# if (U_SIZEOF_WCHAR_T == 4) # define U_WCHAR_IS_UTF32 # endif -# elif U_PLATFORM_IS_DARWIN_BASED || (U_SIZEOF_WCHAR_T==4 && U_PLATFORM_IS_LINUX_BASED) +# elif U_PLATFORM_IS_DARWIN_BASED || (U_SIZEOF_WCHAR_T == 4 && U_PLATFORM_IS_LINUX_BASED) # define U_WCHAR_IS_UTF32 # elif U_PLATFORM_HAS_WIN32_API # define U_WCHAR_IS_UTF16 @@ -198,7 +198,7 @@ typedef enum { typedef UCHAR_TYPE i18n_uchar; /* Not #elif U_HAVE_CHAR16_T -- because that is type-incompatible with pre-C++11 callers typedef char16_t i18n_uchar; */ -#elif U_SIZEOF_WCHAR_T==2 +#elif U_SIZEOF_WCHAR_T == 2 typedef wchar_t i18n_uchar; #elif defined(__CHAR16_TYPE__) typedef __CHAR16_TYPE__ i18n_uchar; @@ -1592,7 +1592,7 @@ typedef struct { * @brief Handle to struct representing a range of text containing a specific field. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ -typedef i18n_ufield_position_s* i18n_ufield_position_h; +typedef i18n_ufield_position_s *18n_ufield_position_h; /** * @brief Enumeration for the possible date/time format styles. @@ -1690,7 +1690,7 @@ typedef enum { * @since_tizen 2.3.1 */ -typedef enum{ +typedef enum { I18N_UDISPCTX_TYPE_DIALECT_HANDLING, /**beyond the last character in the text being scanned. @@ -202,7 +202,7 @@ int32_t i18n_ubrk_first (i18n_ubreak_iterator_h break_iter); * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ubrk_first() */ -int32_t i18n_ubrk_last (i18n_ubreak_iterator_h break_iter); +int32_t i18n_ubrk_last(i18n_ubreak_iterator_h break_iter); /** * @brief Sets the iterator position to the first boundary preceding the specified @c offset. @@ -217,7 +217,7 @@ int32_t i18n_ubrk_last (i18n_ubreak_iterator_h break_iter); * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ubrk_following() */ -int32_t i18n_ubrk_preceding (i18n_ubreak_iterator_h break_iter, int32_t offset); +int32_t i18n_ubrk_preceding(i18n_ubreak_iterator_h break_iter, int32_t offset); /** * @brief Advances the iterator to the first boundary following the specified @c offset. @@ -232,7 +232,7 @@ int32_t i18n_ubrk_preceding (i18n_ubreak_iterator_h break_iter, int32_t offset); * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ubrk_preceding() */ -int32_t i18n_ubrk_following (i18n_ubreak_iterator_h break_iter, int32_t offset); +int32_t i18n_ubrk_following(i18n_ubreak_iterator_h break_iter, int32_t offset); /** * @brief Gets a locale for which text breaking information is available. @@ -247,7 +247,7 @@ int32_t i18n_ubrk_following (i18n_ubreak_iterator_h break_iter, int32_t offset); * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ubrk_count_available() */ -const char *i18n_ubrk_get_available (int32_t index); +const char *i18n_ubrk_get_available(int32_t index); /** * @brief Determines how many locales have text breaking information available. @@ -260,7 +260,7 @@ const char *i18n_ubrk_get_available (int32_t index); * @exception #I18N_ERROR_NONE Successful * @see i18n_ubrk_get_available() */ -int32_t i18n_ubrk_count_available (void); +int32_t i18n_ubrk_count_available(void); /** * @brief Returns true if the specfied position is a boundary position. @@ -275,7 +275,7 @@ int32_t i18n_ubrk_count_available (void); * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_ubool i18n_ubrk_is_boundary (i18n_ubreak_iterator_h break_iter, int32_t offset); +i18n_ubool i18n_ubrk_is_boundary(i18n_ubreak_iterator_h break_iter, int32_t offset); /** * @brief Returns the status from the break rule that determined the most recently @@ -293,7 +293,7 @@ i18n_ubool i18n_ubrk_is_boundary (i18n_ubreak_iterator_h break_iter, int32_t off * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ubrk_get_rule_status (i18n_ubreak_iterator_h break_iter); +int32_t i18n_ubrk_get_rule_status(i18n_ubreak_iterator_h break_iter); /** * @brief Gets the statuses from the break rules that determined the most recently @@ -316,7 +316,7 @@ int32_t i18n_ubrk_get_rule_status (i18n_ubreak_iterator_h break_iter); * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ubrk_get_rule_status_vec (i18n_ubreak_iterator_h break_iter, int32_t *fill_in_vec, int32_t capacity); +int32_t i18n_ubrk_get_rule_status_vec(i18n_ubreak_iterator_h break_iter, int32_t *fill_in_vec, int32_t capacity); /** * @brief Returns the locale of the break iterator. You can choose between the valid and @@ -331,7 +331,7 @@ int32_t i18n_ubrk_get_rule_status_vec (i18n_ubreak_iterator_h break_iter, int32_ * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -const char *i18n_ubrk_get_locale_by_type (const i18n_ubreak_iterator_h break_iter, i18n_ulocale_data_locale_type_e type); +const char *i18n_ubrk_get_locale_by_type(const i18n_ubreak_iterator_h break_iter, i18n_ulocale_data_locale_type_e type); #ifdef __cplusplus } diff --git a/src/include/mobile/utils_i18n_ucalendar.h b/src/include/mobile/utils_i18n_ucalendar.h index 7de77be..a725a56 100644 --- a/src/include/mobile/utils_i18n_ucalendar.h +++ b/src/include/mobile/utils_i18n_ucalendar.h @@ -129,7 +129,7 @@ extern "C" { * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_set_default_timezone ( const i18n_uchar *zone_id ); +int i18n_ucalendar_set_default_timezone(const i18n_uchar *zone_id); /** * @brief Gets the current date and time. @@ -141,7 +141,7 @@ int i18n_ucalendar_set_default_timezone ( const i18n_uchar *zone_id ); * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_get_now ( i18n_udate *date ); +int i18n_ucalendar_get_now(i18n_udate *date); /** * @brief Creates an #i18n_ucalendar_h. @@ -171,7 +171,7 @@ int i18n_ucalendar_get_now ( i18n_udate *date ); * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory */ -int i18n_ucalendar_create ( const i18n_uchar *zone_id, int32_t len, const char *locale, i18n_ucalendar_type_e type, i18n_ucalendar_h *calendar ); +int i18n_ucalendar_create(const i18n_uchar *zone_id, int32_t len, const char *locale, i18n_ucalendar_type_e type, i18n_ucalendar_h *calendar); /** * @brief Destroys an #i18n_ucalendar_h. @@ -182,7 +182,7 @@ int i18n_ucalendar_create ( const i18n_uchar *zone_id, int32_t len, const char * * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_destroy ( i18n_ucalendar_h calendar ); +int i18n_ucalendar_destroy(i18n_ucalendar_h calendar); /** * @brief Creates a copy of a #i18n_ucalendar_h. @@ -194,7 +194,7 @@ int i18n_ucalendar_destroy ( i18n_ucalendar_h calendar ); * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_clone ( const i18n_ucalendar_h cal, i18n_ucalendar_h *identical_to_cal ); +int i18n_ucalendar_clone(const i18n_ucalendar_h cal, i18n_ucalendar_h *identical_to_cal); /** * @brief Gets the display name for a calendar's TimeZone. @@ -213,7 +213,7 @@ int i18n_ucalendar_clone ( const i18n_ucalendar_h cal, i18n_ucalendar_h *identic * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_get_timezone_displayname ( const i18n_ucalendar_h calendar, i18n_ucalendar_displayname_type_e type, const char *locale, i18n_uchar *result, int32_t result_len, int32_t *buf_size_needed ); +int i18n_ucalendar_get_timezone_displayname(const i18n_ucalendar_h calendar, i18n_ucalendar_displayname_type_e type, const char *locale, i18n_uchar *result, int32_t result_len, int32_t *buf_size_needed); /** * @brief Determines if an #i18n_ucalendar_h is currently in daylight savings time. @@ -227,7 +227,7 @@ int i18n_ucalendar_get_timezone_displayname ( const i18n_ucalendar_h calendar, i * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_is_in_daylight_time ( const i18n_ucalendar_h calendar, i18n_ubool *is_in ); +int i18n_ucalendar_is_in_daylight_time(const i18n_ucalendar_h calendar, i18n_ubool *is_in); /** * @brief Sets the value of a field in a #i18n_ucalendar_h. @@ -246,7 +246,7 @@ int i18n_ucalendar_is_in_daylight_time ( const i18n_ucalendar_h calendar, i18n_u * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_set ( i18n_ucalendar_h cal, i18n_ucalendar_date_fields_e field, int32_t val ); +int i18n_ucalendar_set(i18n_ucalendar_h cal, i18n_ucalendar_date_fields_e field, int32_t val); /** * @brief Sets a numeric attribute associated with an #i18n_ucalendar_h. @@ -263,7 +263,7 @@ int i18n_ucalendar_set ( i18n_ucalendar_h cal, i18n_ucalendar_date_fields_e fiel * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_set_attribute ( i18n_ucalendar_h calendar, i18n_ucalendar_attribute_e attr, int32_t val ); +int i18n_ucalendar_set_attribute(i18n_ucalendar_h calendar, i18n_ucalendar_attribute_e attr, int32_t val); /** * @brief Gets a numeric attribute associated with an i18n_ucalendar. @@ -281,7 +281,7 @@ int i18n_ucalendar_set_attribute ( i18n_ucalendar_h calendar, i18n_ucalendar_att * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_get_attribute ( i18n_ucalendar_h calendar, i18n_ucalendar_attribute_e attr, int32_t *val); +int i18n_ucalendar_get_attribute(i18n_ucalendar_h calendar, i18n_ucalendar_attribute_e attr, int32_t *val); /** * @brief Gets a calendar's current time in milliseconds. @@ -296,7 +296,7 @@ int i18n_ucalendar_get_attribute ( i18n_ucalendar_h calendar, i18n_ucalendar_att * @see i18n_ucalendar_set_milliseconds() * @see i18n_ucalendar_set_date_time() */ -int i18n_ucalendar_get_milliseconds( const i18n_ucalendar_h calendar, i18n_udate *date ); +int i18n_ucalendar_get_milliseconds(const i18n_ucalendar_h calendar, i18n_udate *date); /** * @brief Sets a calendar's current time in milliseconds. @@ -311,7 +311,7 @@ int i18n_ucalendar_get_milliseconds( const i18n_ucalendar_h calendar, i18n_udate * @see i18n_ucalendar_get_milliseconds() * @see i18n_ucalendar_set_date_time() */ -int i18n_ucalendar_set_milliseconds ( i18n_ucalendar_h calendar, i18n_udate milliseconds ); +int i18n_ucalendar_set_milliseconds(i18n_ucalendar_h calendar, i18n_udate milliseconds); /** * @brief Sets a calendar's current date. @@ -333,7 +333,7 @@ int i18n_ucalendar_set_milliseconds ( i18n_ucalendar_h calendar, i18n_udate mill * @see i18n_ucalendar_get_milliseconds() * @see i18n_ucalendar_set_milliseconds() */ -int i18n_ucalendar_set_date_time ( i18n_ucalendar_h calendar, int32_t year, int32_t month, int32_t date, int32_t hour, int32_t min, int32_t sec ); +int i18n_ucalendar_set_date_time(i18n_ucalendar_h calendar, int32_t year, int32_t month, int32_t date, int32_t hour, int32_t min, int32_t sec); /** * @brief Returns @c true if two #i18n_ucalendar_h calendars are equivalent. @@ -348,7 +348,7 @@ int i18n_ucalendar_set_date_time ( i18n_ucalendar_h calendar, int32_t year, int3 * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_is_equivalent_to ( const i18n_ucalendar_h calendar1, const i18n_ucalendar_h calendar2, i18n_ubool *equiv ); +int i18n_ucalendar_is_equivalent_to(const i18n_ucalendar_h calendar1, const i18n_ucalendar_h calendar2, i18n_ubool *equiv); /** * @brief Adds a specified signed amount to a particular field in a #i18n_ucalendar_h. @@ -368,7 +368,7 @@ int i18n_ucalendar_is_equivalent_to ( const i18n_ucalendar_h calendar1, const i1 * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_add ( i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, int32_t amount ); +int i18n_ucalendar_add(i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, int32_t amount); /** * @brief Gets the current value of a field from an #i18n_ucalendar_h. @@ -385,7 +385,7 @@ int i18n_ucalendar_add ( i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_get ( const i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, int32_t *val ); +int i18n_ucalendar_get(const i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, int32_t *val); // Newly Added APIs @@ -418,7 +418,7 @@ int i18n_ucalendar_get ( const i18n_ucalendar_h calendar, i18n_ucalendar_date_fi * * @return The date difference for the specified field. */ -int32_t i18n_ucalendar_get_field_difference ( i18n_ucalendar_h calendar, i18n_udate target, i18n_ucalendar_date_fields_e field, i18n_error_code_e *status ); +int32_t i18n_ucalendar_get_field_difference(i18n_ucalendar_h calendar, i18n_udate target, i18n_ucalendar_date_fields_e field, i18n_error_code_e *status); /** * @brief Creates an enumeration over system time zone IDs with the given filter conditions. @@ -437,7 +437,7 @@ int32_t i18n_ucalendar_get_field_difference ( i18n_ucalendar_h calendar, i18n_ud * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_timezone_id_enumeration_create ( i18n_system_timezone_type_e zone_type, const char *region, const int32_t *raw_offset, i18n_uenumeration_h *enumeration); +int i18n_ucalendar_timezone_id_enumeration_create(i18n_system_timezone_type_e zone_type, const char *region, const int32_t *raw_offset, i18n_uenumeration_h *enumeration); /** * @brief Creates an enumeration over all time zones. @@ -450,7 +450,7 @@ int i18n_ucalendar_timezone_id_enumeration_create ( i18n_system_timezone_type_e * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_timezones_create (i18n_uenumeration_h * enumeration); +int i18n_ucalendar_timezones_create(i18n_uenumeration_h * enumeration); /** * @brief Creates an enumeration over all time zones associated with the given country. @@ -466,7 +466,7 @@ int i18n_ucalendar_timezones_create (i18n_uenumeration_h * enumeration); * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_country_timezones_create (const char *country, i18n_uenumeration_h * enumeration); +int i18n_ucalendar_country_timezones_create(const char *country, i18n_uenumeration_h * enumeration); /** * @brief Returns the default time zone. @@ -484,7 +484,7 @@ int i18n_ucalendar_country_timezones_create (const char *country, i18n_uenumerat * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid parameter */ -int32_t i18n_ucalendar_get_default_timezone (i18n_uchar *result, int32_t result_capacity); +int32_t i18n_ucalendar_get_default_timezone(i18n_uchar *result, int32_t result_capacity); /** * @brief Sets the TimeZone used by a #i18n_ucalendar_h. @@ -499,7 +499,7 @@ int32_t i18n_ucalendar_get_default_timezone (i18n_uchar *result, int32_t result_ * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_set_timezone ( i18n_ucalendar_h calendar, const i18n_uchar *zone_id, int32_t length ); +int i18n_ucalendar_set_timezone(i18n_ucalendar_h calendar, const i18n_uchar *zone_id, int32_t length); /** * @brief Gets the ID of the calendar's time zone. @@ -516,7 +516,7 @@ int i18n_ucalendar_set_timezone ( i18n_ucalendar_h calendar, const i18n_uchar *z * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ucalendar_get_timezone_id (const i18n_ucalendar_h calendar, i18n_uchar *result, int32_t result_length); +int32_t i18n_ucalendar_get_timezone_id(const i18n_ucalendar_h calendar, i18n_uchar *result, int32_t result_length); /** * @brief Sets the Gregorian Calendar change date. @@ -537,7 +537,7 @@ int32_t i18n_ucalendar_get_timezone_id (const i18n_ucalendar_h calendar, i18n_uc * * @see i18n_ucalendar_get_gregorian_change() */ -int i18n_ucalendar_set_gregorian_change ( i18n_ucalendar_h calendar, i18n_udate date); +int i18n_ucalendar_set_gregorian_change(i18n_ucalendar_h calendar, i18n_udate date); /** * @brief Gets the Gregorian Calendar change date. @@ -558,7 +558,7 @@ int i18n_ucalendar_set_gregorian_change ( i18n_ucalendar_h calendar, i18n_udate * * @see i18n_ucalendar_set_gregorian_change() */ -int i18n_ucalendar_get_gregorian_change (const i18n_ucalendar_h calendar, i18n_udate *date); +int i18n_ucalendar_get_gregorian_change(const i18n_ucalendar_h calendar, i18n_udate *date); /** * @brief Gets a locale for which calendars are available. @@ -575,7 +575,7 @@ int i18n_ucalendar_get_gregorian_change (const i18n_ucalendar_h calendar, i18n_u * @exception #I18N_ERROR_INVALID_PARAMETER Invalid parameter * @see i18n_ucalendar_count_available() */ -const char * i18n_ucalendar_get_available (int32_t locale_index); +const char * i18n_ucalendar_get_available(int32_t locale_index); /** * @brief Determines how many locales have calendars available. @@ -588,7 +588,7 @@ const char * i18n_ucalendar_get_available (int32_t locale_index); * @exception #I18N_ERROR_NONE Successful * @see i18n_ucalendar_get_available() */ -int32_t i18n_ucalendar_count_available (void); +int32_t i18n_ucalendar_count_available(void); /** * @brief Sets a calendar's current date. @@ -611,7 +611,7 @@ int32_t i18n_ucalendar_count_available (void); * @see i18n_ucalendar_set_milliseconds() * @see i18n_ucalendar_set_date_time() */ -int i18n_ucalendar_set_date (i18n_ucalendar_h calendar, int32_t year, int32_t month, int32_t date); +int i18n_ucalendar_set_date(i18n_ucalendar_h calendar, int32_t year, int32_t month, int32_t date); /** * @brief Adds a specified signed amount to a particular field in a #i18n_ucalendar_h. @@ -646,7 +646,7 @@ int i18n_ucalendar_set_date (i18n_ucalendar_h calendar, int32_t year, int32_t mo * @remarks #I18N_UCALENDAR_ZONE_OFFSET and #I18N_UCALENDAR_DST_OFFSET are not supported by this function. * @see i18n_ucalendar_add() */ -int i18n_ucalendar_roll (i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, int32_t amount); +int i18n_ucalendar_roll(i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, int32_t amount); /** * @brief Determines if a field in a #i18n_ucalendar_h is set. @@ -667,7 +667,7 @@ int i18n_ucalendar_roll (i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e * @see i18n_ucalendar_clear() * */ -i18n_ubool i18n_ucalendar_is_set (const i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field); +i18n_ubool i18n_ucalendar_is_set(const i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field); /** * @brief Clears a field in a #i18n_ucalendar_h. @@ -687,7 +687,7 @@ i18n_ubool i18n_ucalendar_is_set (const i18n_ucalendar_h calendar, i18n_ucalenda * @see i18n_ucalendar_clear() * */ -int i18n_ucalendar_clear_field (i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field); +int i18n_ucalendar_clear_field(i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field); /** * @brief Clears all fields in a #i18n_ucalendar_h. @@ -704,7 +704,7 @@ int i18n_ucalendar_clear_field (i18n_ucalendar_h calendar, i18n_ucalendar_date_f * @see i18n_ucalendar_clear_field() * */ -int i18n_ucalendar_clear (i18n_ucalendar_h calendar); +int i18n_ucalendar_clear(i18n_ucalendar_h calendar); /** * @brief Determines a limit for a field in an #i18n_ucalendar_h. @@ -731,7 +731,7 @@ int i18n_ucalendar_clear (i18n_ucalendar_h calendar); * * @return The requested value. */ -int32_t i18n_ucalendar_get_limit (const i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, i18n_ucalendar_limit_type_e type); +int32_t i18n_ucalendar_get_limit(const i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, i18n_ucalendar_limit_type_e type); /** * @brief Gets the locale for this @c calendar object. @@ -748,7 +748,7 @@ int32_t i18n_ucalendar_get_limit (const i18n_ucalendar_h calendar, i18n_ucalenda * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -const char *i18n_ucalendar_get_locale_by_type (const i18n_ucalendar_h calendar, i18n_ulocale_data_locale_type_e type); +const char *i18n_ucalendar_get_locale_by_type(const i18n_ucalendar_h calendar, i18n_ulocale_data_locale_type_e type); /** * @brief Returns the timezone data version currently used by ICU. @@ -759,7 +759,7 @@ const char *i18n_ucalendar_get_locale_by_type (const i18n_ucalendar_h calendar, * @return The version string, such as "2007f". * @exception #I18N_ERROR_NONE Successful */ -const char *i18n_ucalendar_get_tz_data_version (void); +const char *i18n_ucalendar_get_tz_data_version(void); /** * @brief Returns the canonical system timezone ID or the normalized custom time zone ID for the given time zone ID. @@ -778,7 +778,7 @@ const char *i18n_ucalendar_get_tz_data_version (void); * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ucalendar_get_canonical_timezone_id (const i18n_uchar *id, int32_t length, i18n_uchar *result, int32_t result_capacity, i18n_ubool *is_system_id); +int32_t i18n_ucalendar_get_canonical_timezone_id(const i18n_uchar *id, int32_t length, i18n_uchar *result, int32_t result_capacity, i18n_ubool *is_system_id); /** * @brief Gets the resource keyword value string designating the calendar type for the #i18n_ucalendar_h. @@ -793,7 +793,7 @@ int32_t i18n_ucalendar_get_canonical_timezone_id (const i18n_uchar *id, int32_t * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -const char *i18n_ucalendar_get_type (const i18n_ucalendar_h calendar); +const char *i18n_ucalendar_get_type(const i18n_ucalendar_h calendar); /** * @brief Given a key and a locale, returns an array of string values in a preferred order that would make a difference. @@ -814,7 +814,7 @@ const char *i18n_ucalendar_get_type (const i18n_ucalendar_h calendar); * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_get_keyword_values_for_locale (const char *key, const char *locale, i18n_ubool commonly_used, i18n_uenumeration_h *enumeration); +int i18n_ucalendar_get_keyword_values_for_locale(const char *key, const char *locale, i18n_ubool commonly_used, i18n_uenumeration_h *enumeration); /** * @brief Returns whether the given day of the week is a weekday, a weekend day, @@ -837,7 +837,7 @@ int i18n_ucalendar_get_keyword_values_for_locale (const char *key, const char *l * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_get_day_of_week_type (const i18n_ucalendar_h calendar, i18n_ucalendar_days_of_week_e day_of_week, i18n_ucalendar_weekday_type_e *weekday); +int i18n_ucalendar_get_day_of_week_type(const i18n_ucalendar_h calendar, i18n_ucalendar_days_of_week_e day_of_week, i18n_ucalendar_weekday_type_e *weekday); /** * @brief Returns the time during the day at which the weekend begins or ends in this calendar system. @@ -859,7 +859,7 @@ int i18n_ucalendar_get_day_of_week_type (const i18n_ucalendar_h calendar, i18n_u * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ucalendar_get_weekend_transition (const i18n_ucalendar_h calendar, i18n_ucalendar_days_of_week_e day_of_week); +int32_t i18n_ucalendar_get_weekend_transition(const i18n_ucalendar_h calendar, i18n_ucalendar_days_of_week_e day_of_week); /** * @brief Returns @c true if the given #i18n_udate is in the weekend in this calendar system. @@ -875,7 +875,7 @@ int32_t i18n_ucalendar_get_weekend_transition (const i18n_ucalendar_h calendar, * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_ubool i18n_ucalendar_is_weekend (i18n_ucalendar_h calendar, i18n_udate date); +i18n_ubool i18n_ucalendar_is_weekend(i18n_ucalendar_h calendar, i18n_udate date); /** * @brief Get the #i18n_udate for the next/previous time zone transition relative @@ -896,7 +896,7 @@ i18n_ubool i18n_ucalendar_is_weekend (i18n_ucalendar_h calendar, i18n_udate date * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_ubool i18n_ucalendar_get_timezone_transition_date (const i18n_ucalendar_h calendar, i18n_utimezone_transition_type_e type, i18n_udate *transition); +i18n_ubool i18n_ucalendar_get_timezone_transition_date(const i18n_ucalendar_h calendar, i18n_utimezone_transition_type_e type, i18n_udate *transition); /** * @} diff --git a/src/include/mobile/utils_i18n_uchar.h b/src/include/mobile/utils_i18n_uchar.h index 4194c05..4dc6e1e 100644 --- a/src/include/mobile/utils_i18n_uchar.h +++ b/src/include/mobile/utils_i18n_uchar.h @@ -149,7 +149,7 @@ extern "C" { * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_uchar_get_int_property_value ( i18n_uchar32 c, i18n_uchar_uproperty_e which, int32_t *property_val ); +int i18n_uchar_get_int_property_value(i18n_uchar32 c, i18n_uchar_uproperty_e which, int32_t *property_val); /** * @brief Gets the Unicode allocation block that contains the character. @@ -161,7 +161,7 @@ int i18n_uchar_get_int_property_value ( i18n_uchar32 c, i18n_uchar_uproperty_e w * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_uchar_get_ublock_code ( i18n_uchar32 c, i18n_uchar_ublock_code_e *block_val ); +int i18n_uchar_get_ublock_code(i18n_uchar32 c, i18n_uchar_ublock_code_e *block_val); #ifdef __cplusplus } diff --git a/src/include/mobile/utils_i18n_ucollator.h b/src/include/mobile/utils_i18n_ucollator.h index 4a40674..5959403 100755 --- a/src/include/mobile/utils_i18n_ucollator.h +++ b/src/include/mobile/utils_i18n_ucollator.h @@ -83,25 +83,25 @@ extern "C" { int ret = I18N_ERROR_NONE; int buf_01_len = 0, buf_02_len = 0; - for ( i = 0; i < sizeof( src ) / sizeof( src[0] ); i++ ) { - dlog_print(DLOG_INFO, LOG_TAG, "%s\n", src[i] ); + for (i = 0; i < sizeof(src) / sizeof(src[0]); i++) { + dlog_print(DLOG_INFO, LOG_TAG, "%s\n", src[i]); } // cat banana airplane // creates a collator - ret = i18n_ucollator_create( "en_US", &coll ); + ret = i18n_ucollator_create("en_US", &coll); // compares and sorts in ascending order - if ( ret == I18N_ERROR_NONE ) { + if (ret == I18N_ERROR_NONE) { i18n_ucollator_set_strength( coll, I18N_UCOLLATOR_TERTIARY ); - for ( i = 0; i < 2; i++ ) { - for ( j = 0; j < 2 - i; j++ ) { - i18n_ustring_copy_ua( buf_01, src[j] ); - i18n_ustring_copy_ua( buf_02, src[j+1] ); - i18n_ustring_get_length( buf_01, &buf_01_len ); - i18n_ustring_get_length( buf_02, &buf_02_len ); + for (i = 0; i < 2; i++) { + for (j = 0; j < 2 - i; j++) { + i18n_ustring_copy_ua(buf_01, src[j]); + i18n_ustring_copy_ua(buf_02, src[j+1]); + i18n_ustring_get_length(buf_01, &buf_01_len); + i18n_ustring_get_length(buf_02, &buf_02_len); // compares buf_01 with buf_02 - i18n_ucollator_str_collator( coll, buf_01, buf_01_len, buf_02, buf_02_len, &result ); - if ( result == I18N_UCOLLATOR_GREATER ) { + i18n_ucollator_str_collator(coll, buf_01, buf_01_len, buf_02, buf_02_len, &result); + if (result == I18N_UCOLLATOR_GREATER) { tmp = src[j]; src[j] = src[j+1]; src[j+1] = tmp; @@ -112,7 +112,7 @@ extern "C" { // destroys the collator i18n_ucollator_destroy( coll ); // deallocate memory for collator - for ( i = 0; i < sizeof( src ) / sizeof( src[0] ); i++ ) { + for (i = 0; i < sizeof(src) / sizeof(src[0]); i++) { dlog_print(DLOG_INFO, LOG_TAG, "%s\n", src[i] ); } // ariplane banana cat * @endcode @@ -146,7 +146,7 @@ extern "C" { * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ucollator_destroy() */ -int i18n_ucollator_create ( const char *locale, i18n_ucollator_h *collator ); +int i18n_ucollator_create(const char *locale, i18n_ucollator_h *collator); /** * @brief Closes a i18n_ucollator_h. @@ -159,7 +159,7 @@ int i18n_ucollator_create ( const char *locale, i18n_ucollator_h *collator ); * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ucollator_create() */ -int i18n_ucollator_destroy ( i18n_ucollator_h collator ); +int i18n_ucollator_destroy(i18n_ucollator_h collator); /** * @brief Compares two strings. @@ -178,7 +178,7 @@ int i18n_ucollator_destroy ( i18n_ucollator_h collator ); * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ucollator_equal() */ -int i18n_ucollator_str_collator ( const i18n_ucollator_h collator, const i18n_uchar *src, int32_t src_len, const i18n_uchar *target, int32_t target_len, i18n_ucollator_result_e *result ); +int i18n_ucollator_str_collator(const i18n_ucollator_h collator, const i18n_uchar *src, int32_t src_len, const i18n_uchar *target, int32_t target_len, i18n_ucollator_result_e *result); /** * @brief Compares two strings for equality. @@ -196,7 +196,7 @@ int i18n_ucollator_str_collator ( const i18n_ucollator_h collator, const i18n_uc * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ucollator_str_collator() */ -int i18n_ucollator_equal ( const i18n_ucollator_h collator, const i18n_uchar *src, int32_t src_len, const i18n_uchar *target, int32_t target_len, i18n_ubool *equal ); +int i18n_ucollator_equal(const i18n_ucollator_h collator, const i18n_uchar *src, int32_t src_len, const i18n_uchar *target, int32_t target_len, i18n_ubool *equal); /** * @brief Sets the collation strength used in a collator. @@ -210,7 +210,7 @@ int i18n_ucollator_equal ( const i18n_ucollator_h collator, const i18n_uchar *sr * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucollator_set_strength ( i18n_ucollator_h collator, i18n_ucollator_strength_e strength ); +int i18n_ucollator_set_strength(i18n_ucollator_h collator, i18n_ucollator_strength_e strength); /** * @brief Sets a universal attribute setter. @@ -223,7 +223,7 @@ int i18n_ucollator_set_strength ( i18n_ucollator_h collator, i18n_ucollator_stre * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucollator_set_attribute ( i18n_ucollator_h collator, i18n_ucollator_attribute_e attr, i18n_ucollator_attribute_value_e val ); +int i18n_ucollator_set_attribute(i18n_ucollator_h collator, i18n_ucollator_attribute_e attr, i18n_ucollator_attribute_value_e val); #ifdef __cplusplus } diff --git a/src/include/mobile/utils_i18n_udate.h b/src/include/mobile/utils_i18n_udate.h index d6504bb..440dfe6 100644 --- a/src/include/mobile/utils_i18n_udate.h +++ b/src/include/mobile/utils_i18n_udate.h @@ -107,21 +107,21 @@ // creates new i18n_udate_format_h to format dates and times ret = i18n_udate_create(I18N_UDATE_FULL , I18N_UDATE_FULL , locale, utf16_timezone_KR, -1, bestPattern, -1, &formatter_KR); - if ( ret != I18N_ERROR_NONE ) { + if (ret != I18N_ERROR_NONE) { dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); } if (!formatter_KR) { dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n"); } ret = i18n_udate_create(I18N_UDATE_FULL , I18N_UDATE_FULL , locale, utf16_timezone_LA, -1, bestPattern, -1, &formatter_LA); - if ( ret != I18N_ERROR_NONE ) { + if (ret != I18N_ERROR_NONE) { dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); } if (!formatter_LA) { dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n"); } ret = i18n_udate_create(I18N_UDATE_PATTERN , I18N_UDATE_PATTERN , locale, utf16_timezone_SaoPaulo, -1, bestPattern, -1, &formatter_SaoPaulo); - if ( ret != I18N_ERROR_NONE ) { + if (ret != I18N_ERROR_NONE) { dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); } if (!formatter_LA) { @@ -195,7 +195,7 @@ extern "C" { * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_udate_create ( i18n_udate_format_style_e time_style, i18n_udate_format_style_e date_style, const char *locale, const i18n_uchar *tz_id, int32_t tz_id_len, const i18n_uchar *pattern, int pattern_len, i18n_udate_format_h *format ); +int i18n_udate_create(i18n_udate_format_style_e time_style, i18n_udate_format_style_e date_style, const char *locale, const i18n_uchar *tz_id, int32_t tz_id_len, const i18n_uchar *pattern, int pattern_len, i18n_udate_format_h *format); /** * @brief Destroys an #i18n_udate_format_h. @@ -207,7 +207,7 @@ int i18n_udate_create ( i18n_udate_format_style_e time_style, i18n_udate_format_ * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_udate_destroy ( i18n_udate_format_h format ); +int i18n_udate_destroy(i18n_udate_format_h format); /** * @brief Formats a date using an #i18n_udate_format_h. @@ -231,7 +231,7 @@ int i18n_udate_destroy ( i18n_udate_format_h format ); * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_udate_format_date ( const i18n_udate_format_h format, i18n_udate date_to_format, i18n_uchar *result, int32_t result_len, i18n_ufield_position_h pos, int32_t *buf_size_needed ); +int i18n_udate_format_date(const i18n_udate_format_h format, i18n_udate date_to_format, i18n_uchar *result, int32_t result_len, i18n_ufield_position_h pos, int32_t *buf_size_needed); // Newly Added APIs @@ -250,7 +250,7 @@ int i18n_udate_format_date ( const i18n_udate_format_h format, i18n_udate date_t * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_udate_to_calendar_date_field ( i18n_udate_format_field_e field, i18n_ucalendar_date_fields_e *date_field_type ); +int i18n_udate_to_calendar_date_field(i18n_udate_format_field_e field, i18n_ucalendar_date_fields_e *date_field_type); /** * @brief Creates a copy of an #i18n_udate_format_h. @@ -264,7 +264,7 @@ int i18n_udate_to_calendar_date_field ( i18n_udate_format_field_e field, i18n_uc * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_udate_clone ( const i18n_udate_format_h format, i18n_udate_format_h *format_clone ); +int i18n_udate_clone(const i18n_udate_format_h format, i18n_udate_format_h *format_clone); /** * @brief Parses a string into an date/time using an #i18n_udate_format_h. @@ -290,7 +290,7 @@ int i18n_udate_clone ( const i18n_udate_format_h format, i18n_udate_format_h *fo * * @see i18n_udate_format_date() */ -int i18n_udate_parse ( const i18n_udate_format_h format, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos, i18n_udate *parsed_date ); +int i18n_udate_parse(const i18n_udate_format_h format, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos, i18n_udate *parsed_date); /** * @brief Parses a string into an date/time using an #i18n_udate_format_h. @@ -314,8 +314,8 @@ int i18n_udate_parse ( const i18n_udate_format_h format, const i18n_uchar *text, * * @see i18n_udate_format_date() */ -int i18n_udate_parse_calendar (const i18n_udate_format_h format, i18n_ucalendar_h *calendar, const i18n_uchar *text, - int32_t text_length, int32_t *parse_pos ); +int i18n_udate_parse_calendar(const i18n_udate_format_h format, i18n_ucalendar_h *calendar, const i18n_uchar *text, + int32_t text_length, int32_t *parse_pos); /** * @brief Determines if an #i18n_udate_format_h will perform lenient parsing. @@ -333,7 +333,7 @@ int i18n_udate_parse_calendar (const i18n_udate_format_h format, i18n_ucalendar_ * * @see i18n_udate_set_lenient() */ -i18n_ubool i18n_udate_is_lenient ( const i18n_udate_format_h format ); +i18n_ubool i18n_udate_is_lenient(const i18n_udate_format_h format); /** * @brief Specifies whether an #i18n_udate_format_h will perform lenient parsing. @@ -350,7 +350,7 @@ i18n_ubool i18n_udate_is_lenient ( const i18n_udate_format_h format ); * * @see i18n_udate_is_lenient() */ -int i18n_udate_set_lenient ( i18n_udate_format_h format, i18n_ubool is_lenient ); +int i18n_udate_set_lenient(i18n_udate_format_h format, i18n_ubool is_lenient); /** * @brief Gets the #i18n_ucalendar_h associated with an #i18n_udate_format_h. @@ -366,7 +366,7 @@ int i18n_udate_set_lenient ( i18n_udate_format_h format, i18n_ubool is_lenient ) * * @see i18n_udate_set_calendar() */ -int i18n_udate_get_calendar ( const i18n_udate_format_h format, i18n_ucalendar_h *calendar); +int i18n_udate_get_calendar(const i18n_udate_format_h format, i18n_ucalendar_h *calendar); /** * @brief Sets the #i18n_ucalendar_h associated with an #i18n_udate_format_h. @@ -382,7 +382,7 @@ int i18n_udate_get_calendar ( const i18n_udate_format_h format, i18n_ucalendar_h * * @see i18n_udate_get_calendar() */ -int i18n_udate_set_calendar ( i18n_udate_format_h format, const i18n_ucalendar_h calendar_to_set ); +int i18n_udate_set_calendar(i18n_udate_format_h format, const i18n_ucalendar_h calendar_to_set); /** * @brief Gets the #i18n_unumber_format_h associated with an #i18n_udate_format_h. @@ -398,7 +398,7 @@ int i18n_udate_set_calendar ( i18n_udate_format_h format, const i18n_ucalendar_h * * @see i18n_udate_set_number_format() */ -int i18n_udate_get_number_format ( const i18n_udate_format_h format, i18n_unumber_format_h *number_format ); +int i18n_udate_get_number_format(const i18n_udate_format_h format, i18n_unumber_format_h *number_format); /** * @brief Sets the #i18n_unumber_format_h associated with an #i18n_udate_format_h. @@ -414,7 +414,7 @@ int i18n_udate_get_number_format ( const i18n_udate_format_h format, i18n_unumbe * * @see i18n_udate_get_number_format() */ -int i18n_udate_set_number_format ( i18n_udate_format_h format, const i18n_unumber_format_h number_format_to_set ); +int i18n_udate_set_number_format(i18n_udate_format_h format, const i18n_unumber_format_h number_format_to_set); /** * @brief Gets a locale for which date/time formatting patterns are available. @@ -430,7 +430,7 @@ int i18n_udate_set_number_format ( i18n_udate_format_h format, const i18n_unumbe * @see i18n_udate_count_available() */ -const char *i18n_udate_get_available ( int32_t locale_index ); +const char *i18n_udate_get_available(int32_t locale_index); /** * @brief Determines how many locales have date/time formatting patterns available. @@ -444,7 +444,7 @@ const char *i18n_udate_get_available ( int32_t locale_index ); * * @see i18n_udate_get_available() */ -int32_t i18n_udate_count_available ( void ); +int32_t i18n_udate_count_available(void); /** * @brief Gets the year relative to which all 2-digit years are interpreted. @@ -461,7 +461,7 @@ int32_t i18n_udate_count_available ( void ); * * @see i18n_udate_set_2digit_year_start() */ -int i18n_udate_get_2digit_year_start ( const i18n_udate_format_h format, i18n_udate *year ); +int i18n_udate_get_2digit_year_start(const i18n_udate_format_h format, i18n_udate *year); /** * @brief Sets the year relative to which all 2-digit years will be interpreted. @@ -478,7 +478,7 @@ int i18n_udate_get_2digit_year_start ( const i18n_udate_format_h format, i18n_ud * * @see i18n_udate_get_2digit_year_start() */ -int i18n_udate_set_2digit_year_start ( i18n_udate_format_h format, i18n_udate date ); +int i18n_udate_set_2digit_year_start(i18n_udate_format_h format, i18n_udate date); /** * @brief Extracts the pattern from an #i18n_udate_format_h. @@ -499,8 +499,8 @@ int i18n_udate_set_2digit_year_start ( i18n_udate_format_h format, i18n_udate da * * @see i18n_udate_apply_pattern() */ -int32_t i18n_udate_to_pattern ( const i18n_udate_format_h format, i18n_ubool localized, i18n_uchar *result, - int32_t result_length ); +int32_t i18n_udate_to_pattern(const i18n_udate_format_h format, i18n_ubool localized, i18n_uchar *result, + int32_t result_length); /** * @brief Sets the pattern used by an #i18n_udate_format_h. @@ -518,8 +518,8 @@ int32_t i18n_udate_to_pattern ( const i18n_udate_format_h format, i18n_ubool loc * * @see i18n_udate_to_pattern() */ -int i18n_udate_apply_pattern ( i18n_udate_format_h format, i18n_ubool localized, const i18n_uchar *pattern, - int32_t pattern_length ); +int i18n_udate_apply_pattern(i18n_udate_format_h format, i18n_ubool localized, const i18n_uchar *pattern, + int32_t pattern_length); /** * @brief Gets the symbols associated with an #i18n_udate_format_h. @@ -543,8 +543,8 @@ int i18n_udate_apply_pattern ( i18n_udate_format_h format, i18n_ubool localized, * @see i18n_udate_count_symbols() * @see #i18n_udate_set_symbols() */ -int32_t i18n_udate_get_symbols ( const i18n_udate_format_h format, i18n_udate_format_symbol_type_e type, int32_t symbol_index, - i18n_uchar *result, int32_t result_length ); +int32_t i18n_udate_get_symbols(const i18n_udate_format_h format, i18n_udate_format_symbol_type_e type, int32_t symbol_index, + i18n_uchar *result, int32_t result_length); /** * @brief Counts the number of particular symbols for an #i18n_udate_format_h. @@ -564,7 +564,7 @@ int32_t i18n_udate_get_symbols ( const i18n_udate_format_h format, i18n_udate_fo * @see i18n_udate_get_symbols() * @see #i18n_udate_set_symbols() */ -int32_t i18n_udate_count_symbols ( const i18n_udate_format_h format, i18n_udate_format_symbol_type_e type ); +int32_t i18n_udate_count_symbols(const i18n_udate_format_h format, i18n_udate_format_symbol_type_e type); /** * @brief Sets the symbols associated with an #i18n_udate_format_h. @@ -587,8 +587,8 @@ int32_t i18n_udate_count_symbols ( const i18n_udate_format_h format, i18n_udate_ * @see i18n_udate_count_symbols() * @see #i18n_udate_get_symbols() */ -int i18n_udate_set_symbols ( i18n_udate_format_h format, i18n_udate_format_symbol_type_e type, int32_t symbol_index, - i18n_uchar *value, int32_t value_length ); +int i18n_udate_set_symbols(i18n_udate_format_h format, i18n_udate_format_symbol_type_e type, int32_t symbol_index, + i18n_uchar *value, int32_t value_length); /** * @brief Gets the locale for this date format object. @@ -605,7 +605,7 @@ int i18n_udate_set_symbols ( i18n_udate_format_h format, i18n_udate_format_symbo * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -const char * i18n_udate_get_locale_by_type ( const i18n_udate_format_h format, i18n_ulocale_data_locale_type_e type ); +const char * i18n_udate_get_locale_by_type(const i18n_udate_format_h format, i18n_ulocale_data_locale_type_e type); /** * @brief Sets a particular #i18n_udisplay_context_e value in the formatter, such as #I18N_UDISPLAY_CONTEXT_CAPITALIZATION_FOR_STANDALONE. @@ -620,7 +620,7 @@ const char * i18n_udate_get_locale_by_type ( const i18n_udate_format_h format, i * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_udate_set_context ( i18n_udate_format_h format, i18n_udisplay_context_e value ); +int i18n_udate_set_context(i18n_udate_format_h format, i18n_udisplay_context_e value); /** diff --git a/src/include/mobile/utils_i18n_udatepg.h b/src/include/mobile/utils_i18n_udatepg.h index d46317d..8308288 100755 --- a/src/include/mobile/utils_i18n_udatepg.h +++ b/src/include/mobile/utils_i18n_udatepg.h @@ -106,21 +106,21 @@ // creates new i18n_udate_format to format dates and times ret = i18n_udate_create(I18N_UDATE_FULL , I18N_UDATE_FULL , locale, utf16_timezone_KR, -1, bestPattern, -1, &formatter_KR); - if ( ret != I18N_ERROR_NONE ) { + if (ret != I18N_ERROR_NONE) { dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); } if (!formatter_KR) { dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n"); } ret = i18n_udate_create(I18N_UDATE_FULL , I18N_UDATE_FULL , locale, utf16_timezone_LA, -1, bestPattern, -1, &formatter_LA); - if ( ret != I18N_ERROR_NONE ) { + if (ret != I18N_ERROR_NONE) { dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); } if (!formatter_LA) { dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n"); } ret = i18n_udate_create(I18N_UDATE_PATTERN , I18N_UDATE_PATTERN , locale, utf16_timezone_SaoPaulo, -1, bestPattern, -1, &formatter_SaoPaulo); - if ( ret != I18N_ERROR_NONE ) { + if (ret != I18N_ERROR_NONE) { dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); } if (!formatter_LA) { @@ -178,7 +178,7 @@ extern "C" { * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_udatepg_create ( const char *locale, i18n_udatepg_h *dtpg ); +int i18n_udatepg_create(const char *locale, i18n_udatepg_h *dtpg); /** * @brief Destroys a generator. @@ -189,7 +189,7 @@ int i18n_udatepg_create ( const char *locale, i18n_udatepg_h *dtpg ); * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_udatepg_destroy ( i18n_udatepg_h dtpg ); +int i18n_udatepg_destroy(i18n_udatepg_h dtpg); /** * @brief Gets the best pattern matching the input skeleton. @@ -213,7 +213,7 @@ int i18n_udatepg_destroy ( i18n_udatepg_h dtpg ); * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @retval #I18N_ERROR_BUFFER_OVERFLOW A result would not fit in the supplied buffer */ -int i18n_udatepg_get_best_pattern ( i18n_udatepg_h dtpg, const i18n_uchar *skeleton, int32_t len, i18n_uchar *best_pattern, int32_t capacity, int32_t *best_pattern_len ); +int i18n_udatepg_get_best_pattern(i18n_udatepg_h dtpg, const i18n_uchar *skeleton, int32_t len, i18n_uchar *best_pattern, int32_t capacity, int32_t *best_pattern_len); // Newly Added APIs @@ -229,7 +229,7 @@ int i18n_udatepg_get_best_pattern ( i18n_udatepg_h dtpg, const i18n_uchar *skele * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_udatepg_create_empty (i18n_udatepg_h *dtpg); +int i18n_udatepg_create_empty(i18n_udatepg_h *dtpg); /** * @brief Creates a copy of a generator. @@ -242,7 +242,7 @@ int i18n_udatepg_create_empty (i18n_udatepg_h *dtpg); * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_udatepg_clone ( const i18n_udatepg_h dtpg, i18n_udatepg_h * dtpg_clone); +int i18n_udatepg_clone(const i18n_udatepg_h dtpg, i18n_udatepg_h * dtpg_clone); /** * @brief Gets the best pattern matching the input @a skeleton. @@ -273,8 +273,8 @@ int i18n_udatepg_clone ( const i18n_udatepg_h dtpg, i18n_udatepg_h * dtpg_clone) * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_udatepg_get_best_pattern_with_options ( i18n_udatepg_h dtpg, const i18n_uchar *skeleton, int32_t length, - i18n_udatepg_date_time_pattern_match_options_e options, i18n_uchar *best_pattern, int32_t capacity ); +int32_t i18n_udatepg_get_best_pattern_with_options(i18n_udatepg_h dtpg, const i18n_uchar *skeleton, int32_t length, + i18n_udatepg_date_time_pattern_match_options_e options, i18n_uchar *best_pattern, int32_t capacity); /** * @brief Gets a unique skeleton from a given pattern. For example, both "MMM-dd" and "dd/MMM" produce the skeleton "MMMdd". @@ -298,7 +298,7 @@ int32_t i18n_udatepg_get_best_pattern_with_options ( i18n_udatepg_h dtpg, const * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_udatepg_get_skeleton ( i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t length, i18n_uchar *skeleton, int32_t capacity ); +int32_t i18n_udatepg_get_skeleton(i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t length, i18n_uchar *skeleton, int32_t capacity); /** * @brief Gets a unique base skeleton from a given pattern. @@ -325,7 +325,7 @@ int32_t i18n_udatepg_get_skeleton ( i18n_udatepg_h dtpg, const i18n_uchar *patte * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_udatepg_get_base_skeleton ( i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t length, i18n_uchar *base_skeleton, int32_t capacity ); +int32_t i18n_udatepg_get_base_skeleton(i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t length, i18n_uchar *base_skeleton, int32_t capacity); /** * @brief Adds a pattern to the generator. @@ -353,7 +353,7 @@ int32_t i18n_udatepg_get_base_skeleton ( i18n_udatepg_h dtpg, const i18n_uchar * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_udatepg_add_pattern ( i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t pattern_length, i18n_ubool override, i18n_uchar *conflicting_pattern, int32_t capacity, i18n_udatepg_date_time_pattern_conflict_e * conflict_status ); +int32_t i18n_udatepg_add_pattern(i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t pattern_length, i18n_ubool override, i18n_uchar *conflicting_pattern, int32_t capacity, i18n_udatepg_date_time_pattern_conflict_e * conflict_status); /** * @brief An append_item_format is a pattern used to append a field if there is no good match. @@ -379,7 +379,7 @@ int32_t i18n_udatepg_add_pattern ( i18n_udatepg_h dtpg, const i18n_uchar *patte * * @see i18n_udatepg_get_append_item_format() */ -int i18n_udatepg_set_append_item_format ( i18n_udatepg_h dtpg, i18n_udatepg_date_time_pattern_field_e field, const i18n_uchar *value, int32_t length ); +int i18n_udatepg_set_append_item_format(i18n_udatepg_h dtpg, i18n_udatepg_date_time_pattern_field_e field, const i18n_uchar *value, int32_t length); /** * @brief Getter corresponding to i18n_udatepg_set_append_item_format(). @@ -399,7 +399,7 @@ int i18n_udatepg_set_append_item_format ( i18n_udatepg_h dtpg, i18n_udatepg_date * * @see i18n_udatepg_set_append_item_format() */ -const i18n_uchar *i18n_udatepg_get_append_item_format ( const i18n_udatepg_h dtpg, i18n_udatepg_date_time_pattern_field_e field, int32_t *pattern_length ); +const i18n_uchar *i18n_udatepg_get_append_item_format(const i18n_udatepg_h dtpg, i18n_udatepg_date_time_pattern_field_e field, int32_t *pattern_length); /** * @brief Sets the name of field, e.g. "era" in English for ERA. @@ -418,8 +418,8 @@ const i18n_uchar *i18n_udatepg_get_append_item_format ( const i18n_udatepg_h dtp * * @see i18n_udatepg_get_append_item_name() */ -int i18n_udatepg_set_append_item_name ( i18n_udatepg_h dtpg, i18n_udatepg_date_time_pattern_field_e field, const i18n_uchar *value, - int32_t length ); +int i18n_udatepg_set_append_item_name(i18n_udatepg_h dtpg, i18n_udatepg_date_time_pattern_field_e field, const i18n_uchar *value, + int32_t length); /** * @brief Getter corresponding to i18n_udatepg_set_append_item_name(). @@ -439,8 +439,8 @@ int i18n_udatepg_set_append_item_name ( i18n_udatepg_h dtpg, i18n_udatepg_date_t * * @see i18n_udatepg_set_append_item_name() */ -const i18n_uchar *i18n_udatepg_get_append_item_name ( const i18n_udatepg_h dtpg, i18n_udatepg_date_time_pattern_field_e field, - int32_t *pattern_length ); +const i18n_uchar *i18n_udatepg_get_append_item_name(const i18n_udatepg_h dtpg, i18n_udatepg_date_time_pattern_field_e field, + int32_t *pattern_length); /** * @brief The date time format is a message format pattern used to compose date and time patterns. @@ -464,7 +464,7 @@ const i18n_uchar *i18n_udatepg_get_append_item_name ( const i18n_udatepg_h dtpg, * * @see i18n_udatepg_get_date_time_format() */ -int i18n_udatepg_set_date_time_format ( const i18n_udatepg_h dtpg, const i18n_uchar *date_time_format, int32_t length ); +int i18n_udatepg_set_date_time_format(const i18n_udatepg_h dtpg, const i18n_uchar *date_time_format, int32_t length); /** * @brief Getter corresponding to i18n_udatepg_set_date_time_format(). @@ -482,7 +482,7 @@ int i18n_udatepg_set_date_time_format ( const i18n_udatepg_h dtpg, const i18n_uc * * @see i18n_udatepg_set_date_time_format() */ -const i18n_uchar *i18n_udatepg_get_date_time_format ( const i18n_udatepg_h dtpg, int32_t *pattern_length ); +const i18n_uchar *i18n_udatepg_get_date_time_format(const i18n_udatepg_h dtpg, int32_t *pattern_length); /** * @brief The decimal value is used in formatting fractions of seconds. @@ -502,7 +502,7 @@ const i18n_uchar *i18n_udatepg_get_date_time_format ( const i18n_udatepg_h dtpg, * * @see i18n_udatepg_get_decimal() */ -int i18n_udatepg_set_decimal ( i18n_udatepg_h dtpg, const i18n_uchar *decimal, int32_t length ); +int i18n_udatepg_set_decimal(i18n_udatepg_h dtpg, const i18n_uchar *decimal, int32_t length); /** * @brief Getter corresponding to i18n_udatepg_set_decimal(). @@ -520,7 +520,7 @@ int i18n_udatepg_set_decimal ( i18n_udatepg_h dtpg, const i18n_uchar *decimal, i * * @see i18n_udatepg_set_decimal() */ -const i18n_uchar *i18n_udatepg_get_decimal ( const i18n_udatepg_h dtpg, int32_t *pattern_length ); +const i18n_uchar *i18n_udatepg_get_decimal(const i18n_udatepg_h dtpg, int32_t *pattern_length); /** * @brief Adjusts the field types (width and subtype) of a @a pattern to match what is in a @a skeleton. @@ -548,8 +548,8 @@ const i18n_uchar *i18n_udatepg_get_decimal ( const i18n_udatepg_h dtpg, int32_t * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_udatepg_replace_field_types ( i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t pattern_length, - const i18n_uchar *skeleton, int32_t skeleton_length, i18n_uchar *dest, int32_t dest_capacity ); +int32_t i18n_udatepg_replace_field_types(i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t pattern_length, + const i18n_uchar *skeleton, int32_t skeleton_length, i18n_uchar *dest, int32_t dest_capacity); /** * @brief Adjusts the field types (width and subtype) of a pattern to match what is in a @a skeleton. @@ -581,9 +581,9 @@ int32_t i18n_udatepg_replace_field_types ( i18n_udatepg_h dtpg, const i18n_uchar * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_udatepg_replace_field_types_with_options ( i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t pattern_length, +int32_t i18n_udatepg_replace_field_types_with_options(i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t pattern_length, const i18n_uchar *skeleton, int32_t skeleton_length, i18n_udatepg_date_time_pattern_match_options_e options, - i18n_uchar *dest, int32_t dest_capacity ); + i18n_uchar *dest, int32_t dest_capacity); /** * @brief Creates an #i18n_uenumeration_h for list of all the skeletons in canonical form. @@ -597,7 +597,7 @@ int32_t i18n_udatepg_replace_field_types_with_options ( i18n_udatepg_h dtpg, con * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_udatepg_skeletons_create ( const i18n_udatepg_h dtpg, i18n_uenumeration_h *enumeration ); +int i18n_udatepg_skeletons_create(const i18n_udatepg_h dtpg, i18n_uenumeration_h *enumeration); /** * @brief Creates an #i18n_uenumeration_h for list of all the base skeletons in canonical form. @@ -610,7 +610,7 @@ int i18n_udatepg_skeletons_create ( const i18n_udatepg_h dtpg, i18n_uenumeration * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_udatepg_base_skeletons_create ( const i18n_udatepg_h dtpg, i18n_uenumeration_h *enumeration ); +int i18n_udatepg_base_skeletons_create(const i18n_udatepg_h dtpg, i18n_uenumeration_h *enumeration); /** * @brief Gets the pattern corresponding to a given skeleton. @@ -628,7 +628,7 @@ int i18n_udatepg_base_skeletons_create ( const i18n_udatepg_h dtpg, i18n_uenumer * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -const i18n_uchar *i18n_udatepg_get_pattern_for_skeleton ( const i18n_udatepg_h dtpg, const i18n_uchar *skeleton, int32_t skeleton_length, int32_t *pattern_length ); +const i18n_uchar *i18n_udatepg_get_pattern_for_skeleton(const i18n_udatepg_h dtpg, const i18n_uchar *skeleton, int32_t skeleton_length, int32_t *pattern_length); #ifdef __cplusplus diff --git a/src/include/mobile/utils_i18n_uenumeration.h b/src/include/mobile/utils_i18n_uenumeration.h index bbfe620..543945d 100755 --- a/src/include/mobile/utils_i18n_uenumeration.h +++ b/src/include/mobile/utils_i18n_uenumeration.h @@ -61,7 +61,7 @@ extern "C" { * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_uenumeration_destroy ( i18n_uenumeration_h enumeration ); +int i18n_uenumeration_destroy(i18n_uenumeration_h enumeration); /** * @brief Returns the number of elements that the iterator traverses. @@ -79,7 +79,7 @@ int i18n_uenumeration_destroy ( i18n_uenumeration_h enumeration ); * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @exception #I18N_ERROR_ENUM_OUT_OF_SYNC The iterator is out of sync */ -int32_t i18n_uenumeration_count ( i18n_uenumeration_h enumeration ); +int32_t i18n_uenumeration_count(i18n_uenumeration_h enumeration); /** * @brief Returns the next element in the iterator's list. @@ -102,7 +102,7 @@ int32_t i18n_uenumeration_count ( i18n_uenumeration_h enumeration ); * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @exception #I18N_ERROR_ENUM_OUT_OF_SYNC The iterator is out of sync */ -const i18n_uchar *i18n_uenumeration_unext ( i18n_uenumeration_h enumeration, int32_t *result_length ); +const i18n_uchar *i18n_uenumeration_unext(i18n_uenumeration_h enumeration, int32_t *result_length); /** * @brief Returns the next element in the iterator's list. @@ -128,7 +128,7 @@ const i18n_uchar *i18n_uenumeration_unext ( i18n_uenumeration_h enumeration, int * @exception #I18N_ERROR_INVARIANT_CONVERSION The underlying native string is i18n_uchar* and conversion to char* with the invariant converter fails. * This error pertains only to current string, so iteration might be able to continue successfully. */ -const char *i18n_uenumeration_next ( i18n_uenumeration_h enumeration, int32_t *result_length ); +const char *i18n_uenumeration_next(i18n_uenumeration_h enumeration, int32_t *result_length); /** * @brief Resets the iterator to the current list of service IDs. @@ -142,7 +142,7 @@ const char *i18n_uenumeration_next ( i18n_uenumeration_h enumeration, int32_t *r * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_uenumeration_reset ( i18n_uenumeration_h enumeration ); +int i18n_uenumeration_reset(i18n_uenumeration_h enumeration); /** * @brief Given an array of const i18n_uchar* strings, return an #i18n_uenumeration_h. @@ -161,7 +161,7 @@ int i18n_uenumeration_reset ( i18n_uenumeration_h enumeration ); * * @see i18n_uenumeration_destroy() */ -int i18n_uenumeration_uchar_strings_enumeration_create(const i18n_uchar *const strings[], int32_t count, i18n_uenumeration_h *enumeration ); +int i18n_uenumeration_uchar_strings_enumeration_create(const i18n_uchar *const strings[], int32_t count, i18n_uenumeration_h *enumeration); /** * @brief Given an array of const char* strings (invariant chars only), return an #i18n_uenumeration_h. @@ -180,7 +180,7 @@ int i18n_uenumeration_uchar_strings_enumeration_create(const i18n_uchar *const s * * @see i18n_uenumeration_destroy() */ -int i18n_uenumeration_char_strings_enumeration_create(const char* const strings[], int32_t count, i18n_uenumeration_h *enumeration ); +int i18n_uenumeration_char_strings_enumeration_create(const char* const strings[], int32_t count, i18n_uenumeration_h *enumeration); /** * @} diff --git a/src/include/mobile/utils_i18n_ulocale.h b/src/include/mobile/utils_i18n_ulocale.h index a180152..18af395 100644 --- a/src/include/mobile/utils_i18n_ulocale.h +++ b/src/include/mobile/utils_i18n_ulocale.h @@ -61,21 +61,21 @@ // Gets default locale ret = i18n_ulocale_get_default(&locale); - if ( ret != I18N_ERROR_NONE ) { + if (ret != I18N_ERROR_NONE) { dlog_print(DLOG_ERROR, LOG_TAG, "i18n_ulocale_get_default() failed!!! \n"); } dlog_print(DLOG_INFO, LOG_TAG, "default locale : %s\n", locale); // default locale : en_GB.UTF-8 // Gets the language code for the specified locale ret = i18n_ulocale_get_language(locale, language, language_capacity, &buf_size_language); - if ( ret != I18N_ERROR_NONE ) { + if (ret != I18N_ERROR_NONE) { dlog_print(DLOG_ERROR, LOG_TAG, "i18n_ulocale_get_language() failed!!! \n"); } dlog_print(DLOG_INFO, LOG_TAG, "language code for the locale : %s\n", language); // language code for the locale : en // Gets the full name suitable for display for the specified locale ret = i18n_ulocale_get_display_name(locale, in_locale_id, result_w, 64, &buf_size_display_name); - if ( ret != I18N_ERROR_NONE ) { + if (ret != I18N_ERROR_NONE) { dlog_print(DLOG_ERROR, LOG_TAG, "i18n_ulocale_get_display_name() failed!!! \n"); } i18n_ustring_copy_au(result, result_w); @@ -120,7 +120,7 @@ extern "C" { * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ulocale_get_default ( const char **locale ); +int i18n_ulocale_get_default(const char **locale); /** * @brief Sets I18N's default locale. @@ -138,7 +138,7 @@ int i18n_ulocale_get_default ( const char **locale ); * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ulocale_set_default ( const char *locale_id ); +int i18n_ulocale_set_default(const char *locale_id); /** * @brief Gets the language code for the specified locale. @@ -154,7 +154,7 @@ int i18n_ulocale_set_default ( const char *locale_id ); * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ulocale_get_language ( const char *locale_id, char *language, int32_t language_capacity, int32_t *buf_size_language ); +int i18n_ulocale_get_language(const char *locale_id, char *language, int32_t language_capacity, int32_t *buf_size_language); /** * @brief Gets the country code for the specified locale. @@ -168,7 +168,7 @@ int i18n_ulocale_get_language ( const char *locale_id, char *language, int32_t l * @return The actual buffer size needed for the country code.\n * If it's greater than @a country_capacity, the returned country code will be truncated. */ -int32_t i18n_ulocale_get_country ( const char *locale_id, char *country, int32_t country_capacity, int *error ); +int32_t i18n_ulocale_get_country(const char *locale_id, char *country, int32_t country_capacity, int *error); /** * @brief Gets the full name suitable for display for the specified locale. @@ -186,7 +186,7 @@ int32_t i18n_ulocale_get_country ( const char *locale_id, char *country, int32_t * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ulocale_get_display_name ( const char *locale_id, const char *in_locale_id, i18n_uchar *result, int32_t max_result_size, int32_t *buf_size_display_name ); +int i18n_ulocale_get_display_name(const char *locale_id, const char *in_locale_id, i18n_uchar *result, int32_t max_result_size, int32_t *buf_size_display_name); /** * @brief Gets the specified locale from a list of all available locales. @@ -204,7 +204,7 @@ int i18n_ulocale_get_display_name ( const char *locale_id, const char *in_locale * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -const char* i18n_ulocale_get_available ( int32_t n ); +const char* i18n_ulocale_get_available(int32_t n); /** * @brief Gets the size of the all available locale list. @@ -215,7 +215,7 @@ const char* i18n_ulocale_get_available ( int32_t n ); * @return The size of the locale list * @exception #I18N_ERROR_NONE Success */ -int32_t i18n_ulocale_count_available ( void ); +int32_t i18n_ulocale_count_available(void); // Newly Added APIs @@ -237,7 +237,7 @@ int32_t i18n_ulocale_count_available ( void ); * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ulocale_get_script ( const char *locale_id, char *script, int32_t script_capacity ); +int32_t i18n_ulocale_get_script(const char *locale_id, char *script, int32_t script_capacity); /** * @brief Gets the variant code for the specified locale. @@ -257,7 +257,7 @@ int32_t i18n_ulocale_get_script ( const char *locale_id, char *script, int32_t s * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ulocale_get_variant ( const char *locale_id, char *variant, int32_t variant_capacity ); +int32_t i18n_ulocale_get_variant(const char *locale_id, char *variant, int32_t variant_capacity); /** * @brief Gets the full name for the specified locale. @@ -279,7 +279,7 @@ int32_t i18n_ulocale_get_variant ( const char *locale_id, char *variant, int32_t * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_BUFFER_OVERFLOW A result would not fit in the supplied buffer */ -int32_t i18n_ulocale_get_name ( const char *locale_id, char *name, int32_t name_capacity ); +int32_t i18n_ulocale_get_name(const char *locale_id, char *name, int32_t name_capacity); /** * @brief Gets the full name for the specified locale. @@ -301,7 +301,7 @@ int32_t i18n_ulocale_get_name ( const char *locale_id, char *name, int32_t name_ * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_BUFFER_OVERFLOW A result would not fit in the supplied buffer */ -int32_t i18n_ulocale_canonicalize ( const char *locale_id, char *name, int32_t name_capacity ); +int32_t i18n_ulocale_canonicalize(const char *locale_id, char *name, int32_t name_capacity); /** * @brief Gets the ISO language code for the specified locale. @@ -315,7 +315,7 @@ int32_t i18n_ulocale_canonicalize ( const char *locale_id, char *name, int32_t n * * @exception #I18N_ERROR_NONE Successful */ -const char * i18n_ulocale_get_iso3_language ( const char *locale_id ); +const char * i18n_ulocale_get_iso3_language(const char *locale_id); /** * @brief Gets the ISO country code for the specified locale. @@ -329,7 +329,7 @@ const char * i18n_ulocale_get_iso3_language ( const char *locale_id ); * * @exception #I18N_ERROR_NONE Successful */ -const char * i18n_ulocale_get_iso3_country ( const char *locale_id ); +const char * i18n_ulocale_get_iso3_country(const char *locale_id); /** * @brief Gets the Win32 LCID value for the specified locale. @@ -344,7 +344,7 @@ const char * i18n_ulocale_get_iso3_country ( const char *locale_id ); * * @exception #I18N_ERROR_NONE Successful */ -uint32_t i18n_ulocale_get_lcid ( const char *locale_id ); +uint32_t i18n_ulocale_get_lcid(const char *locale_id); /** * @brief Gets the language name suitable for display for the specified locale. @@ -366,7 +366,7 @@ uint32_t i18n_ulocale_get_lcid ( const char *locale_id ); * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ulocale_get_display_language ( const char *locale, const char *display_locale, i18n_uchar *language, int32_t language_capacity ); +int32_t i18n_ulocale_get_display_language(const char *locale, const char *display_locale, i18n_uchar *language, int32_t language_capacity); /** * @brief Gets the script name suitable for display for the specified locale. @@ -387,7 +387,7 @@ int32_t i18n_ulocale_get_display_language ( const char *locale, const char *disp * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ulocale_get_display_script ( const char *locale, const char *display_locale, i18n_uchar *script, int32_t script_capacity ); +int32_t i18n_ulocale_get_display_script(const char *locale, const char *display_locale, i18n_uchar *script, int32_t script_capacity); /** * @brief Gets the country name suitable for display for the specified locale. @@ -408,7 +408,7 @@ int32_t i18n_ulocale_get_display_script ( const char *locale, const char *displa * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ulocale_get_display_country ( const char *locale, const char *display_locale, i18n_uchar *country, int32_t country_capacity ); +int32_t i18n_ulocale_get_display_country(const char *locale, const char *display_locale, i18n_uchar *country, int32_t country_capacity); /** * @brief Gets the variant name suitable for display for the specified locale. @@ -429,7 +429,7 @@ int32_t i18n_ulocale_get_display_country ( const char *locale, const char *displ * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ulocale_get_display_variant ( const char *locale, const char *display_locale, i18n_uchar *variant, int32_t variant_capacity ); +int32_t i18n_ulocale_get_display_variant(const char *locale, const char *display_locale, i18n_uchar *variant, int32_t variant_capacity); /** * @brief Gets the keyword name suitable for display for the specified locale. @@ -481,7 +481,7 @@ int32_t i18n_ulocale_get_display_variant ( const char *locale, const char *displ * @see i18n_uenumeration_next() * @see i18n_uenumeration_destroy() */ -int32_t i18n_ulocale_get_display_keyword ( const char *keyword, const char *display_locale, i18n_uchar *dest, int32_t dest_capacity ); +int32_t i18n_ulocale_get_display_keyword(const char *keyword, const char *display_locale, i18n_uchar *dest, int32_t dest_capacity); /** * @brief Gets the value of the keyword suitable for display for the specified locale. @@ -506,7 +506,7 @@ int32_t i18n_ulocale_get_display_keyword ( const char *keyword, const char *disp * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ulocale_get_display_keyword_value ( const char *locale, const char *keyword, const char *display_locale, i18n_uchar *dest, int32_t dest_capacity ); +int32_t i18n_ulocale_get_display_keyword_value(const char *locale, const char *keyword, const char *display_locale, i18n_uchar *dest, int32_t dest_capacity); /** * @brief Gets a list of all available 2-letter language codes defined in ISO 639, @@ -523,7 +523,7 @@ int32_t i18n_ulocale_get_display_keyword_value ( const char *locale, const char * * @exception #I18N_ERROR_NONE Successful */ -const char * const *i18n_ulocale_get_iso_languages ( void ); +const char * const *i18n_ulocale_get_iso_languages(void); /** * @@ -539,7 +539,7 @@ const char * const *i18n_ulocale_get_iso_languages ( void ); * * @exception #I18N_ERROR_NONE Successful */ -const char * const *i18n_ulocale_get_iso_countries ( void ); +const char * const *i18n_ulocale_get_iso_countries(void); /** * @brief Truncates the locale ID string to get the parent locale ID. @@ -566,7 +566,7 @@ const char * const *i18n_ulocale_get_iso_countries ( void ); * in the @a locale_id from index 0 to the index of the last occurrence of * the underscore ("_") symbol. */ -int32_t i18n_ulocale_get_parent ( const char *locale_id, char *parent, int32_t parent_capacity ); +int32_t i18n_ulocale_get_parent(const char *locale_id, char *parent, int32_t parent_capacity); /** * @brief Gets the full name for the specified locale, like i18n_ulocale_get_name(), but without keywords. @@ -591,7 +591,7 @@ int32_t i18n_ulocale_get_parent ( const char *locale_id, char *parent, int32_t p * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_BUFFER_OVERFLOW A result would not fit in the supplied buffer */ -int32_t i18n_ulocale_get_base_name ( const char *locale_id, char *name, int32_t name_capacity ); +int32_t i18n_ulocale_get_base_name(const char *locale_id, char *name, int32_t name_capacity); /** * @brief Gets an enumeration of keywords for the specified locale. @@ -606,7 +606,7 @@ int32_t i18n_ulocale_get_base_name ( const char *locale_id, char *name, int32_t * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ulocale_keywords_create ( const char *locale_id, i18n_uenumeration_h *enumeration ); +int i18n_ulocale_keywords_create(const char *locale_id, i18n_uenumeration_h *enumeration); /** * @brief Gets the value for a keyword. @@ -626,7 +626,7 @@ int i18n_ulocale_keywords_create ( const char *locale_id, i18n_uenumeration_h *e * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ulocale_get_keyword_value ( const char *locale_id, const char *keyword_name, char *buffer, int32_t buffer_capacity ); +int32_t i18n_ulocale_get_keyword_value(const char *locale_id, const char *keyword_name, char *buffer, int32_t buffer_capacity); /** * @brief Sets or removes the value of the specified keyword. @@ -704,7 +704,7 @@ int32_t i18n_ulocale_get_keyword_value ( const char *locale_id, const char *keyw * * @see i18n_ulocale_get_keyword_value() */ -int32_t i18n_ulocale_set_keyword_value ( const char *keyword_name, const char *keyword_value, char *buffer, int32_t buffer_capacity ); +int32_t i18n_ulocale_set_keyword_value(const char *keyword_name, const char *keyword_value, char *buffer, int32_t buffer_capacity); /** * @brief Gets the layout character orientation for the specified locale. @@ -718,7 +718,7 @@ int32_t i18n_ulocale_set_keyword_value ( const char *keyword_name, const char *k * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ulocale_get_character_orientation ( const char *locale_id, i18n_ulocale_layout_type_e *layout_type ); +int i18n_ulocale_get_character_orientation(const char *locale_id, i18n_ulocale_layout_type_e *layout_type); /** * @brief Gets the layout line orientation for the specified locale. @@ -732,7 +732,7 @@ int i18n_ulocale_get_character_orientation ( const char *locale_id, i18n_ulocale * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ulocale_get_line_orientation ( const char *locale_id, i18n_ulocale_layout_type_e *layout_type ); +int i18n_ulocale_get_line_orientation(const char *locale_id, i18n_ulocale_layout_type_e *layout_type); /** * @brief Gets the I18N locale ID for the specified Win32 LCID value. @@ -751,7 +751,7 @@ int i18n_ulocale_get_line_orientation ( const char *locale_id, i18n_ulocale_layo * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ulocale_get_locale_for_lcid ( uint32_t host_id, char *locale, int32_t locale_capacity ); +int32_t i18n_ulocale_get_locale_for_lcid(uint32_t host_id, char *locale, int32_t locale_capacity); /** * @brief Adds the likely subtags for a provided locale ID, per the algorithm described @@ -785,7 +785,7 @@ int32_t i18n_ulocale_get_locale_for_lcid ( uint32_t host_id, char *locale, int32 * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ulocale_add_likely_subtags ( const char *locale_id, char *maximized_locale_id, int32_t maximized_locale_id_capacity ); +int32_t i18n_ulocale_add_likely_subtags(const char *locale_id, char *maximized_locale_id, int32_t maximized_locale_id_capacity); /** * @brief Minimizes the subtags for a provided locale ID, per the algorithm described @@ -818,7 +818,7 @@ int32_t i18n_ulocale_add_likely_subtags ( const char *locale_id, char *maximized * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ulocale_minimize_subtags ( const char *locale_id, char *minimized_locale_id, int32_t minimized_locale_id_capacity ); +int32_t i18n_ulocale_minimize_subtags(const char *locale_id, char *minimized_locale_id, int32_t minimized_locale_id_capacity); /** * @brief Returns a locale ID for the specified BCP47 language tag string. @@ -849,7 +849,7 @@ int32_t i18n_ulocale_minimize_subtags ( const char *locale_id, char *minimized_l * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ulocale_for_language_tag ( const char *langtag, char *locale_id, int32_t locale_id_capacity, int32_t *parsed_length ); +int32_t i18n_ulocale_for_language_tag(const char *langtag, char *locale_id, int32_t locale_id_capacity, int32_t *parsed_length); /** * @brief Returns a well-formed language tag for this locale ID. @@ -877,7 +877,7 @@ int32_t i18n_ulocale_for_language_tag ( const char *langtag, char *locale_id, in * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ulocale_to_language_tag ( const char *locale_id, char *langtag, int32_t langtag_capacity, i18n_ubool strict ); +int32_t i18n_ulocale_to_language_tag(const char *locale_id, char *langtag, int32_t langtag_capacity, i18n_ubool strict); #ifdef __cplusplus } diff --git a/src/include/mobile/utils_i18n_unormalization.h b/src/include/mobile/utils_i18n_unormalization.h index 76ecbc0..15bad5d 100755 --- a/src/include/mobile/utils_i18n_unormalization.h +++ b/src/include/mobile/utils_i18n_unormalization.h @@ -81,7 +81,7 @@ extern "C" { * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_unormalization_get_instance (const char *package_name, const char *name, i18n_unormalization_mode_e mode, +int i18n_unormalization_get_instance(const char *package_name, const char *name, i18n_unormalization_mode_e mode, i18n_unormalizer_h *normalizer); /** @@ -100,7 +100,7 @@ int i18n_unormalization_get_instance (const char *package_name, const char *name * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_unormalization_normalize (i18n_unormalizer_h normalizer, const i18n_uchar *src, int32_t len, i18n_uchar *dest, int32_t capacity, int32_t *len_deststr); +int i18n_unormalization_normalize(i18n_unormalizer_h normalizer, const i18n_uchar *src, int32_t len, i18n_uchar *dest, int32_t capacity, int32_t *len_deststr); #ifdef __cplusplus } diff --git a/src/include/mobile/utils_i18n_unumber.h b/src/include/mobile/utils_i18n_unumber.h index f1e7cf3..4a4e2ac 100644 --- a/src/include/mobile/utils_i18n_unumber.h +++ b/src/include/mobile/utils_i18n_unumber.h @@ -106,8 +106,8 @@ extern "C" { * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_unumber_create ( i18n_unumber_format_style_e style, const i18n_uchar *pattern, int32_t pattern_len, const char *locale, - i18n_uparse_error_s *parse_err, i18n_unumber_format_h *num_format ); +int i18n_unumber_create(i18n_unumber_format_style_e style, const i18n_uchar *pattern, int32_t pattern_len, const char *locale, + i18n_uparse_error_s *parse_err, i18n_unumber_format_h *num_format); /** * @brief Destroys an #i18n_unumber_format_h. @@ -119,7 +119,7 @@ int i18n_unumber_create ( i18n_unumber_format_style_e style, const i18n_uchar *p * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_unumber_destroy ( i18n_unumber_format_h fmt ); +int i18n_unumber_destroy(i18n_unumber_format_h fmt); /** * @brief Gets a symbol associated with an #i18n_unumber_format_h. @@ -138,7 +138,7 @@ int i18n_unumber_destroy ( i18n_unumber_format_h fmt ); * @retval #I18N_ERROR_NONE Successful. * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_unumber_get_symbol ( const i18n_unumber_format_h fmt, i18n_unumber_format_symbol_e symbol, i18n_uchar *buffer, int32_t size, int32_t *len_symbol ); +int i18n_unumber_get_symbol(const i18n_unumber_format_h fmt, i18n_unumber_format_symbol_e symbol, i18n_uchar *buffer, int32_t size, int32_t *len_symbol); // Newly Added APIs @@ -156,7 +156,7 @@ int i18n_unumber_get_symbol ( const i18n_unumber_format_h fmt, i18n_unumber_form * @retval #I18N_ERROR_NONE Successful. * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_unumber_clone (const i18n_unumber_format_h fmt, i18n_unumber_format_h *fmt_clone); +int i18n_unumber_clone(const i18n_unumber_format_h fmt, i18n_unumber_format_h *fmt_clone); /** * @brief Formats an integer using a i18n_unumber_format_h. @@ -177,7 +177,7 @@ int i18n_unumber_clone (const i18n_unumber_format_h fmt, i18n_unumber_format_h * * * @return The total buffer size needed; if greater than result_length, the output was truncated. */ -int32_t i18n_unumber_format (const i18n_unumber_format_h fmt, int32_t number, i18n_uchar *result, int32_t result_length, i18n_ufield_position_s *pos, i18n_error_code_e *status); +int32_t i18n_unumber_format(const i18n_unumber_format_h fmt, int32_t number, i18n_uchar *result, int32_t result_length, i18n_ufield_position_s *pos, i18n_error_code_e *status); /** * @brief Formats an int64 using an #i18n_unumber_format_h. @@ -204,7 +204,7 @@ int32_t i18n_unumber_format (const i18n_unumber_format_h fmt, int32_t number, i1 * @exception #I18N_WARNING_STRING_NOT_TERMINATED If the formatted number fits into @a result but cannot be NULL-terminated (length == result_length) * @exception #I18N_ERROR_BUFFER_OVERFLOW If the formatted number doesn't fit into the @a result buffer */ -int32_t i18n_unumber_format_int64 (const i18n_unumber_format_h fmt, int64_t number, i18n_uchar *result, int32_t result_length, i18n_ufield_position_h pos); +int32_t i18n_unumber_format_int64(const i18n_unumber_format_h fmt, int64_t number, i18n_uchar *result, int32_t result_length, i18n_ufield_position_h pos); /** * @brief Formats a double using an #i18n_unumber_format_h. @@ -232,7 +232,7 @@ int32_t i18n_unumber_format_int64 (const i18n_unumber_format_h fmt, int64_t numb * @exception #I18N_WARNING_STRING_NOT_TERMINATED If the formatted number fits into @a result but cannot be NULL-terminated (length == result_length) * @exception #I18N_ERROR_BUFFER_OVERFLOW If the formatted number doesn't fit into the @a result buffer */ -int32_t i18n_unumber_format_double (const i18n_unumber_format_h fmt, double number, i18n_uchar *result, int32_t result_length, i18n_ufield_position_h pos); +int32_t i18n_unumber_format_double(const i18n_unumber_format_h fmt, double number, i18n_uchar *result, int32_t result_length, i18n_ufield_position_h pos); /** * @brief Formats a decimal number using an #i18n_unumber_format_h. @@ -263,7 +263,7 @@ int32_t i18n_unumber_format_double (const i18n_unumber_format_h fmt, double numb * @exception #I18N_WARNING_STRING_NOT_TERMINATED If the formatted number fits into @a result but cannot be NULL-terminated (length == result_length) * @exception #I18N_ERROR_BUFFER_OVERFLOW If the formatted number doesn't fit into the @a result buffer */ -int32_t i18n_unumber_format_decimal (const i18n_unumber_format_h fmt, const char *number, int32_t length, i18n_uchar *result, int32_t result_length, i18n_ufield_position_h pos); +int32_t i18n_unumber_format_decimal(const i18n_unumber_format_h fmt, const char *number, int32_t length, i18n_uchar *result, int32_t result_length, i18n_ufield_position_h pos); /** * @brief Formats a double currency amount using an #i18n_unumber_format_h. @@ -293,7 +293,7 @@ int32_t i18n_unumber_format_decimal (const i18n_unumber_format_h fmt, const char * @exception #I18N_WARNING_STRING_NOT_TERMINATED If the formatted number fits into @a result but cannot be NULL-terminated (length == result_length) * @exception #I18N_ERROR_BUFFER_OVERFLOW If the formatted number doesn't fit into the @a result buffer */ -int32_t i18n_unumber_format_double_currency (const i18n_unumber_format_h fmt, double number, i18n_uchar *currency, i18n_uchar *result, int32_t result_length, i18n_ufield_position_h pos); +int32_t i18n_unumber_format_double_currency(const i18n_unumber_format_h fmt, double number, i18n_uchar *currency, i18n_uchar *result, int32_t result_length, i18n_ufield_position_h pos); /** * @brief Parses a string into an integer using an #i18n_unumber_format_h. @@ -313,7 +313,7 @@ int32_t i18n_unumber_format_double_currency (const i18n_unumber_format_h fmt, do * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_unumber_parse (const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos); +int32_t i18n_unumber_parse(const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos); /** * @brief Parses a string into an int64 using an #i18n_unumber_format_h. @@ -333,7 +333,7 @@ int32_t i18n_unumber_parse (const i18n_unumber_format_h fmt, const i18n_uchar *t * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int64_t i18n_unumber_parse_int64 (const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos); +int64_t i18n_unumber_parse_int64(const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos); /** * @brief Parses a string into a double using an #i18n_unumber_format_h. @@ -353,7 +353,7 @@ int64_t i18n_unumber_parse_int64 (const i18n_unumber_format_h fmt, const i18n_uc * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -double i18n_unumber_parse_double (const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos); +double i18n_unumber_parse_double(const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos); /** * @brief Parses a number from a string into an unformatted numeric string using an #i18n_unumber_format_h. @@ -379,7 +379,7 @@ double i18n_unumber_parse_double (const i18n_unumber_format_h fmt, const i18n_uc * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_unumber_parse_decimal (const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos, char *out_buf, int32_t out_buf_length); +int32_t i18n_unumber_parse_decimal(const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos, char *out_buf, int32_t out_buf_length); /** * @brief Parses a string into a double and a currency using an #i18n_unumber_format_h. @@ -403,7 +403,7 @@ int32_t i18n_unumber_parse_decimal (const i18n_unumber_format_h fmt, const i18n_ * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -double i18n_unumber_parse_double_currency (const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos, i18n_uchar *currency); +double i18n_unumber_parse_double_currency(const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos, i18n_uchar *currency); /** * @brief Sets the pattern used by an #i18n_unumber_format_h. @@ -422,7 +422,7 @@ double i18n_unumber_parse_double_currency (const i18n_unumber_format_h fmt, cons * @retval #I18N_ERROR_NONE Successful. * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_unumber_apply_pattern (i18n_unumber_format_h format, i18n_ubool localized, const i18n_uchar *pattern, int32_t pattern_length, i18n_uparse_error_s* parse_error); +int i18n_unumber_apply_pattern(i18n_unumber_format_h format, i18n_ubool localized, const i18n_uchar *pattern, int32_t pattern_length, i18n_uparse_error_s* parse_error); /** * @brief Gets a locale for which decimal formatting patterns are available. @@ -438,7 +438,7 @@ int i18n_unumber_apply_pattern (i18n_unumber_format_h format, i18n_ubool localiz * * @exception #I18N_ERROR_NONE Successful */ -const char *i18n_unumber_get_available (int32_t locale_index); +const char *i18n_unumber_get_available(int32_t locale_index); /** * @brief Determines how many locales have decimal formatting patterns available. @@ -452,7 +452,7 @@ const char *i18n_unumber_get_available (int32_t locale_index); * * @exception #I18N_ERROR_NONE Successful */ -int32_t i18n_unumber_count_available (void); +int32_t i18n_unumber_count_available(void); /** * @brief Gets a numeric attribute associated with an #i18n_unumber_format_h. @@ -474,7 +474,7 @@ int32_t i18n_unumber_count_available (void); * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_unumber_get_attribute (const i18n_unumber_format_h fmt, i18n_unumber_format_attribute_e attr); +int32_t i18n_unumber_get_attribute(const i18n_unumber_format_h fmt, i18n_unumber_format_attribute_e attr); /** * @brief Sets a numeric attribute associated with an #i18n_unumber_format_h. @@ -499,7 +499,7 @@ int32_t i18n_unumber_get_attribute (const i18n_unumber_format_h fmt, i18n_unumbe * @retval #I18N_ERROR_NONE Successful. * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_unumber_set_attribute (i18n_unumber_format_h fmt, i18n_unumber_format_attribute_e attr, int32_t new_value); +int i18n_unumber_set_attribute(i18n_unumber_format_h fmt, i18n_unumber_format_attribute_e attr, int32_t new_value); /** * @brief Gets a numeric attribute associated with an #i18n_unumber_format_h. @@ -517,7 +517,7 @@ int i18n_unumber_set_attribute (i18n_unumber_format_h fmt, i18n_unumber_format_a * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -double i18n_unumber_get_double_attribute (const i18n_unumber_format_h fmt, i18n_unumber_format_attribute_e attr); +double i18n_unumber_get_double_attribute(const i18n_unumber_format_h fmt, i18n_unumber_format_attribute_e attr); /** * @brief Sets a numeric attribute associated with an #i18n_unumber_format_h. @@ -534,7 +534,7 @@ double i18n_unumber_get_double_attribute (const i18n_unumber_format_h fmt, i18n_ * @retval #I18N_ERROR_NONE Successful. * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_unumber_set_double_attribute (i18n_unumber_format_h fmt, i18n_unumber_format_attribute_e attr, double new_value); +int i18n_unumber_set_double_attribute(i18n_unumber_format_h fmt, i18n_unumber_format_attribute_e attr, double new_value); /** * @brief Gets a text attribute associated with an #i18n_unumber_format_h. @@ -557,7 +557,7 @@ int i18n_unumber_set_double_attribute (i18n_unumber_format_h fmt, i18n_unumber_f * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_unumber_get_text_attribute (const i18n_unumber_format_h fmt, i18n_unumber_format_text_attribute_e tag, i18n_uchar *result, int32_t result_length); +int32_t i18n_unumber_get_text_attribute(const i18n_unumber_format_h fmt, i18n_unumber_format_text_attribute_e tag, i18n_uchar *result, int32_t result_length); /** * @brief Sets a text attribute associated with an #i18n_unumber_format_h. @@ -577,7 +577,7 @@ int32_t i18n_unumber_get_text_attribute (const i18n_unumber_format_h fmt, i18n_u * @retval #I18N_ERROR_NONE Successful. * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_unumber_set_text_attribute (const i18n_unumber_format_h fmt, i18n_unumber_format_text_attribute_e tag, const i18n_uchar *new_value, int32_t new_value_length); +int i18n_unumber_set_text_attribute(const i18n_unumber_format_h fmt, i18n_unumber_format_text_attribute_e tag, const i18n_uchar *new_value, int32_t new_value_length); /** * @brief Extracts the pattern from an #i18n_unumber_format_h. @@ -597,7 +597,7 @@ int i18n_unumber_set_text_attribute (const i18n_unumber_format_h fmt, i18n_unumb * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_unumber_to_pattern (const i18n_unumber_format_h fmt, i18n_ubool is_pattern_localized, i18n_uchar *result, int32_t result_length); +int32_t i18n_unumber_to_pattern(const i18n_unumber_format_h fmt, i18n_ubool is_pattern_localized, i18n_uchar *result, int32_t result_length); /** * @brief Sets a symbol associated with an #i18n_unumber_format_h. @@ -615,7 +615,7 @@ int32_t i18n_unumber_to_pattern (const i18n_unumber_format_h fmt, i18n_ubool is_ * @retval #I18N_ERROR_NONE Successful. * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_unumber_set_symbol (i18n_unumber_format_h fmt, i18n_unumber_format_symbol_e symbol, const i18n_uchar *value, int32_t length); +int i18n_unumber_set_symbol(i18n_unumber_format_h fmt, i18n_unumber_format_symbol_e symbol, const i18n_uchar *value, int32_t length); /** * @brief Gets the locale for this number format object. @@ -632,7 +632,7 @@ int i18n_unumber_set_symbol (i18n_unumber_format_h fmt, i18n_unumber_format_symb * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -const char *i18n_unumber_get_locale_by_type (const i18n_unumber_format_h fmt, i18n_ulocale_data_locale_type_e type); +const char *i18n_unumber_get_locale_by_type(const i18n_unumber_format_h fmt, i18n_ulocale_data_locale_type_e type); #ifdef __cplusplus diff --git a/src/include/mobile/utils_i18n_usearch.h b/src/include/mobile/utils_i18n_usearch.h index a770cf6..9478569 100755 --- a/src/include/mobile/utils_i18n_usearch.h +++ b/src/include/mobile/utils_i18n_usearch.h @@ -103,7 +103,7 @@ extern "C" { * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_usearch_create ( const i18n_uchar *pattern, int32_t pattern_len, const i18n_uchar *text, int32_t text_len, const char *locale, i18n_ubreak_iterator_s *break_iter, i18n_usearch_h *search_iter ); +int i18n_usearch_create(const i18n_uchar *pattern, int32_t pattern_len, const i18n_uchar *text, int32_t text_len, const char *locale, i18n_ubreak_iterator_s *break_iter, i18n_usearch_h *search_iter); /** * @brief Creates an #i18n_usearch_h using the argument locale language rule set. @@ -126,7 +126,7 @@ int i18n_usearch_create ( const i18n_uchar *pattern, int32_t pattern_len, const * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_usearch_create_new ( const i18n_uchar *pattern, int32_t pattern_len, const i18n_uchar *text, +int i18n_usearch_create_new(const i18n_uchar *pattern, int32_t pattern_len, const i18n_uchar *text, int32_t text_len, const char *locale, i18n_ubreak_iterator_h break_iter, i18n_usearch_h *search_iter); /** @@ -139,7 +139,7 @@ int i18n_usearch_create_new ( const i18n_uchar *pattern, int32_t pattern_len, co * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_usearch_destroy ( i18n_usearch_h search_iter ); +int i18n_usearch_destroy(i18n_usearch_h search_iter); /** * @brief Returns the text that matches by the most recent call to i18n_usearch_first(), or so on. @@ -161,7 +161,7 @@ int i18n_usearch_destroy ( i18n_usearch_h search_iter ); * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @retval #I18N_ERROR_BUFFER_OVERFLOW A result would not fit in the supplied buffer */ -int i18n_usearch_get_matched_text ( const i18n_usearch_h search_iter, i18n_uchar *result, int32_t result_capacity, int32_t *len_matched_text ); +int i18n_usearch_get_matched_text(const i18n_usearch_h search_iter, i18n_uchar *result, int32_t result_capacity, int32_t *len_matched_text); /** * @brief Gets the collator used for the language rules. @@ -176,7 +176,7 @@ int i18n_usearch_get_matched_text ( const i18n_usearch_h search_iter, i18n_uchar * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_usearch_get_collator ( const i18n_usearch_h search_iter, i18n_ucollator_h *collator ); +int i18n_usearch_get_collator(const i18n_usearch_h search_iter, i18n_ucollator_h *collator); /** * @brief Returns the first index at which the string text matches the search pattern. @@ -193,7 +193,7 @@ int i18n_usearch_get_collator ( const i18n_usearch_h search_iter, i18n_ucollator * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_usearch_first ( i18n_usearch_h search_iter, int32_t *index_first ); +int i18n_usearch_first(i18n_usearch_h search_iter, int32_t *index_first); #ifdef __cplusplus } diff --git a/src/include/mobile/utils_i18n_uset.h b/src/include/mobile/utils_i18n_uset.h index 6cf528e..8e40c1f 100755 --- a/src/include/mobile/utils_i18n_uset.h +++ b/src/include/mobile/utils_i18n_uset.h @@ -63,7 +63,7 @@ extern "C" { * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_uset_destroy() */ -int i18n_uset_create_empty (i18n_uset_h *set); +int i18n_uset_create_empty(i18n_uset_h *set); /** * @brief Creates an #i18n_uset_h object that contains the range of characters @@ -81,7 +81,7 @@ int i18n_uset_create_empty (i18n_uset_h *set); * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_uset_destroy() */ -int i18n_uset_create (i18n_uchar32 start, i18n_uchar32 end, i18n_uset_h *set); +int i18n_uset_create(i18n_uchar32 start, i18n_uchar32 end, i18n_uset_h *set); /** * @brief Creates a set based on a given pattern. @@ -98,7 +98,7 @@ int i18n_uset_create (i18n_uchar32 start, i18n_uchar32 end, i18n_uset_h *set); * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_uset_destroy() */ -int i18n_uset_create_pattern (const i18n_uchar *pattern, int32_t pattern_length, i18n_uset_h *set); +int i18n_uset_create_pattern(const i18n_uchar *pattern, int32_t pattern_length, i18n_uset_h *set); /** * @brief Creates a set based on a given pattern. @@ -117,7 +117,7 @@ int i18n_uset_create_pattern (const i18n_uchar *pattern, int32_t pattern_length, * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_uset_destroy() */ -int i18n_uset_create_pattern_options (const i18n_uchar *pattern, int32_t pattern_length, uint32_t options, i18n_uset_h *set); +int i18n_uset_create_pattern_options(const i18n_uchar *pattern, int32_t pattern_length, uint32_t options, i18n_uset_h *set); /** * @brief Disposes of the storage used by a #i18n_uset_h object. @@ -130,7 +130,7 @@ int i18n_uset_create_pattern_options (const i18n_uchar *pattern, int32_t pattern * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_uset_destroy (i18n_uset_h set); +int i18n_uset_destroy(i18n_uset_h set); /** * @brief Returns a copy of this object. @@ -146,7 +146,7 @@ int i18n_uset_destroy (i18n_uset_h set); * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_uset_clone_as_thawed() */ -int i18n_uset_clone (const i18n_uset_h set, i18n_uset_h *set_clone); +int i18n_uset_clone(const i18n_uset_h set, i18n_uset_h *set_clone); /** * @brief Determines whether the set has been frozen (made immutable) or not. @@ -164,7 +164,7 @@ int i18n_uset_clone (const i18n_uset_h set, i18n_uset_h *set_clone); * @see i18n_uset_freeze() * @see i18n_uset_clone_as_thawed() */ -i18n_ubool i18n_uset_is_frozen (const i18n_uset_h set); +i18n_ubool i18n_uset_is_frozen(const i18n_uset_h set); /** * @brief Freezes the set (make it immutable). @@ -185,7 +185,7 @@ i18n_ubool i18n_uset_is_frozen (const i18n_uset_h set); * @see i18n_uset_is_frozen() * @see i18n_uset_clone_as_thawed() */ -int i18n_uset_freeze (i18n_uset_h set); +int i18n_uset_freeze(i18n_uset_h set); /** * @brief Clones the set and make the clone mutable. @@ -202,7 +202,7 @@ int i18n_uset_freeze (i18n_uset_h set); * @see i18n_uset_is_frozen() * @see i18n_uset_clone() */ -int i18n_uset_clone_as_thawed (const i18n_uset_h set, i18n_uset_h *set_copy); +int i18n_uset_clone_as_thawed(const i18n_uset_h set, i18n_uset_h *set_copy); /** * @brief Causes the #i18n_uset_h object to represent the range start - end. @@ -218,7 +218,7 @@ int i18n_uset_clone_as_thawed (const i18n_uset_h set, i18n_uset_h *set_copy); * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_uset_set (i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end); +int i18n_uset_set(i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end); /** * @brief Modifies the set to represent the set specified by the given @@ -248,7 +248,7 @@ int i18n_uset_set (i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end); * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_uset_apply_pattern (i18n_uset_h set, const i18n_uchar *pattern, int32_t pattern_length, uint32_t options); +int32_t i18n_uset_apply_pattern(i18n_uset_h set, const i18n_uchar *pattern, int32_t pattern_length, uint32_t options); /** * @brief Modifies the set to contain those code points which have the given value @@ -271,7 +271,7 @@ int32_t i18n_uset_apply_pattern (i18n_uset_h set, const i18n_uchar *pattern, int * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_uset_apply_int_property_value (i18n_uset_h set, i18n_uchar_uproperty_e prop, int32_t value); +int i18n_uset_apply_int_property_value(i18n_uset_h set, i18n_uchar_uproperty_e prop, int32_t value); /** * @brief Modifies the set to contain those code points which have the @@ -305,7 +305,7 @@ int i18n_uset_apply_int_property_value (i18n_uset_h set, i18n_uchar_uproperty_e * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_uset_apply_property_alias (i18n_uset_h set, const i18n_uchar *prop, int32_t prop_length, const i18n_uchar *value, int32_t value_length); +int i18n_uset_apply_property_alias(i18n_uset_h set, const i18n_uchar *prop, int32_t prop_length, const i18n_uchar *value, int32_t value_length); /** * @brief Return true if the given position, in the given pattern, appears @@ -324,7 +324,7 @@ int i18n_uset_apply_property_alias (i18n_uset_h set, const i18n_uchar *prop, int * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_ubool i18n_uset_resembles_pattern (const i18n_uchar *pattern, int32_t pattern_length, int32_t pos); +i18n_ubool i18n_uset_resembles_pattern(const i18n_uchar *pattern, int32_t pattern_length, int32_t pos); /** * @brief Returns a string representation of the given @a set. @@ -347,7 +347,7 @@ i18n_ubool i18n_uset_resembles_pattern (const i18n_uchar *pattern, int32_t patte * * @see i18n_uset_pattern_create() */ -int32_t i18n_uset_to_pattern (const i18n_uset_h set, i18n_uchar *result, int32_t result_capacity, i18n_ubool escape_unprintable); +int32_t i18n_uset_to_pattern(const i18n_uset_h set, i18n_uchar *result, int32_t result_capacity, i18n_ubool escape_unprintable); /** * @brief Adds the given character to the given #i18n_uset_h. @@ -364,7 +364,7 @@ int32_t i18n_uset_to_pattern (const i18n_uset_h set, i18n_uchar *result, int32_t * * @see i18n_uset_contains() */ -int i18n_uset_add (i18n_uset_h set, i18n_uchar32 character); +int i18n_uset_add(i18n_uset_h set, i18n_uchar32 character); /** @@ -383,7 +383,7 @@ int i18n_uset_add (i18n_uset_h set, i18n_uchar32 character); * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_uset_add_all (i18n_uset_h set, const i18n_uset_h additional_set); +int i18n_uset_add_all(i18n_uset_h set, const i18n_uset_h additional_set); /** * @brief Adds the given range of characters to the given #i18n_uset_h. After this call, @@ -400,7 +400,7 @@ int i18n_uset_add_all (i18n_uset_h set, const i18n_uset_h additional_set); * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_uset_contains() */ -int i18n_uset_add_range (i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end); +int i18n_uset_add_range(i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end); /** * @brief Adds the given string to the given #i18n_uset_h. @@ -417,7 +417,7 @@ int i18n_uset_add_range (i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end); * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_uset_contains_string() */ -int i18n_uset_add_string (i18n_uset_h set, const i18n_uchar *str, int32_t str_len); +int i18n_uset_add_string(i18n_uset_h set, const i18n_uchar *str, int32_t str_len); /** * @brief Adds each of the characters in this string to the set. Thus "ch" => {"c", "h"} @@ -433,7 +433,7 @@ int i18n_uset_add_string (i18n_uset_h set, const i18n_uchar *str, int32_t str_le * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_uset_add_all_code_points (i18n_uset_h set, const i18n_uchar *str, int32_t str_len); +int i18n_uset_add_all_code_points(i18n_uset_h set, const i18n_uchar *str, int32_t str_len); /** * @brief Removes the given @a character from the given #i18n_uset_h. @@ -450,7 +450,7 @@ int i18n_uset_add_all_code_points (i18n_uset_h set, const i18n_uchar *str, int32 * * @see i18n_uset_contains() */ -int i18n_uset_remove (i18n_uset_h set, i18n_uchar32 character); +int i18n_uset_remove(i18n_uset_h set, i18n_uchar32 character); /** * @brief Removes the given range of characters from the given #i18n_uset_h. @@ -467,7 +467,7 @@ int i18n_uset_remove (i18n_uset_h set, i18n_uchar32 character); * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_uset_contains() */ -int i18n_uset_remove_range (i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end); +int i18n_uset_remove_range(i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end); /** * @brief Removes the given string to the given #i18n_uset_h. @@ -484,7 +484,7 @@ int i18n_uset_remove_range (i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 en * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_uset_contains_string() */ -int i18n_uset_remove_string (i18n_uset_h set, const i18n_uchar *str, int32_t str_len); +int i18n_uset_remove_string(i18n_uset_h set, const i18n_uchar *str, int32_t str_len); /** * @brief Removes from this set all of its elements that are contained in the specified set. @@ -501,7 +501,7 @@ int i18n_uset_remove_string (i18n_uset_h set, const i18n_uchar *str, int32_t str * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_uset_remove_all (i18n_uset_h set, const i18n_uset_h remove_set); +int i18n_uset_remove_all(i18n_uset_h set, const i18n_uset_h remove_set); /** * @brief Retains only the elements in this set that are contained in the specified range. @@ -520,7 +520,7 @@ int i18n_uset_remove_all (i18n_uset_h set, const i18n_uset_h remove_set); * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_uset_retain (i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end); +int i18n_uset_retain(i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end); /** * @brief Retains only the elements in this set that are contained in the @@ -539,7 +539,7 @@ int i18n_uset_retain (i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end); * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_uset_retain_all (i18n_uset_h set, const i18n_uset_h retain); +int i18n_uset_retain_all(i18n_uset_h set, const i18n_uset_h retain); /** * @brief Reallocates this objects internal structures to take up the least @@ -553,7 +553,7 @@ int i18n_uset_retain_all (i18n_uset_h set, const i18n_uset_h retain); * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_uset_compact (i18n_uset_h set); +int i18n_uset_compact(i18n_uset_h set); /** * @brief Inverts this set. This operation modifies this set so that @@ -569,7 +569,7 @@ int i18n_uset_compact (i18n_uset_h set); * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_uset_complement (i18n_uset_h set); +int i18n_uset_complement(i18n_uset_h set); /** * @brief Complements in this set all elements contained in the specified set. @@ -586,7 +586,7 @@ int i18n_uset_complement (i18n_uset_h set); * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_uset_complement_all (i18n_uset_h set, const i18n_uset_h complement); +int i18n_uset_complement_all(i18n_uset_h set, const i18n_uset_h complement); /** * @brief Removes all of the elements from this set. @@ -600,7 +600,7 @@ int i18n_uset_complement_all (i18n_uset_h set, const i18n_uset_h complement); * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_uset_clear (i18n_uset_h set); +int i18n_uset_clear(i18n_uset_h set); /** * @brief Closes this set over the given attribute. @@ -633,7 +633,7 @@ int i18n_uset_clear (i18n_uset_h set); * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ustring_fold_case() */ -int i18n_uset_destroy_over (i18n_uset_h set, int32_t attributes); +int i18n_uset_destroy_over(i18n_uset_h set, int32_t attributes); /** * @brief Removes all strings from this set. @@ -645,7 +645,7 @@ int i18n_uset_destroy_over (i18n_uset_h set, int32_t attributes); * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_uset_remove_all_strings (i18n_uset_h set); +int i18n_uset_remove_all_strings(i18n_uset_h set); /** * @brief Returns true if the given #i18n_uset_h contains no characters and no @@ -661,7 +661,7 @@ int i18n_uset_remove_all_strings (i18n_uset_h set); * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_ubool i18n_uset_is_empty (const i18n_uset_h set); +i18n_ubool i18n_uset_is_empty(const i18n_uset_h set); /** * @brief Returns @c true if the given #i18n_uset_h contains the given @a character. @@ -678,7 +678,7 @@ i18n_ubool i18n_uset_is_empty (const i18n_uset_h set); * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_ubool i18n_uset_contains (const i18n_uset_h set, i18n_uchar32 character); +i18n_ubool i18n_uset_contains(const i18n_uset_h set, i18n_uchar32 character); /** * @brief Returns true if the given #i18n_uset_h contains all characters c @@ -696,7 +696,7 @@ i18n_ubool i18n_uset_contains (const i18n_uset_h set, i18n_uchar32 character); * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_ubool i18n_uset_contains_range (const i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end); +i18n_ubool i18n_uset_contains_range(const i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end); /** * @brief Returns true if the given #i18n_uset_h contains the given string. @@ -713,7 +713,7 @@ i18n_ubool i18n_uset_contains_range (const i18n_uset_h set, i18n_uchar32 start, * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_ubool i18n_uset_contains_string (const i18n_uset_h set, const i18n_uchar *str, int32_t str_len); +i18n_ubool i18n_uset_contains_string(const i18n_uset_h set, const i18n_uchar *str, int32_t str_len); /** * @brief Returns the index of the given @a character within this @a set, where @@ -732,7 +732,7 @@ i18n_ubool i18n_uset_contains_string (const i18n_uset_h set, const i18n_uchar *s * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_uset_index_of (const i18n_uset_h set, i18n_uchar32 character); +int32_t i18n_uset_index_of(const i18n_uset_h set, i18n_uchar32 character); /** * @brief Returns the character at the given index within this set, where @@ -751,7 +751,7 @@ int32_t i18n_uset_index_of (const i18n_uset_h set, i18n_uchar32 character); * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar32 i18n_uset_char_at (const i18n_uset_h set, int32_t char_index); +i18n_uchar32 i18n_uset_char_at(const i18n_uset_h set, int32_t char_index); /** * @brief Returns the number of characters and strings contained in the given #i18n_uset_h. @@ -767,7 +767,7 @@ i18n_uchar32 i18n_uset_char_at (const i18n_uset_h set, int32_t char_index); * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_uset_size (const i18n_uset_h set); +int32_t i18n_uset_size(const i18n_uset_h set); /** * @brief Returns the number of items in this set. @@ -784,7 +784,7 @@ int32_t i18n_uset_size (const i18n_uset_h set); * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_uset_get_item_count (const i18n_uset_h set); +int32_t i18n_uset_get_item_count(const i18n_uset_h set); /** * @brief Returns an item of this set. @@ -809,7 +809,7 @@ int32_t i18n_uset_get_item_count (const i18n_uset_h set); * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_uset_get_item (const i18n_uset_h set, int32_t item_index, i18n_uchar32 *start, i18n_uchar32 *end, i18n_uchar *str, int32_t str_capacity); +int32_t i18n_uset_get_item(const i18n_uset_h set, int32_t item_index, i18n_uchar32 *start, i18n_uchar32 *end, i18n_uchar *str, int32_t str_capacity); /** * @brief Returns true if set1 contains all the characters and strings of set2. It answers the question, 'Is set1 a superset of set2?' @@ -825,7 +825,7 @@ int32_t i18n_uset_get_item (const i18n_uset_h set, int32_t item_index, i18n_ucha * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_ubool i18n_uset_contains_all (const i18n_uset_h set1, const i18n_uset_h set2); +i18n_ubool i18n_uset_contains_all(const i18n_uset_h set1, const i18n_uset_h set2); /** * @brief Returns true if this set contains all the characters of the given string. @@ -844,7 +844,7 @@ i18n_ubool i18n_uset_contains_all (const i18n_uset_h set1, const i18n_uset_h set * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_ubool i18n_uset_contains_all_code_points (const i18n_uset_h set, const i18n_uchar *str, int32_t str_len); +i18n_ubool i18n_uset_contains_all_code_points(const i18n_uset_h set, const i18n_uchar *str, int32_t str_len); /** * @brief Returns true if set1 contains none of the characters and strings of set2. @@ -861,7 +861,7 @@ i18n_ubool i18n_uset_contains_all_code_points (const i18n_uset_h set, const i18n * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_ubool i18n_uset_contains_none (const i18n_uset_h set1, const i18n_uset_h set2); +i18n_ubool i18n_uset_contains_none(const i18n_uset_h set1, const i18n_uset_h set2); /** * @brief Returns true if set1 contains some of the characters and strings of set2. @@ -878,7 +878,7 @@ i18n_ubool i18n_uset_contains_none (const i18n_uset_h set1, const i18n_uset_h se * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_ubool i18n_uset_contains_some (const i18n_uset_h set1, const i18n_uset_h set2); +i18n_ubool i18n_uset_contains_some(const i18n_uset_h set1, const i18n_uset_h set2); /** * @brief Returns the length of the initial substring of the input string which @@ -907,7 +907,7 @@ i18n_ubool i18n_uset_contains_some (const i18n_uset_h set1, const i18n_uset_h se * * @see #i18n_uset_span_condition_e */ -int32_t i18n_uset_span (const i18n_uset_h set, const i18n_uchar *str, int32_t length, i18n_uset_span_condition_e span_condition); +int32_t i18n_uset_span(const i18n_uset_h set, const i18n_uchar *str, int32_t length, i18n_uset_span_condition_e span_condition); /** * @brief Returns the start of the trailing substring of the input string which @@ -935,7 +935,7 @@ int32_t i18n_uset_span (const i18n_uset_h set, const i18n_uchar *str, int32_t le * * @see #i18n_uset_span_condition_e */ -int32_t i18n_uset_span_back (const i18n_uset_h set, const i18n_uchar *str, int32_t length, i18n_uset_span_condition_e span_condition); +int32_t i18n_uset_span_back(const i18n_uset_h set, const i18n_uchar *str, int32_t length, i18n_uset_span_condition_e span_condition); /** * @brief Returns the length of the initial substring of the input string which @@ -964,7 +964,7 @@ int32_t i18n_uset_span_back (const i18n_uset_h set, const i18n_uchar *str, int32 * * @see #i18n_uset_span_condition_e */ -int32_t i18n_uset_span_utf8 (const i18n_uset_h set, const char *str, int32_t length, i18n_uset_span_condition_e span_condition); +int32_t i18n_uset_span_utf8(const i18n_uset_h set, const char *str, int32_t length, i18n_uset_span_condition_e span_condition); /** * @brief Returns the start of the trailing substring of the input string which @@ -992,7 +992,7 @@ int32_t i18n_uset_span_utf8 (const i18n_uset_h set, const char *str, int32_t len * * @see #i18n_uset_span_condition_e */ -int32_t i18n_uset_span_back_utf8 (const i18n_uset_h set, const char *str, int32_t length, i18n_uset_span_condition_e span_condition); +int32_t i18n_uset_span_back_utf8(const i18n_uset_h set, const char *str, int32_t length, i18n_uset_span_condition_e span_condition); /** * @brief Returns true if set1 contains all of the characters and strings @@ -1009,7 +1009,7 @@ int32_t i18n_uset_span_back_utf8 (const i18n_uset_h set, const char *str, int32_ * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_ubool i18n_uset_equals (const i18n_uset_h set1, const i18n_uset_h set2); +i18n_ubool i18n_uset_equals(const i18n_uset_h set1, const i18n_uset_h set2); /********************************************************************* * Serialized set API @@ -1070,7 +1070,7 @@ i18n_ubool i18n_uset_equals (const i18n_uset_h set1, const i18n_uset_h set2); * @exception #I18N_ERROR_INDEX_OUTOFBOUNDS If n+2*m > 0x7FFF * @exception #I18N_ERROR_BUFFER_OVERFLOW If n+2*m+(m != 0 ? 2 : 1) > dest_capacity. */ -int32_t i18n_uset_serialize (const i18n_uset_h set, uint16_t *dest, int32_t dest_capacity); +int32_t i18n_uset_serialize(const i18n_uset_h set, uint16_t *dest, int32_t dest_capacity); /** * @brief Given a serialized array, fill in the given serialized set object. @@ -1089,7 +1089,7 @@ int32_t i18n_uset_serialize (const i18n_uset_h set, uint16_t *dest, int32_t dest * * @see #i18n_userialized_set_s */ -i18n_ubool i18n_uset_get_serialized_set (const uint16_t *src, int32_t src_length, i18n_userialized_set_s* fill_set); +i18n_ubool i18n_uset_get_serialized_set(const uint16_t *src, int32_t src_length, i18n_userialized_set_s* fill_set); /** * @brief Sets the #i18n_userialized_set_s to contain the given @a character (and nothing else). @@ -1104,7 +1104,7 @@ i18n_ubool i18n_uset_get_serialized_set (const uint16_t *src, int32_t src_length * * @see #i18n_userialized_set_s */ -int i18n_uset_set_serialized_to_one (i18n_uchar32 character, i18n_userialized_set_s* fill_set); +int i18n_uset_set_serialized_to_one(i18n_uchar32 character, i18n_userialized_set_s* fill_set); /** * @brief Returns @c true if the given #i18n_userialized_set_s contains the given @a character. @@ -1121,7 +1121,7 @@ int i18n_uset_set_serialized_to_one (i18n_uchar32 character, i18n_userialized_se * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see #i18n_userialized_set_s */ -i18n_ubool i18n_uset_serialized_contains (const i18n_userialized_set_s* set, i18n_uchar32 character); +i18n_ubool i18n_uset_serialized_contains(const i18n_userialized_set_s* set, i18n_uchar32 character); /** * @brief Returns the number of disjoint ranges of characters contained in @@ -1139,7 +1139,7 @@ i18n_ubool i18n_uset_serialized_contains (const i18n_userialized_set_s* set, i18 * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see #i18n_userialized_set_s */ -int32_t i18n_uset_get_serialized_range_count (const i18n_userialized_set_s* set); +int32_t i18n_uset_get_serialized_range_count(const i18n_userialized_set_s* set); /** * @brief Returns a range of characters contained in the given serialized set. @@ -1161,7 +1161,7 @@ int32_t i18n_uset_get_serialized_range_count (const i18n_userialized_set_s* set) * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see #i18n_userialized_set_s */ -i18n_ubool i18n_uset_get_serialized_range (const i18n_userialized_set_s* set, int32_t range_index, i18n_uchar32 *p_start, i18n_uchar32 *p_end); +i18n_ubool i18n_uset_get_serialized_range(const i18n_userialized_set_s* set, int32_t range_index, i18n_uchar32 *p_start, i18n_uchar32 *p_end); /** * @} diff --git a/src/include/mobile/utils_i18n_ustring.h b/src/include/mobile/utils_i18n_ustring.h index dba29a0..71cbf4e 100644 --- a/src/include/mobile/utils_i18n_ustring.h +++ b/src/include/mobile/utils_i18n_ustring.h @@ -83,7 +83,7 @@ extern "C" { * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ustring_get_length ( const i18n_uchar *s ); +int32_t i18n_ustring_get_length(const i18n_uchar *s); /** * @brief Counts Unicode code points in the length #i18n_uchar code units of the string. @@ -101,7 +101,7 @@ int32_t i18n_ustring_get_length ( const i18n_uchar *s ); * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ustring_count_char32 ( const i18n_uchar *s, int32_t length ); +int32_t i18n_ustring_count_char32(const i18n_uchar *s, int32_t length); /** * @brief Checks if the string contains more Unicode code points than a certain number. @@ -122,7 +122,7 @@ int32_t i18n_ustring_count_char32 ( const i18n_uchar *s, int32_t length ); * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_ubool i18n_ustring_has_more_char32_than ( const i18n_uchar *s, int32_t length, int32_t number ); +i18n_ubool i18n_ustring_has_more_char32_than(const i18n_uchar *s, int32_t length, int32_t number); /** * @brief Concatenates two ustrings. @@ -139,7 +139,7 @@ i18n_ubool i18n_ustring_has_more_char32_than ( const i18n_uchar *s, int32_t leng * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_cat ( i18n_uchar *dest, const i18n_uchar *src ); +i18n_uchar* i18n_ustring_cat(i18n_uchar *dest, const i18n_uchar *src); /** * @brief Concatenate two ustrings. @@ -157,7 +157,7 @@ i18n_uchar* i18n_ustring_cat ( i18n_uchar *dest, const i18n_uchar *src ); * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_cat_n ( i18n_uchar *dest, const i18n_uchar *src, int32_t n ); +i18n_uchar* i18n_ustring_cat_n(i18n_uchar *dest, const i18n_uchar *src, int32_t n); /** * @brief Finds the first occurrence of a substring in a string. @@ -182,7 +182,7 @@ i18n_uchar* i18n_ustring_cat_n ( i18n_uchar *dest, const i18n_uchar *src, int32_ * @see i18n_ustring_find_first() * @see i18n_ustring_find_last() */ -i18n_uchar* i18n_ustring_string ( const i18n_uchar *s, const i18n_uchar *sub_string ); +i18n_uchar* i18n_ustring_string(const i18n_uchar *s, const i18n_uchar *sub_string); /** * @brief Finds the first occurrence of a substring in a string. @@ -208,7 +208,7 @@ i18n_uchar* i18n_ustring_string ( const i18n_uchar *s, const i18n_uchar *sub_str * @see i18n_ustring_string() * @see i18n_ustring_find_last() */ -i18n_uchar* i18n_ustring_find_first ( const i18n_uchar *s, int32_t length, const i18n_uchar *sub_string, int32_t sub_length ); +i18n_uchar* i18n_ustring_find_first(const i18n_uchar *s, int32_t length, const i18n_uchar *sub_string, int32_t sub_length); /** * @brief Finds the first occurrence of a BMP code point in a string. @@ -229,7 +229,7 @@ i18n_uchar* i18n_ustring_find_first ( const i18n_uchar *s, int32_t length, const * @see i18n_ustring_string() * @see i18n_ustring_find_first() */ -i18n_uchar* i18n_ustring_char ( const i18n_uchar *s, i18n_uchar c ); +i18n_uchar* i18n_ustring_char(const i18n_uchar *s, i18n_uchar c); /** * @brief Finds the first occurrence of a code point in a string. @@ -250,7 +250,7 @@ i18n_uchar* i18n_ustring_char ( const i18n_uchar *s, i18n_uchar c ); * @see i18n_ustring_string() * @see i18n_ustring_find_first() */ -i18n_uchar* i18n_ustring_char32 ( const i18n_uchar *s, i18n_uchar32 c ); +i18n_uchar* i18n_ustring_char32(const i18n_uchar *s, i18n_uchar32 c); /** * @brief Finds the last occurrence of a substring in a string. @@ -273,7 +273,7 @@ i18n_uchar* i18n_ustring_char32 ( const i18n_uchar *s, i18n_uchar32 c ); * @see i18n_ustring_find_first() * @see i18n_ustring_find_last() */ -i18n_uchar* i18n_ustring_r_string ( const i18n_uchar *s, const i18n_uchar *sub_string ); +i18n_uchar* i18n_ustring_r_string(const i18n_uchar *s, const i18n_uchar *sub_string); /** * @brief Finds the last occurrence of a substring in a string. @@ -297,7 +297,7 @@ i18n_uchar* i18n_ustring_r_string ( const i18n_uchar *s, const i18n_uchar *sub_s * @see i18n_ustring_string() * @see i18n_ustring_find_first() */ -i18n_uchar* i18n_ustring_find_last( const i18n_uchar *s, int32_t length, const i18n_uchar *sub_string, int32_t sub_length ); +i18n_uchar* i18n_ustring_find_last(const i18n_uchar *s, int32_t length, const i18n_uchar *sub_string, int32_t sub_length); /** * @brief Finds the last occurrence of a BMP code point in a string. @@ -318,7 +318,7 @@ i18n_uchar* i18n_ustring_find_last( const i18n_uchar *s, int32_t length, const i * @see i18n_ustring_string() * @see i18n_ustring_find_first() */ -i18n_uchar* i18n_ustring_r_char ( const i18n_uchar *s, i18n_uchar c ); +i18n_uchar* i18n_ustring_r_char(const i18n_uchar *s, i18n_uchar c); /** * @brief Finds the last occurrence of a code point in a string. @@ -339,7 +339,7 @@ i18n_uchar* i18n_ustring_r_char ( const i18n_uchar *s, i18n_uchar c ); * @see i18n_ustring_string() * @see i18n_ustring_find_first() */ -i18n_uchar* i18n_ustring_r_char32 ( const i18n_uchar *s, i18n_uchar32 c ); +i18n_uchar* i18n_ustring_r_char32(const i18n_uchar *s, i18n_uchar32 c); /** * @brief Locates the first occurrence in the string of any of the characters in the string matchSet. @@ -356,7 +356,7 @@ i18n_uchar* i18n_ustring_r_char32 ( const i18n_uchar *s, i18n_uchar32 c ); * @return A pointer to the character in @a string that matches one of the * characters in @a match_set, or NULL if no such character is found. */ -i18n_uchar* i18n_ustring_pbrk ( const i18n_uchar *string, const i18n_uchar *match_set ); +i18n_uchar* i18n_ustring_pbrk(const i18n_uchar *string, const i18n_uchar *match_set); /** * @brief Returns the number of consecutive characters in string, beginning with the first, that do not occur somewhere in match_set. @@ -373,7 +373,7 @@ i18n_uchar* i18n_ustring_pbrk ( const i18n_uchar *string, const i18n_uchar *matc * @return The number of initial characters in @a string that do not * occur in @a match_set. */ -int32_t i18n_ustring_cspn ( const i18n_uchar *string, const i18n_uchar *match_set ); +int32_t i18n_ustring_cspn(const i18n_uchar *string, const i18n_uchar *match_set); /** * @brief Returns the number of consecutive characters in string, beginning with the first, that occur somewhere in match_set. @@ -390,7 +390,7 @@ int32_t i18n_ustring_cspn ( const i18n_uchar *string, const i18n_uchar *match_se * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ustring_spn() */ -int32_t i18n_ustring_spn ( const i18n_uchar *string, const i18n_uchar *match_set ); +int32_t i18n_ustring_spn(const i18n_uchar *string, const i18n_uchar *match_set); /** * @brief The string tokenizer API allows an application to break a string into tokens. @@ -408,7 +408,7 @@ int32_t i18n_ustring_spn ( const i18n_uchar *string, const i18n_uchar *match_set * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_tokenizer_r ( i18n_uchar *src, const i18n_uchar *delim, i18n_uchar **save_state ); +i18n_uchar* i18n_ustring_tokenizer_r(i18n_uchar *src, const i18n_uchar *delim, i18n_uchar **save_state); /** * @brief Compares two Unicode strings for bitwise equality (code unit order). @@ -424,7 +424,7 @@ i18n_uchar* i18n_ustring_tokenizer_r ( i18n_uchar *src, const i18n_uchar *delim, * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ustring_compare ( const i18n_uchar *s1, const i18n_uchar *s2 ); +int32_t i18n_ustring_compare(const i18n_uchar *s1, const i18n_uchar *s2); /** * @brief Compare two Unicode strings in code point order. @@ -441,7 +441,7 @@ int32_t i18n_ustring_compare ( const i18n_uchar *s1, const i18n_uchar *s2 ); * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ustring_compare_code_point_order( const i18n_uchar *s1, const i18n_uchar *s2 ); +int32_t i18n_ustring_compare_code_point_order(const i18n_uchar *s1, const i18n_uchar *s2); /** * @brief Compare two Unicode strings (binary order). @@ -463,7 +463,7 @@ int32_t i18n_ustring_compare_code_point_order( const i18n_uchar *s1, const i18n_ * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ustring_compare_binary_order( const i18n_uchar *s1, int32_t length1, const i18n_uchar *s2, int32_t length2, i18n_ubool code_point_order ); +int32_t i18n_ustring_compare_binary_order(const i18n_uchar *s1, int32_t length1, const i18n_uchar *s2, int32_t length2, i18n_ubool code_point_order); /** * @brief Compare two strings case-insensitively using full case folding. @@ -488,7 +488,7 @@ int32_t i18n_ustring_compare_binary_order( const i18n_uchar *s1, int32_t length1 * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ustring_case_compare_with_length( const i18n_uchar *s1, int32_t length1, const i18n_uchar *s2, int32_t length2, uint32_t options, i18n_error_code_e *error_code ); +int32_t i18n_ustring_case_compare_with_length(const i18n_uchar *s1, int32_t length1, const i18n_uchar *s2, int32_t length2, uint32_t options, i18n_error_code_e *error_code); /** * @brief Compare two ustrings for bitwise equality. @@ -506,7 +506,7 @@ int32_t i18n_ustring_case_compare_with_length( const i18n_uchar *s1, int32_t len * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ustring_compare_n( const i18n_uchar *s1, const i18n_uchar *s2, int32_t n ); +int32_t i18n_ustring_compare_n(const i18n_uchar *s1, const i18n_uchar *s2, int32_t n); /** * @brief Compare two Unicode strings in code point order. @@ -524,7 +524,7 @@ int32_t i18n_ustring_compare_n( const i18n_uchar *s1, const i18n_uchar *s2, int3 * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ustring_compare_n_code_point_order( const i18n_uchar *s1, const i18n_uchar *s2, int32_t n ); +int32_t i18n_ustring_compare_n_code_point_order(const i18n_uchar *s1, const i18n_uchar *s2, int32_t n); /** * @brief Compare two strings case-insensitively using full case folding. @@ -542,7 +542,7 @@ int32_t i18n_ustring_compare_n_code_point_order( const i18n_uchar *s1, const i18 * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ustring_case_compare( const i18n_uchar *s1, const i18n_uchar *s2, uint32_t options ); +int32_t i18n_ustring_case_compare(const i18n_uchar *s1, const i18n_uchar *s2, uint32_t options); /** * @brief Compare two strings case-insensitively using full case folding. @@ -561,7 +561,7 @@ int32_t i18n_ustring_case_compare( const i18n_uchar *s1, const i18n_uchar *s2, u * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ustring_case_compare_n( const i18n_uchar *s1, const i18n_uchar *s2, int32_t n, uint32_t options ); +int32_t i18n_ustring_case_compare_n(const i18n_uchar *s1, const i18n_uchar *s2, int32_t n, uint32_t options); /** * @brief Compare two strings case-insensitively using full case folding. @@ -580,7 +580,7 @@ int32_t i18n_ustring_case_compare_n( const i18n_uchar *s1, const i18n_uchar *s2, * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ustring_mem_case_compare( const i18n_uchar *s1, const i18n_uchar *s2, int32_t length, uint32_t options ); +int32_t i18n_ustring_mem_case_compare(const i18n_uchar *s1, const i18n_uchar *s2, int32_t length, uint32_t options); /** * @brief Copies a ustring. Adds a NULL terminator. @@ -595,7 +595,7 @@ int32_t i18n_ustring_mem_case_compare( const i18n_uchar *s1, const i18n_uchar *s * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_copy ( i18n_uchar *dest, const i18n_uchar *src ); +i18n_uchar* i18n_ustring_copy(i18n_uchar *dest, const i18n_uchar *src); /** * @brief Copies a ustring. @@ -613,7 +613,7 @@ i18n_uchar* i18n_ustring_copy ( i18n_uchar *dest, const i18n_uchar *src ); * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_copy_n ( i18n_uchar *dest, const i18n_uchar *src, int32_t n ); +i18n_uchar* i18n_ustring_copy_n(i18n_uchar *dest, const i18n_uchar *src, int32_t n); /** * @brief Copies a byte string encoded in the default codepage to a ustring. @@ -629,7 +629,7 @@ i18n_uchar* i18n_ustring_copy_n ( i18n_uchar *dest, const i18n_uchar *src, int32 * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_copy_ua ( i18n_uchar *dest, const char *src ); +i18n_uchar* i18n_ustring_copy_ua(i18n_uchar *dest, const char *src); /** * @brief Copies a byte string encoded in the default codepage to a ustring. @@ -648,7 +648,7 @@ i18n_uchar* i18n_ustring_copy_ua ( i18n_uchar *dest, const char *src ); * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_copy_ua_n ( i18n_uchar *dest, const char *src, int32_t n ); +i18n_uchar* i18n_ustring_copy_ua_n(i18n_uchar *dest, const char *src, int32_t n); /** * @brief Copies a ustring to a byte string encoded in the default codepage. @@ -664,7 +664,7 @@ i18n_uchar* i18n_ustring_copy_ua_n ( i18n_uchar *dest, const char *src, int32_t * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -char* i18n_ustring_copy_au ( char *dest, const i18n_uchar *src ); +char* i18n_ustring_copy_au(char *dest, const i18n_uchar *src); /** * @brief Copies a ustring to a byte string encoded in the default codepage. @@ -683,7 +683,7 @@ char* i18n_ustring_copy_au ( char *dest, const i18n_uchar *src ); * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -char* i18n_ustring_copy_au_n ( char *dest, const i18n_uchar *src, int32_t n ); +char* i18n_ustring_copy_au_n(char *dest, const i18n_uchar *src, int32_t n); /** * @brief Synonym for memcpy(), but with #i18n_uchar characters only. @@ -699,7 +699,7 @@ char* i18n_ustring_copy_au_n ( char *dest, const i18n_uchar *src, int32_t n ); * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_mem_copy ( i18n_uchar *dest, const i18n_uchar *src, int32_t count ); +i18n_uchar* i18n_ustring_mem_copy(i18n_uchar *dest, const i18n_uchar *src, int32_t count); /** * @brief Synonym for memmove(), but with #i18n_uchar characters only. @@ -715,7 +715,7 @@ i18n_uchar* i18n_ustring_mem_copy ( i18n_uchar *dest, const i18n_uchar *src, int * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_mem_move ( i18n_uchar *dest, const i18n_uchar *src, int32_t count ); +i18n_uchar* i18n_ustring_mem_move(i18n_uchar *dest, const i18n_uchar *src, int32_t count); /** * @brief Initialize count characters of dest to c. @@ -731,7 +731,7 @@ i18n_uchar* i18n_ustring_mem_move ( i18n_uchar *dest, const i18n_uchar *src, int * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_mem_set ( i18n_uchar *dest, const i18n_uchar c, int32_t count ); +i18n_uchar* i18n_ustring_mem_set(i18n_uchar *dest, const i18n_uchar c, int32_t count); /** * @brief Compare the first count #i18n_uchar characters of each buffer. @@ -748,7 +748,7 @@ i18n_uchar* i18n_ustring_mem_set ( i18n_uchar *dest, const i18n_uchar c, int32_t * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ustring_mem_compare ( const i18n_uchar *buf1, const i18n_uchar *buf2, int32_t count ); +int32_t i18n_ustring_mem_compare(const i18n_uchar *buf1, const i18n_uchar *buf2, int32_t count); /** * @brief Compare two Unicode strings in code point order. @@ -766,7 +766,7 @@ int32_t i18n_ustring_mem_compare ( const i18n_uchar *buf1, const i18n_uchar *buf * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ustring_mem_compare_code_point_order ( const i18n_uchar *s1, const i18n_uchar *s2, int32_t count ); +int32_t i18n_ustring_mem_compare_code_point_order(const i18n_uchar *s1, const i18n_uchar *s2, int32_t count); /** * @brief Finds the first occurrence of a BMP code point in a string. @@ -786,7 +786,7 @@ int32_t i18n_ustring_mem_compare_code_point_order ( const i18n_uchar *s1, const * @see i18n_ustring_mem_char32() * @see i18n_ustring_find_first() */ -i18n_uchar* i18n_ustring_mem_char ( const i18n_uchar *s, i18n_uchar c, int32_t count ); +i18n_uchar* i18n_ustring_mem_char(const i18n_uchar *s, i18n_uchar c, int32_t count); /** * @brief Finds the first occurrence of a code point in a string. @@ -803,7 +803,7 @@ i18n_uchar* i18n_ustring_mem_char ( const i18n_uchar *s, i18n_uchar c, int32_t c * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_mem_char32 ( const i18n_uchar *s, i18n_uchar32 c, int32_t count ); +i18n_uchar* i18n_ustring_mem_char32(const i18n_uchar *s, i18n_uchar32 c, int32_t count); /** * @brief Finds the last occurrence of a BMP code point in a string. @@ -823,7 +823,7 @@ i18n_uchar* i18n_ustring_mem_char32 ( const i18n_uchar *s, i18n_uchar32 c, int32 * @see #i18n_ustring_mem_r_char32 * @see #i18n_ustring_find_last */ -i18n_uchar* i18n_ustring_mem_r_char ( const i18n_uchar *s, i18n_uchar c, int32_t count ); +i18n_uchar* i18n_ustring_mem_r_char(const i18n_uchar *s, i18n_uchar c, int32_t count); /** * @brief Finds the last occurrence of a code point in a string. @@ -843,7 +843,7 @@ i18n_uchar* i18n_ustring_mem_r_char ( const i18n_uchar *s, i18n_uchar c, int32_t * @see #i18n_ustring_mem_r_char * @see #i18n_ustring_find_last */ -i18n_uchar* i18n_ustring_mem_r_char32 ( const i18n_uchar *s, i18n_uchar32 c, int32_t count ); +i18n_uchar* i18n_ustring_mem_r_char32(const i18n_uchar *s, i18n_uchar32 c, int32_t count); /** * @brief Unescape a string of characters and write the resulting Unicode characters to the destination buffer. @@ -866,7 +866,7 @@ i18n_uchar* i18n_ustring_mem_r_char32 ( const i18n_uchar *s, i18n_uchar32 c, int * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ustring_unescape_at() */ -int32_t i18n_ustring_unescape ( const char *src, i18n_uchar *dest, int32_t dest_capacity ); +int32_t i18n_ustring_unescape(const char *src, i18n_uchar *dest, int32_t dest_capacity); /** * @brief Unescape a single sequence. @@ -890,7 +890,7 @@ int32_t i18n_ustring_unescape ( const char *src, i18n_uchar *dest, int32_t dest_ * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ustring_unescape() */ -i18n_uchar32 i18n_ustring_unescape_at ( i18n_ustring_unescape_char_at_cb char_at, int32_t *offset, int32_t length, void *context ); +i18n_uchar32 i18n_ustring_unescape_at(i18n_ustring_unescape_char_at_cb char_at, int32_t *offset, int32_t length, void *context); /** * @brief Uppercases the characters in a string. @@ -915,7 +915,7 @@ i18n_uchar32 i18n_ustring_unescape_at ( i18n_ustring_unescape_char_at_cb char_at * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ustring_to_upper ( i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, const char *locale, i18n_error_code_e *error_code ); +int32_t i18n_ustring_to_upper(i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, const char *locale, i18n_error_code_e *error_code); /** * @brief Lowercase the characters in a string. @@ -938,7 +938,7 @@ int32_t i18n_ustring_to_upper ( i18n_uchar *dest, int32_t dest_capacity, const i * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ustring_to_lower ( i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, const char *locale, i18n_error_code_e *error_code ); +int32_t i18n_ustring_to_lower(i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, const char *locale, i18n_error_code_e *error_code); /** * @brief Titlecases a string. @@ -977,8 +977,8 @@ int32_t i18n_ustring_to_lower ( i18n_uchar *dest, int32_t dest_capacity, const i * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ustring_to_title ( i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, i18n_ubreak_iterator_s *title_iter, - const char *locale, i18n_error_code_e *error_code ); +int32_t i18n_ustring_to_title(i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, i18n_ubreak_iterator_s *title_iter, + const char *locale, i18n_error_code_e *error_code); /** * @brief Titlecases a string. @@ -1018,7 +1018,7 @@ int32_t i18n_ustring_to_title ( i18n_uchar *dest, int32_t dest_capacity, const i * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ustring_to_title() */ -int32_t i18n_ustring_to_title_new ( i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, i18n_ubreak_iterator_h title_iter, const char *locale); +int32_t i18n_ustring_to_title_new(i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, i18n_ubreak_iterator_h title_iter, const char *locale); /** * @brief Case-folds the characters in a string. @@ -1043,7 +1043,7 @@ int32_t i18n_ustring_to_title_new ( i18n_uchar *dest, int32_t dest_capacity, con * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ustring_fold_case ( i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, uint32_t options, i18n_error_code_e *error_code ); +int32_t i18n_ustring_fold_case(i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, uint32_t options, i18n_error_code_e *error_code); /** * @brief Convert a UTF-16 string to a wchar_t string. @@ -1065,7 +1065,7 @@ int32_t i18n_ustring_fold_case ( i18n_uchar *dest, int32_t dest_capacity, const * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -wchar_t* i18n_ustring_to_WCS ( wchar_t *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_error_code_e *error_code ); +wchar_t* i18n_ustring_to_WCS(wchar_t *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_error_code_e *error_code); /** * @brief Convert a wchar_t string to UTF-16. @@ -1087,7 +1087,7 @@ wchar_t* i18n_ustring_to_WCS ( wchar_t *dest, int32_t dest_capacity, int32_t *de * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_from_WCS ( i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const wchar_t *src, int32_t src_len, i18n_error_code_e *error_code ); +i18n_uchar* i18n_ustring_from_WCS(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const wchar_t *src, int32_t src_len, i18n_error_code_e *error_code); /** * @brief Converts a UTF-16 string to UTF-8. @@ -1113,7 +1113,7 @@ i18n_uchar* i18n_ustring_from_WCS ( i18n_uchar *dest, int32_t dest_capacity, int * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ustring_from_UTF8() */ -char* i18n_ustring_to_UTF8 ( char *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_error_code_e *error_code ); +char* i18n_ustring_to_UTF8(char *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_error_code_e *error_code); /** * @brief Converts a UTF-8 string to UTF-16. @@ -1138,7 +1138,7 @@ char* i18n_ustring_to_UTF8 ( char *dest, int32_t dest_capacity, int32_t *dest_le * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_from_UTF8 ( i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const char *src, int32_t src_len, i18n_error_code_e *error_code ); +i18n_uchar* i18n_ustring_from_UTF8(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const char *src, int32_t src_len, i18n_error_code_e *error_code); /** * @brief Convert a UTF-16 string to UTF-8. @@ -1169,7 +1169,7 @@ i18n_uchar* i18n_ustring_from_UTF8 ( i18n_uchar *dest, int32_t dest_capacity, in * @see i18n_ustring_to_UTF8() * @see i18n_ustring_from_UTF8_with_sub() */ -char* i18n_ustring_to_UTF8_with_sub ( char *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_uchar32 sub_char, int32_t *num_substitutions, i18n_error_code_e *error_code ); +char* i18n_ustring_to_UTF8_with_sub(char *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_uchar32 sub_char, int32_t *num_substitutions, i18n_error_code_e *error_code); /** * @brief Convert a UTF-8 string to UTF-16. @@ -1200,8 +1200,8 @@ char* i18n_ustring_to_UTF8_with_sub ( char *dest, int32_t dest_capacity, int32_t * @see i18n_ustring_from_UTF8_lenient() * @see i18n_ustring_to_UTF8_with_sub() */ -i18n_uchar* i18n_ustring_from_UTF8_with_sub ( i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const char *src, int32_t src_len, i18n_uchar32 sub_char, - int32_t *num_substitutions, i18n_error_code_e *error_code ); +i18n_uchar* i18n_ustring_from_UTF8_with_sub(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const char *src, int32_t src_len, i18n_uchar32 sub_char, + int32_t *num_substitutions, i18n_error_code_e *error_code); /** * @brief Convert a UTF-8 string to UTF-16. @@ -1239,7 +1239,7 @@ i18n_uchar* i18n_ustring_from_UTF8_with_sub ( i18n_uchar *dest, int32_t dest_cap * @see i18n_ustring_to_UTF8_with_sub() * @see i18n_ustring_from_UTF8_with_sub() */ -i18n_uchar* i18n_ustring_from_UTF8_lenient ( i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const char *src, int32_t src_len, i18n_error_code_e *error_code ); +i18n_uchar* i18n_ustring_from_UTF8_lenient(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const char *src, int32_t src_len, i18n_error_code_e *error_code); /** * @brief Convert a UTF-16 string to UTF-32. @@ -1265,7 +1265,7 @@ i18n_uchar* i18n_ustring_from_UTF8_lenient ( i18n_uchar *dest, int32_t dest_capa * @see i18n_ustring_to_UTF32_with_sub() * @see i18n_ustring_from_UTF32() */ -i18n_uchar32* i18n_ustring_to_UTF32 ( i18n_uchar32 *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_error_code_e *error_code ); +i18n_uchar32* i18n_ustring_to_UTF32(i18n_uchar32 *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_error_code_e *error_code); /** * @brief Convert a UTF-32 string to UTF-16. @@ -1291,7 +1291,7 @@ i18n_uchar32* i18n_ustring_to_UTF32 ( i18n_uchar32 *dest, int32_t dest_capacity, * @see i18n_ustring_from_UTF32_with_sub() * @see i18n_ustring_to_UTF32() */ -i18n_uchar* i18n_ustring_from_UTF32 ( i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar32 *src, int32_t src_len, i18n_error_code_e *error_code ); +i18n_uchar* i18n_ustring_from_UTF32(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar32 *src, int32_t src_len, i18n_error_code_e *error_code); /** * @brief Convert a UTF-16 string to UTF-32. @@ -1321,8 +1321,8 @@ i18n_uchar* i18n_ustring_from_UTF32 ( i18n_uchar *dest, int32_t dest_capacity, i * @see i18n_ustring_to_UTF32() * @see i18n_ustring_from_UTF32_with_sub() */ -i18n_uchar32* i18n_ustring_to_UTF32_with_sub ( i18n_uchar32 *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, - i18n_uchar32 sub_char, int32_t *num_substitutions, i18n_error_code_e *error_code ); +i18n_uchar32* i18n_ustring_to_UTF32_with_sub(i18n_uchar32 *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, + i18n_uchar32 sub_char, int32_t *num_substitutions, i18n_error_code_e *error_code); /** * @brief Convert a UTF-32 string to UTF-16. @@ -1353,7 +1353,7 @@ i18n_uchar32* i18n_ustring_to_UTF32_with_sub ( i18n_uchar32 *dest, int32_t dest_ * @see i18n_ustring_from_UTF32() * @see i18n_ustring_to_UTF32_with_sub() */ -i18n_uchar* i18n_ustring_from_UTF32_with_sub ( i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar32 *src, int32_t src_len, i18n_uchar32 sub_char, int32_t *num_substitutions, i18n_error_code_e *error_code ); +i18n_uchar* i18n_ustring_from_UTF32_with_sub(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar32 *src, int32_t src_len, i18n_uchar32 sub_char, int32_t *num_substitutions, i18n_error_code_e *error_code); #ifdef __cplusplus } diff --git a/src/include/wearable/utils_i18n_private.h b/src/include/wearable/utils_i18n_private.h index b981e4f..70783e9 100755 --- a/src/include/wearable/utils_i18n_private.h +++ b/src/include/wearable/utils_i18n_private.h @@ -73,7 +73,7 @@ extern "C" { } while (0) #define retex_if(expr, val, fmt, arg...) do { \ - if(expr) { \ + if (expr) { \ ERR(fmt, ##arg); \ val; \ goto CATCH; \ @@ -86,8 +86,8 @@ extern "C" { #define ERR_MAPPING(ICU_ERROR, BASE_UTILS_ERROR) BASE_UTILS_ERROR = \ (i18n_error_code_e)_i18n_error_mapping((int)ICU_ERROR) -int _i18n_error_mapping ( int err ); -int _i18n_error_mapping_reverse ( int err ); +int _i18n_error_mapping(int err); +int _i18n_error_mapping_reverse(int err); #ifdef __cplusplus } diff --git a/src/include/wearable/utils_i18n_timezone.h b/src/include/wearable/utils_i18n_timezone.h index b10955a..a537e37 100755 --- a/src/include/wearable/utils_i18n_timezone.h +++ b/src/include/wearable/utils_i18n_timezone.h @@ -72,7 +72,7 @@ extern "C" { * @see i18n_timezone_create() * @see i18n_timezone_create_gmt() */ -int i18n_timezone_create_unknown ( i18n_timezone_h *timezone ); +int i18n_timezone_create_unknown(i18n_timezone_h *timezone); /** * @brief The GMT (=UTC) time zone has a raw offset of zero and does not use daylight savings time. @@ -85,7 +85,7 @@ int i18n_timezone_create_unknown ( i18n_timezone_h *timezone ); * @retval #I18N_ERROR_NONE Successful * @see i18n_timezone_create_unknown() */ -int i18n_timezone_create_gmt ( i18n_timezone_h *timezone ); +int i18n_timezone_create_gmt(i18n_timezone_h *timezone); /** * @brief Creates an i18n_timezone_h for the given timezone_id. @@ -96,7 +96,7 @@ int i18n_timezone_create_gmt ( i18n_timezone_h *timezone ); * * @retval #I18N_ERROR_NONE Successful */ -int i18n_timezone_create ( i18n_timezone_h *timezone, const char *timezone_id ); +int i18n_timezone_create(i18n_timezone_h *timezone, const char *timezone_id); /** * @brief Destroys an i18n_timezone_h. @@ -214,7 +214,7 @@ int i18n_timezone_get_equivalent_id(const char *timezone_id, int32_t index, char * * @retval #I18N_ERROR_NONE Successful */ -int i18n_timezone_create_default ( i18n_timezone_h *timezone ); +int i18n_timezone_create_default(i18n_timezone_h *timezone); /** * @brief Sets the default time zone (i.e., what's returned by #i18n_timezone_create_default()) to be the specified time zone. @@ -230,7 +230,7 @@ int i18n_timezone_create_default ( i18n_timezone_h *timezone ); * * @retval #I18N_ERROR_NONE Successful */ -int i18n_timezone_set_default( i18n_timezone_h timezone ); +int i18n_timezone_set_default(i18n_timezone_h timezone); /** * @brief Returns the timezone data version currently used by I18N. diff --git a/src/include/wearable/utils_i18n_types.h b/src/include/wearable/utils_i18n_types.h index a96cbed..7fa2b7a 100644 --- a/src/include/wearable/utils_i18n_types.h +++ b/src/include/wearable/utils_i18n_types.h @@ -169,20 +169,20 @@ typedef enum { #if !defined(U_WCHAR_IS_UTF16) && !defined(U_WCHAR_IS_UTF32) # ifdef __STDC_ISO_10646__ -# if (U_SIZEOF_WCHAR_T==2) +# if (U_SIZEOF_WCHAR_T == 2) # define U_WCHAR_IS_UTF16 -# elif (U_SIZEOF_WCHAR_T==4) +# elif (U_SIZEOF_WCHAR_T == 4) # define U_WCHAR_IS_UTF32 # endif # elif defined __UCS2__ -# if (U_PF_OS390 <= U_PLATFORM && U_PLATFORM <= U_PF_OS400) && (U_SIZEOF_WCHAR_T==2) +# if (U_PF_OS390 <= U_PLATFORM && U_PLATFORM <= U_PF_OS400) && (U_SIZEOF_WCHAR_T == 2) # define U_WCHAR_IS_UTF16 # endif # elif defined(__UCS4__) || (U_PLATFORM == U_PF_OS400 && defined(__UTF32__)) -# if (U_SIZEOF_WCHAR_T==4) +# if (U_SIZEOF_WCHAR_T == 4) # define U_WCHAR_IS_UTF32 # endif -# elif U_PLATFORM_IS_DARWIN_BASED || (U_SIZEOF_WCHAR_T==4 && U_PLATFORM_IS_LINUX_BASED) +# elif U_PLATFORM_IS_DARWIN_BASED || (U_SIZEOF_WCHAR_T == 4 && U_PLATFORM_IS_LINUX_BASED) # define U_WCHAR_IS_UTF32 # elif U_PLATFORM_HAS_WIN32_API # define U_WCHAR_IS_UTF16 @@ -198,7 +198,7 @@ typedef enum { typedef UCHAR_TYPE i18n_uchar; /* Not #elif U_HAVE_CHAR16_T -- because that is type-incompatible with pre-C++11 callers typedef char16_t i18n_uchar; */ -#elif U_SIZEOF_WCHAR_T==2 +#elif U_SIZEOF_WCHAR_T == 2 typedef wchar_t i18n_uchar; #elif defined(__CHAR16_TYPE__) typedef __CHAR16_TYPE__ i18n_uchar; @@ -1592,7 +1592,7 @@ typedef struct { * @brief Handle to struct representing a range of text containing a specific field. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ -typedef i18n_ufield_position_s* i18n_ufield_position_h; +typedef i18n_ufield_position_s *i18n_ufield_position_h; /** * @brief Enumeration for the possible date/time format styles. @@ -1690,7 +1690,7 @@ typedef enum { * @since_tizen 2.3.1 */ -typedef enum{ +typedef enum { I18N_UDISPCTX_TYPE_DIALECT_HANDLING, /**beyond the last character in the text being scanned. @@ -202,7 +202,7 @@ int32_t i18n_ubrk_first (i18n_ubreak_iterator_h break_iter); * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ubrk_first() */ -int32_t i18n_ubrk_last (i18n_ubreak_iterator_h break_iter); +int32_t i18n_ubrk_last(i18n_ubreak_iterator_h break_iter); /** * @brief Sets the iterator position to the first boundary preceding the specified @c offset. @@ -217,7 +217,7 @@ int32_t i18n_ubrk_last (i18n_ubreak_iterator_h break_iter); * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ubrk_following() */ -int32_t i18n_ubrk_preceding (i18n_ubreak_iterator_h break_iter, int32_t offset); +int32_t i18n_ubrk_preceding(i18n_ubreak_iterator_h break_iter, int32_t offset); /** * @brief Advances the iterator to the first boundary following the specified @c offset. @@ -232,7 +232,7 @@ int32_t i18n_ubrk_preceding (i18n_ubreak_iterator_h break_iter, int32_t offset); * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ubrk_preceding() */ -int32_t i18n_ubrk_following (i18n_ubreak_iterator_h break_iter, int32_t offset); +int32_t i18n_ubrk_following(i18n_ubreak_iterator_h break_iter, int32_t offset); /** * @brief Gets a locale for which text breaking information is available. @@ -247,7 +247,7 @@ int32_t i18n_ubrk_following (i18n_ubreak_iterator_h break_iter, int32_t offset); * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ubrk_count_available() */ -const char *i18n_ubrk_get_available (int32_t index); +const char *i18n_ubrk_get_available(int32_t index); /** * @brief Determines how many locales have text breaking information available. @@ -260,7 +260,7 @@ const char *i18n_ubrk_get_available (int32_t index); * @exception #I18N_ERROR_NONE Successful * @see i18n_ubrk_get_available() */ -int32_t i18n_ubrk_count_available (void); +int32_t i18n_ubrk_count_available(void); /** * @brief Returns true if the specfied position is a boundary position. @@ -275,7 +275,7 @@ int32_t i18n_ubrk_count_available (void); * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_ubool i18n_ubrk_is_boundary (i18n_ubreak_iterator_h break_iter, int32_t offset); +i18n_ubool i18n_ubrk_is_boundary(i18n_ubreak_iterator_h break_iter, int32_t offset); /** * @brief Returns the status from the break rule that determined the most recently @@ -293,7 +293,7 @@ i18n_ubool i18n_ubrk_is_boundary (i18n_ubreak_iterator_h break_iter, int32_t off * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ubrk_get_rule_status (i18n_ubreak_iterator_h break_iter); +int32_t i18n_ubrk_get_rule_status(i18n_ubreak_iterator_h break_iter); /** * @brief Gets the statuses from the break rules that determined the most recently @@ -316,7 +316,7 @@ int32_t i18n_ubrk_get_rule_status (i18n_ubreak_iterator_h break_iter); * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ubrk_get_rule_status_vec (i18n_ubreak_iterator_h break_iter, int32_t *fill_in_vec, int32_t capacity); +int32_t i18n_ubrk_get_rule_status_vec(i18n_ubreak_iterator_h break_iter, int32_t *fill_in_vec, int32_t capacity); /** * @brief Returns the locale of the break iterator. You can choose between the valid and @@ -331,7 +331,7 @@ int32_t i18n_ubrk_get_rule_status_vec (i18n_ubreak_iterator_h break_iter, int32_ * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -const char *i18n_ubrk_get_locale_by_type (const i18n_ubreak_iterator_h break_iter, i18n_ulocale_data_locale_type_e type); +const char *i18n_ubrk_get_locale_by_type(const i18n_ubreak_iterator_h break_iter, i18n_ulocale_data_locale_type_e type); #ifdef __cplusplus } diff --git a/src/include/wearable/utils_i18n_ucalendar.h b/src/include/wearable/utils_i18n_ucalendar.h index 7de77be..a725a56 100644 --- a/src/include/wearable/utils_i18n_ucalendar.h +++ b/src/include/wearable/utils_i18n_ucalendar.h @@ -129,7 +129,7 @@ extern "C" { * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_set_default_timezone ( const i18n_uchar *zone_id ); +int i18n_ucalendar_set_default_timezone(const i18n_uchar *zone_id); /** * @brief Gets the current date and time. @@ -141,7 +141,7 @@ int i18n_ucalendar_set_default_timezone ( const i18n_uchar *zone_id ); * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_get_now ( i18n_udate *date ); +int i18n_ucalendar_get_now(i18n_udate *date); /** * @brief Creates an #i18n_ucalendar_h. @@ -171,7 +171,7 @@ int i18n_ucalendar_get_now ( i18n_udate *date ); * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory */ -int i18n_ucalendar_create ( const i18n_uchar *zone_id, int32_t len, const char *locale, i18n_ucalendar_type_e type, i18n_ucalendar_h *calendar ); +int i18n_ucalendar_create(const i18n_uchar *zone_id, int32_t len, const char *locale, i18n_ucalendar_type_e type, i18n_ucalendar_h *calendar); /** * @brief Destroys an #i18n_ucalendar_h. @@ -182,7 +182,7 @@ int i18n_ucalendar_create ( const i18n_uchar *zone_id, int32_t len, const char * * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_destroy ( i18n_ucalendar_h calendar ); +int i18n_ucalendar_destroy(i18n_ucalendar_h calendar); /** * @brief Creates a copy of a #i18n_ucalendar_h. @@ -194,7 +194,7 @@ int i18n_ucalendar_destroy ( i18n_ucalendar_h calendar ); * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_clone ( const i18n_ucalendar_h cal, i18n_ucalendar_h *identical_to_cal ); +int i18n_ucalendar_clone(const i18n_ucalendar_h cal, i18n_ucalendar_h *identical_to_cal); /** * @brief Gets the display name for a calendar's TimeZone. @@ -213,7 +213,7 @@ int i18n_ucalendar_clone ( const i18n_ucalendar_h cal, i18n_ucalendar_h *identic * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_get_timezone_displayname ( const i18n_ucalendar_h calendar, i18n_ucalendar_displayname_type_e type, const char *locale, i18n_uchar *result, int32_t result_len, int32_t *buf_size_needed ); +int i18n_ucalendar_get_timezone_displayname(const i18n_ucalendar_h calendar, i18n_ucalendar_displayname_type_e type, const char *locale, i18n_uchar *result, int32_t result_len, int32_t *buf_size_needed); /** * @brief Determines if an #i18n_ucalendar_h is currently in daylight savings time. @@ -227,7 +227,7 @@ int i18n_ucalendar_get_timezone_displayname ( const i18n_ucalendar_h calendar, i * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_is_in_daylight_time ( const i18n_ucalendar_h calendar, i18n_ubool *is_in ); +int i18n_ucalendar_is_in_daylight_time(const i18n_ucalendar_h calendar, i18n_ubool *is_in); /** * @brief Sets the value of a field in a #i18n_ucalendar_h. @@ -246,7 +246,7 @@ int i18n_ucalendar_is_in_daylight_time ( const i18n_ucalendar_h calendar, i18n_u * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_set ( i18n_ucalendar_h cal, i18n_ucalendar_date_fields_e field, int32_t val ); +int i18n_ucalendar_set(i18n_ucalendar_h cal, i18n_ucalendar_date_fields_e field, int32_t val); /** * @brief Sets a numeric attribute associated with an #i18n_ucalendar_h. @@ -263,7 +263,7 @@ int i18n_ucalendar_set ( i18n_ucalendar_h cal, i18n_ucalendar_date_fields_e fiel * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_set_attribute ( i18n_ucalendar_h calendar, i18n_ucalendar_attribute_e attr, int32_t val ); +int i18n_ucalendar_set_attribute(i18n_ucalendar_h calendar, i18n_ucalendar_attribute_e attr, int32_t val); /** * @brief Gets a numeric attribute associated with an i18n_ucalendar. @@ -281,7 +281,7 @@ int i18n_ucalendar_set_attribute ( i18n_ucalendar_h calendar, i18n_ucalendar_att * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_get_attribute ( i18n_ucalendar_h calendar, i18n_ucalendar_attribute_e attr, int32_t *val); +int i18n_ucalendar_get_attribute(i18n_ucalendar_h calendar, i18n_ucalendar_attribute_e attr, int32_t *val); /** * @brief Gets a calendar's current time in milliseconds. @@ -296,7 +296,7 @@ int i18n_ucalendar_get_attribute ( i18n_ucalendar_h calendar, i18n_ucalendar_att * @see i18n_ucalendar_set_milliseconds() * @see i18n_ucalendar_set_date_time() */ -int i18n_ucalendar_get_milliseconds( const i18n_ucalendar_h calendar, i18n_udate *date ); +int i18n_ucalendar_get_milliseconds(const i18n_ucalendar_h calendar, i18n_udate *date); /** * @brief Sets a calendar's current time in milliseconds. @@ -311,7 +311,7 @@ int i18n_ucalendar_get_milliseconds( const i18n_ucalendar_h calendar, i18n_udate * @see i18n_ucalendar_get_milliseconds() * @see i18n_ucalendar_set_date_time() */ -int i18n_ucalendar_set_milliseconds ( i18n_ucalendar_h calendar, i18n_udate milliseconds ); +int i18n_ucalendar_set_milliseconds(i18n_ucalendar_h calendar, i18n_udate milliseconds); /** * @brief Sets a calendar's current date. @@ -333,7 +333,7 @@ int i18n_ucalendar_set_milliseconds ( i18n_ucalendar_h calendar, i18n_udate mill * @see i18n_ucalendar_get_milliseconds() * @see i18n_ucalendar_set_milliseconds() */ -int i18n_ucalendar_set_date_time ( i18n_ucalendar_h calendar, int32_t year, int32_t month, int32_t date, int32_t hour, int32_t min, int32_t sec ); +int i18n_ucalendar_set_date_time(i18n_ucalendar_h calendar, int32_t year, int32_t month, int32_t date, int32_t hour, int32_t min, int32_t sec); /** * @brief Returns @c true if two #i18n_ucalendar_h calendars are equivalent. @@ -348,7 +348,7 @@ int i18n_ucalendar_set_date_time ( i18n_ucalendar_h calendar, int32_t year, int3 * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_is_equivalent_to ( const i18n_ucalendar_h calendar1, const i18n_ucalendar_h calendar2, i18n_ubool *equiv ); +int i18n_ucalendar_is_equivalent_to(const i18n_ucalendar_h calendar1, const i18n_ucalendar_h calendar2, i18n_ubool *equiv); /** * @brief Adds a specified signed amount to a particular field in a #i18n_ucalendar_h. @@ -368,7 +368,7 @@ int i18n_ucalendar_is_equivalent_to ( const i18n_ucalendar_h calendar1, const i1 * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_add ( i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, int32_t amount ); +int i18n_ucalendar_add(i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, int32_t amount); /** * @brief Gets the current value of a field from an #i18n_ucalendar_h. @@ -385,7 +385,7 @@ int i18n_ucalendar_add ( i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_get ( const i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, int32_t *val ); +int i18n_ucalendar_get(const i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, int32_t *val); // Newly Added APIs @@ -418,7 +418,7 @@ int i18n_ucalendar_get ( const i18n_ucalendar_h calendar, i18n_ucalendar_date_fi * * @return The date difference for the specified field. */ -int32_t i18n_ucalendar_get_field_difference ( i18n_ucalendar_h calendar, i18n_udate target, i18n_ucalendar_date_fields_e field, i18n_error_code_e *status ); +int32_t i18n_ucalendar_get_field_difference(i18n_ucalendar_h calendar, i18n_udate target, i18n_ucalendar_date_fields_e field, i18n_error_code_e *status); /** * @brief Creates an enumeration over system time zone IDs with the given filter conditions. @@ -437,7 +437,7 @@ int32_t i18n_ucalendar_get_field_difference ( i18n_ucalendar_h calendar, i18n_ud * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_timezone_id_enumeration_create ( i18n_system_timezone_type_e zone_type, const char *region, const int32_t *raw_offset, i18n_uenumeration_h *enumeration); +int i18n_ucalendar_timezone_id_enumeration_create(i18n_system_timezone_type_e zone_type, const char *region, const int32_t *raw_offset, i18n_uenumeration_h *enumeration); /** * @brief Creates an enumeration over all time zones. @@ -450,7 +450,7 @@ int i18n_ucalendar_timezone_id_enumeration_create ( i18n_system_timezone_type_e * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_timezones_create (i18n_uenumeration_h * enumeration); +int i18n_ucalendar_timezones_create(i18n_uenumeration_h * enumeration); /** * @brief Creates an enumeration over all time zones associated with the given country. @@ -466,7 +466,7 @@ int i18n_ucalendar_timezones_create (i18n_uenumeration_h * enumeration); * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_country_timezones_create (const char *country, i18n_uenumeration_h * enumeration); +int i18n_ucalendar_country_timezones_create(const char *country, i18n_uenumeration_h * enumeration); /** * @brief Returns the default time zone. @@ -484,7 +484,7 @@ int i18n_ucalendar_country_timezones_create (const char *country, i18n_uenumerat * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid parameter */ -int32_t i18n_ucalendar_get_default_timezone (i18n_uchar *result, int32_t result_capacity); +int32_t i18n_ucalendar_get_default_timezone(i18n_uchar *result, int32_t result_capacity); /** * @brief Sets the TimeZone used by a #i18n_ucalendar_h. @@ -499,7 +499,7 @@ int32_t i18n_ucalendar_get_default_timezone (i18n_uchar *result, int32_t result_ * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_set_timezone ( i18n_ucalendar_h calendar, const i18n_uchar *zone_id, int32_t length ); +int i18n_ucalendar_set_timezone(i18n_ucalendar_h calendar, const i18n_uchar *zone_id, int32_t length); /** * @brief Gets the ID of the calendar's time zone. @@ -516,7 +516,7 @@ int i18n_ucalendar_set_timezone ( i18n_ucalendar_h calendar, const i18n_uchar *z * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ucalendar_get_timezone_id (const i18n_ucalendar_h calendar, i18n_uchar *result, int32_t result_length); +int32_t i18n_ucalendar_get_timezone_id(const i18n_ucalendar_h calendar, i18n_uchar *result, int32_t result_length); /** * @brief Sets the Gregorian Calendar change date. @@ -537,7 +537,7 @@ int32_t i18n_ucalendar_get_timezone_id (const i18n_ucalendar_h calendar, i18n_uc * * @see i18n_ucalendar_get_gregorian_change() */ -int i18n_ucalendar_set_gregorian_change ( i18n_ucalendar_h calendar, i18n_udate date); +int i18n_ucalendar_set_gregorian_change(i18n_ucalendar_h calendar, i18n_udate date); /** * @brief Gets the Gregorian Calendar change date. @@ -558,7 +558,7 @@ int i18n_ucalendar_set_gregorian_change ( i18n_ucalendar_h calendar, i18n_udate * * @see i18n_ucalendar_set_gregorian_change() */ -int i18n_ucalendar_get_gregorian_change (const i18n_ucalendar_h calendar, i18n_udate *date); +int i18n_ucalendar_get_gregorian_change(const i18n_ucalendar_h calendar, i18n_udate *date); /** * @brief Gets a locale for which calendars are available. @@ -575,7 +575,7 @@ int i18n_ucalendar_get_gregorian_change (const i18n_ucalendar_h calendar, i18n_u * @exception #I18N_ERROR_INVALID_PARAMETER Invalid parameter * @see i18n_ucalendar_count_available() */ -const char * i18n_ucalendar_get_available (int32_t locale_index); +const char * i18n_ucalendar_get_available(int32_t locale_index); /** * @brief Determines how many locales have calendars available. @@ -588,7 +588,7 @@ const char * i18n_ucalendar_get_available (int32_t locale_index); * @exception #I18N_ERROR_NONE Successful * @see i18n_ucalendar_get_available() */ -int32_t i18n_ucalendar_count_available (void); +int32_t i18n_ucalendar_count_available(void); /** * @brief Sets a calendar's current date. @@ -611,7 +611,7 @@ int32_t i18n_ucalendar_count_available (void); * @see i18n_ucalendar_set_milliseconds() * @see i18n_ucalendar_set_date_time() */ -int i18n_ucalendar_set_date (i18n_ucalendar_h calendar, int32_t year, int32_t month, int32_t date); +int i18n_ucalendar_set_date(i18n_ucalendar_h calendar, int32_t year, int32_t month, int32_t date); /** * @brief Adds a specified signed amount to a particular field in a #i18n_ucalendar_h. @@ -646,7 +646,7 @@ int i18n_ucalendar_set_date (i18n_ucalendar_h calendar, int32_t year, int32_t mo * @remarks #I18N_UCALENDAR_ZONE_OFFSET and #I18N_UCALENDAR_DST_OFFSET are not supported by this function. * @see i18n_ucalendar_add() */ -int i18n_ucalendar_roll (i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, int32_t amount); +int i18n_ucalendar_roll(i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, int32_t amount); /** * @brief Determines if a field in a #i18n_ucalendar_h is set. @@ -667,7 +667,7 @@ int i18n_ucalendar_roll (i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e * @see i18n_ucalendar_clear() * */ -i18n_ubool i18n_ucalendar_is_set (const i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field); +i18n_ubool i18n_ucalendar_is_set(const i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field); /** * @brief Clears a field in a #i18n_ucalendar_h. @@ -687,7 +687,7 @@ i18n_ubool i18n_ucalendar_is_set (const i18n_ucalendar_h calendar, i18n_ucalenda * @see i18n_ucalendar_clear() * */ -int i18n_ucalendar_clear_field (i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field); +int i18n_ucalendar_clear_field(i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field); /** * @brief Clears all fields in a #i18n_ucalendar_h. @@ -704,7 +704,7 @@ int i18n_ucalendar_clear_field (i18n_ucalendar_h calendar, i18n_ucalendar_date_f * @see i18n_ucalendar_clear_field() * */ -int i18n_ucalendar_clear (i18n_ucalendar_h calendar); +int i18n_ucalendar_clear(i18n_ucalendar_h calendar); /** * @brief Determines a limit for a field in an #i18n_ucalendar_h. @@ -731,7 +731,7 @@ int i18n_ucalendar_clear (i18n_ucalendar_h calendar); * * @return The requested value. */ -int32_t i18n_ucalendar_get_limit (const i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, i18n_ucalendar_limit_type_e type); +int32_t i18n_ucalendar_get_limit(const i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, i18n_ucalendar_limit_type_e type); /** * @brief Gets the locale for this @c calendar object. @@ -748,7 +748,7 @@ int32_t i18n_ucalendar_get_limit (const i18n_ucalendar_h calendar, i18n_ucalenda * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -const char *i18n_ucalendar_get_locale_by_type (const i18n_ucalendar_h calendar, i18n_ulocale_data_locale_type_e type); +const char *i18n_ucalendar_get_locale_by_type(const i18n_ucalendar_h calendar, i18n_ulocale_data_locale_type_e type); /** * @brief Returns the timezone data version currently used by ICU. @@ -759,7 +759,7 @@ const char *i18n_ucalendar_get_locale_by_type (const i18n_ucalendar_h calendar, * @return The version string, such as "2007f". * @exception #I18N_ERROR_NONE Successful */ -const char *i18n_ucalendar_get_tz_data_version (void); +const char *i18n_ucalendar_get_tz_data_version(void); /** * @brief Returns the canonical system timezone ID or the normalized custom time zone ID for the given time zone ID. @@ -778,7 +778,7 @@ const char *i18n_ucalendar_get_tz_data_version (void); * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ucalendar_get_canonical_timezone_id (const i18n_uchar *id, int32_t length, i18n_uchar *result, int32_t result_capacity, i18n_ubool *is_system_id); +int32_t i18n_ucalendar_get_canonical_timezone_id(const i18n_uchar *id, int32_t length, i18n_uchar *result, int32_t result_capacity, i18n_ubool *is_system_id); /** * @brief Gets the resource keyword value string designating the calendar type for the #i18n_ucalendar_h. @@ -793,7 +793,7 @@ int32_t i18n_ucalendar_get_canonical_timezone_id (const i18n_uchar *id, int32_t * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -const char *i18n_ucalendar_get_type (const i18n_ucalendar_h calendar); +const char *i18n_ucalendar_get_type(const i18n_ucalendar_h calendar); /** * @brief Given a key and a locale, returns an array of string values in a preferred order that would make a difference. @@ -814,7 +814,7 @@ const char *i18n_ucalendar_get_type (const i18n_ucalendar_h calendar); * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_get_keyword_values_for_locale (const char *key, const char *locale, i18n_ubool commonly_used, i18n_uenumeration_h *enumeration); +int i18n_ucalendar_get_keyword_values_for_locale(const char *key, const char *locale, i18n_ubool commonly_used, i18n_uenumeration_h *enumeration); /** * @brief Returns whether the given day of the week is a weekday, a weekend day, @@ -837,7 +837,7 @@ int i18n_ucalendar_get_keyword_values_for_locale (const char *key, const char *l * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_get_day_of_week_type (const i18n_ucalendar_h calendar, i18n_ucalendar_days_of_week_e day_of_week, i18n_ucalendar_weekday_type_e *weekday); +int i18n_ucalendar_get_day_of_week_type(const i18n_ucalendar_h calendar, i18n_ucalendar_days_of_week_e day_of_week, i18n_ucalendar_weekday_type_e *weekday); /** * @brief Returns the time during the day at which the weekend begins or ends in this calendar system. @@ -859,7 +859,7 @@ int i18n_ucalendar_get_day_of_week_type (const i18n_ucalendar_h calendar, i18n_u * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ucalendar_get_weekend_transition (const i18n_ucalendar_h calendar, i18n_ucalendar_days_of_week_e day_of_week); +int32_t i18n_ucalendar_get_weekend_transition(const i18n_ucalendar_h calendar, i18n_ucalendar_days_of_week_e day_of_week); /** * @brief Returns @c true if the given #i18n_udate is in the weekend in this calendar system. @@ -875,7 +875,7 @@ int32_t i18n_ucalendar_get_weekend_transition (const i18n_ucalendar_h calendar, * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_ubool i18n_ucalendar_is_weekend (i18n_ucalendar_h calendar, i18n_udate date); +i18n_ubool i18n_ucalendar_is_weekend(i18n_ucalendar_h calendar, i18n_udate date); /** * @brief Get the #i18n_udate for the next/previous time zone transition relative @@ -896,7 +896,7 @@ i18n_ubool i18n_ucalendar_is_weekend (i18n_ucalendar_h calendar, i18n_udate date * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_ubool i18n_ucalendar_get_timezone_transition_date (const i18n_ucalendar_h calendar, i18n_utimezone_transition_type_e type, i18n_udate *transition); +i18n_ubool i18n_ucalendar_get_timezone_transition_date(const i18n_ucalendar_h calendar, i18n_utimezone_transition_type_e type, i18n_udate *transition); /** * @} diff --git a/src/include/wearable/utils_i18n_uchar.h b/src/include/wearable/utils_i18n_uchar.h index 4194c05..4dc6e1e 100644 --- a/src/include/wearable/utils_i18n_uchar.h +++ b/src/include/wearable/utils_i18n_uchar.h @@ -149,7 +149,7 @@ extern "C" { * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_uchar_get_int_property_value ( i18n_uchar32 c, i18n_uchar_uproperty_e which, int32_t *property_val ); +int i18n_uchar_get_int_property_value(i18n_uchar32 c, i18n_uchar_uproperty_e which, int32_t *property_val); /** * @brief Gets the Unicode allocation block that contains the character. @@ -161,7 +161,7 @@ int i18n_uchar_get_int_property_value ( i18n_uchar32 c, i18n_uchar_uproperty_e w * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_uchar_get_ublock_code ( i18n_uchar32 c, i18n_uchar_ublock_code_e *block_val ); +int i18n_uchar_get_ublock_code(i18n_uchar32 c, i18n_uchar_ublock_code_e *block_val); #ifdef __cplusplus } diff --git a/src/include/wearable/utils_i18n_ucollator.h b/src/include/wearable/utils_i18n_ucollator.h index 4a40674..d492ffd 100755 --- a/src/include/wearable/utils_i18n_ucollator.h +++ b/src/include/wearable/utils_i18n_ucollator.h @@ -83,25 +83,25 @@ extern "C" { int ret = I18N_ERROR_NONE; int buf_01_len = 0, buf_02_len = 0; - for ( i = 0; i < sizeof( src ) / sizeof( src[0] ); i++ ) { - dlog_print(DLOG_INFO, LOG_TAG, "%s\n", src[i] ); + for (i = 0; i < sizeof(src) / sizeof(src[0]); i++) { + dlog_print(DLOG_INFO, LOG_TAG, "%s\n", src[i]); } // cat banana airplane // creates a collator ret = i18n_ucollator_create( "en_US", &coll ); // compares and sorts in ascending order - if ( ret == I18N_ERROR_NONE ) { - i18n_ucollator_set_strength( coll, I18N_UCOLLATOR_TERTIARY ); - for ( i = 0; i < 2; i++ ) { - for ( j = 0; j < 2 - i; j++ ) { - i18n_ustring_copy_ua( buf_01, src[j] ); - i18n_ustring_copy_ua( buf_02, src[j+1] ); - i18n_ustring_get_length( buf_01, &buf_01_len ); - i18n_ustring_get_length( buf_02, &buf_02_len ); + if (ret == I18N_ERROR_NONE) { + i18n_ucollator_set_strength(coll, I18N_UCOLLATOR_TERTIARY); + for (i = 0; i < 2; i++) { + for (j = 0; j < 2 - i; j++) { + i18n_ustring_copy_ua(buf_01, src[j]); + i18n_ustring_copy_ua(buf_02, src[j+1]); + i18n_ustring_get_length(buf_01, &buf_01_len); + i18n_ustring_get_length(buf_02, &buf_02_len); // compares buf_01 with buf_02 - i18n_ucollator_str_collator( coll, buf_01, buf_01_len, buf_02, buf_02_len, &result ); - if ( result == I18N_UCOLLATOR_GREATER ) { + i18n_ucollator_str_collator(coll, buf_01, buf_01_len, buf_02, buf_02_len, &result); + if (result == I18N_UCOLLATOR_GREATER) { tmp = src[j]; src[j] = src[j+1]; src[j+1] = tmp; @@ -112,8 +112,8 @@ extern "C" { // destroys the collator i18n_ucollator_destroy( coll ); // deallocate memory for collator - for ( i = 0; i < sizeof( src ) / sizeof( src[0] ); i++ ) { - dlog_print(DLOG_INFO, LOG_TAG, "%s\n", src[i] ); + for (i = 0; i < sizeof(src) / sizeof(src[0]); i++) { + dlog_print(DLOG_INFO, LOG_TAG, "%s\n", src[i]); } // ariplane banana cat * @endcode */ @@ -146,7 +146,7 @@ extern "C" { * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ucollator_destroy() */ -int i18n_ucollator_create ( const char *locale, i18n_ucollator_h *collator ); +int i18n_ucollator_create(const char *locale, i18n_ucollator_h *collator); /** * @brief Closes a i18n_ucollator_h. @@ -159,7 +159,7 @@ int i18n_ucollator_create ( const char *locale, i18n_ucollator_h *collator ); * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ucollator_create() */ -int i18n_ucollator_destroy ( i18n_ucollator_h collator ); +int i18n_ucollator_destroy(i18n_ucollator_h collator); /** * @brief Compares two strings. @@ -178,7 +178,7 @@ int i18n_ucollator_destroy ( i18n_ucollator_h collator ); * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ucollator_equal() */ -int i18n_ucollator_str_collator ( const i18n_ucollator_h collator, const i18n_uchar *src, int32_t src_len, const i18n_uchar *target, int32_t target_len, i18n_ucollator_result_e *result ); +int i18n_ucollator_str_collator(const i18n_ucollator_h collator, const i18n_uchar *src, int32_t src_len, const i18n_uchar *target, int32_t target_len, i18n_ucollator_result_e *result); /** * @brief Compares two strings for equality. @@ -196,7 +196,7 @@ int i18n_ucollator_str_collator ( const i18n_ucollator_h collator, const i18n_uc * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ucollator_str_collator() */ -int i18n_ucollator_equal ( const i18n_ucollator_h collator, const i18n_uchar *src, int32_t src_len, const i18n_uchar *target, int32_t target_len, i18n_ubool *equal ); +int i18n_ucollator_equal(const i18n_ucollator_h collator, const i18n_uchar *src, int32_t src_len, const i18n_uchar *target, int32_t target_len, i18n_ubool *equal); /** * @brief Sets the collation strength used in a collator. @@ -210,7 +210,7 @@ int i18n_ucollator_equal ( const i18n_ucollator_h collator, const i18n_uchar *sr * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucollator_set_strength ( i18n_ucollator_h collator, i18n_ucollator_strength_e strength ); +int i18n_ucollator_set_strength(i18n_ucollator_h collator, i18n_ucollator_strength_e strength); /** * @brief Sets a universal attribute setter. @@ -223,7 +223,7 @@ int i18n_ucollator_set_strength ( i18n_ucollator_h collator, i18n_ucollator_stre * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucollator_set_attribute ( i18n_ucollator_h collator, i18n_ucollator_attribute_e attr, i18n_ucollator_attribute_value_e val ); +int i18n_ucollator_set_attribute(i18n_ucollator_h collator, i18n_ucollator_attribute_e attr, i18n_ucollator_attribute_value_e val); #ifdef __cplusplus } diff --git a/src/include/wearable/utils_i18n_udate.h b/src/include/wearable/utils_i18n_udate.h index d6504bb..440dfe6 100644 --- a/src/include/wearable/utils_i18n_udate.h +++ b/src/include/wearable/utils_i18n_udate.h @@ -107,21 +107,21 @@ // creates new i18n_udate_format_h to format dates and times ret = i18n_udate_create(I18N_UDATE_FULL , I18N_UDATE_FULL , locale, utf16_timezone_KR, -1, bestPattern, -1, &formatter_KR); - if ( ret != I18N_ERROR_NONE ) { + if (ret != I18N_ERROR_NONE) { dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); } if (!formatter_KR) { dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n"); } ret = i18n_udate_create(I18N_UDATE_FULL , I18N_UDATE_FULL , locale, utf16_timezone_LA, -1, bestPattern, -1, &formatter_LA); - if ( ret != I18N_ERROR_NONE ) { + if (ret != I18N_ERROR_NONE) { dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); } if (!formatter_LA) { dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n"); } ret = i18n_udate_create(I18N_UDATE_PATTERN , I18N_UDATE_PATTERN , locale, utf16_timezone_SaoPaulo, -1, bestPattern, -1, &formatter_SaoPaulo); - if ( ret != I18N_ERROR_NONE ) { + if (ret != I18N_ERROR_NONE) { dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); } if (!formatter_LA) { @@ -195,7 +195,7 @@ extern "C" { * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_udate_create ( i18n_udate_format_style_e time_style, i18n_udate_format_style_e date_style, const char *locale, const i18n_uchar *tz_id, int32_t tz_id_len, const i18n_uchar *pattern, int pattern_len, i18n_udate_format_h *format ); +int i18n_udate_create(i18n_udate_format_style_e time_style, i18n_udate_format_style_e date_style, const char *locale, const i18n_uchar *tz_id, int32_t tz_id_len, const i18n_uchar *pattern, int pattern_len, i18n_udate_format_h *format); /** * @brief Destroys an #i18n_udate_format_h. @@ -207,7 +207,7 @@ int i18n_udate_create ( i18n_udate_format_style_e time_style, i18n_udate_format_ * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_udate_destroy ( i18n_udate_format_h format ); +int i18n_udate_destroy(i18n_udate_format_h format); /** * @brief Formats a date using an #i18n_udate_format_h. @@ -231,7 +231,7 @@ int i18n_udate_destroy ( i18n_udate_format_h format ); * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_udate_format_date ( const i18n_udate_format_h format, i18n_udate date_to_format, i18n_uchar *result, int32_t result_len, i18n_ufield_position_h pos, int32_t *buf_size_needed ); +int i18n_udate_format_date(const i18n_udate_format_h format, i18n_udate date_to_format, i18n_uchar *result, int32_t result_len, i18n_ufield_position_h pos, int32_t *buf_size_needed); // Newly Added APIs @@ -250,7 +250,7 @@ int i18n_udate_format_date ( const i18n_udate_format_h format, i18n_udate date_t * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_udate_to_calendar_date_field ( i18n_udate_format_field_e field, i18n_ucalendar_date_fields_e *date_field_type ); +int i18n_udate_to_calendar_date_field(i18n_udate_format_field_e field, i18n_ucalendar_date_fields_e *date_field_type); /** * @brief Creates a copy of an #i18n_udate_format_h. @@ -264,7 +264,7 @@ int i18n_udate_to_calendar_date_field ( i18n_udate_format_field_e field, i18n_uc * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_udate_clone ( const i18n_udate_format_h format, i18n_udate_format_h *format_clone ); +int i18n_udate_clone(const i18n_udate_format_h format, i18n_udate_format_h *format_clone); /** * @brief Parses a string into an date/time using an #i18n_udate_format_h. @@ -290,7 +290,7 @@ int i18n_udate_clone ( const i18n_udate_format_h format, i18n_udate_format_h *fo * * @see i18n_udate_format_date() */ -int i18n_udate_parse ( const i18n_udate_format_h format, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos, i18n_udate *parsed_date ); +int i18n_udate_parse(const i18n_udate_format_h format, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos, i18n_udate *parsed_date); /** * @brief Parses a string into an date/time using an #i18n_udate_format_h. @@ -314,8 +314,8 @@ int i18n_udate_parse ( const i18n_udate_format_h format, const i18n_uchar *text, * * @see i18n_udate_format_date() */ -int i18n_udate_parse_calendar (const i18n_udate_format_h format, i18n_ucalendar_h *calendar, const i18n_uchar *text, - int32_t text_length, int32_t *parse_pos ); +int i18n_udate_parse_calendar(const i18n_udate_format_h format, i18n_ucalendar_h *calendar, const i18n_uchar *text, + int32_t text_length, int32_t *parse_pos); /** * @brief Determines if an #i18n_udate_format_h will perform lenient parsing. @@ -333,7 +333,7 @@ int i18n_udate_parse_calendar (const i18n_udate_format_h format, i18n_ucalendar_ * * @see i18n_udate_set_lenient() */ -i18n_ubool i18n_udate_is_lenient ( const i18n_udate_format_h format ); +i18n_ubool i18n_udate_is_lenient(const i18n_udate_format_h format); /** * @brief Specifies whether an #i18n_udate_format_h will perform lenient parsing. @@ -350,7 +350,7 @@ i18n_ubool i18n_udate_is_lenient ( const i18n_udate_format_h format ); * * @see i18n_udate_is_lenient() */ -int i18n_udate_set_lenient ( i18n_udate_format_h format, i18n_ubool is_lenient ); +int i18n_udate_set_lenient(i18n_udate_format_h format, i18n_ubool is_lenient); /** * @brief Gets the #i18n_ucalendar_h associated with an #i18n_udate_format_h. @@ -366,7 +366,7 @@ int i18n_udate_set_lenient ( i18n_udate_format_h format, i18n_ubool is_lenient ) * * @see i18n_udate_set_calendar() */ -int i18n_udate_get_calendar ( const i18n_udate_format_h format, i18n_ucalendar_h *calendar); +int i18n_udate_get_calendar(const i18n_udate_format_h format, i18n_ucalendar_h *calendar); /** * @brief Sets the #i18n_ucalendar_h associated with an #i18n_udate_format_h. @@ -382,7 +382,7 @@ int i18n_udate_get_calendar ( const i18n_udate_format_h format, i18n_ucalendar_h * * @see i18n_udate_get_calendar() */ -int i18n_udate_set_calendar ( i18n_udate_format_h format, const i18n_ucalendar_h calendar_to_set ); +int i18n_udate_set_calendar(i18n_udate_format_h format, const i18n_ucalendar_h calendar_to_set); /** * @brief Gets the #i18n_unumber_format_h associated with an #i18n_udate_format_h. @@ -398,7 +398,7 @@ int i18n_udate_set_calendar ( i18n_udate_format_h format, const i18n_ucalendar_h * * @see i18n_udate_set_number_format() */ -int i18n_udate_get_number_format ( const i18n_udate_format_h format, i18n_unumber_format_h *number_format ); +int i18n_udate_get_number_format(const i18n_udate_format_h format, i18n_unumber_format_h *number_format); /** * @brief Sets the #i18n_unumber_format_h associated with an #i18n_udate_format_h. @@ -414,7 +414,7 @@ int i18n_udate_get_number_format ( const i18n_udate_format_h format, i18n_unumbe * * @see i18n_udate_get_number_format() */ -int i18n_udate_set_number_format ( i18n_udate_format_h format, const i18n_unumber_format_h number_format_to_set ); +int i18n_udate_set_number_format(i18n_udate_format_h format, const i18n_unumber_format_h number_format_to_set); /** * @brief Gets a locale for which date/time formatting patterns are available. @@ -430,7 +430,7 @@ int i18n_udate_set_number_format ( i18n_udate_format_h format, const i18n_unumbe * @see i18n_udate_count_available() */ -const char *i18n_udate_get_available ( int32_t locale_index ); +const char *i18n_udate_get_available(int32_t locale_index); /** * @brief Determines how many locales have date/time formatting patterns available. @@ -444,7 +444,7 @@ const char *i18n_udate_get_available ( int32_t locale_index ); * * @see i18n_udate_get_available() */ -int32_t i18n_udate_count_available ( void ); +int32_t i18n_udate_count_available(void); /** * @brief Gets the year relative to which all 2-digit years are interpreted. @@ -461,7 +461,7 @@ int32_t i18n_udate_count_available ( void ); * * @see i18n_udate_set_2digit_year_start() */ -int i18n_udate_get_2digit_year_start ( const i18n_udate_format_h format, i18n_udate *year ); +int i18n_udate_get_2digit_year_start(const i18n_udate_format_h format, i18n_udate *year); /** * @brief Sets the year relative to which all 2-digit years will be interpreted. @@ -478,7 +478,7 @@ int i18n_udate_get_2digit_year_start ( const i18n_udate_format_h format, i18n_ud * * @see i18n_udate_get_2digit_year_start() */ -int i18n_udate_set_2digit_year_start ( i18n_udate_format_h format, i18n_udate date ); +int i18n_udate_set_2digit_year_start(i18n_udate_format_h format, i18n_udate date); /** * @brief Extracts the pattern from an #i18n_udate_format_h. @@ -499,8 +499,8 @@ int i18n_udate_set_2digit_year_start ( i18n_udate_format_h format, i18n_udate da * * @see i18n_udate_apply_pattern() */ -int32_t i18n_udate_to_pattern ( const i18n_udate_format_h format, i18n_ubool localized, i18n_uchar *result, - int32_t result_length ); +int32_t i18n_udate_to_pattern(const i18n_udate_format_h format, i18n_ubool localized, i18n_uchar *result, + int32_t result_length); /** * @brief Sets the pattern used by an #i18n_udate_format_h. @@ -518,8 +518,8 @@ int32_t i18n_udate_to_pattern ( const i18n_udate_format_h format, i18n_ubool loc * * @see i18n_udate_to_pattern() */ -int i18n_udate_apply_pattern ( i18n_udate_format_h format, i18n_ubool localized, const i18n_uchar *pattern, - int32_t pattern_length ); +int i18n_udate_apply_pattern(i18n_udate_format_h format, i18n_ubool localized, const i18n_uchar *pattern, + int32_t pattern_length); /** * @brief Gets the symbols associated with an #i18n_udate_format_h. @@ -543,8 +543,8 @@ int i18n_udate_apply_pattern ( i18n_udate_format_h format, i18n_ubool localized, * @see i18n_udate_count_symbols() * @see #i18n_udate_set_symbols() */ -int32_t i18n_udate_get_symbols ( const i18n_udate_format_h format, i18n_udate_format_symbol_type_e type, int32_t symbol_index, - i18n_uchar *result, int32_t result_length ); +int32_t i18n_udate_get_symbols(const i18n_udate_format_h format, i18n_udate_format_symbol_type_e type, int32_t symbol_index, + i18n_uchar *result, int32_t result_length); /** * @brief Counts the number of particular symbols for an #i18n_udate_format_h. @@ -564,7 +564,7 @@ int32_t i18n_udate_get_symbols ( const i18n_udate_format_h format, i18n_udate_fo * @see i18n_udate_get_symbols() * @see #i18n_udate_set_symbols() */ -int32_t i18n_udate_count_symbols ( const i18n_udate_format_h format, i18n_udate_format_symbol_type_e type ); +int32_t i18n_udate_count_symbols(const i18n_udate_format_h format, i18n_udate_format_symbol_type_e type); /** * @brief Sets the symbols associated with an #i18n_udate_format_h. @@ -587,8 +587,8 @@ int32_t i18n_udate_count_symbols ( const i18n_udate_format_h format, i18n_udate_ * @see i18n_udate_count_symbols() * @see #i18n_udate_get_symbols() */ -int i18n_udate_set_symbols ( i18n_udate_format_h format, i18n_udate_format_symbol_type_e type, int32_t symbol_index, - i18n_uchar *value, int32_t value_length ); +int i18n_udate_set_symbols(i18n_udate_format_h format, i18n_udate_format_symbol_type_e type, int32_t symbol_index, + i18n_uchar *value, int32_t value_length); /** * @brief Gets the locale for this date format object. @@ -605,7 +605,7 @@ int i18n_udate_set_symbols ( i18n_udate_format_h format, i18n_udate_format_symbo * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -const char * i18n_udate_get_locale_by_type ( const i18n_udate_format_h format, i18n_ulocale_data_locale_type_e type ); +const char * i18n_udate_get_locale_by_type(const i18n_udate_format_h format, i18n_ulocale_data_locale_type_e type); /** * @brief Sets a particular #i18n_udisplay_context_e value in the formatter, such as #I18N_UDISPLAY_CONTEXT_CAPITALIZATION_FOR_STANDALONE. @@ -620,7 +620,7 @@ const char * i18n_udate_get_locale_by_type ( const i18n_udate_format_h format, i * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_udate_set_context ( i18n_udate_format_h format, i18n_udisplay_context_e value ); +int i18n_udate_set_context(i18n_udate_format_h format, i18n_udisplay_context_e value); /** diff --git a/src/include/wearable/utils_i18n_udatepg.h b/src/include/wearable/utils_i18n_udatepg.h index d46317d..8308288 100755 --- a/src/include/wearable/utils_i18n_udatepg.h +++ b/src/include/wearable/utils_i18n_udatepg.h @@ -106,21 +106,21 @@ // creates new i18n_udate_format to format dates and times ret = i18n_udate_create(I18N_UDATE_FULL , I18N_UDATE_FULL , locale, utf16_timezone_KR, -1, bestPattern, -1, &formatter_KR); - if ( ret != I18N_ERROR_NONE ) { + if (ret != I18N_ERROR_NONE) { dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); } if (!formatter_KR) { dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n"); } ret = i18n_udate_create(I18N_UDATE_FULL , I18N_UDATE_FULL , locale, utf16_timezone_LA, -1, bestPattern, -1, &formatter_LA); - if ( ret != I18N_ERROR_NONE ) { + if (ret != I18N_ERROR_NONE) { dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); } if (!formatter_LA) { dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n"); } ret = i18n_udate_create(I18N_UDATE_PATTERN , I18N_UDATE_PATTERN , locale, utf16_timezone_SaoPaulo, -1, bestPattern, -1, &formatter_SaoPaulo); - if ( ret != I18N_ERROR_NONE ) { + if (ret != I18N_ERROR_NONE) { dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); } if (!formatter_LA) { @@ -178,7 +178,7 @@ extern "C" { * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_udatepg_create ( const char *locale, i18n_udatepg_h *dtpg ); +int i18n_udatepg_create(const char *locale, i18n_udatepg_h *dtpg); /** * @brief Destroys a generator. @@ -189,7 +189,7 @@ int i18n_udatepg_create ( const char *locale, i18n_udatepg_h *dtpg ); * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_udatepg_destroy ( i18n_udatepg_h dtpg ); +int i18n_udatepg_destroy(i18n_udatepg_h dtpg); /** * @brief Gets the best pattern matching the input skeleton. @@ -213,7 +213,7 @@ int i18n_udatepg_destroy ( i18n_udatepg_h dtpg ); * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @retval #I18N_ERROR_BUFFER_OVERFLOW A result would not fit in the supplied buffer */ -int i18n_udatepg_get_best_pattern ( i18n_udatepg_h dtpg, const i18n_uchar *skeleton, int32_t len, i18n_uchar *best_pattern, int32_t capacity, int32_t *best_pattern_len ); +int i18n_udatepg_get_best_pattern(i18n_udatepg_h dtpg, const i18n_uchar *skeleton, int32_t len, i18n_uchar *best_pattern, int32_t capacity, int32_t *best_pattern_len); // Newly Added APIs @@ -229,7 +229,7 @@ int i18n_udatepg_get_best_pattern ( i18n_udatepg_h dtpg, const i18n_uchar *skele * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_udatepg_create_empty (i18n_udatepg_h *dtpg); +int i18n_udatepg_create_empty(i18n_udatepg_h *dtpg); /** * @brief Creates a copy of a generator. @@ -242,7 +242,7 @@ int i18n_udatepg_create_empty (i18n_udatepg_h *dtpg); * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_udatepg_clone ( const i18n_udatepg_h dtpg, i18n_udatepg_h * dtpg_clone); +int i18n_udatepg_clone(const i18n_udatepg_h dtpg, i18n_udatepg_h * dtpg_clone); /** * @brief Gets the best pattern matching the input @a skeleton. @@ -273,8 +273,8 @@ int i18n_udatepg_clone ( const i18n_udatepg_h dtpg, i18n_udatepg_h * dtpg_clone) * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_udatepg_get_best_pattern_with_options ( i18n_udatepg_h dtpg, const i18n_uchar *skeleton, int32_t length, - i18n_udatepg_date_time_pattern_match_options_e options, i18n_uchar *best_pattern, int32_t capacity ); +int32_t i18n_udatepg_get_best_pattern_with_options(i18n_udatepg_h dtpg, const i18n_uchar *skeleton, int32_t length, + i18n_udatepg_date_time_pattern_match_options_e options, i18n_uchar *best_pattern, int32_t capacity); /** * @brief Gets a unique skeleton from a given pattern. For example, both "MMM-dd" and "dd/MMM" produce the skeleton "MMMdd". @@ -298,7 +298,7 @@ int32_t i18n_udatepg_get_best_pattern_with_options ( i18n_udatepg_h dtpg, const * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_udatepg_get_skeleton ( i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t length, i18n_uchar *skeleton, int32_t capacity ); +int32_t i18n_udatepg_get_skeleton(i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t length, i18n_uchar *skeleton, int32_t capacity); /** * @brief Gets a unique base skeleton from a given pattern. @@ -325,7 +325,7 @@ int32_t i18n_udatepg_get_skeleton ( i18n_udatepg_h dtpg, const i18n_uchar *patte * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_udatepg_get_base_skeleton ( i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t length, i18n_uchar *base_skeleton, int32_t capacity ); +int32_t i18n_udatepg_get_base_skeleton(i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t length, i18n_uchar *base_skeleton, int32_t capacity); /** * @brief Adds a pattern to the generator. @@ -353,7 +353,7 @@ int32_t i18n_udatepg_get_base_skeleton ( i18n_udatepg_h dtpg, const i18n_uchar * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_udatepg_add_pattern ( i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t pattern_length, i18n_ubool override, i18n_uchar *conflicting_pattern, int32_t capacity, i18n_udatepg_date_time_pattern_conflict_e * conflict_status ); +int32_t i18n_udatepg_add_pattern(i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t pattern_length, i18n_ubool override, i18n_uchar *conflicting_pattern, int32_t capacity, i18n_udatepg_date_time_pattern_conflict_e * conflict_status); /** * @brief An append_item_format is a pattern used to append a field if there is no good match. @@ -379,7 +379,7 @@ int32_t i18n_udatepg_add_pattern ( i18n_udatepg_h dtpg, const i18n_uchar *patte * * @see i18n_udatepg_get_append_item_format() */ -int i18n_udatepg_set_append_item_format ( i18n_udatepg_h dtpg, i18n_udatepg_date_time_pattern_field_e field, const i18n_uchar *value, int32_t length ); +int i18n_udatepg_set_append_item_format(i18n_udatepg_h dtpg, i18n_udatepg_date_time_pattern_field_e field, const i18n_uchar *value, int32_t length); /** * @brief Getter corresponding to i18n_udatepg_set_append_item_format(). @@ -399,7 +399,7 @@ int i18n_udatepg_set_append_item_format ( i18n_udatepg_h dtpg, i18n_udatepg_date * * @see i18n_udatepg_set_append_item_format() */ -const i18n_uchar *i18n_udatepg_get_append_item_format ( const i18n_udatepg_h dtpg, i18n_udatepg_date_time_pattern_field_e field, int32_t *pattern_length ); +const i18n_uchar *i18n_udatepg_get_append_item_format(const i18n_udatepg_h dtpg, i18n_udatepg_date_time_pattern_field_e field, int32_t *pattern_length); /** * @brief Sets the name of field, e.g. "era" in English for ERA. @@ -418,8 +418,8 @@ const i18n_uchar *i18n_udatepg_get_append_item_format ( const i18n_udatepg_h dtp * * @see i18n_udatepg_get_append_item_name() */ -int i18n_udatepg_set_append_item_name ( i18n_udatepg_h dtpg, i18n_udatepg_date_time_pattern_field_e field, const i18n_uchar *value, - int32_t length ); +int i18n_udatepg_set_append_item_name(i18n_udatepg_h dtpg, i18n_udatepg_date_time_pattern_field_e field, const i18n_uchar *value, + int32_t length); /** * @brief Getter corresponding to i18n_udatepg_set_append_item_name(). @@ -439,8 +439,8 @@ int i18n_udatepg_set_append_item_name ( i18n_udatepg_h dtpg, i18n_udatepg_date_t * * @see i18n_udatepg_set_append_item_name() */ -const i18n_uchar *i18n_udatepg_get_append_item_name ( const i18n_udatepg_h dtpg, i18n_udatepg_date_time_pattern_field_e field, - int32_t *pattern_length ); +const i18n_uchar *i18n_udatepg_get_append_item_name(const i18n_udatepg_h dtpg, i18n_udatepg_date_time_pattern_field_e field, + int32_t *pattern_length); /** * @brief The date time format is a message format pattern used to compose date and time patterns. @@ -464,7 +464,7 @@ const i18n_uchar *i18n_udatepg_get_append_item_name ( const i18n_udatepg_h dtpg, * * @see i18n_udatepg_get_date_time_format() */ -int i18n_udatepg_set_date_time_format ( const i18n_udatepg_h dtpg, const i18n_uchar *date_time_format, int32_t length ); +int i18n_udatepg_set_date_time_format(const i18n_udatepg_h dtpg, const i18n_uchar *date_time_format, int32_t length); /** * @brief Getter corresponding to i18n_udatepg_set_date_time_format(). @@ -482,7 +482,7 @@ int i18n_udatepg_set_date_time_format ( const i18n_udatepg_h dtpg, const i18n_uc * * @see i18n_udatepg_set_date_time_format() */ -const i18n_uchar *i18n_udatepg_get_date_time_format ( const i18n_udatepg_h dtpg, int32_t *pattern_length ); +const i18n_uchar *i18n_udatepg_get_date_time_format(const i18n_udatepg_h dtpg, int32_t *pattern_length); /** * @brief The decimal value is used in formatting fractions of seconds. @@ -502,7 +502,7 @@ const i18n_uchar *i18n_udatepg_get_date_time_format ( const i18n_udatepg_h dtpg, * * @see i18n_udatepg_get_decimal() */ -int i18n_udatepg_set_decimal ( i18n_udatepg_h dtpg, const i18n_uchar *decimal, int32_t length ); +int i18n_udatepg_set_decimal(i18n_udatepg_h dtpg, const i18n_uchar *decimal, int32_t length); /** * @brief Getter corresponding to i18n_udatepg_set_decimal(). @@ -520,7 +520,7 @@ int i18n_udatepg_set_decimal ( i18n_udatepg_h dtpg, const i18n_uchar *decimal, i * * @see i18n_udatepg_set_decimal() */ -const i18n_uchar *i18n_udatepg_get_decimal ( const i18n_udatepg_h dtpg, int32_t *pattern_length ); +const i18n_uchar *i18n_udatepg_get_decimal(const i18n_udatepg_h dtpg, int32_t *pattern_length); /** * @brief Adjusts the field types (width and subtype) of a @a pattern to match what is in a @a skeleton. @@ -548,8 +548,8 @@ const i18n_uchar *i18n_udatepg_get_decimal ( const i18n_udatepg_h dtpg, int32_t * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_udatepg_replace_field_types ( i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t pattern_length, - const i18n_uchar *skeleton, int32_t skeleton_length, i18n_uchar *dest, int32_t dest_capacity ); +int32_t i18n_udatepg_replace_field_types(i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t pattern_length, + const i18n_uchar *skeleton, int32_t skeleton_length, i18n_uchar *dest, int32_t dest_capacity); /** * @brief Adjusts the field types (width and subtype) of a pattern to match what is in a @a skeleton. @@ -581,9 +581,9 @@ int32_t i18n_udatepg_replace_field_types ( i18n_udatepg_h dtpg, const i18n_uchar * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_udatepg_replace_field_types_with_options ( i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t pattern_length, +int32_t i18n_udatepg_replace_field_types_with_options(i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t pattern_length, const i18n_uchar *skeleton, int32_t skeleton_length, i18n_udatepg_date_time_pattern_match_options_e options, - i18n_uchar *dest, int32_t dest_capacity ); + i18n_uchar *dest, int32_t dest_capacity); /** * @brief Creates an #i18n_uenumeration_h for list of all the skeletons in canonical form. @@ -597,7 +597,7 @@ int32_t i18n_udatepg_replace_field_types_with_options ( i18n_udatepg_h dtpg, con * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_udatepg_skeletons_create ( const i18n_udatepg_h dtpg, i18n_uenumeration_h *enumeration ); +int i18n_udatepg_skeletons_create(const i18n_udatepg_h dtpg, i18n_uenumeration_h *enumeration); /** * @brief Creates an #i18n_uenumeration_h for list of all the base skeletons in canonical form. @@ -610,7 +610,7 @@ int i18n_udatepg_skeletons_create ( const i18n_udatepg_h dtpg, i18n_uenumeration * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_udatepg_base_skeletons_create ( const i18n_udatepg_h dtpg, i18n_uenumeration_h *enumeration ); +int i18n_udatepg_base_skeletons_create(const i18n_udatepg_h dtpg, i18n_uenumeration_h *enumeration); /** * @brief Gets the pattern corresponding to a given skeleton. @@ -628,7 +628,7 @@ int i18n_udatepg_base_skeletons_create ( const i18n_udatepg_h dtpg, i18n_uenumer * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -const i18n_uchar *i18n_udatepg_get_pattern_for_skeleton ( const i18n_udatepg_h dtpg, const i18n_uchar *skeleton, int32_t skeleton_length, int32_t *pattern_length ); +const i18n_uchar *i18n_udatepg_get_pattern_for_skeleton(const i18n_udatepg_h dtpg, const i18n_uchar *skeleton, int32_t skeleton_length, int32_t *pattern_length); #ifdef __cplusplus diff --git a/src/include/wearable/utils_i18n_uenumeration.h b/src/include/wearable/utils_i18n_uenumeration.h index bbfe620..543945d 100755 --- a/src/include/wearable/utils_i18n_uenumeration.h +++ b/src/include/wearable/utils_i18n_uenumeration.h @@ -61,7 +61,7 @@ extern "C" { * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_uenumeration_destroy ( i18n_uenumeration_h enumeration ); +int i18n_uenumeration_destroy(i18n_uenumeration_h enumeration); /** * @brief Returns the number of elements that the iterator traverses. @@ -79,7 +79,7 @@ int i18n_uenumeration_destroy ( i18n_uenumeration_h enumeration ); * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @exception #I18N_ERROR_ENUM_OUT_OF_SYNC The iterator is out of sync */ -int32_t i18n_uenumeration_count ( i18n_uenumeration_h enumeration ); +int32_t i18n_uenumeration_count(i18n_uenumeration_h enumeration); /** * @brief Returns the next element in the iterator's list. @@ -102,7 +102,7 @@ int32_t i18n_uenumeration_count ( i18n_uenumeration_h enumeration ); * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @exception #I18N_ERROR_ENUM_OUT_OF_SYNC The iterator is out of sync */ -const i18n_uchar *i18n_uenumeration_unext ( i18n_uenumeration_h enumeration, int32_t *result_length ); +const i18n_uchar *i18n_uenumeration_unext(i18n_uenumeration_h enumeration, int32_t *result_length); /** * @brief Returns the next element in the iterator's list. @@ -128,7 +128,7 @@ const i18n_uchar *i18n_uenumeration_unext ( i18n_uenumeration_h enumeration, int * @exception #I18N_ERROR_INVARIANT_CONVERSION The underlying native string is i18n_uchar* and conversion to char* with the invariant converter fails. * This error pertains only to current string, so iteration might be able to continue successfully. */ -const char *i18n_uenumeration_next ( i18n_uenumeration_h enumeration, int32_t *result_length ); +const char *i18n_uenumeration_next(i18n_uenumeration_h enumeration, int32_t *result_length); /** * @brief Resets the iterator to the current list of service IDs. @@ -142,7 +142,7 @@ const char *i18n_uenumeration_next ( i18n_uenumeration_h enumeration, int32_t *r * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_uenumeration_reset ( i18n_uenumeration_h enumeration ); +int i18n_uenumeration_reset(i18n_uenumeration_h enumeration); /** * @brief Given an array of const i18n_uchar* strings, return an #i18n_uenumeration_h. @@ -161,7 +161,7 @@ int i18n_uenumeration_reset ( i18n_uenumeration_h enumeration ); * * @see i18n_uenumeration_destroy() */ -int i18n_uenumeration_uchar_strings_enumeration_create(const i18n_uchar *const strings[], int32_t count, i18n_uenumeration_h *enumeration ); +int i18n_uenumeration_uchar_strings_enumeration_create(const i18n_uchar *const strings[], int32_t count, i18n_uenumeration_h *enumeration); /** * @brief Given an array of const char* strings (invariant chars only), return an #i18n_uenumeration_h. @@ -180,7 +180,7 @@ int i18n_uenumeration_uchar_strings_enumeration_create(const i18n_uchar *const s * * @see i18n_uenumeration_destroy() */ -int i18n_uenumeration_char_strings_enumeration_create(const char* const strings[], int32_t count, i18n_uenumeration_h *enumeration ); +int i18n_uenumeration_char_strings_enumeration_create(const char* const strings[], int32_t count, i18n_uenumeration_h *enumeration); /** * @} diff --git a/src/include/wearable/utils_i18n_ulocale.h b/src/include/wearable/utils_i18n_ulocale.h index a180152..18af395 100644 --- a/src/include/wearable/utils_i18n_ulocale.h +++ b/src/include/wearable/utils_i18n_ulocale.h @@ -61,21 +61,21 @@ // Gets default locale ret = i18n_ulocale_get_default(&locale); - if ( ret != I18N_ERROR_NONE ) { + if (ret != I18N_ERROR_NONE) { dlog_print(DLOG_ERROR, LOG_TAG, "i18n_ulocale_get_default() failed!!! \n"); } dlog_print(DLOG_INFO, LOG_TAG, "default locale : %s\n", locale); // default locale : en_GB.UTF-8 // Gets the language code for the specified locale ret = i18n_ulocale_get_language(locale, language, language_capacity, &buf_size_language); - if ( ret != I18N_ERROR_NONE ) { + if (ret != I18N_ERROR_NONE) { dlog_print(DLOG_ERROR, LOG_TAG, "i18n_ulocale_get_language() failed!!! \n"); } dlog_print(DLOG_INFO, LOG_TAG, "language code for the locale : %s\n", language); // language code for the locale : en // Gets the full name suitable for display for the specified locale ret = i18n_ulocale_get_display_name(locale, in_locale_id, result_w, 64, &buf_size_display_name); - if ( ret != I18N_ERROR_NONE ) { + if (ret != I18N_ERROR_NONE) { dlog_print(DLOG_ERROR, LOG_TAG, "i18n_ulocale_get_display_name() failed!!! \n"); } i18n_ustring_copy_au(result, result_w); @@ -120,7 +120,7 @@ extern "C" { * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ulocale_get_default ( const char **locale ); +int i18n_ulocale_get_default(const char **locale); /** * @brief Sets I18N's default locale. @@ -138,7 +138,7 @@ int i18n_ulocale_get_default ( const char **locale ); * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ulocale_set_default ( const char *locale_id ); +int i18n_ulocale_set_default(const char *locale_id); /** * @brief Gets the language code for the specified locale. @@ -154,7 +154,7 @@ int i18n_ulocale_set_default ( const char *locale_id ); * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ulocale_get_language ( const char *locale_id, char *language, int32_t language_capacity, int32_t *buf_size_language ); +int i18n_ulocale_get_language(const char *locale_id, char *language, int32_t language_capacity, int32_t *buf_size_language); /** * @brief Gets the country code for the specified locale. @@ -168,7 +168,7 @@ int i18n_ulocale_get_language ( const char *locale_id, char *language, int32_t l * @return The actual buffer size needed for the country code.\n * If it's greater than @a country_capacity, the returned country code will be truncated. */ -int32_t i18n_ulocale_get_country ( const char *locale_id, char *country, int32_t country_capacity, int *error ); +int32_t i18n_ulocale_get_country(const char *locale_id, char *country, int32_t country_capacity, int *error); /** * @brief Gets the full name suitable for display for the specified locale. @@ -186,7 +186,7 @@ int32_t i18n_ulocale_get_country ( const char *locale_id, char *country, int32_t * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ulocale_get_display_name ( const char *locale_id, const char *in_locale_id, i18n_uchar *result, int32_t max_result_size, int32_t *buf_size_display_name ); +int i18n_ulocale_get_display_name(const char *locale_id, const char *in_locale_id, i18n_uchar *result, int32_t max_result_size, int32_t *buf_size_display_name); /** * @brief Gets the specified locale from a list of all available locales. @@ -204,7 +204,7 @@ int i18n_ulocale_get_display_name ( const char *locale_id, const char *in_locale * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -const char* i18n_ulocale_get_available ( int32_t n ); +const char* i18n_ulocale_get_available(int32_t n); /** * @brief Gets the size of the all available locale list. @@ -215,7 +215,7 @@ const char* i18n_ulocale_get_available ( int32_t n ); * @return The size of the locale list * @exception #I18N_ERROR_NONE Success */ -int32_t i18n_ulocale_count_available ( void ); +int32_t i18n_ulocale_count_available(void); // Newly Added APIs @@ -237,7 +237,7 @@ int32_t i18n_ulocale_count_available ( void ); * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ulocale_get_script ( const char *locale_id, char *script, int32_t script_capacity ); +int32_t i18n_ulocale_get_script(const char *locale_id, char *script, int32_t script_capacity); /** * @brief Gets the variant code for the specified locale. @@ -257,7 +257,7 @@ int32_t i18n_ulocale_get_script ( const char *locale_id, char *script, int32_t s * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ulocale_get_variant ( const char *locale_id, char *variant, int32_t variant_capacity ); +int32_t i18n_ulocale_get_variant(const char *locale_id, char *variant, int32_t variant_capacity); /** * @brief Gets the full name for the specified locale. @@ -279,7 +279,7 @@ int32_t i18n_ulocale_get_variant ( const char *locale_id, char *variant, int32_t * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_BUFFER_OVERFLOW A result would not fit in the supplied buffer */ -int32_t i18n_ulocale_get_name ( const char *locale_id, char *name, int32_t name_capacity ); +int32_t i18n_ulocale_get_name(const char *locale_id, char *name, int32_t name_capacity); /** * @brief Gets the full name for the specified locale. @@ -301,7 +301,7 @@ int32_t i18n_ulocale_get_name ( const char *locale_id, char *name, int32_t name_ * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_BUFFER_OVERFLOW A result would not fit in the supplied buffer */ -int32_t i18n_ulocale_canonicalize ( const char *locale_id, char *name, int32_t name_capacity ); +int32_t i18n_ulocale_canonicalize(const char *locale_id, char *name, int32_t name_capacity); /** * @brief Gets the ISO language code for the specified locale. @@ -315,7 +315,7 @@ int32_t i18n_ulocale_canonicalize ( const char *locale_id, char *name, int32_t n * * @exception #I18N_ERROR_NONE Successful */ -const char * i18n_ulocale_get_iso3_language ( const char *locale_id ); +const char * i18n_ulocale_get_iso3_language(const char *locale_id); /** * @brief Gets the ISO country code for the specified locale. @@ -329,7 +329,7 @@ const char * i18n_ulocale_get_iso3_language ( const char *locale_id ); * * @exception #I18N_ERROR_NONE Successful */ -const char * i18n_ulocale_get_iso3_country ( const char *locale_id ); +const char * i18n_ulocale_get_iso3_country(const char *locale_id); /** * @brief Gets the Win32 LCID value for the specified locale. @@ -344,7 +344,7 @@ const char * i18n_ulocale_get_iso3_country ( const char *locale_id ); * * @exception #I18N_ERROR_NONE Successful */ -uint32_t i18n_ulocale_get_lcid ( const char *locale_id ); +uint32_t i18n_ulocale_get_lcid(const char *locale_id); /** * @brief Gets the language name suitable for display for the specified locale. @@ -366,7 +366,7 @@ uint32_t i18n_ulocale_get_lcid ( const char *locale_id ); * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ulocale_get_display_language ( const char *locale, const char *display_locale, i18n_uchar *language, int32_t language_capacity ); +int32_t i18n_ulocale_get_display_language(const char *locale, const char *display_locale, i18n_uchar *language, int32_t language_capacity); /** * @brief Gets the script name suitable for display for the specified locale. @@ -387,7 +387,7 @@ int32_t i18n_ulocale_get_display_language ( const char *locale, const char *disp * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ulocale_get_display_script ( const char *locale, const char *display_locale, i18n_uchar *script, int32_t script_capacity ); +int32_t i18n_ulocale_get_display_script(const char *locale, const char *display_locale, i18n_uchar *script, int32_t script_capacity); /** * @brief Gets the country name suitable for display for the specified locale. @@ -408,7 +408,7 @@ int32_t i18n_ulocale_get_display_script ( const char *locale, const char *displa * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ulocale_get_display_country ( const char *locale, const char *display_locale, i18n_uchar *country, int32_t country_capacity ); +int32_t i18n_ulocale_get_display_country(const char *locale, const char *display_locale, i18n_uchar *country, int32_t country_capacity); /** * @brief Gets the variant name suitable for display for the specified locale. @@ -429,7 +429,7 @@ int32_t i18n_ulocale_get_display_country ( const char *locale, const char *displ * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ulocale_get_display_variant ( const char *locale, const char *display_locale, i18n_uchar *variant, int32_t variant_capacity ); +int32_t i18n_ulocale_get_display_variant(const char *locale, const char *display_locale, i18n_uchar *variant, int32_t variant_capacity); /** * @brief Gets the keyword name suitable for display for the specified locale. @@ -481,7 +481,7 @@ int32_t i18n_ulocale_get_display_variant ( const char *locale, const char *displ * @see i18n_uenumeration_next() * @see i18n_uenumeration_destroy() */ -int32_t i18n_ulocale_get_display_keyword ( const char *keyword, const char *display_locale, i18n_uchar *dest, int32_t dest_capacity ); +int32_t i18n_ulocale_get_display_keyword(const char *keyword, const char *display_locale, i18n_uchar *dest, int32_t dest_capacity); /** * @brief Gets the value of the keyword suitable for display for the specified locale. @@ -506,7 +506,7 @@ int32_t i18n_ulocale_get_display_keyword ( const char *keyword, const char *disp * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ulocale_get_display_keyword_value ( const char *locale, const char *keyword, const char *display_locale, i18n_uchar *dest, int32_t dest_capacity ); +int32_t i18n_ulocale_get_display_keyword_value(const char *locale, const char *keyword, const char *display_locale, i18n_uchar *dest, int32_t dest_capacity); /** * @brief Gets a list of all available 2-letter language codes defined in ISO 639, @@ -523,7 +523,7 @@ int32_t i18n_ulocale_get_display_keyword_value ( const char *locale, const char * * @exception #I18N_ERROR_NONE Successful */ -const char * const *i18n_ulocale_get_iso_languages ( void ); +const char * const *i18n_ulocale_get_iso_languages(void); /** * @@ -539,7 +539,7 @@ const char * const *i18n_ulocale_get_iso_languages ( void ); * * @exception #I18N_ERROR_NONE Successful */ -const char * const *i18n_ulocale_get_iso_countries ( void ); +const char * const *i18n_ulocale_get_iso_countries(void); /** * @brief Truncates the locale ID string to get the parent locale ID. @@ -566,7 +566,7 @@ const char * const *i18n_ulocale_get_iso_countries ( void ); * in the @a locale_id from index 0 to the index of the last occurrence of * the underscore ("_") symbol. */ -int32_t i18n_ulocale_get_parent ( const char *locale_id, char *parent, int32_t parent_capacity ); +int32_t i18n_ulocale_get_parent(const char *locale_id, char *parent, int32_t parent_capacity); /** * @brief Gets the full name for the specified locale, like i18n_ulocale_get_name(), but without keywords. @@ -591,7 +591,7 @@ int32_t i18n_ulocale_get_parent ( const char *locale_id, char *parent, int32_t p * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_BUFFER_OVERFLOW A result would not fit in the supplied buffer */ -int32_t i18n_ulocale_get_base_name ( const char *locale_id, char *name, int32_t name_capacity ); +int32_t i18n_ulocale_get_base_name(const char *locale_id, char *name, int32_t name_capacity); /** * @brief Gets an enumeration of keywords for the specified locale. @@ -606,7 +606,7 @@ int32_t i18n_ulocale_get_base_name ( const char *locale_id, char *name, int32_t * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ulocale_keywords_create ( const char *locale_id, i18n_uenumeration_h *enumeration ); +int i18n_ulocale_keywords_create(const char *locale_id, i18n_uenumeration_h *enumeration); /** * @brief Gets the value for a keyword. @@ -626,7 +626,7 @@ int i18n_ulocale_keywords_create ( const char *locale_id, i18n_uenumeration_h *e * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ulocale_get_keyword_value ( const char *locale_id, const char *keyword_name, char *buffer, int32_t buffer_capacity ); +int32_t i18n_ulocale_get_keyword_value(const char *locale_id, const char *keyword_name, char *buffer, int32_t buffer_capacity); /** * @brief Sets or removes the value of the specified keyword. @@ -704,7 +704,7 @@ int32_t i18n_ulocale_get_keyword_value ( const char *locale_id, const char *keyw * * @see i18n_ulocale_get_keyword_value() */ -int32_t i18n_ulocale_set_keyword_value ( const char *keyword_name, const char *keyword_value, char *buffer, int32_t buffer_capacity ); +int32_t i18n_ulocale_set_keyword_value(const char *keyword_name, const char *keyword_value, char *buffer, int32_t buffer_capacity); /** * @brief Gets the layout character orientation for the specified locale. @@ -718,7 +718,7 @@ int32_t i18n_ulocale_set_keyword_value ( const char *keyword_name, const char *k * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ulocale_get_character_orientation ( const char *locale_id, i18n_ulocale_layout_type_e *layout_type ); +int i18n_ulocale_get_character_orientation(const char *locale_id, i18n_ulocale_layout_type_e *layout_type); /** * @brief Gets the layout line orientation for the specified locale. @@ -732,7 +732,7 @@ int i18n_ulocale_get_character_orientation ( const char *locale_id, i18n_ulocale * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ulocale_get_line_orientation ( const char *locale_id, i18n_ulocale_layout_type_e *layout_type ); +int i18n_ulocale_get_line_orientation(const char *locale_id, i18n_ulocale_layout_type_e *layout_type); /** * @brief Gets the I18N locale ID for the specified Win32 LCID value. @@ -751,7 +751,7 @@ int i18n_ulocale_get_line_orientation ( const char *locale_id, i18n_ulocale_layo * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ulocale_get_locale_for_lcid ( uint32_t host_id, char *locale, int32_t locale_capacity ); +int32_t i18n_ulocale_get_locale_for_lcid(uint32_t host_id, char *locale, int32_t locale_capacity); /** * @brief Adds the likely subtags for a provided locale ID, per the algorithm described @@ -785,7 +785,7 @@ int32_t i18n_ulocale_get_locale_for_lcid ( uint32_t host_id, char *locale, int32 * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ulocale_add_likely_subtags ( const char *locale_id, char *maximized_locale_id, int32_t maximized_locale_id_capacity ); +int32_t i18n_ulocale_add_likely_subtags(const char *locale_id, char *maximized_locale_id, int32_t maximized_locale_id_capacity); /** * @brief Minimizes the subtags for a provided locale ID, per the algorithm described @@ -818,7 +818,7 @@ int32_t i18n_ulocale_add_likely_subtags ( const char *locale_id, char *maximized * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ulocale_minimize_subtags ( const char *locale_id, char *minimized_locale_id, int32_t minimized_locale_id_capacity ); +int32_t i18n_ulocale_minimize_subtags(const char *locale_id, char *minimized_locale_id, int32_t minimized_locale_id_capacity); /** * @brief Returns a locale ID for the specified BCP47 language tag string. @@ -849,7 +849,7 @@ int32_t i18n_ulocale_minimize_subtags ( const char *locale_id, char *minimized_l * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ulocale_for_language_tag ( const char *langtag, char *locale_id, int32_t locale_id_capacity, int32_t *parsed_length ); +int32_t i18n_ulocale_for_language_tag(const char *langtag, char *locale_id, int32_t locale_id_capacity, int32_t *parsed_length); /** * @brief Returns a well-formed language tag for this locale ID. @@ -877,7 +877,7 @@ int32_t i18n_ulocale_for_language_tag ( const char *langtag, char *locale_id, in * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ulocale_to_language_tag ( const char *locale_id, char *langtag, int32_t langtag_capacity, i18n_ubool strict ); +int32_t i18n_ulocale_to_language_tag(const char *locale_id, char *langtag, int32_t langtag_capacity, i18n_ubool strict); #ifdef __cplusplus } diff --git a/src/include/wearable/utils_i18n_unormalization.h b/src/include/wearable/utils_i18n_unormalization.h index 76ecbc0..15bad5d 100755 --- a/src/include/wearable/utils_i18n_unormalization.h +++ b/src/include/wearable/utils_i18n_unormalization.h @@ -81,7 +81,7 @@ extern "C" { * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_unormalization_get_instance (const char *package_name, const char *name, i18n_unormalization_mode_e mode, +int i18n_unormalization_get_instance(const char *package_name, const char *name, i18n_unormalization_mode_e mode, i18n_unormalizer_h *normalizer); /** @@ -100,7 +100,7 @@ int i18n_unormalization_get_instance (const char *package_name, const char *name * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_unormalization_normalize (i18n_unormalizer_h normalizer, const i18n_uchar *src, int32_t len, i18n_uchar *dest, int32_t capacity, int32_t *len_deststr); +int i18n_unormalization_normalize(i18n_unormalizer_h normalizer, const i18n_uchar *src, int32_t len, i18n_uchar *dest, int32_t capacity, int32_t *len_deststr); #ifdef __cplusplus } diff --git a/src/include/wearable/utils_i18n_unumber.h b/src/include/wearable/utils_i18n_unumber.h index f1e7cf3..4a4e2ac 100644 --- a/src/include/wearable/utils_i18n_unumber.h +++ b/src/include/wearable/utils_i18n_unumber.h @@ -106,8 +106,8 @@ extern "C" { * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_unumber_create ( i18n_unumber_format_style_e style, const i18n_uchar *pattern, int32_t pattern_len, const char *locale, - i18n_uparse_error_s *parse_err, i18n_unumber_format_h *num_format ); +int i18n_unumber_create(i18n_unumber_format_style_e style, const i18n_uchar *pattern, int32_t pattern_len, const char *locale, + i18n_uparse_error_s *parse_err, i18n_unumber_format_h *num_format); /** * @brief Destroys an #i18n_unumber_format_h. @@ -119,7 +119,7 @@ int i18n_unumber_create ( i18n_unumber_format_style_e style, const i18n_uchar *p * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_unumber_destroy ( i18n_unumber_format_h fmt ); +int i18n_unumber_destroy(i18n_unumber_format_h fmt); /** * @brief Gets a symbol associated with an #i18n_unumber_format_h. @@ -138,7 +138,7 @@ int i18n_unumber_destroy ( i18n_unumber_format_h fmt ); * @retval #I18N_ERROR_NONE Successful. * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_unumber_get_symbol ( const i18n_unumber_format_h fmt, i18n_unumber_format_symbol_e symbol, i18n_uchar *buffer, int32_t size, int32_t *len_symbol ); +int i18n_unumber_get_symbol(const i18n_unumber_format_h fmt, i18n_unumber_format_symbol_e symbol, i18n_uchar *buffer, int32_t size, int32_t *len_symbol); // Newly Added APIs @@ -156,7 +156,7 @@ int i18n_unumber_get_symbol ( const i18n_unumber_format_h fmt, i18n_unumber_form * @retval #I18N_ERROR_NONE Successful. * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_unumber_clone (const i18n_unumber_format_h fmt, i18n_unumber_format_h *fmt_clone); +int i18n_unumber_clone(const i18n_unumber_format_h fmt, i18n_unumber_format_h *fmt_clone); /** * @brief Formats an integer using a i18n_unumber_format_h. @@ -177,7 +177,7 @@ int i18n_unumber_clone (const i18n_unumber_format_h fmt, i18n_unumber_format_h * * * @return The total buffer size needed; if greater than result_length, the output was truncated. */ -int32_t i18n_unumber_format (const i18n_unumber_format_h fmt, int32_t number, i18n_uchar *result, int32_t result_length, i18n_ufield_position_s *pos, i18n_error_code_e *status); +int32_t i18n_unumber_format(const i18n_unumber_format_h fmt, int32_t number, i18n_uchar *result, int32_t result_length, i18n_ufield_position_s *pos, i18n_error_code_e *status); /** * @brief Formats an int64 using an #i18n_unumber_format_h. @@ -204,7 +204,7 @@ int32_t i18n_unumber_format (const i18n_unumber_format_h fmt, int32_t number, i1 * @exception #I18N_WARNING_STRING_NOT_TERMINATED If the formatted number fits into @a result but cannot be NULL-terminated (length == result_length) * @exception #I18N_ERROR_BUFFER_OVERFLOW If the formatted number doesn't fit into the @a result buffer */ -int32_t i18n_unumber_format_int64 (const i18n_unumber_format_h fmt, int64_t number, i18n_uchar *result, int32_t result_length, i18n_ufield_position_h pos); +int32_t i18n_unumber_format_int64(const i18n_unumber_format_h fmt, int64_t number, i18n_uchar *result, int32_t result_length, i18n_ufield_position_h pos); /** * @brief Formats a double using an #i18n_unumber_format_h. @@ -232,7 +232,7 @@ int32_t i18n_unumber_format_int64 (const i18n_unumber_format_h fmt, int64_t numb * @exception #I18N_WARNING_STRING_NOT_TERMINATED If the formatted number fits into @a result but cannot be NULL-terminated (length == result_length) * @exception #I18N_ERROR_BUFFER_OVERFLOW If the formatted number doesn't fit into the @a result buffer */ -int32_t i18n_unumber_format_double (const i18n_unumber_format_h fmt, double number, i18n_uchar *result, int32_t result_length, i18n_ufield_position_h pos); +int32_t i18n_unumber_format_double(const i18n_unumber_format_h fmt, double number, i18n_uchar *result, int32_t result_length, i18n_ufield_position_h pos); /** * @brief Formats a decimal number using an #i18n_unumber_format_h. @@ -263,7 +263,7 @@ int32_t i18n_unumber_format_double (const i18n_unumber_format_h fmt, double numb * @exception #I18N_WARNING_STRING_NOT_TERMINATED If the formatted number fits into @a result but cannot be NULL-terminated (length == result_length) * @exception #I18N_ERROR_BUFFER_OVERFLOW If the formatted number doesn't fit into the @a result buffer */ -int32_t i18n_unumber_format_decimal (const i18n_unumber_format_h fmt, const char *number, int32_t length, i18n_uchar *result, int32_t result_length, i18n_ufield_position_h pos); +int32_t i18n_unumber_format_decimal(const i18n_unumber_format_h fmt, const char *number, int32_t length, i18n_uchar *result, int32_t result_length, i18n_ufield_position_h pos); /** * @brief Formats a double currency amount using an #i18n_unumber_format_h. @@ -293,7 +293,7 @@ int32_t i18n_unumber_format_decimal (const i18n_unumber_format_h fmt, const char * @exception #I18N_WARNING_STRING_NOT_TERMINATED If the formatted number fits into @a result but cannot be NULL-terminated (length == result_length) * @exception #I18N_ERROR_BUFFER_OVERFLOW If the formatted number doesn't fit into the @a result buffer */ -int32_t i18n_unumber_format_double_currency (const i18n_unumber_format_h fmt, double number, i18n_uchar *currency, i18n_uchar *result, int32_t result_length, i18n_ufield_position_h pos); +int32_t i18n_unumber_format_double_currency(const i18n_unumber_format_h fmt, double number, i18n_uchar *currency, i18n_uchar *result, int32_t result_length, i18n_ufield_position_h pos); /** * @brief Parses a string into an integer using an #i18n_unumber_format_h. @@ -313,7 +313,7 @@ int32_t i18n_unumber_format_double_currency (const i18n_unumber_format_h fmt, do * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_unumber_parse (const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos); +int32_t i18n_unumber_parse(const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos); /** * @brief Parses a string into an int64 using an #i18n_unumber_format_h. @@ -333,7 +333,7 @@ int32_t i18n_unumber_parse (const i18n_unumber_format_h fmt, const i18n_uchar *t * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int64_t i18n_unumber_parse_int64 (const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos); +int64_t i18n_unumber_parse_int64(const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos); /** * @brief Parses a string into a double using an #i18n_unumber_format_h. @@ -353,7 +353,7 @@ int64_t i18n_unumber_parse_int64 (const i18n_unumber_format_h fmt, const i18n_uc * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -double i18n_unumber_parse_double (const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos); +double i18n_unumber_parse_double(const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos); /** * @brief Parses a number from a string into an unformatted numeric string using an #i18n_unumber_format_h. @@ -379,7 +379,7 @@ double i18n_unumber_parse_double (const i18n_unumber_format_h fmt, const i18n_uc * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_unumber_parse_decimal (const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos, char *out_buf, int32_t out_buf_length); +int32_t i18n_unumber_parse_decimal(const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos, char *out_buf, int32_t out_buf_length); /** * @brief Parses a string into a double and a currency using an #i18n_unumber_format_h. @@ -403,7 +403,7 @@ int32_t i18n_unumber_parse_decimal (const i18n_unumber_format_h fmt, const i18n_ * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -double i18n_unumber_parse_double_currency (const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos, i18n_uchar *currency); +double i18n_unumber_parse_double_currency(const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos, i18n_uchar *currency); /** * @brief Sets the pattern used by an #i18n_unumber_format_h. @@ -422,7 +422,7 @@ double i18n_unumber_parse_double_currency (const i18n_unumber_format_h fmt, cons * @retval #I18N_ERROR_NONE Successful. * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_unumber_apply_pattern (i18n_unumber_format_h format, i18n_ubool localized, const i18n_uchar *pattern, int32_t pattern_length, i18n_uparse_error_s* parse_error); +int i18n_unumber_apply_pattern(i18n_unumber_format_h format, i18n_ubool localized, const i18n_uchar *pattern, int32_t pattern_length, i18n_uparse_error_s* parse_error); /** * @brief Gets a locale for which decimal formatting patterns are available. @@ -438,7 +438,7 @@ int i18n_unumber_apply_pattern (i18n_unumber_format_h format, i18n_ubool localiz * * @exception #I18N_ERROR_NONE Successful */ -const char *i18n_unumber_get_available (int32_t locale_index); +const char *i18n_unumber_get_available(int32_t locale_index); /** * @brief Determines how many locales have decimal formatting patterns available. @@ -452,7 +452,7 @@ const char *i18n_unumber_get_available (int32_t locale_index); * * @exception #I18N_ERROR_NONE Successful */ -int32_t i18n_unumber_count_available (void); +int32_t i18n_unumber_count_available(void); /** * @brief Gets a numeric attribute associated with an #i18n_unumber_format_h. @@ -474,7 +474,7 @@ int32_t i18n_unumber_count_available (void); * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_unumber_get_attribute (const i18n_unumber_format_h fmt, i18n_unumber_format_attribute_e attr); +int32_t i18n_unumber_get_attribute(const i18n_unumber_format_h fmt, i18n_unumber_format_attribute_e attr); /** * @brief Sets a numeric attribute associated with an #i18n_unumber_format_h. @@ -499,7 +499,7 @@ int32_t i18n_unumber_get_attribute (const i18n_unumber_format_h fmt, i18n_unumbe * @retval #I18N_ERROR_NONE Successful. * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_unumber_set_attribute (i18n_unumber_format_h fmt, i18n_unumber_format_attribute_e attr, int32_t new_value); +int i18n_unumber_set_attribute(i18n_unumber_format_h fmt, i18n_unumber_format_attribute_e attr, int32_t new_value); /** * @brief Gets a numeric attribute associated with an #i18n_unumber_format_h. @@ -517,7 +517,7 @@ int i18n_unumber_set_attribute (i18n_unumber_format_h fmt, i18n_unumber_format_a * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -double i18n_unumber_get_double_attribute (const i18n_unumber_format_h fmt, i18n_unumber_format_attribute_e attr); +double i18n_unumber_get_double_attribute(const i18n_unumber_format_h fmt, i18n_unumber_format_attribute_e attr); /** * @brief Sets a numeric attribute associated with an #i18n_unumber_format_h. @@ -534,7 +534,7 @@ double i18n_unumber_get_double_attribute (const i18n_unumber_format_h fmt, i18n_ * @retval #I18N_ERROR_NONE Successful. * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_unumber_set_double_attribute (i18n_unumber_format_h fmt, i18n_unumber_format_attribute_e attr, double new_value); +int i18n_unumber_set_double_attribute(i18n_unumber_format_h fmt, i18n_unumber_format_attribute_e attr, double new_value); /** * @brief Gets a text attribute associated with an #i18n_unumber_format_h. @@ -557,7 +557,7 @@ int i18n_unumber_set_double_attribute (i18n_unumber_format_h fmt, i18n_unumber_f * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_unumber_get_text_attribute (const i18n_unumber_format_h fmt, i18n_unumber_format_text_attribute_e tag, i18n_uchar *result, int32_t result_length); +int32_t i18n_unumber_get_text_attribute(const i18n_unumber_format_h fmt, i18n_unumber_format_text_attribute_e tag, i18n_uchar *result, int32_t result_length); /** * @brief Sets a text attribute associated with an #i18n_unumber_format_h. @@ -577,7 +577,7 @@ int32_t i18n_unumber_get_text_attribute (const i18n_unumber_format_h fmt, i18n_u * @retval #I18N_ERROR_NONE Successful. * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_unumber_set_text_attribute (const i18n_unumber_format_h fmt, i18n_unumber_format_text_attribute_e tag, const i18n_uchar *new_value, int32_t new_value_length); +int i18n_unumber_set_text_attribute(const i18n_unumber_format_h fmt, i18n_unumber_format_text_attribute_e tag, const i18n_uchar *new_value, int32_t new_value_length); /** * @brief Extracts the pattern from an #i18n_unumber_format_h. @@ -597,7 +597,7 @@ int i18n_unumber_set_text_attribute (const i18n_unumber_format_h fmt, i18n_unumb * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_unumber_to_pattern (const i18n_unumber_format_h fmt, i18n_ubool is_pattern_localized, i18n_uchar *result, int32_t result_length); +int32_t i18n_unumber_to_pattern(const i18n_unumber_format_h fmt, i18n_ubool is_pattern_localized, i18n_uchar *result, int32_t result_length); /** * @brief Sets a symbol associated with an #i18n_unumber_format_h. @@ -615,7 +615,7 @@ int32_t i18n_unumber_to_pattern (const i18n_unumber_format_h fmt, i18n_ubool is_ * @retval #I18N_ERROR_NONE Successful. * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_unumber_set_symbol (i18n_unumber_format_h fmt, i18n_unumber_format_symbol_e symbol, const i18n_uchar *value, int32_t length); +int i18n_unumber_set_symbol(i18n_unumber_format_h fmt, i18n_unumber_format_symbol_e symbol, const i18n_uchar *value, int32_t length); /** * @brief Gets the locale for this number format object. @@ -632,7 +632,7 @@ int i18n_unumber_set_symbol (i18n_unumber_format_h fmt, i18n_unumber_format_symb * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -const char *i18n_unumber_get_locale_by_type (const i18n_unumber_format_h fmt, i18n_ulocale_data_locale_type_e type); +const char *i18n_unumber_get_locale_by_type(const i18n_unumber_format_h fmt, i18n_ulocale_data_locale_type_e type); #ifdef __cplusplus diff --git a/src/include/wearable/utils_i18n_usearch.h b/src/include/wearable/utils_i18n_usearch.h index 8b1e1b9..95ac13a 100755 --- a/src/include/wearable/utils_i18n_usearch.h +++ b/src/include/wearable/utils_i18n_usearch.h @@ -101,7 +101,7 @@ extern "C" { * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_usearch_create_new ( const i18n_uchar *pattern, int32_t pattern_len, const i18n_uchar *text, +int i18n_usearch_create_new(const i18n_uchar *pattern, int32_t pattern_len, const i18n_uchar *text, int32_t text_len, const char *locale, i18n_ubreak_iterator_h break_iter, i18n_usearch_h *search_iter); /** @@ -114,7 +114,7 @@ int i18n_usearch_create_new ( const i18n_uchar *pattern, int32_t pattern_len, co * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_usearch_destroy ( i18n_usearch_h search_iter ); +int i18n_usearch_destroy(i18n_usearch_h search_iter); /** * @brief Returns the text that matches by the most recent call to i18n_usearch_first(), or so on. @@ -136,7 +136,7 @@ int i18n_usearch_destroy ( i18n_usearch_h search_iter ); * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @retval #I18N_ERROR_BUFFER_OVERFLOW A result would not fit in the supplied buffer */ -int i18n_usearch_get_matched_text ( const i18n_usearch_h search_iter, i18n_uchar *result, int32_t result_capacity, int32_t *len_matched_text ); +int i18n_usearch_get_matched_text(const i18n_usearch_h search_iter, i18n_uchar *result, int32_t result_capacity, int32_t *len_matched_text); /** * @brief Gets the collator used for the language rules. @@ -151,7 +151,7 @@ int i18n_usearch_get_matched_text ( const i18n_usearch_h search_iter, i18n_uchar * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_usearch_get_collator ( const i18n_usearch_h search_iter, i18n_ucollator_h *collator ); +int i18n_usearch_get_collator(const i18n_usearch_h search_iter, i18n_ucollator_h *collator); /** * @brief Returns the first index at which the string text matches the search pattern. @@ -168,7 +168,7 @@ int i18n_usearch_get_collator ( const i18n_usearch_h search_iter, i18n_ucollator * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_usearch_first ( i18n_usearch_h search_iter, int32_t *index_first ); +int i18n_usearch_first(i18n_usearch_h search_iter, int32_t *index_first); #ifdef __cplusplus } diff --git a/src/include/wearable/utils_i18n_uset.h b/src/include/wearable/utils_i18n_uset.h index 6cf528e..8e40c1f 100755 --- a/src/include/wearable/utils_i18n_uset.h +++ b/src/include/wearable/utils_i18n_uset.h @@ -63,7 +63,7 @@ extern "C" { * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_uset_destroy() */ -int i18n_uset_create_empty (i18n_uset_h *set); +int i18n_uset_create_empty(i18n_uset_h *set); /** * @brief Creates an #i18n_uset_h object that contains the range of characters @@ -81,7 +81,7 @@ int i18n_uset_create_empty (i18n_uset_h *set); * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_uset_destroy() */ -int i18n_uset_create (i18n_uchar32 start, i18n_uchar32 end, i18n_uset_h *set); +int i18n_uset_create(i18n_uchar32 start, i18n_uchar32 end, i18n_uset_h *set); /** * @brief Creates a set based on a given pattern. @@ -98,7 +98,7 @@ int i18n_uset_create (i18n_uchar32 start, i18n_uchar32 end, i18n_uset_h *set); * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_uset_destroy() */ -int i18n_uset_create_pattern (const i18n_uchar *pattern, int32_t pattern_length, i18n_uset_h *set); +int i18n_uset_create_pattern(const i18n_uchar *pattern, int32_t pattern_length, i18n_uset_h *set); /** * @brief Creates a set based on a given pattern. @@ -117,7 +117,7 @@ int i18n_uset_create_pattern (const i18n_uchar *pattern, int32_t pattern_length, * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_uset_destroy() */ -int i18n_uset_create_pattern_options (const i18n_uchar *pattern, int32_t pattern_length, uint32_t options, i18n_uset_h *set); +int i18n_uset_create_pattern_options(const i18n_uchar *pattern, int32_t pattern_length, uint32_t options, i18n_uset_h *set); /** * @brief Disposes of the storage used by a #i18n_uset_h object. @@ -130,7 +130,7 @@ int i18n_uset_create_pattern_options (const i18n_uchar *pattern, int32_t pattern * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_uset_destroy (i18n_uset_h set); +int i18n_uset_destroy(i18n_uset_h set); /** * @brief Returns a copy of this object. @@ -146,7 +146,7 @@ int i18n_uset_destroy (i18n_uset_h set); * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_uset_clone_as_thawed() */ -int i18n_uset_clone (const i18n_uset_h set, i18n_uset_h *set_clone); +int i18n_uset_clone(const i18n_uset_h set, i18n_uset_h *set_clone); /** * @brief Determines whether the set has been frozen (made immutable) or not. @@ -164,7 +164,7 @@ int i18n_uset_clone (const i18n_uset_h set, i18n_uset_h *set_clone); * @see i18n_uset_freeze() * @see i18n_uset_clone_as_thawed() */ -i18n_ubool i18n_uset_is_frozen (const i18n_uset_h set); +i18n_ubool i18n_uset_is_frozen(const i18n_uset_h set); /** * @brief Freezes the set (make it immutable). @@ -185,7 +185,7 @@ i18n_ubool i18n_uset_is_frozen (const i18n_uset_h set); * @see i18n_uset_is_frozen() * @see i18n_uset_clone_as_thawed() */ -int i18n_uset_freeze (i18n_uset_h set); +int i18n_uset_freeze(i18n_uset_h set); /** * @brief Clones the set and make the clone mutable. @@ -202,7 +202,7 @@ int i18n_uset_freeze (i18n_uset_h set); * @see i18n_uset_is_frozen() * @see i18n_uset_clone() */ -int i18n_uset_clone_as_thawed (const i18n_uset_h set, i18n_uset_h *set_copy); +int i18n_uset_clone_as_thawed(const i18n_uset_h set, i18n_uset_h *set_copy); /** * @brief Causes the #i18n_uset_h object to represent the range start - end. @@ -218,7 +218,7 @@ int i18n_uset_clone_as_thawed (const i18n_uset_h set, i18n_uset_h *set_copy); * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_uset_set (i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end); +int i18n_uset_set(i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end); /** * @brief Modifies the set to represent the set specified by the given @@ -248,7 +248,7 @@ int i18n_uset_set (i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end); * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_uset_apply_pattern (i18n_uset_h set, const i18n_uchar *pattern, int32_t pattern_length, uint32_t options); +int32_t i18n_uset_apply_pattern(i18n_uset_h set, const i18n_uchar *pattern, int32_t pattern_length, uint32_t options); /** * @brief Modifies the set to contain those code points which have the given value @@ -271,7 +271,7 @@ int32_t i18n_uset_apply_pattern (i18n_uset_h set, const i18n_uchar *pattern, int * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_uset_apply_int_property_value (i18n_uset_h set, i18n_uchar_uproperty_e prop, int32_t value); +int i18n_uset_apply_int_property_value(i18n_uset_h set, i18n_uchar_uproperty_e prop, int32_t value); /** * @brief Modifies the set to contain those code points which have the @@ -305,7 +305,7 @@ int i18n_uset_apply_int_property_value (i18n_uset_h set, i18n_uchar_uproperty_e * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_uset_apply_property_alias (i18n_uset_h set, const i18n_uchar *prop, int32_t prop_length, const i18n_uchar *value, int32_t value_length); +int i18n_uset_apply_property_alias(i18n_uset_h set, const i18n_uchar *prop, int32_t prop_length, const i18n_uchar *value, int32_t value_length); /** * @brief Return true if the given position, in the given pattern, appears @@ -324,7 +324,7 @@ int i18n_uset_apply_property_alias (i18n_uset_h set, const i18n_uchar *prop, int * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_ubool i18n_uset_resembles_pattern (const i18n_uchar *pattern, int32_t pattern_length, int32_t pos); +i18n_ubool i18n_uset_resembles_pattern(const i18n_uchar *pattern, int32_t pattern_length, int32_t pos); /** * @brief Returns a string representation of the given @a set. @@ -347,7 +347,7 @@ i18n_ubool i18n_uset_resembles_pattern (const i18n_uchar *pattern, int32_t patte * * @see i18n_uset_pattern_create() */ -int32_t i18n_uset_to_pattern (const i18n_uset_h set, i18n_uchar *result, int32_t result_capacity, i18n_ubool escape_unprintable); +int32_t i18n_uset_to_pattern(const i18n_uset_h set, i18n_uchar *result, int32_t result_capacity, i18n_ubool escape_unprintable); /** * @brief Adds the given character to the given #i18n_uset_h. @@ -364,7 +364,7 @@ int32_t i18n_uset_to_pattern (const i18n_uset_h set, i18n_uchar *result, int32_t * * @see i18n_uset_contains() */ -int i18n_uset_add (i18n_uset_h set, i18n_uchar32 character); +int i18n_uset_add(i18n_uset_h set, i18n_uchar32 character); /** @@ -383,7 +383,7 @@ int i18n_uset_add (i18n_uset_h set, i18n_uchar32 character); * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_uset_add_all (i18n_uset_h set, const i18n_uset_h additional_set); +int i18n_uset_add_all(i18n_uset_h set, const i18n_uset_h additional_set); /** * @brief Adds the given range of characters to the given #i18n_uset_h. After this call, @@ -400,7 +400,7 @@ int i18n_uset_add_all (i18n_uset_h set, const i18n_uset_h additional_set); * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_uset_contains() */ -int i18n_uset_add_range (i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end); +int i18n_uset_add_range(i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end); /** * @brief Adds the given string to the given #i18n_uset_h. @@ -417,7 +417,7 @@ int i18n_uset_add_range (i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end); * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_uset_contains_string() */ -int i18n_uset_add_string (i18n_uset_h set, const i18n_uchar *str, int32_t str_len); +int i18n_uset_add_string(i18n_uset_h set, const i18n_uchar *str, int32_t str_len); /** * @brief Adds each of the characters in this string to the set. Thus "ch" => {"c", "h"} @@ -433,7 +433,7 @@ int i18n_uset_add_string (i18n_uset_h set, const i18n_uchar *str, int32_t str_le * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_uset_add_all_code_points (i18n_uset_h set, const i18n_uchar *str, int32_t str_len); +int i18n_uset_add_all_code_points(i18n_uset_h set, const i18n_uchar *str, int32_t str_len); /** * @brief Removes the given @a character from the given #i18n_uset_h. @@ -450,7 +450,7 @@ int i18n_uset_add_all_code_points (i18n_uset_h set, const i18n_uchar *str, int32 * * @see i18n_uset_contains() */ -int i18n_uset_remove (i18n_uset_h set, i18n_uchar32 character); +int i18n_uset_remove(i18n_uset_h set, i18n_uchar32 character); /** * @brief Removes the given range of characters from the given #i18n_uset_h. @@ -467,7 +467,7 @@ int i18n_uset_remove (i18n_uset_h set, i18n_uchar32 character); * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_uset_contains() */ -int i18n_uset_remove_range (i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end); +int i18n_uset_remove_range(i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end); /** * @brief Removes the given string to the given #i18n_uset_h. @@ -484,7 +484,7 @@ int i18n_uset_remove_range (i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 en * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_uset_contains_string() */ -int i18n_uset_remove_string (i18n_uset_h set, const i18n_uchar *str, int32_t str_len); +int i18n_uset_remove_string(i18n_uset_h set, const i18n_uchar *str, int32_t str_len); /** * @brief Removes from this set all of its elements that are contained in the specified set. @@ -501,7 +501,7 @@ int i18n_uset_remove_string (i18n_uset_h set, const i18n_uchar *str, int32_t str * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_uset_remove_all (i18n_uset_h set, const i18n_uset_h remove_set); +int i18n_uset_remove_all(i18n_uset_h set, const i18n_uset_h remove_set); /** * @brief Retains only the elements in this set that are contained in the specified range. @@ -520,7 +520,7 @@ int i18n_uset_remove_all (i18n_uset_h set, const i18n_uset_h remove_set); * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_uset_retain (i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end); +int i18n_uset_retain(i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end); /** * @brief Retains only the elements in this set that are contained in the @@ -539,7 +539,7 @@ int i18n_uset_retain (i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end); * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_uset_retain_all (i18n_uset_h set, const i18n_uset_h retain); +int i18n_uset_retain_all(i18n_uset_h set, const i18n_uset_h retain); /** * @brief Reallocates this objects internal structures to take up the least @@ -553,7 +553,7 @@ int i18n_uset_retain_all (i18n_uset_h set, const i18n_uset_h retain); * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_uset_compact (i18n_uset_h set); +int i18n_uset_compact(i18n_uset_h set); /** * @brief Inverts this set. This operation modifies this set so that @@ -569,7 +569,7 @@ int i18n_uset_compact (i18n_uset_h set); * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_uset_complement (i18n_uset_h set); +int i18n_uset_complement(i18n_uset_h set); /** * @brief Complements in this set all elements contained in the specified set. @@ -586,7 +586,7 @@ int i18n_uset_complement (i18n_uset_h set); * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_uset_complement_all (i18n_uset_h set, const i18n_uset_h complement); +int i18n_uset_complement_all(i18n_uset_h set, const i18n_uset_h complement); /** * @brief Removes all of the elements from this set. @@ -600,7 +600,7 @@ int i18n_uset_complement_all (i18n_uset_h set, const i18n_uset_h complement); * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_uset_clear (i18n_uset_h set); +int i18n_uset_clear(i18n_uset_h set); /** * @brief Closes this set over the given attribute. @@ -633,7 +633,7 @@ int i18n_uset_clear (i18n_uset_h set); * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ustring_fold_case() */ -int i18n_uset_destroy_over (i18n_uset_h set, int32_t attributes); +int i18n_uset_destroy_over(i18n_uset_h set, int32_t attributes); /** * @brief Removes all strings from this set. @@ -645,7 +645,7 @@ int i18n_uset_destroy_over (i18n_uset_h set, int32_t attributes); * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_uset_remove_all_strings (i18n_uset_h set); +int i18n_uset_remove_all_strings(i18n_uset_h set); /** * @brief Returns true if the given #i18n_uset_h contains no characters and no @@ -661,7 +661,7 @@ int i18n_uset_remove_all_strings (i18n_uset_h set); * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_ubool i18n_uset_is_empty (const i18n_uset_h set); +i18n_ubool i18n_uset_is_empty(const i18n_uset_h set); /** * @brief Returns @c true if the given #i18n_uset_h contains the given @a character. @@ -678,7 +678,7 @@ i18n_ubool i18n_uset_is_empty (const i18n_uset_h set); * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_ubool i18n_uset_contains (const i18n_uset_h set, i18n_uchar32 character); +i18n_ubool i18n_uset_contains(const i18n_uset_h set, i18n_uchar32 character); /** * @brief Returns true if the given #i18n_uset_h contains all characters c @@ -696,7 +696,7 @@ i18n_ubool i18n_uset_contains (const i18n_uset_h set, i18n_uchar32 character); * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_ubool i18n_uset_contains_range (const i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end); +i18n_ubool i18n_uset_contains_range(const i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end); /** * @brief Returns true if the given #i18n_uset_h contains the given string. @@ -713,7 +713,7 @@ i18n_ubool i18n_uset_contains_range (const i18n_uset_h set, i18n_uchar32 start, * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_ubool i18n_uset_contains_string (const i18n_uset_h set, const i18n_uchar *str, int32_t str_len); +i18n_ubool i18n_uset_contains_string(const i18n_uset_h set, const i18n_uchar *str, int32_t str_len); /** * @brief Returns the index of the given @a character within this @a set, where @@ -732,7 +732,7 @@ i18n_ubool i18n_uset_contains_string (const i18n_uset_h set, const i18n_uchar *s * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_uset_index_of (const i18n_uset_h set, i18n_uchar32 character); +int32_t i18n_uset_index_of(const i18n_uset_h set, i18n_uchar32 character); /** * @brief Returns the character at the given index within this set, where @@ -751,7 +751,7 @@ int32_t i18n_uset_index_of (const i18n_uset_h set, i18n_uchar32 character); * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar32 i18n_uset_char_at (const i18n_uset_h set, int32_t char_index); +i18n_uchar32 i18n_uset_char_at(const i18n_uset_h set, int32_t char_index); /** * @brief Returns the number of characters and strings contained in the given #i18n_uset_h. @@ -767,7 +767,7 @@ i18n_uchar32 i18n_uset_char_at (const i18n_uset_h set, int32_t char_index); * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_uset_size (const i18n_uset_h set); +int32_t i18n_uset_size(const i18n_uset_h set); /** * @brief Returns the number of items in this set. @@ -784,7 +784,7 @@ int32_t i18n_uset_size (const i18n_uset_h set); * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_uset_get_item_count (const i18n_uset_h set); +int32_t i18n_uset_get_item_count(const i18n_uset_h set); /** * @brief Returns an item of this set. @@ -809,7 +809,7 @@ int32_t i18n_uset_get_item_count (const i18n_uset_h set); * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_uset_get_item (const i18n_uset_h set, int32_t item_index, i18n_uchar32 *start, i18n_uchar32 *end, i18n_uchar *str, int32_t str_capacity); +int32_t i18n_uset_get_item(const i18n_uset_h set, int32_t item_index, i18n_uchar32 *start, i18n_uchar32 *end, i18n_uchar *str, int32_t str_capacity); /** * @brief Returns true if set1 contains all the characters and strings of set2. It answers the question, 'Is set1 a superset of set2?' @@ -825,7 +825,7 @@ int32_t i18n_uset_get_item (const i18n_uset_h set, int32_t item_index, i18n_ucha * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_ubool i18n_uset_contains_all (const i18n_uset_h set1, const i18n_uset_h set2); +i18n_ubool i18n_uset_contains_all(const i18n_uset_h set1, const i18n_uset_h set2); /** * @brief Returns true if this set contains all the characters of the given string. @@ -844,7 +844,7 @@ i18n_ubool i18n_uset_contains_all (const i18n_uset_h set1, const i18n_uset_h set * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_ubool i18n_uset_contains_all_code_points (const i18n_uset_h set, const i18n_uchar *str, int32_t str_len); +i18n_ubool i18n_uset_contains_all_code_points(const i18n_uset_h set, const i18n_uchar *str, int32_t str_len); /** * @brief Returns true if set1 contains none of the characters and strings of set2. @@ -861,7 +861,7 @@ i18n_ubool i18n_uset_contains_all_code_points (const i18n_uset_h set, const i18n * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_ubool i18n_uset_contains_none (const i18n_uset_h set1, const i18n_uset_h set2); +i18n_ubool i18n_uset_contains_none(const i18n_uset_h set1, const i18n_uset_h set2); /** * @brief Returns true if set1 contains some of the characters and strings of set2. @@ -878,7 +878,7 @@ i18n_ubool i18n_uset_contains_none (const i18n_uset_h set1, const i18n_uset_h se * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_ubool i18n_uset_contains_some (const i18n_uset_h set1, const i18n_uset_h set2); +i18n_ubool i18n_uset_contains_some(const i18n_uset_h set1, const i18n_uset_h set2); /** * @brief Returns the length of the initial substring of the input string which @@ -907,7 +907,7 @@ i18n_ubool i18n_uset_contains_some (const i18n_uset_h set1, const i18n_uset_h se * * @see #i18n_uset_span_condition_e */ -int32_t i18n_uset_span (const i18n_uset_h set, const i18n_uchar *str, int32_t length, i18n_uset_span_condition_e span_condition); +int32_t i18n_uset_span(const i18n_uset_h set, const i18n_uchar *str, int32_t length, i18n_uset_span_condition_e span_condition); /** * @brief Returns the start of the trailing substring of the input string which @@ -935,7 +935,7 @@ int32_t i18n_uset_span (const i18n_uset_h set, const i18n_uchar *str, int32_t le * * @see #i18n_uset_span_condition_e */ -int32_t i18n_uset_span_back (const i18n_uset_h set, const i18n_uchar *str, int32_t length, i18n_uset_span_condition_e span_condition); +int32_t i18n_uset_span_back(const i18n_uset_h set, const i18n_uchar *str, int32_t length, i18n_uset_span_condition_e span_condition); /** * @brief Returns the length of the initial substring of the input string which @@ -964,7 +964,7 @@ int32_t i18n_uset_span_back (const i18n_uset_h set, const i18n_uchar *str, int32 * * @see #i18n_uset_span_condition_e */ -int32_t i18n_uset_span_utf8 (const i18n_uset_h set, const char *str, int32_t length, i18n_uset_span_condition_e span_condition); +int32_t i18n_uset_span_utf8(const i18n_uset_h set, const char *str, int32_t length, i18n_uset_span_condition_e span_condition); /** * @brief Returns the start of the trailing substring of the input string which @@ -992,7 +992,7 @@ int32_t i18n_uset_span_utf8 (const i18n_uset_h set, const char *str, int32_t len * * @see #i18n_uset_span_condition_e */ -int32_t i18n_uset_span_back_utf8 (const i18n_uset_h set, const char *str, int32_t length, i18n_uset_span_condition_e span_condition); +int32_t i18n_uset_span_back_utf8(const i18n_uset_h set, const char *str, int32_t length, i18n_uset_span_condition_e span_condition); /** * @brief Returns true if set1 contains all of the characters and strings @@ -1009,7 +1009,7 @@ int32_t i18n_uset_span_back_utf8 (const i18n_uset_h set, const char *str, int32_ * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_ubool i18n_uset_equals (const i18n_uset_h set1, const i18n_uset_h set2); +i18n_ubool i18n_uset_equals(const i18n_uset_h set1, const i18n_uset_h set2); /********************************************************************* * Serialized set API @@ -1070,7 +1070,7 @@ i18n_ubool i18n_uset_equals (const i18n_uset_h set1, const i18n_uset_h set2); * @exception #I18N_ERROR_INDEX_OUTOFBOUNDS If n+2*m > 0x7FFF * @exception #I18N_ERROR_BUFFER_OVERFLOW If n+2*m+(m != 0 ? 2 : 1) > dest_capacity. */ -int32_t i18n_uset_serialize (const i18n_uset_h set, uint16_t *dest, int32_t dest_capacity); +int32_t i18n_uset_serialize(const i18n_uset_h set, uint16_t *dest, int32_t dest_capacity); /** * @brief Given a serialized array, fill in the given serialized set object. @@ -1089,7 +1089,7 @@ int32_t i18n_uset_serialize (const i18n_uset_h set, uint16_t *dest, int32_t dest * * @see #i18n_userialized_set_s */ -i18n_ubool i18n_uset_get_serialized_set (const uint16_t *src, int32_t src_length, i18n_userialized_set_s* fill_set); +i18n_ubool i18n_uset_get_serialized_set(const uint16_t *src, int32_t src_length, i18n_userialized_set_s* fill_set); /** * @brief Sets the #i18n_userialized_set_s to contain the given @a character (and nothing else). @@ -1104,7 +1104,7 @@ i18n_ubool i18n_uset_get_serialized_set (const uint16_t *src, int32_t src_length * * @see #i18n_userialized_set_s */ -int i18n_uset_set_serialized_to_one (i18n_uchar32 character, i18n_userialized_set_s* fill_set); +int i18n_uset_set_serialized_to_one(i18n_uchar32 character, i18n_userialized_set_s* fill_set); /** * @brief Returns @c true if the given #i18n_userialized_set_s contains the given @a character. @@ -1121,7 +1121,7 @@ int i18n_uset_set_serialized_to_one (i18n_uchar32 character, i18n_userialized_se * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see #i18n_userialized_set_s */ -i18n_ubool i18n_uset_serialized_contains (const i18n_userialized_set_s* set, i18n_uchar32 character); +i18n_ubool i18n_uset_serialized_contains(const i18n_userialized_set_s* set, i18n_uchar32 character); /** * @brief Returns the number of disjoint ranges of characters contained in @@ -1139,7 +1139,7 @@ i18n_ubool i18n_uset_serialized_contains (const i18n_userialized_set_s* set, i18 * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see #i18n_userialized_set_s */ -int32_t i18n_uset_get_serialized_range_count (const i18n_userialized_set_s* set); +int32_t i18n_uset_get_serialized_range_count(const i18n_userialized_set_s* set); /** * @brief Returns a range of characters contained in the given serialized set. @@ -1161,7 +1161,7 @@ int32_t i18n_uset_get_serialized_range_count (const i18n_userialized_set_s* set) * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see #i18n_userialized_set_s */ -i18n_ubool i18n_uset_get_serialized_range (const i18n_userialized_set_s* set, int32_t range_index, i18n_uchar32 *p_start, i18n_uchar32 *p_end); +i18n_ubool i18n_uset_get_serialized_range(const i18n_userialized_set_s* set, int32_t range_index, i18n_uchar32 *p_start, i18n_uchar32 *p_end); /** * @} diff --git a/src/include/wearable/utils_i18n_ustring.h b/src/include/wearable/utils_i18n_ustring.h index 4e67aa0..92d5ae0 100755 --- a/src/include/wearable/utils_i18n_ustring.h +++ b/src/include/wearable/utils_i18n_ustring.h @@ -83,7 +83,7 @@ extern "C" { * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ustring_get_length ( const i18n_uchar *s ); +int32_t i18n_ustring_get_length(const i18n_uchar *s); /** * @brief Counts Unicode code points in the length #i18n_uchar code units of the string. @@ -101,7 +101,7 @@ int32_t i18n_ustring_get_length ( const i18n_uchar *s ); * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ustring_count_char32 ( const i18n_uchar *s, int32_t length ); +int32_t i18n_ustring_count_char32(const i18n_uchar *s, int32_t length); /** * @brief Checks if the string contains more Unicode code points than a certain number. @@ -122,7 +122,7 @@ int32_t i18n_ustring_count_char32 ( const i18n_uchar *s, int32_t length ); * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_ubool i18n_ustring_has_more_char32_than ( const i18n_uchar *s, int32_t length, int32_t number ); +i18n_ubool i18n_ustring_has_more_char32_than(const i18n_uchar *s, int32_t length, int32_t number); /** * @brief Concatenates two ustrings. @@ -139,7 +139,7 @@ i18n_ubool i18n_ustring_has_more_char32_than ( const i18n_uchar *s, int32_t leng * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_cat ( i18n_uchar *dest, const i18n_uchar *src ); +i18n_uchar* i18n_ustring_cat(i18n_uchar *dest, const i18n_uchar *src); /** * @brief Concatenate two ustrings. @@ -157,7 +157,7 @@ i18n_uchar* i18n_ustring_cat ( i18n_uchar *dest, const i18n_uchar *src ); * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_cat_n ( i18n_uchar *dest, const i18n_uchar *src, int32_t n ); +i18n_uchar* i18n_ustring_cat_n(i18n_uchar *dest, const i18n_uchar *src, int32_t n); /** * @brief Finds the first occurrence of a substring in a string. @@ -182,7 +182,7 @@ i18n_uchar* i18n_ustring_cat_n ( i18n_uchar *dest, const i18n_uchar *src, int32_ * @see i18n_ustring_find_first() * @see i18n_ustring_find_last() */ -i18n_uchar* i18n_ustring_string ( const i18n_uchar *s, const i18n_uchar *sub_string ); +i18n_uchar* i18n_ustring_string(const i18n_uchar *s, const i18n_uchar *sub_string); /** * @brief Finds the first occurrence of a substring in a string. @@ -208,7 +208,7 @@ i18n_uchar* i18n_ustring_string ( const i18n_uchar *s, const i18n_uchar *sub_str * @see i18n_ustring_string() * @see i18n_ustring_find_last() */ -i18n_uchar* i18n_ustring_find_first ( const i18n_uchar *s, int32_t length, const i18n_uchar *sub_string, int32_t sub_length ); +i18n_uchar* i18n_ustring_find_first(const i18n_uchar *s, int32_t length, const i18n_uchar *sub_string, int32_t sub_length); /** * @brief Finds the first occurrence of a BMP code point in a string. @@ -229,7 +229,7 @@ i18n_uchar* i18n_ustring_find_first ( const i18n_uchar *s, int32_t length, const * @see i18n_ustring_string() * @see i18n_ustring_find_first() */ -i18n_uchar* i18n_ustring_char ( const i18n_uchar *s, i18n_uchar c ); +i18n_uchar* i18n_ustring_char(const i18n_uchar *s, i18n_uchar c); /** * @brief Finds the first occurrence of a code point in a string. @@ -250,7 +250,7 @@ i18n_uchar* i18n_ustring_char ( const i18n_uchar *s, i18n_uchar c ); * @see i18n_ustring_string() * @see i18n_ustring_find_first() */ -i18n_uchar* i18n_ustring_char32 ( const i18n_uchar *s, i18n_uchar32 c ); +i18n_uchar* i18n_ustring_char32(const i18n_uchar *s, i18n_uchar32 c); /** * @brief Finds the last occurrence of a substring in a string. @@ -273,7 +273,7 @@ i18n_uchar* i18n_ustring_char32 ( const i18n_uchar *s, i18n_uchar32 c ); * @see i18n_ustring_find_first() * @see i18n_ustring_find_last() */ -i18n_uchar* i18n_ustring_r_string ( const i18n_uchar *s, const i18n_uchar *sub_string ); +i18n_uchar* i18n_ustring_r_string(const i18n_uchar *s, const i18n_uchar *sub_string); /** * @brief Finds the last occurrence of a substring in a string. @@ -297,7 +297,7 @@ i18n_uchar* i18n_ustring_r_string ( const i18n_uchar *s, const i18n_uchar *sub_s * @see i18n_ustring_string() * @see i18n_ustring_find_first() */ -i18n_uchar* i18n_ustring_find_last( const i18n_uchar *s, int32_t length, const i18n_uchar *sub_string, int32_t sub_length ); +i18n_uchar* i18n_ustring_find_last(const i18n_uchar *s, int32_t length, const i18n_uchar *sub_string, int32_t sub_length); /** * @brief Finds the last occurrence of a BMP code point in a string. @@ -318,7 +318,7 @@ i18n_uchar* i18n_ustring_find_last( const i18n_uchar *s, int32_t length, const i * @see i18n_ustring_string() * @see i18n_ustring_find_first() */ -i18n_uchar* i18n_ustring_r_char ( const i18n_uchar *s, i18n_uchar c ); +i18n_uchar* i18n_ustring_r_char(const i18n_uchar *s, i18n_uchar c); /** * @brief Finds the last occurrence of a code point in a string. @@ -339,7 +339,7 @@ i18n_uchar* i18n_ustring_r_char ( const i18n_uchar *s, i18n_uchar c ); * @see i18n_ustring_string() * @see i18n_ustring_find_first() */ -i18n_uchar* i18n_ustring_r_char32 ( const i18n_uchar *s, i18n_uchar32 c ); +i18n_uchar* i18n_ustring_r_char32(const i18n_uchar *s, i18n_uchar32 c); /** * @brief Locates the first occurrence in the string of any of the characters in the string matchSet. @@ -356,7 +356,7 @@ i18n_uchar* i18n_ustring_r_char32 ( const i18n_uchar *s, i18n_uchar32 c ); * @return A pointer to the character in @a string that matches one of the * characters in @a match_set, or NULL if no such character is found. */ -i18n_uchar* i18n_ustring_pbrk ( const i18n_uchar *string, const i18n_uchar *match_set ); +i18n_uchar* i18n_ustring_pbrk(const i18n_uchar *string, const i18n_uchar *match_set); /** * @brief Returns the number of consecutive characters in string, beginning with the first, that do not occur somewhere in match_set. @@ -373,7 +373,7 @@ i18n_uchar* i18n_ustring_pbrk ( const i18n_uchar *string, const i18n_uchar *matc * @return The number of initial characters in @a string that do not * occur in @a match_set. */ -int32_t i18n_ustring_cspn ( const i18n_uchar *string, const i18n_uchar *match_set ); +int32_t i18n_ustring_cspn(const i18n_uchar *string, const i18n_uchar *match_set); /** * @brief Returns the number of consecutive characters in string, beginning with the first, that occur somewhere in match_set. @@ -390,7 +390,7 @@ int32_t i18n_ustring_cspn ( const i18n_uchar *string, const i18n_uchar *match_se * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ustring_spn() */ -int32_t i18n_ustring_spn ( const i18n_uchar *string, const i18n_uchar *match_set ); +int32_t i18n_ustring_spn(const i18n_uchar *string, const i18n_uchar *match_set); /** * @brief The string tokenizer API allows an application to break a string into tokens. @@ -408,7 +408,7 @@ int32_t i18n_ustring_spn ( const i18n_uchar *string, const i18n_uchar *match_set * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_tokenizer_r ( i18n_uchar *src, const i18n_uchar *delim, i18n_uchar **save_state ); +i18n_uchar* i18n_ustring_tokenizer_r(i18n_uchar *src, const i18n_uchar *delim, i18n_uchar **save_state); /** * @brief Compares two Unicode strings for bitwise equality (code unit order). @@ -424,7 +424,7 @@ i18n_uchar* i18n_ustring_tokenizer_r ( i18n_uchar *src, const i18n_uchar *delim, * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ustring_compare ( const i18n_uchar *s1, const i18n_uchar *s2 ); +int32_t i18n_ustring_compare(const i18n_uchar *s1, const i18n_uchar *s2); /** * @brief Compare two Unicode strings in code point order. @@ -441,7 +441,7 @@ int32_t i18n_ustring_compare ( const i18n_uchar *s1, const i18n_uchar *s2 ); * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ustring_compare_code_point_order( const i18n_uchar *s1, const i18n_uchar *s2 ); +int32_t i18n_ustring_compare_code_point_order(const i18n_uchar *s1, const i18n_uchar *s2); /** * @brief Compare two Unicode strings (binary order). @@ -463,7 +463,7 @@ int32_t i18n_ustring_compare_code_point_order( const i18n_uchar *s1, const i18n_ * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ustring_compare_binary_order( const i18n_uchar *s1, int32_t length1, const i18n_uchar *s2, int32_t length2, i18n_ubool code_point_order ); +int32_t i18n_ustring_compare_binary_order(const i18n_uchar *s1, int32_t length1, const i18n_uchar *s2, int32_t length2, i18n_ubool code_point_order); /** * @brief Compare two strings case-insensitively using full case folding. @@ -488,7 +488,7 @@ int32_t i18n_ustring_compare_binary_order( const i18n_uchar *s1, int32_t length1 * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ustring_case_compare_with_length( const i18n_uchar *s1, int32_t length1, const i18n_uchar *s2, int32_t length2, uint32_t options, i18n_error_code_e *error_code ); +int32_t i18n_ustring_case_compare_with_length(const i18n_uchar *s1, int32_t length1, const i18n_uchar *s2, int32_t length2, uint32_t options, i18n_error_code_e *error_code); /** * @brief Compare two ustrings for bitwise equality. @@ -506,7 +506,7 @@ int32_t i18n_ustring_case_compare_with_length( const i18n_uchar *s1, int32_t len * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ustring_compare_n( const i18n_uchar *s1, const i18n_uchar *s2, int32_t n ); +int32_t i18n_ustring_compare_n(const i18n_uchar *s1, const i18n_uchar *s2, int32_t n); /** * @brief Compare two Unicode strings in code point order. @@ -524,7 +524,7 @@ int32_t i18n_ustring_compare_n( const i18n_uchar *s1, const i18n_uchar *s2, int3 * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ustring_compare_n_code_point_order( const i18n_uchar *s1, const i18n_uchar *s2, int32_t n ); +int32_t i18n_ustring_compare_n_code_point_order(const i18n_uchar *s1, const i18n_uchar *s2, int32_t n); /** * @brief Compare two strings case-insensitively using full case folding. @@ -542,7 +542,7 @@ int32_t i18n_ustring_compare_n_code_point_order( const i18n_uchar *s1, const i18 * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ustring_case_compare( const i18n_uchar *s1, const i18n_uchar *s2, uint32_t options ); +int32_t i18n_ustring_case_compare(const i18n_uchar *s1, const i18n_uchar *s2, uint32_t options); /** * @brief Compare two strings case-insensitively using full case folding. @@ -561,7 +561,7 @@ int32_t i18n_ustring_case_compare( const i18n_uchar *s1, const i18n_uchar *s2, u * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ustring_case_compare_n( const i18n_uchar *s1, const i18n_uchar *s2, int32_t n, uint32_t options ); +int32_t i18n_ustring_case_compare_n(const i18n_uchar *s1, const i18n_uchar *s2, int32_t n, uint32_t options); /** * @brief Compare two strings case-insensitively using full case folding. @@ -580,7 +580,7 @@ int32_t i18n_ustring_case_compare_n( const i18n_uchar *s1, const i18n_uchar *s2, * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ustring_mem_case_compare( const i18n_uchar *s1, const i18n_uchar *s2, int32_t length, uint32_t options ); +int32_t i18n_ustring_mem_case_compare(const i18n_uchar *s1, const i18n_uchar *s2, int32_t length, uint32_t options); /** * @brief Copies a ustring. Adds a NULL terminator. @@ -595,7 +595,7 @@ int32_t i18n_ustring_mem_case_compare( const i18n_uchar *s1, const i18n_uchar *s * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_copy ( i18n_uchar *dest, const i18n_uchar *src ); +i18n_uchar* i18n_ustring_copy(i18n_uchar *dest, const i18n_uchar *src); /** * @brief Copies a ustring. @@ -613,7 +613,7 @@ i18n_uchar* i18n_ustring_copy ( i18n_uchar *dest, const i18n_uchar *src ); * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_copy_n ( i18n_uchar *dest, const i18n_uchar *src, int32_t n ); +i18n_uchar* i18n_ustring_copy_n(i18n_uchar *dest, const i18n_uchar *src, int32_t n); /** * @brief Copies a byte string encoded in the default codepage to a ustring. @@ -629,7 +629,7 @@ i18n_uchar* i18n_ustring_copy_n ( i18n_uchar *dest, const i18n_uchar *src, int32 * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_copy_ua ( i18n_uchar *dest, const char *src ); +i18n_uchar* i18n_ustring_copy_ua(i18n_uchar *dest, const char *src); /** * @brief Copies a byte string encoded in the default codepage to a ustring. @@ -648,7 +648,7 @@ i18n_uchar* i18n_ustring_copy_ua ( i18n_uchar *dest, const char *src ); * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_copy_ua_n ( i18n_uchar *dest, const char *src, int32_t n ); +i18n_uchar* i18n_ustring_copy_ua_n(i18n_uchar *dest, const char *src, int32_t n); /** * @brief Copies a ustring to a byte string encoded in the default codepage. @@ -664,7 +664,7 @@ i18n_uchar* i18n_ustring_copy_ua_n ( i18n_uchar *dest, const char *src, int32_t * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -char* i18n_ustring_copy_au ( char *dest, const i18n_uchar *src ); +char* i18n_ustring_copy_au(char *dest, const i18n_uchar *src); /** * @brief Copies a ustring to a byte string encoded in the default codepage. @@ -683,7 +683,7 @@ char* i18n_ustring_copy_au ( char *dest, const i18n_uchar *src ); * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -char* i18n_ustring_copy_au_n ( char *dest, const i18n_uchar *src, int32_t n ); +char* i18n_ustring_copy_au_n(char *dest, const i18n_uchar *src, int32_t n); /** * @brief Synonym for memcpy(), but with #i18n_uchar characters only. @@ -699,7 +699,7 @@ char* i18n_ustring_copy_au_n ( char *dest, const i18n_uchar *src, int32_t n ); * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_mem_copy ( i18n_uchar *dest, const i18n_uchar *src, int32_t count ); +i18n_uchar* i18n_ustring_mem_copy(i18n_uchar *dest, const i18n_uchar *src, int32_t count); /** * @brief Synonym for memmove(), but with #i18n_uchar characters only. @@ -715,7 +715,7 @@ i18n_uchar* i18n_ustring_mem_copy ( i18n_uchar *dest, const i18n_uchar *src, int * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_mem_move ( i18n_uchar *dest, const i18n_uchar *src, int32_t count ); +i18n_uchar* i18n_ustring_mem_move(i18n_uchar *dest, const i18n_uchar *src, int32_t count); /** * @brief Initialize count characters of dest to c. @@ -731,7 +731,7 @@ i18n_uchar* i18n_ustring_mem_move ( i18n_uchar *dest, const i18n_uchar *src, int * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_mem_set ( i18n_uchar *dest, const i18n_uchar c, int32_t count ); +i18n_uchar* i18n_ustring_mem_set(i18n_uchar *dest, const i18n_uchar c, int32_t count); /** * @brief Compare the first count #i18n_uchar characters of each buffer. @@ -748,7 +748,7 @@ i18n_uchar* i18n_ustring_mem_set ( i18n_uchar *dest, const i18n_uchar c, int32_t * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ustring_mem_compare ( const i18n_uchar *buf1, const i18n_uchar *buf2, int32_t count ); +int32_t i18n_ustring_mem_compare(const i18n_uchar *buf1, const i18n_uchar *buf2, int32_t count); /** * @brief Compare two Unicode strings in code point order. @@ -766,7 +766,7 @@ int32_t i18n_ustring_mem_compare ( const i18n_uchar *buf1, const i18n_uchar *buf * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ustring_mem_compare_code_point_order ( const i18n_uchar *s1, const i18n_uchar *s2, int32_t count ); +int32_t i18n_ustring_mem_compare_code_point_order(const i18n_uchar *s1, const i18n_uchar *s2, int32_t count); /** * @brief Finds the first occurrence of a BMP code point in a string. @@ -786,7 +786,7 @@ int32_t i18n_ustring_mem_compare_code_point_order ( const i18n_uchar *s1, const * @see i18n_ustring_mem_char32() * @see i18n_ustring_find_first() */ -i18n_uchar* i18n_ustring_mem_char ( const i18n_uchar *s, i18n_uchar c, int32_t count ); +i18n_uchar* i18n_ustring_mem_char(const i18n_uchar *s, i18n_uchar c, int32_t count); /** * @brief Finds the first occurrence of a code point in a string. @@ -803,7 +803,7 @@ i18n_uchar* i18n_ustring_mem_char ( const i18n_uchar *s, i18n_uchar c, int32_t c * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_mem_char32 ( const i18n_uchar *s, i18n_uchar32 c, int32_t count ); +i18n_uchar* i18n_ustring_mem_char32(const i18n_uchar *s, i18n_uchar32 c, int32_t count); /** * @brief Finds the last occurrence of a BMP code point in a string. @@ -823,7 +823,7 @@ i18n_uchar* i18n_ustring_mem_char32 ( const i18n_uchar *s, i18n_uchar32 c, int32 * @see #i18n_ustring_mem_r_char32 * @see #i18n_ustring_find_last */ -i18n_uchar* i18n_ustring_mem_r_char ( const i18n_uchar *s, i18n_uchar c, int32_t count ); +i18n_uchar* i18n_ustring_mem_r_char(const i18n_uchar *s, i18n_uchar c, int32_t count); /** * @brief Finds the last occurrence of a code point in a string. @@ -843,7 +843,7 @@ i18n_uchar* i18n_ustring_mem_r_char ( const i18n_uchar *s, i18n_uchar c, int32_t * @see #i18n_ustring_mem_r_char * @see #i18n_ustring_find_last */ -i18n_uchar* i18n_ustring_mem_r_char32 ( const i18n_uchar *s, i18n_uchar32 c, int32_t count ); +i18n_uchar* i18n_ustring_mem_r_char32(const i18n_uchar *s, i18n_uchar32 c, int32_t count); /** * @brief Unescape a string of characters and write the resulting Unicode characters to the destination buffer. @@ -866,7 +866,7 @@ i18n_uchar* i18n_ustring_mem_r_char32 ( const i18n_uchar *s, i18n_uchar32 c, int * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ustring_unescape_at() */ -int32_t i18n_ustring_unescape ( const char *src, i18n_uchar *dest, int32_t dest_capacity ); +int32_t i18n_ustring_unescape(const char *src, i18n_uchar *dest, int32_t dest_capacity); /** * @brief Unescape a single sequence. @@ -890,7 +890,7 @@ int32_t i18n_ustring_unescape ( const char *src, i18n_uchar *dest, int32_t dest_ * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ustring_unescape() */ -i18n_uchar32 i18n_ustring_unescape_at ( i18n_ustring_unescape_char_at_cb char_at, int32_t *offset, int32_t length, void *context ); +i18n_uchar32 i18n_ustring_unescape_at(i18n_ustring_unescape_char_at_cb char_at, int32_t *offset, int32_t length, void *context); /** * @brief Uppercases the characters in a string. @@ -915,7 +915,7 @@ i18n_uchar32 i18n_ustring_unescape_at ( i18n_ustring_unescape_char_at_cb char_at * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ustring_to_upper ( i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, const char *locale, i18n_error_code_e *error_code ); +int32_t i18n_ustring_to_upper(i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, const char *locale, i18n_error_code_e *error_code); /** * @brief Lowercase the characters in a string. @@ -938,7 +938,7 @@ int32_t i18n_ustring_to_upper ( i18n_uchar *dest, int32_t dest_capacity, const i * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ustring_to_lower ( i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, const char *locale, i18n_error_code_e *error_code ); +int32_t i18n_ustring_to_lower(i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, const char *locale, i18n_error_code_e *error_code); /** * @brief Titlecases a string. @@ -978,7 +978,7 @@ int32_t i18n_ustring_to_lower ( i18n_uchar *dest, int32_t dest_capacity, const i * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ustring_to_title() */ -int32_t i18n_ustring_to_title_new ( i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, i18n_ubreak_iterator_h title_iter, const char *locale); +int32_t i18n_ustring_to_title_new(i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, i18n_ubreak_iterator_h title_iter, const char *locale); /** * @brief Case-folds the characters in a string. @@ -1003,7 +1003,7 @@ int32_t i18n_ustring_to_title_new ( i18n_uchar *dest, int32_t dest_capacity, con * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ustring_fold_case ( i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, uint32_t options, i18n_error_code_e *error_code ); +int32_t i18n_ustring_fold_case(i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, uint32_t options, i18n_error_code_e *error_code); /** * @brief Convert a UTF-16 string to a wchar_t string. @@ -1025,7 +1025,7 @@ int32_t i18n_ustring_fold_case ( i18n_uchar *dest, int32_t dest_capacity, const * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -wchar_t* i18n_ustring_to_WCS ( wchar_t *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_error_code_e *error_code ); +wchar_t* i18n_ustring_to_WCS(wchar_t *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_error_code_e *error_code); /** * @brief Convert a wchar_t string to UTF-16. @@ -1047,7 +1047,7 @@ wchar_t* i18n_ustring_to_WCS ( wchar_t *dest, int32_t dest_capacity, int32_t *de * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_from_WCS ( i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const wchar_t *src, int32_t src_len, i18n_error_code_e *error_code ); +i18n_uchar* i18n_ustring_from_WCS(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const wchar_t *src, int32_t src_len, i18n_error_code_e *error_code); /** * @brief Converts a UTF-16 string to UTF-8. @@ -1073,7 +1073,7 @@ i18n_uchar* i18n_ustring_from_WCS ( i18n_uchar *dest, int32_t dest_capacity, int * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ustring_from_UTF8() */ -char* i18n_ustring_to_UTF8 ( char *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_error_code_e *error_code ); +char* i18n_ustring_to_UTF8(char *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_error_code_e *error_code); /** * @brief Converts a UTF-8 string to UTF-16. @@ -1098,7 +1098,7 @@ char* i18n_ustring_to_UTF8 ( char *dest, int32_t dest_capacity, int32_t *dest_le * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_from_UTF8 ( i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const char *src, int32_t src_len, i18n_error_code_e *error_code ); +i18n_uchar* i18n_ustring_from_UTF8(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const char *src, int32_t src_len, i18n_error_code_e *error_code); /** * @brief Convert a UTF-16 string to UTF-8. @@ -1129,7 +1129,7 @@ i18n_uchar* i18n_ustring_from_UTF8 ( i18n_uchar *dest, int32_t dest_capacity, in * @see i18n_ustring_to_UTF8() * @see i18n_ustring_from_UTF8_with_sub() */ -char* i18n_ustring_to_UTF8_with_sub ( char *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_uchar32 sub_char, int32_t *num_substitutions, i18n_error_code_e *error_code ); +char* i18n_ustring_to_UTF8_with_sub(char *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_uchar32 sub_char, int32_t *num_substitutions, i18n_error_code_e *error_code); /** * @brief Convert a UTF-8 string to UTF-16. @@ -1160,8 +1160,8 @@ char* i18n_ustring_to_UTF8_with_sub ( char *dest, int32_t dest_capacity, int32_t * @see i18n_ustring_from_UTF8_lenient() * @see i18n_ustring_to_UTF8_with_sub() */ -i18n_uchar* i18n_ustring_from_UTF8_with_sub ( i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const char *src, int32_t src_len, i18n_uchar32 sub_char, - int32_t *num_substitutions, i18n_error_code_e *error_code ); +i18n_uchar* i18n_ustring_from_UTF8_with_sub(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const char *src, int32_t src_len, i18n_uchar32 sub_char, + int32_t *num_substitutions, i18n_error_code_e *error_code); /** * @brief Convert a UTF-8 string to UTF-16. @@ -1199,7 +1199,7 @@ i18n_uchar* i18n_ustring_from_UTF8_with_sub ( i18n_uchar *dest, int32_t dest_cap * @see i18n_ustring_to_UTF8_with_sub() * @see i18n_ustring_from_UTF8_with_sub() */ -i18n_uchar* i18n_ustring_from_UTF8_lenient ( i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const char *src, int32_t src_len, i18n_error_code_e *error_code ); +i18n_uchar* i18n_ustring_from_UTF8_lenient(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const char *src, int32_t src_len, i18n_error_code_e *error_code); /** * @brief Convert a UTF-16 string to UTF-32. @@ -1225,7 +1225,7 @@ i18n_uchar* i18n_ustring_from_UTF8_lenient ( i18n_uchar *dest, int32_t dest_capa * @see i18n_ustring_to_UTF32_with_sub() * @see i18n_ustring_from_UTF32() */ -i18n_uchar32* i18n_ustring_to_UTF32 ( i18n_uchar32 *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_error_code_e *error_code ); +i18n_uchar32* i18n_ustring_to_UTF32(i18n_uchar32 *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_error_code_e *error_code); /** * @brief Convert a UTF-32 string to UTF-16. @@ -1251,7 +1251,7 @@ i18n_uchar32* i18n_ustring_to_UTF32 ( i18n_uchar32 *dest, int32_t dest_capacity, * @see i18n_ustring_from_UTF32_with_sub() * @see i18n_ustring_to_UTF32() */ -i18n_uchar* i18n_ustring_from_UTF32 ( i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar32 *src, int32_t src_len, i18n_error_code_e *error_code ); +i18n_uchar* i18n_ustring_from_UTF32(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar32 *src, int32_t src_len, i18n_error_code_e *error_code); /** * @brief Convert a UTF-16 string to UTF-32. @@ -1281,8 +1281,8 @@ i18n_uchar* i18n_ustring_from_UTF32 ( i18n_uchar *dest, int32_t dest_capacity, i * @see i18n_ustring_to_UTF32() * @see i18n_ustring_from_UTF32_with_sub() */ -i18n_uchar32* i18n_ustring_to_UTF32_with_sub ( i18n_uchar32 *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, - i18n_uchar32 sub_char, int32_t *num_substitutions, i18n_error_code_e *error_code ); +i18n_uchar32* i18n_ustring_to_UTF32_with_sub(i18n_uchar32 *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, + i18n_uchar32 sub_char, int32_t *num_substitutions, i18n_error_code_e *error_code); /** * @brief Convert a UTF-32 string to UTF-16. @@ -1313,7 +1313,7 @@ i18n_uchar32* i18n_ustring_to_UTF32_with_sub ( i18n_uchar32 *dest, int32_t dest_ * @see i18n_ustring_from_UTF32() * @see i18n_ustring_to_UTF32_with_sub() */ -i18n_uchar* i18n_ustring_from_UTF32_with_sub ( i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar32 *src, int32_t src_len, i18n_uchar32 sub_char, int32_t *num_substitutions, i18n_error_code_e *error_code ); +i18n_uchar* i18n_ustring_from_UTF32_with_sub(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar32 *src, int32_t src_len, i18n_uchar32 sub_char, int32_t *num_substitutions, i18n_error_code_e *error_code); #ifdef __cplusplus } -- 2.7.4 From 586a2eb10daf08b32a17a05e522d7ca81a0ac833 Mon Sep 17 00:00:00 2001 From: ByungWoo Lee Date: Tue, 12 Apr 2016 09:35:09 +0900 Subject: [PATCH 06/16] Fix build break Change-Id: Ibcc53fd40ff5138c12918f85604c15ea0603cb6f --- src/include/mobile/utils_i18n_types.h | 2 +- src/include/mobile/utils_i18n_ucollator.h | 4 ++-- src/include/wearable/utils_i18n_ucollator.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/include/mobile/utils_i18n_types.h b/src/include/mobile/utils_i18n_types.h index 15af948..7fa2b7a 100644 --- a/src/include/mobile/utils_i18n_types.h +++ b/src/include/mobile/utils_i18n_types.h @@ -1592,7 +1592,7 @@ typedef struct { * @brief Handle to struct representing a range of text containing a specific field. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ -typedef i18n_ufield_position_s *18n_ufield_position_h; +typedef i18n_ufield_position_s *i18n_ufield_position_h; /** * @brief Enumeration for the possible date/time format styles. diff --git a/src/include/mobile/utils_i18n_ucollator.h b/src/include/mobile/utils_i18n_ucollator.h index 5959403..a0be21a 100755 --- a/src/include/mobile/utils_i18n_ucollator.h +++ b/src/include/mobile/utils_i18n_ucollator.h @@ -92,7 +92,7 @@ extern "C" { // compares and sorts in ascending order if (ret == I18N_ERROR_NONE) { - i18n_ucollator_set_strength( coll, I18N_UCOLLATOR_TERTIARY ); + i18n_ucollator_set_strength(coll, I18N_UCOLLATOR_TERTIARY); for (i = 0; i < 2; i++) { for (j = 0; j < 2 - i; j++) { i18n_ustring_copy_ua(buf_01, src[j]); @@ -113,7 +113,7 @@ extern "C" { i18n_ucollator_destroy( coll ); // deallocate memory for collator for (i = 0; i < sizeof(src) / sizeof(src[0]); i++) { - dlog_print(DLOG_INFO, LOG_TAG, "%s\n", src[i] ); + dlog_print(DLOG_INFO, LOG_TAG, "%s\n", src[i]); } // ariplane banana cat * @endcode */ diff --git a/src/include/wearable/utils_i18n_ucollator.h b/src/include/wearable/utils_i18n_ucollator.h index d492ffd..a0be21a 100755 --- a/src/include/wearable/utils_i18n_ucollator.h +++ b/src/include/wearable/utils_i18n_ucollator.h @@ -88,7 +88,7 @@ extern "C" { } // cat banana airplane // creates a collator - ret = i18n_ucollator_create( "en_US", &coll ); + ret = i18n_ucollator_create("en_US", &coll); // compares and sorts in ascending order if (ret == I18N_ERROR_NONE) { -- 2.7.4 From 2513dab93693ff925998f858e86606ca17ce3b09 Mon Sep 17 00:00:00 2001 From: ByungWoo Lee Date: Tue, 12 Apr 2016 09:35:43 +0900 Subject: [PATCH 07/16] Update version - 1.2.3 Change-Id: I9d9f23c5f0b379b54e927c3fc519b3f35ec5c40f --- packaging/capi-base-utils.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/capi-base-utils.spec b/packaging/capi-base-utils.spec index 8fbf2de..b3c278c 100755 --- a/packaging/capi-base-utils.spec +++ b/packaging/capi-base-utils.spec @@ -1,6 +1,6 @@ Name: capi-base-utils Summary: Base Utils -Version: 1.2.2 +Version: 1.2.3 Release: 1 Group: Base License: Apache-2.0 and ICU -- 2.7.4 From f1b02a080260239c7127b01d593142604a5ba1f5 Mon Sep 17 00:00:00 2001 From: MyoungJune Park Date: Mon, 25 Apr 2016 18:12:48 +0900 Subject: [PATCH 08/16] tizen coding convention check : 6721 -> 0 CONVERTED BY ASTYLE, UNEXPAND AUTOMATICALLY Change-Id: I51c7ea00efb0124507ab1c33571358dacdd50f98 Signed-off-by: MyoungJune Park --- doc/utils_doc.h | 28 +- src/include/mobile/utils_i18n.h | 2080 +++++++------- src/include/mobile/utils_i18n_private.h | 84 +- src/include/mobile/utils_i18n_timezone.h | 50 +- src/include/mobile/utils_i18n_types.h | 3356 +++++++++++----------- src/include/mobile/utils_i18n_ubrk.h | 152 +- src/include/mobile/utils_i18n_ucalendar.h | 398 +-- src/include/mobile/utils_i18n_uchar.h | 176 +- src/include/mobile/utils_i18n_ucollator.h | 158 +- src/include/mobile/utils_i18n_udate.h | 378 +-- src/include/mobile/utils_i18n_udatepg.h | 562 ++-- src/include/mobile/utils_i18n_uenumeration.h | 98 +- src/include/mobile/utils_i18n_ulocale.h | 736 ++--- src/include/mobile/utils_i18n_unormalization.h | 52 +- src/include/mobile/utils_i18n_unumber.h | 414 +-- src/include/mobile/utils_i18n_usearch.h | 82 +- src/include/mobile/utils_i18n_uset.h | 386 +-- src/include/mobile/utils_i18n_ustring.h | 334 +-- src/include/wearable/utils_i18n.h | 2080 +++++++------- src/include/wearable/utils_i18n_private.h | 84 +- src/include/wearable/utils_i18n_timezone.h | 50 +- src/include/wearable/utils_i18n_types.h | 3356 +++++++++++----------- src/include/wearable/utils_i18n_ubrk.h | 152 +- src/include/wearable/utils_i18n_ucalendar.h | 398 +-- src/include/wearable/utils_i18n_uchar.h | 176 +- src/include/wearable/utils_i18n_ucollator.h | 158 +- src/include/wearable/utils_i18n_udate.h | 378 +-- src/include/wearable/utils_i18n_udatepg.h | 562 ++-- src/include/wearable/utils_i18n_uenumeration.h | 98 +- src/include/wearable/utils_i18n_ulocale.h | 736 ++--- src/include/wearable/utils_i18n_unormalization.h | 52 +- src/include/wearable/utils_i18n_unumber.h | 414 +-- src/include/wearable/utils_i18n_usearch.h | 82 +- src/include/wearable/utils_i18n_uset.h | 386 +-- src/include/wearable/utils_i18n_ustring.h | 330 +-- src/utils_i18n_private.c | 322 +-- src/utils_i18n_ubrk.c | 300 +- src/utils_i18n_ucalendar.c | 716 ++--- src/utils_i18n_uchar.c | 32 +- src/utils_i18n_ucollator.c | 70 +- src/utils_i18n_udate.c | 410 +-- src/utils_i18n_udatepg.c | 470 +-- src/utils_i18n_uenumeration.c | 160 +- src/utils_i18n_ulocale.c | 560 ++-- src/utils_i18n_unormalization.c | 48 +- src/utils_i18n_unumber.c | 600 ++-- src/utils_i18n_usearch.c | 94 +- src/utils_i18n_uset.c | 838 +++--- src/utils_i18n_ustring.c | 884 +++--- 49 files changed, 12260 insertions(+), 12260 deletions(-) mode change 100755 => 100644 doc/utils_doc.h mode change 100755 => 100644 src/include/mobile/utils_i18n.h mode change 100755 => 100644 src/include/mobile/utils_i18n_private.h mode change 100755 => 100644 src/include/mobile/utils_i18n_timezone.h mode change 100755 => 100644 src/include/mobile/utils_i18n_ubrk.h mode change 100755 => 100644 src/include/mobile/utils_i18n_ucollator.h mode change 100755 => 100644 src/include/mobile/utils_i18n_udatepg.h mode change 100755 => 100644 src/include/mobile/utils_i18n_uenumeration.h mode change 100755 => 100644 src/include/mobile/utils_i18n_unormalization.h mode change 100755 => 100644 src/include/mobile/utils_i18n_usearch.h mode change 100755 => 100644 src/include/mobile/utils_i18n_uset.h mode change 100755 => 100644 src/include/wearable/utils_i18n.h mode change 100755 => 100644 src/include/wearable/utils_i18n_private.h mode change 100755 => 100644 src/include/wearable/utils_i18n_timezone.h mode change 100755 => 100644 src/include/wearable/utils_i18n_ubrk.h mode change 100755 => 100644 src/include/wearable/utils_i18n_ucollator.h mode change 100755 => 100644 src/include/wearable/utils_i18n_udatepg.h mode change 100755 => 100644 src/include/wearable/utils_i18n_uenumeration.h mode change 100755 => 100644 src/include/wearable/utils_i18n_unormalization.h mode change 100755 => 100644 src/include/wearable/utils_i18n_usearch.h mode change 100755 => 100644 src/include/wearable/utils_i18n_uset.h mode change 100755 => 100644 src/include/wearable/utils_i18n_ustring.h mode change 100755 => 100644 src/utils_i18n_private.c mode change 100755 => 100644 src/utils_i18n_uchar.c mode change 100755 => 100644 src/utils_i18n_ucollator.c mode change 100755 => 100644 src/utils_i18n_udatepg.c mode change 100755 => 100644 src/utils_i18n_uenumeration.c mode change 100755 => 100644 src/utils_i18n_ulocale.c mode change 100755 => 100644 src/utils_i18n_unormalization.c mode change 100755 => 100644 src/utils_i18n_unumber.c mode change 100755 => 100644 src/utils_i18n_usearch.c diff --git a/doc/utils_doc.h b/doc/utils_doc.h old mode 100755 new mode 100644 index 1cff578..e53a375 --- a/doc/utils_doc.h +++ b/doc/utils_doc.h @@ -4,17 +4,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ @@ -30,13 +30,13 @@ * @section CAPI_BASE_UTILS_MODULE_OVERVIEW Overview * * - * - * + * + * * * - * - * + * + * * *
ModuleDescriptionModuleDescription
@ref CAPI_BASE_UTILS_I18N_MODULEi18n module contains uchar, ucollator, unormalization, usearch, ustring, ucalendar, udate, udatepg, ulocale and unumber. - * This module provides flexible generation of number or date format patterns and helps you to format and parse dates/number for any locale.@ref CAPI_BASE_UTILS_I18N_MODULEi18n module contains uchar, ucollator, unormalization, usearch, ustring, ucalendar, udate, udatepg, ulocale and unumber. + * This module provides flexible generation of number or date format patterns and helps you to format and parse dates/number for any locale.
*/ diff --git a/src/include/mobile/utils_i18n.h b/src/include/mobile/utils_i18n.h old mode 100755 new mode 100644 index 36345bd..3bdb929 --- a/src/include/mobile/utils_i18n.h +++ b/src/include/mobile/utils_i18n.h @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef __UTILS_I18N_H__ @@ -47,1736 +47,1736 @@ extern "C" { * @ingroup CAPI_BASE_UTILS_MODULE * @defgroup CAPI_BASE_UTILS_I18N_MODULE i18n * @brief The i18n module contains uchar, ucollator, unormalization, usearch, ustring, ucalendar, udate, udatepg, ulocale and unumber. - * This module provides flexible generation of number or date format patterns and helps you format and parse dates/number for any locale. + * This module provides flexible generation of number or date format patterns and helps you format and parse dates/number for any locale. * The i18n module provides various features based on data from ICU. The following table shows the version of ICU used in each Tizen platform. * - * - * - * - * - * - * + * + * + * + * + * + * *
Tizen 2.3, 2.3.1, 2.4ICU 51CLDR 23Unicode 6.2
Tizen 2.3, 2.3.1, 2.4ICU 51CLDR 23Unicode 6.2
* @section CAPI_BASE_UTILS_I18N_MODULE_HEADER Required Header - * \#include + * \#include * @section CAPI_BASE_UTILS_I18N_MODULE_OVERVIEW Overview * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * *
APIDescriptionAPIDescription
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULEThe Timezone module represents a time zone offset, and also figures out daylight savings.@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULEThe Timezone module represents a time zone offset, and also figures out daylight savings.
@ref CAPI_BASE_UTILS_I18N_UENUMERATION_MODULEUEnumeration defines functions for handling String Enumeration.@ref CAPI_BASE_UTILS_I18N_UENUMERATION_MODULEUEnumeration defines functions for handling String Enumeration.
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULEUbrk module defines methods for finding the location of boundaries in text.@ref CAPI_BASE_UTILS_I18N_UBRK_MODULEUbrk module defines methods for finding the location of boundaries in text.
@ref CAPI_BASE_UTILS_I18N_UCOLLATOR_MODULEUcollator module performs locale-sensitive string comparison. It builds searching and sorting routines for natural language text and provides correct sorting orders for most locales.@ref CAPI_BASE_UTILS_I18N_UCOLLATOR_MODULEUcollator module performs locale-sensitive string comparison. It builds searching and sorting routines for natural language text and provides correct sorting orders for most locales.
@ref CAPI_BASE_UTILS_I18N_UCHAR_MODULEUchar module provides low-level access to the Unicode Character Database.@ref CAPI_BASE_UTILS_I18N_UCHAR_MODULEUchar module provides low-level access to the Unicode Character Database.
@ref CAPI_BASE_UTILS_I18N_UNORMALIZATION_MODULEUnormalization module provides Unicode normalization functionality for standard unicode normalization.@ref CAPI_BASE_UTILS_I18N_UNORMALIZATION_MODULEUnormalization module provides Unicode normalization functionality for standard unicode normalization.
@ref CAPI_BASE_UTILS_I18N_USEARCH_MODULEUsearch module provides language-sensitive text searching based on the comparison rules defined in a ucollator data struct.@ref CAPI_BASE_UTILS_I18N_USEARCH_MODULEUsearch module provides language-sensitive text searching based on the comparison rules defined in a ucollator data struct.
@ref CAPI_BASE_UTILS_I18N_USET_MODULEUset module allows to specify a subset of character used in strings.@ref CAPI_BASE_UTILS_I18N_USET_MODULEUset module allows to specify a subset of character used in strings.
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULEUstring module provides general unicode string handling.@ref CAPI_BASE_UTILS_I18N_USTRING_MODULEUstring module provides general unicode string handling.
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULEUcalendar is used for converting between a i18n_udate type and a set of integer fields - such as #I18N_UCALENDAR_YEAR, #I18N_UCALENDAR_MONTH, #I18N_UCALENDAR_DATE, #I18N_UCALENDAR_HOUR, and so on.@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULEUcalendar is used for converting between a i18n_udate type and a set of integer fields + such as #I18N_UCALENDAR_YEAR, #I18N_UCALENDAR_MONTH, #I18N_UCALENDAR_DATE, #I18N_UCALENDAR_HOUR, and so on.
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULEUdate module consists of functions that convert dates and times from their - internal representations to textual form and back again in a language-independent manner.@ref CAPI_BASE_UTILS_I18N_UDATE_MODULEUdate module consists of functions that convert dates and times from their + internal representations to textual form and back again in a language-independent manner.
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE Udatepg module provides flexible generation of date format patterns, like "yy-MM-dd". @ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE Udatepg module provides flexible generation of date format patterns, like "yy-MM-dd".
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULEA ulocale represents a specific geographical, political, or cultural region. @ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULEA ulocale represents a specific geographical, political, or cultural region.
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULEUnumber helps you format and parse numbers for any locale.@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULEUnumber helps you format and parse numbers for any locale.
* * @section CAPI_BASE_UTILS_I18N_MODULE_MAPPING_TABLE Mapping Table * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * *
ModuleNative APIICU APIModuleNative APIICU API
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_create_unknowngetUnknown@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_create_unknowngetUnknown
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_create_gmtgetGMT@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_create_gmtgetGMT
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_createcreateTimeZone@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_createcreateTimeZone
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_destroy@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_destroy
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_foreach_timezone_id_by_regioncreateTimeZoneIDEnumeration@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_foreach_timezone_id_by_regioncreateTimeZoneIDEnumeration
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_foreach_timezone_idcreateEnumeration@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_foreach_timezone_idcreateEnumeration
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_foreach_timezone_id_with_offsetcreateEnumeration@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_foreach_timezone_id_with_offsetcreateEnumeration
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_foreach_timezone_id_by_countrycreateEnumeration@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_foreach_timezone_id_by_countrycreateEnumeration
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_count_equivalent_idscountEquivalentIDs@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_count_equivalent_idscountEquivalentIDs
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_equivalent_idgetEquivalentID@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_equivalent_idgetEquivalentID
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_create_defaultcreateDefault@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_create_defaultcreateDefault
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_set_defaultsetDefault@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_set_defaultsetDefault
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_tzdata_versiongetTZDataVersion@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_tzdata_versiongetTZDataVersion
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_regiongetRegion@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_regiongetRegion
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_offset_with_dategetOffset@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_offset_with_dategetOffset
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_set_raw_offsetsetRawOffset@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_set_raw_offsetsetRawOffset
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_raw_offsetgetRawOffset@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_raw_offsetgetRawOffset
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_idgetID@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_idgetID
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_set_idsetID@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_set_idsetID
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_display_namegetDisplayName@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_display_namegetDisplayName
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_display_name_with_localegetDisplayName@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_display_name_with_localegetDisplayName
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_display_name_with_typegetDisplayName@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_display_name_with_typegetDisplayName
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_display_name_with_type_localegetDisplayName@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_display_name_with_type_localegetDisplayName
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_use_daylight_timeuseDaylightTime@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_use_daylight_timeuseDaylightTime
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_has_same_rulehasSameRules@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_has_same_rulehasSameRules
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_cloneclone@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_cloneclone
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_dst_savingsgetDSTSavings@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_dst_savingsgetDSTSavings
@ref CAPI_BASE_UTILS_I18N_UENUMERATION_MODULE#i18n_uenumeration_destroyuenum_close@ref CAPI_BASE_UTILS_I18N_UENUMERATION_MODULE#i18n_uenumeration_destroyuenum_close
@ref CAPI_BASE_UTILS_I18N_UENUMERATION_MODULE#i18n_uenumeration_countuenum_count@ref CAPI_BASE_UTILS_I18N_UENUMERATION_MODULE#i18n_uenumeration_countuenum_count
@ref CAPI_BASE_UTILS_I18N_UENUMERATION_MODULE#i18n_uenumeration_unextuenum_unext@ref CAPI_BASE_UTILS_I18N_UENUMERATION_MODULE#i18n_uenumeration_unextuenum_unext
@ref CAPI_BASE_UTILS_I18N_UENUMERATION_MODULE#i18n_uenumeration_nextuenum_next@ref CAPI_BASE_UTILS_I18N_UENUMERATION_MODULE#i18n_uenumeration_nextuenum_next
@ref CAPI_BASE_UTILS_I18N_UENUMERATION_MODULE#i18n_uenumeration_resetuenum_reset@ref CAPI_BASE_UTILS_I18N_UENUMERATION_MODULE#i18n_uenumeration_resetuenum_reset
@ref CAPI_BASE_UTILS_I18N_UENUMERATION_MODULE#i18n_uenumeration_uchar_strings_enumeration_createuenum_openUCharStringsEnumeration@ref CAPI_BASE_UTILS_I18N_UENUMERATION_MODULE#i18n_uenumeration_uchar_strings_enumeration_createuenum_openUCharStringsEnumeration
@ref CAPI_BASE_UTILS_I18N_UENUMERATION_MODULE#i18n_uenumeration_char_strings_enumeration_createuenum_openCharStringsEnumeration@ref CAPI_BASE_UTILS_I18N_UENUMERATION_MODULE#i18n_uenumeration_char_strings_enumeration_createuenum_openCharStringsEnumeration
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_createubrk_open@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_createubrk_open
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_create_rulesubrk_openRules@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_create_rulesubrk_openRules
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_safe_cloneubrk_safeClone@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_safe_cloneubrk_safeClone
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_destroyubrk_close@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_destroyubrk_close
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_set_textubrk_setText@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_set_textubrk_setText
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_currentubrk_current@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_currentubrk_current
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_nextubrk_next@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_nextubrk_next
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_precedingubrk_preceding@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_precedingubrk_preceding
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_previousubrk_previous@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_previousubrk_previous
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_firstubrk_first@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_firstubrk_first
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_lastubrk_last@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_lastubrk_last
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_followingubrk_following@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_followingubrk_following
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_get_availableubrk_getAvailable@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_get_availableubrk_getAvailable
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_count_availableubrk_countAvailable@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_count_availableubrk_countAvailable
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_is_boundaryubrk_isBoundary@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_is_boundaryubrk_isBoundary
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_get_rule_statusubrk_getRuleStatus@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_get_rule_statusubrk_getRuleStatus
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_get_rule_status_vecubrk_getRuleStatusVec@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_get_rule_status_vecubrk_getRuleStatusVec
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_get_locale_by_typeubrk_getLocaleByType@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_get_locale_by_typeubrk_getLocaleByType
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_set_default_timezoneucal_setDefaultTimeZone@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_set_default_timezoneucal_setDefaultTimeZone
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_nowucal_getNow@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_nowucal_getNow
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_createucal_open@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_createucal_open
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_destroyucal_close@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_destroyucal_close
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_cloneucal_clone@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_cloneucal_clone
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_timezone_displaynameucal_getTimeZoneDisplayName@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_timezone_displaynameucal_getTimeZoneDisplayName
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_is_in_daylight_timeucal_inDaylightTime@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_is_in_daylight_timeucal_inDaylightTime
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_setucal_set@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_setucal_set
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_set_attributeucal_setAttribute@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_set_attributeucal_setAttribute
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_attributeucal_getAttribute@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_attributeucal_getAttribute
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_millisecondsucal_getMillis@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_millisecondsucal_getMillis
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_set_millisecondsucal_setMillis@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_set_millisecondsucal_setMillis
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_set_date_timeucal_setDateTime@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_set_date_timeucal_setDateTime
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_is_equivalent_toucal_equivalentTo@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_is_equivalent_toucal_equivalentTo
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_adducal_add@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_adducal_add
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_getucal_get@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_getucal_get
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_clearucal_clear@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_clearucal_clear
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_clear_fielducal_clearField@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_clear_fielducal_clearField
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_count_availableucal_countAvailable@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_count_availableucal_countAvailable
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_country_timezones_createucal_openCountryTimeZones@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_country_timezones_createucal_openCountryTimeZones
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_availableucal_getAvailable@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_availableucal_getAvailable
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_canonical_timezone_iducal_getCanonicalTimeZoneID@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_canonical_timezone_iducal_getCanonicalTimeZoneID
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_day_of_week_typeucal_getDayOfWeekType@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_day_of_week_typeucal_getDayOfWeekType
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_default_timezoneucal_getDefaultTimeZone@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_default_timezoneucal_getDefaultTimeZone
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_field_differenceucal_getFieldDifference@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_field_differenceucal_getFieldDifference
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_gregorian_changeucal_getGregorianChange@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_gregorian_changeucal_getGregorianChange
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_keyword_values_for_localeucal_getKeywordValuesForLocale@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_keyword_values_for_localeucal_getKeywordValuesForLocale
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_limitucal_getLimit@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_limitucal_getLimit
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_locale_by_typeucal_getLocaleByType@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_locale_by_typeucal_getLocaleByType
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_timezone_iducal_getTimeZoneID@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_timezone_iducal_getTimeZoneID
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_timezone_transition_dateucal_getTimeZoneTransitionDate@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_timezone_transition_dateucal_getTimeZoneTransitionDate
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_typeucal_getType@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_typeucal_getType
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_tz_data_versionucal_getTZDataVersion@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_tz_data_versionucal_getTZDataVersion
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_weekend_transitionucal_getWeekendTransition@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_weekend_transitionucal_getWeekendTransition
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_is_setucal_isSet@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_is_setucal_isSet
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_is_weekenducal_isWeekend@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_is_weekenducal_isWeekend
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_rollucal_roll@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_rollucal_roll
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_set_dateucal_setDate@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_set_dateucal_setDate
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_set_gregorian_changeucal_setGregorianChange@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_set_gregorian_changeucal_setGregorianChange
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_set_timezoneucal_setTimeZone@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_set_timezoneucal_setTimeZone
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_timezones_createucal_openTimeZones@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_timezones_createucal_openTimeZones
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_timezone_id_enumeration_createucal_openTimeZoneIDEnumeration@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_timezone_id_enumeration_createucal_openTimeZoneIDEnumeration
@ref CAPI_BASE_UTILS_I18N_UCHAR_MODULE#i18n_uchar_get_int_property_valueu_getIntpropertyValue@ref CAPI_BASE_UTILS_I18N_UCHAR_MODULE#i18n_uchar_get_int_property_valueu_getIntpropertyValue
@ref CAPI_BASE_UTILS_I18N_UCHAR_MODULE#i18n_uchar_get_ublock_codeublock_getCode@ref CAPI_BASE_UTILS_I18N_UCHAR_MODULE#i18n_uchar_get_ublock_codeublock_getCode
@ref CAPI_BASE_UTILS_I18N_UCOLLATOR_MODULE#i18n_ucollator_createucol_open@ref CAPI_BASE_UTILS_I18N_UCOLLATOR_MODULE#i18n_ucollator_createucol_open
@ref CAPI_BASE_UTILS_I18N_UCOLLATOR_MODULE#i18n_ucollator_destroyucol_close@ref CAPI_BASE_UTILS_I18N_UCOLLATOR_MODULE#i18n_ucollator_destroyucol_close
@ref CAPI_BASE_UTILS_I18N_UCOLLATOR_MODULE#i18n_ucollator_str_collatorucol_strcoll@ref CAPI_BASE_UTILS_I18N_UCOLLATOR_MODULE#i18n_ucollator_str_collatorucol_strcoll
@ref CAPI_BASE_UTILS_I18N_UCOLLATOR_MODULE#i18n_ucollator_equalucol_equal@ref CAPI_BASE_UTILS_I18N_UCOLLATOR_MODULE#i18n_ucollator_equalucol_equal
@ref CAPI_BASE_UTILS_I18N_UCOLLATOR_MODULE#i18n_ucollator_set_strengthucol_setStrength@ref CAPI_BASE_UTILS_I18N_UCOLLATOR_MODULE#i18n_ucollator_set_strengthucol_setStrength
@ref CAPI_BASE_UTILS_I18N_UCOLLATOR_MODULE#i18n_ucollator_set_attributeucol_setAttribute@ref CAPI_BASE_UTILS_I18N_UCOLLATOR_MODULE#i18n_ucollator_set_attributeucol_setAttribute
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_createudat_open@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_createudat_open
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_destroyudat_close@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_destroyudat_close
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_format_dateudat_format@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_format_dateudat_format
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_apply_patternudat_applyPattern@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_apply_patternudat_applyPattern
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_cloneudat_clone@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_cloneudat_clone
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_count_availableudat_countAvailable@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_count_availableudat_countAvailable
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_count_symbolsudat_countSymbols@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_count_symbolsudat_countSymbols
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_get_2digit_year_startudat_get2DigitYearStart@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_get_2digit_year_startudat_get2DigitYearStart
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_get_availableudat_getAvailable@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_get_availableudat_getAvailable
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_get_calendarudat_getCalendar@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_get_calendarudat_getCalendar
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_get_locale_by_typeudat_getLocaleByType@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_get_locale_by_typeudat_getLocaleByType
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_get_number_formatudat_getNumberFormat@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_get_number_formatudat_getNumberFormat
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_get_symbolsudat_getSymbols@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_get_symbolsudat_getSymbols
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_is_lenientudat_isLenient@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_is_lenientudat_isLenient
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_parseudat_parse@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_parseudat_parse
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_parse_calendarudat_parseCalendar@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_parse_calendarudat_parseCalendar
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_set_2digit_year_startudat_set2DigitYearStart@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_set_2digit_year_startudat_set2DigitYearStart
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_set_calendarudat_setCalendar@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_set_calendarudat_setCalendar
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_set_contextudat_setContext@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_set_contextudat_setContext
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_set_lenientudat_setLenient@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_set_lenientudat_setLenient
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_set_number_formatudat_setNumberFormat@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_set_number_formatudat_setNumberFormat
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_set_symbolsudat_setSymbols@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_set_symbolsudat_setSymbols
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_to_calendar_date_fieldudat_toCalendarDateField@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_to_calendar_date_fieldudat_toCalendarDateField
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_to_patternudat_toPattern@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_to_patternudat_toPattern
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_createudatpg_open@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_createudatpg_open
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_destroyudatpg_close@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_destroyudatpg_close
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_get_best_patternudatpg_getBestPattern@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_get_best_patternudatpg_getBestPattern
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_add_patternudatpg_addPattern@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_add_patternudatpg_addPattern
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_base_skeletons_createudatpg_openBaseSkeletons@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_base_skeletons_createudatpg_openBaseSkeletons
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_cloneudatpg_clone@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_cloneudatpg_clone
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_create_emptyudatpg_openEmpty@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_create_emptyudatpg_openEmpty
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_get_append_item_formatudatpg_getAppendItemFormat@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_get_append_item_formatudatpg_getAppendItemFormat
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_get_append_item_nameudatpg_getAppendItemName@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_get_append_item_nameudatpg_getAppendItemName
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_get_base_skeletonudatpg_getBaseSkeleton@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_get_base_skeletonudatpg_getBaseSkeleton
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_get_best_pattern_with_optionsudatpg_getBestPatternWithOptions@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_get_best_pattern_with_optionsudatpg_getBestPatternWithOptions
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_get_date_time_formatudatpg_getDateTimeFormat@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_get_date_time_formatudatpg_getDateTimeFormat
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_get_decimaludatpg_getDecimal@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_get_decimaludatpg_getDecimal
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_get_pattern_for_skeletonudatpg_getPatternForSkeleton@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_get_pattern_for_skeletonudatpg_getPatternForSkeleton
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_get_skeletonudatpg_getSkeleton@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_get_skeletonudatpg_getSkeleton
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_replace_field_typesudatpg_replaceFieldTypes@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_replace_field_typesudatpg_replaceFieldTypes
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_replace_field_types_with_optionsudatpg_replaceFieldTypesWithOptions@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_replace_field_types_with_optionsudatpg_replaceFieldTypesWithOptions
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_set_append_item_formatudatpg_setAppendItemFormat@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_set_append_item_formatudatpg_setAppendItemFormat
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_set_append_item_nameudatpg_setAppendItemName@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_set_append_item_nameudatpg_setAppendItemName
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_set_date_time_formatudatpg_setDateTimeFormat@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_set_date_time_formatudatpg_setDateTimeFormat
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_set_decimaludatpg_setDecimal@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_set_decimaludatpg_setDecimal
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_skeletons_createudatpg_openSkeletons@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_skeletons_createudatpg_openSkeletons
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_defaultuloc_getDefault@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_defaultuloc_getDefault
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_set_defaultuloc_setDefault@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_set_defaultuloc_setDefault
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_languageuloc_getLanguage@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_languageuloc_getLanguage
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_countryuloc_getCountry@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_countryuloc_getCountry
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_display_nameuloc_getDisplayName@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_display_nameuloc_getDisplayName
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_add_likely_subtagsuloc_addLikelySubtags@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_add_likely_subtagsuloc_addLikelySubtags
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_canonicalizeuloc_canonicalize@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_canonicalizeuloc_canonicalize
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_for_language_taguloc_forLanguageTag@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_for_language_taguloc_forLanguageTag
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_base_nameuloc_getBaseName@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_base_nameuloc_getBaseName
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_character_orientationuloc_getCharacterOrientation@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_character_orientationuloc_getCharacterOrientation
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_display_countryuloc_getDisplayCountry@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_display_countryuloc_getDisplayCountry
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_display_keyworduloc_getDisplayKeyword@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_display_keyworduloc_getDisplayKeyword
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_display_keyword_valueuloc_getDisplayKeywordValue@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_display_keyword_valueuloc_getDisplayKeywordValue
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_display_languageuloc_getDisplayLanguage@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_display_languageuloc_getDisplayLanguage
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_display_scriptuloc_getDisplayScript@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_display_scriptuloc_getDisplayScript
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_display_variantuloc_getDisplayVariant@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_display_variantuloc_getDisplayVariant
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_iso3_countryuloc_getISO3Country@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_iso3_countryuloc_getISO3Country
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_iso3_languageuloc_getISO3Language@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_iso3_languageuloc_getISO3Language
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_iso_countriesuloc_getISOCountries@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_iso_countriesuloc_getISOCountries
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_iso_languagesuloc_getISOLanguages@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_iso_languagesuloc_getISOLanguages
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_keyword_valueuloc_getKeywordValue@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_keyword_valueuloc_getKeywordValue
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_lciduloc_getLCID@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_lciduloc_getLCID
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_line_orientationuloc_getLineOrientation@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_line_orientationuloc_getLineOrientation
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_locale_for_lciduloc_getLocaleForLCID@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_locale_for_lciduloc_getLocaleForLCID
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_nameuloc_getName@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_nameuloc_getName
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_parentuloc_getParent@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_parentuloc_getParent
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_scriptuloc_getScript@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_scriptuloc_getScript
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_variantuloc_getVariant@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_variantuloc_getVariant
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_keywords_createuloc_openKeywords@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_keywords_createuloc_openKeywords
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_minimize_subtagsuloc_minimizeSubtags@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_minimize_subtagsuloc_minimizeSubtags
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_set_keyword_valueuloc_setKeywordValue@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_set_keyword_valueuloc_setKeywordValue
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_to_language_taguloc_toLanguageTag@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_to_language_taguloc_toLanguageTag
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_availableuloc_getAvailable@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_availableuloc_getAvailable
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_count_availableuloc_countAvailable@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_count_availableuloc_countAvailable
@ref CAPI_BASE_UTILS_I18N_UNORMALIZATION_MODULE#i18n_unormalization_get_instanceunorm2_getInstance@ref CAPI_BASE_UTILS_I18N_UNORMALIZATION_MODULE#i18n_unormalization_get_instanceunorm2_getInstance
@ref CAPI_BASE_UTILS_I18N_UNORMALIZATION_MODULE#i18n_unormalization_normalizeunorm2_normalize@ref CAPI_BASE_UTILS_I18N_UNORMALIZATION_MODULE#i18n_unormalization_normalizeunorm2_normalize
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_createunum_open@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_createunum_open
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_destroyunum_close@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_destroyunum_close
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_get_symbolunum_getSymbol@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_get_symbolunum_getSymbol
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_apply_patternunum_applyPattern@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_apply_patternunum_applyPattern
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_cloneunum_clone@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_cloneunum_clone
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_count_availableunum_countAvailable@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_count_availableunum_countAvailable
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_formatunum_format@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_formatunum_format
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_format_decimalunum_formatDecimal@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_format_decimalunum_formatDecimal
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_format_doubleunum_formatDouble@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_format_doubleunum_formatDouble
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_format_double_currencyunum_formatDoubleCurrency@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_format_double_currencyunum_formatDoubleCurrency
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_format_int64unum_formatInt64@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_format_int64unum_formatInt64
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_get_attributeunum_getAttribute@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_get_attributeunum_getAttribute
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_get_availableunum_getAvailable@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_get_availableunum_getAvailable
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_get_double_attributeunum_getDoubleAttribute@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_get_double_attributeunum_getDoubleAttribute
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_get_locale_by_typeunum_getLocaleByType@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_get_locale_by_typeunum_getLocaleByType
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_get_text_attributeunum_getTextAttribute@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_get_text_attributeunum_getTextAttribute
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_parseunum_parse@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_parseunum_parse
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_parse_decimalunum_parseDecimal@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_parse_decimalunum_parseDecimal
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_parse_doubleunum_parseDouble@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_parse_doubleunum_parseDouble
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_parse_double_currencyunum_parseDoubleCurrency@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_parse_double_currencyunum_parseDoubleCurrency
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_parse_int64unum_parseInt64@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_parse_int64unum_parseInt64
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_set_attributeunum_setAttribute@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_set_attributeunum_setAttribute
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_set_double_attributeunum_setDoubleAttribute@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_set_double_attributeunum_setDoubleAttribute
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_set_symbolunum_setSymbol@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_set_symbolunum_setSymbol
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_set_text_attributeunum_setTextAttribute@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_set_text_attributeunum_setTextAttribute
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_to_patternunum_toPattern@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_to_patternunum_toPattern
@ref CAPI_BASE_UTILS_I18N_USEARCH_MODULE#i18n_usearch_create_newusearch_open@ref CAPI_BASE_UTILS_I18N_USEARCH_MODULE#i18n_usearch_create_newusearch_open
@ref CAPI_BASE_UTILS_I18N_USEARCH_MODULE#i18n_usearch_destroyusearch_close@ref CAPI_BASE_UTILS_I18N_USEARCH_MODULE#i18n_usearch_destroyusearch_close
@ref CAPI_BASE_UTILS_I18N_USEARCH_MODULE#i18n_usearch_get_matched_textusearch_getMatchedText@ref CAPI_BASE_UTILS_I18N_USEARCH_MODULE#i18n_usearch_get_matched_textusearch_getMatchedText
@ref CAPI_BASE_UTILS_I18N_USEARCH_MODULE#i18n_usearch_get_collatorusearch_getCollator@ref CAPI_BASE_UTILS_I18N_USEARCH_MODULE#i18n_usearch_get_collatorusearch_getCollator
@ref CAPI_BASE_UTILS_I18N_USEARCH_MODULE#i18n_usearch_firstusearch_first@ref CAPI_BASE_UTILS_I18N_USEARCH_MODULE#i18n_usearch_firstusearch_first
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_create_emptyuset_openEmpty@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_create_emptyuset_openEmpty
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_createuset_open@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_createuset_open
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_create_patternuset_openPattern@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_create_patternuset_openPattern
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_create_pattern_optionsuset_openPatternOptions@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_create_pattern_optionsuset_openPatternOptions
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_destroyuset_close@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_destroyuset_close
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_cloneuset_clone@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_cloneuset_clone
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_is_frozenuset_isFrozen@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_is_frozenuset_isFrozen
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_freezeuset_freeze@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_freezeuset_freeze
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_clone_as_thaweduset_cloneAsThawed@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_clone_as_thaweduset_cloneAsThawed
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_setuset_set@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_setuset_set
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_apply_patternuset_applyPattern@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_apply_patternuset_applyPattern
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_apply_int_property_valueuset_applyIntPropertyValue@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_apply_int_property_valueuset_applyIntPropertyValue
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_apply_property_aliasuset_applyPropertyAlias@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_apply_property_aliasuset_applyPropertyAlias
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_resembles_patternuset_resemblesPattern@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_resembles_patternuset_resemblesPattern
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_to_patternuset_toPattern@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_to_patternuset_toPattern
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_adduset_add@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_adduset_add
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_add_alluset_addAll@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_add_alluset_addAll
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_add_rangeuset_addRange@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_add_rangeuset_addRange
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_add_stringuset_addString@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_add_stringuset_addString
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_add_all_code_pointsuset_addAllCodePoints@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_add_all_code_pointsuset_addAllCodePoints
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_removeuset_remove@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_removeuset_remove
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_remove_rangeuset_removeRange@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_remove_rangeuset_removeRange
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_remove_stringuset_removeString@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_remove_stringuset_removeString
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_remove_alluset_removeAll@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_remove_alluset_removeAll
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_retainuset_retain@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_retainuset_retain
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_retain_alluset_retainAll@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_retain_alluset_retainAll
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_compactuset_compact@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_compactuset_compact
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_complementuset_complement@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_complementuset_complement
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_complement_alluset_complementAll@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_complement_alluset_complementAll
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_clearuset_clear@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_clearuset_clear
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_destroy_overuset_closeOver@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_destroy_overuset_closeOver
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_remove_all_stringsuset_removeAllStrings@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_remove_all_stringsuset_removeAllStrings
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_is_emptyuset_isEmpty@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_is_emptyuset_isEmpty
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_containsuset_contains@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_containsuset_contains
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_contains_rangeuset_containsRange@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_contains_rangeuset_containsRange
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_contains_stringuset_containsString@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_contains_stringuset_containsString
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_index_ofuset_indexOf@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_index_ofuset_indexOf
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_char_atuset_charAt@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_char_atuset_charAt
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_sizeuset_size@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_sizeuset_size
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_get_item_countuset_getItemCount@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_get_item_countuset_getItemCount
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_get_itemuset_getItem@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_get_itemuset_getItem
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_contains_alluset_containsAll@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_contains_alluset_containsAll
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_contains_all_code_pointsuset_containsAllCodePoints@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_contains_all_code_pointsuset_containsAllCodePoints
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_contains_noneuset_containsNone@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_contains_noneuset_containsNone
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_contains_someuset_containsSome@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_contains_someuset_containsSome
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_spanuset_span@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_spanuset_span
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_span_backuset_spanBack@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_span_backuset_spanBack
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_span_utf8uset_spanUTF8@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_span_utf8uset_spanUTF8
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_span_back_utf8uset_spanBackUTF8@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_span_back_utf8uset_spanBackUTF8
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_equalsuset_equals@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_equalsuset_equals
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_serializeuset_serialize@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_serializeuset_serialize
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_get_serialized_setuset_getSerializedSet@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_get_serialized_setuset_getSerializedSet
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_set_serialized_to_oneuset_setSerializedToOne@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_set_serialized_to_oneuset_setSerializedToOne
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_serialized_containsuset_serializedContains@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_serialized_containsuset_serializedContains
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_get_serialized_range_countuset_getSerializedRangeCount@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_get_serialized_range_countuset_getSerializedRangeCount
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_get_serialized_rangeuset_getSerializedRange@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_get_serialized_rangeuset_getSerializedRange
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_get_lengthu_strlen@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_get_lengthu_strlen
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_count_char32u_countChar32@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_count_char32u_countChar32
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_has_more_char32_thanu_strHasMoreChar32Than@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_has_more_char32_thanu_strHasMoreChar32Than
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_catu_strcat@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_catu_strcat
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_cat_nu_strncat@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_cat_nu_strncat
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_stringu_strstr@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_stringu_strstr
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_find_firstu_strFindFirst@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_find_firstu_strFindFirst
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_charu_strchr@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_charu_strchr
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_char32u_strchr32@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_char32u_strchr32
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_r_stringu_strrstr@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_r_stringu_strrstr
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_find_lastu_strFindLast@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_find_lastu_strFindLast
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_r_charu_strrchr@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_r_charu_strrchr
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_r_char32u_strrchr32@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_r_char32u_strrchr32
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_pbrku_strpbrk@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_pbrku_strpbrk
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_cspnu_strcspn@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_cspnu_strcspn
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_spnu_strspn@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_spnu_strspn
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_tokenizer_ru_strtok_r@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_tokenizer_ru_strtok_r
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_compareu_strcmp@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_compareu_strcmp
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_compare_code_point_orderu_strcmpCodePointOrder@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_compare_code_point_orderu_strcmpCodePointOrder
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_compare_binary_orderu_strCompare@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_compare_binary_orderu_strCompare
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_case_compare_with_lengthu_strCaseCompare@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_case_compare_with_lengthu_strCaseCompare
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_compare_nu_strncmp@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_compare_nu_strncmp
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_compare_n_code_point_orderu_strncmpCodePointOrder@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_compare_n_code_point_orderu_strncmpCodePointOrder
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_case_compareu_strcasecmp@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_case_compareu_strcasecmp
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_case_compare_nu_strncasecmp@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_case_compare_nu_strncasecmp
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_case_compareu_memcasecmp@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_case_compareu_memcasecmp
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_copyu_strcpy@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_copyu_strcpy
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_copy_nu_strncpy@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_copy_nu_strncpy
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_copy_uau_uastrcpy@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_copy_uau_uastrcpy
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_copy_ua_nu_uastrncpy@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_copy_ua_nu_uastrncpy
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_copy_auu_austrcpy@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_copy_auu_austrcpy
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_copy_au_nu_austrncpy@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_copy_au_nu_austrncpy
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_copyu_memcpy@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_copyu_memcpy
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_moveu_memmove@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_moveu_memmove
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_setu_memset@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_setu_memset
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_compareu_memcmp@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_compareu_memcmp
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_compare_code_point_orderu_memcmpCodePointOrder@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_compare_code_point_orderu_memcmpCodePointOrder
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_charu_memchr@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_charu_memchr
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_char32u_memchr32@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_char32u_memchr32
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_r_charu_memrchr@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_r_charu_memrchr
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_r_char32u_memrchr32@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_r_char32u_memrchr32
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_unescapeu_unescape@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_unescapeu_unescape
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_unescape_atu_unescapeAt@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_unescape_atu_unescapeAt
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_to_upperu_strToUpper@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_to_upperu_strToUpper
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_to_loweru_strToLower@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_to_loweru_strToLower
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_to_title_newu_strToTitle@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_to_title_newu_strToTitle
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_fold_caseu_strFoldCase@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_fold_caseu_strFoldCase
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_to_WCSu_strToWCS@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_to_WCSu_strToWCS
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_from_WCSu_strFromWCS@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_from_WCSu_strFromWCS
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_to_UTF8u_strToUTF8@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_to_UTF8u_strToUTF8
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_from_UTF8u_strFromUTF8@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_from_UTF8u_strFromUTF8
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_to_UTF8_with_subu_strToUTF8WithSub@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_to_UTF8_with_subu_strToUTF8WithSub
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_from_UTF8_with_subu_strFromUTF8WithSub@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_from_UTF8_with_subu_strFromUTF8WithSub
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_from_UTF8_lenientu_strFromUTF8Lenient@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_from_UTF8_lenientu_strFromUTF8Lenient
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_to_UTF32u_strToUTF32@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_to_UTF32u_strToUTF32
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_from_UTF32u_strFromUTF32@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_from_UTF32u_strFromUTF32
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_to_UTF32_with_subu_strToUTF32WithSub@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_to_UTF32_with_subu_strToUTF32WithSub
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_from_UTF32_with_subu_strFromUTF32WithSub@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_from_UTF32_with_subu_strFromUTF32WithSub
*/ @@ -1785,4 +1785,4 @@ extern "C" { } #endif -#endif /* __UTILS_I18N_H__*/ +#endif /* __UTILS_I18N_H__*/ diff --git a/src/include/mobile/utils_i18n_private.h b/src/include/mobile/utils_i18n_private.h old mode 100755 new mode 100644 index 70783e9..59f8cf1 --- a/src/include/mobile/utils_i18n_private.h +++ b/src/include/mobile/utils_i18n_private.h @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef __UTILS_I18N_PRIVATE_H__ @@ -37,54 +37,54 @@ extern "C" { #define LOG_TAG "BASE_UTILS" #define I18N_ERR(ret) do { \ - if (ret != I18N_ERROR_NONE) { \ - LOGE("err(%d): %s", ret, get_error_message(ret)); \ - } \ -} while (0) + if (ret != I18N_ERROR_NONE) { \ + LOGE("err(%d): %s", ret, get_error_message(ret)); \ + } \ + } while (0) #define ERR(fmt, arg...) LOGE(fmt, ##arg) #define ret_if(expr) do { \ - if (expr) { \ - ERR("(%s)", #expr); \ - return; \ - } \ -} while (0) + if (expr) { \ + ERR("(%s)", #expr); \ + return; \ + } \ + } while (0) #define retv_if(expr, val) do { \ - if (expr) { \ - ERR("(%s)", #expr); \ - return (val); \ - } \ -} while (0) + if (expr) { \ + ERR("(%s)", #expr); \ + return (val); \ + } \ + } while (0) #define retm_if(expr, fmt, arg...) do { \ - if (expr) { \ - ERR(fmt, ##arg); \ - return; \ - } \ -} while (0) + if (expr) { \ + ERR(fmt, ##arg); \ + return; \ + } \ + } while (0) #define retvm_if(expr, val, fmt, arg...) do { \ - if (expr) { \ - ERR(fmt, ##arg); \ - return (val); \ - } \ -} while (0) + if (expr) { \ + ERR(fmt, ##arg); \ + return (val); \ + } \ + } while (0) #define retex_if(expr, val, fmt, arg...) do { \ - if (expr) { \ - ERR(fmt, ##arg); \ - val; \ - goto CATCH; \ - } \ -} while (0); + if (expr) { \ + ERR(fmt, ##arg); \ + val; \ + goto CATCH; \ + } \ + } while (0); #define ERR_MAPPING_REVERSE(BASE_UTILS_ERROR, ICU_ERROR) ICU_ERROR = \ - (UErrorCode)_i18n_error_mapping_reverse((int)BASE_UTILS_ERROR) + (UErrorCode)_i18n_error_mapping_reverse((int)BASE_UTILS_ERROR) #define ERR_MAPPING(ICU_ERROR, BASE_UTILS_ERROR) BASE_UTILS_ERROR = \ - (i18n_error_code_e)_i18n_error_mapping((int)ICU_ERROR) + (i18n_error_code_e)_i18n_error_mapping((int)ICU_ERROR) int _i18n_error_mapping(int err); int _i18n_error_mapping_reverse(int err); @@ -93,4 +93,4 @@ int _i18n_error_mapping_reverse(int err); } #endif -#endif /* __UTILS_I18N_PRIVATE_H__*/ +#endif /* __UTILS_I18N_PRIVATE_H__*/ diff --git a/src/include/mobile/utils_i18n_timezone.h b/src/include/mobile/utils_i18n_timezone.h old mode 100755 new mode 100644 index fb768ae..3488b02 --- a/src/include/mobile/utils_i18n_timezone.h +++ b/src/include/mobile/utils_i18n_timezone.h @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef __UTILS_I18N_TIMEZONE_H__ @@ -34,7 +34,7 @@ extern "C" { * @defgroup CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE Timezone * @brief The Timezone module represents a time zone offset, and also figures out daylight savings. * @section CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE_HEADER Required Header - * \#include + * \#include * * @section CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE_OVERVIEW Overview * @details The Timezone module represents a time zone offset, and also figures out daylight savings.\n @@ -121,7 +121,7 @@ int i18n_timezone_destroy(i18n_timezone_h timezone); * * @retval #I18N_ERROR_NONE Successful */ -int i18n_timezone_foreach_timezone_id_by_region(i18n_system_timezone_type_e timezone_type, const char *region, const int32_t *raw_offset, i18n_timezone_id_cb cb, void* user_data); +int i18n_timezone_foreach_timezone_id_by_region(i18n_system_timezone_type_e timezone_type, const char *region, const int32_t *raw_offset, i18n_timezone_id_cb cb, void *user_data); /** * @brief Returns an enumeration over all recognized time zone IDs. @@ -133,7 +133,7 @@ int i18n_timezone_foreach_timezone_id_by_region(i18n_system_timezone_type_e time * * @retval #I18N_ERROR_NONE Successful */ -int i18n_timezone_foreach_timezone_id(i18n_timezone_id_cb cb, void* user_data); +int i18n_timezone_foreach_timezone_id(i18n_timezone_id_cb cb, void *user_data); /** * @brief Returns an enumeration over time zone IDs with a given raw offset from GMT. @@ -152,7 +152,7 @@ int i18n_timezone_foreach_timezone_id(i18n_timezone_id_cb cb, void* user_data); * * @retval #I18N_ERROR_NONE Successful */ -int i18n_timezone_foreach_timezone_id_with_offset(int32_t raw_offset, i18n_timezone_id_cb cb, void* user_data); +int i18n_timezone_foreach_timezone_id_with_offset(int32_t raw_offset, i18n_timezone_id_cb cb, void *user_data); /** * @brief Returns an enumeration over time zone IDs associated with the given country. @@ -165,7 +165,7 @@ int i18n_timezone_foreach_timezone_id_with_offset(int32_t raw_offset, i18n_timez * * @retval #I18N_ERROR_NONE Successful */ -int i18n_timezone_foreach_timezone_id_by_country(const char *country, i18n_timezone_id_cb cb, void* user_data); +int i18n_timezone_foreach_timezone_id_by_country(const char *country, i18n_timezone_id_cb cb, void *user_data); /** * @brief Returns the number of IDs in the equivalency group that includes the given ID. @@ -194,7 +194,7 @@ int i18n_timezone_count_equivalent_ids(const char *timezone_id, int32_t *count); * @param[in] timezone_id a system time zone ID * @param[in] index a value from 0 to n-1, where n is the out parameter value from i18n_timezone_count_equivalent_ids(timezone_id, &n) * @param[out] equivalent_timezone_id the ID of the index-th zone in the equivalency group containing 'timezone_id', - * or an empty string if 'timezone_id' is not a valid system ID or 'index' is out of range + * or an empty string if 'timezone_id' is not a valid system ID or 'index' is out of range * * @retval #I18N_ERROR_NONE Successful * @see i18n_timezone_count_equivalent_ids() @@ -235,13 +235,13 @@ int i18n_timezone_set_default(i18n_timezone_h timezone); /** * @brief Returns the timezone data version currently used by I18N. * @remarks The specific error code can be obtained using the get_last_result() - * method. Error codes are described in #i18n_error_code_e description. + * method. Error codes are described in #i18n_error_code_e description. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @return the version string, such as "2007f" * @exception #I18N_ERROR_NONE Successful */ -const char* i18n_timezone_get_tzdata_version(void); +const char *i18n_timezone_get_tzdata_version(void); /** * @brief Gets the region code associated with the given system time zone ID. @@ -254,7 +254,7 @@ const char* i18n_timezone_get_tzdata_version(void); * @param[out] region Output buffer for receiving the region code. * @param[out] region_len The length of the region code. * @param[in] region_capacity The size of the output buffer. If it is lower than required @a region buffer size, - * then I18N_ERROR_BUFFER_OVERFLOW error is returned. + * then I18N_ERROR_BUFFER_OVERFLOW error is returned. * * @return the version string, such as "2007f" */ @@ -278,7 +278,7 @@ int i18n_timezone_get_offset_with_date(i18n_timezone_h timezone, i18n_udate date /** * @brief Sets the i18n_timezone_h's raw GMT offset - * (i.e., the number of milliseconds to add to GMT to get local time, before taking daylight savings time into account). + * (i.e., the number of milliseconds to add to GMT to get local time, before taking daylight savings time into account). * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] timezone The i18n_timezone_h to set a raw offset. @@ -314,11 +314,11 @@ int i18n_timezone_get_id(i18n_timezone_h timezone, char **timezone_id); /** * @brief Sets the i18n_timezone_h's ID to the specified value. * @details This doesn't affect any other fields. for example,\n - * \n - * i18n_timezone_h timezone = NULL;\n - * i18n_timezone_create ( &timezone, "America/New_York" );\n - * i18n_timezone_set_id ( "America/Los_Angeles" );\n - * \n + * \n + * i18n_timezone_h timezone = NULL;\n + * i18n_timezone_create ( &timezone, "America/New_York" );\n + * i18n_timezone_set_id ( "America/Los_Angeles" );\n + * \n * the timezone's GMT offset and daylight-savings rules don't change to those for Los Angeles. * They're still those for New York. Only the ID has changed. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif @@ -464,4 +464,4 @@ int i18n_timezone_get_dst_savings(i18n_timezone_h timezone, int32_t *dst_savings * @} * @} */ -#endif /* __UTILS_I18N_TIMEZONE_H__*/ +#endif /* __UTILS_I18N_TIMEZONE_H__*/ diff --git a/src/include/mobile/utils_i18n_types.h b/src/include/mobile/utils_i18n_types.h index 7fa2b7a..833d356 100644 --- a/src/include/mobile/utils_i18n_types.h +++ b/src/include/mobile/utils_i18n_types.h @@ -1,20 +1,20 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * Copyright (C) 1999-2012, International Business Machines - * Corporation and others. All Rights Reserved. + * Corporation and others. All Rights Reserved. */ @@ -46,45 +46,45 @@ extern "C" { * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_ERROR_NONE = TIZEN_ERROR_NONE, /**< No error, no warning */ - I18N_ERROR_MISSING_RESOURCE = TIZEN_ERROR_UTILITY_ICU | 0x01, /**< The requested resource cannot be found */ - I18N_ERROR_INVALID_FORMAT = TIZEN_ERROR_UTILITY_ICU | 0x02, /**< Data format is not what is expected */ - I18N_ERROR_FILE_ACCESS = TIZEN_ERROR_UTILITY_ICU | 0x03, /**< The requested file cannot be found */ - I18N_ERROR_INTERNAL_PROGRAM = TIZEN_ERROR_UTILITY_ICU | 0x04, /**< Indicates a bug in the library code */ - I18N_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */ - I18N_ERROR_INDEX_OUTOFBOUNDS = TIZEN_ERROR_UTILITY_ICU | 0x05, /**< Trying to access the index that is out of bounds */ - I18N_ERROR_INVALID_CHAR_FOUND = TIZEN_ERROR_UTILITY_ICU | 0x06, /**< Character conversion: Unmappable input sequence. In other APIs: Invalid character */ - I18N_ERROR_BUFFER_OVERFLOW = TIZEN_ERROR_UTILITY_ICU | 0x07, /**< A result would not fit in the supplied buffer */ - I18N_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Requested operation is not supported in the current context */ - I18N_ERROR_COLLATOR_VERSION_MISMATCH = TIZEN_ERROR_UTILITY_ICU | 0x08, /**< Collator version is not compatible with the base version */ - I18N_ERROR_USELESS_COLLATOR = TIZEN_ERROR_UTILITY_ICU | 0x09, /**< Collator is options only and no base is specified */ - I18N_ERROR_NO_WRITE_PERMISSION = TIZEN_ERROR_UTILITY_ICU | 0x0A, /**< Attempt to modify read-only or constant data */ - I18N_ERROR_RESOURCE_TYPE_MISMATCH = TIZEN_ERROR_UTILITY_ICU | 0x0B, /**< An operation is requested over a resource that does not support it */ - I18N_ERROR_TOO_MANY_ALIASES = TIZEN_ERROR_UTILITY_ICU | 0x0C, /**< Too many aliases in the path to the requested resource */ - I18N_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid function parameter */ - I18N_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */ - - I18N_ERROR_MESSAGE_PARSE = TIZEN_ERROR_UTILITY_ICU | 0x0D, /**< Unable to parse a message (message format). @if MOBILE (Since 2.3.1) @endif*/ - I18N_ERROR_PARSE = TIZEN_ERROR_UTILITY_ICU | 0x0E, /**< Equivalent to Java ParseException. @if MOBILE (Since 2.3.1) @endif*/ - I18N_ERROR_TRUNCATED_CHAR_FOUND = TIZEN_ERROR_UTILITY_ICU | 0x0F, /**< Character conversion: Incomplete input sequence. @if MOBILE (Since 2.3.1) @endif*/ - I18N_ERROR_ILLEGAL_CHAR_FOUND = TIZEN_ERROR_UTILITY_ICU | 0x10, /**< Character conversion: Illegal input sequence/combination of input units. @if MOBILE (Since 2.3.1) @endif*/ - I18N_ERROR_INVALID_TABLE_FORMAT = TIZEN_ERROR_UTILITY_ICU | 0x11, /**< Conversion table file found, but corrupted. @if MOBILE (Since 2.3.1) @endif*/ - I18N_ERROR_INVALID_TABLE_FILE = TIZEN_ERROR_UTILITY_ICU | 0x12, /**< Conversion table file not found. @if MOBILE (Since 2.3.1) @endif*/ - I18N_ERROR_ILLECAL_ESCAPE_SEQUENCE = TIZEN_ERROR_UTILITY_ICU | 0x13, /**< ISO-2022 illlegal escape sequence. @if MOBILE (Since 2.3.1) @endif*/ - I18N_ERROR_UNSUPPORTED_ESCAPE_SEQUENCE = TIZEN_ERROR_UTILITY_ICU | 0x14, /**< ISO-2022 unsupported escape sequence. @if MOBILE (Since 2.3.1) @endif*/ - I18N_ERROR_NO_SPACE_AVAILABLE = TIZEN_ERROR_UTILITY_ICU | 0x15, /**< No space available for in-buffer expansion for Arabic shaping. @if MOBILE (Since 2.3.1) @endif*/ - I18N_ERROR_CE_NOT_FOUND = TIZEN_ERROR_UTILITY_ICU | 0x16, /**< Currently used only while setting variable top, but can be used generally. @if MOBILE (Since 2.3.1) @endif*/ - I18N_ERROR_PRIMARY_TOO_LONG = TIZEN_ERROR_UTILITY_ICU | 0x17, /**< User tried to set variable top to a primary that is longer than two bytes. @if MOBILE (Since 2.3.1) @endif*/ - I18N_ERROR_STATE_TOO_OLD = TIZEN_ERROR_UTILITY_ICU | 0x18, /**< ICU cannot construct a service from this state, as it is no longer supported. @if MOBILE (Since 2.3.1) @endif*/ - I18N_ERROR_ENUM_OUT_OF_SYNC = TIZEN_ERROR_UTILITY_ICU | 0x19, /**< UEnumeration out of sync with underlying collection. @if MOBILE (Since 2.3.1) @endif*/ - I18N_ERROR_INVARIANT_CONVERSION = TIZEN_ERROR_UTILITY_ICU | 0x1A, /**< Unable to convert a UChar* string to char* with the invariant converter. @if MOBILE (Since 2.3.1) @endif*/ - I18N_ERROR_INVALID_STATE = TIZEN_ERROR_UTILITY_ICU | 0x1B, /**< Requested operation can not be completed with ICU in its current state. @if MOBILE (Since 2.3.1) @endif*/ - I18N_ERROR_MALFORMED_SET = TIZEN_ERROR_UTILITY_ICU | 0x1C, /**< A UnicodeSet pattern is invalid. @if MOBILE (Since 2.3.1) @endif*/ - I18N_WARNING_STRING_NOT_TERMINATED = TIZEN_ERROR_UTILITY_ICU | 0x1D, /**< String not terminated with NULL. @if MOBILE (Since 2.3.1) @endif*/ - I18N_ERROR_STD3_ASCII_RULES = TIZEN_ERROR_UTILITY_ICU | 0x1E, /**< Argument does not satisfy STD3 rules. @if MOBILE (Since 2.3.1) @endif*/ - I18N_ERROR_UNASSIGNED = TIZEN_ERROR_UTILITY_ICU | 0x1F, /**< Unassigned code points are found. @if MOBILE (Since 2.3.1) @endif*/ - I18N_WARNING_SORT_KEY_TOO_SHORT = TIZEN_ERROR_UTILITY_ICU | 0x20, /**< Number of levels requested in getBound is higher than the number of levels in the sort key. @if MOBILE (Since 2.3.1) @endif*/ - I18N_ERROR_UNKNOWN = TIZEN_ERROR_UNKNOWN, /**< Unknown error. @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_NONE = TIZEN_ERROR_NONE, /**< No error, no warning */ + I18N_ERROR_MISSING_RESOURCE = TIZEN_ERROR_UTILITY_ICU | 0x01, /**< The requested resource cannot be found */ + I18N_ERROR_INVALID_FORMAT = TIZEN_ERROR_UTILITY_ICU | 0x02, /**< Data format is not what is expected */ + I18N_ERROR_FILE_ACCESS = TIZEN_ERROR_UTILITY_ICU | 0x03, /**< The requested file cannot be found */ + I18N_ERROR_INTERNAL_PROGRAM = TIZEN_ERROR_UTILITY_ICU | 0x04, /**< Indicates a bug in the library code */ + I18N_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */ + I18N_ERROR_INDEX_OUTOFBOUNDS = TIZEN_ERROR_UTILITY_ICU | 0x05, /**< Trying to access the index that is out of bounds */ + I18N_ERROR_INVALID_CHAR_FOUND = TIZEN_ERROR_UTILITY_ICU | 0x06, /**< Character conversion: Unmappable input sequence. In other APIs: Invalid character */ + I18N_ERROR_BUFFER_OVERFLOW = TIZEN_ERROR_UTILITY_ICU | 0x07, /**< A result would not fit in the supplied buffer */ + I18N_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Requested operation is not supported in the current context */ + I18N_ERROR_COLLATOR_VERSION_MISMATCH = TIZEN_ERROR_UTILITY_ICU | 0x08, /**< Collator version is not compatible with the base version */ + I18N_ERROR_USELESS_COLLATOR = TIZEN_ERROR_UTILITY_ICU | 0x09, /**< Collator is options only and no base is specified */ + I18N_ERROR_NO_WRITE_PERMISSION = TIZEN_ERROR_UTILITY_ICU | 0x0A, /**< Attempt to modify read-only or constant data */ + I18N_ERROR_RESOURCE_TYPE_MISMATCH = TIZEN_ERROR_UTILITY_ICU | 0x0B, /**< An operation is requested over a resource that does not support it */ + I18N_ERROR_TOO_MANY_ALIASES = TIZEN_ERROR_UTILITY_ICU | 0x0C, /**< Too many aliases in the path to the requested resource */ + I18N_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid function parameter */ + I18N_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */ + + I18N_ERROR_MESSAGE_PARSE = TIZEN_ERROR_UTILITY_ICU | 0x0D, /**< Unable to parse a message (message format). @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_PARSE = TIZEN_ERROR_UTILITY_ICU | 0x0E, /**< Equivalent to Java ParseException. @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_TRUNCATED_CHAR_FOUND = TIZEN_ERROR_UTILITY_ICU | 0x0F, /**< Character conversion: Incomplete input sequence. @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_ILLEGAL_CHAR_FOUND = TIZEN_ERROR_UTILITY_ICU | 0x10, /**< Character conversion: Illegal input sequence/combination of input units. @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_INVALID_TABLE_FORMAT = TIZEN_ERROR_UTILITY_ICU | 0x11, /**< Conversion table file found, but corrupted. @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_INVALID_TABLE_FILE = TIZEN_ERROR_UTILITY_ICU | 0x12, /**< Conversion table file not found. @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_ILLECAL_ESCAPE_SEQUENCE = TIZEN_ERROR_UTILITY_ICU | 0x13, /**< ISO-2022 illlegal escape sequence. @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_UNSUPPORTED_ESCAPE_SEQUENCE = TIZEN_ERROR_UTILITY_ICU | 0x14, /**< ISO-2022 unsupported escape sequence. @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_NO_SPACE_AVAILABLE = TIZEN_ERROR_UTILITY_ICU | 0x15, /**< No space available for in-buffer expansion for Arabic shaping. @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_CE_NOT_FOUND = TIZEN_ERROR_UTILITY_ICU | 0x16, /**< Currently used only while setting variable top, but can be used generally. @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_PRIMARY_TOO_LONG = TIZEN_ERROR_UTILITY_ICU | 0x17, /**< User tried to set variable top to a primary that is longer than two bytes. @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_STATE_TOO_OLD = TIZEN_ERROR_UTILITY_ICU | 0x18, /**< ICU cannot construct a service from this state, as it is no longer supported. @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_ENUM_OUT_OF_SYNC = TIZEN_ERROR_UTILITY_ICU | 0x19, /**< UEnumeration out of sync with underlying collection. @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_INVARIANT_CONVERSION = TIZEN_ERROR_UTILITY_ICU | 0x1A, /**< Unable to convert a UChar* string to char* with the invariant converter. @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_INVALID_STATE = TIZEN_ERROR_UTILITY_ICU | 0x1B, /**< Requested operation can not be completed with ICU in its current state. @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_MALFORMED_SET = TIZEN_ERROR_UTILITY_ICU | 0x1C, /**< A UnicodeSet pattern is invalid. @if MOBILE (Since 2.3.1) @endif*/ + I18N_WARNING_STRING_NOT_TERMINATED = TIZEN_ERROR_UTILITY_ICU | 0x1D, /**< String not terminated with NULL. @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_STD3_ASCII_RULES = TIZEN_ERROR_UTILITY_ICU | 0x1E, /**< Argument does not satisfy STD3 rules. @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_UNASSIGNED = TIZEN_ERROR_UTILITY_ICU | 0x1F, /**< Unassigned code points are found. @if MOBILE (Since 2.3.1) @endif*/ + I18N_WARNING_SORT_KEY_TOO_SHORT = TIZEN_ERROR_UTILITY_ICU | 0x20, /**< Number of levels requested in getBound is higher than the number of levels in the sort key. @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_UNKNOWN = TIZEN_ERROR_UNKNOWN, /**< Unknown error. @if MOBILE (Since 2.3.1) @endif*/ } i18n_error_code_e; /** @@ -97,50 +97,50 @@ typedef enum { * @{ */ -#define I18N_U_MASK(x) ((uint32_t)1<<(x)) /**< Get a single-bit bit set (a flag) from a bit number 0..31. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ - -#define I18N_U_GC_CN_MASK I18N_U_MASK(I18N_UCHAR_U_GENERAL_OTHER_TYPES) /**< U_GC_XX_MASK constants are bit flags corresponding to Unicode general category values. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_LU_MASK I18N_U_MASK(I18N_UCHAR_U_UPPERCASE_LETTER) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_LL_MASK I18N_U_MASK(I18N_UCHAR_U_LOWERCASE_LETTER) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_LT_MASK I18N_U_MASK(I18N_UCHAR_U_TITLECASE_LETTER) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_LM_MASK I18N_U_MASK(I18N_UCHAR_U_MODIFIER_LETTER) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_LO_MASK I18N_U_MASK(I18N_UCHAR_U_OTHER_LETTER) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_MN_MASK I18N_U_MASK(I18N_UCHAR_U_NON_SPACING_MARK) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_ME_MASK I18N_U_MASK(I18N_UCHAR_U_ENCLOSING_MARK) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_MC_MASK I18N_U_MASK(I18N_UCHAR_U_COMBINING_SPACING_MARK) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_ND_MASK I18N_U_MASK(I18N_UCHAR_U_DECIMAL_DIGIT_NUMBER) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_NL_MASK I18N_U_MASK(I18N_UCHAR_U_LETTER_NUMBER) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_NO_MASK I18N_U_MASK(I18N_UCHAR_U_OTHER_NUMBER) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_ZS_MASK I18N_U_MASK(I18N_UCHAR_U_SPACE_SEPARATOR) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_ZL_MASK I18N_U_MASK(I18N_UCHAR_U_LINE_SEPARATOR) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_ZP_MASK I18N_U_MASK(I18N_UCHAR_U_PARAGRAPH_SEPARATOR) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_CC_MASK I18N_U_MASK(I18N_UCHAR_U_CONTROL_CHAR) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_CF_MASK I18N_U_MASK(I18N_UCHAR_U_FORMAT_CHAR) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_CO_MASK I18N_U_MASK(I18N_UCHAR_U_PRIVATE_USE_CHAR) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_CS_MASK I18N_U_MASK(I18N_UCHAR_U_SURROGATE) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_PD_MASK I18N_U_MASK(I18N_UCHAR_U_DASH_PUNCTUATION) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_PS_MASK I18N_U_MASK(I18N_UCHAR_U_START_PUNCTUATION) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_PE_MASK I18N_U_MASK(I18N_UCHAR_U_END_PUNCTUATION) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_PC_MASK I18N_U_MASK(I18N_UCHAR_U_CONNECTOR_PUNCTUATION) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_PO_MASK I18N_U_MASK(I18N_UCHAR_U_OTHER_PUNCTUATION) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_SM_MASK I18N_U_MASK(I18N_UCHAR_U_MATH_SYMBOL) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_SC_MASK I18N_U_MASK(I18N_UCHAR_U_CURRENCY_SYMBOL) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_SK_MASK I18N_U_MASK(I18N_UCHAR_U_MODIFIER_SYMBOL) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_SO_MASK I18N_U_MASK(I18N_UCHAR_U_OTHER_SYMBOL) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_PI_MASK I18N_U_MASK(I18N_UCHAR_U_INITIAL_PUNCTUATION) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_PF_MASK I18N_U_MASK(I18N_UCHAR_U_FINAL_PUNCTUATION) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_L_MASK (I18N_U_GC_LU_MASK|I18N_U_GC_LL_MASK|I18N_U_GC_LT_MASK|I18N_U_GC_LM_MASK|I18N_U_GC_LO_MASK) /**in the target of a case mapping. Not the same as the general category Cased_Letter. - */ - I18N_UCHAR_S_TERM, - /**< Binary property STerm (new in Unicode 4.0.1). \n - */ - I18N_UCHAR_VARIATION_SELECTOR, - /**< Binary property Variation_Selector (new in Unicode 4.0.1). \n - Indicates all those characters that qualify as Variation Selectors. - */ - I18N_UCHAR_NFD_INERT, - /**< Binary property NFD_Inert. \n - ICU-specific property for characters that are inert under NFD, i.e., they do not interact with adjacent characters. - */ - I18N_UCHAR_NFKD_INERT, - /**< Binary property NFKD_Inert. \n - ICU-specific property for characters that are inert under NFKD, i.e., they do not interact with adjacent characters. - */ - I18N_UCHAR_NFC_INERT, - /**< Binary property NFC_Inert. \n - ICU-specific property for characters that are inert under NFC, i.e., they do not interact with adjacent characters. - */ - I18N_UCHAR_NFKC_INERT, - /**< Binary property NFKC_Inert. \n - ICU-specific property for characters that are inert under NFKC, i.e., they do not interact with adjacent characters. - */ - I18N_UCHAR_SEGMENT_STARTER, - /**< Binary Property Segment_Starter. \n - Property for characters that are starters in terms of Unicode normalization and combining character sequences. - They have ccc=0 and do not occur in non-initial position of the canonical decomposition of any character - (like a-umlaut in NFD and a Jamo T in an NFD(Hangul LVT)). - */ - I18N_UCHAR_PATTERN_SYNTAX, - /**< Binary property Pattern_Syntax (new in Unicode 4.1). \n - */ - I18N_UCHAR_PATTERN_WHITE_SPACE, - /**< Binary property Pattern_White_Space (new in Unicode 4.1). \n - */ - I18N_UCHAR_POSIX_ALNUM, - /**< Binary property alnum (a C/POSIX character class).*/ - I18N_UCHAR_POSIX_BLANK, - /**< Binary property blank (a C/POSIX character class).*/ - I18N_UCHAR_POSIX_GRAPH, - /**< Binary property graph (a C/POSIX character class). */ - I18N_UCHAR_POSIX_PRINT, - /**< Binary property print (a C/POSIX character class). */ - I18N_UCHAR_POSIX_XDIGIT, - /**< Binary property xdigit (a C/POSIX character class). */ - I18N_UCHAR_CASED, - /**< Binary property Cased. \n - For Lowercase, Uppercase and Titlecase characters. - */ - I18N_UCHAR_CASE_IGNORABLE, - /**< Binary property Case_Ignorable. \n - Used in context-sensitive case mappings. - */ - I18N_UCHAR_CHANGES_WHEN_LOWERCASED, - /**< Binary property Changes_When_Lowercased. */ - I18N_UCHAR_CHANGES_WHEN_UPPERCASED, - /**< Binary property Changes_When_Uppercased. */ - I18N_UCHAR_CHANGES_WHEN_TITLECASED, - /**< Binary property Changes_When_Titlecased. */ - I18N_UCHAR_CHANGES_WHEN_CASEFOLDED, - /**< Binary property Changes_When_Casefolded. */ - I18N_UCHAR_CHANGES_WHEN_CASEMAPPED, - /**< Binary property Changes_When_Casemapped. */ - I18N_UCHAR_CHANGES_WHEN_NFKC_CASEFOLDED, - /**< Binary property Changes_When_NFKC_Casefolded. */ - I18N_UCHAR_BINARY_LIMIT, - /**< One more than the last constant for binary Unicode properties. */ - I18N_UCHAR_BIDI_CLASS = 0x1000, - /**< Enumerated property Bidi_Class. \n - Same as u_charDirection, returns #i18n_uchar_direction_e values. - */ - I18N_UCHAR_INT_START = I18N_UCHAR_BIDI_CLASS, - /**< First constant for enumerated/integer Unicode properties. */ - I18N_UCHAR_BLOCK, - /**< Enumerated property Block. \n - Returns #i18n_uchar_ublock_code_e values. - */ - I18N_UCHAR_CANONICAL_COMBINING_CLASS, - /**< Enumerated property Canonical_Combining_Class. \n - Returns 8-bit numeric values. - */ - I18N_UCHAR_DECOMPOSITION_TYPE, - /**< Enumerated property Decomposition_Type. \n - Returns #i18n_uchar_u_decomposition_type_e values. - */ - I18N_UCHAR_EAST_ASIAN_WIDTH, - /**< Enumerated property East_Asian_Width. \n - Returns #i18n_uchar_u_east_asian_width_e values. - */ - I18N_UCHAR_GENERAL_CATEGORY, - /**< Enumerated property General_Category. \n - Returns #i18n_uchar_category_e values. - */ - I18N_UCHAR_JOINING_GROUP, - /**< Enumerated property Joining_Group. \n - Returns #i18n_uchar_u_joining_group_e values. - */ - I18N_UCHAR_JOINING_TYPE, - /**< Enumerated property Joining_Type. \n - Returns #i18n_uchar_u_joining_type_e values. - */ - I18N_UCHAR_LINE_BREAK, - /**< Enumerated property Line_Break. \n - Returns #i18n_uchar_u_line_break_e values. - */ - I18N_UCHAR_NUMERIC_TYPE, - /**< Enumerated property Numeric_Type. \n - Returns #i18n_uchar_u_numeric_type_e values. - */ - I18N_UCHAR_SCRIPT, - /**< Enumerated property Script. \n - Returns #i18n_uscript_code_e values. - */ - I18N_UCHAR_HANGUL_SYLLABLE_TYPE, - /**< Enumerated property Hangul_Syllable_Type, new in Unicode 4. \n - Returns #i18n_uchar_u_hangul_syllable_type_e values. - */ - I18N_UCHAR_NFD_QUICK_CHECK, - /**< Enumerated property NFD_Quick_Check. \n - Returns #i18n_unormalization_check_result_e values. - */ - I18N_UCHAR_NFKD_QUICK_CHECK, - /**< Enumerated property NFKD_Quick_Check. \n - Returns #i18n_unormalization_check_result_e values. - */ - I18N_UCHAR_NFC_QUICK_CHECK, - /**< Enumerated property NFC_Quick_Check. \n - Returns #i18n_unormalization_check_result_e values. - */ - I18N_UCHAR_NFKC_QUICK_CHECK, - /**< Enumerated property NFKC_Quick_Check. \n - Returns #i18n_unormalization_check_result_e values. - */ - I18N_UCHAR_LEAD_CANONICAL_COMBINING_CLASS, - /**< Enumerated property Lead_Canonical_Combining_Class. \n - Returns 8-bit numeric values like #UCHAR_CANONICAL_COMBINING_CLASS. - */ - I18N_UCHAR_TRAIL_CANONICAL_COMBINING_CLASS, - /**< Enumerated property Trail_Canonical_Combining_Class. \n - Returns 8-bit numeric values like #UCHAR_CANONICAL_COMBINING_CLASS. - */ - I18N_UCHAR_GRAPHEME_CLUSTER_BREAK, - /**< Enumerated property Grapheme_Cluster_Break (new in Unicode 4.1). \n - Returns #i18n_uchar_u_grapheme_cluster_break_e values. - */ - I18N_UCHAR_SENTENCE_BREAK, - /**< Enumerated property Sentence_Break (new in Unicode 4.1). \n - Returns #i18n_uchar_u_sentence_break_e values. - */ - I18N_UCHAR_WORD_BREAK, - /**< Enumerated property Word_Break (new in Unicode 4.1). \n - Returns #i18n_uchar_u_word_break_values_e values. - */ - I18N_UCHAR_BIDI_PAIRED_BRACKET_TYPE, - /**< Enumerated property Bidi_Paired_Bracket_Type. \n - Returns #i18n_uchar_u_bidi_paired_bracket_type_e values . - */ - I18N_UCHAR_INT_LIMIT, - /**< One more than the last constant for enumerated/integer Unicode properties. */ - I18N_UCHAR_GENERAL_CATEGORY_MASK = 0x2000, - /**< Bitmask property General_Category_Mask. \n - Mask values should be cast to uint32_t. - */ - I18N_UCHAR_MASK_START = I18N_UCHAR_GENERAL_CATEGORY_MASK, - /**< First constant for bit-mask Unicode properties. */ - I18N_UCHAR_MASK_LIMIT, - /**< One more than the last constant for bit-mask Unicode properties. */ - I18N_UCHAR_NUMERIC_VALUE = 0x3000, - /**< Double property Numeric_Value. */ - I18N_UCHAR_DOUBLE_START = I18N_UCHAR_NUMERIC_VALUE, - /**< First constant for double Unicode properties. */ - I18N_UCHAR_DOUBLE_LIMIT, - /**< One more than the last constant for double Unicode properties. */ - I18N_UCHAR_AGE = 0x4000, - /**< String property Age. */ - I18N_UCHAR_STRING_START = I18N_UCHAR_AGE, - /**< First constant for string Unicode properties. */ - I18N_UCHAR_BIDI_MIRRORING_GLYPH, - /**< String property Bidi_Mirroring_Glyph. */ - I18N_UCHAR_CASE_FOLDING, - /**< String property Case_Folding. */ - I18N_UCHAR_LOWERCASE_MAPPING = 0x4004, - /**< String property Lowercase_Mapping. */ - I18N_UCHAR_NAME, - /**< String property Name. */ - I18N_UCHAR_SIMPLE_CASE_FOLDING, - /**< String property Simple_Case_Folding. */ - I18N_UCHAR_SIMPLE_LOWERCASE_MAPPING, - /**< String property Simple_Lowercase_Mapping. */ - I18N_UCHAR_SIMPLE_TITLECASE_MAPPING, - /**< String property Simple_Titlecase_Mapping. */ - I18N_UCHAR_SIMPLE_UPPERCASE_MAPPING, - /**< String property Simple_Uppercase_Mapping. */ - I18N_UCHAR_TITLECASE_MAPPING, - /**< String property Titlecase_Mapping. */ - I18N_UCHAR_UPPERCASE_MAPPING = 0x400C, - /**< String property Uppercase_Mapping. */ - I18N_UCHAR_BIDI_PAIRED_BRACKET = 0x400D, - /**< String property Bidi_Paired_Bracket. */ - I18N_UCHAR_STRING_LIMIT, - /**< One more than the last constant for string Unicode properties. */ - I18N_UCHAR_SCRIPT_EXTENSIONS = 0x7000, - /**< Provisional property Script_Extensions (new in Unicode 6.0). */ - I18N_UCHAR_OTHER_PROPERTY_START = I18N_UCHAR_SCRIPT_EXTENSIONS, - /**< First constant for Unicode properties with unusual value types. */ - I18N_UCHAR_OTHER_PROPERTY_LIMIT, - /**< One more than the last constant for Unicode properties with unusual value types. */ - I18N_UCHAR_INVALID_CODE = -1 - /**< Represents a nonexistent or invalid property or property value. */ + I18N_UCHAR_ALPHABETIC = 0, + /**< Binary property Alphabetic. \n + Lu+Ll+Lt+Lm+Lo+Nl+Other_Alphabetic + */ + I18N_UCHAR_BINARY_START = I18N_UCHAR_ALPHABETIC, + /**< First constant for binary Unicode properties. */ + I18N_UCHAR_ASCII_HEX_DIGIT, + /**< Binary property ASCII_Hex_Digit. \n + 0-9 A-F a-f + */ + I18N_UCHAR_BIDI_CONTROL, + /**< Binary property Bidi_Control. \n + Format controls which have specific functions in the Bidi Algorithm. + */ + I18N_UCHAR_BIDI_MIRRORED, + /**< Binary property Bidi_Mirrored. \n + Characters that may change display in RTL text. See Bidi Algorithm, UTR 9. + */ + I18N_UCHAR_DASH, + /**< Binary property Dash. \n + Variations of dashes. + */ + I18N_UCHAR_DEFAULT_IGNORABLE_CODE_POINT, + /**< Binary property Default_Ignorable_Code_Point (new in Unicode 3.2). \n + Ignorable in most processing. <2060..206F, FFF0..FFFB, E0000..E0FFF>+Other_Default_Ignorable_Code_Point+(Cf+Cc+Cs-White_Space) + */ + I18N_UCHAR_DEPRECATED, + /**< Binary property Deprecated (new in Unicode 3.2). \n + The usage of deprecated characters is strongly discouraged. + */ + I18N_UCHAR_DIACRITIC, + /**< Binary property Diacritic. \n + Characters that linguistically modify the meaning of another character to which they apply. + */ + I18N_UCHAR_EXTENDER, + /**< Binary property Extender. \n + Extend the value or shape of a preceding alphabetic character, e.g. length and iteration marks. + */ + I18N_UCHAR_FULL_COMPOSITION_EXCLUSION, + /**< Binary property Full_Composition_Exclusion. \n + CompositionExclusions.txt+Singleton Decompositions+ Non-Starter Decompositions. + */ + I18N_UCHAR_GRAPHEME_BASE, + /**< Binary property Grapheme_Base (new in Unicode 3.2). \n + For programmatic determination of grapheme cluster boundaries. [0..10FFFF]-Cc-Cf-Cs-Co-Cn-Zl-Zp-Grapheme_Link-Grapheme_Extend-CGJ + */ + I18N_UCHAR_GRAPHEME_EXTEND, + /**< Binary property Grapheme_Extend (new in Unicode 3.2). \n + For programmatic determination of grapheme cluster boundaries. Me+Mn+Mc+Other_Grapheme_Extend-Grapheme_Link-CGJ + */ + I18N_UCHAR_GRAPHEME_LINK, + /**< Binary property Grapheme_Link (new in Unicode 3.2). \n + For programmatic determination of grapheme cluster boundaries. + */ + I18N_UCHAR_HEX_DIGIT, + /**< Binary property Hex_Digit. \n + Characters commonly used for hexadecimal numbers. + */ + I18N_UCHAR_HYPHEN, + /**< Binary property Hyphen. \n + Dashes used to mark connections between pieces of words, plus the Katakana middle dot. + */ + I18N_UCHAR_ID_CONTINUE, + /**< Binary property ID_Continue. \n + Characters that can continue an identifier. DerivedCoreProperties.txt also says "NOTE: Cf characters should be filtered out." ID_Start+Mn+Mc+Nd+Pc + */ + I18N_UCHAR_ID_START, + /**< Binary property ID_Start. \n + Characters that can start an identifier. Lu+Ll+Lt+Lm+Lo+Nl + */ + I18N_UCHAR_IDEOGRAPHIC, + /**< Binary property Ideographic. \n + CJKV ideographs. + */ + I18N_UCHAR_IDS_BINARY_OPERATOR, + /**< Binary property IDS_Binary_Operator (new in Unicode 3.2). \n + For programmatic determination of Ideographic Description Sequences. + */ + I18N_UCHAR_IDS_TRINARY_OPERATOR, + /**< Binary property IDS_Trinary_Operator (new in Unicode 3.2). \n + For programmatic determination of Ideographic Description Sequences. + */ + I18N_UCHAR_JOIN_CONTROL, + /**< Binary property Join_Control. \n + Format controls for cursive joining and ligation. + */ + I18N_UCHAR_LOGICAL_ORDER_EXCEPTION, + /**< Binary property Logical_Order_Exception (new in Unicode 3.2). \n + Characters that do not use logical order and require special handling in most processing. + */ + I18N_UCHAR_LOWERCASE, + /**< Binary property Lowercase. \n + Ll+Other_Lowercase + */ + I18N_UCHAR_MATH, + /**< Binary property Math. \n + Sm+Other_Math + */ + I18N_UCHAR_NONCHARACTER_CODE_POINT, + /**< Binary property Noncharacter_Code_Point. \n + Code points that are explicitly defined as illegal for the encoding of characters. + */ + I18N_UCHAR_QUOTATION_MARK, + /**< Binary property Quotation_Mark. \n + */ + I18N_UCHAR_RADICAL, + /**< Binary property Radical (new in Unicode 3.2). \n + For programmatic determination of Ideographic Description Sequences. + */ + I18N_UCHAR_SOFT_DOTTED, + /**< Binary property Soft_Dotted (new in Unicode 3.2). \n + Characters with a "soft dot", like i or j. An accent placed on these characters causes the dot to disappear. + */ + I18N_UCHAR_TERMINAL_PUNCTUATION, + /**< Binary property Terminal_Punctuation. \n + Punctuation characters that generally mark the end of textual units. + */ + I18N_UCHAR_UNIFIED_IDEOGRAPH, + /**< Binary property Unified_Ideograph (new in Unicode 3.2). \n + For programmatic determination of Ideographic Description Sequences. + */ + I18N_UCHAR_UPPERCASE, + /**< Binary property Uppercase. \n + Lu+Other_Uppercase + */ + I18N_UCHAR_WHITE_SPACE, + /**< Binary property White_Space. \n + Space characters+TAB+CR+LF-ZWSP-ZWNBSP + */ + I18N_UCHAR_XID_CONTINUE, + /**< Binary property XID_Continue. \n + ID_Continue modified to allow closure under normalization forms NFKC and NFKD. + */ + I18N_UCHAR_XID_START, + /**< Binary property XID_Start. \n + ID_Start modified to allow closure under normalization forms NFKC and NFKD. + */ + I18N_UCHAR_CASE_SENSITIVE, + /**< Binary property Case_Sensitive. \n + Either the source of a case mapping or in the target of a case mapping. Not the same as the general category Cased_Letter. + */ + I18N_UCHAR_S_TERM, + /**< Binary property STerm (new in Unicode 4.0.1). \n + */ + I18N_UCHAR_VARIATION_SELECTOR, + /**< Binary property Variation_Selector (new in Unicode 4.0.1). \n + Indicates all those characters that qualify as Variation Selectors. + */ + I18N_UCHAR_NFD_INERT, + /**< Binary property NFD_Inert. \n + ICU-specific property for characters that are inert under NFD, i.e., they do not interact with adjacent characters. + */ + I18N_UCHAR_NFKD_INERT, + /**< Binary property NFKD_Inert. \n + ICU-specific property for characters that are inert under NFKD, i.e., they do not interact with adjacent characters. + */ + I18N_UCHAR_NFC_INERT, + /**< Binary property NFC_Inert. \n + ICU-specific property for characters that are inert under NFC, i.e., they do not interact with adjacent characters. + */ + I18N_UCHAR_NFKC_INERT, + /**< Binary property NFKC_Inert. \n + ICU-specific property for characters that are inert under NFKC, i.e., they do not interact with adjacent characters. + */ + I18N_UCHAR_SEGMENT_STARTER, + /**< Binary Property Segment_Starter. \n + Property for characters that are starters in terms of Unicode normalization and combining character sequences. + They have ccc=0 and do not occur in non-initial position of the canonical decomposition of any character + (like a-umlaut in NFD and a Jamo T in an NFD(Hangul LVT)). + */ + I18N_UCHAR_PATTERN_SYNTAX, + /**< Binary property Pattern_Syntax (new in Unicode 4.1). \n + */ + I18N_UCHAR_PATTERN_WHITE_SPACE, + /**< Binary property Pattern_White_Space (new in Unicode 4.1). \n + */ + I18N_UCHAR_POSIX_ALNUM, + /**< Binary property alnum (a C/POSIX character class).*/ + I18N_UCHAR_POSIX_BLANK, + /**< Binary property blank (a C/POSIX character class).*/ + I18N_UCHAR_POSIX_GRAPH, + /**< Binary property graph (a C/POSIX character class). */ + I18N_UCHAR_POSIX_PRINT, + /**< Binary property print (a C/POSIX character class). */ + I18N_UCHAR_POSIX_XDIGIT, + /**< Binary property xdigit (a C/POSIX character class). */ + I18N_UCHAR_CASED, + /**< Binary property Cased. \n + For Lowercase, Uppercase and Titlecase characters. + */ + I18N_UCHAR_CASE_IGNORABLE, + /**< Binary property Case_Ignorable. \n + Used in context-sensitive case mappings. + */ + I18N_UCHAR_CHANGES_WHEN_LOWERCASED, + /**< Binary property Changes_When_Lowercased. */ + I18N_UCHAR_CHANGES_WHEN_UPPERCASED, + /**< Binary property Changes_When_Uppercased. */ + I18N_UCHAR_CHANGES_WHEN_TITLECASED, + /**< Binary property Changes_When_Titlecased. */ + I18N_UCHAR_CHANGES_WHEN_CASEFOLDED, + /**< Binary property Changes_When_Casefolded. */ + I18N_UCHAR_CHANGES_WHEN_CASEMAPPED, + /**< Binary property Changes_When_Casemapped. */ + I18N_UCHAR_CHANGES_WHEN_NFKC_CASEFOLDED, + /**< Binary property Changes_When_NFKC_Casefolded. */ + I18N_UCHAR_BINARY_LIMIT, + /**< One more than the last constant for binary Unicode properties. */ + I18N_UCHAR_BIDI_CLASS = 0x1000, + /**< Enumerated property Bidi_Class. \n + Same as u_charDirection, returns #i18n_uchar_direction_e values. + */ + I18N_UCHAR_INT_START = I18N_UCHAR_BIDI_CLASS, + /**< First constant for enumerated/integer Unicode properties. */ + I18N_UCHAR_BLOCK, + /**< Enumerated property Block. \n + Returns #i18n_uchar_ublock_code_e values. + */ + I18N_UCHAR_CANONICAL_COMBINING_CLASS, + /**< Enumerated property Canonical_Combining_Class. \n + Returns 8-bit numeric values. + */ + I18N_UCHAR_DECOMPOSITION_TYPE, + /**< Enumerated property Decomposition_Type. \n + Returns #i18n_uchar_u_decomposition_type_e values. + */ + I18N_UCHAR_EAST_ASIAN_WIDTH, + /**< Enumerated property East_Asian_Width. \n + Returns #i18n_uchar_u_east_asian_width_e values. + */ + I18N_UCHAR_GENERAL_CATEGORY, + /**< Enumerated property General_Category. \n + Returns #i18n_uchar_category_e values. + */ + I18N_UCHAR_JOINING_GROUP, + /**< Enumerated property Joining_Group. \n + Returns #i18n_uchar_u_joining_group_e values. + */ + I18N_UCHAR_JOINING_TYPE, + /**< Enumerated property Joining_Type. \n + Returns #i18n_uchar_u_joining_type_e values. + */ + I18N_UCHAR_LINE_BREAK, + /**< Enumerated property Line_Break. \n + Returns #i18n_uchar_u_line_break_e values. + */ + I18N_UCHAR_NUMERIC_TYPE, + /**< Enumerated property Numeric_Type. \n + Returns #i18n_uchar_u_numeric_type_e values. + */ + I18N_UCHAR_SCRIPT, + /**< Enumerated property Script. \n + Returns #i18n_uscript_code_e values. + */ + I18N_UCHAR_HANGUL_SYLLABLE_TYPE, + /**< Enumerated property Hangul_Syllable_Type, new in Unicode 4. \n + Returns #i18n_uchar_u_hangul_syllable_type_e values. + */ + I18N_UCHAR_NFD_QUICK_CHECK, + /**< Enumerated property NFD_Quick_Check. \n + Returns #i18n_unormalization_check_result_e values. + */ + I18N_UCHAR_NFKD_QUICK_CHECK, + /**< Enumerated property NFKD_Quick_Check. \n + Returns #i18n_unormalization_check_result_e values. + */ + I18N_UCHAR_NFC_QUICK_CHECK, + /**< Enumerated property NFC_Quick_Check. \n + Returns #i18n_unormalization_check_result_e values. + */ + I18N_UCHAR_NFKC_QUICK_CHECK, + /**< Enumerated property NFKC_Quick_Check. \n + Returns #i18n_unormalization_check_result_e values. + */ + I18N_UCHAR_LEAD_CANONICAL_COMBINING_CLASS, + /**< Enumerated property Lead_Canonical_Combining_Class. \n + Returns 8-bit numeric values like #UCHAR_CANONICAL_COMBINING_CLASS. + */ + I18N_UCHAR_TRAIL_CANONICAL_COMBINING_CLASS, + /**< Enumerated property Trail_Canonical_Combining_Class. \n + Returns 8-bit numeric values like #UCHAR_CANONICAL_COMBINING_CLASS. + */ + I18N_UCHAR_GRAPHEME_CLUSTER_BREAK, + /**< Enumerated property Grapheme_Cluster_Break (new in Unicode 4.1). \n + Returns #i18n_uchar_u_grapheme_cluster_break_e values. + */ + I18N_UCHAR_SENTENCE_BREAK, + /**< Enumerated property Sentence_Break (new in Unicode 4.1). \n + Returns #i18n_uchar_u_sentence_break_e values. + */ + I18N_UCHAR_WORD_BREAK, + /**< Enumerated property Word_Break (new in Unicode 4.1). \n + Returns #i18n_uchar_u_word_break_values_e values. + */ + I18N_UCHAR_BIDI_PAIRED_BRACKET_TYPE, + /**< Enumerated property Bidi_Paired_Bracket_Type. \n + Returns #i18n_uchar_u_bidi_paired_bracket_type_e values . + */ + I18N_UCHAR_INT_LIMIT, + /**< One more than the last constant for enumerated/integer Unicode properties. */ + I18N_UCHAR_GENERAL_CATEGORY_MASK = 0x2000, + /**< Bitmask property General_Category_Mask. \n + Mask values should be cast to uint32_t. + */ + I18N_UCHAR_MASK_START = I18N_UCHAR_GENERAL_CATEGORY_MASK, + /**< First constant for bit-mask Unicode properties. */ + I18N_UCHAR_MASK_LIMIT, + /**< One more than the last constant for bit-mask Unicode properties. */ + I18N_UCHAR_NUMERIC_VALUE = 0x3000, + /**< Double property Numeric_Value. */ + I18N_UCHAR_DOUBLE_START = I18N_UCHAR_NUMERIC_VALUE, + /**< First constant for double Unicode properties. */ + I18N_UCHAR_DOUBLE_LIMIT, + /**< One more than the last constant for double Unicode properties. */ + I18N_UCHAR_AGE = 0x4000, + /**< String property Age. */ + I18N_UCHAR_STRING_START = I18N_UCHAR_AGE, + /**< First constant for string Unicode properties. */ + I18N_UCHAR_BIDI_MIRRORING_GLYPH, + /**< String property Bidi_Mirroring_Glyph. */ + I18N_UCHAR_CASE_FOLDING, + /**< String property Case_Folding. */ + I18N_UCHAR_LOWERCASE_MAPPING = 0x4004, + /**< String property Lowercase_Mapping. */ + I18N_UCHAR_NAME, + /**< String property Name. */ + I18N_UCHAR_SIMPLE_CASE_FOLDING, + /**< String property Simple_Case_Folding. */ + I18N_UCHAR_SIMPLE_LOWERCASE_MAPPING, + /**< String property Simple_Lowercase_Mapping. */ + I18N_UCHAR_SIMPLE_TITLECASE_MAPPING, + /**< String property Simple_Titlecase_Mapping. */ + I18N_UCHAR_SIMPLE_UPPERCASE_MAPPING, + /**< String property Simple_Uppercase_Mapping. */ + I18N_UCHAR_TITLECASE_MAPPING, + /**< String property Titlecase_Mapping. */ + I18N_UCHAR_UPPERCASE_MAPPING = 0x400C, + /**< String property Uppercase_Mapping. */ + I18N_UCHAR_BIDI_PAIRED_BRACKET = 0x400D, + /**< String property Bidi_Paired_Bracket. */ + I18N_UCHAR_STRING_LIMIT, + /**< One more than the last constant for string Unicode properties. */ + I18N_UCHAR_SCRIPT_EXTENSIONS = 0x7000, + /**< Provisional property Script_Extensions (new in Unicode 6.0). */ + I18N_UCHAR_OTHER_PROPERTY_START = I18N_UCHAR_SCRIPT_EXTENSIONS, + /**< First constant for Unicode properties with unusual value types. */ + I18N_UCHAR_OTHER_PROPERTY_LIMIT, + /**< One more than the last constant for Unicode properties with unusual value types. */ + I18N_UCHAR_INVALID_CODE = -1 + /**< Represents a nonexistent or invalid property or property value. */ } i18n_uchar_uproperty_e; /** @@ -588,11 +588,11 @@ typedef enum { * */ typedef enum { - I18N_UCHAR_U_BPT_NONE, /**< Not a paired bracket. */ + I18N_UCHAR_U_BPT_NONE, /**< Not a paired bracket. */ - I18N_UCHAR_U_BPT_OPEN, /**< Open paired bracket. */ + I18N_UCHAR_U_BPT_OPEN, /**< Open paired bracket. */ - I18N_UCHAR_U_BPT_CLOSE, /**< Close paired bracket. */ + I18N_UCHAR_U_BPT_CLOSE, /**< Close paired bracket. */ I18N_UCHAR_U_BPT_COUNT /**< Count */ } i18n_uchar_u_bidi_paired_bracket_type_e; @@ -603,253 +603,253 @@ typedef enum { * */ typedef enum { - I18N_UCHAR_UBLOCK_NO_BLOCK, /**< No Block */ - I18N_UCHAR_UBLOCK_BASIC_LATIN, /**< Basic Latin */ - I18N_UCHAR_UBLOCK_LATIN_1_SUPPLEMENT, /**< Latin_1 Supplement */ - I18N_UCHAR_UBLOCK_LATIN_EXTENDED_A, /**< Latin Extended A */ - I18N_UCHAR_UBLOCK_LATIN_EXTENDED_B, /**< Latin Extended B */ - I18N_UCHAR_UBLOCK_IPA_EXTENSIONS, /**< IPA Extensions */ - I18N_UCHAR_UBLOCK_SPACING_MODIFIER_LETTERS, /**< Spacing Modifier Letters */ - I18N_UCHAR_UBLOCK_COMBINING_DIACRITICAL_MARKS, /**< Combining Diacritical Marks */ - I18N_UCHAR_UBLOCK_GREEK, /**< Greek */ - I18N_UCHAR_UBLOCK_CYRILLIC, /**< Cyrillic */ - I18N_UCHAR_UBLOCK_ARMENIAN, /**< Armenian */ - I18N_UCHAR_UBLOCK_HEBREW, /**< Hebrew */ - I18N_UCHAR_UBLOCK_ARABIC, /**< Arabic */ - I18N_UCHAR_UBLOCK_SYRIAC, /**< Syriac */ - I18N_UCHAR_UBLOCK_THAANA, /**< Thaana */ - I18N_UCHAR_UBLOCK_DEVANAGARI, /**< Devanagari */ - I18N_UCHAR_UBLOCK_BENGALI, /**< Bengali */ - I18N_UCHAR_UBLOCK_GURMUKHI, /**< Gurmukhi */ - I18N_UCHAR_UBLOCK_GUJARATI, /**< Gujarati */ - I18N_UCHAR_UBLOCK_ORIYA, /**< Oriya */ - I18N_UCHAR_UBLOCK_TAMIL, /**< Tamil */ - I18N_UCHAR_UBLOCK_TELUGU, /**< Telugu */ - I18N_UCHAR_UBLOCK_KANNADA, /**< Kannada */ - I18N_UCHAR_UBLOCK_MALAYALAM, /**< Malayalam */ - I18N_UCHAR_UBLOCK_SINHALA, /**< Sinhala */ - I18N_UCHAR_UBLOCK_THAI, /**< Thai */ - I18N_UCHAR_UBLOCK_LAO, /**< Lao */ - I18N_UCHAR_UBLOCK_TIBETAN, /**< Tibetan */ - I18N_UCHAR_UBLOCK_MYANMAR, /**< Myanmar */ - I18N_UCHAR_UBLOCK_GEORGIAN, /**< Georgian */ - I18N_UCHAR_UBLOCK_HANGUL_JAMO, /**< Hangul Jamo */ - I18N_UCHAR_UBLOCK_ETHIOPIC, /**< Ethiopic */ - I18N_UCHAR_UBLOCK_CHEROKEE, /**< Cherokee */ - I18N_UCHAR_UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS, /**< Unified Canadian Aboriginal Syllabics */ - I18N_UCHAR_UBLOCK_OGHAM, /**< Ogham */ - I18N_UCHAR_UBLOCK_RUNIC, /**< Runic */ - I18N_UCHAR_UBLOCK_KHMER, /**< Khmer */ - I18N_UCHAR_UBLOCK_MONGOLIAN, /**< Mongolian */ - I18N_UCHAR_UBLOCK_LATIN_EXTENDED_ADDITIONAL, /**< Latin Extended Additional */ - I18N_UCHAR_UBLOCK_GREEK_EXTENDED, /**< Greek Extended */ - I18N_UCHAR_UBLOCK_GENERAL_PUNCTUATION, /**< General Punctuation */ - I18N_UCHAR_UBLOCK_SUPERSCRIPTS_AND_SUBSCRIPTS, /**< Superscripts And Subscripts */ - I18N_UCHAR_UBLOCK_CURRENCY_SYMBOLS, /**< Currency Symbols */ - I18N_UCHAR_UBLOCK_COMBINING_MARKS_FOR_SYMBOLS, /**< Combining Marks For Symbols */ - I18N_UCHAR_UBLOCK_LETTERLIKE_SYMBOLS, /**< Letterlike Symbols */ - I18N_UCHAR_UBLOCK_NUMBER_FORMS, /**< Number Forms */ - I18N_UCHAR_UBLOCK_ARROWS, /**< Arrows */ - I18N_UCHAR_UBLOCK_MATHEMATICAL_OPERATORS, /**< Mathematical Operators */ - I18N_UCHAR_UBLOCK_MISCELLANEOUS_TECHNICAL, /**< Miscellaneous Technical */ - I18N_UCHAR_UBLOCK_CONTROL_PICTURES, /**< Control Pictures */ - I18N_UCHAR_UBLOCK_OPTICAL_CHARACTER_RECOGNITION, /**< Optical Character Recognition */ - I18N_UCHAR_UBLOCK_ENCLOSED_ALPHANUMERICS, /**< Enclosed Alphanumerics */ - I18N_UCHAR_UBLOCK_BOX_DRAWING, /**< Box Drawing */ - I18N_UCHAR_UBLOCK_BLOCK_ELEMENTS, /**< Block Elements */ - I18N_UCHAR_UBLOCK_GEOMETRIC_SHAPES, /**< Geometric Shapes */ - I18N_UCHAR_UBLOCK_MISCELLANEOUS_SYMBOLS, /**< Miscellaneous Symbols */ - I18N_UCHAR_UBLOCK_DINGBATS, /**< Dingbats */ - I18N_UCHAR_UBLOCK_BRAILLE_PATTERNS, /**< Braille Patterns */ - I18N_UCHAR_UBLOCK_CJK_RADICALS_SUPPLEMENT, /**< CJK Radicals Supplement */ - I18N_UCHAR_UBLOCK_KANGXI_RADICALS, /**< Kangxi Radicals */ - I18N_UCHAR_UBLOCK_IDEOGRAPHIC_DESCRIPTION_CHARACTERS, /**< Ideographic Description Characters */ - I18N_UCHAR_UBLOCK_CJK_SYMBOLS_AND_PUNCTUATION, /**< CJK Symbols And Punctuation */ - I18N_UCHAR_UBLOCK_HIRAGANA, /**< Hiragana */ - I18N_UCHAR_UBLOCK_KATAKANA, /**< Katakana */ - I18N_UCHAR_UBLOCK_BOPOMOFO, /**< Bopomofo */ - I18N_UCHAR_UBLOCK_HANGUL_COMPATIBILITY_JAMO, /**< Hangul Compatibility Jamo */ - I18N_UCHAR_UBLOCK_KANBUN, /**< Kanbun */ - I18N_UCHAR_UBLOCK_BOPOMOFO_EXTENDED, /**< Bopomofo Extended */ - I18N_UCHAR_UBLOCK_ENCLOSED_CJK_LETTERS_AND_MONTHS, /**< Enclosed CJK Letters And Months */ - I18N_UCHAR_UBLOCK_CJK_COMPATIBILITY, /**< CJK Compatibility */ - I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A, /**< CJK Unified Ideographs Extension A */ - I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS, /**< CJK Unified Ideographs */ - I18N_UCHAR_UBLOCK_YI_SYLLABLES, /**< Yi Syllables */ - I18N_UCHAR_UBLOCK_YI_RADICALS, /**< Yi Radicals */ - I18N_UCHAR_UBLOCK_HANGUL_SYLLABLES, /**< Hangul Syllables */ - I18N_UCHAR_UBLOCK_HIGH_SURROGATES, /**< High Surrogates */ - I18N_UCHAR_UBLOCK_HIGH_PRIVATE_USE_SURROGATES, /**< High Private Use Surrogates */ - I18N_UCHAR_UBLOCK_LOW_SURROGATES, /**< Low Surrogates */ - I18N_UCHAR_UBLOCK_PRIVATE_USE_AREA, /**< Private Use Area */ - I18N_UCHAR_UBLOCK_PRIVATE_USE, /**< Private Use */ - I18N_UCHAR_UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS, /**< CJK Compatibility Ideographs */ - - I18N_UCHAR_UBLOCK_ALPHABETIC_PRESENTATION_FORMS, /**< Alphabetic Presentation Forms */ - I18N_UCHAR_UBLOCK_ARABIC_PRESENTATION_FORMS_A, /**< Arabic Presentation Forms A */ - I18N_UCHAR_UBLOCK_COMBINING_HALF_MARKS, /**< Combining Half Marks */ - I18N_UCHAR_UBLOCK_CJK_COMPATIBILITY_FORMS, /**< CJK Compatibility Forms */ - I18N_UCHAR_UBLOCK_SMALL_FORM_VARIANTS, /**< Small Form Variants */ - I18N_UCHAR_UBLOCK_ARABIC_PRESENTATION_FORMS_B, /**< Arabic Presentation Forms B */ - I18N_UCHAR_UBLOCK_SPECIALS, /**< Specials */ - I18N_UCHAR_UBLOCK_HALFWIDTH_AND_FULLWIDTH_FORMS, /**< Halfwidth And Fullwidth Forms */ - I18N_UCHAR_UBLOCK_OLD_ITALIC, /**< Old Italic */ - I18N_UCHAR_UBLOCK_GOTHIC, /**< Gothic */ - I18N_UCHAR_UBLOCK_DESERET, /**< Deseret */ - I18N_UCHAR_UBLOCK_BYZANTINE_MUSICAL_SYMBOLS, /**< Byzantine Musical Symbols */ - I18N_UCHAR_UBLOCK_MUSICAL_SYMBOLS, /**< Musical Symbols */ - I18N_UCHAR_UBLOCK_MATHEMATICAL_ALPHANUMERIC_SYMBOLS, /**< Mathematical Alphanumeric Symbols */ - I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B, /**< CJK Unified Ideographs Extension B */ - I18N_UCHAR_UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT, /**< CJK Compatibility Ideographs Supplement */ - I18N_UCHAR_UBLOCK_TAGS, /**< Tags */ - I18N_UCHAR_UBLOCK_CYRILLIC_SUPPLEMENT, /**< Cyrillic Supplement */ - I18N_UCHAR_UBLOCK_CYRILLIC_SUPPLEMENTARY, /**< Cyrillic Supplementary */ - I18N_UCHAR_UBLOCK_TAGALOG, /**< Tagalog */ - I18N_UCHAR_UBLOCK_HANUNOO, /**< Hanunoo */ - I18N_UCHAR_UBLOCK_BUHID, /**< Buhid */ - I18N_UCHAR_UBLOCK_TAGBANWA, /**< Tagbanwa */ - I18N_UCHAR_UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A, /**< Miscellaneous Mathematical Symbols A */ - I18N_UCHAR_UBLOCK_SUPPLEMENTAL_ARROWS_A, /**< Supplemental Arrows A */ - I18N_UCHAR_UBLOCK_SUPPLEMENTAL_ARROWS_B, /**< Supplemental Arrows B */ - I18N_UCHAR_UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B, /**< Miscellaneous Mathematical Symbols B */ - I18N_UCHAR_UBLOCK_SUPPLEMENTAL_MATHEMATICAL_OPERATORS, /**< Supplemental Mathematical Operators */ - I18N_UCHAR_UBLOCK_KATAKANA_PHONETIC_EXTENSIONS, /**< Katakana Phonetic Extensions */ - I18N_UCHAR_UBLOCK_VARIATION_SELECTORS, /**< Variation Selectors */ - I18N_UCHAR_UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_A, /**< Supplementary Private Use Area A */ - I18N_UCHAR_UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_B, /**< Supplementary Private Use Area B */ - I18N_UCHAR_UBLOCK_LIMBU, /**< Limbu */ - I18N_UCHAR_UBLOCK_TAI_LE, /**< Tai Le */ - I18N_UCHAR_UBLOCK_KHMER_SYMBOLS, /**< Khmer Symbols */ - I18N_UCHAR_UBLOCK_PHONETIC_EXTENSIONS, /**< Phonetic Extensions */ - I18N_UCHAR_UBLOCK_MISCELLANEOUS_SYMBOLS_AND_ARROWS, /**< Miscellaneous Symbols And Arrows */ - I18N_UCHAR_UBLOCK_YIJING_HEXAGRAM_SYMBOLS, /**< Yijing Hexagram Symbols */ - I18N_UCHAR_UBLOCK_LINEAR_B_SYLLABARY, /**< Linear B Syllabary */ - I18N_UCHAR_UBLOCK_LINEAR_B_IDEOGRAMS, /**< Linear B Ideograms */ - I18N_UCHAR_UBLOCK_AEGEAN_NUMBERS, /**< Aegean Numbers */ - I18N_UCHAR_UBLOCK_UGARITIC, /**< Ugaritic */ - I18N_UCHAR_UBLOCK_SHAVIAN, /**< Shavian */ - I18N_UCHAR_UBLOCK_OSMANYA, /**< Osmanya */ - I18N_UCHAR_UBLOCK_CYPRIOT_SYLLABARY, /**< Cypriot Syllabary */ - I18N_UCHAR_UBLOCK_TAI_XUAN_JING_SYMBOLS, /**< Tai Xuan Jing Symbols */ - I18N_UCHAR_UBLOCK_VARIATION_SELECTORS_SUPPLEMENT, /**< Variation Selectors Supplement */ - I18N_UCHAR_UBLOCK_ANCIENT_GREEK_MUSICAL_NOTATION, /**< Ancient Greek Musical Notation */ - I18N_UCHAR_UBLOCK_ANCIENT_GREEK_NUMBERS, /**< Ancient Greek Numbers */ - I18N_UCHAR_UBLOCK_ARABIC_SUPPLEMENT, /**< Arabic Supplement */ - I18N_UCHAR_UBLOCK_BUGINESE, /**< Buginese */ - I18N_UCHAR_UBLOCK_CJK_STROKES, /**< CJK Strokes */ - I18N_UCHAR_UBLOCK_COMBINING_DIACRITICAL_MARKS_SUPPLEMENT, /**< Combining Diacritical Marks Supplement */ - I18N_UCHAR_UBLOCK_COPTIC, /**< Coptic */ - I18N_UCHAR_UBLOCK_ETHIOPIC_EXTENDED, /**< Ethiopic Extended */ - I18N_UCHAR_UBLOCK_ETHIOPIC_SUPPLEMENT, /**< Ethiopic Supplement */ - I18N_UCHAR_UBLOCK_GEORGIAN_SUPPLEMENT, /**< Georgian Supplement */ - I18N_UCHAR_UBLOCK_GLAGOLITIC, /**< Glagolitic */ - I18N_UCHAR_UBLOCK_KHAROSHTHI, /**< Kharoshthi */ - I18N_UCHAR_UBLOCK_MODIFIER_TONE_LETTERS, /**< Modifier Tone Letters */ - I18N_UCHAR_UBLOCK_NEW_TAI_LUE, /**< New Tai Lue */ - I18N_UCHAR_UBLOCK_OLD_PERSIAN, /**< Old Persian */ - I18N_UCHAR_UBLOCK_PHONETIC_EXTENSIONS_SUPPLEMENT, /**< Phonetic Extensions Supplement */ - I18N_UCHAR_UBLOCK_SUPPLEMENTAL_PUNCTUATION, /**< Supplemental Punctuation */ - I18N_UCHAR_UBLOCK_SYLOTI_NAGRI, /**< Syloti Nagri */ - I18N_UCHAR_UBLOCK_TIFINAGH, /**< Tifinagh */ - I18N_UCHAR_UBLOCK_VERTICAL_FORMS, /**< Vertical Forms */ - I18N_UCHAR_UBLOCK_NKO, /**< Nko */ - I18N_UCHAR_UBLOCK_BALINESE, /**< Balinese */ - I18N_UCHAR_UBLOCK_LATIN_EXTENDED_C, /**< Latin Extended C */ - I18N_UCHAR_UBLOCK_LATIN_EXTENDED_D, /**< Latin Extended D */ - I18N_UCHAR_UBLOCK_PHAGS_PA, /**< Phags Pa */ - I18N_UCHAR_UBLOCK_PHOENICIAN, /**< Phoenician */ - I18N_UCHAR_UBLOCK_CUNEIFORM, /**< Cuneiform */ - I18N_UCHAR_UBLOCK_CUNEIFORM_NUMBERS_AND_PUNCTUATION, /**< Cuneiform Numbers And Punctuation */ - I18N_UCHAR_UBLOCK_COUNTING_ROD_NUMERALS, /**< Counting Rod Numerals */ - I18N_UCHAR_UBLOCK_SUNDANESE, /**< Sundanese */ - I18N_UCHAR_UBLOCK_LEPCHA, /**< Lepcha */ - I18N_UCHAR_UBLOCK_OL_CHIKI, /**< Ol Chiki */ - I18N_UCHAR_UBLOCK_CYRILLIC_EXTENDED_A, /**< Cyrillic Extended A */ - I18N_UCHAR_UBLOCK_VAI, /**< Vai */ - I18N_UCHAR_UBLOCK_CYRILLIC_EXTENDED_B, /**< Cyrillic Extended B */ - I18N_UCHAR_UBLOCK_SAURASHTRA, /**< Saurashtra */ - I18N_UCHAR_UBLOCK_KAYAH_LI, /**< Kayah Li */ - I18N_UCHAR_UBLOCK_REJANG, /**< Rejang */ - I18N_UCHAR_UBLOCK_CHAM, /**< Cham */ - I18N_UCHAR_UBLOCK_ANCIENT_SYMBOLS, /**< Ancient Symbols */ - I18N_UCHAR_UBLOCK_PHAISTOS_DISC, /**< Phaistos Disc */ - I18N_UCHAR_UBLOCK_LYCIAN, /**< Lycian */ - I18N_UCHAR_UBLOCK_CARIAN, /**< Carian */ - I18N_UCHAR_UBLOCK_LYDIAN, /**< Lydian */ - I18N_UCHAR_UBLOCK_MAHJONG_TILES, /**< Mahjong Tiles */ - I18N_UCHAR_UBLOCK_DOMINO_TILES, /**< Domino Tiles */ - I18N_UCHAR_UBLOCK_SAMARITAN, /**< Samaritan */ - I18N_UCHAR_UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED, /**< Unified Canadian Aboriginal Syllabics Extended */ - I18N_UCHAR_UBLOCK_TAI_THAM, /**< Tai Tham */ - I18N_UCHAR_UBLOCK_VEDIC_EXTENSIONS, /**< Vedic Extensions */ - I18N_UCHAR_UBLOCK_LISU, /**< Lisu */ - I18N_UCHAR_UBLOCK_BAMUM, /**< Bamum */ - I18N_UCHAR_UBLOCK_COMMON_INDIC_NUMBER_FORMS, /**< Common Indic Number Forms */ - I18N_UCHAR_UBLOCK_DEVANAGARI_EXTENDED, /**< Devanagari Extended */ - I18N_UCHAR_UBLOCK_HANGUL_JAMO_EXTENDED_A, /**< Hangul Jamo Extended A */ - I18N_UCHAR_UBLOCK_JAVANESE, /**< Javanese */ - I18N_UCHAR_UBLOCK_MYANMAR_EXTENDED_A, /**< Myanmar Extended A */ - I18N_UCHAR_UBLOCK_TAI_VIET, /**< Tai Viet */ - I18N_UCHAR_UBLOCK_MEETEI_MAYEK, /**< Meetei Mayek */ - I18N_UCHAR_UBLOCK_HANGUL_JAMO_EXTENDED_B, /**< Hangul Jamo Extended B */ - I18N_UCHAR_UBLOCK_IMPERIAL_ARAMAIC, /**< Imperial Aramaic */ - I18N_UCHAR_UBLOCK_OLD_SOUTH_ARABIAN, /**< Old South Arabian */ - I18N_UCHAR_UBLOCK_AVESTAN, /**< Avestan */ - I18N_UCHAR_UBLOCK_INSCRIPTIONAL_PARTHIAN, /**< Inscriptional Parthian */ - I18N_UCHAR_UBLOCK_INSCRIPTIONAL_PAHLAVI, /**< Inscriptional Pahlavi */ - I18N_UCHAR_UBLOCK_OLD_TURKIC, /**< Old Turkic */ - I18N_UCHAR_UBLOCK_RUMI_NUMERAL_SYMBOLS, /**< Rumi Numeral Symbols */ - I18N_UCHAR_UBLOCK_KAITHI, /**< Kaithi */ - I18N_UCHAR_UBLOCK_EGYPTIAN_HIEROGLYPHS, /**< Egyptian Hieroglyphs */ - I18N_UCHAR_UBLOCK_ENCLOSED_ALPHANUMERIC_SUPPLEMENT, /**< Enclosed Alphanumeric Supplement */ - I18N_UCHAR_UBLOCK_ENCLOSED_IDEOGRAPHIC_SUPPLEMENT, /**< Enclosed Ideographic Supplement */ - I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C, /**< CJK Unified Ideographs Extension C */ - I18N_UCHAR_UBLOCK_MANDAIC, /**< Mandaic */ - I18N_UCHAR_UBLOCK_BATAK, /**< Batak */ - I18N_UCHAR_UBLOCK_ETHIOPIC_EXTENDED_A, /**< Ethiopic Extended A */ - I18N_UCHAR_UBLOCK_BRAHMI, /**< Brahmi */ - I18N_UCHAR_UBLOCK_BAMUM_SUPPLEMENT, /**< Bamum Supplement */ - I18N_UCHAR_UBLOCK_KANA_SUPPLEMENT, /**< Kana Supplement */ - I18N_UCHAR_UBLOCK_PLAYING_CARDS, /**< Playing Cards */ - I18N_UCHAR_UBLOCK_MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS, /**< Miscellaneous Symbols And Pictographs */ - I18N_UCHAR_UBLOCK_EMOTICONS, /**< Emoticons */ - I18N_UCHAR_UBLOCK_TRANSPORT_AND_MAP_SYMBOLS, /**< Transport And Map Symbols */ - I18N_UCHAR_UBLOCK_ALCHEMICAL_SYMBOLS, /**< Alchemical Symbols */ - I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D, /**< CJK Unified Ideographs Extension D */ - I18N_UCHAR_UBLOCK_BASSA_VAH = 221, /**< Bassa Vah (Since 3.0) */ - I18N_UCHAR_UBLOCK_CAUCASIAN_ALBANIAN = 222, /**< Caucasian Albanian (Since 3.0) */ - I18N_UCHAR_UBLOCK_COPTIC_EPACT_NUMBERS = 223, /**< Coptic Epact Numbers (Since 3.0) */ - I18N_UCHAR_UBLOCK_COMBINING_DIACRITICAL_MARKS_EXTENDED = 224, /**< Combining Diacritical Marks Extended (Since 3.0) */ - I18N_UCHAR_UBLOCK_DUPLOYAN = 225, /**< Duployan (Since 3.0) */ - I18N_UCHAR_UBLOCK_ELBASAN = 226, /**< Elbasan (Since 3.0) */ - I18N_UCHAR_UBLOCK_GEOMETRIC_SHAPES_EXTENDED = 227, /**< Geometric Shapes Extended (Since 3.0) */ - I18N_UCHAR_UBLOCK_GRANTHA = 228, /**< Grantha (Since 3.0) */ - I18N_UCHAR_UBLOCK_KHOJKI = 229, /**< Khojki (Since 3.0) */ - I18N_UCHAR_UBLOCK_KHUDAWADI = 230, /**< Khudawadi (Since 3.0) */ - I18N_UCHAR_UBLOCK_LATIN_EXTENDED_E = 231, /**< Latin Extended E (Since 3.0) */ - I18N_UCHAR_UBLOCK_LINEAR_A = 232, /**< Linear A (Since 3.0) */ - I18N_UCHAR_UBLOCK_MAHAJANI = 233, /**< Mahajani (Since 3.0) */ - I18N_UCHAR_UBLOCK_MANICHAEAN = 234, /**< Manichaean (Since 3.0) */ - I18N_UCHAR_UBLOCK_MENDE_KIKAKUI = 235, /**< Mende Kikakui (Since 3.0) */ - I18N_UCHAR_UBLOCK_MODI = 236, /**< Modi (Since 3.0) */ - I18N_UCHAR_UBLOCK_MRO = 237, /**< Mro (Since 3.0) */ - I18N_UCHAR_UBLOCK_MYANMAR_EXTENDED_B = 238, /**< Myanmar Extended B (Since 3.0) */ - I18N_UCHAR_UBLOCK_NABATAEAN = 239, /**< Nabataean (Since 3.0) */ - I18N_UCHAR_UBLOCK_OLD_NORTH_ARABIAN = 240, /**< Old North Arabian (Since 3.0) */ - I18N_UCHAR_UBLOCK_OLD_PERMIC = 241, /**< Old Permic (Since 3.0) */ - I18N_UCHAR_UBLOCK_ORNAMENTAL_DINGBATS = 242, /**< Ornamental Dingbats (Since 3.0) */ - I18N_UCHAR_UBLOCK_PAHAWH_HMONG = 243, /**< Pahawh Hmong (Since 3.0) */ - I18N_UCHAR_UBLOCK_PALMYRENE = 244, /**< Palmyrene (Since 3.0) */ - I18N_UCHAR_UBLOCK_PAU_CIN_HAU = 245, /**< Pau Cin Hau (Since 3.0) */ - I18N_UCHAR_UBLOCK_PSALTER_PAHLAVI = 246, /**< Psalter Pahlavi (Since 3.0) */ - I18N_UCHAR_UBLOCK_SHORTHAND_FORMAT_CONTROLS = 247, /**< Shorthand Format Controls (Since 3.0) */ - I18N_UCHAR_UBLOCK_SIDDHAM = 248, /**< Siddham (Since 3.0) */ - I18N_UCHAR_UBLOCK_SINHALA_ARCHAIC_NUMBERS = 249, /**< Sinhala Archaic Numbers (Since 3.0) */ - I18N_UCHAR_UBLOCK_SUPPLEMENTAL_ARROWS_C = 250, /**< Supplemental Arrows C (Since 3.0) */ - I18N_UCHAR_UBLOCK_TIRHUTA = 251, /**< Tirhuta (Since 3.0) */ - I18N_UCHAR_UBLOCK_WARANG_CITI = 252, /**< Warang Citi (Since 3.0) */ - I18N_UCHAR_UBLOCK_COUNT, /**< Count */ - I18N_UCHAR_UBLOCK_INVALID_CODE = -1 /**< Invalid Code */ + I18N_UCHAR_UBLOCK_NO_BLOCK, /**< No Block */ + I18N_UCHAR_UBLOCK_BASIC_LATIN, /**< Basic Latin */ + I18N_UCHAR_UBLOCK_LATIN_1_SUPPLEMENT, /**< Latin_1 Supplement */ + I18N_UCHAR_UBLOCK_LATIN_EXTENDED_A, /**< Latin Extended A */ + I18N_UCHAR_UBLOCK_LATIN_EXTENDED_B, /**< Latin Extended B */ + I18N_UCHAR_UBLOCK_IPA_EXTENSIONS, /**< IPA Extensions */ + I18N_UCHAR_UBLOCK_SPACING_MODIFIER_LETTERS, /**< Spacing Modifier Letters */ + I18N_UCHAR_UBLOCK_COMBINING_DIACRITICAL_MARKS, /**< Combining Diacritical Marks */ + I18N_UCHAR_UBLOCK_GREEK, /**< Greek */ + I18N_UCHAR_UBLOCK_CYRILLIC, /**< Cyrillic */ + I18N_UCHAR_UBLOCK_ARMENIAN, /**< Armenian */ + I18N_UCHAR_UBLOCK_HEBREW, /**< Hebrew */ + I18N_UCHAR_UBLOCK_ARABIC, /**< Arabic */ + I18N_UCHAR_UBLOCK_SYRIAC, /**< Syriac */ + I18N_UCHAR_UBLOCK_THAANA, /**< Thaana */ + I18N_UCHAR_UBLOCK_DEVANAGARI, /**< Devanagari */ + I18N_UCHAR_UBLOCK_BENGALI, /**< Bengali */ + I18N_UCHAR_UBLOCK_GURMUKHI, /**< Gurmukhi */ + I18N_UCHAR_UBLOCK_GUJARATI, /**< Gujarati */ + I18N_UCHAR_UBLOCK_ORIYA, /**< Oriya */ + I18N_UCHAR_UBLOCK_TAMIL, /**< Tamil */ + I18N_UCHAR_UBLOCK_TELUGU, /**< Telugu */ + I18N_UCHAR_UBLOCK_KANNADA, /**< Kannada */ + I18N_UCHAR_UBLOCK_MALAYALAM, /**< Malayalam */ + I18N_UCHAR_UBLOCK_SINHALA, /**< Sinhala */ + I18N_UCHAR_UBLOCK_THAI, /**< Thai */ + I18N_UCHAR_UBLOCK_LAO, /**< Lao */ + I18N_UCHAR_UBLOCK_TIBETAN, /**< Tibetan */ + I18N_UCHAR_UBLOCK_MYANMAR, /**< Myanmar */ + I18N_UCHAR_UBLOCK_GEORGIAN, /**< Georgian */ + I18N_UCHAR_UBLOCK_HANGUL_JAMO, /**< Hangul Jamo */ + I18N_UCHAR_UBLOCK_ETHIOPIC, /**< Ethiopic */ + I18N_UCHAR_UBLOCK_CHEROKEE, /**< Cherokee */ + I18N_UCHAR_UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS, /**< Unified Canadian Aboriginal Syllabics */ + I18N_UCHAR_UBLOCK_OGHAM, /**< Ogham */ + I18N_UCHAR_UBLOCK_RUNIC, /**< Runic */ + I18N_UCHAR_UBLOCK_KHMER, /**< Khmer */ + I18N_UCHAR_UBLOCK_MONGOLIAN, /**< Mongolian */ + I18N_UCHAR_UBLOCK_LATIN_EXTENDED_ADDITIONAL, /**< Latin Extended Additional */ + I18N_UCHAR_UBLOCK_GREEK_EXTENDED, /**< Greek Extended */ + I18N_UCHAR_UBLOCK_GENERAL_PUNCTUATION, /**< General Punctuation */ + I18N_UCHAR_UBLOCK_SUPERSCRIPTS_AND_SUBSCRIPTS, /**< Superscripts And Subscripts */ + I18N_UCHAR_UBLOCK_CURRENCY_SYMBOLS, /**< Currency Symbols */ + I18N_UCHAR_UBLOCK_COMBINING_MARKS_FOR_SYMBOLS, /**< Combining Marks For Symbols */ + I18N_UCHAR_UBLOCK_LETTERLIKE_SYMBOLS, /**< Letterlike Symbols */ + I18N_UCHAR_UBLOCK_NUMBER_FORMS, /**< Number Forms */ + I18N_UCHAR_UBLOCK_ARROWS, /**< Arrows */ + I18N_UCHAR_UBLOCK_MATHEMATICAL_OPERATORS, /**< Mathematical Operators */ + I18N_UCHAR_UBLOCK_MISCELLANEOUS_TECHNICAL, /**< Miscellaneous Technical */ + I18N_UCHAR_UBLOCK_CONTROL_PICTURES, /**< Control Pictures */ + I18N_UCHAR_UBLOCK_OPTICAL_CHARACTER_RECOGNITION, /**< Optical Character Recognition */ + I18N_UCHAR_UBLOCK_ENCLOSED_ALPHANUMERICS, /**< Enclosed Alphanumerics */ + I18N_UCHAR_UBLOCK_BOX_DRAWING, /**< Box Drawing */ + I18N_UCHAR_UBLOCK_BLOCK_ELEMENTS, /**< Block Elements */ + I18N_UCHAR_UBLOCK_GEOMETRIC_SHAPES, /**< Geometric Shapes */ + I18N_UCHAR_UBLOCK_MISCELLANEOUS_SYMBOLS, /**< Miscellaneous Symbols */ + I18N_UCHAR_UBLOCK_DINGBATS, /**< Dingbats */ + I18N_UCHAR_UBLOCK_BRAILLE_PATTERNS, /**< Braille Patterns */ + I18N_UCHAR_UBLOCK_CJK_RADICALS_SUPPLEMENT, /**< CJK Radicals Supplement */ + I18N_UCHAR_UBLOCK_KANGXI_RADICALS, /**< Kangxi Radicals */ + I18N_UCHAR_UBLOCK_IDEOGRAPHIC_DESCRIPTION_CHARACTERS, /**< Ideographic Description Characters */ + I18N_UCHAR_UBLOCK_CJK_SYMBOLS_AND_PUNCTUATION, /**< CJK Symbols And Punctuation */ + I18N_UCHAR_UBLOCK_HIRAGANA, /**< Hiragana */ + I18N_UCHAR_UBLOCK_KATAKANA, /**< Katakana */ + I18N_UCHAR_UBLOCK_BOPOMOFO, /**< Bopomofo */ + I18N_UCHAR_UBLOCK_HANGUL_COMPATIBILITY_JAMO, /**< Hangul Compatibility Jamo */ + I18N_UCHAR_UBLOCK_KANBUN, /**< Kanbun */ + I18N_UCHAR_UBLOCK_BOPOMOFO_EXTENDED, /**< Bopomofo Extended */ + I18N_UCHAR_UBLOCK_ENCLOSED_CJK_LETTERS_AND_MONTHS, /**< Enclosed CJK Letters And Months */ + I18N_UCHAR_UBLOCK_CJK_COMPATIBILITY, /**< CJK Compatibility */ + I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A, /**< CJK Unified Ideographs Extension A */ + I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS, /**< CJK Unified Ideographs */ + I18N_UCHAR_UBLOCK_YI_SYLLABLES, /**< Yi Syllables */ + I18N_UCHAR_UBLOCK_YI_RADICALS, /**< Yi Radicals */ + I18N_UCHAR_UBLOCK_HANGUL_SYLLABLES, /**< Hangul Syllables */ + I18N_UCHAR_UBLOCK_HIGH_SURROGATES, /**< High Surrogates */ + I18N_UCHAR_UBLOCK_HIGH_PRIVATE_USE_SURROGATES, /**< High Private Use Surrogates */ + I18N_UCHAR_UBLOCK_LOW_SURROGATES, /**< Low Surrogates */ + I18N_UCHAR_UBLOCK_PRIVATE_USE_AREA, /**< Private Use Area */ + I18N_UCHAR_UBLOCK_PRIVATE_USE, /**< Private Use */ + I18N_UCHAR_UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS, /**< CJK Compatibility Ideographs */ + + I18N_UCHAR_UBLOCK_ALPHABETIC_PRESENTATION_FORMS, /**< Alphabetic Presentation Forms */ + I18N_UCHAR_UBLOCK_ARABIC_PRESENTATION_FORMS_A, /**< Arabic Presentation Forms A */ + I18N_UCHAR_UBLOCK_COMBINING_HALF_MARKS, /**< Combining Half Marks */ + I18N_UCHAR_UBLOCK_CJK_COMPATIBILITY_FORMS, /**< CJK Compatibility Forms */ + I18N_UCHAR_UBLOCK_SMALL_FORM_VARIANTS, /**< Small Form Variants */ + I18N_UCHAR_UBLOCK_ARABIC_PRESENTATION_FORMS_B, /**< Arabic Presentation Forms B */ + I18N_UCHAR_UBLOCK_SPECIALS, /**< Specials */ + I18N_UCHAR_UBLOCK_HALFWIDTH_AND_FULLWIDTH_FORMS, /**< Halfwidth And Fullwidth Forms */ + I18N_UCHAR_UBLOCK_OLD_ITALIC, /**< Old Italic */ + I18N_UCHAR_UBLOCK_GOTHIC, /**< Gothic */ + I18N_UCHAR_UBLOCK_DESERET, /**< Deseret */ + I18N_UCHAR_UBLOCK_BYZANTINE_MUSICAL_SYMBOLS, /**< Byzantine Musical Symbols */ + I18N_UCHAR_UBLOCK_MUSICAL_SYMBOLS, /**< Musical Symbols */ + I18N_UCHAR_UBLOCK_MATHEMATICAL_ALPHANUMERIC_SYMBOLS, /**< Mathematical Alphanumeric Symbols */ + I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B, /**< CJK Unified Ideographs Extension B */ + I18N_UCHAR_UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT, /**< CJK Compatibility Ideographs Supplement */ + I18N_UCHAR_UBLOCK_TAGS, /**< Tags */ + I18N_UCHAR_UBLOCK_CYRILLIC_SUPPLEMENT, /**< Cyrillic Supplement */ + I18N_UCHAR_UBLOCK_CYRILLIC_SUPPLEMENTARY, /**< Cyrillic Supplementary */ + I18N_UCHAR_UBLOCK_TAGALOG, /**< Tagalog */ + I18N_UCHAR_UBLOCK_HANUNOO, /**< Hanunoo */ + I18N_UCHAR_UBLOCK_BUHID, /**< Buhid */ + I18N_UCHAR_UBLOCK_TAGBANWA, /**< Tagbanwa */ + I18N_UCHAR_UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A, /**< Miscellaneous Mathematical Symbols A */ + I18N_UCHAR_UBLOCK_SUPPLEMENTAL_ARROWS_A, /**< Supplemental Arrows A */ + I18N_UCHAR_UBLOCK_SUPPLEMENTAL_ARROWS_B, /**< Supplemental Arrows B */ + I18N_UCHAR_UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B, /**< Miscellaneous Mathematical Symbols B */ + I18N_UCHAR_UBLOCK_SUPPLEMENTAL_MATHEMATICAL_OPERATORS, /**< Supplemental Mathematical Operators */ + I18N_UCHAR_UBLOCK_KATAKANA_PHONETIC_EXTENSIONS, /**< Katakana Phonetic Extensions */ + I18N_UCHAR_UBLOCK_VARIATION_SELECTORS, /**< Variation Selectors */ + I18N_UCHAR_UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_A, /**< Supplementary Private Use Area A */ + I18N_UCHAR_UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_B, /**< Supplementary Private Use Area B */ + I18N_UCHAR_UBLOCK_LIMBU, /**< Limbu */ + I18N_UCHAR_UBLOCK_TAI_LE, /**< Tai Le */ + I18N_UCHAR_UBLOCK_KHMER_SYMBOLS, /**< Khmer Symbols */ + I18N_UCHAR_UBLOCK_PHONETIC_EXTENSIONS, /**< Phonetic Extensions */ + I18N_UCHAR_UBLOCK_MISCELLANEOUS_SYMBOLS_AND_ARROWS, /**< Miscellaneous Symbols And Arrows */ + I18N_UCHAR_UBLOCK_YIJING_HEXAGRAM_SYMBOLS, /**< Yijing Hexagram Symbols */ + I18N_UCHAR_UBLOCK_LINEAR_B_SYLLABARY, /**< Linear B Syllabary */ + I18N_UCHAR_UBLOCK_LINEAR_B_IDEOGRAMS, /**< Linear B Ideograms */ + I18N_UCHAR_UBLOCK_AEGEAN_NUMBERS, /**< Aegean Numbers */ + I18N_UCHAR_UBLOCK_UGARITIC, /**< Ugaritic */ + I18N_UCHAR_UBLOCK_SHAVIAN, /**< Shavian */ + I18N_UCHAR_UBLOCK_OSMANYA, /**< Osmanya */ + I18N_UCHAR_UBLOCK_CYPRIOT_SYLLABARY, /**< Cypriot Syllabary */ + I18N_UCHAR_UBLOCK_TAI_XUAN_JING_SYMBOLS, /**< Tai Xuan Jing Symbols */ + I18N_UCHAR_UBLOCK_VARIATION_SELECTORS_SUPPLEMENT, /**< Variation Selectors Supplement */ + I18N_UCHAR_UBLOCK_ANCIENT_GREEK_MUSICAL_NOTATION, /**< Ancient Greek Musical Notation */ + I18N_UCHAR_UBLOCK_ANCIENT_GREEK_NUMBERS, /**< Ancient Greek Numbers */ + I18N_UCHAR_UBLOCK_ARABIC_SUPPLEMENT, /**< Arabic Supplement */ + I18N_UCHAR_UBLOCK_BUGINESE, /**< Buginese */ + I18N_UCHAR_UBLOCK_CJK_STROKES, /**< CJK Strokes */ + I18N_UCHAR_UBLOCK_COMBINING_DIACRITICAL_MARKS_SUPPLEMENT, /**< Combining Diacritical Marks Supplement */ + I18N_UCHAR_UBLOCK_COPTIC, /**< Coptic */ + I18N_UCHAR_UBLOCK_ETHIOPIC_EXTENDED, /**< Ethiopic Extended */ + I18N_UCHAR_UBLOCK_ETHIOPIC_SUPPLEMENT, /**< Ethiopic Supplement */ + I18N_UCHAR_UBLOCK_GEORGIAN_SUPPLEMENT, /**< Georgian Supplement */ + I18N_UCHAR_UBLOCK_GLAGOLITIC, /**< Glagolitic */ + I18N_UCHAR_UBLOCK_KHAROSHTHI, /**< Kharoshthi */ + I18N_UCHAR_UBLOCK_MODIFIER_TONE_LETTERS, /**< Modifier Tone Letters */ + I18N_UCHAR_UBLOCK_NEW_TAI_LUE, /**< New Tai Lue */ + I18N_UCHAR_UBLOCK_OLD_PERSIAN, /**< Old Persian */ + I18N_UCHAR_UBLOCK_PHONETIC_EXTENSIONS_SUPPLEMENT, /**< Phonetic Extensions Supplement */ + I18N_UCHAR_UBLOCK_SUPPLEMENTAL_PUNCTUATION, /**< Supplemental Punctuation */ + I18N_UCHAR_UBLOCK_SYLOTI_NAGRI, /**< Syloti Nagri */ + I18N_UCHAR_UBLOCK_TIFINAGH, /**< Tifinagh */ + I18N_UCHAR_UBLOCK_VERTICAL_FORMS, /**< Vertical Forms */ + I18N_UCHAR_UBLOCK_NKO, /**< Nko */ + I18N_UCHAR_UBLOCK_BALINESE, /**< Balinese */ + I18N_UCHAR_UBLOCK_LATIN_EXTENDED_C, /**< Latin Extended C */ + I18N_UCHAR_UBLOCK_LATIN_EXTENDED_D, /**< Latin Extended D */ + I18N_UCHAR_UBLOCK_PHAGS_PA, /**< Phags Pa */ + I18N_UCHAR_UBLOCK_PHOENICIAN, /**< Phoenician */ + I18N_UCHAR_UBLOCK_CUNEIFORM, /**< Cuneiform */ + I18N_UCHAR_UBLOCK_CUNEIFORM_NUMBERS_AND_PUNCTUATION, /**< Cuneiform Numbers And Punctuation */ + I18N_UCHAR_UBLOCK_COUNTING_ROD_NUMERALS, /**< Counting Rod Numerals */ + I18N_UCHAR_UBLOCK_SUNDANESE, /**< Sundanese */ + I18N_UCHAR_UBLOCK_LEPCHA, /**< Lepcha */ + I18N_UCHAR_UBLOCK_OL_CHIKI, /**< Ol Chiki */ + I18N_UCHAR_UBLOCK_CYRILLIC_EXTENDED_A, /**< Cyrillic Extended A */ + I18N_UCHAR_UBLOCK_VAI, /**< Vai */ + I18N_UCHAR_UBLOCK_CYRILLIC_EXTENDED_B, /**< Cyrillic Extended B */ + I18N_UCHAR_UBLOCK_SAURASHTRA, /**< Saurashtra */ + I18N_UCHAR_UBLOCK_KAYAH_LI, /**< Kayah Li */ + I18N_UCHAR_UBLOCK_REJANG, /**< Rejang */ + I18N_UCHAR_UBLOCK_CHAM, /**< Cham */ + I18N_UCHAR_UBLOCK_ANCIENT_SYMBOLS, /**< Ancient Symbols */ + I18N_UCHAR_UBLOCK_PHAISTOS_DISC, /**< Phaistos Disc */ + I18N_UCHAR_UBLOCK_LYCIAN, /**< Lycian */ + I18N_UCHAR_UBLOCK_CARIAN, /**< Carian */ + I18N_UCHAR_UBLOCK_LYDIAN, /**< Lydian */ + I18N_UCHAR_UBLOCK_MAHJONG_TILES, /**< Mahjong Tiles */ + I18N_UCHAR_UBLOCK_DOMINO_TILES, /**< Domino Tiles */ + I18N_UCHAR_UBLOCK_SAMARITAN, /**< Samaritan */ + I18N_UCHAR_UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED, /**< Unified Canadian Aboriginal Syllabics Extended */ + I18N_UCHAR_UBLOCK_TAI_THAM, /**< Tai Tham */ + I18N_UCHAR_UBLOCK_VEDIC_EXTENSIONS, /**< Vedic Extensions */ + I18N_UCHAR_UBLOCK_LISU, /**< Lisu */ + I18N_UCHAR_UBLOCK_BAMUM, /**< Bamum */ + I18N_UCHAR_UBLOCK_COMMON_INDIC_NUMBER_FORMS, /**< Common Indic Number Forms */ + I18N_UCHAR_UBLOCK_DEVANAGARI_EXTENDED, /**< Devanagari Extended */ + I18N_UCHAR_UBLOCK_HANGUL_JAMO_EXTENDED_A, /**< Hangul Jamo Extended A */ + I18N_UCHAR_UBLOCK_JAVANESE, /**< Javanese */ + I18N_UCHAR_UBLOCK_MYANMAR_EXTENDED_A, /**< Myanmar Extended A */ + I18N_UCHAR_UBLOCK_TAI_VIET, /**< Tai Viet */ + I18N_UCHAR_UBLOCK_MEETEI_MAYEK, /**< Meetei Mayek */ + I18N_UCHAR_UBLOCK_HANGUL_JAMO_EXTENDED_B, /**< Hangul Jamo Extended B */ + I18N_UCHAR_UBLOCK_IMPERIAL_ARAMAIC, /**< Imperial Aramaic */ + I18N_UCHAR_UBLOCK_OLD_SOUTH_ARABIAN, /**< Old South Arabian */ + I18N_UCHAR_UBLOCK_AVESTAN, /**< Avestan */ + I18N_UCHAR_UBLOCK_INSCRIPTIONAL_PARTHIAN, /**< Inscriptional Parthian */ + I18N_UCHAR_UBLOCK_INSCRIPTIONAL_PAHLAVI, /**< Inscriptional Pahlavi */ + I18N_UCHAR_UBLOCK_OLD_TURKIC, /**< Old Turkic */ + I18N_UCHAR_UBLOCK_RUMI_NUMERAL_SYMBOLS, /**< Rumi Numeral Symbols */ + I18N_UCHAR_UBLOCK_KAITHI, /**< Kaithi */ + I18N_UCHAR_UBLOCK_EGYPTIAN_HIEROGLYPHS, /**< Egyptian Hieroglyphs */ + I18N_UCHAR_UBLOCK_ENCLOSED_ALPHANUMERIC_SUPPLEMENT, /**< Enclosed Alphanumeric Supplement */ + I18N_UCHAR_UBLOCK_ENCLOSED_IDEOGRAPHIC_SUPPLEMENT, /**< Enclosed Ideographic Supplement */ + I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C, /**< CJK Unified Ideographs Extension C */ + I18N_UCHAR_UBLOCK_MANDAIC, /**< Mandaic */ + I18N_UCHAR_UBLOCK_BATAK, /**< Batak */ + I18N_UCHAR_UBLOCK_ETHIOPIC_EXTENDED_A, /**< Ethiopic Extended A */ + I18N_UCHAR_UBLOCK_BRAHMI, /**< Brahmi */ + I18N_UCHAR_UBLOCK_BAMUM_SUPPLEMENT, /**< Bamum Supplement */ + I18N_UCHAR_UBLOCK_KANA_SUPPLEMENT, /**< Kana Supplement */ + I18N_UCHAR_UBLOCK_PLAYING_CARDS, /**< Playing Cards */ + I18N_UCHAR_UBLOCK_MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS, /**< Miscellaneous Symbols And Pictographs */ + I18N_UCHAR_UBLOCK_EMOTICONS, /**< Emoticons */ + I18N_UCHAR_UBLOCK_TRANSPORT_AND_MAP_SYMBOLS, /**< Transport And Map Symbols */ + I18N_UCHAR_UBLOCK_ALCHEMICAL_SYMBOLS, /**< Alchemical Symbols */ + I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D, /**< CJK Unified Ideographs Extension D */ + I18N_UCHAR_UBLOCK_BASSA_VAH = 221, /**< Bassa Vah (Since 3.0) */ + I18N_UCHAR_UBLOCK_CAUCASIAN_ALBANIAN = 222, /**< Caucasian Albanian (Since 3.0) */ + I18N_UCHAR_UBLOCK_COPTIC_EPACT_NUMBERS = 223, /**< Coptic Epact Numbers (Since 3.0) */ + I18N_UCHAR_UBLOCK_COMBINING_DIACRITICAL_MARKS_EXTENDED = 224, /**< Combining Diacritical Marks Extended (Since 3.0) */ + I18N_UCHAR_UBLOCK_DUPLOYAN = 225, /**< Duployan (Since 3.0) */ + I18N_UCHAR_UBLOCK_ELBASAN = 226, /**< Elbasan (Since 3.0) */ + I18N_UCHAR_UBLOCK_GEOMETRIC_SHAPES_EXTENDED = 227, /**< Geometric Shapes Extended (Since 3.0) */ + I18N_UCHAR_UBLOCK_GRANTHA = 228, /**< Grantha (Since 3.0) */ + I18N_UCHAR_UBLOCK_KHOJKI = 229, /**< Khojki (Since 3.0) */ + I18N_UCHAR_UBLOCK_KHUDAWADI = 230, /**< Khudawadi (Since 3.0) */ + I18N_UCHAR_UBLOCK_LATIN_EXTENDED_E = 231, /**< Latin Extended E (Since 3.0) */ + I18N_UCHAR_UBLOCK_LINEAR_A = 232, /**< Linear A (Since 3.0) */ + I18N_UCHAR_UBLOCK_MAHAJANI = 233, /**< Mahajani (Since 3.0) */ + I18N_UCHAR_UBLOCK_MANICHAEAN = 234, /**< Manichaean (Since 3.0) */ + I18N_UCHAR_UBLOCK_MENDE_KIKAKUI = 235, /**< Mende Kikakui (Since 3.0) */ + I18N_UCHAR_UBLOCK_MODI = 236, /**< Modi (Since 3.0) */ + I18N_UCHAR_UBLOCK_MRO = 237, /**< Mro (Since 3.0) */ + I18N_UCHAR_UBLOCK_MYANMAR_EXTENDED_B = 238, /**< Myanmar Extended B (Since 3.0) */ + I18N_UCHAR_UBLOCK_NABATAEAN = 239, /**< Nabataean (Since 3.0) */ + I18N_UCHAR_UBLOCK_OLD_NORTH_ARABIAN = 240, /**< Old North Arabian (Since 3.0) */ + I18N_UCHAR_UBLOCK_OLD_PERMIC = 241, /**< Old Permic (Since 3.0) */ + I18N_UCHAR_UBLOCK_ORNAMENTAL_DINGBATS = 242, /**< Ornamental Dingbats (Since 3.0) */ + I18N_UCHAR_UBLOCK_PAHAWH_HMONG = 243, /**< Pahawh Hmong (Since 3.0) */ + I18N_UCHAR_UBLOCK_PALMYRENE = 244, /**< Palmyrene (Since 3.0) */ + I18N_UCHAR_UBLOCK_PAU_CIN_HAU = 245, /**< Pau Cin Hau (Since 3.0) */ + I18N_UCHAR_UBLOCK_PSALTER_PAHLAVI = 246, /**< Psalter Pahlavi (Since 3.0) */ + I18N_UCHAR_UBLOCK_SHORTHAND_FORMAT_CONTROLS = 247, /**< Shorthand Format Controls (Since 3.0) */ + I18N_UCHAR_UBLOCK_SIDDHAM = 248, /**< Siddham (Since 3.0) */ + I18N_UCHAR_UBLOCK_SINHALA_ARCHAIC_NUMBERS = 249, /**< Sinhala Archaic Numbers (Since 3.0) */ + I18N_UCHAR_UBLOCK_SUPPLEMENTAL_ARROWS_C = 250, /**< Supplemental Arrows C (Since 3.0) */ + I18N_UCHAR_UBLOCK_TIRHUTA = 251, /**< Tirhuta (Since 3.0) */ + I18N_UCHAR_UBLOCK_WARANG_CITI = 252, /**< Warang Citi (Since 3.0) */ + I18N_UCHAR_UBLOCK_COUNT, /**< Count */ + I18N_UCHAR_UBLOCK_INVALID_CODE = -1 /**< Invalid Code */ } i18n_uchar_ublock_code_e; /** @@ -857,30 +857,30 @@ typedef enum { * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCHAR_U_LEFT_TO_RIGHT, /**< L */ - I18N_UCHAR_U_RIGHT_TO_LEFT, /**< R */ - I18N_UCHAR_U_EUROPEAN_NUMBER, /**< EN */ - I18N_UCHAR_U_EUROPEAN_NUMBER_SEPARATOR, /**< ES */ - I18N_UCHAR_U_EUROPEAN_NUMBER_TERMINATOR, /**< ET */ - I18N_UCHAR_U_ARABIC_NUMBER, /**< AN */ - I18N_UCHAR_U_COMMON_NUMBER_SEPARATOR, /**< CS */ - I18N_UCHAR_U_BLOCK_SEPARATOR, /**< B */ - I18N_UCHAR_U_SEGMENT_SEPARATOR, /**< S */ - I18N_UCHAR_U_WHITE_SPACE_NEUTRAL, /**< WS */ - I18N_UCHAR_U_OTHER_NEUTRAL, /**< ON */ - I18N_UCHAR_U_LEFT_TO_RIGHT_EMBEDDING, /**< LRE */ - I18N_UCHAR_U_LEFT_TO_RIGHT_OVERRIDE, /**< LRO */ - I18N_UCHAR_U_RIGHT_TO_LEFT_ARABIC, /**< AL */ - I18N_UCHAR_U_RIGHT_TO_LEFT_EMBEDDING, /**< RLE */ - I18N_UCHAR_U_RIGHT_TO_LEFT_OVERRIDE, /**< RLO */ - I18N_UCHAR_U_POP_DIRECTIONAL_FORMAT, /**< PDF */ - I18N_UCHAR_U_DIR_NON_SPACING_MARK, /**< NSM */ - I18N_UCHAR_U_BOUNDARY_NEUTRAL, /**< BN */ - I18N_UCHAR_U_FIRST_STRONG_ISOLATE, /**< FSI (Since 3.0) */ - I18N_UCHAR_U_LEFT_TO_RIGHT_ISOLATE, /**< FSI (Since 3.0) */ - I18N_UCHAR_U_RIGHT_TO_LEFT_ISOLATE, /**< RLI (Since 3.0) */ - I18N_UCHAR_U_POP_DIRECTIONAL_ISOLATE, /**< PDI (Since 3.0) */ - I18N_UCHAR_U_CHAR_DIRECTION_COUNT /**< Count */ + I18N_UCHAR_U_LEFT_TO_RIGHT, /**< L */ + I18N_UCHAR_U_RIGHT_TO_LEFT, /**< R */ + I18N_UCHAR_U_EUROPEAN_NUMBER, /**< EN */ + I18N_UCHAR_U_EUROPEAN_NUMBER_SEPARATOR, /**< ES */ + I18N_UCHAR_U_EUROPEAN_NUMBER_TERMINATOR, /**< ET */ + I18N_UCHAR_U_ARABIC_NUMBER, /**< AN */ + I18N_UCHAR_U_COMMON_NUMBER_SEPARATOR, /**< CS */ + I18N_UCHAR_U_BLOCK_SEPARATOR, /**< B */ + I18N_UCHAR_U_SEGMENT_SEPARATOR, /**< S */ + I18N_UCHAR_U_WHITE_SPACE_NEUTRAL, /**< WS */ + I18N_UCHAR_U_OTHER_NEUTRAL, /**< ON */ + I18N_UCHAR_U_LEFT_TO_RIGHT_EMBEDDING, /**< LRE */ + I18N_UCHAR_U_LEFT_TO_RIGHT_OVERRIDE, /**< LRO */ + I18N_UCHAR_U_RIGHT_TO_LEFT_ARABIC, /**< AL */ + I18N_UCHAR_U_RIGHT_TO_LEFT_EMBEDDING, /**< RLE */ + I18N_UCHAR_U_RIGHT_TO_LEFT_OVERRIDE, /**< RLO */ + I18N_UCHAR_U_POP_DIRECTIONAL_FORMAT, /**< PDF */ + I18N_UCHAR_U_DIR_NON_SPACING_MARK, /**< NSM */ + I18N_UCHAR_U_BOUNDARY_NEUTRAL, /**< BN */ + I18N_UCHAR_U_FIRST_STRONG_ISOLATE, /**< FSI (Since 3.0) */ + I18N_UCHAR_U_LEFT_TO_RIGHT_ISOLATE, /**< FSI (Since 3.0) */ + I18N_UCHAR_U_RIGHT_TO_LEFT_ISOLATE, /**< RLI (Since 3.0) */ + I18N_UCHAR_U_POP_DIRECTIONAL_ISOLATE, /**< PDI (Since 3.0) */ + I18N_UCHAR_U_CHAR_DIRECTION_COUNT /**< Count */ } i18n_uchar_direction_e; /** @@ -888,25 +888,25 @@ typedef enum { * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCHAR_U_DT_NONE, /**< [none] */ - I18N_UCHAR_U_DT_CANONICAL, /**< [can] */ - I18N_UCHAR_U_DT_COMPAT, /**< [com] */ - I18N_UCHAR_U_DT_CIRCLE, /**< [enc] */ - I18N_UCHAR_U_DT_FINAL, /**< [fin] */ - I18N_UCHAR_U_DT_FONT, /**< [font] */ - I18N_UCHAR_U_DT_FRACTION, /**< [fra] */ - I18N_UCHAR_U_DT_INITIAL, /**< [init] */ - I18N_UCHAR_U_DT_ISOLATED, /**< [iso] */ - I18N_UCHAR_U_DT_MEDIAL, /**< [med] */ - I18N_UCHAR_U_DT_NARROW, /**< [nar] */ - I18N_UCHAR_U_DT_NOBREAK, /**< [nb] */ - I18N_UCHAR_U_DT_SMALL, /**< [sml] */ - I18N_UCHAR_U_DT_SQUARE, /**< [sqr] */ - I18N_UCHAR_U_DT_SUB, /**< [sub] */ - I18N_UCHAR_U_DT_SUPER, /**< [sup] */ - I18N_UCHAR_U_DT_VERTICAL, /**< [vert] */ - I18N_UCHAR_U_DT_WIDE, /**< [wide] */ - I18N_UCHAR_U_DT_COUNT /**< 18 */ + I18N_UCHAR_U_DT_NONE, /**< [none] */ + I18N_UCHAR_U_DT_CANONICAL, /**< [can] */ + I18N_UCHAR_U_DT_COMPAT, /**< [com] */ + I18N_UCHAR_U_DT_CIRCLE, /**< [enc] */ + I18N_UCHAR_U_DT_FINAL, /**< [fin] */ + I18N_UCHAR_U_DT_FONT, /**< [font] */ + I18N_UCHAR_U_DT_FRACTION, /**< [fra] */ + I18N_UCHAR_U_DT_INITIAL, /**< [init] */ + I18N_UCHAR_U_DT_ISOLATED, /**< [iso] */ + I18N_UCHAR_U_DT_MEDIAL, /**< [med] */ + I18N_UCHAR_U_DT_NARROW, /**< [nar] */ + I18N_UCHAR_U_DT_NOBREAK, /**< [nb] */ + I18N_UCHAR_U_DT_SMALL, /**< [sml] */ + I18N_UCHAR_U_DT_SQUARE, /**< [sqr] */ + I18N_UCHAR_U_DT_SUB, /**< [sub] */ + I18N_UCHAR_U_DT_SUPER, /**< [sup] */ + I18N_UCHAR_U_DT_VERTICAL, /**< [vert] */ + I18N_UCHAR_U_DT_WIDE, /**< [wide] */ + I18N_UCHAR_U_DT_COUNT /**< 18 */ } i18n_uchar_u_decomposition_type_e; /** @@ -914,13 +914,13 @@ typedef enum { * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCHAR_U_EA_NEUTRAL, /**< [N] */ - I18N_UCHAR_U_EA_AMBIGUOUS, /**< [A] */ - I18N_UCHAR_U_EA_HALFWIDTH, /**< [H] */ - I18N_UCHAR_U_EA_FULLWIDTH, /**< [F] */ - I18N_UCHAR_U_EA_NARROW, /**< [Na] */ - I18N_UCHAR_U_EA_WIDE, /**< [W] */ - I18N_UCHAR_U_EA_COUNT + I18N_UCHAR_U_EA_NEUTRAL, /**< [N] */ + I18N_UCHAR_U_EA_AMBIGUOUS, /**< [A] */ + I18N_UCHAR_U_EA_HALFWIDTH, /**< [H] */ + I18N_UCHAR_U_EA_FULLWIDTH, /**< [F] */ + I18N_UCHAR_U_EA_NARROW, /**< [Na] */ + I18N_UCHAR_U_EA_WIDE, /**< [W] */ + I18N_UCHAR_U_EA_COUNT } i18n_uchar_u_east_asian_width_e; /** @@ -928,38 +928,38 @@ typedef enum { * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCHAR_U_UNASSIGNED, /**< Non-category for unassigned and non-character code points */ - I18N_UCHAR_U_GENERAL_OTHER_TYPES = 0, /**< Cn "Other, Not Assigned (no characters in [UnicodeData.txt] have this property)" (same as #I18N_UCHAR_U_UNASSIGNED!) */ - I18N_UCHAR_U_UPPERCASE_LETTER, /**< Lu */ - I18N_UCHAR_U_LOWERCASE_LETTER, /**< Ll */ - I18N_UCHAR_U_TITLECASE_LETTER, /**< Lt */ - I18N_UCHAR_U_MODIFIER_LETTER, /**< Lm */ - I18N_UCHAR_U_OTHER_LETTER, /**< Lo */ - I18N_UCHAR_U_NON_SPACING_MARK, /**< Mn */ - I18N_UCHAR_U_ENCLOSING_MARK, /**< Me */ - I18N_UCHAR_U_COMBINING_SPACING_MARK, /**< Mc */ - I18N_UCHAR_U_DECIMAL_DIGIT_NUMBER, /**< Nd */ - I18N_UCHAR_U_LETTER_NUMBER, /**< Nl */ - I18N_UCHAR_U_OTHER_NUMBER, /**< No */ - I18N_UCHAR_U_SPACE_SEPARATOR, /**< Zs */ - I18N_UCHAR_U_LINE_SEPARATOR, /**< Zl */ - I18N_UCHAR_U_PARAGRAPH_SEPARATOR, /**< Zp */ - I18N_UCHAR_U_CONTROL_CHAR, /**< Cc */ - I18N_UCHAR_U_FORMAT_CHAR, /**< Cf */ - I18N_UCHAR_U_PRIVATE_USE_CHAR, /**< Co */ - I18N_UCHAR_U_SURROGATE, /**< Cs */ - I18N_UCHAR_U_DASH_PUNCTUATION, /**< Pd */ - I18N_UCHAR_U_START_PUNCTUATION, /**< Ps */ - I18N_UCHAR_U_END_PUNCTUATION, /**< Pe */ - I18N_UCHAR_U_CONNECTOR_PUNCTUATION, /**< Pc */ - I18N_UCHAR_U_OTHER_PUNCTUATION, /**< Po */ - I18N_UCHAR_U_MATH_SYMBOL, /**< Sm */ - I18N_UCHAR_U_CURRENCY_SYMBOL, /**< Sc */ - I18N_UCHAR_U_MODIFIER_SYMBOL, /**< Sk */ - I18N_UCHAR_U_OTHER_SYMBOL, /**< So */ - I18N_UCHAR_U_INITIAL_PUNCTUATION, /**< Pi */ - I18N_UCHAR_U_FINAL_PUNCTUATION, /**< Pf */ - I18N_UCHAR_U_CHAR_CATEGORY_COUNT /**< One higher than the last enum #i18n_uchar_category_e constant */ + I18N_UCHAR_U_UNASSIGNED, /**< Non-category for unassigned and non-character code points */ + I18N_UCHAR_U_GENERAL_OTHER_TYPES = 0, /**< Cn "Other, Not Assigned (no characters in [UnicodeData.txt] have this property)" (same as #I18N_UCHAR_U_UNASSIGNED!) */ + I18N_UCHAR_U_UPPERCASE_LETTER, /**< Lu */ + I18N_UCHAR_U_LOWERCASE_LETTER, /**< Ll */ + I18N_UCHAR_U_TITLECASE_LETTER, /**< Lt */ + I18N_UCHAR_U_MODIFIER_LETTER, /**< Lm */ + I18N_UCHAR_U_OTHER_LETTER, /**< Lo */ + I18N_UCHAR_U_NON_SPACING_MARK, /**< Mn */ + I18N_UCHAR_U_ENCLOSING_MARK, /**< Me */ + I18N_UCHAR_U_COMBINING_SPACING_MARK, /**< Mc */ + I18N_UCHAR_U_DECIMAL_DIGIT_NUMBER, /**< Nd */ + I18N_UCHAR_U_LETTER_NUMBER, /**< Nl */ + I18N_UCHAR_U_OTHER_NUMBER, /**< No */ + I18N_UCHAR_U_SPACE_SEPARATOR, /**< Zs */ + I18N_UCHAR_U_LINE_SEPARATOR, /**< Zl */ + I18N_UCHAR_U_PARAGRAPH_SEPARATOR, /**< Zp */ + I18N_UCHAR_U_CONTROL_CHAR, /**< Cc */ + I18N_UCHAR_U_FORMAT_CHAR, /**< Cf */ + I18N_UCHAR_U_PRIVATE_USE_CHAR, /**< Co */ + I18N_UCHAR_U_SURROGATE, /**< Cs */ + I18N_UCHAR_U_DASH_PUNCTUATION, /**< Pd */ + I18N_UCHAR_U_START_PUNCTUATION, /**< Ps */ + I18N_UCHAR_U_END_PUNCTUATION, /**< Pe */ + I18N_UCHAR_U_CONNECTOR_PUNCTUATION, /**< Pc */ + I18N_UCHAR_U_OTHER_PUNCTUATION, /**< Po */ + I18N_UCHAR_U_MATH_SYMBOL, /**< Sm */ + I18N_UCHAR_U_CURRENCY_SYMBOL, /**< Sc */ + I18N_UCHAR_U_MODIFIER_SYMBOL, /**< Sk */ + I18N_UCHAR_U_OTHER_SYMBOL, /**< So */ + I18N_UCHAR_U_INITIAL_PUNCTUATION, /**< Pi */ + I18N_UCHAR_U_FINAL_PUNCTUATION, /**< Pf */ + I18N_UCHAR_U_CHAR_CATEGORY_COUNT /**< One higher than the last enum #i18n_uchar_category_e constant */ } i18n_uchar_category_e; /** @@ -967,108 +967,108 @@ typedef enum { * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCHAR_U_JG_NO_JOINING_GROUP, /**< No Joining Group */ - I18N_UCHAR_U_JG_AIN, /**< Ain */ - I18N_UCHAR_U_JG_ALAPH, /**< Alaph */ - I18N_UCHAR_U_JG_ALEF, /**< Alef */ - I18N_UCHAR_U_JG_BEH, /**< Beh */ - I18N_UCHAR_U_JG_BETH, /**< Beth */ - I18N_UCHAR_U_JG_DAL, /**< Dal */ - I18N_UCHAR_U_JG_DALATH_RISH, /**< Dalath Rish */ - I18N_UCHAR_U_JG_E, /**< E */ - I18N_UCHAR_U_JG_FEH, /**< Feh */ - I18N_UCHAR_U_JG_FINAL_SEMKATH, /**< Final Semkath */ - I18N_UCHAR_U_JG_GAF, /**< Gaf */ - I18N_UCHAR_U_JG_GAMAL, /**< Gamal */ - I18N_UCHAR_U_JG_HAH, /**< Hah */ - I18N_UCHAR_U_JG_TEH_MARBUTA_GOAL, /**< Teh Marbuta Goal */ - I18N_UCHAR_U_JG_HAMZA_ON_HEH_GOAL = I18N_UCHAR_U_JG_TEH_MARBUTA_GOAL, /**< Hamza On Heh Goal */ - I18N_UCHAR_U_JG_HE, /**< He */ - I18N_UCHAR_U_JG_HEH, /**< Heh */ - I18N_UCHAR_U_JG_HEH_GOAL, /**< Heh Goal */ - I18N_UCHAR_U_JG_HETH, /**< Heth */ - I18N_UCHAR_U_JG_KAF, /**< Kaf */ - I18N_UCHAR_U_JG_KAPH, /**< Kaph */ - I18N_UCHAR_U_JG_KNOTTED_HEH, /**< Knotted Heh */ - I18N_UCHAR_U_JG_LAM, /**< Lam */ - I18N_UCHAR_U_JG_LAMADH, /**< Lamadh */ - I18N_UCHAR_U_JG_MEEM, /**< Meem */ - I18N_UCHAR_U_JG_MIM, /**< Mim */ - I18N_UCHAR_U_JG_NOON, /**< Noon */ - I18N_UCHAR_U_JG_NUN, /**< Nun */ - I18N_UCHAR_U_JG_PE, /**< Pe */ - I18N_UCHAR_U_JG_QAF, /**< Qaf */ - I18N_UCHAR_U_JG_QAPH, /**< Qaph */ - I18N_UCHAR_U_JG_REH, /**< Reh */ - I18N_UCHAR_U_JG_REVERSED_PE, /**< Reversed Pe */ - I18N_UCHAR_U_JG_SAD, /**< Sad */ - I18N_UCHAR_U_JG_SADHE, /**< Sadhe */ - I18N_UCHAR_U_JG_SEEN, /**< Seen */ - I18N_UCHAR_U_JG_SEMKATH, /**< Semkath */ - I18N_UCHAR_U_JG_SHIN, /**< Shin */ - I18N_UCHAR_U_JG_SWASH_KAF, /**< Swash Kaf */ - I18N_UCHAR_U_JG_SYRIAC_WAW, /**< Syriac Waw */ - I18N_UCHAR_U_JG_TAH, /**< Tah */ - I18N_UCHAR_U_JG_TAW, /**< Taw */ - I18N_UCHAR_U_JG_TEH_MARBUTA, /**< Teh Marbuta */ - I18N_UCHAR_U_JG_TETH, /**< Teth */ - I18N_UCHAR_U_JG_WAW, /**< Waw */ - I18N_UCHAR_U_JG_YEH, /**< Yeh */ - I18N_UCHAR_U_JG_YEH_BARREE, /**< Yeh Barree */ - I18N_UCHAR_U_JG_YEH_WITH_TAIL, /**< Yeh With Tail */ - I18N_UCHAR_U_JG_YUDH, /**< Yudh */ - I18N_UCHAR_U_JG_YUDH_HE, /**< Yudh He */ - I18N_UCHAR_U_JG_ZAIN, /**< Zain */ - I18N_UCHAR_U_JG_FE, /**< Fe */ - I18N_UCHAR_U_JG_KHAPH, /**< Khaph */ - I18N_UCHAR_U_JG_ZHAIN, /**< Zhain */ - I18N_UCHAR_U_JG_BURUSHASKI_YEH_BARREE, /**< Burushaski Yeh Barree */ - I18N_UCHAR_U_JG_FARSI_YEH, /**< Farsi Yeh */ - I18N_UCHAR_U_JG_NYA, /**< Nya */ - I18N_UCHAR_U_JG_ROHINGYA_YEH, /**< Rohingya Yeh */ - I18N_UCHAR_U_JG_MANICHAEAN_ALEPH, /**< Manichaean Aleph (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_AYIN, /**< Manichaean Ayin (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_BETH, /**< Manichaean Beth (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_DALETH, /**< Manichaean Daleth (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_DHAMEDH, /**< Manichaean Dhamedh (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_FIVE, /**< Manichaean Five (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_GIMEL, /**< Manichaean Gimel (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_HETH, /**< Manichaean Heth (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_HUNDRED, /**< Manichaean Hundred (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_KAPH, /**< Manichaean Kaph (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_LAMEDH, /**< Manichaean Lamedh (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_MEM, /**< Manichaean Mem (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_NUN, /**< Manichaean Nun (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_ONE, /**< Manichaean One (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_PE, /**< Manichaean Pe (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_QOPH, /**< Manichaean Qoph (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_RESH, /**< Manichaean Resh (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_SADHE, /**< Manichaean Sadhe (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_SAMEKH, /**< Manichaean Samekh (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_TAW, /**< Manichaean Taw (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_TEN, /**< Manichaean Ten (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_TETH, /**< Manichaean Teth (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_THAMEDH, /**< Manichaean Thamedh (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_TWENTY, /**< Manichaean Twenty (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_WAW, /**< Manichaean Waw (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_YODH, /**< Manichaean Yodh (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_ZAYIN, /**< Manichaean Zayin (Since 3.0) */ - I18N_UCHAR_U_JG_STRAIGHT_WAW, /**< Manichaean Waw (Since 3.0) */ - I18N_UCHAR_U_JG_COUNT /**< Count */ - } i18n_uchar_u_joining_group_e; + I18N_UCHAR_U_JG_NO_JOINING_GROUP, /**< No Joining Group */ + I18N_UCHAR_U_JG_AIN, /**< Ain */ + I18N_UCHAR_U_JG_ALAPH, /**< Alaph */ + I18N_UCHAR_U_JG_ALEF, /**< Alef */ + I18N_UCHAR_U_JG_BEH, /**< Beh */ + I18N_UCHAR_U_JG_BETH, /**< Beth */ + I18N_UCHAR_U_JG_DAL, /**< Dal */ + I18N_UCHAR_U_JG_DALATH_RISH, /**< Dalath Rish */ + I18N_UCHAR_U_JG_E, /**< E */ + I18N_UCHAR_U_JG_FEH, /**< Feh */ + I18N_UCHAR_U_JG_FINAL_SEMKATH, /**< Final Semkath */ + I18N_UCHAR_U_JG_GAF, /**< Gaf */ + I18N_UCHAR_U_JG_GAMAL, /**< Gamal */ + I18N_UCHAR_U_JG_HAH, /**< Hah */ + I18N_UCHAR_U_JG_TEH_MARBUTA_GOAL, /**< Teh Marbuta Goal */ + I18N_UCHAR_U_JG_HAMZA_ON_HEH_GOAL = I18N_UCHAR_U_JG_TEH_MARBUTA_GOAL, /**< Hamza On Heh Goal */ + I18N_UCHAR_U_JG_HE, /**< He */ + I18N_UCHAR_U_JG_HEH, /**< Heh */ + I18N_UCHAR_U_JG_HEH_GOAL, /**< Heh Goal */ + I18N_UCHAR_U_JG_HETH, /**< Heth */ + I18N_UCHAR_U_JG_KAF, /**< Kaf */ + I18N_UCHAR_U_JG_KAPH, /**< Kaph */ + I18N_UCHAR_U_JG_KNOTTED_HEH, /**< Knotted Heh */ + I18N_UCHAR_U_JG_LAM, /**< Lam */ + I18N_UCHAR_U_JG_LAMADH, /**< Lamadh */ + I18N_UCHAR_U_JG_MEEM, /**< Meem */ + I18N_UCHAR_U_JG_MIM, /**< Mim */ + I18N_UCHAR_U_JG_NOON, /**< Noon */ + I18N_UCHAR_U_JG_NUN, /**< Nun */ + I18N_UCHAR_U_JG_PE, /**< Pe */ + I18N_UCHAR_U_JG_QAF, /**< Qaf */ + I18N_UCHAR_U_JG_QAPH, /**< Qaph */ + I18N_UCHAR_U_JG_REH, /**< Reh */ + I18N_UCHAR_U_JG_REVERSED_PE, /**< Reversed Pe */ + I18N_UCHAR_U_JG_SAD, /**< Sad */ + I18N_UCHAR_U_JG_SADHE, /**< Sadhe */ + I18N_UCHAR_U_JG_SEEN, /**< Seen */ + I18N_UCHAR_U_JG_SEMKATH, /**< Semkath */ + I18N_UCHAR_U_JG_SHIN, /**< Shin */ + I18N_UCHAR_U_JG_SWASH_KAF, /**< Swash Kaf */ + I18N_UCHAR_U_JG_SYRIAC_WAW, /**< Syriac Waw */ + I18N_UCHAR_U_JG_TAH, /**< Tah */ + I18N_UCHAR_U_JG_TAW, /**< Taw */ + I18N_UCHAR_U_JG_TEH_MARBUTA, /**< Teh Marbuta */ + I18N_UCHAR_U_JG_TETH, /**< Teth */ + I18N_UCHAR_U_JG_WAW, /**< Waw */ + I18N_UCHAR_U_JG_YEH, /**< Yeh */ + I18N_UCHAR_U_JG_YEH_BARREE, /**< Yeh Barree */ + I18N_UCHAR_U_JG_YEH_WITH_TAIL, /**< Yeh With Tail */ + I18N_UCHAR_U_JG_YUDH, /**< Yudh */ + I18N_UCHAR_U_JG_YUDH_HE, /**< Yudh He */ + I18N_UCHAR_U_JG_ZAIN, /**< Zain */ + I18N_UCHAR_U_JG_FE, /**< Fe */ + I18N_UCHAR_U_JG_KHAPH, /**< Khaph */ + I18N_UCHAR_U_JG_ZHAIN, /**< Zhain */ + I18N_UCHAR_U_JG_BURUSHASKI_YEH_BARREE, /**< Burushaski Yeh Barree */ + I18N_UCHAR_U_JG_FARSI_YEH, /**< Farsi Yeh */ + I18N_UCHAR_U_JG_NYA, /**< Nya */ + I18N_UCHAR_U_JG_ROHINGYA_YEH, /**< Rohingya Yeh */ + I18N_UCHAR_U_JG_MANICHAEAN_ALEPH, /**< Manichaean Aleph (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_AYIN, /**< Manichaean Ayin (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_BETH, /**< Manichaean Beth (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_DALETH, /**< Manichaean Daleth (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_DHAMEDH, /**< Manichaean Dhamedh (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_FIVE, /**< Manichaean Five (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_GIMEL, /**< Manichaean Gimel (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_HETH, /**< Manichaean Heth (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_HUNDRED, /**< Manichaean Hundred (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_KAPH, /**< Manichaean Kaph (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_LAMEDH, /**< Manichaean Lamedh (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_MEM, /**< Manichaean Mem (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_NUN, /**< Manichaean Nun (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_ONE, /**< Manichaean One (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_PE, /**< Manichaean Pe (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_QOPH, /**< Manichaean Qoph (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_RESH, /**< Manichaean Resh (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_SADHE, /**< Manichaean Sadhe (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_SAMEKH, /**< Manichaean Samekh (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_TAW, /**< Manichaean Taw (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_TEN, /**< Manichaean Ten (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_TETH, /**< Manichaean Teth (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_THAMEDH, /**< Manichaean Thamedh (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_TWENTY, /**< Manichaean Twenty (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_WAW, /**< Manichaean Waw (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_YODH, /**< Manichaean Yodh (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_ZAYIN, /**< Manichaean Zayin (Since 3.0) */ + I18N_UCHAR_U_JG_STRAIGHT_WAW, /**< Manichaean Waw (Since 3.0) */ + I18N_UCHAR_U_JG_COUNT /**< Count */ +} i18n_uchar_u_joining_group_e; /** * @brief Enumeration for Joining Type constants. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCHAR_U_JT_NON_JOINING, /**< [U] */ - I18N_UCHAR_U_JT_JOIN_CAUSING, /**< [C] */ - I18N_UCHAR_U_JT_DUAL_JOINING, /**< [D] */ - I18N_UCHAR_U_JT_LEFT_JOINING, /**< [L] */ - I18N_UCHAR_U_JT_RIGHT_JOINING, /**< [R] */ - I18N_UCHAR_U_JT_TRANSPARENT, /**< [T] */ - I18N_UCHAR_U_JT_COUNT /**< 6 */ + I18N_UCHAR_U_JT_NON_JOINING, /**< [U] */ + I18N_UCHAR_U_JT_JOIN_CAUSING, /**< [C] */ + I18N_UCHAR_U_JT_DUAL_JOINING, /**< [D] */ + I18N_UCHAR_U_JT_LEFT_JOINING, /**< [L] */ + I18N_UCHAR_U_JT_RIGHT_JOINING, /**< [R] */ + I18N_UCHAR_U_JT_TRANSPARENT, /**< [T] */ + I18N_UCHAR_U_JT_COUNT /**< 6 */ } i18n_uchar_u_joining_type_e; /** @@ -1076,57 +1076,57 @@ typedef enum { * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCHAR_U_LB_UNKNOWN, /**< [XX] */ - I18N_UCHAR_U_LB_AMBIGUOUS, /**< [AI] */ - I18N_UCHAR_U_LB_ALPHABETIC, /**< [AL] */ - I18N_UCHAR_U_LB_BREAK_BOTH, /**< [B2] */ - I18N_UCHAR_U_LB_BREAK_AFTER, /**< [BA] */ - I18N_UCHAR_U_LB_BREAK_BEFORE, /**< [BB] */ - I18N_UCHAR_U_LB_MANDATORY_BREAK, /**< [BK] */ - I18N_UCHAR_U_LB_CONTINGENT_BREAK, /**< [CB] */ - I18N_UCHAR_U_LB_CLOSE_PUNCTUATION, /**< [CL] */ - I18N_UCHAR_U_LB_COMBINING_MARK, /**< [CM] */ - I18N_UCHAR_U_LB_CARRIAGE_RETURN, /**< [CR] */ - I18N_UCHAR_U_LB_EXCLAMATION, /**< [EX] */ - I18N_UCHAR_U_LB_GLUE, /**< [GL] */ - I18N_UCHAR_U_LB_HYPHEN, /**< [HY] */ - I18N_UCHAR_U_LB_IDEOGRAPHIC, /**< [ID] */ - I18N_UCHAR_U_LB_INSEPARABLE, /**< [IN] */ - I18N_UCHAR_U_LB_INSEPERABLE = I18N_UCHAR_U_LB_INSEPARABLE, - I18N_UCHAR_U_LB_INFIX_NUMERIC, /**< [IS] */ - I18N_UCHAR_U_LB_LINE_FEED, /**< [LF] */ - I18N_UCHAR_U_LB_NONSTARTER, /**< [NS] */ - I18N_UCHAR_U_LB_NUMERIC, /**< [NU] */ - I18N_UCHAR_U_LB_OPEN_PUNCTUATION, /**< [OP] */ - I18N_UCHAR_U_LB_POSTFIX_NUMERIC, /**< [PO] */ - I18N_UCHAR_U_LB_PREFIX_NUMERIC, /**< [PR] */ - I18N_UCHAR_U_LB_QUOTATION, /**< [QU] */ - I18N_UCHAR_U_LB_COMPLEX_CONTEXT, /**< [SA] */ - I18N_UCHAR_U_LB_SURROGATE, /**< [SG] */ - I18N_UCHAR_U_LB_SPACE, /**< [SP] */ - I18N_UCHAR_U_LB_BREAK_SYMBOLS, /**< [SY] */ - I18N_UCHAR_U_LB_ZWSPACE, /**< [ZW] */ - I18N_UCHAR_U_LB_NEXT_LINE, /**< [NL] */ - I18N_UCHAR_U_LB_WORD_JOINER, /**< [WJ] */ - I18N_UCHAR_U_LB_H2, /**< [H2] */ - I18N_UCHAR_U_LB_H3, /**< [H3] */ - I18N_UCHAR_U_LB_JL, /**< [JL] */ - I18N_UCHAR_U_LB_JT, /**< [JT] */ - I18N_UCHAR_U_LB_JV, /**< [JV] */ - I18N_UCHAR_U_LB_CLOSE_PARENTHESIS, /**< [CP] */ - I18N_UCHAR_U_LB_COUNT - } i18n_uchar_u_line_break_e; + I18N_UCHAR_U_LB_UNKNOWN, /**< [XX] */ + I18N_UCHAR_U_LB_AMBIGUOUS, /**< [AI] */ + I18N_UCHAR_U_LB_ALPHABETIC, /**< [AL] */ + I18N_UCHAR_U_LB_BREAK_BOTH, /**< [B2] */ + I18N_UCHAR_U_LB_BREAK_AFTER, /**< [BA] */ + I18N_UCHAR_U_LB_BREAK_BEFORE, /**< [BB] */ + I18N_UCHAR_U_LB_MANDATORY_BREAK, /**< [BK] */ + I18N_UCHAR_U_LB_CONTINGENT_BREAK, /**< [CB] */ + I18N_UCHAR_U_LB_CLOSE_PUNCTUATION, /**< [CL] */ + I18N_UCHAR_U_LB_COMBINING_MARK, /**< [CM] */ + I18N_UCHAR_U_LB_CARRIAGE_RETURN, /**< [CR] */ + I18N_UCHAR_U_LB_EXCLAMATION, /**< [EX] */ + I18N_UCHAR_U_LB_GLUE, /**< [GL] */ + I18N_UCHAR_U_LB_HYPHEN, /**< [HY] */ + I18N_UCHAR_U_LB_IDEOGRAPHIC, /**< [ID] */ + I18N_UCHAR_U_LB_INSEPARABLE, /**< [IN] */ + I18N_UCHAR_U_LB_INSEPERABLE = I18N_UCHAR_U_LB_INSEPARABLE, + I18N_UCHAR_U_LB_INFIX_NUMERIC, /**< [IS] */ + I18N_UCHAR_U_LB_LINE_FEED, /**< [LF] */ + I18N_UCHAR_U_LB_NONSTARTER, /**< [NS] */ + I18N_UCHAR_U_LB_NUMERIC, /**< [NU] */ + I18N_UCHAR_U_LB_OPEN_PUNCTUATION, /**< [OP] */ + I18N_UCHAR_U_LB_POSTFIX_NUMERIC, /**< [PO] */ + I18N_UCHAR_U_LB_PREFIX_NUMERIC, /**< [PR] */ + I18N_UCHAR_U_LB_QUOTATION, /**< [QU] */ + I18N_UCHAR_U_LB_COMPLEX_CONTEXT, /**< [SA] */ + I18N_UCHAR_U_LB_SURROGATE, /**< [SG] */ + I18N_UCHAR_U_LB_SPACE, /**< [SP] */ + I18N_UCHAR_U_LB_BREAK_SYMBOLS, /**< [SY] */ + I18N_UCHAR_U_LB_ZWSPACE, /**< [ZW] */ + I18N_UCHAR_U_LB_NEXT_LINE, /**< [NL] */ + I18N_UCHAR_U_LB_WORD_JOINER, /**< [WJ] */ + I18N_UCHAR_U_LB_H2, /**< [H2] */ + I18N_UCHAR_U_LB_H3, /**< [H3] */ + I18N_UCHAR_U_LB_JL, /**< [JL] */ + I18N_UCHAR_U_LB_JT, /**< [JT] */ + I18N_UCHAR_U_LB_JV, /**< [JV] */ + I18N_UCHAR_U_LB_CLOSE_PARENTHESIS, /**< [CP] */ + I18N_UCHAR_U_LB_COUNT +} i18n_uchar_u_line_break_e; /** * @brief Enumeration for Numeric Type constants. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCHAR_U_NT_NONE, /**< [None] */ - I18N_UCHAR_U_NT_DECIMAL, /**< [de] */ - I18N_UCHAR_U_NT_DIGIT, /**< [di] */ - I18N_UCHAR_U_NT_NUMERIC, /**< [nu] */ - I18N_UCHAR_U_NT_COUNT /**< */ + I18N_UCHAR_U_NT_NONE, /**< [None] */ + I18N_UCHAR_U_NT_DECIMAL, /**< [de] */ + I18N_UCHAR_U_NT_DIGIT, /**< [di] */ + I18N_UCHAR_U_NT_NUMERIC, /**< [nu] */ + I18N_UCHAR_U_NT_COUNT /**< */ } i18n_uchar_u_numeric_type_e; /** @@ -1134,13 +1134,13 @@ typedef enum { * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCHAR_U_HST_NOT_APPLICABLE, /**< [NA] */ - I18N_UCHAR_U_HST_LEADING_JAMO, /**< [L] */ - I18N_UCHAR_U_HST_VOWEL_JAMO, /**< [V] */ - I18N_UCHAR_U_HST_TRAILING_JAMO, /**< [T] */ - I18N_UCHAR_U_HST_LV_SYLLABLE, /**< [LV] */ - I18N_UCHAR_U_HST_LVT_SYLLABLE, /**< [LVT] */ - I18N_UCHAR_U_HST_COUNT /**< */ + I18N_UCHAR_U_HST_NOT_APPLICABLE, /**< [NA] */ + I18N_UCHAR_U_HST_LEADING_JAMO, /**< [L] */ + I18N_UCHAR_U_HST_VOWEL_JAMO, /**< [V] */ + I18N_UCHAR_U_HST_TRAILING_JAMO, /**< [T] */ + I18N_UCHAR_U_HST_LV_SYLLABLE, /**< [LV] */ + I18N_UCHAR_U_HST_LVT_SYLLABLE, /**< [LVT] */ + I18N_UCHAR_U_HST_COUNT /**< */ } i18n_uchar_u_hangul_syllable_type_e; /** @@ -1148,22 +1148,22 @@ typedef enum { * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCHAR_U_SB_OTHER, /**< [XX] */ - I18N_UCHAR_U_SB_ATERM, /**< [AT] */ - I18N_UCHAR_U_SB_CLOSE, /**< [CL] */ - I18N_UCHAR_U_SB_FORMAT, /**< [FO] */ - I18N_UCHAR_U_SB_LOWER, /**< [LO] */ - I18N_UCHAR_U_SB_NUMERIC, /**< [NU] */ - I18N_UCHAR_U_SB_OLETTER, /**< [LE] */ - I18N_UCHAR_U_SB_SEP, /**< [SE] */ - I18N_UCHAR_U_SB_SP, /**< [SP] */ - I18N_UCHAR_U_SB_STERM, /**< [ST] */ - I18N_UCHAR_U_SB_UPPER, /**< [UP] */ - I18N_UCHAR_U_SB_CR, /**< [CR] */ - I18N_UCHAR_U_SB_EXTEND, /**< [EX] */ - I18N_UCHAR_U_SB_LF, /**< [LF] */ - I18N_UCHAR_U_SB_SCONTINUE, /**< [SC] */ - I18N_UCHAR_U_SB_COUNT /**< */ + I18N_UCHAR_U_SB_OTHER, /**< [XX] */ + I18N_UCHAR_U_SB_ATERM, /**< [AT] */ + I18N_UCHAR_U_SB_CLOSE, /**< [CL] */ + I18N_UCHAR_U_SB_FORMAT, /**< [FO] */ + I18N_UCHAR_U_SB_LOWER, /**< [LO] */ + I18N_UCHAR_U_SB_NUMERIC, /**< [NU] */ + I18N_UCHAR_U_SB_OLETTER, /**< [LE] */ + I18N_UCHAR_U_SB_SEP, /**< [SE] */ + I18N_UCHAR_U_SB_SP, /**< [SP] */ + I18N_UCHAR_U_SB_STERM, /**< [ST] */ + I18N_UCHAR_U_SB_UPPER, /**< [UP] */ + I18N_UCHAR_U_SB_CR, /**< [CR] */ + I18N_UCHAR_U_SB_EXTEND, /**< [EX] */ + I18N_UCHAR_U_SB_LF, /**< [LF] */ + I18N_UCHAR_U_SB_SCONTINUE, /**< [SC] */ + I18N_UCHAR_U_SB_COUNT /**< */ } i18n_uchar_u_sentence_break_e; /** @@ -1171,24 +1171,24 @@ typedef enum { * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCHAR_U_WB_OTHER, /**< [XX] */ - I18N_UCHAR_U_WB_ALETTER, /**< [LE] */ - I18N_UCHAR_U_WB_FORMAT, /**< [FO] */ - I18N_UCHAR_U_WB_KATAKANA, /**< [KA] */ - I18N_UCHAR_U_WB_MIDLETTER, /**< [ML] */ - I18N_UCHAR_U_WB_MIDNUM, /**< [MN] */ - I18N_UCHAR_U_WB_NUMERIC, /**< [NU] */ - I18N_UCHAR_U_WB_EXTENDNUMLET, /**< [EX] */ - I18N_UCHAR_U_WB_CR, /**< [CR] */ - I18N_UCHAR_U_WB_EXTEND, /**< [Extend] */ - I18N_UCHAR_U_WB_LF, /**< [LF] */ - I18N_UCHAR_U_WB_MIDNUMLET, /**< [MB] */ - I18N_UCHAR_U_WB_NEWLINE, /**< [NL] */ - I18N_UCHAR_U_WB_REGIONAL_INDICATOR, /**< [RI] (Since 3.0) */ - I18N_UCHAR_U_WB_HEBREW_LETTER, /**< [HL] (Since 3.0) */ - I18N_UCHAR_U_WB_SINGLE_QUOTE, /**< [SQ] (Since 3.0) */ - I18N_UCHAR_U_WB_DOUBLE_QUOTE, /**< [DQ] (Since 3.0) */ - I18N_UCHAR_U_WB_COUNT /**< */ + I18N_UCHAR_U_WB_OTHER, /**< [XX] */ + I18N_UCHAR_U_WB_ALETTER, /**< [LE] */ + I18N_UCHAR_U_WB_FORMAT, /**< [FO] */ + I18N_UCHAR_U_WB_KATAKANA, /**< [KA] */ + I18N_UCHAR_U_WB_MIDLETTER, /**< [ML] */ + I18N_UCHAR_U_WB_MIDNUM, /**< [MN] */ + I18N_UCHAR_U_WB_NUMERIC, /**< [NU] */ + I18N_UCHAR_U_WB_EXTENDNUMLET, /**< [EX] */ + I18N_UCHAR_U_WB_CR, /**< [CR] */ + I18N_UCHAR_U_WB_EXTEND, /**< [Extend] */ + I18N_UCHAR_U_WB_LF, /**< [LF] */ + I18N_UCHAR_U_WB_MIDNUMLET, /**< [MB] */ + I18N_UCHAR_U_WB_NEWLINE, /**< [NL] */ + I18N_UCHAR_U_WB_REGIONAL_INDICATOR, /**< [RI] (Since 3.0) */ + I18N_UCHAR_U_WB_HEBREW_LETTER, /**< [HL] (Since 3.0) */ + I18N_UCHAR_U_WB_SINGLE_QUOTE, /**< [SQ] (Since 3.0) */ + I18N_UCHAR_U_WB_DOUBLE_QUOTE, /**< [DQ] (Since 3.0) */ + I18N_UCHAR_U_WB_COUNT /**< */ } i18n_uchar_u_word_break_values_e; /** @@ -1196,19 +1196,19 @@ typedef enum { * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCHAR_U_GCB_OTHER, /**< [XX] */ - I18N_UCHAR_U_GCB_CONTROL, /**< [CN] */ - I18N_UCHAR_U_GCB_CR, /**< [CR] */ - I18N_UCHAR_U_GCB_EXTEND, /**< [EX] */ - I18N_UCHAR_U_GCB_L, /**< [L] */ - I18N_UCHAR_U_GCB_LF, /**< [LF] */ - I18N_UCHAR_U_GCB_LV, /**< [LV] */ - I18N_UCHAR_U_GCB_LVT, /**< [LVT] */ - I18N_UCHAR_U_GCB_T, /**< [T] */ - I18N_UCHAR_U_GCB_V, /**< [V] */ - I18N_UCHAR_U_GCB_SPACING_MARK, /**< [SM] */ - I18N_UCHAR_U_GCB_PREPEND, /**< [PP] */ - I18N_UCHAR_UCHAR_U_GCB_COUNT /**< */ + I18N_UCHAR_U_GCB_OTHER, /**< [XX] */ + I18N_UCHAR_U_GCB_CONTROL, /**< [CN] */ + I18N_UCHAR_U_GCB_CR, /**< [CR] */ + I18N_UCHAR_U_GCB_EXTEND, /**< [EX] */ + I18N_UCHAR_U_GCB_L, /**< [L] */ + I18N_UCHAR_U_GCB_LF, /**< [LF] */ + I18N_UCHAR_U_GCB_LV, /**< [LV] */ + I18N_UCHAR_U_GCB_LVT, /**< [LVT] */ + I18N_UCHAR_U_GCB_T, /**< [T] */ + I18N_UCHAR_U_GCB_V, /**< [V] */ + I18N_UCHAR_U_GCB_SPACING_MARK, /**< [SM] */ + I18N_UCHAR_U_GCB_PREPEND, /**< [PP] */ + I18N_UCHAR_UCHAR_U_GCB_COUNT /**< */ } i18n_uchar_u_grapheme_cluster_break_e; /** @@ -1229,69 +1229,69 @@ typedef void *i18n_ucollator_h; /** * @brief Enumeration for attributes that collation service understands. - * All the attributes can take #I18N_UCOLLATOR_DEFAULT value, as well as the values specific to each one. + * All the attributes can take #I18N_UCOLLATOR_DEFAULT value, as well as the values specific to each one. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCOLLATOR_FRENCH_COLLATION, /**< Attribute for direction of secondary weights - used in Canadian French. Acceptable values are #I18N_UCOLLATOR_ON, which results in secondary weights being considered backwards, and #I18N_UCOLLATOR_OFF which treats secondary weights in the order they appear */ - I18N_UCOLLATOR_ALTERNATE_HANDLING, /**< Attribute for handling variable elements. Acceptable values are #I18N_UCOLLATOR_NON_IGNORABLE (default) which treats all the codepoints with non-ignorable primary weights in the same way, and #I18N_UCOLLATOR_SHIFTED which causes codepoints with primary weights that are equal or below the variable top value to be ignored at the primary level and moved to the quaternary level */ - I18N_UCOLLATOR_CASE_FIRST, /**< Controls the ordering of upper and lower case letters. Acceptable values are #I18N_UCOLLATOR_OFF (default), which orders upper and lower case letters in accordance to their tertiary weights, #I18N_UCOLLATOR_UPPER_FIRST which forces upper case letters to sort before lower case letters, and #I18N_UCOLLATOR_LOWER_FIRST which does the opposite */ - I18N_UCOLLATOR_CASE_LEVEL, /**< Controls whether an extra case level (positioned before the third level) is generated or not. Acceptable values are #I18N_UCOLLATOR_OFF (default), when case level is not generated, and #I18N_UCOLLATOR_ON which causes the case level to be generated. Contents of the case level are affected by the value of the #I18N_UCOLLATOR_CASE_FIRST attribute. A simple way to ignore accent differences in a string is to set the strength to #I18N_UCOLLATOR_PRIMARY and enable case level */ - I18N_UCOLLATOR_NORMALIZATION_MODE, /**< Controls whether the normalization check and necessary normalizations are performed. When set to #I18N_UCOLLATOR_OFF (default) no normalization check is performed. The correctness of the result is guaranteed only if the input data is in so-called FCD form (see users manual for more info). When set to #I18N_UCOLLATOR_ON, an incremental check is performed to see whether the input data is in the FCD form. If the data is not in the FCD form, incremental NFD normalization is performed */ - I18N_UCOLLATOR_DECOMPOSITION_MODE = I18N_UCOLLATOR_NORMALIZATION_MODE, /**< An alias for the #I18N_UCOLLATOR_NORMALIZATION_MODE attribute */ - I18N_UCOLLATOR_STRENGTH, /**< The strength attribute. Can be either #I18N_UCOLLATOR_PRIMARY, #I18N_UCOLLATOR_SECONDARY, #I18N_UCOLLATOR_TERTIARY, #I18N_UCOLLATOR_QUATERNARY, or #I18N_UCOLLATOR_IDENTICAL. The usual strength for most locales (except Japanese) is tertiary. Quaternary strength is useful when combined with shifted setting for the alternate handling attribute and for JIS X 4061 collation, when it is used to distinguish between Katakana and Hiragana. Otherwise, quaternary level is affected only by the number of non-ignorable code points in the string. Identical strength is rarely useful, as it amounts to codepoints of the NFD form of the string */ - I18N_UCOLLATOR_NUMERIC_COLLATION = I18N_UCOLLATOR_STRENGTH + 2, /**< When turned on, this attribute makes substrings of digits that are sort according to their numeric values. This is a way to get '100' to sort AFTER '2'. Note that the longest digit substring that can be treated as a single unit is 254 digits (not counting leading zeros). If a digit substring is longer than that, the digits beyond the limit will be treated as a separate digit substring. A "digit" in this sense is a code point with General_Category=Nd, which does not include circled numbers, roman numerals, and so on. Only a contiguous digit substring is considered, that is, non-negative integers without separators. There is no support for plus/minus signs, decimals, exponents, and so on */ - I18N_UCOLLATOR_ATTRIBUTE_COUNT /**< The number of i18n_ucollator_attribute_e constants */ + I18N_UCOLLATOR_FRENCH_COLLATION, /**< Attribute for direction of secondary weights - used in Canadian French. Acceptable values are #I18N_UCOLLATOR_ON, which results in secondary weights being considered backwards, and #I18N_UCOLLATOR_OFF which treats secondary weights in the order they appear */ + I18N_UCOLLATOR_ALTERNATE_HANDLING, /**< Attribute for handling variable elements. Acceptable values are #I18N_UCOLLATOR_NON_IGNORABLE (default) which treats all the codepoints with non-ignorable primary weights in the same way, and #I18N_UCOLLATOR_SHIFTED which causes codepoints with primary weights that are equal or below the variable top value to be ignored at the primary level and moved to the quaternary level */ + I18N_UCOLLATOR_CASE_FIRST, /**< Controls the ordering of upper and lower case letters. Acceptable values are #I18N_UCOLLATOR_OFF (default), which orders upper and lower case letters in accordance to their tertiary weights, #I18N_UCOLLATOR_UPPER_FIRST which forces upper case letters to sort before lower case letters, and #I18N_UCOLLATOR_LOWER_FIRST which does the opposite */ + I18N_UCOLLATOR_CASE_LEVEL, /**< Controls whether an extra case level (positioned before the third level) is generated or not. Acceptable values are #I18N_UCOLLATOR_OFF (default), when case level is not generated, and #I18N_UCOLLATOR_ON which causes the case level to be generated. Contents of the case level are affected by the value of the #I18N_UCOLLATOR_CASE_FIRST attribute. A simple way to ignore accent differences in a string is to set the strength to #I18N_UCOLLATOR_PRIMARY and enable case level */ + I18N_UCOLLATOR_NORMALIZATION_MODE, /**< Controls whether the normalization check and necessary normalizations are performed. When set to #I18N_UCOLLATOR_OFF (default) no normalization check is performed. The correctness of the result is guaranteed only if the input data is in so-called FCD form (see users manual for more info). When set to #I18N_UCOLLATOR_ON, an incremental check is performed to see whether the input data is in the FCD form. If the data is not in the FCD form, incremental NFD normalization is performed */ + I18N_UCOLLATOR_DECOMPOSITION_MODE = I18N_UCOLLATOR_NORMALIZATION_MODE, /**< An alias for the #I18N_UCOLLATOR_NORMALIZATION_MODE attribute */ + I18N_UCOLLATOR_STRENGTH, /**< The strength attribute. Can be either #I18N_UCOLLATOR_PRIMARY, #I18N_UCOLLATOR_SECONDARY, #I18N_UCOLLATOR_TERTIARY, #I18N_UCOLLATOR_QUATERNARY, or #I18N_UCOLLATOR_IDENTICAL. The usual strength for most locales (except Japanese) is tertiary. Quaternary strength is useful when combined with shifted setting for the alternate handling attribute and for JIS X 4061 collation, when it is used to distinguish between Katakana and Hiragana. Otherwise, quaternary level is affected only by the number of non-ignorable code points in the string. Identical strength is rarely useful, as it amounts to codepoints of the NFD form of the string */ + I18N_UCOLLATOR_NUMERIC_COLLATION = I18N_UCOLLATOR_STRENGTH + 2, /**< When turned on, this attribute makes substrings of digits that are sort according to their numeric values. This is a way to get '100' to sort AFTER '2'. Note that the longest digit substring that can be treated as a single unit is 254 digits (not counting leading zeros). If a digit substring is longer than that, the digits beyond the limit will be treated as a separate digit substring. A "digit" in this sense is a code point with General_Category=Nd, which does not include circled numbers, roman numerals, and so on. Only a contiguous digit substring is considered, that is, non-negative integers without separators. There is no support for plus/minus signs, decimals, exponents, and so on */ + I18N_UCOLLATOR_ATTRIBUTE_COUNT /**< The number of i18n_ucollator_attribute_e constants */ } i18n_ucollator_attribute_e; /** * @brief Enumeration containing attribute values for controlling collation behavior. - * Here are all the allowable values. Not every attribute can take every value. - * The only universal value is #I18N_UCOLLATOR_DEFAULT, which resets the attribute value to the predefined value for that locale. + * Here are all the allowable values. Not every attribute can take every value. + * The only universal value is #I18N_UCOLLATOR_DEFAULT, which resets the attribute value to the predefined value for that locale. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCOLLATOR_DEFAULT = -1, /**< Accepted by most attributes */ - I18N_UCOLLATOR_PRIMARY = 0, /**< Primary collation strength */ - I18N_UCOLLATOR_SECONDARY = 1, /**< Secondary collation strength */ - I18N_UCOLLATOR_TERTIARY = 2, /**< Tertiary collation strength */ - I18N_UCOLLATOR_DEFAULT_STRENGTH = I18N_UCOLLATOR_TERTIARY, /**< Default collation strength */ - I18N_UCOLLATOR_CE_STRENGTH_LIMIT, - I18N_UCOLLATOR_QUATERNARY = 3, /**< Quaternary collation strength */ - I18N_UCOLLATOR_IDENTICAL = 15, /**< Identical collation strength */ - I18N_UCOLLATOR_STRENGTH_LIMIT, - - I18N_UCOLLATOR_OFF = 16, /**< Turn the feature off - works for #I18N_UCOLLATOR_FRENCH_COLLATION, #I18N_UCOLLATOR_CASE_LEVEL & #I18N_UCOLLATOR_DECOMPOSITION_MODE */ - I18N_UCOLLATOR_ON = 17, /**< Turn the feature on - works for #I18N_UCOLLATOR_FRENCH_COLLATION, #I18N_UCOLLATOR_CASE_LEVEL & #I18N_UCOLLATOR_DECOMPOSITION_MODE */ - - I18N_UCOLLATOR_SHIFTED = 20, /**< Valid for #I18N_UCOLLATOR_ALTERNATE_HANDLING. Alternate handling will be shifted. */ - I18N_UCOLLATOR_NON_IGNORABLE = 21, /**< Valid for #I18N_UCOLLATOR_ALTERNATE_HANDLING. Alternate handling will be non ignorable. */ - I18N_UCOLLATOR_LOWER_FIRST = 24, /**< Valid for #I18N_UCOLLATOR_CASE_FIRST - lower case sorts before upper case. */ - I18N_UCOLLATOR_UPPER_FIRST = 25, /**< Upper case sorts before lower case. */ - I18N_UCOLLATOR_ATTRIBUTE_VALUE_COUNT + I18N_UCOLLATOR_DEFAULT = -1, /**< Accepted by most attributes */ + I18N_UCOLLATOR_PRIMARY = 0, /**< Primary collation strength */ + I18N_UCOLLATOR_SECONDARY = 1, /**< Secondary collation strength */ + I18N_UCOLLATOR_TERTIARY = 2, /**< Tertiary collation strength */ + I18N_UCOLLATOR_DEFAULT_STRENGTH = I18N_UCOLLATOR_TERTIARY, /**< Default collation strength */ + I18N_UCOLLATOR_CE_STRENGTH_LIMIT, + I18N_UCOLLATOR_QUATERNARY = 3, /**< Quaternary collation strength */ + I18N_UCOLLATOR_IDENTICAL = 15, /**< Identical collation strength */ + I18N_UCOLLATOR_STRENGTH_LIMIT, + + I18N_UCOLLATOR_OFF = 16, /**< Turn the feature off - works for #I18N_UCOLLATOR_FRENCH_COLLATION, #I18N_UCOLLATOR_CASE_LEVEL & #I18N_UCOLLATOR_DECOMPOSITION_MODE */ + I18N_UCOLLATOR_ON = 17, /**< Turn the feature on - works for #I18N_UCOLLATOR_FRENCH_COLLATION, #I18N_UCOLLATOR_CASE_LEVEL & #I18N_UCOLLATOR_DECOMPOSITION_MODE */ + + I18N_UCOLLATOR_SHIFTED = 20, /**< Valid for #I18N_UCOLLATOR_ALTERNATE_HANDLING. Alternate handling will be shifted. */ + I18N_UCOLLATOR_NON_IGNORABLE = 21, /**< Valid for #I18N_UCOLLATOR_ALTERNATE_HANDLING. Alternate handling will be non ignorable. */ + I18N_UCOLLATOR_LOWER_FIRST = 24, /**< Valid for #I18N_UCOLLATOR_CASE_FIRST - lower case sorts before upper case. */ + I18N_UCOLLATOR_UPPER_FIRST = 25, /**< Upper case sorts before lower case. */ + I18N_UCOLLATOR_ATTRIBUTE_VALUE_COUNT } i18n_ucollator_attribute_value_e; /** * @brief Enumeration in which the base letter represents a primary difference. Set comparison level to #I18N_UCOLLATOR_PRIMARY to ignore secondary and tertiary differences. Use this to set the strength of an #i18n_ucollator_h. Example of primary difference, "abc" < "abd" - * Diacritical differences on the same base letter represent a secondary difference. Set comparison level to #I18N_UCOLLATOR_SECONDARY to ignore tertiary differences. Use this to set the strength of an #i18n_ucollator_h. Example of secondary difference, "ä" >> "a". - * Uppercase and lowercase versions of the same character represent a tertiary difference. Set comparison level to #I18N_UCOLLATOR_TERTIARY to include all comparison differences. Use this to set the strength of an #i18n_ucollator_h. Example of tertiary difference, "abc" <<< "ABC". - * Two characters are considered "identical" when they have the same unicode spellings. #I18N_UCOLLATOR_IDENTICAL. For example, "ä" == "ä". - * #i18n_ucollator_strength_e is also used to determine the strength of sort keys generated from #i18n_ucollator_h. These values can now be found in the #i18n_ucollator_attribute_value_e enum. + * Diacritical differences on the same base letter represent a secondary difference. Set comparison level to #I18N_UCOLLATOR_SECONDARY to ignore tertiary differences. Use this to set the strength of an #i18n_ucollator_h. Example of secondary difference, "ä" >> "a". + * Uppercase and lowercase versions of the same character represent a tertiary difference. Set comparison level to #I18N_UCOLLATOR_TERTIARY to include all comparison differences. Use this to set the strength of an #i18n_ucollator_h. Example of tertiary difference, "abc" <<< "ABC". + * Two characters are considered "identical" when they have the same unicode spellings. #I18N_UCOLLATOR_IDENTICAL. For example, "ä" == "ä". + * #i18n_ucollator_strength_e is also used to determine the strength of sort keys generated from #i18n_ucollator_h. These values can now be found in the #i18n_ucollator_attribute_value_e enum. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef i18n_ucollator_attribute_value_e i18n_ucollator_strength_e; /** * @brief Enumeration for source and target string comparison result. - * #I18N_UCOLLATOR_LESS is returned if the source string is compared to be less than the target string in the {@link i18n_ucollator_str_collator() } method. - * #I18N_UCOLLATOR_EQUAL is returned if the source string is compared to be equal to the target string in the {@link i18n_ucollator_str_collator() } method. - * #I18N_UCOLLATOR_GREATER is returned if the source string is compared to be greater than the target string in the {@link #i18n_ucollator_str_collator() } method. + * #I18N_UCOLLATOR_LESS is returned if the source string is compared to be less than the target string in the {@link i18n_ucollator_str_collator() } method. + * #I18N_UCOLLATOR_EQUAL is returned if the source string is compared to be equal to the target string in the {@link i18n_ucollator_str_collator() } method. + * #I18N_UCOLLATOR_GREATER is returned if the source string is compared to be greater than the target string in the {@link #i18n_ucollator_str_collator() } method. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCOLLATOR_EQUAL = 0, /**< string a == string b */ - I18N_UCOLLATOR_GREATER = 1, /**< string a > string b */ - I18N_UCOLLATOR_LESS = -1 /**< string a < string b */ + I18N_UCOLLATOR_EQUAL = 0, /**< string a == string b */ + I18N_UCOLLATOR_GREATER = 1, /**< string a > string b */ + I18N_UCOLLATOR_LESS = -1 /**< string a < string b */ } i18n_ucollator_result_e; /** @@ -1311,26 +1311,26 @@ typedef enum { * */ -typedef const void* i18n_unormalizer_h; +typedef const void *i18n_unormalizer_h; /** * @brief Enumeration of constants for normalization modes. - * For details about standard Unicode normalization forms and about the algorithms which are also used with custom mapping tables see http://www.unicode.org/unicode/reports/tr15/ + * For details about standard Unicode normalization forms and about the algorithms which are also used with custom mapping tables see http://www.unicode.org/unicode/reports/tr15/ * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UNORMALIZATION_COMPOSE, /**< Decomposition followed by composition. Same as standard NFC when using an "nfc" instance. Same as standard NFKC when using an "nfkc" instance. - For details about standard Unicode normalization forms see http://www.unicode.org/unicode/reports/tr15/ */ - I18N_UNORMALIZATION_DECOMPOSE, /**< Map and reorder canonically. Same as standard NFD when using an "nfc" instance. Same as standard NFKD when using an "nfkc" instance. - For details about standard Unicode normalization forms see http://www.unicode.org/unicode/reports/tr15/ */ - I18N_UNORMALIZATION_FCD, /**< "Fast C or D" form. If a string is in this form, then further decomposition without reordering would yield the same form as DECOMPOSE. - Text in "Fast C or D" form can be processed efficiently with data tables that are "canonically closed", - that is, that provide equivalent data for equivalent text, without having to be fully normalized. - Not a standard Unicode normalization form. Not a unique form: Different FCD strings can be canonically equivalent. - For details see http://www.unicode.org/notes/tn5/#FCD */ - I18N_UNORMALIZATION_COMPOSE_CONTIGUOUS /**< Compose only contiguously. Also known as "FCC" or "Fast C Contiguous". The result will often but not always be in NFC. - The result will conform to FCD which is useful for processing. Not a standard Unicode normalization form. - For details see http://www.unicode.org/notes/tn5/#FCC */ + I18N_UNORMALIZATION_COMPOSE, /**< Decomposition followed by composition. Same as standard NFC when using an "nfc" instance. Same as standard NFKC when using an "nfkc" instance. + For details about standard Unicode normalization forms see http://www.unicode.org/unicode/reports/tr15/ */ + I18N_UNORMALIZATION_DECOMPOSE, /**< Map and reorder canonically. Same as standard NFD when using an "nfc" instance. Same as standard NFKD when using an "nfkc" instance. + For details about standard Unicode normalization forms see http://www.unicode.org/unicode/reports/tr15/ */ + I18N_UNORMALIZATION_FCD, /**< "Fast C or D" form. If a string is in this form, then further decomposition without reordering would yield the same form as DECOMPOSE. + Text in "Fast C or D" form can be processed efficiently with data tables that are "canonically closed", + that is, that provide equivalent data for equivalent text, without having to be fully normalized. + Not a standard Unicode normalization form. Not a unique form: Different FCD strings can be canonically equivalent. + For details see http://www.unicode.org/notes/tn5/#FCD */ + I18N_UNORMALIZATION_COMPOSE_CONTIGUOUS /**< Compose only contiguously. Also known as "FCC" or "Fast C Contiguous". The result will often but not always be in NFC. + The result will conform to FCD which is useful for processing. Not a standard Unicode normalization form. + For details see http://www.unicode.org/notes/tn5/#FCC */ } i18n_unormalization_mode_e; /** @@ -1339,9 +1339,9 @@ typedef enum { * @since_tizen 2.4 */ typedef enum { - I18N_UNORMALIZATION_NO, /**< The input string is not in the normalization form. */ - I18N_UNORMALIZATION_YES, /**< The input string is in the normalization form. */ - I18N_UNORMALIZATION_MAYBE /**< The input string may or may not be in the normalization form. */ + I18N_UNORMALIZATION_NO, /**< The input string is not in the normalization form. */ + I18N_UNORMALIZATION_YES, /**< The input string is in the normalization form. */ + I18N_UNORMALIZATION_MAYBE /**< The input string may or may not be in the normalization form. */ } i18n_unormalization_check_result_e; /** @@ -1358,7 +1358,7 @@ typedef enum { * @brief i18n_usearch_h. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ -typedef void* i18n_usearch_h; +typedef void *i18n_usearch_h; /** * @} @@ -1374,7 +1374,7 @@ typedef void* i18n_usearch_h; * @brief i18n_ucalendar_h. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ -typedef void* i18n_ucalendar_h; +typedef void *i18n_ucalendar_h; /** * @brief The time zone ID reserved for unknown time zone. @@ -1387,53 +1387,53 @@ typedef void* i18n_ucalendar_h; * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCALENDAR_ERA, /**< Field number indicating the era, e.g., AD or BC in the Gregorian (Julian) calendar */ - I18N_UCALENDAR_YEAR, /**< Field number indicating the year */ - I18N_UCALENDAR_MONTH, /**< Field number indicating the month. This is a calendar-specific value. \n The first month of the year is JANUARY; - the last depends on the number of months in a year */ - I18N_UCALENDAR_WEEK_OF_YEAR, /**< Field number indicating the week number within the current year. \n - The first week of the year, as defined by the #I18N_UCALENDAR_FIRST_DAY_OF_WEEK and #I18N_UCALENDAR_MINIMAL_DAYS_IN_FIRST_WEEK attributes, has value 1. - Subclasses define the value of #I18N_UCALENDAR_WEEK_OF_YEAR for days before the first week of the year */ - I18N_UCALENDAR_WEEK_OF_MONTH, /**< Field number indicating the week number within the current month. \n - The first week of the month, as defined by the #I18N_UCALENDAR_FIRST_DAY_OF_WEEK and #I18N_UCALENDAR_MINIMAL_DAYS_IN_FIRST_WEEK attributes, has value 1. - Subclasses define the value of WEEK_OF_MONTH for days before the first week of the month */ - I18N_UCALENDAR_DATE, /**< Field number indicating the day of the month. \n This is a synonym for DAY_OF_MONTH. The first day of the month has value 1 */ - I18N_UCALENDAR_DAY_OF_YEAR, /**< Field number indicating the day number within the current year. \n The first day of the year has value 1. */ - I18N_UCALENDAR_DAY_OF_WEEK, /**< Field number indicating the day of the week. \n - This field takes values "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday" */ - I18N_UCALENDAR_DAY_OF_WEEK_IN_MONTH, /**< Field number indicating the ordinal number of the day of the week within the current month. \n - Together with the "day of week" field, this uniquely specifies a day within a month. - "day of month" 1 through 7 always correspond to "day of week in month" 1; 8 through 15 correspond to "day of week in month" 2, and so on. - "day of week in month" 0 indicates the week before "day of week in month" 1. - Negative values count back from the end of the month, so the last Sunday of a month is specified as "day of week" = "Sunday", - "day of week in month" = -1. Because negative values count backward they will usually be aligned differently within the month than positive values. - For example, if a month has 31 days, "day of week in month" -1 will overlap "day of week in month" 5 and the end of 4 */ - I18N_UCALENDAR_AM_PM, /**< Field number indicating whether the "hour" is before or after noon. \n E.g., at 10:04:15.250 PM the AM_PM is PM */ - I18N_UCALENDAR_HOUR, /**< Field number indicating the hour of the morning or afternoon. \n "hour" is used for the 12-hour clock. E.g., at 10:04:15.250 PM the "Hour" is 10 */ - I18N_UCALENDAR_HOUR_OF_DAY, /**< Field number indicating the hour of the day. \n "Hour of day" is used for the 24-hour clock. E.g., at 10:04:15.250 PM the "Hour of day" is 22 */ - I18N_UCALENDAR_MINUTE, /**< Field number indicating the minute within the hour. \n E.g., at 10:04:15.250 PM the #I18N_UCALENDAR_MINUTE is 4 */ - I18N_UCALENDAR_SECOND, /**< Field number indicating the second within the minute. \n E.g., at 10:04:15.250 PM the #I18N_UCALENDAR_SECOND is 15 */ - I18N_UCALENDAR_MILLISECOND, /**< Field number indicating the millisecond within the second. \n E.g., at 10:04:15.250 PM the #I18N_UCALENDAR_MILLISECOND is 250 */ - I18N_UCALENDAR_ZONE_OFFSET, /**< Field number indicating the raw offset from GMT in milliseconds */ - I18N_UCALENDAR_DST_OFFSET, /**< Field number indicating the daylight savings offset in milliseconds */ - I18N_UCALENDAR_YEAR_WOY, /**< Field number indicating the extended year corresponding to the #I18N_UCALENDAR_WEEK_OF_YEAR field. \n - This may be one greater or less than the value of #I18N_UCALENDAR_EXTENDED_YEAR */ - I18N_UCALENDAR_DOW_LOCAL, /**< Field number indicating the localized day of the week. \n - This will be a value from 1 to 7 inclusive, with 1 being the localized first day of the week */ - I18N_UCALENDAR_EXTENDED_YEAR, /**< Year of this calendar system, encompassing all supra-year fields. \n - For example, in Gregorian/Julian calendars, positive Extended Year values indicate years AD, 1 BC = 0 extended, 2 BC = -1 extended, and so on */ - I18N_UCALENDAR_JULIAN_DAY, /**< Field number indicating the modified Julian day number. \n - This is different from the conventional Julian day number in two regards. - First, it demarcates days at local zone midnight, rather than noon GMT. Second, it is a local number; that is, it depends on the local time zone. - It can be thought of as a single number that encompasses all the date-related fields */ - I18N_UCALENDAR_MILLISECONDS_IN_DAY, /**< Ranges from 0 to 23:59:59.999 (regardless of DST). \n - This field behaves exactly like a composite of all time-related fields, not including the zone fields. - As such, it also reflects discontinuities in those fields on DST transition days. On a day of DST onset, it will jump forward. - On a day of DST cessation, it will jump backward. - This reflects the fact that it must be combined with the DST offset field to obtain a unique local time value */ - I18N_UCALENDAR_IS_LEAP_MONTH, /**< Whether or not the current month is a leap month (0 or 1) */ - I18N_UCALENDAR_FIELD_COUNT, /**< Number of enumerators */ - I18N_UCALENDAR_DAY_OF_MONTH = I18N_UCALENDAR_DATE /**< Field number indicating the day of the month. \n This is a synonym for #I18N_UCALENDAR_DATE. The first day of the month has value 1 */ + I18N_UCALENDAR_ERA, /**< Field number indicating the era, e.g., AD or BC in the Gregorian (Julian) calendar */ + I18N_UCALENDAR_YEAR, /**< Field number indicating the year */ + I18N_UCALENDAR_MONTH, /**< Field number indicating the month. This is a calendar-specific value. \n The first month of the year is JANUARY; + the last depends on the number of months in a year */ + I18N_UCALENDAR_WEEK_OF_YEAR, /**< Field number indicating the week number within the current year. \n + The first week of the year, as defined by the #I18N_UCALENDAR_FIRST_DAY_OF_WEEK and #I18N_UCALENDAR_MINIMAL_DAYS_IN_FIRST_WEEK attributes, has value 1. + Subclasses define the value of #I18N_UCALENDAR_WEEK_OF_YEAR for days before the first week of the year */ + I18N_UCALENDAR_WEEK_OF_MONTH, /**< Field number indicating the week number within the current month. \n + The first week of the month, as defined by the #I18N_UCALENDAR_FIRST_DAY_OF_WEEK and #I18N_UCALENDAR_MINIMAL_DAYS_IN_FIRST_WEEK attributes, has value 1. + Subclasses define the value of WEEK_OF_MONTH for days before the first week of the month */ + I18N_UCALENDAR_DATE, /**< Field number indicating the day of the month. \n This is a synonym for DAY_OF_MONTH. The first day of the month has value 1 */ + I18N_UCALENDAR_DAY_OF_YEAR, /**< Field number indicating the day number within the current year. \n The first day of the year has value 1. */ + I18N_UCALENDAR_DAY_OF_WEEK, /**< Field number indicating the day of the week. \n + This field takes values "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday" */ + I18N_UCALENDAR_DAY_OF_WEEK_IN_MONTH, /**< Field number indicating the ordinal number of the day of the week within the current month. \n + Together with the "day of week" field, this uniquely specifies a day within a month. + "day of month" 1 through 7 always correspond to "day of week in month" 1; 8 through 15 correspond to "day of week in month" 2, and so on. + "day of week in month" 0 indicates the week before "day of week in month" 1. + Negative values count back from the end of the month, so the last Sunday of a month is specified as "day of week" = "Sunday", + "day of week in month" = -1. Because negative values count backward they will usually be aligned differently within the month than positive values. + For example, if a month has 31 days, "day of week in month" -1 will overlap "day of week in month" 5 and the end of 4 */ + I18N_UCALENDAR_AM_PM, /**< Field number indicating whether the "hour" is before or after noon. \n E.g., at 10:04:15.250 PM the AM_PM is PM */ + I18N_UCALENDAR_HOUR, /**< Field number indicating the hour of the morning or afternoon. \n "hour" is used for the 12-hour clock. E.g., at 10:04:15.250 PM the "Hour" is 10 */ + I18N_UCALENDAR_HOUR_OF_DAY, /**< Field number indicating the hour of the day. \n "Hour of day" is used for the 24-hour clock. E.g., at 10:04:15.250 PM the "Hour of day" is 22 */ + I18N_UCALENDAR_MINUTE, /**< Field number indicating the minute within the hour. \n E.g., at 10:04:15.250 PM the #I18N_UCALENDAR_MINUTE is 4 */ + I18N_UCALENDAR_SECOND, /**< Field number indicating the second within the minute. \n E.g., at 10:04:15.250 PM the #I18N_UCALENDAR_SECOND is 15 */ + I18N_UCALENDAR_MILLISECOND, /**< Field number indicating the millisecond within the second. \n E.g., at 10:04:15.250 PM the #I18N_UCALENDAR_MILLISECOND is 250 */ + I18N_UCALENDAR_ZONE_OFFSET, /**< Field number indicating the raw offset from GMT in milliseconds */ + I18N_UCALENDAR_DST_OFFSET, /**< Field number indicating the daylight savings offset in milliseconds */ + I18N_UCALENDAR_YEAR_WOY, /**< Field number indicating the extended year corresponding to the #I18N_UCALENDAR_WEEK_OF_YEAR field. \n + This may be one greater or less than the value of #I18N_UCALENDAR_EXTENDED_YEAR */ + I18N_UCALENDAR_DOW_LOCAL, /**< Field number indicating the localized day of the week. \n + This will be a value from 1 to 7 inclusive, with 1 being the localized first day of the week */ + I18N_UCALENDAR_EXTENDED_YEAR, /**< Year of this calendar system, encompassing all supra-year fields. \n + For example, in Gregorian/Julian calendars, positive Extended Year values indicate years AD, 1 BC = 0 extended, 2 BC = -1 extended, and so on */ + I18N_UCALENDAR_JULIAN_DAY, /**< Field number indicating the modified Julian day number. \n + This is different from the conventional Julian day number in two regards. + First, it demarcates days at local zone midnight, rather than noon GMT. Second, it is a local number; that is, it depends on the local time zone. + It can be thought of as a single number that encompasses all the date-related fields */ + I18N_UCALENDAR_MILLISECONDS_IN_DAY, /**< Ranges from 0 to 23:59:59.999 (regardless of DST). \n + This field behaves exactly like a composite of all time-related fields, not including the zone fields. + As such, it also reflects discontinuities in those fields on DST transition days. On a day of DST onset, it will jump forward. + On a day of DST cessation, it will jump backward. + This reflects the fact that it must be combined with the DST offset field to obtain a unique local time value */ + I18N_UCALENDAR_IS_LEAP_MONTH, /**< Whether or not the current month is a leap month (0 or 1) */ + I18N_UCALENDAR_FIELD_COUNT, /**< Number of enumerators */ + I18N_UCALENDAR_DAY_OF_MONTH = I18N_UCALENDAR_DATE /**< Field number indicating the day of the month. \n This is a synonym for #I18N_UCALENDAR_DATE. The first day of the month has value 1 */ } i18n_ucalendar_date_fields_e; /** @@ -1441,9 +1441,9 @@ typedef enum { * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCALENDAR_TRADITIONAL, /**< Despite the name, #I18N_UCALENDAR_TRADITIONAL designates the locale's default calendar, which may be the Gregorian calendar or some other calendar */ - I18N_UCALENDAR_DEFAULT = I18N_UCALENDAR_TRADITIONAL, /**< A better name for #I18N_UCALENDAR_TRADITIONAL */ - I18N_UCALENDAR_GREGORIAN /**< Unambiguously designates the Gregorian calendar for the locale */ + I18N_UCALENDAR_TRADITIONAL, /**< Despite the name, #I18N_UCALENDAR_TRADITIONAL designates the locale's default calendar, which may be the Gregorian calendar or some other calendar */ + I18N_UCALENDAR_DEFAULT = I18N_UCALENDAR_TRADITIONAL, /**< A better name for #I18N_UCALENDAR_TRADITIONAL */ + I18N_UCALENDAR_GREGORIAN /**< Unambiguously designates the Gregorian calendar for the locale */ } i18n_ucalendar_type_e; /** @@ -1451,18 +1451,18 @@ typedef enum { * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCALENDAR_JANUARY, /**< January */ - I18N_UCALENDAR_FEBRUARY, /**< February */ - I18N_UCALENDAR_MARCH, /**< March */ - I18N_UCALENDAR_APRIL, /**< April */ - I18N_UCALENDAR_MAY, /**< May */ - I18N_UCALENDAR_JUNE, /**< June */ - I18N_UCALENDAR_JULY, /**< July */ - I18N_UCALENDAR_AUGUST, /**< August */ - I18N_UCALENDAR_SEPTEMBER, /**< September */ - I18N_UCALENDAR_OCTOBER, /**< October */ - I18N_UCALENDAR_NOVEMBER, /**< November */ - I18N_UCALENDAR_DECEMBER /**< December */ + I18N_UCALENDAR_JANUARY, /**< January */ + I18N_UCALENDAR_FEBRUARY, /**< February */ + I18N_UCALENDAR_MARCH, /**< March */ + I18N_UCALENDAR_APRIL, /**< April */ + I18N_UCALENDAR_MAY, /**< May */ + I18N_UCALENDAR_JUNE, /**< June */ + I18N_UCALENDAR_JULY, /**< July */ + I18N_UCALENDAR_AUGUST, /**< August */ + I18N_UCALENDAR_SEPTEMBER, /**< September */ + I18N_UCALENDAR_OCTOBER, /**< October */ + I18N_UCALENDAR_NOVEMBER, /**< November */ + I18N_UCALENDAR_DECEMBER /**< December */ } i18n_ucalendar_months_e; /** @@ -1470,10 +1470,10 @@ typedef enum { * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCALENDAR_STANDARD, /**< Standard display name */ - I18N_UCALENDAR_SHORT_STANDARD, /**< Short standard display name */ - I18N_UCALENDAR_DST, /**< Daylight savings display name */ - I18N_UCALENDAR_SHORT_DST /**< Short daylight savings display name */ + I18N_UCALENDAR_STANDARD, /**< Standard display name */ + I18N_UCALENDAR_SHORT_STANDARD, /**< Short standard display name */ + I18N_UCALENDAR_DST, /**< Daylight savings display name */ + I18N_UCALENDAR_SHORT_DST /**< Short daylight savings display name */ } i18n_ucalendar_displayname_type_e; /** @@ -1481,9 +1481,9 @@ typedef enum { * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCALENDAR_LENIENT, /**< Lenient parsing */ - I18N_UCALENDAR_FIRST_DAY_OF_WEEK, /**< First day of the week */ - I18N_UCALENDAR_MINIMAL_DAYS_IN_FIRST_WEEK /**< Minimum number of days in the first week */ + I18N_UCALENDAR_LENIENT, /**< Lenient parsing */ + I18N_UCALENDAR_FIRST_DAY_OF_WEEK, /**< First day of the week */ + I18N_UCALENDAR_MINIMAL_DAYS_IN_FIRST_WEEK /**< Minimum number of days in the first week */ } i18n_ucalendar_attribute_e; /** @@ -1491,9 +1491,9 @@ typedef enum { * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCALENDAR_ZONE_TYPE_ANY, /**< Any system zones. */ - I18N_UCALENDAR_ZONE_TYPE_CANONICAL, /**< Canonical system zones. */ - I18N_UCALENDAR_ZONE_TYPE_CANONICAL_LOCATION /**< Canonical system zones associated with actual locations. */ + I18N_UCALENDAR_ZONE_TYPE_ANY, /**< Any system zones. */ + I18N_UCALENDAR_ZONE_TYPE_CANONICAL, /**< Canonical system zones. */ + I18N_UCALENDAR_ZONE_TYPE_CANONICAL_LOCATION /**< Canonical system zones associated with actual locations. */ } i18n_system_timezone_type_e; /** @@ -1501,12 +1501,12 @@ typedef enum { * @since_tizen 2.3.1 */ typedef enum { - I18N_UCALENDAR_MINIMUM, /**< Minimum value */ - I18N_UCALENDAR_MAXIMUM, /**< Maximum value */ - I18N_UCALENDAR_GREATEST_MINIMUM, /**< Greatest minimum value */ - I18N_UCALENDAR_LEAST_MAXIMUM, /**< Least maximum value */ - I18N_UCALENDAR_ACTUAL_MINIMUM, /**< Actual minimum value */ - I18N_UCALENDAR_ACTUAL_MAXIMUM /**< Actual maximum value */ + I18N_UCALENDAR_MINIMUM, /**< Minimum value */ + I18N_UCALENDAR_MAXIMUM, /**< Maximum value */ + I18N_UCALENDAR_GREATEST_MINIMUM, /**< Greatest minimum value */ + I18N_UCALENDAR_LEAST_MAXIMUM, /**< Least maximum value */ + I18N_UCALENDAR_ACTUAL_MINIMUM, /**< Actual minimum value */ + I18N_UCALENDAR_ACTUAL_MAXIMUM /**< Actual maximum value */ } i18n_ucalendar_limit_type_e; /** @@ -1514,28 +1514,28 @@ typedef enum { * @since_tizen 2.3.1 */ typedef enum { - I18N_UCALENDAR_WEEKDAY, /**< Designates a full weekday (no part of the day is included in the weekend). */ - I18N_UCALENDAR_WEEKEND, /**< Designates a full weekend day (the entire day is included in the weekend). */ - I18N_UCALENDAR_WEEKEND_ONSET, /**< Designates a day that starts as a weekday and transitions to the weekend. - Call i18n_ucalendar_get_weekend_transition() to get the time of transition. */ - I18N_UCALENDAR_WEEKEND_CEASE, /**< Designates a day that starts as the weekend and transitions to a weekday. - Call i18n_ucalendar_get_weekend_transition() to get the time of transition. */ + I18N_UCALENDAR_WEEKDAY, /**< Designates a full weekday (no part of the day is included in the weekend). */ + I18N_UCALENDAR_WEEKEND, /**< Designates a full weekend day (the entire day is included in the weekend). */ + I18N_UCALENDAR_WEEKEND_ONSET, /**< Designates a day that starts as a weekday and transitions to the weekend. + Call i18n_ucalendar_get_weekend_transition() to get the time of transition. */ + I18N_UCALENDAR_WEEKEND_CEASE, /**< Designates a day that starts as the weekend and transitions to a weekday. + Call i18n_ucalendar_get_weekend_transition() to get the time of transition. */ } i18n_ucalendar_weekday_type_e; /** * @brief Useful constants for days of week. * @details Note: Calendar day-of-week is 1-based. Clients who create locale resources for the field of first-day-of-week should be aware of this. - * For instance, in US locale, first-day-of-week is set to 1, i.e., #I18N_UCALENDAR_SUNDAY. Possible days of the week in an #i18n_ucalendar_h. + * For instance, in US locale, first-day-of-week is set to 1, i.e., #I18N_UCALENDAR_SUNDAY. Possible days of the week in an #i18n_ucalendar_h. * @since_tizen 2.3.1 */ typedef enum { - I18N_UCALENDAR_SUNDAY = 1, /**< Sunday */ - I18N_UCALENDAR_MONDAY, /**< Monday */ - I18N_UCALENDAR_TUESDAY, /**< Tuesday */ - I18N_UCALENDAR_WEDNESDAY, /**< Wednesday */ - I18N_UCALENDAR_THURSDAY, /**< Thursday */ - I18N_UCALENDAR_FRIDAY, /**< Friday */ - I18N_UCALENDAR_SATURDAY /**< Saturday */ + I18N_UCALENDAR_SUNDAY = 1, /**< Sunday */ + I18N_UCALENDAR_MONDAY, /**< Monday */ + I18N_UCALENDAR_TUESDAY, /**< Tuesday */ + I18N_UCALENDAR_WEDNESDAY, /**< Wednesday */ + I18N_UCALENDAR_THURSDAY, /**< Thursday */ + I18N_UCALENDAR_FRIDAY, /**< Friday */ + I18N_UCALENDAR_SATURDAY /**< Saturday */ } i18n_ucalendar_days_of_week_e; /** @@ -1545,10 +1545,10 @@ typedef enum { * @see i18n_ucalendar_get_timezone_transition_date() */ typedef enum { - I18N_UCALENDAR_TZ_TRANSITION_NEXT, /**< Get the next transition after the current date, i.e. excludes the current date */ - I18N_UCALENDAR_TZ_TRANSITION_NEXT_INCLUSIVE, /**< Get the next transition on or after the current date, i.e. may include the current date */ - I18N_UCALENDAR_TZ_TRANSITION_PREVIOUS, /**< Get the previous transition before the current date, i.e. excludes the current date */ - I18N_UCALENDAR_TZ_TRANSITION_PREVIOUS_INCLUSIVE, /**< Get the previous transition on or before the current date, i.e. may include the current date */ + I18N_UCALENDAR_TZ_TRANSITION_NEXT, /**< Get the next transition after the current date, i.e. excludes the current date */ + I18N_UCALENDAR_TZ_TRANSITION_NEXT_INCLUSIVE, /**< Get the next transition on or after the current date, i.e. may include the current date */ + I18N_UCALENDAR_TZ_TRANSITION_PREVIOUS, /**< Get the previous transition before the current date, i.e. excludes the current date */ + I18N_UCALENDAR_TZ_TRANSITION_PREVIOUS_INCLUSIVE, /**< Get the previous transition on or before the current date, i.e. may include the current date */ } i18n_utimezone_transition_type_e; /** @@ -1583,9 +1583,9 @@ typedef void *i18n_udate_format_h; * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef struct { - int32_t field; /**< The field. */ - int32_t beginIndex; /**< The start of the text range containing field.*/ - int32_t endIndex; /**< The limit of the text range containing field.*/ + int32_t field; /**< The field. */ + int32_t beginIndex; /**< The start of the text range containing field.*/ + int32_t endIndex; /**< The limit of the text range containing field.*/ } i18n_ufield_position_s; /** @@ -1599,18 +1599,18 @@ typedef i18n_ufield_position_s *i18n_ufield_position_h; * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UDATE_FULL, /**< Full style */ - I18N_UDATE_LONG, /**< Long style */ - I18N_UDATE_MEDIUM, /**< Medium style */ - I18N_UDATE_SHORT, /**< Short style */ - I18N_UDATE_DEFAULT = I18N_UDATE_MEDIUM, /**< Default style */ - I18N_UDATE_RELATIVE = (1 << 7), /**< Bitfield for relative date */ - I18N_UDATE_FULL_RELATIVE = I18N_UDATE_FULL | I18N_UDATE_RELATIVE, /**< #I18N_UDATE_FULL | #I18N_UDATE_RELATIVE */ - I18N_UDATE_LONG_RELATIVE = I18N_UDATE_LONG | I18N_UDATE_RELATIVE, /**< #I18N_UDATE_LONG | #I18N_UDATE_RELATIVE */ - I18N_UDATE_MEDIUM_RELATIVE = I18N_UDATE_MEDIUM | I18N_UDATE_RELATIVE, /**< #I18N_UDATE_MEDIUM | #I18N_UDATE_RELATIVE */ - I18N_UDATE_SHORT_RELATIVE = I18N_UDATE_SHORT | I18N_UDATE_RELATIVE, /**< #I18N_UDATE_SHORT | #I18N_UDATE_RELATIVE */ - I18N_UDATE_NONE = -1, /**< No style */ - I18N_UDATE_PATTERN = -2 /**< Use the pattern given in the parameter to i18n_udate_create(). */ + I18N_UDATE_FULL, /**< Full style */ + I18N_UDATE_LONG, /**< Long style */ + I18N_UDATE_MEDIUM, /**< Medium style */ + I18N_UDATE_SHORT, /**< Short style */ + I18N_UDATE_DEFAULT = I18N_UDATE_MEDIUM, /**< Default style */ + I18N_UDATE_RELATIVE = (1 << 7), /**< Bitfield for relative date */ + I18N_UDATE_FULL_RELATIVE = I18N_UDATE_FULL | I18N_UDATE_RELATIVE, /**< #I18N_UDATE_FULL | #I18N_UDATE_RELATIVE */ + I18N_UDATE_LONG_RELATIVE = I18N_UDATE_LONG | I18N_UDATE_RELATIVE, /**< #I18N_UDATE_LONG | #I18N_UDATE_RELATIVE */ + I18N_UDATE_MEDIUM_RELATIVE = I18N_UDATE_MEDIUM | I18N_UDATE_RELATIVE, /**< #I18N_UDATE_MEDIUM | #I18N_UDATE_RELATIVE */ + I18N_UDATE_SHORT_RELATIVE = I18N_UDATE_SHORT | I18N_UDATE_RELATIVE, /**< #I18N_UDATE_SHORT | #I18N_UDATE_RELATIVE */ + I18N_UDATE_NONE = -1, /**< No style */ + I18N_UDATE_PATTERN = -2 /**< Use the pattern given in the parameter to i18n_udate_create(). */ } i18n_udate_format_style_e; /** @@ -1618,41 +1618,41 @@ typedef enum { * @since_tizen 2.3.1 */ typedef enum { - I18N_UDATE_FORMAT_ERA_FIELD, /**< Era field */ - I18N_UDATE_FORMAT_YEAR_FIELD, /**< Year field */ - I18N_UDATE_FORMAT_MONTH_FIELD, /**< Month field */ - I18N_UDATE_FORMAT_DATE_FIELD, /**< Date field */ - I18N_UDATE_FORMAT_HOUR_OF_DAY1_FIELD, /**< Hour of day1 field */ - I18N_UDATE_FORMAT_HOUR_OF_DAY0_FIELD, /**< Hour of day0 field */ - I18N_UDATE_FORMAT_MINUTE_FIELD, /**< Minute field */ - I18N_UDATE_FORMAT_SECOND_FIELD, /**< Second field */ - I18N_UDATE_FORMAT_FRACTIONAL_SECOND_FIELD, /**< Fractional second field */ - I18N_UDATE_FORMAT_DAY_OF_WEEK_FIELD, /**< Day of week field */ - I18N_UDATE_FORMAT_DAY_OF_YEAR_FIELD, /**< Day of year field */ - I18N_UDATE_FORMAT_DAY_OF_WEEK_IN_MONTH_FIELD, /**< Day of week in month field */ - I18N_UDATE_FORMAT_WEEK_OF_YEAR_FIELD, /**< Week of year field */ - I18N_UDATE_FORMAT_WEEK_OF_MONTH_FIELD, /**< Week of month field */ - I18N_UDATE_FORMAT_AM_PM_FIELD, /**< a.m. / p.m. field */ - I18N_UDATE_FORMAT_HOUR1_FIELD, /**< Hour1 field */ - I18N_UDATE_FORMAT_HOUR0_FIELD, /**< Hour0 field */ - I18N_UDATE_FORMAT_TIMEZONE_FIELD, /**< Timezone field */ - I18N_UDATE_FORMAT_YEAR_WOY_FIELD, /**< Year woy field */ - I18N_UDATE_FORMAT_DOW_LOCAL_FIELD, /**< Dow local field */ - I18N_UDATE_FORMAT_EXTENDED_YEAR_FIELD, /**< Extended year field */ - I18N_UDATE_FORMAT_JULIAN_DAY_FIELD, /**< Julian day field */ - I18N_UDATE_FORMAT_MILLISECONDS_IN_DAY_FIELD, /**< Milliseconds in day field */ - I18N_UDATE_FORMAT_TIMEZONE_RFC_FIELD, /**< Timezone RFC field */ - I18N_UDATE_FORMAT_TIMEZONE_GENERIC_FIELD, /**< Timezone generic field */ - I18N_UDATE_FORMAT_STANDALONE_DAY_FIELD, /**< Standalone day field */ - I18N_UDATE_FORMAT_STANDALONE_MONTH_FIELD, /**< Standalone month field */ - I18N_UDATE_FORMAT_QUARTER_FIELD, /**< Quarter field */ - I18N_UDATE_FORMAT_STANDALONE_QUARTER_FIELD, /**< Standalone quarter field */ - I18N_UDATE_FORMAT_TIMEZONE_SPECIAL_FIELD, /**< Timezone special field */ - I18N_UDATE_FORMAT_YEAR_NAME_FIELD, /**< Year name field */ - I18N_UDATE_FORMAT_TIMEZONE_LOCALIZED_GMT_OFFSET_FIELD, /**< Timezone localized gmt offset field */ - I18N_UDATE_FORMAT_TIMEZONE_ISO_FIELD, /**< Timezone ISO field */ - I18N_UDATE_FORMAT_TIMEZONE_ISO_LOCAL_FIELD, /**< Timezone ISO local field */ - I18N_UDATE_FORMAT_FIELD_COUNT /**< Field count */ + I18N_UDATE_FORMAT_ERA_FIELD, /**< Era field */ + I18N_UDATE_FORMAT_YEAR_FIELD, /**< Year field */ + I18N_UDATE_FORMAT_MONTH_FIELD, /**< Month field */ + I18N_UDATE_FORMAT_DATE_FIELD, /**< Date field */ + I18N_UDATE_FORMAT_HOUR_OF_DAY1_FIELD, /**< Hour of day1 field */ + I18N_UDATE_FORMAT_HOUR_OF_DAY0_FIELD, /**< Hour of day0 field */ + I18N_UDATE_FORMAT_MINUTE_FIELD, /**< Minute field */ + I18N_UDATE_FORMAT_SECOND_FIELD, /**< Second field */ + I18N_UDATE_FORMAT_FRACTIONAL_SECOND_FIELD, /**< Fractional second field */ + I18N_UDATE_FORMAT_DAY_OF_WEEK_FIELD, /**< Day of week field */ + I18N_UDATE_FORMAT_DAY_OF_YEAR_FIELD, /**< Day of year field */ + I18N_UDATE_FORMAT_DAY_OF_WEEK_IN_MONTH_FIELD, /**< Day of week in month field */ + I18N_UDATE_FORMAT_WEEK_OF_YEAR_FIELD, /**< Week of year field */ + I18N_UDATE_FORMAT_WEEK_OF_MONTH_FIELD, /**< Week of month field */ + I18N_UDATE_FORMAT_AM_PM_FIELD, /**< a.m. / p.m. field */ + I18N_UDATE_FORMAT_HOUR1_FIELD, /**< Hour1 field */ + I18N_UDATE_FORMAT_HOUR0_FIELD, /**< Hour0 field */ + I18N_UDATE_FORMAT_TIMEZONE_FIELD, /**< Timezone field */ + I18N_UDATE_FORMAT_YEAR_WOY_FIELD, /**< Year woy field */ + I18N_UDATE_FORMAT_DOW_LOCAL_FIELD, /**< Dow local field */ + I18N_UDATE_FORMAT_EXTENDED_YEAR_FIELD, /**< Extended year field */ + I18N_UDATE_FORMAT_JULIAN_DAY_FIELD, /**< Julian day field */ + I18N_UDATE_FORMAT_MILLISECONDS_IN_DAY_FIELD, /**< Milliseconds in day field */ + I18N_UDATE_FORMAT_TIMEZONE_RFC_FIELD, /**< Timezone RFC field */ + I18N_UDATE_FORMAT_TIMEZONE_GENERIC_FIELD, /**< Timezone generic field */ + I18N_UDATE_FORMAT_STANDALONE_DAY_FIELD, /**< Standalone day field */ + I18N_UDATE_FORMAT_STANDALONE_MONTH_FIELD, /**< Standalone month field */ + I18N_UDATE_FORMAT_QUARTER_FIELD, /**< Quarter field */ + I18N_UDATE_FORMAT_STANDALONE_QUARTER_FIELD, /**< Standalone quarter field */ + I18N_UDATE_FORMAT_TIMEZONE_SPECIAL_FIELD, /**< Timezone special field */ + I18N_UDATE_FORMAT_YEAR_NAME_FIELD, /**< Year name field */ + I18N_UDATE_FORMAT_TIMEZONE_LOCALIZED_GMT_OFFSET_FIELD, /**< Timezone localized gmt offset field */ + I18N_UDATE_FORMAT_TIMEZONE_ISO_FIELD, /**< Timezone ISO field */ + I18N_UDATE_FORMAT_TIMEZONE_ISO_LOCAL_FIELD, /**< Timezone ISO local field */ + I18N_UDATE_FORMAT_FIELD_COUNT /**< Field count */ } i18n_udate_format_field_e; /** @@ -1660,28 +1660,28 @@ typedef enum { * @since_tizen 2.3.1 */ typedef enum { - I18N_UDATE_FORMAT_SYMBOL_TYPE_ERAS, /**< Eras */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_MONTHS, /**< Months */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_SHORT_MONTHS, /**< Short months */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_WEEKDAYS, /**< Weekdays */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_SHORT_WEEKDAYS, /**< Short weekdays */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_AM_PMS, /**< AM PMs */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_LOCALIZED_CHARS, /**< Localized chars */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_ERA_NAMES, /**< Era names */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_NARROW_MONTHS, /**< Narrow months */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_NARROW_WEEKDAYS, /**< Narrow weekdays */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_MONTHS, /**< Standalone months */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_SHORT_MONTHS, /**< Standalone short months */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_NARROW_MONTHS, /**< Standalone narrow months */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_WEEKDAYS, /**< Standalone weekdays */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_SHORT_WEEKDAYS, /**< Standalone short weekdays */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_NARROW_WEEKDAYS, /**< Standalone narrow weekdays */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_QUARTERS, /**< Quarters */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_SHORT_QUARTERS, /**< Short quarters */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_QUARTERS, /**< Standalone quarters */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_SHORT_QUARTERS, /**< Standalone short quarters */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_SHORTER_WEEKDAYS, /**< Shorter weekdays */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_SHORTER_WEEKDAYS, /**< Standalone shorter weekdays */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_ERAS, /**< Eras */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_MONTHS, /**< Months */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_SHORT_MONTHS, /**< Short months */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_WEEKDAYS, /**< Weekdays */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_SHORT_WEEKDAYS, /**< Short weekdays */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_AM_PMS, /**< AM PMs */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_LOCALIZED_CHARS, /**< Localized chars */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_ERA_NAMES, /**< Era names */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_NARROW_MONTHS, /**< Narrow months */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_NARROW_WEEKDAYS, /**< Narrow weekdays */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_MONTHS, /**< Standalone months */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_SHORT_MONTHS, /**< Standalone short months */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_NARROW_MONTHS, /**< Standalone narrow months */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_WEEKDAYS, /**< Standalone weekdays */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_SHORT_WEEKDAYS, /**< Standalone short weekdays */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_NARROW_WEEKDAYS, /**< Standalone narrow weekdays */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_QUARTERS, /**< Quarters */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_SHORT_QUARTERS, /**< Short quarters */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_QUARTERS, /**< Standalone quarters */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_SHORT_QUARTERS, /**< Standalone short quarters */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_SHORTER_WEEKDAYS, /**< Shorter weekdays */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_SHORTER_WEEKDAYS, /**< Standalone shorter weekdays */ } i18n_udate_format_symbol_type_e; /** @@ -1691,10 +1691,10 @@ typedef enum { */ typedef enum { - I18N_UDISPCTX_TYPE_DIALECT_HANDLING, /** + * \#include * * @section CAPI_BASE_UTILS_I18N_UBRK_MODULE_OVERVIEW Overview * @details Pointer to a #i18n_ubreak_iterator_h maintains a current position and scans over text returning the index of characters where boundaries occur. @@ -53,17 +53,17 @@ extern "C" { /** * @brief Opens a new #i18n_ubreak_iterator_h for locating text boundaries for a specified locale. * @details A #i18n_ubreak_iterator_h may be used for detecting character, line, word, - * and sentence breaks in text. + * and sentence breaks in text. * @remarks Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * @param[in] type The type of #i18n_ubreak_iterator_h to open: one of #I18N_UBRK_CHARACTER, #I18N_UBRK_WORD, * #I18N_UBRK_LINE, #I18N_UBRK_SENTENCE - * @param[in] locale The locale specifying the text-breaking conventions. - * If @c NULL, the default locale will be used. - * @param[in] text The text to be iterated over. May be @c NULL, then the iterator will be created without any text. - * The text can be set later with i18n_ubrk_set_text() function. - * @param[in] text_length The number of characters in text, or -1 if NULL-terminated. - * @param[out] break_iter A pointer to the #i18n_ubreak_iterator_h for the specified locale. + * @param[in] locale The locale specifying the text-breaking conventions. + * If @c NULL, the default locale will be used. + * @param[in] text The text to be iterated over. May be @c NULL, then the iterator will be created without any text. + * The text can be set later with i18n_ubrk_set_text() function. + * @param[in] text_length The number of characters in text, or -1 if NULL-terminated. + * @param[out] break_iter A pointer to the #i18n_ubreak_iterator_h for the specified locale. * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -75,14 +75,14 @@ int i18n_ubrk_create(i18n_ubreak_iterator_type_e type, const char *locale, const * @brief Opens a new #i18n_ubreak_iterator_h for locating text boundaries using specified breaking rules. * @remarks Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 - * @param[in] rules A set of rules specifying the text breaking conventions. - * @param[in] rules_length The number of characters in rules, or -1 if NULL-terminated. - * @param[in] text The text to be iterated over. May be @c NULL, in which case i18n_ubrk_set_text() is - * used to specify the text to be iterated. - * @param[in] text_length The number of characters in text, or -1 if NULL-terminated. - * @param[out] break_iter A pointer to the #i18n_ubreak_iterator_h for the specified rules. - * @param[out] parse_err Receives position and context information for any syntax errors - * detected while parsing the rules. + * @param[in] rules A set of rules specifying the text breaking conventions. + * @param[in] rules_length The number of characters in rules, or -1 if NULL-terminated. + * @param[in] text The text to be iterated over. May be @c NULL, in which case i18n_ubrk_set_text() is + * used to specify the text to be iterated. + * @param[in] text_length The number of characters in text, or -1 if NULL-terminated. + * @param[out] break_iter A pointer to the #i18n_ubreak_iterator_h for the specified rules. + * @param[out] parse_err Receives position and context information for any syntax errors + * detected while parsing the rules. * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -95,15 +95,15 @@ int i18n_ubrk_create_rules(const i18n_uchar *rules, int32_t rules_length, const * @remarks Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * @param[in] break_iter iterator to be cloned. Must not be @c NULL. - * @param[in] stack_buffer (Deprecated Since 3.0. Use NULL instead.) User allocated space for the new clone. If @c NULL new memory will be allocated. - * If buffer is not large enough, new memory will be allocated. - * Clients can use the #I18N_U_BRK_SAFECLONE_BUFFERSIZE. This will probably be enough to avoid memory allocations. + * @param[in] stack_buffer (Deprecated Since 3.0. Use NULL instead.) User allocated space for the new clone. If @c NULL new memory will be allocated. + * If buffer is not large enough, new memory will be allocated. + * Clients can use the #I18N_U_BRK_SAFECLONE_BUFFERSIZE. This will probably be enough to avoid memory allocations. * @param[in] p_buffer_size (Deprecated Since 3.0. Use NULL instead.) A pointer to size of allocated space. - * If *p_buffer_size == 0, a sufficient size for use in cloning will - * be returned ('pre-flighting') - * If *p_buffer_size is not enough for a stack-based safe clone, - * new memory will be allocated. - * @param[out] break_iter_clone A pointer to the cloned #i18n_ubreak_iterator_h. + * If *p_buffer_size == 0, a sufficient size for use in cloning will + * be returned ('pre-flighting') + * If *p_buffer_size is not enough for a stack-based safe clone, + * new memory will be allocated. + * @param[out] break_iter_clone A pointer to the cloned #i18n_ubreak_iterator_h. * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -126,9 +126,9 @@ int i18n_ubrk_destroy(i18n_ubreak_iterator_h break_iter); * @brief Sets an existing iterator to point to a new piece of text. * @remarks Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 - * @param[in] break_iter The iterator to use. Must not be @c NULL. - * @param[in] text The text to be set. Must not be @c NULL. - * @param[in] text_length The length of the text. + * @param[in] break_iter The iterator to use. Must not be @c NULL. + * @param[in] text The text to be set. Must not be @c NULL. + * @param[in] text_length The length of the text. * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -138,11 +138,11 @@ int i18n_ubrk_set_text(i18n_ubreak_iterator_h break_iter, const i18n_uchar *text /** * @brief Determines the most recently-returned text boundary. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * @param[in] break_iter The break iterator to use. Must not be @c NULL. * @return The character index most recently returned by, i18n_ubrk_next(), i18n_ubrk_previous(), - * i18n_ubrk_first(), or i18n_ubrk_last(). + * i18n_ubrk_first(), or i18n_ubrk_last(). * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ @@ -151,11 +151,11 @@ int32_t i18n_ubrk_current(const i18n_ubreak_iterator_h break_iter); /** * @brief Advances the iterator to the boundary following the current boundary. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * @param[in] break_iter The break iterator to use. Must not be @c NULL. * @return The character index of the next text boundary, or #I18N_UBRK_DONE - * if all text boundaries have been returned. + * if all text boundaries have been returned. * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ubrk_previous() @@ -165,11 +165,11 @@ int32_t i18n_ubrk_next(i18n_ubreak_iterator_h break_iter); /** * @brief Sets the iterator position to the boundary preceding the current boundary. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * @param[in] break_iter The break iterator to use. Must not be @c NULL. * @return The character index of the preceding text boundary, or #I18N_UBRK_DONE - * if all text boundaries have been returned. + * if all text boundaries have been returned. * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ubrk_next() @@ -179,7 +179,7 @@ int32_t i18n_ubrk_previous(i18n_ubreak_iterator_h break_iter); /** * @brief Sets the iterator position to zero, the start of the text being scanned. * * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * @param[in] break_iter The break iterator to use. Must not be @c NULL. * @return The new iterator position (zero). @@ -193,7 +193,7 @@ int32_t i18n_ubrk_first(i18n_ubreak_iterator_h break_iter); * @brief Sets the iterator position to the index immediately beyond the last character in the text being scanned. * @details This is not the same as the last character. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * @param[in] break_iter The break iterator to use. Must not be @c NULL. * @return The character offset immediately beyond the last character in the @@ -208,10 +208,10 @@ int32_t i18n_ubrk_last(i18n_ubreak_iterator_h break_iter); * @brief Sets the iterator position to the first boundary preceding the specified @c offset. * @details The new position is always smaller than @c offset, or #I18N_UBRK_DONE. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 - * @param[in] break_iter The break iterator to use. Must not be @c NULL. - * @param[in] offset The offset to begin scanning. + * @param[in] break_iter The break iterator to use. Must not be @c NULL. + * @param[in] offset The offset to begin scanning. * @return The text boundary preceding offset, or #I18N_UBRK_DONE. * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -223,10 +223,10 @@ int32_t i18n_ubrk_preceding(i18n_ubreak_iterator_h break_iter, int32_t offset); * @brief Advances the iterator to the first boundary following the specified @c offset. * @details The value returned is always greater than @c offset, or #I18N_UBRK_DONE. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 - * @param[in] break_iter The break iterator to use. Must not be @c NULL. - * @param[in] offset The offset to begin scanning. + * @param[in] break_iter The break iterator to use. Must not be @c NULL. + * @param[in] offset The offset to begin scanning. * @return The text boundary following offset, or #I18N_UBRK_DONE. * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -237,9 +237,9 @@ int32_t i18n_ubrk_following(i18n_ubreak_iterator_h break_iter, int32_t offset); /** * @brief Gets a locale for which text breaking information is available. * @details A #i18n_ubreak_iterator_h in a locale returned by this function will perform the correct - * text breaking for the locale. + * text breaking for the locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * @param[in] index The index of the desired locale. * @return A locale for which number text breaking information is available, or @c 0 if none. @@ -252,9 +252,9 @@ const char *i18n_ubrk_get_available(int32_t index); /** * @brief Determines how many locales have text breaking information available. * @details This function is most useful as determining the loop ending condition for - * calls to i18n_ubrk_get_available(). + * calls to i18n_ubrk_get_available(). * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * @return The number of locales for which text breaking information is available. * @exception #I18N_ERROR_NONE Successful @@ -265,9 +265,9 @@ int32_t i18n_ubrk_count_available(void); /** * @brief Returns true if the specfied position is a boundary position. * @details As a side effect, leaves the iterator pointing to the first boundary position at - * or after @c offset. + * or after @c offset. * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are - * described in Exceptions section. + * described in Exceptions section. * @since_tizen 2.3.1 * @param[in] break_iter The break iterator to use. Must not be @c NULL. * @param[in] offset The offset to check. @@ -279,14 +279,14 @@ i18n_ubool i18n_ubrk_is_boundary(i18n_ubreak_iterator_h break_iter, int32_t offs /** * @brief Returns the status from the break rule that determined the most recently - * returned break position. + * returned break position. * @details The values appear in the rule source - * within brackets, {123}, for example. For rules that do not specify a - * status, a default value of 0 is returned. - *

- * For word break iterators, the possible values are defined in enum #i18n_uchar_u_word_break_values_e. + * within brackets, {123}, for example. For rules that do not specify a + * status, a default value of 0 is returned. + *

+ * For word break iterators, the possible values are defined in enum #i18n_uchar_u_word_break_values_e. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * @param[in] break_iter The break iterator to use. Must not be @c NULL. * @return The status from the break rule that determined the most recently returned break position. @@ -297,22 +297,22 @@ int32_t i18n_ubrk_get_rule_status(i18n_ubreak_iterator_h break_iter); /** * @brief Gets the statuses from the break rules that determined the most recently - * returned break position. + * returned break position. * @details The values appear in the rule source within brackets, {123}, for example. The default status value for rules - * that do not explicitly provide one is zero. - *

- * For word break iterators, the possible values are defined in enum #i18n_uchar_u_word_break_values_e. + * that do not explicitly provide one is zero. + *

+ * For word break iterators, the possible values are defined in enum #i18n_uchar_u_word_break_values_e. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. + * Error codes are described in Exceptions section and in #i18n_error_code_e description. * * @since_tizen 2.3.1 - * @param[in] break_iter The break iterator to use. Must not be @c NULL. - * @param[out] fill_in_vec An array to be filled in with the status values. - * @param[in] capacity The length of the supplied vector. A length of zero causes - * the function to return the number of status values, in the - * normal way, without attempting to store any values. + * @param[in] break_iter The break iterator to use. Must not be @c NULL. + * @param[out] fill_in_vec An array to be filled in with the status values. + * @param[in] capacity The length of the supplied vector. A length of zero causes + * the function to return the number of status values, in the + * normal way, without attempting to store any values. * @return The number of rule status values from rules that determined - * the most recent boundary returned by the break iterator. + * the most recent boundary returned by the break iterator. * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ @@ -322,11 +322,11 @@ int32_t i18n_ubrk_get_rule_status_vec(i18n_ubreak_iterator_h break_iter, int32_t * @brief Returns the locale of the break iterator. You can choose between the valid and * the actual locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. + * Error codes are described in Exceptions section and in #i18n_error_code_e description. * * @since_tizen 2.3.1 - * @param[in] break_iter Break iterator. Must not be @c NULL. - * @param[in] type Locale type (valid or actual). + * @param[in] break_iter Break iterator. Must not be @c NULL. + * @param[in] type Locale type (valid or actual). * @return locale string * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter diff --git a/src/include/mobile/utils_i18n_ucalendar.h b/src/include/mobile/utils_i18n_ucalendar.h index a725a56..dbd8195 100644 --- a/src/include/mobile/utils_i18n_ucalendar.h +++ b/src/include/mobile/utils_i18n_ucalendar.h @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef __UTILS_I18N_UCALENDAR_H__ @@ -29,14 +29,14 @@ * @ingroup CAPI_BASE_UTILS_I18N_MODULE * @defgroup CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE Ucalendar * @brief The Ucalendar is used for converting between an udate module and a set of integer fields - * such as #I18N_UCALENDAR_YEAR, #I18N_UCALENDAR_MONTH, #I18N_UCALENDAR_DATE, #I18N_UCALENDAR_HOUR, and so on. + * such as #I18N_UCALENDAR_YEAR, #I18N_UCALENDAR_MONTH, #I18N_UCALENDAR_DATE, #I18N_UCALENDAR_HOUR, and so on. * @section CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE_HEADER Required Header - * \#include + * \#include * @section CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE_OVERVIEW Overview * @details The Ucalendar is used for converting between an udate module and a set of integer fields - * such as #I18N_UCALENDAR_YEAR, #I18N_UCALENDAR_MONTH, #I18N_UCALENDAR_DATE, #I18N_UCALENDAR_HOUR, and so on. - * (An udate module represents a specific instant in time with millisecond precision. See udate for - * information about the udate.) + * such as #I18N_UCALENDAR_YEAR, #I18N_UCALENDAR_MONTH, #I18N_UCALENDAR_DATE, #I18N_UCALENDAR_HOUR, and so on. + * (An udate module represents a specific instant in time with millisecond precision. See udate for + * information about the udate.) * * @section CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE_SAMPLE_CODE_1 Sample Code 1 * @brief Converts the given date and time to the corresponding UTC time(number of seconds that have elapsed since January 1, 1970), considering the given time zone @@ -47,66 +47,66 @@ // get time in sec from input date and time long long int _time_convert_itol(char *tzid, int y, int mon, int d, int h, int min, int s) { - long long int lli; - i18n_ucalendar_h ucal; - i18n_udate date; - int ret = I18N_ERROR_NONE; - int year, month, day, hour, minute, second; - int len; - - i18n_uchar *_tzid = NULL; - - if (tzid == NULL) { - tzid = "Etc/GMT"; - } - _tzid = (i18n_uchar*)calloc(strlen(tzid) + 1, sizeof(i18n_uchar)); - if (_tzid == NULL) { - return -1; - } - // converts 'tzid' to unicode string - i18n_ustring_copy_ua(_tzid, tzid); - - // gets length of '_tzid' - len = i18n_ustring_get_length(_tzid); - // creates i18n_ucalendar_h - ret = i18n_ucalendar_create(_tzid, len, "en_US", I18N_UCALENDAR_TRADITIONAL, &ucal); - if (ret) { - dlog_print(DLOG_INFO, LOG_TAG, "i18n_ucalendar_create failed.\n"); - return -1; - } - - // sets i18n_ucalendar_h's date - i18n_ucalendar_set_date_time(ucal, y, mon-1, d, h, min, s); - - // gets the current value of a field from i18n_ucalendar_h - i18n_ucalendar_get(ucal, I18N_UCALENDAR_YEAR, &year); - i18n_ucalendar_get(ucal, I18N_UCALENDAR_MONTH, &month); - i18n_ucalendar_get(ucal, I18N_UCALENDAR_DATE, &day); - i18n_ucalendar_get(ucal, I18N_UCALENDAR_HOUR, &hour); - i18n_ucalendar_get(ucal, I18N_UCALENDAR_MINUTE, &minute); - i18n_ucalendar_get(ucal, I18N_UCALENDAR_SECOND, &second); - dlog_print(DLOG_INFO, LOG_TAG, "Date from ucal, year:%d month:%d day:%d hour:%d minute:%d second:%d.\n",year, month, day, hour, minute, second); - - // gets i18n_ucalendar's current time and converts it from milliseconds to seconds - i18n_ucalendar_get_milliseconds(ucal, &date); - lli = ms2sec(date); - // destroys i18n_ucalendar_h - i18n_ucalendar_destroy(ucal); - if (_tzid) { - free(_tzid); - } - - return lli; + long long int lli; + i18n_ucalendar_h ucal; + i18n_udate date; + int ret = I18N_ERROR_NONE; + int year, month, day, hour, minute, second; + int len; + + i18n_uchar *_tzid = NULL; + + if (tzid == NULL) { + tzid = "Etc/GMT"; + } + _tzid = (i18n_uchar*)calloc(strlen(tzid) + 1, sizeof(i18n_uchar)); + if (_tzid == NULL) { + return -1; + } + // converts 'tzid' to unicode string + i18n_ustring_copy_ua(_tzid, tzid); + + // gets length of '_tzid' + len = i18n_ustring_get_length(_tzid); + // creates i18n_ucalendar_h + ret = i18n_ucalendar_create(_tzid, len, "en_US", I18N_UCALENDAR_TRADITIONAL, &ucal); + if (ret) { + dlog_print(DLOG_INFO, LOG_TAG, "i18n_ucalendar_create failed.\n"); + return -1; + } + + // sets i18n_ucalendar_h's date + i18n_ucalendar_set_date_time(ucal, y, mon-1, d, h, min, s); + + // gets the current value of a field from i18n_ucalendar_h + i18n_ucalendar_get(ucal, I18N_UCALENDAR_YEAR, &year); + i18n_ucalendar_get(ucal, I18N_UCALENDAR_MONTH, &month); + i18n_ucalendar_get(ucal, I18N_UCALENDAR_DATE, &day); + i18n_ucalendar_get(ucal, I18N_UCALENDAR_HOUR, &hour); + i18n_ucalendar_get(ucal, I18N_UCALENDAR_MINUTE, &minute); + i18n_ucalendar_get(ucal, I18N_UCALENDAR_SECOND, &second); + dlog_print(DLOG_INFO, LOG_TAG, "Date from ucal, year:%d month:%d day:%d hour:%d minute:%d second:%d.\n",year, month, day, hour, minute, second); + + // gets i18n_ucalendar's current time and converts it from milliseconds to seconds + i18n_ucalendar_get_milliseconds(ucal, &date); + lli = ms2sec(date); + // destroys i18n_ucalendar_h + i18n_ucalendar_destroy(ucal); + if (_tzid) { + free(_tzid); + } + + return lli; } * @endcode * * @section CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE_SAMPLE_CODE_2 Sample Code 2 * @brief Describes an example that uses _time_convert_itol from 'Sample Code 2' * @code - // converts the given time to UTC time(number of seconds that have elapsed since January 1, 1970) - long long int time = _time_convert_itol("Etc/GMT", 2014, 5, 28, 15, 14, 0); - dlog_print(DLOG_INFO, LOG_TAG, "Time Zone: %s\t, %d/%d/%d/%d/%d/%d\n", "Etc/GMT", 2014, 5, 28, 15, 14, 0); - dlog_print(DLOG_INFO, LOG_TAG, "_time_convert_itol test : %lld\n", time); + // converts the given time to UTC time(number of seconds that have elapsed since January 1, 1970) + long long int time = _time_convert_itol("Etc/GMT", 2014, 5, 28, 15, 14, 0); + dlog_print(DLOG_INFO, LOG_TAG, "Time Zone: %s\t, %d/%d/%d/%d/%d/%d\n", "Etc/GMT", 2014, 5, 28, 15, 14, 0); + dlog_print(DLOG_INFO, LOG_TAG, "_time_convert_itol test : %lld\n", time); * @endcode */ @@ -154,17 +154,17 @@ int i18n_ucalendar_get_now(i18n_udate *date); * @remarks Must release @a calendar using i18n_ucalendar_destroy(). * * @param[in] zone_id The desired TimeZone ID \n - * If @c 0, use the default time zone. + * If @c 0, use the default time zone. * @param[in] len The length of the zone ID, - * otherwise @c -1 if null-terminated + * otherwise @c -1 if null-terminated * @param[in] locale The desired locale - * If @c NULL, the default locale will be used. + * If @c NULL, the default locale will be used. * @param[in] type The type of #I18N_UCALENDAR_DEFAULT to create \n - * This can be #I18N_UCALENDAR_GREGORIAN to create the Gregorian + * This can be #I18N_UCALENDAR_GREGORIAN to create the Gregorian * calendar for the locale, or #I18N_UCALENDAR_DEFAULT to create the default calendar for the locale (the * default calendar may also be Gregorian). * @param[out] calendar A pointer to an #i18n_ucalendar_h, - * otherwise @c 0 if an error occurs + * otherwise @c 0 if an error occurs * * @return An #i18n_error_code_e error code * @retval #I18N_ERROR_NONE Successful @@ -201,14 +201,14 @@ int i18n_ucalendar_clone(const i18n_ucalendar_h cal, i18n_ucalendar_h *identical * @details A display name is suitable for presentation to a user. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[in] calendar The #i18n_ucalendar_h to query - * @param[in] type The desired display name format \n - * One of #I18N_UCALENDAR_STANDARD, #I18N_UCALENDAR_SHORT_STANDARD, #I18N_UCALENDAR_DST, or #I18N_UCALENDAR_SHORT_DST - * @param[in] locale The desired locale for the display name - * @param[out] result A pointer to a buffer to receive the formatted number + * @param[in] calendar The #i18n_ucalendar_h to query + * @param[in] type The desired display name format \n + * One of #I18N_UCALENDAR_STANDARD, #I18N_UCALENDAR_SHORT_STANDARD, #I18N_UCALENDAR_DST, or #I18N_UCALENDAR_SHORT_DST + * @param[in] locale The desired locale for the display name + * @param[out] result A pointer to a buffer to receive the formatted number * @param[in] result_len The maximum size of the result * @param[out] buf_size_needed The total buffer size needed \n - * If greater than @a result_len, the output is truncated + * If greater than @a result_len, the output is truncated * * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -222,7 +222,7 @@ int i18n_ucalendar_get_timezone_displayname(const i18n_ucalendar_h calendar, i18 * * @param[in] calendar The #i18n_ucalendar_h to query * @param[out] is_in If @c true @a calendar is currently in daylight savings time, - * otherwise @c false + * otherwise @c false * * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -236,7 +236,7 @@ int i18n_ucalendar_is_in_daylight_time(const i18n_ucalendar_h calendar, i18n_ubo * * @param[in] cal The #i18n_ucalendar_h to modify * @param[in] field The field to set \n - * One of #I18N_UCALENDAR_ERA, #I18N_UCALENDAR_YEAR, + * One of #I18N_UCALENDAR_ERA, #I18N_UCALENDAR_YEAR, * #I18N_UCALENDAR_MONTH, #I18N_UCALENDAR_WEEK_OF_YEAR, #I18N_UCALENDAR_WEEK_OF_MONTH, * #I18N_UCALENDAR_DATE, #I18N_UCALENDAR_DAY_OF_YEAR, #I18N_UCALENDAR_DAY_OF_WEEK, * #I18N_UCALENDAR_DAY_OF_WEEK_IN_MONTH, #I18N_UCALENDAR_AM_PM, #I18N_UCALENDAR_HOUR, @@ -256,7 +256,7 @@ int i18n_ucalendar_set(i18n_ucalendar_h cal, i18n_ucalendar_date_fields_e field, * * @param[in] calendar The #i18n_ucalendar_h to modify * @param[in] attr The desired attribute \n - * One of #I18N_UCALENDAR_LENIENT, #I18N_UCALENDAR_FIRST_DAY_OF_WEEK, + * One of #I18N_UCALENDAR_LENIENT, #I18N_UCALENDAR_FIRST_DAY_OF_WEEK, * or #I18N_UCALENDAR_MINIMAL_DAYS_IN_FIRST_WEEK. * * @param[in] val The new value of @a attr @@ -274,7 +274,7 @@ int i18n_ucalendar_set_attribute(i18n_ucalendar_h calendar, i18n_ucalendar_attri * * @param[in] calendar The i18n_ucalendar to query * @param[in] attr The desired attribute \n - * One of #I18N_UCALENDAR_LENIENT, #I18N_UCALENDAR_FIRST_DAY_OF_WEEK, + * One of #I18N_UCALENDAR_LENIENT, #I18N_UCALENDAR_FIRST_DAY_OF_WEEK, * or #I18N_UCALENDAR_MINIMAL_DAYS_IN_FIRST_WEEK. * * @param[out] val The value of @a attr @@ -321,8 +321,8 @@ int i18n_ucalendar_set_milliseconds(i18n_ucalendar_h calendar, i18n_udate millis * @param[in] calendar The #i18n_ucalendar_h to set * @param[in] year The desired year * @param[in] month The desired month\n - * One of #I18N_UCALENDAR_JANUARY, #I18N_UCALENDAR_FEBRUARY, #I18N_UCALENDAR_MARCH, #I18N_UCALENDAR_APRIL, #I18N_UCALENDAR_MAY, - * #I18N_UCALENDAR_JUNE, #I18N_UCALENDAR_JULY, #I18N_UCALENDAR_AUGUST, #I18N_UCALENDAR_SEPTEMBER, #I18N_UCALENDAR_OCTOBER, #I18N_UCALENDAR_NOVEMBER, or #I18N_UCALENDAR_DECEMBER + * One of #I18N_UCALENDAR_JANUARY, #I18N_UCALENDAR_FEBRUARY, #I18N_UCALENDAR_MARCH, #I18N_UCALENDAR_APRIL, #I18N_UCALENDAR_MAY, + * #I18N_UCALENDAR_JUNE, #I18N_UCALENDAR_JULY, #I18N_UCALENDAR_AUGUST, #I18N_UCALENDAR_SEPTEMBER, #I18N_UCALENDAR_OCTOBER, #I18N_UCALENDAR_NOVEMBER, or #I18N_UCALENDAR_DECEMBER * @param[in] date The desired day of the month * @param[in] hour The desired hour of the day * @param[in] min The desired minute @@ -361,8 +361,8 @@ int i18n_ucalendar_is_equivalent_to(const i18n_ucalendar_h calendar1, const i18n * #I18N_UCALENDAR_DAY_OF_WEEK_IN_MONTH, #I18N_UCALENDAR_AM_PM, #I18N_UCALENDAR_HOUR, #I18N_UCALENDAR_HOUR_OF_DAY, #I18N_UCALENDAR_MINUTE, #I18N_UCALENDAR_SECOND, * #I18N_UCALENDAR_MILLISECOND. * @param[in] amount The signed amount to add to the field \n - * If the amount causes the value to exceed to maximum or minimum values for that field, - * other fields are modified to preserve the magnitude of the change. + * If the amount causes the value to exceed to maximum or minimum values for that field, + * other fields are modified to preserve the magnitude of the change. * * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -388,32 +388,32 @@ int i18n_ucalendar_add(i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e f int i18n_ucalendar_get(const i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, int32_t *val); -// Newly Added APIs +/* Newly Added APIs */ /** * @brief Returns the difference between the target time and the time this calendar object is currently set to. * @details If the target time is after the current calendar setting, the the returned value will be positive. - * The field parameter specifies the units of the return value. - * For example, if field is I18N_UCALENDAR_MONTH and i18n_ucalendar_get_field_difference returns 3, - * then the target time is 3 to less than 4 months after the current calendar setting.
- * As a side effect of this call, this calendar is advanced toward target by the given amount. - * That is, calling this function has the side effect of calling i18n_ucalendar_add on this calendar with the - * specified field and an amount equal to the return value from this function.
- * A typical way of using this function is to call it first with the largest field of interest, then with progressively smaller fields. + * The field parameter specifies the units of the return value. + * For example, if field is I18N_UCALENDAR_MONTH and i18n_ucalendar_get_field_difference returns 3, + * then the target time is 3 to less than 4 months after the current calendar setting.
+ * As a side effect of this call, this calendar is advanced toward target by the given amount. + * That is, calling this function has the side effect of calling i18n_ucalendar_add on this calendar with the + * specified field and an amount equal to the return value from this function.
+ * A typical way of using this function is to call it first with the largest field of interest, then with progressively smaller fields. * @since_tizen 2.3.1 * * @param[in] calendar The i18n_ucalendar_h to compare and update. * @param[in] target The target date to compare to the current calendar setting. - * @param[in] field One of #I18N_UCALENDAR_ERA, #I18N_UCALENDAR_YEAR, #I18N_UCALENDAR_MONTH, - * #I18N_UCALENDAR_WEEK_OF_YEAR, #I18N_UCALENDAR_WEEK_OF_MONTH, #I18N_UCALENDAR_DATE, - * #I18N_UCALENDAR_DAY_OF_YEAR, #I18N_UCALENDAR_DAY_OF_WEEK, #I18N_UCALENDAR_DAY_OF_WEEK_IN_MONTH, - * #I18N_UCALENDAR_AM_PM, #I18N_UCALENDAR_HOUR, #I18N_UCALENDAR_HOUR_OF_DAY, #I18N_UCALENDAR_MINUTE, - * #I18N_UCALENDAR_SECOND, #I18N_UCALENDAR_MILLISECOND. - * Please note that the returned value type is int32_t. In case of #I18N_UCALENDAR_MILLISECOND, maximal - * difference between dates may be equal to the maximal value of the int32_t, which is 2147483647 (about one month difference). - * If the difference is bigger, then the #I18N_ERROR_INVALID_PARAMETER error will be returned. + * @param[in] field One of #I18N_UCALENDAR_ERA, #I18N_UCALENDAR_YEAR, #I18N_UCALENDAR_MONTH, + * #I18N_UCALENDAR_WEEK_OF_YEAR, #I18N_UCALENDAR_WEEK_OF_MONTH, #I18N_UCALENDAR_DATE, + * #I18N_UCALENDAR_DAY_OF_YEAR, #I18N_UCALENDAR_DAY_OF_WEEK, #I18N_UCALENDAR_DAY_OF_WEEK_IN_MONTH, + * #I18N_UCALENDAR_AM_PM, #I18N_UCALENDAR_HOUR, #I18N_UCALENDAR_HOUR_OF_DAY, #I18N_UCALENDAR_MINUTE, + * #I18N_UCALENDAR_SECOND, #I18N_UCALENDAR_MILLISECOND. + * Please note that the returned value type is int32_t. In case of #I18N_UCALENDAR_MILLISECOND, maximal + * difference between dates may be equal to the maximal value of the int32_t, which is 2147483647 (about one month difference). + * If the difference is bigger, then the #I18N_ERROR_INVALID_PARAMETER error will be returned. * @param[out] status A pointer to an i18n_error_code_e to receive any errors * * @return The date difference for the specified field. @@ -426,12 +426,12 @@ int32_t i18n_ucalendar_get_field_difference(i18n_ucalendar_h calendar, i18n_udat * * @param[in] zone_type The system time zone type. * @param[in] region The ISO 3166 two-letter country code or UN M.49 three-digit - * area code. When @c NULL, no filtering done by region. + * area code. When @c NULL, no filtering done by region. * @param[in] raw_offset An offset from GMT in milliseconds, ignoring the effect - * of daylight savings time, if any. When @c NULL, no filtering done by zone offset. + * of daylight savings time, if any. When @c NULL, no filtering done by zone offset. * * @param[out] enumeration A Pointer to the enumeration object that the caller must dispose of using - * i18n_uenumeration_destroy(), or@c NULL upon failure. + * i18n_uenumeration_destroy(), or@c NULL upon failure. * * @return Error code. Error codes not listed below are described in #i18n_error_code_e * @retval #I18N_ERROR_NONE Successful @@ -444,13 +444,13 @@ int i18n_ucalendar_timezone_id_enumeration_create(i18n_system_timezone_type_e zo * @since_tizen 2.3.1 * * @param[out] enumeration A pointer to the enumeration object that the caller must dispose of using - * i18n_uenumeration_destroy(), or @c NULL upon failure. + * i18n_uenumeration_destroy(), or @c NULL upon failure. * * @return Error code. Error codes not listed below are described in #i18n_error_code_e * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_timezones_create(i18n_uenumeration_h * enumeration); +int i18n_ucalendar_timezones_create(i18n_uenumeration_h *enumeration); /** * @brief Creates an enumeration over all time zones associated with the given country. @@ -460,25 +460,25 @@ int i18n_ucalendar_timezones_create(i18n_uenumeration_h * enumeration); * @param[in] country The ISO 3166 two-letter country code, or @c NULL to retrieve zones not affiliated with any country * * @param[out] enumeration A pointer to the enumeration object that the caller must dispose of using - * i18n_uenumeration_destroy(), or @c NULL upon failure. + * i18n_uenumeration_destroy(), or @c NULL upon failure. * * @return Error code. Error codes not listed below are described in #i18n_error_code_e * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_country_timezones_create(const char *country, i18n_uenumeration_h * enumeration); +int i18n_ucalendar_country_timezones_create(const char *country, i18n_uenumeration_h *enumeration); /** * @brief Returns the default time zone. * @details The default is determined initially by querying the host operating system. - * It may be changed with i18n_ucalendar_set_default_timezone() - * or with the C++ TimeZone API. + * It may be changed with i18n_ucalendar_set_default_timezone() + * or with the C++ TimeZone API. * @remarks The specific error code can be obtained using the get_last_result() - * method. Error codes are described in #i18n_error_code_e description. + * method. Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[out] result A buffer to receive the result, or @c NULL - * @param[in] result_capacity The capacity of the @c result buffer + * @param[in] result_capacity The capacity of the @c result buffer * * @return The @c result string length, not including the terminating @c NULL. * @exception #I18N_ERROR_NONE Successful @@ -504,8 +504,8 @@ int i18n_ucalendar_set_timezone(i18n_ucalendar_h calendar, const i18n_uchar *zon /** * @brief Gets the ID of the calendar's time zone. * @remarks The specific error code can be obtained using the get_last_result() - * method. Error codes are described in Exceptions section and - * #i18n_error_code_e description. + * method. Error codes are described in Exceptions section and + * #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[in] calendar The #i18n_ucalendar_h to query. @@ -521,11 +521,11 @@ int32_t i18n_ucalendar_get_timezone_id(const i18n_ucalendar_h calendar, i18n_uch /** * @brief Sets the Gregorian Calendar change date. * @details This is the point when the switch from Julian dates to Gregorian dates - * occurred. Default is 00:00:00 local time, October 15, 1582. - * Previous to this time and date will be Julian dates. - * This function works only for Gregorian calendars. If the #i18n_ucalendar_h - * is not an instance of a Gregorian calendar, then a - * #I18N_ERROR_NOT_SUPPORTED error code is set. + * occurred. Default is 00:00:00 local time, October 15, 1582. + * Previous to this time and date will be Julian dates. + * This function works only for Gregorian calendars. If the #i18n_ucalendar_h + * is not an instance of a Gregorian calendar, then a + * #I18N_ERROR_NOT_SUPPORTED error code is set. * @since_tizen 2.3.1 * * @param[in] calendar The calendar object. @@ -542,11 +542,11 @@ int i18n_ucalendar_set_gregorian_change(i18n_ucalendar_h calendar, i18n_udate da /** * @brief Gets the Gregorian Calendar change date. * @details This is the point when the switch from Julian dates to Gregorian dates - * occurred. Default is 00:00:00 local time, October 15, 1582. - * Previous to this time and date will be Julian dates. - * This function works only for Gregorian calendars. If the #i18n_ucalendar_h - * is not an instance of a Gregorian calendar, then a - * #I18N_ERROR_NOT_SUPPORTED error code is set. + * occurred. Default is 00:00:00 local time, October 15, 1582. + * Previous to this time and date will be Julian dates. + * This function works only for Gregorian calendars. If the #i18n_ucalendar_h + * is not an instance of a Gregorian calendar, then a + * #I18N_ERROR_NOT_SUPPORTED error code is set. * @since_tizen 2.3.1 * * @param[in] calendar The calendar object. @@ -563,9 +563,9 @@ int i18n_ucalendar_get_gregorian_change(const i18n_ucalendar_h calendar, i18n_ud /** * @brief Gets a locale for which calendars are available. * @details A #i18n_ucalendar_h in a locale returned by this function will contain - * the correct day and month names for the locale. + * the correct day and month names for the locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * * @param[in] locale_index The index of the desired locale. @@ -575,13 +575,13 @@ int i18n_ucalendar_get_gregorian_change(const i18n_ucalendar_h calendar, i18n_ud * @exception #I18N_ERROR_INVALID_PARAMETER Invalid parameter * @see i18n_ucalendar_count_available() */ -const char * i18n_ucalendar_get_available(int32_t locale_index); +const char *i18n_ucalendar_get_available(int32_t locale_index); /** * @brief Determines how many locales have calendars available. * @details This function is most useful as determining the loop ending condition for calls to i18n_ucalendar_get_available(). * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * * @return The number of locales for which calendars are available. @@ -598,8 +598,8 @@ int32_t i18n_ucalendar_count_available(void); * @param[in] calendar The #i18n_ucalendar_h to set. * @param[in] year The desired year. * @param[in] month The desired month; one of #I18N_UCALENDAR_JANUARY, #I18N_UCALENDAR_FEBRUARY, #I18N_UCALENDAR_MARCH, - * #I18N_UCALENDAR_APRIL, #I18N_UCALENDAR_MAY, #I18N_UCALENDAR_JUNE, #I18N_UCALENDAR_JULY, #I18N_UCALENDAR_AUGUST, - * #I18N_UCALENDAR_SEPTEMBER, #I18N_UCALENDAR_OCTOBER, #I18N_UCALENDAR_NOVEMBER, #I18N_UCALENDAR_DECEMBER + * #I18N_UCALENDAR_APRIL, #I18N_UCALENDAR_MAY, #I18N_UCALENDAR_JUNE, #I18N_UCALENDAR_JULY, #I18N_UCALENDAR_AUGUST, + * #I18N_UCALENDAR_SEPTEMBER, #I18N_UCALENDAR_OCTOBER, #I18N_UCALENDAR_NOVEMBER, #I18N_UCALENDAR_DECEMBER * @param[in] date The desired day of the month. * * @return Error code. Error codes not listed below are described in #i18n_error_code_e @@ -616,29 +616,29 @@ int i18n_ucalendar_set_date(i18n_ucalendar_h calendar, int32_t year, int32_t mon /** * @brief Adds a specified signed amount to a particular field in a #i18n_ucalendar_h. * @details This will not modify more significant fields in the calendar. - * Rolling by a positive value always means moving forward in time - * (unless the limit of the field is reached, in which case it may pin or wrap), - * so for Gregorian calendar, starting with 100 BC and - * rolling the year by +1 results in 99 BC. - * When eras have a definite beginning and end (as in the Chinese calendar, - * or as in most eras in the Japanese calendar) then rolling the year past either - * limit of the era will cause the year to wrap around. When eras only have a limit at one end, - * then attempting to roll the year past that limit will result in pinning the year at that limit. - * Note that for most calendars in which era 0 years move forward in time (such as Buddhist, Hebrew, or Islamic), - * it is possible for add or roll to result in negative years for era 0 (that is the - * only way to represent years before the calendar epoch). + * Rolling by a positive value always means moving forward in time + * (unless the limit of the field is reached, in which case it may pin or wrap), + * so for Gregorian calendar, starting with 100 BC and + * rolling the year by +1 results in 99 BC. + * When eras have a definite beginning and end (as in the Chinese calendar, + * or as in most eras in the Japanese calendar) then rolling the year past either + * limit of the era will cause the year to wrap around. When eras only have a limit at one end, + * then attempting to roll the year past that limit will result in pinning the year at that limit. + * Note that for most calendars in which era 0 years move forward in time (such as Buddhist, Hebrew, or Islamic), + * it is possible for add or roll to result in negative years for era 0 (that is the + * only way to represent years before the calendar epoch). * @since_tizen 2.3.1 * * @param[in] calendar The #i18n_ucalendar_h to which to add. * @param[in] field The field to which to add the signed value; one of #I18N_UCALENDAR_ERA, - * #I18N_UCALENDAR_YEAR, #I18N_UCALENDAR_MONTH, #I18N_UCALENDAR_WEEK_OF_YEAR, - * #I18N_UCALENDAR_WEEK_OF_MONTH, #I18N_UCALENDAR_DATE, #I18N_UCALENDAR_DAY_OF_YEAR, - * #I18N_UCALENDAR_DAY_OF_WEEK, #I18N_UCALENDAR_DAY_OF_WEEK_IN_MONTH, #I18N_UCALENDAR_AM_PM, - * #I18N_UCALENDAR_HOUR, #I18N_UCALENDAR_HOUR_OF_DAY, #I18N_UCALENDAR_MINUTE, - * #I18N_UCALENDAR_SECOND, #I18N_UCALENDAR_MILLISECOND. + * #I18N_UCALENDAR_YEAR, #I18N_UCALENDAR_MONTH, #I18N_UCALENDAR_WEEK_OF_YEAR, + * #I18N_UCALENDAR_WEEK_OF_MONTH, #I18N_UCALENDAR_DATE, #I18N_UCALENDAR_DAY_OF_YEAR, + * #I18N_UCALENDAR_DAY_OF_WEEK, #I18N_UCALENDAR_DAY_OF_WEEK_IN_MONTH, #I18N_UCALENDAR_AM_PM, + * #I18N_UCALENDAR_HOUR, #I18N_UCALENDAR_HOUR_OF_DAY, #I18N_UCALENDAR_MINUTE, + * #I18N_UCALENDAR_SECOND, #I18N_UCALENDAR_MILLISECOND. * @param[in] amount The signed amount to add to the @c field. If the amount causes the - * value to exceed to maximum or minimum values for that field, the field is pinned - * to a permissible value. + * value to exceed to maximum or minimum values for that field, the field is pinned + * to a permissible value. * * @return Error code. Error codes not listed below are described in #i18n_error_code_e * @retval #I18N_ERROR_NONE Successful @@ -652,11 +652,11 @@ int i18n_ucalendar_roll(i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e * @brief Determines if a field in a #i18n_ucalendar_h is set. * @details All fields are represented as 32-bit integers. * @remarks The specific error code can be obtained using the get_last_result() - * method. Error codes are described in Exceptions section. + * method. Error codes are described in Exceptions section. * @since_tizen 2.3.1 * * @param[in] calendar The #i18n_ucalendar_h to query. - * @param[in] field The desired field. + * @param[in] field The desired field. * * @return @c true if field is set, @c false otherwise. * @exception #I18N_ERROR_NONE Successful @@ -675,7 +675,7 @@ i18n_ubool i18n_ucalendar_is_set(const i18n_ucalendar_h calendar, i18n_ucalendar * @since_tizen 2.3.1 * * @param[in] calendar The #i18n_ucalendar_h containing the field to clear. - * @param[in] field The field to clear. + * @param[in] field The field to clear. * * @return Error code * @retval #I18N_ERROR_NONE Successful @@ -710,21 +710,21 @@ int i18n_ucalendar_clear(i18n_ucalendar_h calendar); * @brief Determines a limit for a field in an #i18n_ucalendar_h. * @details A limit is a maximum or minimum value for a field. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[in] calendar The #i18n_ucalendar_h to query. - * @param[in] field The desired field; one of #I18N_UCALENDAR_ERA, #I18N_UCALENDAR_YEAR, #I18N_UCALENDAR_MONTH, - * #I18N_UCALENDAR_WEEK_OF_YEAR, #I18N_UCALENDAR_WEEK_OF_MONTH, #I18N_UCALENDAR_DATE, - * #I18N_UCALENDAR_DAY_OF_YEAR, #I18N_UCALENDAR_DAY_OF_WEEK, #I18N_UCALENDAR_DAY_OF_WEEK_IN_MONTH, - * #I18N_UCALENDAR_AM_PM, #I18N_UCALENDAR_HOUR, #I18N_UCALENDAR_HOUR_OF_DAY, - * #I18N_UCALENDAR_MINUTE, #I18N_UCALENDAR_SECOND, #I18N_UCALENDAR_MILLISECOND, - * #I18N_UCALENDAR_ZONE_OFFSET, #I18N_UCALENDAR_DST_OFFSET, #I18N_UCALENDAR_YEAR_WOY, - * #I18N_UCALENDAR_DOW_LOCAL, #I18N_UCALENDAR_EXTENDED_YEAR, #I18N_UCALENDAR_JULIAN_DAY, - * #I18N_UCALENDAR_MILLISECONDS_IN_DAY, #I18N_UCALENDAR_IS_LEAP_MONTH. - * @param[in] type The desired critical point; one of #I18N_UCALENDAR_MINIMUM, #I18N_UCALENDAR_MAXIMUM, - * #I18N_UCALENDAR_GREATEST_MINIMUM, #I18N_UCALENDAR_LEAST_MAXIMUM, - * #I18N_UCALENDAR_ACTUAL_MINIMUM, #I18N_UCALENDAR_ACTUAL_MAXIMUM. + * @param[in] field The desired field; one of #I18N_UCALENDAR_ERA, #I18N_UCALENDAR_YEAR, #I18N_UCALENDAR_MONTH, + * #I18N_UCALENDAR_WEEK_OF_YEAR, #I18N_UCALENDAR_WEEK_OF_MONTH, #I18N_UCALENDAR_DATE, + * #I18N_UCALENDAR_DAY_OF_YEAR, #I18N_UCALENDAR_DAY_OF_WEEK, #I18N_UCALENDAR_DAY_OF_WEEK_IN_MONTH, + * #I18N_UCALENDAR_AM_PM, #I18N_UCALENDAR_HOUR, #I18N_UCALENDAR_HOUR_OF_DAY, + * #I18N_UCALENDAR_MINUTE, #I18N_UCALENDAR_SECOND, #I18N_UCALENDAR_MILLISECOND, + * #I18N_UCALENDAR_ZONE_OFFSET, #I18N_UCALENDAR_DST_OFFSET, #I18N_UCALENDAR_YEAR_WOY, + * #I18N_UCALENDAR_DOW_LOCAL, #I18N_UCALENDAR_EXTENDED_YEAR, #I18N_UCALENDAR_JULIAN_DAY, + * #I18N_UCALENDAR_MILLISECONDS_IN_DAY, #I18N_UCALENDAR_IS_LEAP_MONTH. + * @param[in] type The desired critical point; one of #I18N_UCALENDAR_MINIMUM, #I18N_UCALENDAR_MAXIMUM, + * #I18N_UCALENDAR_GREATEST_MINIMUM, #I18N_UCALENDAR_LEAST_MAXIMUM, + * #I18N_UCALENDAR_ACTUAL_MINIMUM, #I18N_UCALENDAR_ACTUAL_MAXIMUM. * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -737,8 +737,8 @@ int32_t i18n_ucalendar_get_limit(const i18n_ucalendar_h calendar, i18n_ucalendar * @brief Gets the locale for this @c calendar object. * @details You can choose between valid and actual locale. * @remarks The specific error code can be obtained using the get_last_result() - * method. Error codes are described in Exceptions section and - * #i18n_error_code_e description. + * method. Error codes are described in Exceptions section and + * #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[in] calendar The calendar object @@ -753,7 +753,7 @@ const char *i18n_ucalendar_get_locale_by_type(const i18n_ucalendar_h calendar, i /** * @brief Returns the timezone data version currently used by ICU. * @remarks The specific error code can be obtained using the get_last_result() - * method. Error codes are described in #i18n_error_code_e description. + * method. Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * * @return The version string, such as "2007f". @@ -764,8 +764,8 @@ const char *i18n_ucalendar_get_tz_data_version(void); /** * @brief Returns the canonical system timezone ID or the normalized custom time zone ID for the given time zone ID. * @remarks The specific error code can be obtained using the get_last_result() - * method. Error codes are described in Exceptions section and - * #i18n_error_code_e description. + * method. Error codes are described in Exceptions section and + * #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[in] id The input timezone ID to be canonicalized. @@ -778,13 +778,13 @@ const char *i18n_ucalendar_get_tz_data_version(void); * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ucalendar_get_canonical_timezone_id(const i18n_uchar *id, int32_t length, i18n_uchar *result, int32_t result_capacity, i18n_ubool *is_system_id); +int32_t i18n_ucalendar_get_canonical_timezone_id(const i18n_uchar *id, int32_t length, i18n_uchar *result, int32_t result_capacity, i18n_ubool *is_system_id); /** * @brief Gets the resource keyword value string designating the calendar type for the #i18n_ucalendar_h. * @remarks The specific error code can be obtained using the get_last_result() - * method. Error codes are described in Exceptions section and - * #i18n_error_code_e description. + * method. Error codes are described in Exceptions section and + * #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[in] calendar The #i18n_ucalendar_h to query. @@ -798,15 +798,15 @@ const char *i18n_ucalendar_get_type(const i18n_ucalendar_h calendar); /** * @brief Given a key and a locale, returns an array of string values in a preferred order that would make a difference. * @details These are all and only those values where the open (creation) of the service with the - * locale formed from the input locale plus input keyword and that value - * has different behavior than creation with the input locale alone. + * locale formed from the input locale plus input keyword and that value + * has different behavior than creation with the input locale alone. * @since_tizen 2.3.1 * * @param[in] key One of the keys supported by this service. For now, only "calendar" is supported. * @param[in] locale The locale * @param[in] commonly_used If set to @c true it will return only commonly used values with - * the given locale in preferred order. Otherwise, it will return all the available - * values for the locale. + * the given locale in preferred order. Otherwise, it will return all the available + * values for the locale. * * @param[out] enumeration A pointer to the string enumeration over keyword values for the given key and the locale. * @@ -818,14 +818,14 @@ int i18n_ucalendar_get_keyword_values_for_locale(const char *key, const char *lo /** * @brief Returns whether the given day of the week is a weekday, a weekend day, - * or a day that transitions from one to the other, for the locale and calendar system - * associated with this @c #i18n_ucalendar_h (the locale's region is often the most determinant factor). + * or a day that transitions from one to the other, for the locale and calendar system + * associated with this @c #i18n_ucalendar_h (the locale's region is often the most determinant factor). * @details If a transition occurs at midnight, then the days before and after the - * transition will have the type #I18N_UCALENDAR_WEEKDAY or #I18N_UCALENDAR_WEEKEND. - * If a transition occurs at a time other than midnight, then the day of the - * transition will have the type #I18N_UCALENDAR_WEEKEND_ONSET or #I18N_UCALENDAR_WEEKEND_CEASE. - * In this case, the function i18n_ucalendar_get_weekend_transition() will - * return the point of transition. + * transition will have the type #I18N_UCALENDAR_WEEKDAY or #I18N_UCALENDAR_WEEKEND. + * If a transition occurs at a time other than midnight, then the day of the + * transition will have the type #I18N_UCALENDAR_WEEKEND_ONSET or #I18N_UCALENDAR_WEEKEND_CEASE. + * In this case, the function i18n_ucalendar_get_weekend_transition() will + * return the point of transition. * @since_tizen 2.3.1 * * @param[in] calendar The #i18n_ucalendar_h to query. @@ -842,14 +842,14 @@ int i18n_ucalendar_get_day_of_week_type(const i18n_ucalendar_h calendar, i18n_uc /** * @brief Returns the time during the day at which the weekend begins or ends in this calendar system. * @details If i18n_ucalendar_get_day_of_week_type() returns #I18N_UCALENDAR_WEEKEND_ONSET - * for the specified @c day_of_week, return the time at which the weekend begins. If - * i18n_ucalendar_get_day_of_week_type() returns #I18N_UCALENDAR_WEEKEND_CEASE for - * the specified @c day_of_week, return the time at which the weekend ends. If - * i18n_ucalendar_get_day_of_week_type() returns some other #i18n_ucalendar_weekday_type_e - * for the specified @c day_of_week, it is an error condition (#I18N_ERROR_INVALID_PARAMETER). + * for the specified @c day_of_week, return the time at which the weekend begins. If + * i18n_ucalendar_get_day_of_week_type() returns #I18N_UCALENDAR_WEEKEND_CEASE for + * the specified @c day_of_week, return the time at which the weekend ends. If + * i18n_ucalendar_get_day_of_week_type() returns some other #i18n_ucalendar_weekday_type_e + * for the specified @c day_of_week, it is an error condition (#I18N_ERROR_INVALID_PARAMETER). * @remarks The specific error code can be obtained using the get_last_result() - * method. Error codes are described in Exceptions section and - * #i18n_error_code_e description. + * method. Error codes are described in Exceptions section and + * #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[in] calendar The #i18n_ucalendar_h to query. @@ -859,13 +859,13 @@ int i18n_ucalendar_get_day_of_week_type(const i18n_ucalendar_h calendar, i18n_uc * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ucalendar_get_weekend_transition(const i18n_ucalendar_h calendar, i18n_ucalendar_days_of_week_e day_of_week); +int32_t i18n_ucalendar_get_weekend_transition(const i18n_ucalendar_h calendar, i18n_ucalendar_days_of_week_e day_of_week); /** * @brief Returns @c true if the given #i18n_udate is in the weekend in this calendar system. * @remarks The specific error code can be obtained using the get_last_result() - * method. Error codes are described in Exceptions section and - * #i18n_error_code_e description. + * method. Error codes are described in Exceptions section and + * #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[in] calendar The #i18n_ucalendar_h to query. @@ -879,18 +879,18 @@ i18n_ubool i18n_ucalendar_is_weekend(i18n_ucalendar_h calendar, i18n_udate date) /** * @brief Get the #i18n_udate for the next/previous time zone transition relative - * to the calendar's current date, in the time zone to which the calendar is currently set. + * to the calendar's current date, in the time zone to which the calendar is currently set. * @details If there is no known time zone transition of the requested type relative - * to the calendar's date, the function returns @c false. + * to the calendar's date, the function returns @c false. * @remarks The specific error code can be obtained using the get_last_result() - * method. Error codes are described in Exceptions section and - * #i18n_error_code_e description. + * method. Error codes are described in Exceptions section and + * #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[in] calendar The #i18n_ucalendar_h to query. * @param[in] type The type of transition desired. * @param[out] transition A pointer to a #i18n_udate to be set to the transition time. - * If the function returns @c false, the value set is unspecified. + * If the function returns @c false, the value set is unspecified. * * @return @c true if the given #i18n_udate is in the weekend in this calendar system, @c false otherwise. * @exception #I18N_ERROR_NONE Successful diff --git a/src/include/mobile/utils_i18n_uchar.h b/src/include/mobile/utils_i18n_uchar.h index 4dc6e1e..c104e23 100644 --- a/src/include/mobile/utils_i18n_uchar.h +++ b/src/include/mobile/utils_i18n_uchar.h @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef __UTILS_I18N_UCHAR_H__ @@ -35,7 +35,7 @@ extern "C" { * @brief The Uchar module provides low-level access to the Unicode Character Database. * * @section CAPI_BASE_UTILS_I18N_UCHAR_MODULE_HEADER Required Header - * \#include + * \#include * * @section CAPI_BASE_UTILS_I18N_UCHAR_MODULE_OVERVIEW Overview * @details The Uchar module provides low-level access to the Unicode Character Database. @@ -44,72 +44,72 @@ extern "C" { * @brief Gets the property value of 'east asian width' among an enumerated property, * and the unicode allocation block that contains the character. * @code - int ret = I18N_ERROR_NONE; - i18n_uchar32 code_point = 0; - int property_value = 0; - i18n_uchar_u_east_asian_width_e east_asian_width = I18N_UCHAR_U_EA_NEUTRAL; - i18n_uchar_ublock_code_e block_code = I18N_UCHAR_UBLOCK_NO_BLOCK; - - // How to get the east asian width type for 's' - code_point = 0x73; // 's' - ret = i18n_uchar_get_int_property_value(code_point, I18N_UCHAR_EAST_ASIAN_WIDTH, &property_value); - if (ret != I18N_ERROR_NONE) { - dlog_print(DLOG_INFO, LOG_TAG, "Error occured!!\n"); - } else { - east_asian_width = (i18n_uchar_u_east_asian_width_e)property_value; - dlog_print(DLOG_INFO, LOG_TAG, "East Asian Width Type for ( %.4x ) is ( %d )\n", code_point, east_asian_width); - // East Asian Width Type for ( 0073 ) is ( 4 ) which is I18N_UCHAR_U_EA_NARROW - } - - // How to get the block code for 's' - ret = i18n_uchar_get_ublock_code(code_point, &block_code); - if (ret != I18N_ERROR_NONE) { - dlog_print(DLOG_INFO, LOG_TAG, "Error occured!!\n"); - } else { - dlog_print(DLOG_INFO, LOG_TAG, "block name for ( %.4x ) is ( %d )\n", code_point, block_code); - // block code for ( 0073 ) is ( 1 ) which is I18N_UCHAR_UBLOCK_BASIC_LATIN - } - - // How to get the east asian width type for 'sung' as ideographs - code_point = 0x661F; // 'sung' as ideographs - ret = i18n_uchar_get_int_property_value(code_point, I18N_UCHAR_EAST_ASIAN_WIDTH, &property_value); - if (ret != I18N_ERROR_NONE) { - dlog_print(DLOG_INFO, LOG_TAG, "Error occured!!\n"); - } else { - east_asian_width = (i18n_uchar_u_east_asian_width_e)property_value; - dlog_print(DLOG_INFO, LOG_TAG, "East Asian Width Type for ( %.4x ) is ( %d )\n", code_point, east_asian_width); - // East Asian Width Type for ( 661f ) is ( 5 ) which is I18N_UCHAR_U_EA_WIDE - } - - // How to get the block code for 'sung' as ideographs - ret = i18n_uchar_get_ublock_code(code_point, &block_code); - if (ret != I18N_ERROR_NONE) { - dlog_print(DLOG_INFO, LOG_TAG, "Error occured!!\n"); - } else { - dlog_print(DLOG_INFO, LOG_TAG, "block name for ( %.4x ) is ( %d )\n", code_point, block_code); - // block code for ( 661f ) is ( 71 ) which is I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS - } - - // How to get the east asian width type for 'sung' as hangul - code_point = 0xC131; // 'sung' as hangul - ret = i18n_uchar_get_int_property_value(code_point, I18N_UCHAR_EAST_ASIAN_WIDTH, &property_value); - if (ret != I18N_ERROR_NONE) { - dlog_print(DLOG_INFO, LOG_TAG, "Error occured!!\n"); - } else { - east_asian_width = (i18n_uchar_u_east_asian_width_e)property_value; - dlog_print(DLOG_INFO, LOG_TAG, "East Asian Width Type for ( %.4x ) is ( %d )\n", code_point, east_asian_width); - // East Asian Width Type for ( c131 ) is ( 5 ) which is I18N_UCHAR_U_EA_WIDE - } - - // How to get the block code for 'sung' as hangul - ret = i18n_uchar_get_ublock_code(code_point, &block_code); - if (ret != I18N_ERROR_NONE) { - dlog_print(DLOG_INFO, LOG_TAG, "Error occured!!\n"); - } else { - dlog_print(DLOG_INFO, LOG_TAG, "block name for ( %.4x ) is ( %d )\n", code_point, block_code); - // block code for ( c131 ) is ( 74 ) which is I18N_UCHAR_UBLOCK_HANGUL_SYLLABLES - } - + int ret = I18N_ERROR_NONE; + i18n_uchar32 code_point = 0; + int property_value = 0; + i18n_uchar_u_east_asian_width_e east_asian_width = I18N_UCHAR_U_EA_NEUTRAL; + i18n_uchar_ublock_code_e block_code = I18N_UCHAR_UBLOCK_NO_BLOCK; + + // How to get the east asian width type for 's' + code_point = 0x73; // 's' + ret = i18n_uchar_get_int_property_value(code_point, I18N_UCHAR_EAST_ASIAN_WIDTH, &property_value); + if (ret != I18N_ERROR_NONE) { + dlog_print(DLOG_INFO, LOG_TAG, "Error occured!!\n"); + } else { + east_asian_width = (i18n_uchar_u_east_asian_width_e)property_value; + dlog_print(DLOG_INFO, LOG_TAG, "East Asian Width Type for ( %.4x ) is ( %d )\n", code_point, east_asian_width); + // East Asian Width Type for ( 0073 ) is ( 4 ) which is I18N_UCHAR_U_EA_NARROW + } + + // How to get the block code for 's' + ret = i18n_uchar_get_ublock_code(code_point, &block_code); + if (ret != I18N_ERROR_NONE) { + dlog_print(DLOG_INFO, LOG_TAG, "Error occured!!\n"); + } else { + dlog_print(DLOG_INFO, LOG_TAG, "block name for ( %.4x ) is ( %d )\n", code_point, block_code); + // block code for ( 0073 ) is ( 1 ) which is I18N_UCHAR_UBLOCK_BASIC_LATIN + } + + // How to get the east asian width type for 'sung' as ideographs + code_point = 0x661F; // 'sung' as ideographs + ret = i18n_uchar_get_int_property_value(code_point, I18N_UCHAR_EAST_ASIAN_WIDTH, &property_value); + if (ret != I18N_ERROR_NONE) { + dlog_print(DLOG_INFO, LOG_TAG, "Error occured!!\n"); + } else { + east_asian_width = (i18n_uchar_u_east_asian_width_e)property_value; + dlog_print(DLOG_INFO, LOG_TAG, "East Asian Width Type for ( %.4x ) is ( %d )\n", code_point, east_asian_width); + // East Asian Width Type for ( 661f ) is ( 5 ) which is I18N_UCHAR_U_EA_WIDE + } + + // How to get the block code for 'sung' as ideographs + ret = i18n_uchar_get_ublock_code(code_point, &block_code); + if (ret != I18N_ERROR_NONE) { + dlog_print(DLOG_INFO, LOG_TAG, "Error occured!!\n"); + } else { + dlog_print(DLOG_INFO, LOG_TAG, "block name for ( %.4x ) is ( %d )\n", code_point, block_code); + // block code for ( 661f ) is ( 71 ) which is I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS + } + + // How to get the east asian width type for 'sung' as hangul + code_point = 0xC131; // 'sung' as hangul + ret = i18n_uchar_get_int_property_value(code_point, I18N_UCHAR_EAST_ASIAN_WIDTH, &property_value); + if (ret != I18N_ERROR_NONE) { + dlog_print(DLOG_INFO, LOG_TAG, "Error occured!!\n"); + } else { + east_asian_width = (i18n_uchar_u_east_asian_width_e)property_value; + dlog_print(DLOG_INFO, LOG_TAG, "East Asian Width Type for ( %.4x ) is ( %d )\n", code_point, east_asian_width); + // East Asian Width Type for ( c131 ) is ( 5 ) which is I18N_UCHAR_U_EA_WIDE + } + + // How to get the block code for 'sung' as hangul + ret = i18n_uchar_get_ublock_code(code_point, &block_code); + if (ret != I18N_ERROR_NONE) { + dlog_print(DLOG_INFO, LOG_TAG, "Error occured!!\n"); + } else { + dlog_print(DLOG_INFO, LOG_TAG, "block name for ( %.4x ) is ( %d )\n", code_point, block_code); + // block code for ( c131 ) is ( 74 ) which is I18N_UCHAR_UBLOCK_HANGUL_SYLLABLES + } + * @endcode */ @@ -121,17 +121,17 @@ extern "C" { /** * @brief Gets the property value for an enumerated property for a code point. * @details - * - * int property_value;\n - * #i18n_uchar_u_east_asian_width_e east_asian_width;\n - * #i18n_uchar_get_int_property_value (c, #I18N_UCHAR_EAST_ASIAN_WIDTH, &property_value);\n - * east_asian_width = (#i18n_uchar_u_east_asian_width_e)property_value;\n + * + * int property_value;\n + * #i18n_uchar_u_east_asian_width_e east_asian_width;\n + * #i18n_uchar_get_int_property_value (c, #I18N_UCHAR_EAST_ASIAN_WIDTH, &property_value);\n + * east_asian_width = (#i18n_uchar_u_east_asian_width_e)property_value;\n * - * int property_value;\n - * bool is_ideographic;\n - * #i18n_uchar_get_int_property_value(c, #I18N_UCHAR_IDEOGRAPHIC, &property_value);\n - * is_ideographic = (bool)property_value;\n - * + * int property_value;\n + * bool is_ideographic;\n + * #i18n_uchar_get_int_property_value(c, #I18N_UCHAR_IDEOGRAPHIC, &property_value);\n + * is_ideographic = (bool)property_value;\n + * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] c The code point to test. @@ -158,7 +158,7 @@ int i18n_uchar_get_int_property_value(i18n_uchar32 c, i18n_uchar_uproperty_e whi * @param[in] c The code point to test * @param[out] block_val The block value for the code point * - * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ int i18n_uchar_get_ublock_code(i18n_uchar32 c, i18n_uchar_ublock_code_e *block_val); @@ -172,4 +172,4 @@ int i18n_uchar_get_ublock_code(i18n_uchar32 c, i18n_uchar_ublock_code_e *block_v * @} */ -#endif /* __UTILS_I18N_UCHAR_H__*/ +#endif /* __UTILS_I18N_UCHAR_H__*/ diff --git a/src/include/mobile/utils_i18n_ucollator.h b/src/include/mobile/utils_i18n_ucollator.h old mode 100755 new mode 100644 index a0be21a..9c0c40c --- a/src/include/mobile/utils_i18n_ucollator.h +++ b/src/include/mobile/utils_i18n_ucollator.h @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef __UTILS_I18N_UCOLLATOR_H__ @@ -35,7 +35,7 @@ extern "C" { * @brief The Ucollator module performs locale-sensitive string comparison. * * @section CAPI_BASE_UTILS_I18N_UCOLLATOR_MODULE_HEADER Required Header - * \#include + * \#include * * @section CAPI_BASE_UTILS_I18N_UCOLLATOR_MODULE_OVERVIEW Overview * @details The Ucollator module performs locale-sensitive string comparison. It builds searching and sorting routines for natural language text and provides correct sorting orders for most locales supported. @@ -43,78 +43,78 @@ extern "C" { * @section CAPI_BASE_UTILS_I18N_UCOLLATOR_MODULE_SAMPLE_CODE_1 Sample Code 1 * @brief Converts two different byte strings to two different unicode strings and compares the unicode strings to check if the strings are equal to each other. * @code - i18n_uchar uchar_src[64] = {0,}; - i18n_uchar uchar_target[64] = {0,}; - char *src = "tizen"; - char *target = "bada"; - int uchar_src_len = 0; - int uchar_target_len = 0; - i18n_ucollator_h coll = NULL; - i18n_ubool result = NULL; - - i18n_ustring_from_UTF8( uchar_src, 64, NULL, src, -1 ); - i18n_ustring_from_UTF8( uchar_target, 64, NULL, target, -1 ); - - // creates a collator - i18n_ucollator_create( "en_US", &coll ); - - // sets strength for coll - i18n_ucollator_set_strength( coll, I18N_UCOLLATOR_PRIMARY ); - - // compares uchar_src with uchar_target - i18n_ustring_get_length( uchar_src, &uchar_src_len ); - i18n_ustring_get_length( uchar_target, &uchar_target_len ); - i18n_ucollator_equal( coll, uchar_src, uchar_src_len, uchar_target, uchar_target_len, &result ); - dlog_print(DLOG_INFO, LOG_TAG, "%s %s %s\n", src, result == 1 ? "is equal to" : "is not equal to", target ); // tizen is not equal to bada - - // destroys the collator - i18n_ucollator_destroy( coll ); + i18n_uchar uchar_src[64] = {0,}; + i18n_uchar uchar_target[64] = {0,}; + char *src = "tizen"; + char *target = "bada"; + int uchar_src_len = 0; + int uchar_target_len = 0; + i18n_ucollator_h coll = NULL; + i18n_ubool result = NULL; + + i18n_ustring_from_UTF8( uchar_src, 64, NULL, src, -1 ); + i18n_ustring_from_UTF8( uchar_target, 64, NULL, target, -1 ); + + // creates a collator + i18n_ucollator_create( "en_US", &coll ); + + // sets strength for coll + i18n_ucollator_set_strength( coll, I18N_UCOLLATOR_PRIMARY ); + + // compares uchar_src with uchar_target + i18n_ustring_get_length( uchar_src, &uchar_src_len ); + i18n_ustring_get_length( uchar_target, &uchar_target_len ); + i18n_ucollator_equal( coll, uchar_src, uchar_src_len, uchar_target, uchar_target_len, &result ); + dlog_print(DLOG_INFO, LOG_TAG, "%s %s %s\n", src, result == 1 ? "is equal to" : "is not equal to", target ); // tizen is not equal to bada + + // destroys the collator + i18n_ucollator_destroy( coll ); * @endcode * @section CAPI_BASE_UTILS_I18N_UCOLLATOR_MODULE_SAMPLE_CODE_2 Sample Code 2 * @brief Sorts in ascending order on the given data using string_ucollator * @code - i18n_ucollator_h coll = NULL; - char *src[3] = { "cat", "banana", "airplane" }; - char *tmp = NULL; - i18n_uchar buf_01[16] = {0,}; - i18n_uchar buf_02[16] = {0,}; - i18n_ucollator_result_e result = I18N_UCOLLATOR_EQUAL; - int i = 0, j = 0; - int ret = I18N_ERROR_NONE; - int buf_01_len = 0, buf_02_len = 0; - - for (i = 0; i < sizeof(src) / sizeof(src[0]); i++) { - dlog_print(DLOG_INFO, LOG_TAG, "%s\n", src[i]); - } // cat banana airplane - - // creates a collator - ret = i18n_ucollator_create("en_US", &coll); - - // compares and sorts in ascending order - if (ret == I18N_ERROR_NONE) { - i18n_ucollator_set_strength(coll, I18N_UCOLLATOR_TERTIARY); - for (i = 0; i < 2; i++) { - for (j = 0; j < 2 - i; j++) { - i18n_ustring_copy_ua(buf_01, src[j]); - i18n_ustring_copy_ua(buf_02, src[j+1]); - i18n_ustring_get_length(buf_01, &buf_01_len); - i18n_ustring_get_length(buf_02, &buf_02_len); - // compares buf_01 with buf_02 - i18n_ucollator_str_collator(coll, buf_01, buf_01_len, buf_02, buf_02_len, &result); - if (result == I18N_UCOLLATOR_GREATER) { - tmp = src[j]; - src[j] = src[j+1]; - src[j+1] = tmp; - } - } - } - } - // destroys the collator - i18n_ucollator_destroy( coll ); // deallocate memory for collator - - for (i = 0; i < sizeof(src) / sizeof(src[0]); i++) { - dlog_print(DLOG_INFO, LOG_TAG, "%s\n", src[i]); - } // ariplane banana cat + i18n_ucollator_h coll = NULL; + char *src[3] = { "cat", "banana", "airplane" }; + char *tmp = NULL; + i18n_uchar buf_01[16] = {0,}; + i18n_uchar buf_02[16] = {0,}; + i18n_ucollator_result_e result = I18N_UCOLLATOR_EQUAL; + int i = 0, j = 0; + int ret = I18N_ERROR_NONE; + int buf_01_len = 0, buf_02_len = 0; + + for (i = 0; i < sizeof(src) / sizeof(src[0]); i++) { + dlog_print(DLOG_INFO, LOG_TAG, "%s\n", src[i]); + } // cat banana airplane + + // creates a collator + ret = i18n_ucollator_create("en_US", &coll); + + // compares and sorts in ascending order + if (ret == I18N_ERROR_NONE) { + i18n_ucollator_set_strength(coll, I18N_UCOLLATOR_TERTIARY); + for (i = 0; i < 2; i++) { + for (j = 0; j < 2 - i; j++) { + i18n_ustring_copy_ua(buf_01, src[j]); + i18n_ustring_copy_ua(buf_02, src[j+1]); + i18n_ustring_get_length(buf_01, &buf_01_len); + i18n_ustring_get_length(buf_02, &buf_02_len); + // compares buf_01 with buf_02 + i18n_ucollator_str_collator(coll, buf_01, buf_01_len, buf_02, buf_02_len, &result); + if (result == I18N_UCOLLATOR_GREATER) { + tmp = src[j]; + src[j] = src[j+1]; + src[j+1] = tmp; + } + } + } + } + // destroys the collator + i18n_ucollator_destroy( coll ); // deallocate memory for collator + + for (i = 0; i < sizeof(src) / sizeof(src[0]); i++) { + dlog_print(DLOG_INFO, LOG_TAG, "%s\n", src[i]); + } // ariplane banana cat * @endcode */ @@ -205,7 +205,7 @@ int i18n_ucollator_equal(const i18n_ucollator_h collator, const i18n_uchar *src, * * @param[in] collator The i18n_collator_h to set. * @param[in] strength The desired collation strength.\n - * One of #i18n_ucollator_strength_e + * One of #i18n_ucollator_strength_e * * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter diff --git a/src/include/mobile/utils_i18n_udate.h b/src/include/mobile/utils_i18n_udate.h index 440dfe6..5cf902f 100644 --- a/src/include/mobile/utils_i18n_udate.h +++ b/src/include/mobile/utils_i18n_udate.h @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef __UTILS_I18N_UDATE_H__ @@ -33,7 +33,7 @@ * manner. * * @section CAPI_BASE_UTILS_I18N_UDATE_MODULE_HEADER Required Header - * \#include + * \#include * * @section CAPI_BASE_UTILS_I18N_UDATE_MODULE_OVERVIEW Overview * @details The Udate module consists of functions that convert dates and time from their @@ -50,112 +50,112 @@ * @section CAPI_BASE_UTILS_I18N_UDATE_MODULE_SAMPLE_CODE_1 Sample Code 1 * @brief Gets the best pattern according to a given locale and formats a current date and time using a locale_udate_format_h * @code - i18n_udatepg_h pattern_generator = NULL; - char *locale = I18N_ULOCALE_US; - - dlog_print(DLOG_INFO, LOG_TAG, "pattern_generator\n"); - - if(!pattern_generator) { - // create a pattern generator according to a given locale - i18n_udatepg_create(locale, &pattern_generator); - } - - if(!pattern_generator) { - dlog_print(DLOG_INFO, LOG_TAG, "i18n_udatepg_create fail"); - return ; - } - - i18n_uchar bestPattern[64] = {0,}; - char bestPatternString[64] = {0,}; - int bestPatternLength, len; - const char *custom_format = "yyyy.MM.dd G 'at' HH:mm:ss zzz"; - i18n_uchar uch_custom_format[64]; - int ret = I18N_ERROR_NONE; - - dlog_print(DLOG_INFO, LOG_TAG, "getBestPattern\n"); - - i18n_ustring_copy_ua(uch_custom_format, custom_format); - len = i18n_ustring_get_length(uch_custom_format); - - // gets the best pattern that matches the given custom_format - i18n_udatepg_get_best_pattern(pattern_generator, uch_custom_format, len, bestPattern, 64, &bestPatternLength); - - i18n_ustring_copy_au_n(bestPatternString, bestPattern, 64); - // gets "MM/dd/yyyy G h:mm:ss a zzz" as the best pattern - dlog_print(DLOG_INFO, LOG_TAG, "getBestPattern(char[]) : %s \n", bestPatternString); - - // closes a generator - i18n_udatepg_destroy(pattern_generator); - - i18n_udate_format_h formatter_KR = NULL; - i18n_udate_format_h formatter_LA = NULL; - i18n_udate_format_h formatter_SaoPaulo = NULL; - i18n_uchar formatted[64] = {0,}; - char result[64] = {0,}; - int formattedLength; - i18n_udate date; - const char *timezone_KR = "GMT+9:00"; // TimeZone for Korea/Seoul - const char *timezone_LA = "America/Los_Angeles"; - const char *timezone_SaoPaulo = "America/Sao_Paulo"; // Brazil/East - i18n_uchar utf16_timezone_KR[64] = {0,}; - i18n_uchar utf16_timezone_LA[64] = {0,}; - i18n_uchar utf16_timezone_SaoPaulo[64] = {0,}; - - i18n_ustring_copy_ua_n(utf16_timezone_KR, timezone_KR, strlen(timezone_KR)); - i18n_ustring_copy_ua_n(utf16_timezone_LA, timezone_LA, strlen(timezone_LA)); - i18n_ustring_copy_ua_n(utf16_timezone_SaoPaulo, timezone_SaoPaulo, strlen(timezone_SaoPaulo)); - - // creates new i18n_udate_format_h to format dates and times - ret = i18n_udate_create(I18N_UDATE_FULL , I18N_UDATE_FULL , locale, utf16_timezone_KR, -1, bestPattern, -1, &formatter_KR); - if (ret != I18N_ERROR_NONE) { - dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); - } - if (!formatter_KR) { - dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n"); - } - ret = i18n_udate_create(I18N_UDATE_FULL , I18N_UDATE_FULL , locale, utf16_timezone_LA, -1, bestPattern, -1, &formatter_LA); - if (ret != I18N_ERROR_NONE) { - dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); - } - if (!formatter_LA) { - dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n"); - } - ret = i18n_udate_create(I18N_UDATE_PATTERN , I18N_UDATE_PATTERN , locale, utf16_timezone_SaoPaulo, -1, bestPattern, -1, &formatter_SaoPaulo); - if (ret != I18N_ERROR_NONE) { - dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); - } - if (!formatter_LA) { - dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n"); - } - - dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_format_date\n"); - - // gets the current date and time - i18n_ucalendar_get_now(&date); - - // formats a date using i18n_udate_format_h - i18n_udate_format_date(formatter_KR, date, formatted, 64, NULL, &formattedLength); - i18n_ustring_copy_au_n(result, formatted, 64); - //ex) KOREA/Seoul - Current date : Wednesday, June 18, 2014 1:34:54 PM GMT+09:00 - dlog_print(DLOG_INFO, LOG_TAG, "KOREA/Seoul - Current date : %s\n",result); - - // formats a date using i18n_udate_format - i18n_udate_format_date(formatter_LA, date, formatted, 64, NULL, &formattedLength); - i18n_ustring_copy_au_n(result, formatted, 64); - //ex) America/LOS Angeles - Current date : Tuesday, June 17, 2014 9:34:54 PM Pacific Daylight Time - dlog_print(DLOG_INFO, LOG_TAG, "America/LOS Angeles - Current date : %s\n",result); - - // formats a date using i18n_udate_format_h - i18n_udate_format_date(formatter_SaoPaulo, date, formatted, 64, NULL, &formattedLength); - i18n_ustring_copy_au_n(result, formatted, 64); - //ex) Brazil/Sao Paulo - Current date : 6 18, 2014 AD, 1:34:54 PM GMT-2 - dlog_print(DLOG_INFO, LOG_TAG, "Brazil/Sao Paulo - Current date : %s\n",result); - - dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_destroy\n"); - // destroy an i18n_udate_format_h - i18n_udate_destroy(formatter_KR); - i18n_udate_destroy(formatter_LA); - i18n_udate_destroy(formatter_SaoPaulo); + i18n_udatepg_h pattern_generator = NULL; + char *locale = I18N_ULOCALE_US; + + dlog_print(DLOG_INFO, LOG_TAG, "pattern_generator\n"); + + if(!pattern_generator) { + // create a pattern generator according to a given locale + i18n_udatepg_create(locale, &pattern_generator); + } + + if(!pattern_generator) { + dlog_print(DLOG_INFO, LOG_TAG, "i18n_udatepg_create fail"); + return ; + } + + i18n_uchar bestPattern[64] = {0,}; + char bestPatternString[64] = {0,}; + int bestPatternLength, len; + const char *custom_format = "yyyy.MM.dd G 'at' HH:mm:ss zzz"; + i18n_uchar uch_custom_format[64]; + int ret = I18N_ERROR_NONE; + + dlog_print(DLOG_INFO, LOG_TAG, "getBestPattern\n"); + + i18n_ustring_copy_ua(uch_custom_format, custom_format); + len = i18n_ustring_get_length(uch_custom_format); + + // gets the best pattern that matches the given custom_format + i18n_udatepg_get_best_pattern(pattern_generator, uch_custom_format, len, bestPattern, 64, &bestPatternLength); + + i18n_ustring_copy_au_n(bestPatternString, bestPattern, 64); + // gets "MM/dd/yyyy G h:mm:ss a zzz" as the best pattern + dlog_print(DLOG_INFO, LOG_TAG, "getBestPattern(char[]) : %s \n", bestPatternString); + + // closes a generator + i18n_udatepg_destroy(pattern_generator); + + i18n_udate_format_h formatter_KR = NULL; + i18n_udate_format_h formatter_LA = NULL; + i18n_udate_format_h formatter_SaoPaulo = NULL; + i18n_uchar formatted[64] = {0,}; + char result[64] = {0,}; + int formattedLength; + i18n_udate date; + const char *timezone_KR = "GMT+9:00"; // TimeZone for Korea/Seoul + const char *timezone_LA = "America/Los_Angeles"; + const char *timezone_SaoPaulo = "America/Sao_Paulo"; // Brazil/East + i18n_uchar utf16_timezone_KR[64] = {0,}; + i18n_uchar utf16_timezone_LA[64] = {0,}; + i18n_uchar utf16_timezone_SaoPaulo[64] = {0,}; + + i18n_ustring_copy_ua_n(utf16_timezone_KR, timezone_KR, strlen(timezone_KR)); + i18n_ustring_copy_ua_n(utf16_timezone_LA, timezone_LA, strlen(timezone_LA)); + i18n_ustring_copy_ua_n(utf16_timezone_SaoPaulo, timezone_SaoPaulo, strlen(timezone_SaoPaulo)); + + // creates new i18n_udate_format_h to format dates and times + ret = i18n_udate_create(I18N_UDATE_FULL , I18N_UDATE_FULL , locale, utf16_timezone_KR, -1, bestPattern, -1, &formatter_KR); + if (ret != I18N_ERROR_NONE) { + dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); + } + if (!formatter_KR) { + dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n"); + } + ret = i18n_udate_create(I18N_UDATE_FULL , I18N_UDATE_FULL , locale, utf16_timezone_LA, -1, bestPattern, -1, &formatter_LA); + if (ret != I18N_ERROR_NONE) { + dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); + } + if (!formatter_LA) { + dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n"); + } + ret = i18n_udate_create(I18N_UDATE_PATTERN , I18N_UDATE_PATTERN , locale, utf16_timezone_SaoPaulo, -1, bestPattern, -1, &formatter_SaoPaulo); + if (ret != I18N_ERROR_NONE) { + dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); + } + if (!formatter_LA) { + dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n"); + } + + dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_format_date\n"); + + // gets the current date and time + i18n_ucalendar_get_now(&date); + + // formats a date using i18n_udate_format_h + i18n_udate_format_date(formatter_KR, date, formatted, 64, NULL, &formattedLength); + i18n_ustring_copy_au_n(result, formatted, 64); + //ex) KOREA/Seoul - Current date : Wednesday, June 18, 2014 1:34:54 PM GMT+09:00 + dlog_print(DLOG_INFO, LOG_TAG, "KOREA/Seoul - Current date : %s\n",result); + + // formats a date using i18n_udate_format + i18n_udate_format_date(formatter_LA, date, formatted, 64, NULL, &formattedLength); + i18n_ustring_copy_au_n(result, formatted, 64); + //ex) America/LOS Angeles - Current date : Tuesday, June 17, 2014 9:34:54 PM Pacific Daylight Time + dlog_print(DLOG_INFO, LOG_TAG, "America/LOS Angeles - Current date : %s\n",result); + + // formats a date using i18n_udate_format_h + i18n_udate_format_date(formatter_SaoPaulo, date, formatted, 64, NULL, &formattedLength); + i18n_ustring_copy_au_n(result, formatted, 64); + //ex) Brazil/Sao Paulo - Current date : 6 18, 2014 AD, 1:34:54 PM GMT-2 + dlog_print(DLOG_INFO, LOG_TAG, "Brazil/Sao Paulo - Current date : %s\n",result); + + dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_destroy\n"); + // destroy an i18n_udate_format_h + i18n_udate_destroy(formatter_KR); + i18n_udate_destroy(formatter_LA); + i18n_udate_destroy(formatter_SaoPaulo); * @endcode */ @@ -173,8 +173,8 @@ extern "C" { * @details A #i18n_udate_format_h may be used to format dates in calls to {@link i18n_udate_create()}. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @remarks Must release @a format using i18n_udate_destroy().\n - * If @a pattern parameter is used, pass in #I18N_UDATE_PATTERN for @a time_style and @a date_style. \n - * #I18N_UDATE_PATTERN can only be used in this case, and has to be set for both @a time_style and @a date_style. + * If @a pattern parameter is used, pass in #I18N_UDATE_PATTERN for @a time_style and @a date_style. \n + * #I18N_UDATE_PATTERN can only be used in this case, and has to be set for both @a time_style and @a date_style. * * @param[in] time_style The style used to format times\n One of #I18N_UDATE_FULL, #I18N_UDATE_LONG, * #I18N_UDATE_MEDIUM, #I18N_UDATE_SHORT, #I18N_UDATE_DEFAULT, #I18N_UDATE_PATTERN (see remarks) or #I18N_UDATE_NONE (relative time styles @@ -183,11 +183,11 @@ extern "C" { * #I18N_UDATE_MEDIUM, #I18N_UDATE_SHORT, #I18N_UDATE_DEFAULT, #I18N_UDATE_RELATIVE, #I18N_UDATE_LONG_RELATIVE, * #I18N_UDATE_MEDIUM_RELATIVE, #I18N_UDATE_SHORT_RELATIVE, #I18N_UDATE_PATTERN (see remarks) or #I18N_UDATE_NONE * @param[in] locale The locale specifying the formatting conventions. - * @param[in] tz_id A timezone ID specifying the timezone to use\n If @c 0, use the default timezone. + * @param[in] tz_id A timezone ID specifying the timezone to use\n If @c 0, use the default timezone. * @param[in] tz_id_len The length of @a tz_id, otherwise @c -1 if NULL-terminated. * @param[in] pattern A pattern specifying the format to use. The pattern is generated by Udatepg module.\n - * When the pattern parameter is used, pass in #I18N_UDATE_PATTERN for both time_style and date_style.\n - * See remarks for additional conditions. + * When the pattern parameter is used, pass in #I18N_UDATE_PATTERN for both time_style and date_style.\n + * See remarks for additional conditions. * @param[in] pattern_len The number of characters in the pattern, or otherwise @c -1 if NULL-terminated. * @param[out] format A pointer to an #i18n_udate_format_h to use for formatting dates and times, otherwise @c 0 if an error occurs. * @@ -234,7 +234,7 @@ int i18n_udate_destroy(i18n_udate_format_h format); int i18n_udate_format_date(const i18n_udate_format_h format, i18n_udate date_to_format, i18n_uchar *result, int32_t result_len, i18n_ufield_position_h pos, int32_t *buf_size_needed); -// Newly Added APIs +/* Newly Added APIs */ /** * @brief Maps from an #i18n_udate_format_h to the corresponding #i18n_ucalendar_date_fields_e. @@ -242,8 +242,8 @@ int i18n_udate_format_date(const i18n_udate_format_h format, i18n_udate date_to_ * @since_tizen 2.3.1 * * @param[in] field The #i18n_udate_format_h to map. - * #I18N_UDATE_FORMAT_TIMEZONE_LOCALIZED_GMT_OFFSET_FIELD, #I18N_UDATE_FORMAT_TIMEZONE_ISO_FIELD, - * #I18N_UDATE_FORMAT_TIMEZONE_ISO_LOCAL_FIELD and #I18N_UDATE_FORMAT_FIELD_COUNT are not supported. + * #I18N_UDATE_FORMAT_TIMEZONE_LOCALIZED_GMT_OFFSET_FIELD, #I18N_UDATE_FORMAT_TIMEZONE_ISO_FIELD, + * #I18N_UDATE_FORMAT_TIMEZONE_ISO_LOCAL_FIELD and #I18N_UDATE_FORMAT_FIELD_COUNT are not supported. * @param[out] date_field_type A pointer to the #i18n_ucalendar_date_fields_e. * * @return Error code. @@ -257,7 +257,7 @@ int i18n_udate_to_calendar_date_field(i18n_udate_format_field_e field, i18n_ucal * @details This function performs a deep copy. * @since_tizen 2.3.1 * - * @param[in] format The format to copy. + * @param[in] format The format to copy. * @param[out] format_clone A pointer to clone of @c format. * * @return Error code. Error codes not listed below are described in #i18n_error_code_e @@ -269,19 +269,19 @@ int i18n_udate_clone(const i18n_udate_format_h format, i18n_udate_format_h *form /** * @brief Parses a string into an date/time using an #i18n_udate_format_h. * @details The date will be parsed using the conventions specified in {@link i18n_udate_create()}.
- * Note that the normal date formats associated with some calendars - such as the Chinese lunar calendar - do not specify enough fields to enable dates to be parsed unambiguously. - * In the case of the Chinese lunar calendar, while the year within the current 60-year cycle is specified, - * the number of such cycles since the start date of the calendar (in the #I18N_UCALENDAR_ERA field of the i18n_ucalendar_h) is not normally part of the format, - * and parsing may assume the wrong era. - * For such cases it is recommended that clients parse using i18n_udate_parse_calendar() with the calendar passed in set to the current date, - * or to a date within the era/cycle that should be assumed if absent in the format. + * Note that the normal date formats associated with some calendars - such as the Chinese lunar calendar - do not specify enough fields to enable dates to be parsed unambiguously. + * In the case of the Chinese lunar calendar, while the year within the current 60-year cycle is specified, + * the number of such cycles since the start date of the calendar (in the #I18N_UCALENDAR_ERA field of the i18n_ucalendar_h) is not normally part of the format, + * and parsing may assume the wrong era. + * For such cases it is recommended that clients parse using i18n_udate_parse_calendar() with the calendar passed in set to the current date, + * or to a date within the era/cycle that should be assumed if absent in the format. * @since_tizen 2.3.1 * - * @param[in] format The formatter to use. - * @param[in] text The text to parse. + * @param[in] format The formatter to use. + * @param[in] text The text to parse. * @param[in] text_length The length of text, or -1 if NULL-terminated. - * @param[in] parse_pos If not 0, on input a pointer to an integer specifying the offset at which to begin parsing. - * If not 0, on output the offset at which parsing ended. + * @param[in] parse_pos If not 0, on input a pointer to an integer specifying the offset at which to begin parsing. + * If not 0, on output the offset at which parsing ended. * @param[out] parsed_date A pointer to the value of the parsed date/time. * * @return Error code. Error codes not listed below are described in #i18n_error_code_e @@ -297,16 +297,16 @@ int i18n_udate_parse(const i18n_udate_format_h format, const i18n_uchar *text, i * @details The date will be parsed using the conventions specified in {@link i18n_udate_create()}. * @since_tizen 2.3.1 * - * @param[in] format The formatter to use. - * @param[in,out] calendar A pointer to calendar set on input to the date and time to be used for missing values in the date/time string being parsed, - * and set on output to the parsed date/time. - * When the calendar type is different from the internal calendar held by the #i18n_udate_format_h instance, - * the internal calendar will be cloned to a work calendar set to the same milliseconds and time zone as this calendar parameter, - * field values will be parsed based on the work calendar, then the result (milliseconds and time zone) will be set in this calendar. - * @param[in] text The text to parse. - * @param[in] text_length The length of text, or -1 if NULL-terminated. - * @param[in] parse_pos If not 0, on input a pointer to an integer specifying the offset at which to begin parsing. - * If not 0, on output the offset at which parsing ended. + * @param[in] format The formatter to use. + * @param[in,out] calendar A pointer to calendar set on input to the date and time to be used for missing values in the date/time string being parsed, + * and set on output to the parsed date/time. + * When the calendar type is different from the internal calendar held by the #i18n_udate_format_h instance, + * the internal calendar will be cloned to a work calendar set to the same milliseconds and time zone as this calendar parameter, + * field values will be parsed based on the work calendar, then the result (milliseconds and time zone) will be set in this calendar. + * @param[in] text The text to parse. + * @param[in] text_length The length of text, or -1 if NULL-terminated. + * @param[in] parse_pos If not 0, on input a pointer to an integer specifying the offset at which to begin parsing. + * If not 0, on output the offset at which parsing ended. * * @return Error code. Error codes not listed below are described in #i18n_error_code_e * @retval #I18N_ERROR_NONE Successful @@ -315,16 +315,16 @@ int i18n_udate_parse(const i18n_udate_format_h format, const i18n_uchar *text, i * @see i18n_udate_format_date() */ int i18n_udate_parse_calendar(const i18n_udate_format_h format, i18n_ucalendar_h *calendar, const i18n_uchar *text, - int32_t text_length, int32_t *parse_pos); + int32_t text_length, int32_t *parse_pos); /** * @brief Determines if an #i18n_udate_format_h will perform lenient parsing. * @details With lenient parsing, the parser may use heuristics to interpret inputs that do not precisely match the pattern. - * With strict parsing, inputs must match the pattern. + * With strict parsing, inputs must match the pattern. * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] format The #i18n_udate_format_h to query. + * @param[in] format The #i18n_udate_format_h to query. * * @return true if format is set to perform lenient parsing, false otherwise. * @@ -338,10 +338,10 @@ i18n_ubool i18n_udate_is_lenient(const i18n_udate_format_h format); /** * @brief Specifies whether an #i18n_udate_format_h will perform lenient parsing. * @details With lenient parsing, the parser may use heuristics to interpret inputs that do not precisely match the pattern. - * With strict parsing, inputs must match the pattern. + * With strict parsing, inputs must match the pattern. * @since_tizen 2.3.1 * - * @param[in] format The #i18n_udate_format_h to set. + * @param[in] format The #i18n_udate_format_h to set. * @param[in] is_lenient true if fmt should perform lenient parsing, false otherwise. * * @return Error code. @@ -357,8 +357,8 @@ int i18n_udate_set_lenient(i18n_udate_format_h format, i18n_ubool is_lenient); * @details An #i18n_udate_format_h uses an #i18n_ucalendar_h to convert a raw value to, for example, the day of the week. * @since_tizen 2.3.1 * - * @param[in] format The #i18n_udate_format_h to query. - * @param[out] calendar A pointer to the #i18n_ucalendar_h used by format. + * @param[in] format The #i18n_udate_format_h to query. + * @param[out] calendar A pointer to the #i18n_ucalendar_h used by format. * * @return Error code. * @exception #I18N_ERROR_NONE Successful @@ -373,8 +373,8 @@ int i18n_udate_get_calendar(const i18n_udate_format_h format, i18n_ucalendar_h * * @details An #i18n_udate_format_h uses an #i18n_ucalendar_h to convert a raw value to, for example, the day of the week. * @since_tizen 2.3.1 * - * @param[in] format The #i18n_udate_format_h. - * @param[in] calendar_to_set An #i18n_ucalendar_h to be used by the format. + * @param[in] format The #i18n_udate_format_h. + * @param[in] calendar_to_set An #i18n_ucalendar_h to be used by the format. * * @return Error code. * @retval #I18N_ERROR_NONE Successful @@ -389,8 +389,8 @@ int i18n_udate_set_calendar(i18n_udate_format_h format, const i18n_ucalendar_h c * @details An #i18n_udate_format_h uses an #i18n_unumber_format_h to format numbers within a date, for example the day number. * @since_tizen 2.3.1 * - * @param[in] format The formatter to query. - * @param[out] number_format A pointer to the #i18n_unumber_format_h used by @a format to format numbers. + * @param[in] format The formatter to query. + * @param[out] number_format A pointer to the #i18n_unumber_format_h used by @a format to format numbers. * * @return Error code. * @exception #I18N_ERROR_NONE Successful @@ -405,8 +405,8 @@ int i18n_udate_get_number_format(const i18n_udate_format_h format, i18n_unumber_ * @details An #i18n_udate_format_h uses an #i18n_unumber_format_h to format numbers within a date, for example the day number. * @since_tizen 2.3.1 * - * @param[in] format The #i18n_udate_format_h to set. - * @param[in] number_format_to_set An #i18n_unumber_format_h to be used by @a format to format numbers. + * @param[in] format The #i18n_udate_format_h to set. + * @param[in] number_format_to_set An #i18n_unumber_format_h to be used by @a format to format numbers. * * @return Error code. * @retval #I18N_ERROR_NONE Successful @@ -422,7 +422,7 @@ int i18n_udate_set_number_format(i18n_udate_format_h format, const i18n_unumber_ * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] locale_index The index of the desired locale. + * @param[in] locale_index The index of the desired locale. * * @return A locale for which date/time formatting patterns are available, or 0 if none. * @exception #I18N_ERROR_NONE Successful @@ -452,7 +452,7 @@ int32_t i18n_udate_count_available(void); * * @since_tizen 2.3.1 * - * @param[in] format The #i18n_udate_format_h to get. + * @param[in] format The #i18n_udate_format_h to get. * @param[out] year A pointer to the year relative to which all 2-digit years are interpreted. * * @return Error code. Error codes not listed below are described in #i18n_error_code_e @@ -470,7 +470,7 @@ int i18n_udate_get_2digit_year_start(const i18n_udate_format_h format, i18n_udat * @since_tizen 2.3.1 * * @param[in] format The #i18n_udate_format_h to map. - * @param[in] date The year relative to which all 2-digit years will be interpreted. + * @param[in] date The year relative to which all 2-digit years will be interpreted. * * @return Error code. Error codes not listed below are described in #i18n_error_code_e * @retval #I18N_ERROR_NONE Successful @@ -484,13 +484,13 @@ int i18n_udate_set_2digit_year_start(i18n_udate_format_h format, i18n_udate date * @brief Extracts the pattern from an #i18n_udate_format_h. * @details The pattern will follow the pattern syntax rules. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] format The #i18n_udate_format_h to query. - * @param[in] localized true if the pattern should be localized, false otherwise. - * @param[out] result A pointer to a buffer to receive the pattern. - * @param[in] result_length The maximum size of result. + * @param[in] format The #i18n_udate_format_h to query. + * @param[in] localized true if the pattern should be localized, false otherwise. + * @param[out] result A pointer to a buffer to receive the pattern. + * @param[in] result_length The maximum size of result. * * @return The total buffer size needed; if greater than result_length, the output was truncated. * @@ -500,16 +500,16 @@ int i18n_udate_set_2digit_year_start(i18n_udate_format_h format, i18n_udate date * @see i18n_udate_apply_pattern() */ int32_t i18n_udate_to_pattern(const i18n_udate_format_h format, i18n_ubool localized, i18n_uchar *result, - int32_t result_length); + int32_t result_length); /** * @brief Sets the pattern used by an #i18n_udate_format_h. * @details The pattern should follow the pattern syntax rules. * @since_tizen 2.3.1 * - * @param[in] format The #i18n_udate_format_h to set. - * @param[in] localized true if the pattern is localized, false otherwise. - * @param[in] pattern The new pattern. + * @param[in] format The #i18n_udate_format_h to set. + * @param[in] localized true if the pattern is localized, false otherwise. + * @param[in] pattern The new pattern. * @param[in] pattern_length The length of pattern, or -1 if NULL-terminated. * * @return Error code. @@ -519,20 +519,20 @@ int32_t i18n_udate_to_pattern(const i18n_udate_format_h format, i18n_ubool local * @see i18n_udate_to_pattern() */ int i18n_udate_apply_pattern(i18n_udate_format_h format, i18n_ubool localized, const i18n_uchar *pattern, - int32_t pattern_length); + int32_t pattern_length); /** * @brief Gets the symbols associated with an #i18n_udate_format_h. * @details The symbols are what an #i18n_udate_format_h uses to represent locale-specific data, for example month or day names. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] format The #i18n_udate_format_h to query. - * @param[in] type The type of symbols to get. - * All the types defined in the #i18n_udate_format_symbol_type_e enumeration are supported. - * @param[in] symbol_index The desired symbol of type type. - * @param[out] result A pointer to a buffer to receive the pattern. + * @param[in] format The #i18n_udate_format_h to query. + * @param[in] type The type of symbols to get. + * All the types defined in the #i18n_udate_format_symbol_type_e enumeration are supported. + * @param[in] symbol_index The desired symbol of type type. + * @param[out] result A pointer to a buffer to receive the pattern. * @param[in] result_length The maximum size of the result buffer. * * @return The total buffer size needed; if greater than result_length, the output was truncated. @@ -544,7 +544,7 @@ int i18n_udate_apply_pattern(i18n_udate_format_h format, i18n_ubool localized, c * @see #i18n_udate_set_symbols() */ int32_t i18n_udate_get_symbols(const i18n_udate_format_h format, i18n_udate_format_symbol_type_e type, int32_t symbol_index, - i18n_uchar *result, int32_t result_length); + i18n_uchar *result, int32_t result_length); /** * @brief Counts the number of particular symbols for an #i18n_udate_format_h. @@ -553,8 +553,8 @@ int32_t i18n_udate_get_symbols(const i18n_udate_format_h format, i18n_udate_form * @since_tizen 2.3.1 * * @param[in] format The #i18n_udate_format_h to query. - * @param[in] type The type of symbols to count. - * If wrong type is passed, 0 will be returned. + * @param[in] type The type of symbols to count. + * If wrong type is passed, 0 will be returned. * * @return The number of symbols of type @a type. * @@ -572,12 +572,12 @@ int32_t i18n_udate_count_symbols(const i18n_udate_format_h format, i18n_udate_fo * * @since_tizen 2.3.1 * - * @param[in] format The #i18n_udate_format_h to set. - * @param[in] type The type of symbols to set. - * All the types defined in the #i18n_udate_format_symbol_type_e enumeration are supported. - * If a type not defined in the enumeration is passed, then the #I18N_ERROR_NOT_SUPPORTED error is returned. + * @param[in] format The #i18n_udate_format_h to set. + * @param[in] type The type of symbols to set. + * All the types defined in the #i18n_udate_format_symbol_type_e enumeration are supported. + * If a type not defined in the enumeration is passed, then the #I18N_ERROR_NOT_SUPPORTED error is returned. * @param[in] symbol_index The index of the symbol to set of type type. - * @param[in] value The new value. + * @param[in] value The new value. * @param[in] value_length The length of @a value, or @c -1 if NULL-terminated. * * @return Error code. Error codes not listed below are described in the #i18n_error_code_e enumeration. @@ -588,24 +588,24 @@ int32_t i18n_udate_count_symbols(const i18n_udate_format_h format, i18n_udate_fo * @see #i18n_udate_get_symbols() */ int i18n_udate_set_symbols(i18n_udate_format_h format, i18n_udate_format_symbol_type_e type, int32_t symbol_index, - i18n_uchar *value, int32_t value_length); + i18n_uchar *value, int32_t value_length); /** * @brief Gets the locale for this date format object. * @details You can choose between valid and actual locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[in] format The #i18n_udate_format_h to get the locale from. - * @param[in] type The type of the locale we're looking for (valid or actual). + * @param[in] type The type of the locale we're looking for (valid or actual). * * @return The locale name. * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -const char * i18n_udate_get_locale_by_type(const i18n_udate_format_h format, i18n_ulocale_data_locale_type_e type); +const char *i18n_udate_get_locale_by_type(const i18n_udate_format_h format, i18n_ulocale_data_locale_type_e type); /** * @brief Sets a particular #i18n_udisplay_context_e value in the formatter, such as #I18N_UDISPLAY_CONTEXT_CAPITALIZATION_FOR_STANDALONE. diff --git a/src/include/mobile/utils_i18n_udatepg.h b/src/include/mobile/utils_i18n_udatepg.h old mode 100755 new mode 100644 index 8308288..a2f9f3b --- a/src/include/mobile/utils_i18n_udatepg.h +++ b/src/include/mobile/utils_i18n_udatepg.h @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef __UTILS_I18N_UDATEPG_H__ @@ -31,7 +31,7 @@ * @brief The Udatepg module provides flexible generation of date format patterns, like "yy-MM-dd". The user can build up the generator by adding successive patterns. * * @section CAPI_BASE_UTILS_I18N_UDATEPG_MODULE_HEADER Required Header - * \#include + * \#include * * @section CAPI_BASE_UTILS_I18N_UDATEPG_MODULE_OVERVIEW Overview * @details The Udatepg module provides flexible generation of date format patterns, @@ -49,112 +49,112 @@ * @section CAPI_BASE_UTILS_I18N_UDATEPG_MODULE_SAMPLE_CODE_1 Sample Code 1 * @brief Gets the best pattern according to a given locale and formats a current date and time using an i18n_udate_format_h * @code - i18n_udatepg_h pattern_generator = NULL; - char *locale = I18N_ULOCALE_US; - - dlog_print(DLOG_INFO, LOG_TAG, "pattern_generator\n"); - - if(!pattern_generator) { - // create a pattern generator according to a given locale - i18n_udatepg_create(locale, &pattern_generator); - } - - if(!pattern_generator) { - dlog_print(DLOG_INFO, LOG_TAG, "i18n_udatepg_create fail"); - return ; - } - - i18n_uchar bestPattern[64] = {0,}; - char bestPatternString[64] = {0,}; - int bestPatternLength, len; - const char *custom_format = "yyyy.MM.dd G 'at' HH:mm:ss zzz"; - i18n_uchar uch_custom_format[64]; - int ret = I18N_ERROR_NONE; - - dlog_print(DLOG_INFO, LOG_TAG, "getBestPattern\n"); - - i18n_ustring_copy_ua(uch_custom_format, custom_format); - len = i18n_ustring_get_length(uch_custom_format); - - // gets the best pattern that matches the given custom_format - i18n_udatepg_get_best_pattern(pattern_generator, uch_custom_format, len, bestPattern, 64, &bestPatternLength); - - i18n_ustring_copy_au_n(bestPatternString, bestPattern, 64); - // gets "MM/dd/yyyy G h:mm:ss a zzz" as the best pattern - dlog_print(DLOG_INFO, LOG_TAG, "getBestPattern(char[]) : %s \n", bestPatternString); - - // closes a generator - i18n_udatepg_destroy(pattern_generator); - - i18n_udate_format_h formatter_KR = NULL; - i18n_udate_format_h formatter_LA = NULL; - i18n_udate_format_h formatter_SaoPaulo = NULL; - i18n_uchar formatted[64] = {0,}; - char result[64] = {0,}; - int formattedLength; - i18n_udate date; - const char *timezone_KR = "GMT+9:00"; // TimeZone for Korea/Seoul - const char *timezone_LA = "America/Los_Angeles"; - const char *timezone_SaoPaulo = "America/Sao_Paulo"; // Brazil/East - i18n_uchar utf16_timezone_KR[64] = {0,}; - i18n_uchar utf16_timezone_LA[64] = {0,}; - i18n_uchar utf16_timezone_SaoPaulo[64] = {0,}; - - i18n_ustring_copy_ua_n(utf16_timezone_KR, timezone_KR, strlen(timezone_KR)); - i18n_ustring_copy_ua_n(utf16_timezone_LA, timezone_LA, strlen(timezone_LA)); - i18n_ustring_copy_ua_n(utf16_timezone_SaoPaulo, timezone_SaoPaulo, strlen(timezone_SaoPaulo)); - - // creates new i18n_udate_format to format dates and times - ret = i18n_udate_create(I18N_UDATE_FULL , I18N_UDATE_FULL , locale, utf16_timezone_KR, -1, bestPattern, -1, &formatter_KR); - if (ret != I18N_ERROR_NONE) { - dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); - } - if (!formatter_KR) { - dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n"); - } - ret = i18n_udate_create(I18N_UDATE_FULL , I18N_UDATE_FULL , locale, utf16_timezone_LA, -1, bestPattern, -1, &formatter_LA); - if (ret != I18N_ERROR_NONE) { - dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); - } - if (!formatter_LA) { - dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n"); - } - ret = i18n_udate_create(I18N_UDATE_PATTERN , I18N_UDATE_PATTERN , locale, utf16_timezone_SaoPaulo, -1, bestPattern, -1, &formatter_SaoPaulo); - if (ret != I18N_ERROR_NONE) { - dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); - } - if (!formatter_LA) { - dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n"); - } - - dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_format_date\n"); - - // gets the current date and time - i18n_ucalendar_get_now(&date); - - // formats a date using i18n_udate_format - i18n_udate_format_date(formatter_KR, date, formatted, 64, NULL, &formattedLength); - i18n_ustring_copy_au_n(result, formatted, 64); - //ex) KOREA/Seoul - Current date : Wednesday, June 18, 2014 1:34:54 PM GMT+09:00 - dlog_print(DLOG_INFO, LOG_TAG, "KOREA/Seoul - Current date : %s\n",result); - - // formats a date using i18n_udate_format - i18n_udate_format_date(formatter_LA, date, formatted, 64, NULL, &formattedLength); - i18n_ustring_copy_au_n(result, formatted, 64); - //ex) America/LOS Angeles - Current date : Tuesday, June 17, 2014 9:34:54 PM Pacific Daylight Time - dlog_print(DLOG_INFO, LOG_TAG, "America/LOS Angeles - Current date : %s\n",result); - - // formats a date using i18n_udate_format - i18n_udate_format_date(formatter_SaoPaulo, date, formatted, 64, NULL, &formattedLength); - i18n_ustring_copy_au_n(result, formatted, 64); - //ex) Brazil/Sao Paulo - Current date : 6 18, 2014 AD, 1:34:54 PM GMT-2 - dlog_print(DLOG_INFO, LOG_TAG, "Brazil/Sao Paulo - Current date : %s\n",result); - - dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_destroy\n"); - // destroy an #i18n_udate_format_h - i18n_udate_destroy(formatter_KR); - i18n_udate_destroy(formatter_LA); - i18n_udate_destroy(formatter_SaoPaulo); + i18n_udatepg_h pattern_generator = NULL; + char *locale = I18N_ULOCALE_US; + + dlog_print(DLOG_INFO, LOG_TAG, "pattern_generator\n"); + + if(!pattern_generator) { + // create a pattern generator according to a given locale + i18n_udatepg_create(locale, &pattern_generator); + } + + if(!pattern_generator) { + dlog_print(DLOG_INFO, LOG_TAG, "i18n_udatepg_create fail"); + return ; + } + + i18n_uchar bestPattern[64] = {0,}; + char bestPatternString[64] = {0,}; + int bestPatternLength, len; + const char *custom_format = "yyyy.MM.dd G 'at' HH:mm:ss zzz"; + i18n_uchar uch_custom_format[64]; + int ret = I18N_ERROR_NONE; + + dlog_print(DLOG_INFO, LOG_TAG, "getBestPattern\n"); + + i18n_ustring_copy_ua(uch_custom_format, custom_format); + len = i18n_ustring_get_length(uch_custom_format); + + // gets the best pattern that matches the given custom_format + i18n_udatepg_get_best_pattern(pattern_generator, uch_custom_format, len, bestPattern, 64, &bestPatternLength); + + i18n_ustring_copy_au_n(bestPatternString, bestPattern, 64); + // gets "MM/dd/yyyy G h:mm:ss a zzz" as the best pattern + dlog_print(DLOG_INFO, LOG_TAG, "getBestPattern(char[]) : %s \n", bestPatternString); + + // closes a generator + i18n_udatepg_destroy(pattern_generator); + + i18n_udate_format_h formatter_KR = NULL; + i18n_udate_format_h formatter_LA = NULL; + i18n_udate_format_h formatter_SaoPaulo = NULL; + i18n_uchar formatted[64] = {0,}; + char result[64] = {0,}; + int formattedLength; + i18n_udate date; + const char *timezone_KR = "GMT+9:00"; // TimeZone for Korea/Seoul + const char *timezone_LA = "America/Los_Angeles"; + const char *timezone_SaoPaulo = "America/Sao_Paulo"; // Brazil/East + i18n_uchar utf16_timezone_KR[64] = {0,}; + i18n_uchar utf16_timezone_LA[64] = {0,}; + i18n_uchar utf16_timezone_SaoPaulo[64] = {0,}; + + i18n_ustring_copy_ua_n(utf16_timezone_KR, timezone_KR, strlen(timezone_KR)); + i18n_ustring_copy_ua_n(utf16_timezone_LA, timezone_LA, strlen(timezone_LA)); + i18n_ustring_copy_ua_n(utf16_timezone_SaoPaulo, timezone_SaoPaulo, strlen(timezone_SaoPaulo)); + + // creates new i18n_udate_format to format dates and times + ret = i18n_udate_create(I18N_UDATE_FULL , I18N_UDATE_FULL , locale, utf16_timezone_KR, -1, bestPattern, -1, &formatter_KR); + if (ret != I18N_ERROR_NONE) { + dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); + } + if (!formatter_KR) { + dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n"); + } + ret = i18n_udate_create(I18N_UDATE_FULL , I18N_UDATE_FULL , locale, utf16_timezone_LA, -1, bestPattern, -1, &formatter_LA); + if (ret != I18N_ERROR_NONE) { + dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); + } + if (!formatter_LA) { + dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n"); + } + ret = i18n_udate_create(I18N_UDATE_PATTERN , I18N_UDATE_PATTERN , locale, utf16_timezone_SaoPaulo, -1, bestPattern, -1, &formatter_SaoPaulo); + if (ret != I18N_ERROR_NONE) { + dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); + } + if (!formatter_LA) { + dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n"); + } + + dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_format_date\n"); + + // gets the current date and time + i18n_ucalendar_get_now(&date); + + // formats a date using i18n_udate_format + i18n_udate_format_date(formatter_KR, date, formatted, 64, NULL, &formattedLength); + i18n_ustring_copy_au_n(result, formatted, 64); + //ex) KOREA/Seoul - Current date : Wednesday, June 18, 2014 1:34:54 PM GMT+09:00 + dlog_print(DLOG_INFO, LOG_TAG, "KOREA/Seoul - Current date : %s\n",result); + + // formats a date using i18n_udate_format + i18n_udate_format_date(formatter_LA, date, formatted, 64, NULL, &formattedLength); + i18n_ustring_copy_au_n(result, formatted, 64); + //ex) America/LOS Angeles - Current date : Tuesday, June 17, 2014 9:34:54 PM Pacific Daylight Time + dlog_print(DLOG_INFO, LOG_TAG, "America/LOS Angeles - Current date : %s\n",result); + + // formats a date using i18n_udate_format + i18n_udate_format_date(formatter_SaoPaulo, date, formatted, 64, NULL, &formattedLength); + i18n_ustring_copy_au_n(result, formatted, 64); + //ex) Brazil/Sao Paulo - Current date : 6 18, 2014 AD, 1:34:54 PM GMT-2 + dlog_print(DLOG_INFO, LOG_TAG, "Brazil/Sao Paulo - Current date : %s\n",result); + + dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_destroy\n"); + // destroy an #i18n_udate_format_h + i18n_udate_destroy(formatter_KR); + i18n_udate_destroy(formatter_LA); + i18n_udate_destroy(formatter_SaoPaulo); * @endcode */ @@ -172,8 +172,8 @@ extern "C" { * @remarks Must release @a dtpg using i18n_udatepg_destroy(). * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[in] locale If @c NULL - default locale will be used. - * @param[out] dtpg A pointer to #i18n_udatepg_h. Must not be @c NULL. + * @param[in] locale If @c NULL - default locale will be used. + * @param[out] dtpg A pointer to #i18n_udatepg_h. Must not be @c NULL. * * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -184,7 +184,7 @@ int i18n_udatepg_create(const char *locale, i18n_udatepg_h *dtpg); * @brief Destroys a generator. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[in] dtpg A pointer to #i18n_udatepg_h. Must not be @c NULL. + * @param[in] dtpg A pointer to #i18n_udatepg_h. Must not be @c NULL. * * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -195,19 +195,19 @@ int i18n_udatepg_destroy(i18n_udatepg_h dtpg); * @brief Gets the best pattern matching the input skeleton. * @details It is guaranteed to have all of the fields in the skeleton. * @remarks This function uses a non-const #i18n_udatepg_h: - * It uses a stateful pattern parser which is set up for each generator object, - * rather than creating one for each function call. - * Consecutive calls to this function do not affect each other, - * but this function cannot be used concurrently on a single generator object. + * It uses a stateful pattern parser which is set up for each generator object, + * rather than creating one for each function call. + * Consecutive calls to this function do not affect each other, + * but this function cannot be used concurrently on a single generator object. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[in] dtpg A pointer to #i18n_udatepg_h. Must not be @c NULL. - * @param[in] skeleton The skeleton is a pattern containing only the variable fields.\n - * For example, "MMMdd" and "mmhh" are skeletons. Must not be @c NULL. - * @param[in] len The length of the @a skeleton, >= 0. - * @param[out] best_pattern The best pattern found from the given @a skeleton. - * @param[in] capacity The capacity of @a best_pattern, >= 0 - * @param[out] best_pattern_len The length of @a best_pattern. + * @param[in] dtpg A pointer to #i18n_udatepg_h. Must not be @c NULL. + * @param[in] skeleton The skeleton is a pattern containing only the variable fields.\n + * For example, "MMMdd" and "mmhh" are skeletons. Must not be @c NULL. + * @param[in] len The length of the @a skeleton, >= 0. + * @param[out] best_pattern The best pattern found from the given @a skeleton. + * @param[in] capacity The capacity of @a best_pattern, >= 0 + * @param[out] best_pattern_len The length of @a best_pattern. * * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -216,14 +216,14 @@ int i18n_udatepg_destroy(i18n_udatepg_h dtpg); int i18n_udatepg_get_best_pattern(i18n_udatepg_h dtpg, const i18n_uchar *skeleton, int32_t len, i18n_uchar *best_pattern, int32_t capacity, int32_t *best_pattern_len); -// Newly Added APIs +/* Newly Added APIs */ /** * @brief Creates an empty generator, to be constructed with i18n_udatepg_add_pattern() etc. * @since_tizen 2.3.1 * - * @param[out] dtpg A pointer to the #i18n_udatepg_h handle. + * @param[out] dtpg A pointer to the #i18n_udatepg_h handle. * * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful @@ -235,38 +235,38 @@ int i18n_udatepg_create_empty(i18n_udatepg_h *dtpg); * @brief Creates a copy of a generator. * @since_tizen 2.3.1 * - * @param[in] dtpg An #i18n_udatepg_h handle to be copied. Must not be @c NULL. - * @param[out] dtpg_clone A pointer to clone of @c dtpg handle. + * @param[in] dtpg An #i18n_udatepg_h handle to be copied. Must not be @c NULL. + * @param[out] dtpg_clone A pointer to clone of @c dtpg handle. * * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_udatepg_clone(const i18n_udatepg_h dtpg, i18n_udatepg_h * dtpg_clone); +int i18n_udatepg_clone(const i18n_udatepg_h dtpg, i18n_udatepg_h *dtpg_clone); /** * @brief Gets the best pattern matching the input @a skeleton. * @details It is guaranteed to have all of the fields in the @a skeleton. * - * Note that this function uses a non-const #i18n_udatepg_h: - * It uses a stateful pattern parser which is set up for each generator object, - * rather than creating one for each function call. - * Consecutive calls to this function do not affect each other, - * but this function cannot be used concurrently on a single generator object. + * Note that this function uses a non-const #i18n_udatepg_h: + * It uses a stateful pattern parser which is set up for each generator object, + * rather than creating one for each function call. + * Consecutive calls to this function do not affect each other, + * but this function cannot be used concurrently on a single generator object. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] dtpg An #i18n_udatepg_h handle. Must not be @c NULL. - * @param[in] skeleton The @c skeleton is a pattern containing only the variable fields; - * for example, "MMMdd" and "mmhh" are skeletons. Must not be @c NULL. - * @param[in] length The length of @c skeleton, >= 0. - * @param[in] options Options for forcing the length of specified fields in the - * returned pattern to match those in the @c skeleton (when this - * would not happen otherwise). For default behavior, use - * #I18N_UDATEPG_MATCH_NO_OPTIONS. - * @param[out] best_pattern The best pattern found from the given @c skeleton. - * @param[in] capacity The capacity of @c best_pattern, >= 0. + * @param[in] dtpg An #i18n_udatepg_h handle. Must not be @c NULL. + * @param[in] skeleton The @c skeleton is a pattern containing only the variable fields; + * for example, "MMMdd" and "mmhh" are skeletons. Must not be @c NULL. + * @param[in] length The length of @c skeleton, >= 0. + * @param[in] options Options for forcing the length of specified fields in the + * returned pattern to match those in the @c skeleton (when this + * would not happen otherwise). For default behavior, use + * #I18N_UDATEPG_MATCH_NO_OPTIONS. + * @param[out] best_pattern The best pattern found from the given @c skeleton. + * @param[in] capacity The capacity of @c best_pattern, >= 0. * * @return The length of @c best_pattern. * @@ -274,24 +274,24 @@ int i18n_udatepg_clone(const i18n_udatepg_h dtpg, i18n_udatepg_h * dtpg_clone); * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ int32_t i18n_udatepg_get_best_pattern_with_options(i18n_udatepg_h dtpg, const i18n_uchar *skeleton, int32_t length, - i18n_udatepg_date_time_pattern_match_options_e options, i18n_uchar *best_pattern, int32_t capacity); + i18n_udatepg_date_time_pattern_match_options_e options, i18n_uchar *best_pattern, int32_t capacity); /** * @brief Gets a unique skeleton from a given pattern. For example, both "MMM-dd" and "dd/MMM" produce the skeleton "MMMdd". * @details Note that this function uses a non-const #i18n_udatepg_h: - * It uses a stateful pattern parser which is set up for each generator object, - * rather than creating one for each function call. - * Consecutive calls to this function do not affect each other, - * but this function cannot be used concurrently on a single generator object. + * It uses a stateful pattern parser which is set up for each generator object, + * rather than creating one for each function call. + * Consecutive calls to this function do not affect each other, + * but this function cannot be used concurrently on a single generator object. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] dtpg An #i18n_udatepg_h handle. Must not be @c NULL. - * @param[in] pattern Input pattern, such as "dd/MMM". Must not be @c NULL. - * @param[in] length The length of @c pattern, >= 0. - * @param[out] skeleton Such as "MMMdd". - * @param[in] capacity The capacity of @c skeleton, >= 0. + * @param[in] dtpg An #i18n_udatepg_h handle. Must not be @c NULL. + * @param[in] pattern Input pattern, such as "dd/MMM". Must not be @c NULL. + * @param[in] length The length of @c pattern, >= 0. + * @param[out] skeleton Such as "MMMdd". + * @param[in] capacity The capacity of @c skeleton, >= 0. * * @return The length of @c skeleton. * @@ -303,22 +303,22 @@ int32_t i18n_udatepg_get_skeleton(i18n_udatepg_h dtpg, const i18n_uchar *pattern /** * @brief Gets a unique base skeleton from a given pattern. * @details This is the same as the skeleton, except that differences in length are minimized so - * as to only preserve the difference between string and numeric form. So - * for example, both "MMM-dd" and "d/MMM" produce the skeleton "MMMd"(notice the single d).
- * Note that this function uses a non-const #i18n_udatepg_h : - * It uses a stateful pattern parser which is set up for each generator object, - * rather than creating one for each function call. - * Consecutive calls to this function do not affect each other, - * but this function cannot be used concurrently on a single generator object. + * as to only preserve the difference between string and numeric form. So + * for example, both "MMM-dd" and "d/MMM" produce the skeleton "MMMd"(notice the single d).
+ * Note that this function uses a non-const #i18n_udatepg_h : + * It uses a stateful pattern parser which is set up for each generator object, + * rather than creating one for each function call. + * Consecutive calls to this function do not affect each other, + * but this function cannot be used concurrently on a single generator object. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] dtpg An #i18n_udatepg_h handle. Must not be @c NULL. - * @param[in] pattern Input pattern, such as "dd/MMM". Must not be @c NULL. - * @param[in] length The length of @c pattern, >= 0. - * @param[out] base_skeleton Such as "Md". - * @param[in] capacity The capacity of base @c skeleton, >= 0. + * @param[in] dtpg An #i18n_udatepg_h handle. Must not be @c NULL. + * @param[in] pattern Input pattern, such as "dd/MMM". Must not be @c NULL. + * @param[in] length The length of @c pattern, >= 0. + * @param[out] base_skeleton Such as "Md". + * @param[in] capacity The capacity of base @c skeleton, >= 0. * * @return The length of @c base_skeleton. * @@ -330,48 +330,48 @@ int32_t i18n_udatepg_get_base_skeleton(i18n_udatepg_h dtpg, const i18n_uchar *pa /** * @brief Adds a pattern to the generator. * @details If the pattern has the same skeleton as an existing pattern, - * and the override parameter is set, then the previous - * value is overridden. Otherwise, the previous value is retained. - * In either case, the conflicting status is set and previous value is stored in conflicting pattern.
- * Note that single-field patterns (like "MMM") are automatically added, and don't need to be added explicitly! + * and the override parameter is set, then the previous + * value is overridden. Otherwise, the previous value is retained. + * In either case, the conflicting status is set and previous value is stored in conflicting pattern.
+ * Note that single-field patterns (like "MMM") are automatically added, and don't need to be added explicitly! * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] dtpg An #i18n_udatepg_h handle. Must not be @c NULL. - * @param[in] pattern Input pattern, such as "dd/MMM". Must not be @c NULL. - * @param[in] pattern_length The length of @c pattern, >= 0. - * @param[in] override when existing values are to be overridden use true, - * otherwise use false. - * @param[out] conflicting_pattern Previous pattern with the same skeleton. - * @param[in] capacity The capacity of @c conflicting_pattern. + * @param[in] dtpg An #i18n_udatepg_h handle. Must not be @c NULL. + * @param[in] pattern Input pattern, such as "dd/MMM". Must not be @c NULL. + * @param[in] pattern_length The length of @c pattern, >= 0. + * @param[in] override when existing values are to be overridden use true, + * otherwise use false. + * @param[out] conflicting_pattern Previous pattern with the same skeleton. + * @param[in] capacity The capacity of @c conflicting_pattern. * @param[out] conflict_status A pointer to the conflicting status - * The value could be #I18N_UDATEPG_NO_CONFLICT, #I18N_UDATEPG_BASE_CONFLICT or #I18N_UDATEPG_CONFLICT. + * The value could be #I18N_UDATEPG_NO_CONFLICT, #I18N_UDATEPG_BASE_CONFLICT or #I18N_UDATEPG_CONFLICT. * - * @return Length of @c conflicting_pattern. -1 if @c conflict_status is #I18N_UDATEPG_NO_CONFLICT + * @return Length of @c conflicting_pattern. -1 if @c conflict_status is #I18N_UDATEPG_NO_CONFLICT * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_udatepg_add_pattern(i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t pattern_length, i18n_ubool override, i18n_uchar *conflicting_pattern, int32_t capacity, i18n_udatepg_date_time_pattern_conflict_e * conflict_status); +int32_t i18n_udatepg_add_pattern(i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t pattern_length, i18n_ubool override, i18n_uchar *conflicting_pattern, int32_t capacity, i18n_udatepg_date_time_pattern_conflict_e *conflict_status); /** * @brief An append_item_format is a pattern used to append a field if there is no good match. * @details For example, suppose that the input skeleton is "GyyyyMMMd", - * and there is no matching pattern internally, but there is a pattern - * matching "yyyyMMMd", say "d-MM-yyyy". Then that pattern is used, plus the G. - * The way these two are conjoined is by using the append_item_format for G (era). - * So if that value is, say "{0}, {1}" then the final resulting - * pattern is "d-MM-yyyy, G".
- * There are actually three available variables : {0} is the pattern so far, - * {1} is the element we are adding, and {2} is the name of the element.
- * This reflects the way that the CLDR data is organized. + * and there is no matching pattern internally, but there is a pattern + * matching "yyyyMMMd", say "d-MM-yyyy". Then that pattern is used, plus the G. + * The way these two are conjoined is by using the append_item_format for G (era). + * So if that value is, say "{0}, {1}" then the final resulting + * pattern is "d-MM-yyyy, G".
+ * There are actually three available variables : {0} is the pattern so far, + * {1} is the element we are adding, and {2} is the name of the element.
+ * This reflects the way that the CLDR data is organized. * @since_tizen 2.3.1 * - * @param[in] dtpg An #i18n_udatepg_h handle. Must not be @c NULL. - * @param[in] field One of #i18n_udatepg_date_time_pattern_field_e, such as #I18N_UDATEPG_ERA_FIELD. - * @param[in] value Pattern, such as "{0}, {1}". Must not be @c NULL. - * @param[in] length The length of @c value, >= 0. + * @param[in] dtpg An #i18n_udatepg_h handle. Must not be @c NULL. + * @param[in] field One of #i18n_udatepg_date_time_pattern_field_e, such as #I18N_UDATEPG_ERA_FIELD. + * @param[in] value Pattern, such as "{0}, {1}". Must not be @c NULL. + * @param[in] length The length of @c value, >= 0. * * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful @@ -385,12 +385,12 @@ int i18n_udatepg_set_append_item_format(i18n_udatepg_h dtpg, i18n_udatepg_date_t * @brief Getter corresponding to i18n_udatepg_set_append_item_format(). * @details Values below 0 or at or above #I18N_UDATEPG_FIELD_COUNT are illegal arguments. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] dtpg An #i18n_udatepg_h handle. Must not be @c NULL. - * @param[in] field One of #i18n_udatepg_date_time_pattern_field_e, such as #I18N_UDATEPG_ERA_FIELD. - * @param[out] pattern_length A pointer that will receive the length of append item format @a value. + * @param[in] dtpg An #i18n_udatepg_h handle. Must not be @c NULL. + * @param[in] field One of #i18n_udatepg_date_time_pattern_field_e, such as #I18N_UDATEPG_ERA_FIELD. + * @param[out] pattern_length A pointer that will receive the length of append item format @a value. * * @return The append_item_format for @a field * @@ -404,13 +404,13 @@ const i18n_uchar *i18n_udatepg_get_append_item_format(const i18n_udatepg_h dtpg, /** * @brief Sets the name of field, e.g. "era" in English for ERA. * @details These are only used if the corresponding append_item_format is used, and if it contains a {2} variable. - * This reflects the way that the CLDR data is organized. + * This reflects the way that the CLDR data is organized. * @since_tizen 2.3.1 * - * @param[in] dtpg An #i18n_udatepg_h handle. Must not be @c NULL. - * @param[in] field #i18n_udatepg_date_time_pattern_field_e, such as #I18N_UDATEPG_ERA_FIELD. - * @param[in] value Name for the @c field. Must not be @c NULL. - * @param[in] length The length of @c value, >= 0. + * @param[in] dtpg An #i18n_udatepg_h handle. Must not be @c NULL. + * @param[in] field #i18n_udatepg_date_time_pattern_field_e, such as #I18N_UDATEPG_ERA_FIELD. + * @param[in] value Name for the @c field. Must not be @c NULL. + * @param[in] length The length of @c value, >= 0. * * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful @@ -419,18 +419,18 @@ const i18n_uchar *i18n_udatepg_get_append_item_format(const i18n_udatepg_h dtpg, * @see i18n_udatepg_get_append_item_name() */ int i18n_udatepg_set_append_item_name(i18n_udatepg_h dtpg, i18n_udatepg_date_time_pattern_field_e field, const i18n_uchar *value, - int32_t length); + int32_t length); /** * @brief Getter corresponding to i18n_udatepg_set_append_item_name(). * @details Values below 0 or at or above #I18N_UDATEPG_FIELD_COUNT are illegal arguments. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] dtpg The #i18n_udate_format_h handle. Must not be @c NULL. - * @param[in] field #i18n_udatepg_date_time_pattern_field_e, such as #I18N_UDATEPG_ERA_FIELD. - * @param[out] pattern_length A pointer that will receive the length of the name for @c field. + * @param[in] dtpg The #i18n_udate_format_h handle. Must not be @c NULL. + * @param[in] field #i18n_udatepg_date_time_pattern_field_e, such as #I18N_UDATEPG_ERA_FIELD. + * @param[out] pattern_length A pointer that will receive the length of the name for @c field. * * @return The name for @c field * @@ -440,23 +440,23 @@ int i18n_udatepg_set_append_item_name(i18n_udatepg_h dtpg, i18n_udatepg_date_tim * @see i18n_udatepg_set_append_item_name() */ const i18n_uchar *i18n_udatepg_get_append_item_name(const i18n_udatepg_h dtpg, i18n_udatepg_date_time_pattern_field_e field, - int32_t *pattern_length); + int32_t *pattern_length); /** * @brief The date time format is a message format pattern used to compose date and time patterns. * @brief The default value is "{0} {1}", where {0} will be replaced by the date pattern and {1} will be replaced by the time pattern. - * This is used when the input skeleton contains both date and time fields, - * but there is not a close match among the added patterns. - * For example, suppose that this object was created by adding "dd-MMM" and "hh:mm", - * and its date time format is the default "{0} {1}". Then if the input skeleton is "MMMdhmm", - * there is not an exact match, so the input skeleton is broken up into two components "MMMd" and "hmm". - * There are close matches for those two skeletons, so the result is put together with this pattern, resulting in "d-MMM h:mm". + * This is used when the input skeleton contains both date and time fields, + * but there is not a close match among the added patterns. + * For example, suppose that this object was created by adding "dd-MMM" and "hh:mm", + * and its date time format is the default "{0} {1}". Then if the input skeleton is "MMMdhmm", + * there is not an exact match, so the input skeleton is broken up into two components "MMMd" and "hmm". + * There are close matches for those two skeletons, so the result is put together with this pattern, resulting in "d-MMM h:mm". * @since_tizen 2.3.1 * - * @param[in] dtpg An #i18n_udate_format_h handle. Must not be @c NULL. - * @param[in] date_time_format A message format pattern, here {0} will be replaced by the date pattern - * and {1} will be replaced by the time pattern. Must not be @c NULL. - * @param[in] length The length of @c date_time_format, >= 0. + * @param[in] dtpg An #i18n_udate_format_h handle. Must not be @c NULL. + * @param[in] date_time_format A message format pattern, here {0} will be replaced by the date pattern + * and {1} will be replaced by the time pattern. Must not be @c NULL. + * @param[in] length The length of @c date_time_format, >= 0. * * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful @@ -469,11 +469,11 @@ int i18n_udatepg_set_date_time_format(const i18n_udatepg_h dtpg, const i18n_ucha /** * @brief Getter corresponding to i18n_udatepg_set_date_time_format(). * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] dtpg An #i18n_udate_format_h handle. Must not be @c NULL. - * @param[out] pattern_length A pointer that will receive the length of the @a date_time_format. + * @param[in] dtpg An #i18n_udate_format_h handle. Must not be @c NULL. + * @param[out] pattern_length A pointer that will receive the length of the @a date_time_format. * * @return A date_time_format * @@ -487,14 +487,14 @@ const i18n_uchar *i18n_udatepg_get_date_time_format(const i18n_udatepg_h dtpg, i /** * @brief The decimal value is used in formatting fractions of seconds. * @details If the skeleton contains fractional seconds, then this is used with the fractional seconds. - * For example, suppose that the input pattern is "hhmmssSSSS", - * and the best matching pattern internally is "H:mm:ss", and the decimal string is ",". - * Then the resulting pattern is modified to be "H:mm:ss,SSSS" + * For example, suppose that the input pattern is "hhmmssSSSS", + * and the best matching pattern internally is "H:mm:ss", and the decimal string is ",". + * Then the resulting pattern is modified to be "H:mm:ss,SSSS" * @since_tizen 2.3.1 * - * @param[in] dtpg The #i18n_udate_format_h handle. Must not be @c NULL. - * @param[in] decimal Decimal. Must not be @c NULL. - * @param[in] length The length of @c decimal, >= 0. + * @param[in] dtpg The #i18n_udate_format_h handle. Must not be @c NULL. + * @param[in] decimal Decimal. Must not be @c NULL. + * @param[in] length The length of @c decimal, >= 0. * * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful @@ -507,11 +507,11 @@ int i18n_udatepg_set_decimal(i18n_udatepg_h dtpg, const i18n_uchar *decimal, int /** * @brief Getter corresponding to i18n_udatepg_set_decimal(). * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] dtpg The #i18n_udate_format_h handle. Must not be @c NULL. - * @param[out] pattern_length A pointer that will receive the length of the @a decimal string. + * @param[in] dtpg The #i18n_udate_format_h handle. Must not be @c NULL. + * @param[out] pattern_length A pointer that will receive the length of the @a decimal string. * * @return Corresponding to the decimal point. * @@ -525,23 +525,23 @@ const i18n_uchar *i18n_udatepg_get_decimal(const i18n_udatepg_h dtpg, int32_t *p /** * @brief Adjusts the field types (width and subtype) of a @a pattern to match what is in a @a skeleton. * @details That is, if you supply a @a pattern like "d-M H:m", and a @a skeleton of "MMMMddhhmm", - * then the input pattern is adjusted to be "dd-MMMM hh:mm". - * This is used internally to get the best match for the input @a skeleton, but can also be used externally.
- * Note that this function uses a non-const #i18n_udatepg_h: - * It uses a stateful pattern parser which is set up for each generator object, - * rather than creating one for each function call. Consecutive calls to this function do not affect each other, - * but this function cannot be used concurrently on a single generator object. + * then the input pattern is adjusted to be "dd-MMMM hh:mm". + * This is used internally to get the best match for the input @a skeleton, but can also be used externally.
+ * Note that this function uses a non-const #i18n_udatepg_h: + * It uses a stateful pattern parser which is set up for each generator object, + * rather than creating one for each function call. Consecutive calls to this function do not affect each other, + * but this function cannot be used concurrently on a single generator object. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] dtpg The #i18n_udate_format_h handle. Must not be @c NULL. - * @param[in] pattern Input pattern. Must not be @c NULL. - * @param[in] pattern_length The length of input @a pattern, >= 0. - * @param[in] skeleton The skeleton. Must not be @c NULL. - * @param[in] skeleton_length The length of input @a skeleton, >= 0. - * @param[out] dest Pattern adjusted to match the @a skeleton fields widths and subtypes. - * @param[in] dest_capacity The capacity of @a dest, >= 0. + * @param[in] dtpg The #i18n_udate_format_h handle. Must not be @c NULL. + * @param[in] pattern Input pattern. Must not be @c NULL. + * @param[in] pattern_length The length of input @a pattern, >= 0. + * @param[in] skeleton The skeleton. Must not be @c NULL. + * @param[in] skeleton_length The length of input @a skeleton, >= 0. + * @param[out] dest Pattern adjusted to match the @a skeleton fields widths and subtypes. + * @param[in] dest_capacity The capacity of @a dest, >= 0. * * @return The length of @a dest. * @@ -549,32 +549,32 @@ const i18n_uchar *i18n_udatepg_get_decimal(const i18n_udatepg_h dtpg, int32_t *p * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ int32_t i18n_udatepg_replace_field_types(i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t pattern_length, - const i18n_uchar *skeleton, int32_t skeleton_length, i18n_uchar *dest, int32_t dest_capacity); + const i18n_uchar *skeleton, int32_t skeleton_length, i18n_uchar *dest, int32_t dest_capacity); /** * @brief Adjusts the field types (width and subtype) of a pattern to match what is in a @a skeleton. * @details That is, if you supply a @a pattern like "d-M H:m", and a @a skeleton of "MMMMddhhmm", - * then the input @a pattern is adjusted to be "dd-MMMM hh:mm". - * This is used internally to get the best match for the input @a skeleton, but can also be used externally.
- * Note that this function uses a non-const #i18n_udatepg_h: - * It uses a stateful pattern parser which is set up for each generator object, - * rather than creating one for each function call. Consecutive calls to this function do not affect each other, - * but this function cannot be used concurrently on a single generator object. + * then the input @a pattern is adjusted to be "dd-MMMM hh:mm". + * This is used internally to get the best match for the input @a skeleton, but can also be used externally.
+ * Note that this function uses a non-const #i18n_udatepg_h: + * It uses a stateful pattern parser which is set up for each generator object, + * rather than creating one for each function call. Consecutive calls to this function do not affect each other, + * but this function cannot be used concurrently on a single generator object. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] dtpg The #i18n_udate_format_h handle. Must not be @c NULL. - * @param[in] pattern Input pattern. Must not be @c NULL. - * @param[in] pattern_length The length of input @a pattern, >= 0. - * @param[in] skeleton The skeleton. Must not be @c NULL. - * @param[in] skeleton_length The length of input @a skeleton, >= 0. - * @param[in] options Options controlling whether the length of specified - * fields in the @a pattern are adjusted to match those in the @a skeleton - * (when this would not happen otherwise). - * For default behavior, use #I18N_UDATEPG_MATCH_NO_OPTIONS. - * @param[out] dest Pattern adjusted to match the @a skeleton fields widths and subtypes. - * @param[in] dest_capacity The capacity of @a dest, >= 0. + * @param[in] dtpg The #i18n_udate_format_h handle. Must not be @c NULL. + * @param[in] pattern Input pattern. Must not be @c NULL. + * @param[in] pattern_length The length of input @a pattern, >= 0. + * @param[in] skeleton The skeleton. Must not be @c NULL. + * @param[in] skeleton_length The length of input @a skeleton, >= 0. + * @param[in] options Options controlling whether the length of specified + * fields in the @a pattern are adjusted to match those in the @a skeleton + * (when this would not happen otherwise). + * For default behavior, use #I18N_UDATEPG_MATCH_NO_OPTIONS. + * @param[out] dest Pattern adjusted to match the @a skeleton fields widths and subtypes. + * @param[in] dest_capacity The capacity of @a dest, >= 0. * * @return The length of @a dest. * @@ -582,15 +582,15 @@ int32_t i18n_udatepg_replace_field_types(i18n_udatepg_h dtpg, const i18n_uchar * * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ int32_t i18n_udatepg_replace_field_types_with_options(i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t pattern_length, - const i18n_uchar *skeleton, int32_t skeleton_length, i18n_udatepg_date_time_pattern_match_options_e options, - i18n_uchar *dest, int32_t dest_capacity); + const i18n_uchar *skeleton, int32_t skeleton_length, i18n_udatepg_date_time_pattern_match_options_e options, + i18n_uchar *dest, int32_t dest_capacity); /** * @brief Creates an #i18n_uenumeration_h for list of all the skeletons in canonical form. * @details Call i18n_udatepg_get_pattern_for_skeleton() to get the corresponding pattern. * @since_tizen 2.3.1 * - * @param[in] dtpg An #i18n_udate_format_h handle. Must not be @c NULL. + * @param[in] dtpg An #i18n_udate_format_h handle. Must not be @c NULL. * @param[out] enumeration A pointer to the #i18n_uenumeration_h for list of all the skeletons. The caller must destroy the object. * * @return The obtained error code. @@ -603,7 +603,7 @@ int i18n_udatepg_skeletons_create(const i18n_udatepg_h dtpg, i18n_uenumeration_h * @brief Creates an #i18n_uenumeration_h for list of all the base skeletons in canonical form. * @since_tizen 2.3.1 * - * @param[in] dtpg An #i18n_udate_format_h handle. Must not be @c NULL. + * @param[in] dtpg An #i18n_udate_format_h handle. Must not be @c NULL. * @param[out] enumeration A pointer to the #i18n_uenumeration_h for list of all the base skeletons. The caller must destroy the object. * * @return The obtained error code. @@ -615,13 +615,13 @@ int i18n_udatepg_base_skeletons_create(const i18n_udatepg_h dtpg, i18n_uenumerat /** * @brief Gets the pattern corresponding to a given skeleton. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] dtpg The #i18n_udate_format_h handle. Must not be @c NULL. - * @param[in] skeleton The skeleton. Must not be @c NULL. - * @param[in] skeleton_length The length of @a skeleton, >= 0. - * @param[out] pattern_length The pointer to the length of return pattern + * @param[in] dtpg The #i18n_udate_format_h handle. Must not be @c NULL. + * @param[in] skeleton The skeleton. Must not be @c NULL. + * @param[in] skeleton_length The length of @a skeleton, >= 0. + * @param[out] pattern_length The pointer to the length of return pattern * * @return Pattern corresponding to a given skeleton * diff --git a/src/include/mobile/utils_i18n_uenumeration.h b/src/include/mobile/utils_i18n_uenumeration.h old mode 100755 new mode 100644 index 543945d..42fab37 --- a/src/include/mobile/utils_i18n_uenumeration.h +++ b/src/include/mobile/utils_i18n_uenumeration.h @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef __UTILS_I18N_UENUMERATION_PRODUCT_H__ @@ -35,11 +35,11 @@ extern "C" { * @brief UEnumeration defines functions for handling String Enumeration. * * @section CAPI_BASE_UTILS_I18N_UENUMERATION_MODULE_HEADER Required Header - * \#include + * \#include * * @section CAPI_BASE_UTILS_I18N_UENUMERATION_MODULE_OVERVIEW Overview * @details The UEnumeration module allows to create String Enumeration - * from chars and uchars. + * from chars and uchars. * */ @@ -51,11 +51,11 @@ extern "C" { /** * @brief Disposes of resources in use by the iterator. * @details If @c enumeration is NULL, does nothing. After this call, any char* or i18n_uchar* returned - * by i18n_uenumeration_unext() or i18n_uenumeration_next() is invalid. + * by i18n_uenumeration_unext() or i18n_uenumeration_next() is invalid. * @remarks Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] enumeration An #i18n_uenumeration_h to destroy + * @param[in] enumeration An #i18n_uenumeration_h to destroy * * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful @@ -66,14 +66,14 @@ int i18n_uenumeration_destroy(i18n_uenumeration_h enumeration); /** * @brief Returns the number of elements that the iterator traverses. * @details If the iterator is out-of-sync with its service, error code is set to #I18N_ERROR_ENUM_OUT_OF_SYNC. - * This is a convenience function. It can end up being very expensive as all the items might have to be pre-fetched - * (depending on the type of data being traversed). - * Use with caution and only when necessary. + * This is a convenience function. It can end up being very expensive as all the items might have to be pre-fetched + * (depending on the type of data being traversed). + * Use with caution and only when necessary. * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exceptions section. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] enumeration An #i18n_uenumeration_h to count + * @param[in] enumeration An #i18n_uenumeration_h to count * * @return The number of elements in the iterator * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -84,21 +84,21 @@ int32_t i18n_uenumeration_count(i18n_uenumeration_h enumeration); /** * @brief Returns the next element in the iterator's list. * @details If there are no more elements, returns NULL. - * If the iterator is out-of-sync with its service, error code is set to #I18N_ERROR_ENUM_OUT_OF_SYNC and NULL is returned. - * If the native service string is a char* string, it is converted to i18n_uchar* with the invariant converter. - * The result is terminated by (i18n_uchar)0. + * If the iterator is out-of-sync with its service, error code is set to #I18N_ERROR_ENUM_OUT_OF_SYNC and NULL is returned. + * If the native service string is a char* string, it is converted to i18n_uchar* with the invariant converter. + * The result is terminated by (i18n_uchar)0. * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exceptions section. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] enumeration An #i18n_uenumeration_h - * @param[out] result_length A pointer to receive the length of the result (not including the terminating \\0). - * If the pointer is NULL it is ignored. + * @param[in] enumeration An #i18n_uenumeration_h + * @param[out] result_length A pointer to receive the length of the result (not including the terminating \\0). + * If the pointer is NULL it is ignored. * * @return A pointer to the string. The string will be zero-terminated. - * The return pointer is owned by this iterator and must not be deleted by the caller. - * The pointer is valid until the next call to any i18n_uenumeration_... method, including i18n_uenumeration_next() or i18n_uenumeration_unext(). - * When all strings have been traversed, returns NULL. + * The return pointer is owned by this iterator and must not be deleted by the caller. + * The pointer is valid until the next call to any i18n_uenumeration_... method, including i18n_uenumeration_next() or i18n_uenumeration_unext(). + * When all strings have been traversed, returns NULL. * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @exception #I18N_ERROR_ENUM_OUT_OF_SYNC The iterator is out of sync */ @@ -107,26 +107,26 @@ const i18n_uchar *i18n_uenumeration_unext(i18n_uenumeration_h enumeration, int32 /** * @brief Returns the next element in the iterator's list. * @details If there are no more elements, returns NULL. If the iterator is out-of-sync with its service, - * the #I18N_ERROR_ENUM_OUT_OF_SYNC error code is set and NULL is returned. - * If the native service string is a i18n_uchar* string, it is converted to char* with the invariant converter. - * The result is terminated by (char)0. If the conversion fails (because a character cannot be converted) - * then the error code is set to #I18N_ERROR_INVARIANT_CONVERSION and the return value is undefined (but non-NULL). + * the #I18N_ERROR_ENUM_OUT_OF_SYNC error code is set and NULL is returned. + * If the native service string is a i18n_uchar* string, it is converted to char* with the invariant converter. + * The result is terminated by (char)0. If the conversion fails (because a character cannot be converted) + * then the error code is set to #I18N_ERROR_INVARIANT_CONVERSION and the return value is undefined (but non-NULL). * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exceptions section. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] enumeration An #i18n_uenumeration_h - * @param[out] result_length A pointer to receive the length of the result (not including the terminating \\0). - * If the pointer is NULL it is ignored. + * @param[in] enumeration An #i18n_uenumeration_h + * @param[out] result_length A pointer to receive the length of the result (not including the terminating \\0). + * If the pointer is NULL it is ignored. * * @return A pointer to the string. The string will be zero-terminated. - * The return pointer is owned by this iterator and must not be deleted by the caller. - * The pointer is valid until the next call to any i18n_uenumeration_... method, including i18n_uenumeration_next() or i18n_uenumeration_unext(). - * When all strings have been traversed, returns NULL. + * The return pointer is owned by this iterator and must not be deleted by the caller. + * The pointer is valid until the next call to any i18n_uenumeration_... method, including i18n_uenumeration_next() or i18n_uenumeration_unext(). + * When all strings have been traversed, returns NULL. * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @exception #I18N_ERROR_ENUM_OUT_OF_SYNC The iterator is out of sync * @exception #I18N_ERROR_INVARIANT_CONVERSION The underlying native string is i18n_uchar* and conversion to char* with the invariant converter fails. - * This error pertains only to current string, so iteration might be able to continue successfully. + * This error pertains only to current string, so iteration might be able to continue successfully. */ const char *i18n_uenumeration_next(i18n_uenumeration_h enumeration, int32_t *result_length); @@ -136,7 +136,7 @@ const char *i18n_uenumeration_next(i18n_uenumeration_h enumeration, int32_t *res * @remarks Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] enumeration An #i18n_uenumeration_h + * @param[in] enumeration An #i18n_uenumeration_h * * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful @@ -147,12 +147,12 @@ int i18n_uenumeration_reset(i18n_uenumeration_h enumeration); /** * @brief Given an array of const i18n_uchar* strings, return an #i18n_uenumeration_h. * @details String pointers from 0..count-1 must not be NULL. - * Do not free or modify either the string array or the characters it points to until this object has been destroyed with i18n_uenumeration_destroy(). + * Do not free or modify either the string array or the characters it points to until this object has been destroyed with i18n_uenumeration_destroy(). * @remarks Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] strings An array of const i18n_uchar* strings (each null terminated). All storage is owned by the caller. - * @param[in] count The length of the array + * @param[in] strings An array of const i18n_uchar* strings (each null terminated). All storage is owned by the caller. + * @param[in] count The length of the array * @param[out] enumeration A pointer to the new #i18n_uenumeration_h. Caller is responsible for calling i18n_uenumeration_destroy() to free memory. * * @return The obtained error code. @@ -166,12 +166,12 @@ int i18n_uenumeration_uchar_strings_enumeration_create(const i18n_uchar *const s /** * @brief Given an array of const char* strings (invariant chars only), return an #i18n_uenumeration_h. * @details String pointers from 0..count-1 must not be NULL. - * Do not free or modify either the string array or the characters it points to until this object has been destroyed with i18n_uenumeration_destroy(). + * Do not free or modify either the string array or the characters it points to until this object has been destroyed with i18n_uenumeration_destroy(). * @remarks Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] strings A array of char* strings (each null terminated). All storage is owned by the caller. - * @param[in] count The length of the array + * @param[in] strings A array of char* strings (each null terminated). All storage is owned by the caller. + * @param[in] count The length of the array * @param[out] enumeration A pointer to the new #i18n_uenumeration_h. Caller is responsible for calling i18n_uenumeration_destroy() to free memory * * @return The obtained error code. @@ -180,7 +180,7 @@ int i18n_uenumeration_uchar_strings_enumeration_create(const i18n_uchar *const s * * @see i18n_uenumeration_destroy() */ -int i18n_uenumeration_char_strings_enumeration_create(const char* const strings[], int32_t count, i18n_uenumeration_h *enumeration); +int i18n_uenumeration_char_strings_enumeration_create(const char *const strings[], int32_t count, i18n_uenumeration_h *enumeration); /** * @} @@ -191,4 +191,4 @@ int i18n_uenumeration_char_strings_enumeration_create(const char* const strings[ } #endif -#endif /* __UTILS_I18N_UENUMERATION_PRODUCT_H__*/ +#endif /* __UTILS_I18N_UENUMERATION_PRODUCT_H__*/ diff --git a/src/include/mobile/utils_i18n_ulocale.h b/src/include/mobile/utils_i18n_ulocale.h index 18af395..e12a790 100644 --- a/src/include/mobile/utils_i18n_ulocale.h +++ b/src/include/mobile/utils_i18n_ulocale.h @@ -1,20 +1,20 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * Copyright (C) 1997-2013, International Business Machines - * Corporation and others. All Rights Reserved. + * Corporation and others. All Rights Reserved. */ #ifndef __UTILS_I18N_ULOCALE_H__ @@ -33,69 +33,69 @@ * @defgroup CAPI_BASE_UTILS_I18N_ULOCALE_MODULE Ulocale * @brief A Locale represents a specific geographical, political, or cultural region. * @section CAPI_BASE_UTILS_I18N_ULOCALE_MODULE_HEADER Required Header - * \#include + * \#include * * @section CAPI_BASE_UTILS_I18N_ULOCALE_MODULE_OVERVIEW Overview * @details A Locale represents a specific geographical, political, or cultural region. - * An operation that requires a Locale to perform its task is called locale-sensitive - * and uses the Locale to tailor information for the user. For example, displaying - * a number is a locale-sensitive operation. The number should be formatted according - * to the customs/conventions of the user's native country, region, or culture. - * In the C APIs, a locale is simply a const char string. + * An operation that requires a Locale to perform its task is called locale-sensitive + * and uses the Locale to tailor information for the user. For example, displaying + * a number is a locale-sensitive operation. The number should be formatted according + * to the customs/conventions of the user's native country, region, or culture. + * In the C APIs, a locale is simply a const char string. * * @section CAPI_BASE_UTILS_I18N_ULOCALE_MODULE_SAMPLE_CODE_1 Sample Code 1 * @brief Gets a default locale and a full name for the locale * @code - const char *locale; - const char *in_locale_id = "en_US"; - char language[64] = {0,}; - i18n_uchar result_w[64] = {0,}; - char result[64] = {0,}; - int language_capacity = 64; - int buf_size_language; - int buf_size_display_name; - int ret = I18N_ERROR_NONE; - - // Sets default locale - ret = i18n_ulocale_set_default(getenv("LC_TIME")); - - // Gets default locale - ret = i18n_ulocale_get_default(&locale); - if (ret != I18N_ERROR_NONE) { - dlog_print(DLOG_ERROR, LOG_TAG, "i18n_ulocale_get_default() failed!!! \n"); - } - dlog_print(DLOG_INFO, LOG_TAG, "default locale : %s\n", locale); // default locale : en_GB.UTF-8 - - // Gets the language code for the specified locale - ret = i18n_ulocale_get_language(locale, language, language_capacity, &buf_size_language); - if (ret != I18N_ERROR_NONE) { - dlog_print(DLOG_ERROR, LOG_TAG, "i18n_ulocale_get_language() failed!!! \n"); - } - dlog_print(DLOG_INFO, LOG_TAG, "language code for the locale : %s\n", language); // language code for the locale : en - - // Gets the full name suitable for display for the specified locale - ret = i18n_ulocale_get_display_name(locale, in_locale_id, result_w, 64, &buf_size_display_name); - if (ret != I18N_ERROR_NONE) { - dlog_print(DLOG_ERROR, LOG_TAG, "i18n_ulocale_get_display_name() failed!!! \n"); - } - i18n_ustring_copy_au(result, result_w); - dlog_print(DLOG_INFO, LOG_TAG, "full name suitable for the locale : %s\n", result); // full name suitable for the locale : English (United Kingdom) + const char *locale; + const char *in_locale_id = "en_US"; + char language[64] = {0,}; + i18n_uchar result_w[64] = {0,}; + char result[64] = {0,}; + int language_capacity = 64; + int buf_size_language; + int buf_size_display_name; + int ret = I18N_ERROR_NONE; + + // Sets default locale + ret = i18n_ulocale_set_default(getenv("LC_TIME")); + + // Gets default locale + ret = i18n_ulocale_get_default(&locale); + if (ret != I18N_ERROR_NONE) { + dlog_print(DLOG_ERROR, LOG_TAG, "i18n_ulocale_get_default() failed!!! \n"); + } + dlog_print(DLOG_INFO, LOG_TAG, "default locale : %s\n", locale); // default locale : en_GB.UTF-8 + + // Gets the language code for the specified locale + ret = i18n_ulocale_get_language(locale, language, language_capacity, &buf_size_language); + if (ret != I18N_ERROR_NONE) { + dlog_print(DLOG_ERROR, LOG_TAG, "i18n_ulocale_get_language() failed!!! \n"); + } + dlog_print(DLOG_INFO, LOG_TAG, "language code for the locale : %s\n", language); // language code for the locale : en + + // Gets the full name suitable for display for the specified locale + ret = i18n_ulocale_get_display_name(locale, in_locale_id, result_w, 64, &buf_size_display_name); + if (ret != I18N_ERROR_NONE) { + dlog_print(DLOG_ERROR, LOG_TAG, "i18n_ulocale_get_display_name() failed!!! \n"); + } + i18n_ustring_copy_au(result, result_w); + dlog_print(DLOG_INFO, LOG_TAG, "full name suitable for the locale : %s\n", result); // full name suitable for the locale : English (United Kingdom) * @endcode * * @section CAPI_BASE_UTILS_I18N_ULOCALE_MODULE_SAMPLE_CODE_2 Sample Code 2 * @brief See all available locales * @code - int i = 0; - int32_t count = i18n_ulocale_count_available(); - for(i = 0; i < count; i++) - { - dlog_print(DLOG_INFO, LOG_TAG, "Available locale %d : %s " ,i, i18n_ulocale_get_available(i)); - // ... - //Available locale 5 : en_GB - //Available locale 6 : en_US - //Available locale 7 : en_US_POSIX - // ... - } + int i = 0; + int32_t count = i18n_ulocale_count_available(); + for(i = 0; i < count; i++) + { + dlog_print(DLOG_INFO, LOG_TAG, "Available locale %d : %s " ,i, i18n_ulocale_get_available(i)); + // ... + //Available locale 5 : en_GB + //Available locale 6 : en_US + //Available locale 7 : en_US_POSIX + // ... + } * @endcode */ @@ -111,11 +111,11 @@ extern "C" { /** * @brief Gets I18N's default locale. * @details The returned string is a snapshot in time, and will remain valid - * and unchanged even when i18n_ulocale_set_default() is called. - * The returned storage is owned by I18N, and must not be altered or deleted by the caller. + * and unchanged even when i18n_ulocale_set_default() is called. + * The returned storage is owned by I18N, and must not be altered or deleted by the caller. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[out] locale The I18N default locale + * @param[out] locale The I18N default locale * * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -125,15 +125,15 @@ int i18n_ulocale_get_default(const char **locale); /** * @brief Sets I18N's default locale. * @details By default (without calling this function), - * I18N's default locale will be based on information obtained from the underlying system environment. + * I18N's default locale will be based on information obtained from the underlying system environment. * - * Changes to I18N's default locale do not propagate back to the system environment. + * Changes to I18N's default locale do not propagate back to the system environment. * - * Changes to I18N's default locale to not affect any services that may already be open based on the previous default locale value. + * Changes to I18N's default locale to not affect any services that may already be open based on the previous default locale value. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[in] locale_id The new I18N default locale.\n - * A value of @c NULL will try to get the system's default locale. + * @param[in] locale_id The new I18N default locale.\n + * A value of @c NULL will try to get the system's default locale. * * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -144,12 +144,12 @@ int i18n_ulocale_set_default(const char *locale_id); * @brief Gets the language code for the specified locale. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[in] locale_id The locale to get the ISO language code with.\n - * @c NULL may be used to specify the default. - * @param[out] language The language code for @a locale_id - * @param[in] language_capacity The size of the @a language buffer to store the language code with - * @param[out] buf_size_language The actual buffer size needed for the language code.\n - * If it's greater than @a language_capacity, the returned language code will be truncated. + * @param[in] locale_id The locale to get the ISO language code with.\n + * @c NULL may be used to specify the default. + * @param[out] language The language code for @a locale_id + * @param[in] language_capacity The size of the @a language buffer to store the language code with + * @param[out] buf_size_language The actual buffer size needed for the language code.\n + * If it's greater than @a language_capacity, the returned language code will be truncated. * * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -160,13 +160,13 @@ int i18n_ulocale_get_language(const char *locale_id, char *language, int32_t lan * @brief Gets the country code for the specified locale. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[in] locale_id The locale to get the country code with - * @param[out] country The country code for @a locale_id - * @param[in] country_capacity The size of the @a country buffer to store the country code with - * @param[out] error Error information if retrieving the country code failed + * @param[in] locale_id The locale to get the country code with + * @param[out] country The country code for @a locale_id + * @param[in] country_capacity The size of the @a country buffer to store the country code with + * @param[out] error Error information if retrieving the country code failed * * @return The actual buffer size needed for the country code.\n - * If it's greater than @a country_capacity, the returned country code will be truncated. + * If it's greater than @a country_capacity, the returned country code will be truncated. */ int32_t i18n_ulocale_get_country(const char *locale_id, char *country, int32_t country_capacity, int *error); @@ -174,14 +174,14 @@ int32_t i18n_ulocale_get_country(const char *locale_id, char *country, int32_t c * @brief Gets the full name suitable for display for the specified locale. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[in] locale_id The locale to get the displayable name with.\n - * @c NULL may be used to specify the default. - * @param[in] in_locale_id The locale to be used to display the name.\n - * @c NULL may be used to specify the default. - * @param[out] result The displayable name for @a locale_id - * @param[in] max_result_size The size of the name buffer to store the displayable full name with - * @param[out] buf_size_display_name The actual buffer size needed for the displayable name.\n - * If it's greater than @a max_result_size, the returned displayable name will be truncated. + * @param[in] locale_id The locale to get the displayable name with.\n + * @c NULL may be used to specify the default. + * @param[in] in_locale_id The locale to be used to display the name.\n + * @c NULL may be used to specify the default. + * @param[out] result The displayable name for @a locale_id + * @param[in] max_result_size The size of the name buffer to store the displayable full name with + * @param[out] buf_size_display_name The actual buffer size needed for the displayable name.\n + * If it's greater than @a max_result_size, the returned displayable name will be truncated. * * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -191,25 +191,25 @@ int i18n_ulocale_get_display_name(const char *locale_id, const char *in_locale_i /** * @brief Gets the specified locale from a list of all available locales. * @details The return value is a pointer to an item of a locale name array. - * Both this array and the pointers it contains are owned by I18N - * and should not be deleted or written through by the caller. - * The locale name is terminated by a null pointer. + * Both this array and the pointers it contains are owned by I18N + * and should not be deleted or written through by the caller. + * The locale name is terminated by a null pointer. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[in] n The specific locale name index of the available locale list + * @param[in] n The specific locale name index of the available locale list * * @return A specified locale name of all available locales * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -const char* i18n_ulocale_get_available(int32_t n); +const char *i18n_ulocale_get_available(int32_t n); /** * @brief Gets the size of the all available locale list. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @return The size of the locale list @@ -217,22 +217,22 @@ const char* i18n_ulocale_get_available(int32_t n); */ int32_t i18n_ulocale_count_available(void); -// Newly Added APIs +/* Newly Added APIs */ /** * @brief Gets the script code for the specified locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] locale_id The locale to get the ISO script code with - * @param[out] script The script code for @a locale_id. Must not be @c NULL. - * @param[in] script_capacity The size of the @a script buffer to store the script code with + * @param[in] locale_id The locale to get the ISO script code with + * @param[out] script The script code for @a locale_id. Must not be @c NULL. + * @param[in] script_capacity The size of the @a script buffer to store the script code with * * @return The actual buffer size needed for the script code. If it's greater than @a script_capacity, - * the returned script code will be truncated. If the @a script buffer is @c NULL - * or the @a script_capacity is lower than @c 0 , then the #I18N_ERROR_INVALID_PARAMETER error will be set - * and @c -1 will be returned. + * the returned script code will be truncated. If the @a script buffer is @c NULL + * or the @a script_capacity is lower than @c 0 , then the #I18N_ERROR_INVALID_PARAMETER error will be set + * and @c -1 will be returned. * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -242,17 +242,17 @@ int32_t i18n_ulocale_get_script(const char *locale_id, char *script, int32_t scr /** * @brief Gets the variant code for the specified locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] locale_id The locale to get the variant code with - * @param[out] variant The variant code for @a locale_id - * @param[in] variant_capacity The size of the @a variant buffer to store the variant code with + * @param[in] locale_id The locale to get the variant code with + * @param[out] variant The variant code for @a locale_id + * @param[in] variant_capacity The size of the @a variant buffer to store the variant code with * * @return The actual buffer size needed for the variant code. If it's greater than @a variant_capacity, - * the returned variant code will be truncated. If the @a variant buffer is @c NULL - * or the @a variant_capacity is lower than @c 0 , then the #I18N_ERROR_INVALID_PARAMETER error will be set - * and @c -1 will be returned. + * the returned variant code will be truncated. If the @a variant buffer is @c NULL + * or the @a variant_capacity is lower than @c 0 , then the #I18N_ERROR_INVALID_PARAMETER error will be set + * and @c -1 will be returned. * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -262,20 +262,20 @@ int32_t i18n_ulocale_get_variant(const char *locale_id, char *variant, int32_t v /** * @brief Gets the full name for the specified locale. * @details Note : This has the effect of 'canonicalizing' the I18N locale ID to - * a certain extent. Upper and lower case are set as needed. - * It does NOT map aliased names in any way. - * See the top of this header file. - * This API supports preflighting. + * a certain extent. Upper and lower case are set as needed. + * It does NOT map aliased names in any way. + * See the top of this header file. + * This API supports preflighting. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in #i18n_error_code_e description. + * Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] locale_id The locale to get the full name with - * @param[out] name Fill in buffer for the name without keywords. - * @param[in] name_capacity Capacity of the fill in buffer. + * @param[in] locale_id The locale to get the full name with + * @param[out] name Fill in buffer for the name without keywords. + * @param[in] name_capacity Capacity of the fill in buffer. * * @return The actual buffer size needed for the full name. If it's greater than @a name_capacity, - * the returned full name will be truncated. + * the returned full name will be truncated. * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_BUFFER_OVERFLOW A result would not fit in the supplied buffer */ @@ -284,20 +284,20 @@ int32_t i18n_ulocale_get_name(const char *locale_id, char *name, int32_t name_ca /** * @brief Gets the full name for the specified locale. * @details Note : This has the effect of 'canonicalizing' the string to - * a certain extent. Upper and lower case are set as needed, - * and if the components were in 'POSIX' format they are changed to - * I18N format. It does NOT map aliased names in any way. - * See the top of this header file. + * a certain extent. Upper and lower case are set as needed, + * and if the components were in 'POSIX' format they are changed to + * I18N format. It does NOT map aliased names in any way. + * See the top of this header file. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in #i18n_error_code_e description. + * Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] locale_id The locale to get the full name with - * @param[out] name The full name for @a locale_id - * @param[in] name_capacity The size of the @a name buffer to store the full name with + * @param[in] locale_id The locale to get the full name with + * @param[out] name The full name for @a locale_id + * @param[in] name_capacity The size of the @a name buffer to store the full name with * * @return The actual buffer size needed for the full name. If it's greater than @a name_capacity, - * the returned full name will be truncated. + * the returned full name will be truncated. * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_BUFFER_OVERFLOW A result would not fit in the supplied buffer */ @@ -306,39 +306,39 @@ int32_t i18n_ulocale_canonicalize(const char *locale_id, char *name, int32_t nam /** * @brief Gets the ISO language code for the specified locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] locale_id The locale to get the ISO language code with + * @param[in] locale_id The locale to get the ISO language code with * * @return A language the ISO language code for @a locale_id * * @exception #I18N_ERROR_NONE Successful */ -const char * i18n_ulocale_get_iso3_language(const char *locale_id); +const char *i18n_ulocale_get_iso3_language(const char *locale_id); /** * @brief Gets the ISO country code for the specified locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] locale_id The locale to get the ISO country code with + * @param[in] locale_id The locale to get the ISO country code with * * @return A country the ISO country code for @a locale_id * * @exception #I18N_ERROR_NONE Successful */ -const char * i18n_ulocale_get_iso3_country(const char *locale_id); +const char *i18n_ulocale_get_iso3_country(const char *locale_id); /** * @brief Gets the Win32 LCID value for the specified locale. * @details If the I18N locale is not recognized by Windows, 0 will be returned. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] locale_id The locale to get the Win32 LCID value with + * @param[in] locale_id The locale to get the Win32 LCID value with * * @return A country the Win32 LCID for @a locale_id * @@ -349,19 +349,19 @@ uint32_t i18n_ulocale_get_lcid(const char *locale_id); /** * @brief Gets the language name suitable for display for the specified locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] locale The locale to get the ISO language code with - * @param[in] display_locale The locale to be used to display the name.\n - * @c NULL may be used to specify the default. - * @param[out] language The displayable language code for @a locale. - * @param[in] language_capacity The size of the @a language buffer to store the displayable language code with + * @param[in] locale The locale to get the ISO language code with + * @param[in] display_locale The locale to be used to display the name.\n + * @c NULL may be used to specify the default. + * @param[out] language The displayable language code for @a locale. + * @param[in] language_capacity The size of the @a language buffer to store the displayable language code with * * @return The actual buffer size needed for the displayable language code. If it's greater than - * @a language_capacity, the returned language code will be truncated. If the @a language buffer is @c NULL - * or the @a language_capacity is lower than @c 0 , then the #I18N_ERROR_INVALID_PARAMETER error will be set - * and @c 0 will be returned. + * @a language_capacity, the returned language code will be truncated. If the @a language buffer is @c NULL + * or the @a language_capacity is lower than @c 0 , then the #I18N_ERROR_INVALID_PARAMETER error will be set + * and @c 0 will be returned. * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -371,18 +371,18 @@ int32_t i18n_ulocale_get_display_language(const char *locale, const char *displa /** * @brief Gets the script name suitable for display for the specified locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] locale The locale to get the displayable script code with. @c NULL may be used to specify the default. - * @param[in] display_locale The locale to be used to display the name. @c NULL may be used to specify the default. - * @param[out] script The displayable country code for @a locale - * @param[in] script_capacity The size of the script buffer to store the displayable script code with + * @param[in] locale The locale to get the displayable script code with. @c NULL may be used to specify the default. + * @param[in] display_locale The locale to be used to display the name. @c NULL may be used to specify the default. + * @param[out] script The displayable country code for @a locale + * @param[in] script_capacity The size of the script buffer to store the displayable script code with * * @return The actual buffer size needed for the displayable script code. If it's greater than @a script_capacity, - * the returned displayable script code will be truncated. If the @a script buffer is @c NULL - * or the @a script_capacity is lower than @c 0 , then the #I18N_ERROR_INVALID_PARAMETER error will be set - * and @c 0 will be returned. + * the returned displayable script code will be truncated. If the @a script buffer is @c NULL + * or the @a script_capacity is lower than @c 0 , then the #I18N_ERROR_INVALID_PARAMETER error will be set + * and @c 0 will be returned. * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -392,18 +392,18 @@ int32_t i18n_ulocale_get_display_script(const char *locale, const char *display_ /** * @brief Gets the country name suitable for display for the specified locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] locale The locale to get the displayable country code with. @c NULL may be used to specify the default. - * @param[in] display_locale The locale to be used to display the name. @c NULL may be used to specify the default. - * @param[out] country The displayable country code for @a locale - * @param[in] country_capacity The size of the @a country buffer to store the displayable country code with + * @param[in] locale The locale to get the displayable country code with. @c NULL may be used to specify the default. + * @param[in] display_locale The locale to be used to display the name. @c NULL may be used to specify the default. + * @param[out] country The displayable country code for @a locale + * @param[in] country_capacity The size of the @a country buffer to store the displayable country code with * * @return The actual buffer size needed for the displayable country code. If it's greater than @a country_capacity, - * the returned displayable country code will be truncated. If the @a country buffer is @c NULL - * or the @a country_capacity is lower than @c 0 , then the #I18N_ERROR_INVALID_PARAMETER error will be set - * and @c 0 will be returned. + * the returned displayable country code will be truncated. If the @a country buffer is @c NULL + * or the @a country_capacity is lower than @c 0 , then the #I18N_ERROR_INVALID_PARAMETER error will be set + * and @c 0 will be returned. * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -413,18 +413,18 @@ int32_t i18n_ulocale_get_display_country(const char *locale, const char *display /** * @brief Gets the variant name suitable for display for the specified locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] locale The locale to get the displayable variant code with. @c NULL may be used to specify the default. - * @param[in] display_locale The locale to be used to display the name. @c NULL may be used to specify the default. - * @param[out] variant The displayable variant code for @a locale - * @param[in] variant_capacity The size of the @a variant buffer to store the displayable variant code with + * @param[in] locale The locale to get the displayable variant code with. @c NULL may be used to specify the default. + * @param[in] display_locale The locale to be used to display the name. @c NULL may be used to specify the default. + * @param[out] variant The displayable variant code for @a locale + * @param[in] variant_capacity The size of the @a variant buffer to store the displayable variant code with * * @return The actual buffer size needed for the displayable variant code. If it's greater than @a variant_capacity, - * the returned displayable variant code will be truncated. If the @a variant buffer is @c NULL - * or the @a variant_capacity is lower than @c 0 , then the #I18N_ERROR_INVALID_PARAMETER error will be set - * and @c 0 will be returned. + * the returned displayable variant code will be truncated. If the @a variant buffer is @c NULL + * or the @a variant_capacity is lower than @c 0 , then the #I18N_ERROR_INVALID_PARAMETER error will be set + * and @c 0 will be returned. * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -434,44 +434,44 @@ int32_t i18n_ulocale_get_display_variant(const char *locale, const char *display /** * @brief Gets the keyword name suitable for display for the specified locale. * @details E.g : for the locale string de_DE\@collation=PHONEBOOK, this API gets the display string for the keyword collation. - * Usage : + * Usage : * @code - * i18n_error_code_e status = I18N_ERROR_NONE; - * const char* keyword = NULL; - * int32_t keyword_len = 0; - * int32_t keyword_count = 0; - * i18n_uchar display_keyword[256]; - * int32_t display_keyword_len = 0; - * i18n_uenumeration_h keyword_enum; - * i18n_ulocale_keywords_create("en_US@collation=PHONEBOOK;calendar=TRADITIONAL", &keyword_enum); - * - * for(keyword_count = i18n_uenumeration_count(keyword_enum); keyword_count > 0; keyword_count--){ - * status = get_last_result(); - * if(status > 0){ - * // something went wrong so handle the error - * break; - * } - * // the uenum_next returns NULL-terminated string - * keyword = i18n_uenumeration_next(keyword_enum, &keyword_len); - * display_keyword_len = i18n_ulocale_get_display_keyword(keyword, "en_US", display_keyword, 256); - * // do something interesting - * } - * i18n_uenumeration_destroy(keyword_enum); + * i18n_error_code_e status = I18N_ERROR_NONE; + * const char* keyword = NULL; + * int32_t keyword_len = 0; + * int32_t keyword_count = 0; + * i18n_uchar display_keyword[256]; + * int32_t display_keyword_len = 0; + * i18n_uenumeration_h keyword_enum; + * i18n_ulocale_keywords_create("en_US@collation=PHONEBOOK;calendar=TRADITIONAL", &keyword_enum); + * + * for(keyword_count = i18n_uenumeration_count(keyword_enum); keyword_count > 0; keyword_count--){ + * status = get_last_result(); + * if(status > 0){ + * // something went wrong so handle the error + * break; + * } + * // the uenum_next returns NULL-terminated string + * keyword = i18n_uenumeration_next(keyword_enum, &keyword_len); + * display_keyword_len = i18n_ulocale_get_display_keyword(keyword, "en_US", display_keyword, 256); + * // do something interesting + * } + * i18n_uenumeration_destroy(keyword_enum); * @endcode * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] keyword The keyword whose display string needs to be returned. - * @param[in] display_locale The locale to be used to display the name. @c NULL may be used to specify the default. - * @param[out] dest The buffer to which the displayable keyword should be written. - * @param[in] dest_capacity The size of the buffer (number of #i18n_uchar characters). If it is 0, then - * @a dest may be @c NULL and the function will only return the length of the result without - * writing any of the result string (pre-flighting). + * @param[in] keyword The keyword whose display string needs to be returned. + * @param[in] display_locale The locale to be used to display the name. @c NULL may be used to specify the default. + * @param[out] dest The buffer to which the displayable keyword should be written. + * @param[in] dest_capacity The size of the buffer (number of #i18n_uchar characters). If it is 0, then + * @a dest may be @c NULL and the function will only return the length of the result without + * writing any of the result string (pre-flighting). * * @return The actual buffer size needed for the displayable variant code. If the @a dest buffer is @c NULL - * or the @a dest_capacity is lower than @c 0 , then the #I18N_ERROR_INVALID_PARAMETER error will be set - * and @c 0 will be returned. + * or the @a dest_capacity is lower than @c 0 , then the #I18N_ERROR_INVALID_PARAMETER error will be set + * and @c 0 will be returned. * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -488,20 +488,20 @@ int32_t i18n_ulocale_get_display_keyword(const char *keyword, const char *displa * @details E.g : for the locale string de_DE\@collation=PHONEBOOK, this API gets the display string for PHONEBOOK, * in the display locale, when "collation" is specified as the keyword. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] locale The locale to get the displayable variant code with. @c NULL may be used to specify the default. - * @param[in] keyword The keyword for whose value should be used. - * @param[in] display_locale The locale to be used to display the name. @c NULL may be used to specify the default. - * @param[out] dest The buffer to which the displayable keyword should be written. - * @param[in] dest_capacity The size of the buffer (number of #i18n_uchar characters). If it is 0, then - * @a dest may be @c NULL and the function will only return the length of the result - * without writing any of the result string (pre-flighting). + * @param[in] locale The locale to get the displayable variant code with. @c NULL may be used to specify the default. + * @param[in] keyword The keyword for whose value should be used. + * @param[in] display_locale The locale to be used to display the name. @c NULL may be used to specify the default. + * @param[out] dest The buffer to which the displayable keyword should be written. + * @param[in] dest_capacity The size of the buffer (number of #i18n_uchar characters). If it is 0, then + * @a dest may be @c NULL and the function will only return the length of the result + * without writing any of the result string (pre-flighting). * * @return The actual buffer size needed for the displayable variant code. If the @a dest buffer is @c NULL - * or the @a dest_capacity is lower than @c 0 , then the #I18N_ERROR_INVALID_PARAMETER error will be set - * and @c 0 will be returned. + * or the @a dest_capacity is lower than @c 0 , then the #I18N_ERROR_INVALID_PARAMETER error will be set + * and @c 0 will be returned. * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -510,84 +510,84 @@ int32_t i18n_ulocale_get_display_keyword_value(const char *locale, const char *k /** * @brief Gets a list of all available 2-letter language codes defined in ISO 639, - * plus additional 3-letter codes determined to be useful for locale generation as - * defined by Unicode CLDR. + * plus additional 3-letter codes determined to be useful for locale generation as + * defined by Unicode CLDR. * @details This is a pointer to an array of pointers to arrays of char. All of these pointers are owned - * by I18N - do not delete them, and do not write through them. - * The array is terminated with a @c NULL pointer. + * by I18N - do not delete them, and do not write through them. + * The array is terminated with a @c NULL pointer. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * * @return A list of all available language codes * * @exception #I18N_ERROR_NONE Successful */ -const char * const *i18n_ulocale_get_iso_languages(void); +const char *const *i18n_ulocale_get_iso_languages(void); /** * * @brief Gets a list of all available 2-letter country codes defined in ISO 639. * @details This is a pointer to an array of pointers to arrays of char. All of these pointers are - * owned by I18N - do not delete them, and do not write through them. - * The array is terminated with a @c NULL pointer. + * owned by I18N - do not delete them, and do not write through them. + * The array is terminated with a @c NULL pointer. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * * @return A list of all available country codes * * @exception #I18N_ERROR_NONE Successful */ -const char * const *i18n_ulocale_get_iso_countries(void); +const char *const *i18n_ulocale_get_iso_countries(void); /** * @brief Truncates the locale ID string to get the parent locale ID. * @details Copies the part of the string before the last underscore. - * The parent locale ID will be an empty string if there is no - * underscore, or if there is only one underscore at @a locale_id[0]. + * The parent locale ID will be an empty string if there is no + * underscore, or if there is only one underscore at @a locale_id[0]. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] locale_id Input locale ID string. - * @param[out] parent Output string buffer for the parent locale ID. Must not be @c NULL. - * @param[in] parent_capacity Size of the output buffer. If it's lower than the number of characters - * stored in the @a locale_id between the first character and the last occurrence - * of the underscore ("_") character, than the error code will be set to - * #I18N_ERROR_BUFFER_OVERFLOW. + * @param[in] locale_id Input locale ID string. + * @param[out] parent Output string buffer for the parent locale ID. Must not be @c NULL. + * @param[in] parent_capacity Size of the output buffer. If it's lower than the number of characters + * stored in the @a locale_id between the first character and the last occurrence + * of the underscore ("_") character, than the error code will be set to + * #I18N_ERROR_BUFFER_OVERFLOW. * * @return The length of the parent locale ID. If the @a parent buffer is @c NULL or the @a parent_capacity is lower than @c 0, - * then the #I18N_ERROR_INVALID_PARAMETER error will be set and @c -1 will be returned. + * then the #I18N_ERROR_INVALID_PARAMETER error will be set and @c -1 will be returned. * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @exception #I18N_ERROR_BUFFER_OVERFLOW If the capacity of the @a parent is lower than the number of characters - * in the @a locale_id from index 0 to the index of the last occurrence of - * the underscore ("_") symbol. + * in the @a locale_id from index 0 to the index of the last occurrence of + * the underscore ("_") symbol. */ int32_t i18n_ulocale_get_parent(const char *locale_id, char *parent, int32_t parent_capacity); /** * @brief Gets the full name for the specified locale, like i18n_ulocale_get_name(), but without keywords. * @details Note : This has the effect of 'canonicalizing' the string to a certain extent. - * Upper and lower case are set as needed, - * and if the components were in 'POSIX' format they are changed to I18N format. - * It does NOT map aliased names in any way. - * See the top of this header file. + * Upper and lower case are set as needed, + * and if the components were in 'POSIX' format they are changed to I18N format. + * It does NOT map aliased names in any way. + * See the top of this header file. * - * This API strips off the keyword part, so "de_DE\@collation=phonebook" will become "de_DE". - * This API supports preflighting. + * This API strips off the keyword part, so "de_DE\@collation=phonebook" will become "de_DE". + * This API supports preflighting. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in #i18n_error_code_e description. + * Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] locale_id The locale to get the full name with - * @param[out] name Fill in buffer for the name without keywords. - * @param[in] name_capacity Capacity of the fill in buffer. + * @param[in] locale_id The locale to get the full name with + * @param[out] name Fill in buffer for the name without keywords. + * @param[in] name_capacity Capacity of the fill in buffer. * * @return The actual buffer size needed for the full name. If it's greater than @a name_capacity, - * the returned full name will be truncated. + * the returned full name will be truncated. * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_BUFFER_OVERFLOW A result would not fit in the supplied buffer */ @@ -599,7 +599,7 @@ int32_t i18n_ulocale_get_base_name(const char *locale_id, char *name, int32_t na * @remarks Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] locale_id The locale to get the variant code with + * @param[in] locale_id The locale to get the variant code with * * @param enumeration A pointer to the enumeration of keywords or @c NULL if there are no keywords. * @return The obtained error code. @@ -612,16 +612,16 @@ int i18n_ulocale_keywords_create(const char *locale_id, i18n_uenumeration_h *enu * @brief Gets the value for a keyword. * @details Locale name does not need to be normalized. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] locale_id A locale name containing the keyword ("de_DE@currency=EURO;collation=PHONEBOOK") - * @param[in] keyword_name The name of the keyword for which we want the value. Case insensitive. - * @param[out] buffer Receiving buffer - * @param[in] buffer_capacity Capacity of receiving @a buffer + * @param[in] locale_id A locale name containing the keyword ("de_DE@currency=EURO;collation=PHONEBOOK") + * @param[in] keyword_name The name of the keyword for which we want the value. Case insensitive. + * @param[out] buffer Receiving buffer + * @param[in] buffer_capacity Capacity of receiving @a buffer * * @return The length of keyword value. If the @a keyword_name or @a buffer is @c NULL or the @a buffer_capacity is lower than @c 0, - * then the #I18N_ERROR_INVALID_PARAMETER error will be set and @c -1 will be returned. + * then the #I18N_ERROR_INVALID_PARAMETER error will be set and @c -1 will be returned. * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -633,11 +633,11 @@ int32_t i18n_ulocale_get_keyword_value(const char *locale_id, const char *keywor * @details For removing all keywords(retrieving only locale base name associated with the keywords), * use i18n_ulocale_get_base_name(). * - * NOTE : Unlike almost every other I18N function which takes a - * buffer, this function will NOT truncate the output text. If a - * #I18N_ERROR_BUFFER_OVERFLOW is received, it means that the original - * buffer is untouched. This is done to prevent incorrect or possibly - * even malformed locales from being generated and used. + * NOTE : Unlike almost every other I18N function which takes a + * buffer, this function will NOT truncate the output text. If a + * #I18N_ERROR_BUFFER_OVERFLOW is received, it means that the original + * buffer is untouched. This is done to prevent incorrect or possibly + * even malformed locales from being generated and used. * * Below code prints following logs in SDK: * @@ -648,56 +648,56 @@ int32_t i18n_ulocale_get_keyword_value(const char *locale_id, const char *keywor * Keyword1 value: 12 * * @code - * int32_t buff_size = 50; - * int32_t sub_buff_size = 45; - * char *buff = malloc(sizeof(char)*buff_size); - * char *sub_buff = malloc(sizeof(char)*sub_buff_size); - * char *locale = "en_US"; - * - * snprintf(buff, buff_size, "%s%s",locale, sub_buff); - * - * i18n_ulocale_set_keyword_value("abc", "cba", buff, buff_size); - * i18n_ulocale_set_keyword_value("def", "34", buff, buff_size); - * - * i18n_uenumeration_h keyword_enum; - * i18n_ulocale_keywords_create(buff, &keyword_enum); - * - * int32_t res_len = 0; - * const char *keyw = i18n_uenumeration_next(keyword_enum, &res_len); - * const char *keyw2 = i18n_uenumeration_next(keyword_enum, &res_len); - * - * char *only_locale = malloc(sizeof(char)*10); - * i18n_ulocale_get_base_name(buff, only_locale, 10); - * - * int32_t buff_size_get = 50; - * char *buff_out = malloc(sizeof(char)*buff_size_get); - * i18n_ulocale_get_keyword_value(buff, "abc", buff_out, buff_size_get); - * - * dlog_print(DLOG_DEBUG, "test", "Locale and keywords: %s", buff); - * dlog_print(DLOG_DEBUG, "test", "keyword1: %s", keyw); - * dlog_print(DLOG_DEBUG, "test", "keyword2: %s", keyw2); - * dlog_print(DLOG_DEBUG, "test", "Locale: %s", only_locale); - * dlog_print(DLOG_DEBUG, "test", "Keyword1 value: %s", buff_out); - * - * i18n_uenumeration_destroy(keyword_enum) - * free(buff); - * free(sub_buff); - * free(only_locale); - * free(buff_out); + * int32_t buff_size = 50; + * int32_t sub_buff_size = 45; + * char *buff = malloc(sizeof(char)*buff_size); + * char *sub_buff = malloc(sizeof(char)*sub_buff_size); + * char *locale = "en_US"; + * + * snprintf(buff, buff_size, "%s%s",locale, sub_buff); + * + * i18n_ulocale_set_keyword_value("abc", "cba", buff, buff_size); + * i18n_ulocale_set_keyword_value("def", "34", buff, buff_size); + * + * i18n_uenumeration_h keyword_enum; + * i18n_ulocale_keywords_create(buff, &keyword_enum); + * + * int32_t res_len = 0; + * const char *keyw = i18n_uenumeration_next(keyword_enum, &res_len); + * const char *keyw2 = i18n_uenumeration_next(keyword_enum, &res_len); + * + * char *only_locale = malloc(sizeof(char)*10); + * i18n_ulocale_get_base_name(buff, only_locale, 10); + * + * int32_t buff_size_get = 50; + * char *buff_out = malloc(sizeof(char)*buff_size_get); + * i18n_ulocale_get_keyword_value(buff, "abc", buff_out, buff_size_get); + * + * dlog_print(DLOG_DEBUG, "test", "Locale and keywords: %s", buff); + * dlog_print(DLOG_DEBUG, "test", "keyword1: %s", keyw); + * dlog_print(DLOG_DEBUG, "test", "keyword2: %s", keyw2); + * dlog_print(DLOG_DEBUG, "test", "Locale: %s", only_locale); + * dlog_print(DLOG_DEBUG, "test", "Keyword1 value: %s", buff_out); + * + * i18n_uenumeration_destroy(keyword_enum) + * free(buff); + * free(sub_buff); + * free(only_locale); + * free(buff_out); * @endcode * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] keyword_name A name of the keyword to be set. Case insensitive. - * @param[in] keyword_value A value of the keyword to be set. If 0-length or - * @c NULL, will result in the keyword being removed. - * No error is given if that keyword does not exist. - * @param[out] buffer Input buffer containing locale to be modified. - * @param[in] buffer_capacity Capacity of receiving @a buffer + * @param[in] keyword_name A name of the keyword to be set. Case insensitive. + * @param[in] keyword_value A value of the keyword to be set. If 0-length or + * @c NULL, will result in the keyword being removed. + * No error is given if that keyword does not exist. + * @param[out] buffer Input buffer containing locale to be modified. + * @param[in] buffer_capacity Capacity of receiving @a buffer * * @return The length needed for the @a buffer. If the @a keyword_name or @a buffer is @c NULL or the @a buffer_capacity is lower than @c 0, - * then the #I18N_ERROR_INVALID_PARAMETER error will be set and @c -1 will be returned. + * then the #I18N_ERROR_INVALID_PARAMETER error will be set and @c -1 will be returned. * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -711,7 +711,7 @@ int32_t i18n_ulocale_set_keyword_value(const char *keyword_name, const char *key * @remarks Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] locale_id locale name + * @param[in] locale_id locale name * @param[out] layout_type A pointer to the enum indicating the layout orientation for characters. * * @return The obtained error code. @@ -725,7 +725,7 @@ int i18n_ulocale_get_character_orientation(const char *locale_id, i18n_ulocale_l * @remarks Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] locale_id locale name + * @param[in] locale_id locale name * @param[out] layout_type A pointer to the enum indicating the layout orientation for lines. * * @return The obtained error code. @@ -737,16 +737,16 @@ int i18n_ulocale_get_line_orientation(const char *locale_id, i18n_ulocale_layout /** * @brief Gets the I18N locale ID for the specified Win32 LCID value. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] host_id The Win32 LCID to translate - * @param[out] locale The output buffer for the I18N locale ID, which will be NULL-terminated if there is room. - * @param[in] locale_capacity The size of the output buffer + * @param[in] host_id The Win32 LCID to translate + * @param[out] locale The output buffer for the I18N locale ID, which will be NULL-terminated if there is room. + * @param[in] locale_capacity The size of the output buffer * * @return The actual size of the locale ID, not including NULL-termination. - * If the @a locale buffer is @c NULL or the @a locale_capacity is lower than @c 0, - * then the #I18N_ERROR_INVALID_PARAMETER error will be set and @c -1 will be returned. + * If the @a locale buffer is @c NULL or the @a locale_capacity is lower than @c 0, + * then the #I18N_ERROR_INVALID_PARAMETER error will be set and @c -1 will be returned. * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -755,33 +755,33 @@ int32_t i18n_ulocale_get_locale_for_lcid(uint32_t host_id, char *locale, int32_t /** * @brief Adds the likely subtags for a provided locale ID, per the algorithm described - * in the following CLDR technical report : http://www.unicode.org/reports/tr35/#Likely_Subtags + * in the following CLDR technical report : http://www.unicode.org/reports/tr35/#Likely_Subtags * @details If @a locale_id is already in the maximal form, or there is no data available - * for maximization, it will be copied to the output buffer. For example, - * "und-Zzzz" cannot be maximized, since there is no reasonable maximization. + * for maximization, it will be copied to the output buffer. For example, + * "und-Zzzz" cannot be maximized, since there is no reasonable maximization. * - * Examples : + * Examples : * - * "en" maximizes to "en_Latn_US" + * "en" maximizes to "en_Latn_US" * - * "de" maximizes to "de_Latn_US" + * "de" maximizes to "de_Latn_US" * - * "sr" maximizes to "sr_Cyrl_RS" + * "sr" maximizes to "sr_Cyrl_RS" * - * "sh" maximizes to "sr_Latn_RS" (Note this will not reverse.) + * "sh" maximizes to "sr_Latn_RS" (Note this will not reverse.) * - * "zh_Hani" maximizes to "zh_Hans_CN" (Note this will not reverse.) + * "zh_Hani" maximizes to "zh_Hans_CN" (Note this will not reverse.) * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in #i18n_error_code_e description. + * Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] locale_id The locale to maximize - * @param[out] maximized_locale_id The maximized locale - * @param[in] maximized_locale_id_capacity The capacity of the @a maximized_locale_id buffer + * @param[in] locale_id The locale to maximize + * @param[out] maximized_locale_id The maximized locale + * @param[in] maximized_locale_id_capacity The capacity of the @a maximized_locale_id buffer * * @return The actual buffer size needed for the maximized locale. If it's - * greater than @a maximized_lacale_id_capacity, the returned ID will be truncated. - * On error, the return value is -1. + * greater than @a maximized_lacale_id_capacity, the returned ID will be truncated. + * On error, the return value is -1. * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ @@ -789,32 +789,32 @@ int32_t i18n_ulocale_add_likely_subtags(const char *locale_id, char *maximized_l /** * @brief Minimizes the subtags for a provided locale ID, per the algorithm described - * in the following CLDR technical report: http://www.unicode.org/reports/tr35/#Likely_Subtags + * in the following CLDR technical report: http://www.unicode.org/reports/tr35/#Likely_Subtags * @details If @a locale_id is already in the minimal form, or there is no data available - * for minimization, it will be copied to the output buffer. Since the - * minimization algorithm relies on proper maximization, see the comments - * for i18n_ulocale_add_likely_subtags() for reasons why there might not be any data. + * for minimization, it will be copied to the output buffer. Since the + * minimization algorithm relies on proper maximization, see the comments + * for i18n_ulocale_add_likely_subtags() for reasons why there might not be any data. * - * Examples : + * Examples : * - * "en_Latn_US" minimizes to "en" + * "en_Latn_US" minimizes to "en" * - * "de_Latn_US" minimizes to "de" + * "de_Latn_US" minimizes to "de" * - * "sr_Cyrl_RS" minimizes to "sr" + * "sr_Cyrl_RS" minimizes to "sr" * - * "zh_Hant_TW" minimizes to "zh_TW" (The region is preferred to the script, and minimizing to "zh" would imply "zh_Hans_CN".) + * "zh_Hant_TW" minimizes to "zh_TW" (The region is preferred to the script, and minimizing to "zh" would imply "zh_Hans_CN".) * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in #i18n_error_code_e description. + * Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] locale_id The locale to minimize - * @param[out] minimized_locale_id The minimized locale - * @param[in] minimized_locale_id_capacity The capacity of the @a minimized_locale_id buffer + * @param[in] locale_id The locale to minimize + * @param[out] minimized_locale_id The minimized locale + * @param[in] minimized_locale_id_capacity The capacity of the @a minimized_locale_id buffer * * @return The actual buffer size needed for the minimized locale. If it's - * greater than @a minimized_locale_id_capacity, the returned ID will be truncated. - * On error, the return value is -1. + * greater than @a minimized_locale_id_capacity, the returned ID will be truncated. + * On error, the return value is -1. * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ @@ -823,28 +823,28 @@ int32_t i18n_ulocale_minimize_subtags(const char *locale_id, char *minimized_loc /** * @brief Returns a locale ID for the specified BCP47 language tag string. * @details If the specified language tag contains any ill-formed subtags, - * the first such subtag and all following subtags are ignored.
- * - * This implements the 'Language-Tag' production of BCP47, and so - * supports grandfathered (regular and irregular) as well as private - * use language tags. Private use tags are represented as 'x-whatever', - * and grandfathered tags are converted to their canonical replacements - * where they exist. Note that a few grandfathered tags have no modern - * replacement, these will be converted using the fallback described in - * the first paragraph, so some information might be lost. + * the first such subtag and all following subtags are ignored.
+ * + * This implements the 'Language-Tag' production of BCP47, and so + * supports grandfathered (regular and irregular) as well as private + * use language tags. Private use tags are represented as 'x-whatever', + * and grandfathered tags are converted to their canonical replacements + * where they exist. Note that a few grandfathered tags have no modern + * replacement, these will be converted using the fallback described in + * the first paragraph, so some information might be lost. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] langtag The input BCP47 language tag. - * @param[out] locale_id The output buffer receiving a locale ID for the - * specified BCP47 language tag. + * @param[in] langtag The input BCP47 language tag. + * @param[out] locale_id The output buffer receiving a locale ID for the + * specified BCP47 language tag. * @param[in] locale_id_capacity The size of the @a locale_id output buffer. - * @param[in] parsed_length If not @c NULL, successfully parsed length - * for the input language tag is set. + * @param[in] parsed_length If not @c NULL, successfully parsed length + * for the input language tag is set. * * @return The length of the locale ID. If the @a langtag or @a locale_id buffer is @c NULL or the @a locale_id_capacity is lower than @c 0, - * then the #I18N_ERROR_INVALID_PARAMETER error will be set and @c -1 will be returned. + * then the #I18N_ERROR_INVALID_PARAMETER error will be set and @c -1 will be returned. * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -854,25 +854,25 @@ int32_t i18n_ulocale_for_language_tag(const char *langtag, char *locale_id, int3 /** * @brief Returns a well-formed language tag for this locale ID. * @details Note : When @a strict is @c false, any locale - * fields which do not satisfy the BCP47 syntax requirement will - * be omitted from the result. When @a strict is - * @c true, this function sets #I18N_ERROR_INVALID_PARAMETER to the - * result if any locale fields do not satisfy the - * BCP47 syntax requirement. + * fields which do not satisfy the BCP47 syntax requirement will + * be omitted from the result. When @a strict is + * @c true, this function sets #I18N_ERROR_INVALID_PARAMETER to the + * result if any locale fields do not satisfy the + * BCP47 syntax requirement. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] locale_id The input locale ID - * @param[out] langtag The output buffer receiving BCP47 language - * tag for the locale ID. - * @param[in] langtag_capacity The size of the BCP47 language tag - * output buffer. - * @param[in] strict Boolean value indicating if the function returns - * an error for an ill-formed input locale ID. + * @param[in] locale_id The input locale ID + * @param[out] langtag The output buffer receiving BCP47 language + * tag for the locale ID. + * @param[in] langtag_capacity The size of the BCP47 language tag + * output buffer. + * @param[in] strict Boolean value indicating if the function returns + * an error for an ill-formed input locale ID. * * @return The length of the BCP47 language tag. If the @a locale_id or @a langtag buffer is @c NULL or the @a langtag_capacity is lower than @c 0, - * then the #I18N_ERROR_INVALID_PARAMETER error will be set and @c -1 will be returned. + * then the #I18N_ERROR_INVALID_PARAMETER error will be set and @c -1 will be returned. * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -888,4 +888,4 @@ int32_t i18n_ulocale_to_language_tag(const char *locale_id, char *langtag, int32 * @} */ -#endif /* __UTILS_I18N_ULOCALE_H__*/ +#endif /* __UTILS_I18N_ULOCALE_H__*/ diff --git a/src/include/mobile/utils_i18n_unormalization.h b/src/include/mobile/utils_i18n_unormalization.h old mode 100755 new mode 100644 index 15bad5d..f83660e --- a/src/include/mobile/utils_i18n_unormalization.h +++ b/src/include/mobile/utils_i18n_unormalization.h @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef __UTILS_I18N_UNORMALIZATION_H__ @@ -35,7 +35,7 @@ extern "C" { * @brief The Unormalization module provides Unicode normalization functionality for standard unicode normalization. * * @section CAPI_BASE_UTILS_I18N_UNORMALIZATION_MODULE_HEADER Required Header - * \#include + * \#include * * @section CAPI_BASE_UTILS_I18N_UNORMALIZATION_MODULE_OVERVIEW Overview * @details The Unormalization module provides Unicode normalization functionality for standard unicode normalization. @@ -45,22 +45,22 @@ extern "C" { * @section CAPI_BASE_UTILS_I18N_UNORMALIZATION_MODULE_SAMPLE_CODE_1 Sample Code 1 * @brief Creates a normalizer and normalizes a unicode string * @code - i18n_unormalizer_h normalizer = NULL; - i18n_uchar src = 0xAC00; - i18n_uchar dest[4] = {0,}; - int dest_str_len = 0; - int i = 0; + i18n_unormalizer_h normalizer = NULL; + i18n_uchar src = 0xAC00; + i18n_uchar dest[4] = {0,}; + int dest_str_len = 0; + int i = 0; - // gets instance for normalizer - i18n_unormalization_get_instance( NULL, "nfc", I18N_UNORMALIZATION_DECOMPOSE, &normalizer ); + // gets instance for normalizer + i18n_unormalization_get_instance( NULL, "nfc", I18N_UNORMALIZATION_DECOMPOSE, &normalizer ); - // normalizes a unicode string - i18n_unormalization_normalize( normalizer, &src, 1, dest, 4, &dest_str_len ); - dlog_print(DLOG_INFO, LOG_TAG, "src is 0x%x\n", src ); // src is 0xAC00 (0xAC00: A Korean character combined with consonant and vowel) + // normalizes a unicode string + i18n_unormalization_normalize( normalizer, &src, 1, dest, 4, &dest_str_len ); + dlog_print(DLOG_INFO, LOG_TAG, "src is 0x%x\n", src ); // src is 0xAC00 (0xAC00: A Korean character combined with consonant and vowel) - for ( i = 0; i < dest_str_len; i++ ) { - dlog_print(DLOG_INFO, LOG_TAG, "dest[%d] is 0x%x\t", i + 1, dest[i] ); // dest[1] is 0x1100 dest[2] is 0x1161 (0x1100: consonant, 0x1161: vowel) - } + for ( i = 0; i < dest_str_len; i++ ) { + dlog_print(DLOG_INFO, LOG_TAG, "dest[%d] is 0x%x\t", i + 1, dest[i] ); // dest[1] is 0x1100 dest[2] is 0x1161 (0x1100: consonant, 0x1161: vowel) + } * @endcode */ @@ -81,8 +81,8 @@ extern "C" { * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_unormalization_get_instance(const char *package_name, const char *name, i18n_unormalization_mode_e mode, - i18n_unormalizer_h *normalizer); +int i18n_unormalization_get_instance(const char *package_name, const char *name, i18n_unormalization_mode_e mode, + i18n_unormalizer_h *normalizer); /** * @brief Writes the normalized form of the source string to the destination string(replacing its contents). @@ -111,4 +111,4 @@ int i18n_unormalization_normalize(i18n_unormalizer_h normalizer, const i18n_ucha * @} */ -#endif /* __UTILS_I18N_UNORMALIZATION_H__*/ +#endif /* __UTILS_I18N_UNORMALIZATION_H__*/ diff --git a/src/include/mobile/utils_i18n_unumber.h b/src/include/mobile/utils_i18n_unumber.h index 4a4e2ac..996bb25 100644 --- a/src/include/mobile/utils_i18n_unumber.h +++ b/src/include/mobile/utils_i18n_unumber.h @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef __UTILS_I18N_UNUMBER_H__ @@ -31,7 +31,7 @@ * @brief The Unumber module helps you format and parse numbers for any locale. * * @section CAPI_BASE_UTILS_I18N_UNUMBER_MODULE_HEADER Required Header - * \#include + * \#include * * @section CAPI_BASE_UTILS_I18N_UNUMBER_MODULE_OVERVIEW Overview * @details The Unumber module helps you format and parse numbers for any locale. @@ -43,23 +43,23 @@ * @section CAPI_BASE_UTILS_I18N_UNUMBER_MODULE_SAMPLE_CODE_1 Sample Code 1 * @brief Gets a currency symbol according to a given locale. * @code - int buf_len; - i18n_uchar u_buffer[64]; - char a_buffer[64]; - i18n_unumber_format_h num_format; + int buf_len; + i18n_uchar u_buffer[64]; + char a_buffer[64]; + i18n_unumber_format_h num_format; - // creates and returns a new unumber_format - i18n_unumber_create(I18N_UNUMBER_CURRENCY, NULL, -1, "en_US", NULL, &num_format); + // creates and returns a new unumber_format + i18n_unumber_create(I18N_UNUMBER_CURRENCY, NULL, -1, "en_US", NULL, &num_format); - // gets a symbol associated with i18n_unumber_format - i18n_unumber_get_symbol(num_format, I18N_UNUMBER_CURRENCY_SYMBOL, u_buffer, 64, &buf_len); + // gets a symbol associated with i18n_unumber_format + i18n_unumber_get_symbol(num_format, I18N_UNUMBER_CURRENCY_SYMBOL, u_buffer, 64, &buf_len); - i18n_ustring_copy_au(a_buffer, u_buffer); - // en_US currency symbol: $ - dlog_print(DLOG_INFO, LOG_TAG, "en_US currency symbol: %s \n", a_buffer); + i18n_ustring_copy_au(a_buffer, u_buffer); + // en_US currency symbol: $ + dlog_print(DLOG_INFO, LOG_TAG, "en_US currency symbol: %s \n", a_buffer); - // destroys i18n_unumber_format - i18n_unumber_destroy(num_format); + // destroys i18n_unumber_format + i18n_unumber_destroy(num_format); * @endcode */ @@ -94,20 +94,20 @@ extern "C" { * or #I18N_UNUMBER_DEFAULT \n * If #I18N_UNUMBER_PATTERN_DECIMAL or #I18N_UNUMBER_PATTERN_RULEBASED is passed then the number format is created using the given pattern, which must conform * to the syntax described in DecimalFormat or RuleBasedNumberFormat, respectively. - * @param[in] pattern A pattern specifying the format to use \n This parameter is ignored unless the style is #I18N_UNUMBER_PATTERN_DECIMAL or #I18N_UNUMBER_PATTERN_RULEBASED. - * @param[in] pattern_len The number of characters in the pattern, otherwise @c -1 if NULL-terminated\n - * This parameter is ignored unless the style is I18N_UNUMBER_PATTERN_*. - * @param[in] locale A locale identifier to use to determine formatting - * and parsing conventions, otherwise @c NULL to use the default locale. - * @param[in] parse_err A pointer to a #i18n_uparse_error_s structure to receive the - * details of any parsing errors, otherwise @c NULL if no parsing error details are desired. - * @param[out] num_format A pointer to a newly created #i18n_unumber_format_h, otherwise @c NULL if an error occurs. + * @param[in] pattern A pattern specifying the format to use \n This parameter is ignored unless the style is #I18N_UNUMBER_PATTERN_DECIMAL or #I18N_UNUMBER_PATTERN_RULEBASED. + * @param[in] pattern_len The number of characters in the pattern, otherwise @c -1 if NULL-terminated\n + * This parameter is ignored unless the style is I18N_UNUMBER_PATTERN_*. + * @param[in] locale A locale identifier to use to determine formatting + * and parsing conventions, otherwise @c NULL to use the default locale. + * @param[in] parse_err A pointer to a #i18n_uparse_error_s structure to receive the + * details of any parsing errors, otherwise @c NULL if no parsing error details are desired. + * @param[out] num_format A pointer to a newly created #i18n_unumber_format_h, otherwise @c NULL if an error occurs. * * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ int i18n_unumber_create(i18n_unumber_format_style_e style, const i18n_uchar *pattern, int32_t pattern_len, const char *locale, - i18n_uparse_error_s *parse_err, i18n_unumber_format_h *num_format); + i18n_uparse_error_s *parse_err, i18n_unumber_format_h *num_format); /** * @brief Destroys an #i18n_unumber_format_h. @@ -141,7 +141,7 @@ int i18n_unumber_destroy(i18n_unumber_format_h fmt); int i18n_unumber_get_symbol(const i18n_unumber_format_h fmt, i18n_unumber_format_symbol_e symbol, i18n_uchar *buffer, int32_t size, int32_t *len_symbol); -// Newly Added APIs +/* Newly Added APIs */ /** @@ -150,7 +150,7 @@ int i18n_unumber_get_symbol(const i18n_unumber_format_h fmt, i18n_unumber_format * @remarks Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] fmt The format to copy. + * @param[in] fmt The format to copy. * @param[out] fmt_clone A pointer to clone of @a fmt. * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful. @@ -163,17 +163,17 @@ int i18n_unumber_clone(const i18n_unumber_format_h fmt, i18n_unumber_format_h *f * @details The integer will be formatted according to the i18n_unumber_format_h's locale. * @since_tizen 2.3.1 * -* @param[in] fmt The formatter to use. -* @param[in] number The number to format. -* @param[out] result A pointer to a buffer to receive the NULL-terminated formatted number. -* If the formatted number fits into dest but cannot be NULL-terminated (length == resultLength) -* then the error code is set to #I18N_WARNING_STRING_NOT_TERMINATED. -* If the formatted number doesn't fit into result then the error code is set to #I18N_ERROR_BUFFER_OVERFLOW. +* @param[in] fmt The formatter to use. +* @param[in] number The number to format. +* @param[out] result A pointer to a buffer to receive the NULL-terminated formatted number. +* If the formatted number fits into dest but cannot be NULL-terminated (length == resultLength) +* then the error code is set to #I18N_WARNING_STRING_NOT_TERMINATED. +* If the formatted number doesn't fit into result then the error code is set to #I18N_ERROR_BUFFER_OVERFLOW. * @param[in] result_length The maximum size of result. -* @param[in] pos A pointer to a i18n_ufield_position. On input, position->field is read. -* On output, position->beginIndex and position->endIndex indicate the beginning and ending indices of field number position->field, if such a field exists. -* This parameter may be NULL, in which case no field -* @param[out] status A pointer to an i18n_error_code_e to receive any errors +* @param[in] pos A pointer to a i18n_ufield_position. On input, position->field is read. +* On output, position->beginIndex and position->endIndex indicate the beginning and ending indices of field number position->field, if such a field exists. +* This parameter may be NULL, in which case no field +* @param[out] status A pointer to an i18n_error_code_e to receive any errors * * @return The total buffer size needed; if greater than result_length, the output was truncated. */ @@ -183,19 +183,19 @@ int32_t i18n_unumber_format(const i18n_unumber_format_h fmt, int32_t number, i18 * @brief Formats an int64 using an #i18n_unumber_format_h. * @details The int64 will be formatted according to the #i18n_unumber_format_h's locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] fmt The formatter to use. - * @param[in] number The number to format. - * @param[out] result A pointer to a buffer to receive the NULL-terminated formatted number. - * If the formatted number fits into @a result but cannot be NULL-terminated (length == result_length) - * then the error code is set to #I18N_WARNING_STRING_NOT_TERMINATED. - * If the formatted number doesn't fit into result then the error code is set to #I18N_ERROR_BUFFER_OVERFLOW. - * @param[in] result_length The maximum size of @a result. - * @param[in,out] pos An #i18n_ufield_position_h handle. On input, position->field is read. - * On output, position->beginIndex and position->endIndex indicate the beginning and ending indices of field number position->field, if such a field exists. - * This parameter may be NULL, in which case no field + * @param[in] fmt The formatter to use. + * @param[in] number The number to format. + * @param[out] result A pointer to a buffer to receive the NULL-terminated formatted number. + * If the formatted number fits into @a result but cannot be NULL-terminated (length == result_length) + * then the error code is set to #I18N_WARNING_STRING_NOT_TERMINATED. + * If the formatted number doesn't fit into result then the error code is set to #I18N_ERROR_BUFFER_OVERFLOW. + * @param[in] result_length The maximum size of @a result. + * @param[in,out] pos An #i18n_ufield_position_h handle. On input, position->field is read. + * On output, position->beginIndex and position->endIndex indicate the beginning and ending indices of field number position->field, if such a field exists. + * This parameter may be NULL, in which case no field * * @return The total buffer size needed; if greater than @a result_length, the output was truncated. * @@ -210,20 +210,20 @@ int32_t i18n_unumber_format_int64(const i18n_unumber_format_h fmt, int64_t numbe * @brief Formats a double using an #i18n_unumber_format_h. * @details The double will be formatted according to the #i18n_unumber_format_h's locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] fmt The formatter to use. - * @param[in] number The number to format. - * @param[out] result A pointer to a buffer to receive the NULL-terminated formatted number. - * If the formatted number fits into @a result but cannot be NULL-terminated (length == result_length) - * then the error code is set to #I18N_WARNING_STRING_NOT_TERMINATED. - * If the formatted number doesn't fit into result then the error code is set to #I18N_ERROR_BUFFER_OVERFLOW. - * @param[in] result_length The maximum size of @a result. - * @param[in,out] pos An #i18n_ufield_position_h handle. On input, position->field is read. - * On output, position->beginIndex and position->endIndex indicate the beginning - * and ending indices of field number position->field, if such a field exists. - * This parameter may be NULL, in which case no field + * @param[in] fmt The formatter to use. + * @param[in] number The number to format. + * @param[out] result A pointer to a buffer to receive the NULL-terminated formatted number. + * If the formatted number fits into @a result but cannot be NULL-terminated (length == result_length) + * then the error code is set to #I18N_WARNING_STRING_NOT_TERMINATED. + * If the formatted number doesn't fit into result then the error code is set to #I18N_ERROR_BUFFER_OVERFLOW. + * @param[in] result_length The maximum size of @a result. + * @param[in,out] pos An #i18n_ufield_position_h handle. On input, position->field is read. + * On output, position->beginIndex and position->endIndex indicate the beginning + * and ending indices of field number position->field, if such a field exists. + * This parameter may be NULL, in which case no field * * @return The total buffer size needed; if greater than @a result_length, the output was truncated. * @@ -237,24 +237,24 @@ int32_t i18n_unumber_format_double(const i18n_unumber_format_h fmt, double numbe /** * @brief Formats a decimal number using an #i18n_unumber_format_h. * @details The number will be formatted according to the #i18n_unumber_format_h's locale. The syntax of the input number - * is a "numeric string" as defined in the Decimal Arithmetic Specification, available at http://speleotrove.com/decimal + * is a "numeric string" as defined in the Decimal Arithmetic Specification, available at http://speleotrove.com/decimal * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] fmt The formatter to use. - * @param[in] number The number to format. - * @param[in] length The length of the input @a number, or -1 if the input is NULL-terminated. - * @param[out] result A pointer to a buffer to receive the NULL-terminated formatted number. - * If the formatted number fits into @a result but cannot be NULL-terminated (length == result_length) then - * the error code is set to #I18N_WARNING_STRING_NOT_TERMINATED. - * If the formatted number doesn't fit into result then the error code is set to - * #I18N_ERROR_BUFFER_OVERFLOW. - * @param[in] result_length The maximum size of @a result. - * @param[in,out] pos An #i18n_ufield_position_h handle. On input, position->field is read. - * On output, position->beginIndex and position->endIndex indicate the beginning and ending - * indices of field number position->field, if such a field exists. - * This parameter may be NULL, in which case it is ignored. + * @param[in] fmt The formatter to use. + * @param[in] number The number to format. + * @param[in] length The length of the input @a number, or -1 if the input is NULL-terminated. + * @param[out] result A pointer to a buffer to receive the NULL-terminated formatted number. + * If the formatted number fits into @a result but cannot be NULL-terminated (length == result_length) then + * the error code is set to #I18N_WARNING_STRING_NOT_TERMINATED. + * If the formatted number doesn't fit into result then the error code is set to + * #I18N_ERROR_BUFFER_OVERFLOW. + * @param[in] result_length The maximum size of @a result. + * @param[in,out] pos An #i18n_ufield_position_h handle. On input, position->field is read. + * On output, position->beginIndex and position->endIndex indicate the beginning and ending + * indices of field number position->field, if such a field exists. + * This parameter may be NULL, in which case it is ignored. * * @return The total buffer size needed; if greater than @a result_length, the output was truncated. * @@ -269,22 +269,22 @@ int32_t i18n_unumber_format_decimal(const i18n_unumber_format_h fmt, const char * @brief Formats a double currency amount using an #i18n_unumber_format_h. * @details The double will be formatted according to the #i18n_unumber_format_h's locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] fmt The formatter to use. - * @param[in] number The number to format. - * @param[in] currency The 3-letter NULL-terminated ISO 4217 currency code. - * @param[out] result A pointer to a buffer to receive the NULL-terminated formatted number. - * If the formatted number fits into @a result but cannot be NULL-terminated (length == result_length) - * then the error code is set to #I18N_WARNING_STRING_NOT_TERMINATED. - * If the formatted number doesn't fit into result then the error code is set to - * #I18N_ERROR_BUFFER_OVERFLOW. - * @param[in] result_length The maximum size of @a result. - * @param[in,out] pos An #i18n_ufield_position_h handle. On input, position->field is read. - * On output, position->beginIndex and position->endIndex indicate the beginning and ending indices - * of field number position->field, if such a field exists. - * This parameter may be NULL, in which case it is ignored. + * @param[in] fmt The formatter to use. + * @param[in] number The number to format. + * @param[in] currency The 3-letter NULL-terminated ISO 4217 currency code. + * @param[out] result A pointer to a buffer to receive the NULL-terminated formatted number. + * If the formatted number fits into @a result but cannot be NULL-terminated (length == result_length) + * then the error code is set to #I18N_WARNING_STRING_NOT_TERMINATED. + * If the formatted number doesn't fit into result then the error code is set to + * #I18N_ERROR_BUFFER_OVERFLOW. + * @param[in] result_length The maximum size of @a result. + * @param[in,out] pos An #i18n_ufield_position_h handle. On input, position->field is read. + * On output, position->beginIndex and position->endIndex indicate the beginning and ending indices + * of field number position->field, if such a field exists. + * This parameter may be NULL, in which case it is ignored. * * @return The total buffer size needed; if greater than @a result_length, the output was truncated. * @@ -299,14 +299,14 @@ int32_t i18n_unumber_format_double_currency(const i18n_unumber_format_h fmt, dou * @brief Parses a string into an integer using an #i18n_unumber_format_h. * @details The string will be parsed according to the #i18n_unumber_format_h's locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] fmt The formatter to use. - * @param[in] text The text to parse. - * @param[in] text_length The length of @a text, or -1 if NULL-terminated. - * @param[in,out] parse_pos If not NULL, on input a pointer to an integer specifying the offset at which to begin parsing. - * If not NULL, on output the offset at which parsing ended. + * @param[in] fmt The formatter to use. + * @param[in] text The text to parse. + * @param[in] text_length The length of @a text, or -1 if NULL-terminated. + * @param[in,out] parse_pos If not NULL, on input a pointer to an integer specifying the offset at which to begin parsing. + * If not NULL, on output the offset at which parsing ended. * * @return The value of the parsed integer * @@ -319,14 +319,14 @@ int32_t i18n_unumber_parse(const i18n_unumber_format_h fmt, const i18n_uchar *te * @brief Parses a string into an int64 using an #i18n_unumber_format_h. * @details The string will be parsed according to the #i18n_unumber_format_h's locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] fmt The formatter to use. - * @param[in] text The text to parse. - * @param[in] text_length The length of @a text, or -1 if NULL-terminated. - * @param[in,out] parse_pos If not NULL, on input a pointer to an integer specifying the offset at which to begin parsing. - * If not NULL, on output the offset at which parsing ended. + * @param[in] fmt The formatter to use. + * @param[in] text The text to parse. + * @param[in] text_length The length of @a text, or -1 if NULL-terminated. + * @param[in,out] parse_pos If not NULL, on input a pointer to an integer specifying the offset at which to begin parsing. + * If not NULL, on output the offset at which parsing ended. * * @return The value of the parsed integer * @@ -339,14 +339,14 @@ int64_t i18n_unumber_parse_int64(const i18n_unumber_format_h fmt, const i18n_uch * @brief Parses a string into a double using an #i18n_unumber_format_h. * @details The string will be parsed according to the #i18n_unumber_format_h's locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] fmt The formatter to use. - * @param[in] text The text to parse. - * @param[out] text_length The length of @a text, or -1 if NULL-terminated. - * @param[in,out] parse_pos If not NULL, on input a pointer to an integer specifying the offset at which to begin parsing. - * If not NULL, on output the offset at which parsing ended. + * @param[in] fmt The formatter to use. + * @param[in] text The text to parse. + * @param[out] text_length The length of @a text, or -1 if NULL-terminated. + * @param[in,out] parse_pos If not NULL, on input a pointer to an integer specifying the offset at which to begin parsing. + * If not NULL, on output the offset at which parsing ended. * * @return The value of the parsed double * @@ -358,21 +358,21 @@ double i18n_unumber_parse_double(const i18n_unumber_format_h fmt, const i18n_uch /** * @brief Parses a number from a string into an unformatted numeric string using an #i18n_unumber_format_h. * @details The input string will be parsed according to the #i18n_unumber_format_h's locale. - * The syntax of the output is a "numeric string" as defined in the Decimal Arithmetic Specification, available at - * http://speleotrove.com/decimal + * The syntax of the output is a "numeric string" as defined in the Decimal Arithmetic Specification, available at + * http://speleotrove.com/decimal * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] fmt The formatter to use. - * @param[in] text The text to parse. - * @param[in] text_length The length of @a text, or -1 if NULL-terminated. - * @param[in,out] parse_pos If not NULL, on input a pointer to an integer specifying the offset at which to begin parsing. - * If not NULL, on output the offset at which parsing ended. - * @param[out] out_buf A (char *) buffer to receive the parsed number as a string. - * The output string will be NULL-terminated if there is sufficient space. - * @param[out] out_buf_length The size of the output buffer. May be zero, in which case the @a out_buf pointer may be NULL, - * and the function will return the size of the output string. + * @param[in] fmt The formatter to use. + * @param[in] text The text to parse. + * @param[in] text_length The length of @a text, or -1 if NULL-terminated. + * @param[in,out] parse_pos If not NULL, on input a pointer to an integer specifying the offset at which to begin parsing. + * If not NULL, on output the offset at which parsing ended. + * @param[out] out_buf A (char *) buffer to receive the parsed number as a string. + * The output string will be NULL-terminated if there is sufficient space. + * @param[out] out_buf_length The size of the output buffer. May be zero, in which case the @a out_buf pointer may be NULL, + * and the function will return the size of the output string. * * @return The length of the output string, not including any terminating NULL. * @@ -385,18 +385,18 @@ int32_t i18n_unumber_parse_decimal(const i18n_unumber_format_h fmt, const i18n_u * @brief Parses a string into a double and a currency using an #i18n_unumber_format_h. * @details The string will be parsed according to the #i18n_unumber_format_h's locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] fmt The formatter to use. - * @param[in] text The text to parse. - * @param[in] text_length The length of @a text, or -1 if NULL-terminated. - * @param[in,out] parse_pos A pointer to an offset index into text at which to begin parsing. On output, @a parse_pos will - * point after the last parsed character. This parameter may be NULL, in which case parsing begins - * at offset 0. - * If not NULL, on output the offset at which parsing ended. - * @param[out] currency A pointer to the buffer to receive the parsed NULL- terminated currency. - * This buffer must have a capacity of at least 4 #i18n_uchar characters. + * @param[in] fmt The formatter to use. + * @param[in] text The text to parse. + * @param[in] text_length The length of @a text, or -1 if NULL-terminated. + * @param[in,out] parse_pos A pointer to an offset index into text at which to begin parsing. On output, @a parse_pos will + * point after the last parsed character. This parameter may be NULL, in which case parsing begins + * at offset 0. + * If not NULL, on output the offset at which parsing ended. + * @param[out] currency A pointer to the buffer to receive the parsed NULL- terminated currency. + * This buffer must have a capacity of at least 4 #i18n_uchar characters. * * @return The parsed double * @@ -411,28 +411,28 @@ double i18n_unumber_parse_double_currency(const i18n_unumber_format_h fmt, const * @remarks Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] format The formatter to set. - * @param[in] localized true if the pattern is localized, false otherwise. - * @param[in] pattern The new pattern - * @param[in] pattern_length The length of @a pattern, or -1 if NULL-terminated. - * @param[out] parse_error A pointer to #i18n_uparse_error_s to receive information about errors occurred during parsing, - * or NULL if no parse error information is desired. + * @param[in] format The formatter to set. + * @param[in] localized true if the pattern is localized, false otherwise. + * @param[in] pattern The new pattern + * @param[in] pattern_length The length of @a pattern, or -1 if NULL-terminated. + * @param[out] parse_error A pointer to #i18n_uparse_error_s to receive information about errors occurred during parsing, + * or NULL if no parse error information is desired. * * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful. * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_unumber_apply_pattern(i18n_unumber_format_h format, i18n_ubool localized, const i18n_uchar *pattern, int32_t pattern_length, i18n_uparse_error_s* parse_error); +int i18n_unumber_apply_pattern(i18n_unumber_format_h format, i18n_ubool localized, const i18n_uchar *pattern, int32_t pattern_length, i18n_uparse_error_s *parse_error); /** * @brief Gets a locale for which decimal formatting patterns are available. * @details An #i18n_unumber_format_h in a locale returned by this function will perform the correct formatting and parsing for the locale. - * The results of this call are not valid for rule-based number formats. + * The results of this call are not valid for rule-based number formats. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] locale_index The index of the desired locale. + * @param[in] locale_index The index of the desired locale. * * @return A locale for which number formatting patterns are available, or 0 if none. * @@ -443,9 +443,9 @@ const char *i18n_unumber_get_available(int32_t locale_index); /** * @brief Determines how many locales have decimal formatting patterns available. * @details The results of this call are not valid for rule-based number formats. - * This function is useful for determining the loop ending condition for calls to i18n_unumber_get_available(). + * This function is useful for determining the loop ending condition for calls to i18n_unumber_get_available(). * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * * @return The number of locales for which decimal formatting patterns are available. @@ -458,16 +458,16 @@ int32_t i18n_unumber_count_available(void); * @brief Gets a numeric attribute associated with an #i18n_unumber_format_h. * @details An example of a numeric attribute is the number of integer digits a formatter will produce. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] fmt The formatter to query. - * @param[in] attr The attribute to query; one of #I18N_UNUMBER_PARSE_INT_ONLY, #I18N_UNUMBER_GROUPING_USED, - * #I18N_UNUMBER_DECIMAL_ALWAYS_SHOWN, #I18N_UNUMBER_MAX_INTEGER_DIGITS, #I18N_UNUMBER_MIN_INTEGER_DIGITS, - * #I18N_UNUMBER_INTEGER_DIGITS, #I18N_UNUMBER_MAX_FRACTION_DIGITS, #I18N_UNUMBER_MIN_FRACTION_DIGITS, - * #I18N_UNUMBER_FRACTION_DIGITS, #I18N_UNUMBER_MULTIPLIER, #I18N_UNUMBER_GROUPING_SIZE, - * #I18N_UNUMBER_ROUNDING_MODE, #I18N_UNUMBER_FORMAT_WIDTH, #I18N_UNUMBER_PADDING_POSITION, - * #I18N_UNUMBER_SECONDARY_GROUPING_SIZE, #I18N_UNUM_SCALE. + * @param[in] fmt The formatter to query. + * @param[in] attr The attribute to query; one of #I18N_UNUMBER_PARSE_INT_ONLY, #I18N_UNUMBER_GROUPING_USED, + * #I18N_UNUMBER_DECIMAL_ALWAYS_SHOWN, #I18N_UNUMBER_MAX_INTEGER_DIGITS, #I18N_UNUMBER_MIN_INTEGER_DIGITS, + * #I18N_UNUMBER_INTEGER_DIGITS, #I18N_UNUMBER_MAX_FRACTION_DIGITS, #I18N_UNUMBER_MIN_FRACTION_DIGITS, + * #I18N_UNUMBER_FRACTION_DIGITS, #I18N_UNUMBER_MULTIPLIER, #I18N_UNUMBER_GROUPING_SIZE, + * #I18N_UNUMBER_ROUNDING_MODE, #I18N_UNUMBER_FORMAT_WIDTH, #I18N_UNUMBER_PADDING_POSITION, + * #I18N_UNUMBER_SECONDARY_GROUPING_SIZE, #I18N_UNUM_SCALE. * * @return The value of @a attr or @c -1 if the given attribute is not supported. * @@ -479,21 +479,21 @@ int32_t i18n_unumber_get_attribute(const i18n_unumber_format_h fmt, i18n_unumber /** * @brief Sets a numeric attribute associated with an #i18n_unumber_format_h. * @details An example of a numeric attribute is the number of integer digits a formatter will produce. - * If the formatter does not understand the attribute, the call is ignored. Rule-based formatters only understand - * the lenient-parse attribute. The #I18N_UNUMBER_ROUNDING_INCREMENT attribute is not supported. + * If the formatter does not understand the attribute, the call is ignored. Rule-based formatters only understand + * the lenient-parse attribute. The #I18N_UNUMBER_ROUNDING_INCREMENT attribute is not supported. * @remarks Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] fmt The formatter to set. - * @param[in] attr The attribute to query; one of #I18N_UNUMBER_PARSE_INT_ONLY, #I18N_UNUMBER_GROUPING_USED, - * #I18N_UNUMBER_DECIMAL_ALWAYS_SHOWN, #I18N_UNUMBER_MAX_INTEGER_DIGITS, #I18N_UNUMBER_MIN_INTEGER_DIGITS, - * #I18N_UNUMBER_INTEGER_DIGITS, #I18N_UNUMBER_MAX_FRACTION_DIGITS, #I18N_UNUMBER_MIN_FRACTION_DIGITS, - * #I18N_UNUMBER_FRACTION_DIGITS, #I18N_UNUMBER_MULTIPLIER, #I18N_UNUMBER_GROUPING_SIZE, - * #I18N_UNUMBER_ROUNDING_MODE, #I18N_UNUMBER_FORMAT_WIDTH, #I18N_UNUMBER_PADDING_POSITION, - * #I18N_UNUMBER_SECONDARY_GROUPING_SIZE, #I18N_UNUMBER_SIGNIFICANT_DIGITS_USED, #I18N_UNUMBER_MIN_SIGNIFICANT_DIGITS, - * #I18N_UNUMBER_MAX_SIGNIFICANT_DIGITS, #I18N_UNUMBER_LENIENT_PARSE, #I18N_UNUM_SCALE, - * #I18N_UNUM_FORMAT_FAIL_IF_MORE_THAN_MAX_DIGITS, #I18N_UNUM_PARSE_NO_EXPONENT. - * @param[in] new_value The new value of @a attr. + * @param[in] fmt The formatter to set. + * @param[in] attr The attribute to query; one of #I18N_UNUMBER_PARSE_INT_ONLY, #I18N_UNUMBER_GROUPING_USED, + * #I18N_UNUMBER_DECIMAL_ALWAYS_SHOWN, #I18N_UNUMBER_MAX_INTEGER_DIGITS, #I18N_UNUMBER_MIN_INTEGER_DIGITS, + * #I18N_UNUMBER_INTEGER_DIGITS, #I18N_UNUMBER_MAX_FRACTION_DIGITS, #I18N_UNUMBER_MIN_FRACTION_DIGITS, + * #I18N_UNUMBER_FRACTION_DIGITS, #I18N_UNUMBER_MULTIPLIER, #I18N_UNUMBER_GROUPING_SIZE, + * #I18N_UNUMBER_ROUNDING_MODE, #I18N_UNUMBER_FORMAT_WIDTH, #I18N_UNUMBER_PADDING_POSITION, + * #I18N_UNUMBER_SECONDARY_GROUPING_SIZE, #I18N_UNUMBER_SIGNIFICANT_DIGITS_USED, #I18N_UNUMBER_MIN_SIGNIFICANT_DIGITS, + * #I18N_UNUMBER_MAX_SIGNIFICANT_DIGITS, #I18N_UNUMBER_LENIENT_PARSE, #I18N_UNUM_SCALE, + * #I18N_UNUM_FORMAT_FAIL_IF_MORE_THAN_MAX_DIGITS, #I18N_UNUM_PARSE_NO_EXPONENT. + * @param[in] new_value The new value of @a attr. * * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful. @@ -504,13 +504,13 @@ int i18n_unumber_set_attribute(i18n_unumber_format_h fmt, i18n_unumber_format_at /** * @brief Gets a numeric attribute associated with an #i18n_unumber_format_h. * @details An example of a numeric attribute is the number of integer digits a formatter will produce. - * If the formatter does not understand the attribute, -1 is returned. + * If the formatter does not understand the attribute, -1 is returned. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] fmt The formatter to query. - * @param[in] attr The attribute to query; only #I18N_UNUMBER_ROUNDING_INCREMENT is supported. + * @param[in] fmt The formatter to query. + * @param[in] attr The attribute to query; only #I18N_UNUMBER_ROUNDING_INCREMENT is supported. * * @return The value of @a attr. * @@ -522,13 +522,13 @@ double i18n_unumber_get_double_attribute(const i18n_unumber_format_h fmt, i18n_u /** * @brief Sets a numeric attribute associated with an #i18n_unumber_format_h. * @details An example of a numeric attribute is the number of integer digits a formatter will produce. - * If the formatter does not understand the attribute, this call is ignored. + * If the formatter does not understand the attribute, this call is ignored. * @remarks Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] fmt The formatter to set. - * @param[in] attr The attribute to query; Only #I18N_UNUMBER_ROUNDING_INCREMENT is supported. - * @param[in] new_value The new value of @a attr. + * @param[in] fmt The formatter to set. + * @param[in] attr The attribute to query; Only #I18N_UNUMBER_ROUNDING_INCREMENT is supported. + * @param[in] new_value The new value of @a attr. * * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful. @@ -539,18 +539,18 @@ int i18n_unumber_set_double_attribute(i18n_unumber_format_h fmt, i18n_unumber_fo /** * @brief Gets a text attribute associated with an #i18n_unumber_format_h. * @details An example of a text attribute is the suffix for positive numbers. If the formatter does not understand the attribute, - * #I18N_ERROR_NOT_SUPPORTED error code is set. - * Rule-based formatters only understand #I18N_UNUMBER_DEFAULT_RULESET and #I18N_UNUMBER_PUBLIC_RULESETS. + * #I18N_ERROR_NOT_SUPPORTED error code is set. + * Rule-based formatters only understand #I18N_UNUMBER_DEFAULT_RULESET and #I18N_UNUMBER_PUBLIC_RULESETS. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] fmt The formatter to query. - * @param[in] tag The attribute to query; one of #I18N_UNUMBER_POSITIVE_PREFIX, #I18N_UNUMBER_POSITIVE_SUFFIX, - * #I18N_UNUMBER_NEGATIVE_PREFIX, #I18N_UNUMBER_NEGATIVE_SUFFIX, #I18N_UNUMBER_PADDING_CHARACTER, - * #I18N_UNUMBER_CURRENCY_CODE, #I18N_UNUMBER_DEFAULT_RULESET, or #I18N_UNUMBER_PUBLIC_RULESETS. - * @param[out] result A pointer to a buffer to receive the attribute. - * @param[in] result_length The maximum size of @a result. + * @param[in] fmt The formatter to query. + * @param[in] tag The attribute to query; one of #I18N_UNUMBER_POSITIVE_PREFIX, #I18N_UNUMBER_POSITIVE_SUFFIX, + * #I18N_UNUMBER_NEGATIVE_PREFIX, #I18N_UNUMBER_NEGATIVE_SUFFIX, #I18N_UNUMBER_PADDING_CHARACTER, + * #I18N_UNUMBER_CURRENCY_CODE, #I18N_UNUMBER_DEFAULT_RULESET, or #I18N_UNUMBER_PUBLIC_RULESETS. + * @param[out] result A pointer to a buffer to receive the attribute. + * @param[in] result_length The maximum size of @a result. * * @return The total buffer size needed; if greater than @a result_length, the output was truncated. * @@ -562,16 +562,16 @@ int32_t i18n_unumber_get_text_attribute(const i18n_unumber_format_h fmt, i18n_un /** * @brief Sets a text attribute associated with an #i18n_unumber_format_h. * @details An example of a text attribute is the suffix for positive numbers. Rule-based formatters only understand - * #I18N_UNUMBER_DEFAULT_RULESET. The #I18N_UNUMBER_PUBLIC_RULESETS tag is not supported. + * #I18N_UNUMBER_DEFAULT_RULESET. The #I18N_UNUMBER_PUBLIC_RULESETS tag is not supported. * @remarks Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] fmt The formatter to set. - * @param[in] tag The attribute to set; one of #I18N_UNUMBER_POSITIVE_PREFIX, #I18N_UNUMBER_POSITIVE_SUFFIX, - * #I18N_UNUMBER_NEGATIVE_PREFIX, #I18N_UNUMBER_NEGATIVE_SUFFIX, #I18N_UNUMBER_PADDING_CHARACTER, - * #I18N_UNUMBER_CURRENCY_CODE, #I18N_UNUMBER_DEFAULT_RULESET. - * @param[in] new_value The new value of @a tag. - * @param[in] new_value_length The length of new_value, or -1 if NULL-terminated. + * @param[in] fmt The formatter to set. + * @param[in] tag The attribute to set; one of #I18N_UNUMBER_POSITIVE_PREFIX, #I18N_UNUMBER_POSITIVE_SUFFIX, + * #I18N_UNUMBER_NEGATIVE_PREFIX, #I18N_UNUMBER_NEGATIVE_SUFFIX, #I18N_UNUMBER_PADDING_CHARACTER, + * #I18N_UNUMBER_CURRENCY_CODE, #I18N_UNUMBER_DEFAULT_RULESET. + * @param[in] new_value The new value of @a tag. + * @param[in] new_value_length The length of new_value, or -1 if NULL-terminated. * * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful. @@ -583,14 +583,14 @@ int i18n_unumber_set_text_attribute(const i18n_unumber_format_h fmt, i18n_unumbe * @brief Extracts the pattern from an #i18n_unumber_format_h. * @details The pattern will follow the DecimalFormat pattern syntax. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] fmt The formatter to query. - * @param[in] is_pattern_localized true if the pattern should be localized, false otherwise. - * This is ignored if the formatter is a rule-based formatter. - * @param[out] result A pointer to a buffer to receive the pattern. - * @param[in] result_length The maximum size of @a result. + * @param[in] fmt The formatter to query. + * @param[in] is_pattern_localized true if the pattern should be localized, false otherwise. + * This is ignored if the formatter is a rule-based formatter. + * @param[out] result A pointer to a buffer to receive the pattern. + * @param[in] result_length The maximum size of @a result. * * @return The total buffer size needed; if greater than @a result_length, the output was truncated. * @@ -602,14 +602,14 @@ int32_t i18n_unumber_to_pattern(const i18n_unumber_format_h fmt, i18n_ubool is_p /** * @brief Sets a symbol associated with an #i18n_unumber_format_h. * @details An #i18n_unumber_format_h uses symbols to represent the special locale-dependent characters in a number, for example the percent sign. - * This API is not supported for rule-based formatters. + * This API is not supported for rule-based formatters. * @remarks Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] fmt The formatter to set. - * @param[in] symbol The #i18n_unumber_format_symbol_e constant for the symbol to set - * @param[in] value The string to set the symbol to - * @param[in] length The length of the input string, or -1 for a zero-terminated string + * @param[in] fmt The formatter to set. + * @param[in] symbol The #i18n_unumber_format_symbol_e constant for the symbol to set + * @param[in] value The string to set the symbol to + * @param[in] length The length of the input string, or -1 for a zero-terminated string * * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful. @@ -621,11 +621,11 @@ int i18n_unumber_set_symbol(i18n_unumber_format_h fmt, i18n_unumber_format_symbo * @brief Gets the locale for this number format object. * @details You can choose between valid and actual locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] fmt The formatter to get the locale from. - * @param[in] type Type of the locale we're looking for (valid or actual) + * @param[in] fmt The formatter to get the locale from. + * @param[in] type Type of the locale we're looking for (valid or actual) * * @return The locale name * @@ -644,4 +644,4 @@ const char *i18n_unumber_get_locale_by_type(const i18n_unumber_format_h fmt, i18 * @} */ -#endif /* __UTILS_I18N_UNUMBER_H__*/ +#endif /* __UTILS_I18N_UNUMBER_H__*/ diff --git a/src/include/mobile/utils_i18n_usearch.h b/src/include/mobile/utils_i18n_usearch.h old mode 100755 new mode 100644 index 9478569..d82decc --- a/src/include/mobile/utils_i18n_usearch.h +++ b/src/include/mobile/utils_i18n_usearch.h @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef __UTILS_I18N_USEARCH_H__ @@ -35,7 +35,7 @@ extern "C" { * @brief The Usearch module provides language-sensitive text searching based on the comparison rules defined in a ucollator data struct. * * @section CAPI_BASE_UTILS_I18N_USEARCH_MODULE_HEADER Required Header - * \#include + * \#include * * @section CAPI_BASE_UTILS_I18N_USEARCH_MODULE_OVERVIEW Overview * @details The Usearch module provides language-sensitive text searching based on the comparison rules defined in a ucollator data struct. @@ -43,35 +43,35 @@ extern "C" { * @section CAPI_BASE_UTILS_I18N_USEARCH_MODULE_SAMPLE_CODE_1 Sample Code 1 * @brief Searches the pattern and gets the matched text. * @code - char *string = "TIZEN"; - char *keyword = "ZE"; - i18n_uchar target[16] = {0,}; - i18n_uchar pattern[16] = {0,}; - i18n_uchar u_matched[16] = {0,}; - char tmp[1] = {0}; - i18n_usearch_h search = NULL; - int pos = 0; - int matched_text_len = 0; - int i = 0; - i18n_error_code_e error_code; - - i18n_ustring_from_UTF8( target, 16, NULL, string, -1, &error_code ); - i18n_ustring_from_UTF8( pattern, 16, NULL, keyword, -1, &error_code ); - - // creates a search - i18n_usearch_create_new( pattern, -1, target, -1, "en_US", NULL, &search ); - - // gets the first index of the target that matches with the pattern - i18n_usearch_first( search, &pos ); - dlog_print(DLOG_INFO, LOG_TAG, "the first index = %d", pos ); // The first index = 2 - - // gets the matched text - i18n_usearch_get_matched_text( search, u_matched, 16, &matched_text_len ); - for ( i = 0; i < matched_text_len; i++) { - i18n_ustring_copy_au_n( tmp, &u_matched[i], 1 ); - dlog_print(DLOG_INFO, LOG_TAG, "u_matched[%d] = %c", i, tmp[0] ); // u_matched[0] = Z, u_matched[1] = E - } - i18n_usearch_destroy( search ); + char *string = "TIZEN"; + char *keyword = "ZE"; + i18n_uchar target[16] = {0,}; + i18n_uchar pattern[16] = {0,}; + i18n_uchar u_matched[16] = {0,}; + char tmp[1] = {0}; + i18n_usearch_h search = NULL; + int pos = 0; + int matched_text_len = 0; + int i = 0; + i18n_error_code_e error_code; + + i18n_ustring_from_UTF8( target, 16, NULL, string, -1, &error_code ); + i18n_ustring_from_UTF8( pattern, 16, NULL, keyword, -1, &error_code ); + + // creates a search + i18n_usearch_create_new( pattern, -1, target, -1, "en_US", NULL, &search ); + + // gets the first index of the target that matches with the pattern + i18n_usearch_first( search, &pos ); + dlog_print(DLOG_INFO, LOG_TAG, "the first index = %d", pos ); // The first index = 2 + + // gets the matched text + i18n_usearch_get_matched_text( search, u_matched, 16, &matched_text_len ); + for ( i = 0; i < matched_text_len; i++) { + i18n_ustring_copy_au_n( tmp, &u_matched[i], 1 ); + dlog_print(DLOG_INFO, LOG_TAG, "u_matched[%d] = %c", i, tmp[0] ); // u_matched[0] = Z, u_matched[1] = E + } + i18n_usearch_destroy( search ); * @endcode */ @@ -127,7 +127,7 @@ int i18n_usearch_create(const i18n_uchar *pattern, int32_t pattern_len, const i1 * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ int i18n_usearch_create_new(const i18n_uchar *pattern, int32_t pattern_len, const i18n_uchar *text, - int32_t text_len, const char *locale, i18n_ubreak_iterator_h break_iter, i18n_usearch_h *search_iter); + int32_t text_len, const char *locale, i18n_ubreak_iterator_h break_iter, i18n_usearch_h *search_iter); /** * @brief Destroys and cleans up the i18n_usearch_h. @@ -204,4 +204,4 @@ int i18n_usearch_first(i18n_usearch_h search_iter, int32_t *index_first); * @} */ -#endif /* __UTILS_I18N_USEARCH_H__*/ +#endif /* __UTILS_I18N_USEARCH_H__*/ diff --git a/src/include/mobile/utils_i18n_uset.h b/src/include/mobile/utils_i18n_uset.h old mode 100755 new mode 100644 index 8e40c1f..c186efb --- a/src/include/mobile/utils_i18n_uset.h +++ b/src/include/mobile/utils_i18n_uset.h @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * Copyright (C) 1999-2013, International Business Machines Corporation * and others. All Rights Reserved. @@ -39,7 +39,7 @@ extern "C" { * @brief Uset module allows to specify a subset of character used in strings. * * @section CAPI_BASE_UTILS_I18N_USET_MODULE_HEADER Required Header - * \#include + * \#include * * @section CAPI_BASE_UTILS_I18N_USET_MODULE_OVERVIEW Overview * @details Uset module allows to specify a subset of character used in strings. @@ -109,7 +109,7 @@ int i18n_uset_create_pattern(const i18n_uchar *pattern, int32_t pattern_length, * @param[in] pattern_length The length of the pattern, >= 0, or -1 if NULL-terminated * @param[in] options Bitmask for options to apply to the pattern. * Valid options are #I18N_USET_IGNORE_SPACE and #I18N_USET_CASE_INSENSITIVE. - * @param[out] set A pointer to the newly created #i18n_uset_h object. The caller must call i18n_uset_destroy() on + * @param[out] set A pointer to the newly created #i18n_uset_h object. The caller must call i18n_uset_destroy() on * it when done. * * @return Error code. Error codes not listed below are described in #i18n_error_code_e @@ -153,7 +153,7 @@ int i18n_uset_clone(const i18n_uset_h set, i18n_uset_h *set_clone); * @details See the ICU4J Freezable interface for details. * * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * * @since_tizen 2.3.1 * @param[in] set The set. Must not be @c NULL. @@ -229,21 +229,21 @@ int i18n_uset_set(i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end); * A frozen set will not be modified. * * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. + * Error codes are described in Exceptions section and in #i18n_error_code_e description. * * @since_tizen 2.3.1 - * @param[in] set The set to which the pattern is to be applied. Must not be @c NULL. - * @param[in] pattern A pointer to #i18n_uchar string specifying what characters are in the set. - * The character at pattern[0] must be a '['. + * @param[in] set The set to which the pattern is to be applied. Must not be @c NULL. + * @param[in] pattern A pointer to #i18n_uchar string specifying what characters are in the set. + * The character at pattern[0] must be a '['. * @param[in] pattern_length The length of the #i18n_uchar string, >= 0, or -1 if NULL terminated. - * @param[in] options A bitmask for options to apply to the pattern. - * Valid options are #I18N_USET_IGNORE_SPACE and #I18N_USET_CASE_INSENSITIVE. - * @return Upon successful parse, the value is either - * the index of the character after the closing ']' - * of the parsed pattern. - * If the status code indicates failure, then the return value - * is the index of the error in the source. - * If @a set is NULL, 0 is returned. + * @param[in] options A bitmask for options to apply to the pattern. + * Valid options are #I18N_USET_IGNORE_SPACE and #I18N_USET_CASE_INSENSITIVE. + * @return Upon successful parse, the value is either + * the index of the character after the closing ']' + * of the parsed pattern. + * If the status code indicates failure, then the return value + * is the index of the error in the source. + * If @a set is NULL, 0 is returned. * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -252,20 +252,20 @@ int32_t i18n_uset_apply_pattern(i18n_uset_h set, const i18n_uchar *pattern, int3 /** * @brief Modifies the set to contain those code points which have the given value - * for the given binary or enumerated property, as returned by - * i18n_uchar_get_int_property_value(). + * for the given binary or enumerated property, as returned by + * i18n_uchar_get_int_property_value(). * @details Prior contents of this set are lost. - * A frozen set will not be modified. + * A frozen set will not be modified. * * @since_tizen 2.3.1 * @param[in] set The object to contain the code points defined by the property. Must not be @c NULL. * @param[in] prop A property in the range #I18N_UCHAR_INT_START..#I18N_UCHAR_INT_LIMIT-1 - * or #I18N_UCHAR_MASK_START..#I18N_UCHAR_MASK_LIMIT-1. + * or #I18N_UCHAR_MASK_START..#I18N_UCHAR_MASK_LIMIT-1. * @param[in] value A value in the range i18n_uchar_get_int_property_min_value(prop).. - * i18n_uchar_get_int_property_max_value(prop), with one exception. If prop is - * #I18N_UCHAR_GENERAL_CATEGORY_MASK, then value should not be a #i18n_uchar_category_e, but - * rather a mask value produced by I18N_U_GET_GC_MASK(). This allows grouped - * categories such as [:L:] to be represented. + * i18n_uchar_get_int_property_max_value(prop), with one exception. If prop is + * #I18N_UCHAR_GENERAL_CATEGORY_MASK, then value should not be a #i18n_uchar_category_e, but + * rather a mask value produced by I18N_U_GET_GC_MASK(). This allows grouped + * categories such as [:L:] to be represented. * * @return Error code. Error codes not listed below are described in #i18n_error_code_e * @retval #I18N_ERROR_NONE Successful @@ -275,18 +275,18 @@ int i18n_uset_apply_int_property_value(i18n_uset_h set, i18n_uchar_uproperty_e p /** * @brief Modifies the set to contain those code points which have the - * given value for the given property. + * given value for the given property. * @details Prior contents of this set are lost. A frozen set will not be modified. * @since_tizen 2.3.1 * * @param[in] set The object to contain the code points defined by the given - * property and value alias. Must not be @c NULL. + * property and value alias. Must not be @c NULL. * @param[in] prop A string specifying a property alias, either short or long. - * The name is matched loosely. See PropertyAliases.txt for names and a - * description of loose matching. If the value string is empty, then this - * string is interpreted as either a General_Category value alias, a Script - * value alias, a binary property alias, or a special ID. Special IDs are - * matched loosely and correspond to the following sets: + * The name is matched loosely. See PropertyAliases.txt for names and a + * description of loose matching. If the value string is empty, then this + * string is interpreted as either a General_Category value alias, a Script + * value alias, a binary property alias, or a special ID. Special IDs are + * matched loosely and correspond to the following sets: * * "ANY" = [\\u0000-\\U0010FFFF], * "ASCII" = [\\u0000-\\u007F], @@ -294,11 +294,11 @@ int i18n_uset_apply_int_property_value(i18n_uset_h set, i18n_uchar_uproperty_e p * * @param[in] prop_length The length of the @a prop, >= 0, or @c -1 if @c NULL. * @param[in] value A string specifying a value alias, either short or long. - * The name is matched loosely. See PropertyValueAliases.txt for names - * and a description of loose matching. In addition to aliases listed, - * numeric values and canonical combining classes may be expressed - * numerically, e.g., ("nv", "0.5") or ("ccc", "220"). The value string - * may also be empty. + * The name is matched loosely. See PropertyValueAliases.txt for names + * and a description of loose matching. In addition to aliases listed, + * numeric values and canonical combining classes may be expressed + * numerically, e.g., ("nv", "0.5") or ("ccc", "220"). The value string + * may also be empty. * @param[in] value_length The length of the value, >= 0, or -1 if NULL. * * @return Error code. Error codes not listed below are described in #i18n_error_code_e @@ -309,11 +309,11 @@ int i18n_uset_apply_property_alias(i18n_uset_h set, const i18n_uchar *prop, int3 /** * @brief Return true if the given position, in the given pattern, appears - * to be the start of a UnicodeSet pattern. + * to be the start of a UnicodeSet pattern. * @since_tizen 2.3.1 * * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * * @param[in] pattern A string specifying the pattern. * @param[in] pattern_length The length of the pattern, >= 0, or @c -1 if @c NULL. @@ -329,16 +329,16 @@ i18n_ubool i18n_uset_resembles_pattern(const i18n_uchar *pattern, int32_t patter /** * @brief Returns a string representation of the given @a set. * @details If the result of calling this function is passed to an i18n_uset_pattern_create(), - * it will produce another set that is equal to this one. + * it will produce another set that is equal to this one. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. + * Error codes are described in Exceptions section and in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] set The set. Must not be @c NULL. - * @param[in,out] result The string to receive the rules, may be @c NULL. - * @param[in] result_capacity The capacity of @a result, >= 0, may be @c 0 if result is @c NULL. - * @param[in] escape_unprintable If true then convert unprintable character to their hex escape representations, - * \\uxxxx or \\Uxxxxxxxx. Unprintable characters are those other than U+000A, U+0020..U+007E. + * @param[in] set The set. Must not be @c NULL. + * @param[in,out] result The string to receive the rules, may be @c NULL. + * @param[in] result_capacity The capacity of @a result, >= 0, may be @c 0 if result is @c NULL. + * @param[in] escape_unprintable If true then convert unprintable character to their hex escape representations, + * \\uxxxx or \\Uxxxxxxxx. Unprintable characters are those other than U+000A, U+0020..U+007E. * * @return Length of string, >= 0, possibly larger than @a result_capacity. If @a set is NULL, 0 is returned. * @@ -352,11 +352,11 @@ int32_t i18n_uset_to_pattern(const i18n_uset_h set, i18n_uchar *result, int32_t /** * @brief Adds the given character to the given #i18n_uset_h. * @details After this call, i18n_uset_contains(set, character) will return true. - * A frozen set will not be modified. + * A frozen set will not be modified. * @since_tizen 2.3.1 * - * @param[in] set The object to which to add the @a character. Must not be @c NULL. - * @param[in] character The character to add. + * @param[in] set The object to which to add the @a character. Must not be @c NULL. + * @param[in] character The character to add. * * @return Error code. Error codes not listed below are described in #i18n_error_code_e * @retval #I18N_ERROR_NONE Successful @@ -369,11 +369,11 @@ int i18n_uset_add(i18n_uset_h set, i18n_uchar32 character); /** * @brief Adds all of the elements in the specified set to this set if - * they are not already present. + * they are not already present. * @details This operation effectively modifies this set so that its value is the union of the two - * sets. The behavior of this operation is unspecified if the specified - * collection is modified while the operation is in progress. - * A frozen set will not be modified. + * sets. The behavior of this operation is unspecified if the specified + * collection is modified while the operation is in progress. + * A frozen set will not be modified. * * @since_tizen 2.3.1 * @param[in] set The object to which to add the set. Must not be @c NULL. @@ -438,11 +438,11 @@ int i18n_uset_add_all_code_points(i18n_uset_h set, const i18n_uchar *str, int32_ /** * @brief Removes the given @a character from the given #i18n_uset_h. * @details After this call, i18n_uset_contains(set, character) will return @c false. - * A frozen set will not be modified. + * A frozen set will not be modified. * @since_tizen 2.3.1 * - * @param[in] set the object from which to remove the @a character. Must not be @c NULL. - * @param[in] character the character to remove + * @param[in] set the object from which to remove the @a character. Must not be @c NULL. + * @param[in] character the character to remove * * @return Error code. Error codes not listed below are described in #i18n_error_code_e * @retval #I18N_ERROR_NONE Successful @@ -505,7 +505,7 @@ int i18n_uset_remove_all(i18n_uset_h set, const i18n_uset_h remove_set); /** * @brief Retains only the elements in this set that are contained in the specified range. - * @details If start > end then an empty range is retained, leaving the set empty. This is equivalent to + * @details If start > end then an empty range is retained, leaving the set empty. This is equivalent to * a boolean logic AND, or a set INTERSECTION. * A frozen set will not be modified. * @@ -556,7 +556,7 @@ int i18n_uset_retain_all(i18n_uset_h set, const i18n_uset_h retain); int i18n_uset_compact(i18n_uset_h set); /** - * @brief Inverts this set. This operation modifies this set so that + * @brief Inverts this set. This operation modifies this set so that * its value is its complement. * @details This operation does not affect * the multicharacter strings, if any. @@ -652,7 +652,7 @@ int i18n_uset_remove_all_strings(i18n_uset_h set); * strings. * * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * * @since_tizen 2.3.1 * @param[in] set The set. Must not be @c NULL. @@ -667,11 +667,11 @@ i18n_ubool i18n_uset_is_empty(const i18n_uset_h set); * @brief Returns @c true if the given #i18n_uset_h contains the given @a character. * @details This function works faster with a frozen set. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] set the set. Must not be @c NULL. - * @param[in] character the codepoint to check for within the @a set + * @param[in] set the set. Must not be @c NULL. + * @param[in] character the codepoint to check for within the @a set * * @return @c true if @a set contains the given @a character * @@ -685,7 +685,7 @@ i18n_ubool i18n_uset_contains(const i18n_uset_h set, i18n_uchar32 character); * where start <= c && c <= end. * * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * * @since_tizen 2.3.1 * @param[in] set The set. Must not be @c NULL. @@ -703,7 +703,7 @@ i18n_ubool i18n_uset_contains_range(const i18n_uset_h set, i18n_uchar32 start, i * @since_tizen 2.3.1 * * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * * @param[in] set The set. Must not be @c NULL. * @param[in] str The string. @@ -717,15 +717,15 @@ i18n_ubool i18n_uset_contains_string(const i18n_uset_h set, const i18n_uchar *st /** * @brief Returns the index of the given @a character within this @a set, where - * the @a set is ordered by ascending code point. + * the @a set is ordered by ascending code point. * @details If the @a character is not in this @a set, return @c -1. - * The inverse of this function is i18n_uset_char_at(). + * The inverse of this function is i18n_uset_char_at(). * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] set the set. Must not be @c NULL. - * @param[in] character the character to obtain the index for + * @param[in] set the set. Must not be @c NULL. + * @param[in] character the character to obtain the index for * * @return An index from 0..size()-1, or @c -1 * @@ -737,11 +737,11 @@ int32_t i18n_uset_index_of(const i18n_uset_h set, i18n_uchar32 character); /** * @brief Returns the character at the given index within this set, where * the set is ordered by ascending code point. - * @details If the index is out of range, return (i18n_uchar32)-1. The inverse of this function is + * @details If the index is out of range, return (i18n_uchar32)-1. The inverse of this function is * i18n_uset_index_of(). * * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * * @since_tizen 2.3.1 * @param[in] set The set. Must not be @c NULL. @@ -757,7 +757,7 @@ i18n_uchar32 i18n_uset_char_at(const i18n_uset_h set, int32_t char_index); * @brief Returns the number of characters and strings contained in the given #i18n_uset_h. * * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * * @since_tizen 2.3.1 * @param[in] set The set. Must not be @c NULL. @@ -774,7 +774,7 @@ int32_t i18n_uset_size(const i18n_uset_h set); * @details An item is either a range of characters or a single multicharacter string. * * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * * @since_tizen 2.3.1 * @param[in] set The set. Must not be @c NULL. @@ -791,7 +791,7 @@ int32_t i18n_uset_get_item_count(const i18n_uset_h set); * @details An item is either a range of characters or a single multicharacter string. * * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * * @since_tizen 2.3.1 * @param[in] set The set. Must not be @c NULL. @@ -815,7 +815,7 @@ int32_t i18n_uset_get_item(const i18n_uset_h set, int32_t item_index, i18n_uchar * @brief Returns true if set1 contains all the characters and strings of set2. It answers the question, 'Is set1 a superset of set2?' * * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * * @since_tizen 2.3.1 * @param[in] set1 Set to be checked for containment. Must not be @c NULL. @@ -833,7 +833,7 @@ i18n_ubool i18n_uset_contains_all(const i18n_uset_h set1, const i18n_uset_h set2 * clusters, like i18n_uset_contains_string(). * * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * * @since_tizen 2.3.1 * @param[in] set Set of characters to be checked for containment. Must not be @c NULL. @@ -851,7 +851,7 @@ i18n_ubool i18n_uset_contains_all_code_points(const i18n_uset_h set, const i18n_ * @details It answers the question, 'Is set1 a disjoint set of set2?' * * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * * @since_tizen 2.3.1 * @param[in] set1 Set to be checked for containment. Must not be @c NULL. @@ -868,7 +868,7 @@ i18n_ubool i18n_uset_contains_none(const i18n_uset_h set1, const i18n_uset_h set * @details It answers the question, 'Does set1 and set2 have an intersection?' * * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * * @since_tizen 2.3.1 * @param[in] set1 Set to be checked for containment. Must not be @c NULL. @@ -882,25 +882,25 @@ i18n_ubool i18n_uset_contains_some(const i18n_uset_h set1, const i18n_uset_h set /** * @brief Returns the length of the initial substring of the input string which - * consists only of characters and strings that are contained in this set - * (#I18N_USET_SPAN_CONTAINED, #I18N_USET_SPAN_SIMPLE), - * or only of characters and strings that are not contained - * in this set (#I18N_USET_SPAN_NOT_CONTAINED). + * consists only of characters and strings that are contained in this set + * (#I18N_USET_SPAN_CONTAINED, #I18N_USET_SPAN_SIMPLE), + * or only of characters and strings that are not contained + * in this set (#I18N_USET_SPAN_NOT_CONTAINED). * @details See #i18n_uset_span_condition_e for details. - * Similar to the strspn() C library function. - * Unpaired surrogates are treated according to contains() of their surrogate code points. - * This function works faster with a frozen set and with a non-negative string length argument. + * Similar to the strspn() C library function. + * Unpaired surrogates are treated according to contains() of their surrogate code points. + * This function works faster with a frozen set and with a non-negative string length argument. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] set the set. Must not be @c NULL. - * @param[in] str start of the input string. - * @param[in] length length of the @a string; >= 0, can be @c -1 for NULL-terminated - * @param[in] span_condition specifies the containment condition + * @param[in] set the set. Must not be @c NULL. + * @param[in] str start of the input string. + * @param[in] length length of the @a string; >= 0, can be @c -1 for NULL-terminated + * @param[in] span_condition specifies the containment condition * * @return The length of the initial substring according to the @a span_condition; - * @c 0 if the start of the string does not fit the @a span_condition + * @c 0 if the start of the string does not fit the @a span_condition * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -911,24 +911,24 @@ int32_t i18n_uset_span(const i18n_uset_h set, const i18n_uchar *str, int32_t len /** * @brief Returns the start of the trailing substring of the input string which - * consists only of characters and strings that are contained in this set - * (#I18N_USET_SPAN_CONTAINED, #I18N_USET_SPAN_SIMPLE), - * or only of characters and strings that are not contained - * in this set (#I18N_USET_SPAN_NOT_CONTAINED). + * consists only of characters and strings that are contained in this set + * (#I18N_USET_SPAN_CONTAINED, #I18N_USET_SPAN_SIMPLE), + * or only of characters and strings that are not contained + * in this set (#I18N_USET_SPAN_NOT_CONTAINED). * @details See #i18n_uset_span_condition_e for details. - * Unpaired surrogates are treated according to contains() of their surrogate code points. - * This function works faster with a frozen set and with a non-negative string length argument. + * Unpaired surrogates are treated according to contains() of their surrogate code points. + * This function works faster with a frozen set and with a non-negative string length argument. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] set the set. Must not be @c NULL. - * @param[in] str start of the input string - * @param[in] length length of the @ string; >= 0, can be @c -1 for NULL-terminated - * @param[in] span_condition specifies the containment condition + * @param[in] set the set. Must not be @c NULL. + * @param[in] str start of the input string + * @param[in] length length of the @ string; >= 0, can be @c -1 for NULL-terminated + * @param[in] span_condition specifies the containment condition * * @return the start of the trailing substring according to the @a span_condition; - * the string length if the end of the string does not fit the @a span_condition + * the string length if the end of the string does not fit the @a span_condition * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -939,25 +939,25 @@ int32_t i18n_uset_span_back(const i18n_uset_h set, const i18n_uchar *str, int32_ /** * @brief Returns the length of the initial substring of the input string which - * consists only of characters and strings that are contained in this set - * (#I18N_USET_SPAN_CONTAINED, #I18N_USET_SPAN_SIMPLE), - * or only of characters and strings that are not contained - * in this set (#I18N_USET_SPAN_NOT_CONTAINED). + * consists only of characters and strings that are contained in this set + * (#I18N_USET_SPAN_CONTAINED, #I18N_USET_SPAN_SIMPLE), + * or only of characters and strings that are not contained + * in this set (#I18N_USET_SPAN_NOT_CONTAINED). * @details See #i18n_uset_span_condition_e for details. - * Similar to the strspn() C library function. - * Malformed byte sequences are treated according to contains(0xfffd). - * This function works faster with a frozen set and with a non-negative string length argument. + * Similar to the strspn() C library function. + * Malformed byte sequences are treated according to contains(0xfffd). + * This function works faster with a frozen set and with a non-negative string length argument. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] set the set. Must not be @c NULL. - * @param[in] str start of the string (UTF-8) - * @param[in] length length of the string; >= 0, can be @c -1 for NULL-terminated - * @param[in] span_condition specifies the containment condition + * @param[in] set the set. Must not be @c NULL. + * @param[in] str start of the string (UTF-8) + * @param[in] length length of the string; >= 0, can be @c -1 for NULL-terminated + * @param[in] span_condition specifies the containment condition * * @return the length of the initial substring according to the @a span_condition; - * @c 0 if the start of the string does not fit the @a span_condition + * @c 0 if the start of the string does not fit the @a span_condition * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -968,24 +968,24 @@ int32_t i18n_uset_span_utf8(const i18n_uset_h set, const char *str, int32_t leng /** * @brief Returns the start of the trailing substring of the input string which - * consists only of characters and strings that are contained in this set - * (#I18N_USET_SPAN_CONTAINED, #I18N_USET_SPAN_SIMPLE), - * or only of characters and strings that are not contained - * in this set (#I18N_USET_SPAN_NOT_CONTAINED). + * consists only of characters and strings that are contained in this set + * (#I18N_USET_SPAN_CONTAINED, #I18N_USET_SPAN_SIMPLE), + * or only of characters and strings that are not contained + * in this set (#I18N_USET_SPAN_NOT_CONTAINED). * @details See #i18n_uset_span_condition_e for details. - * Malformed byte sequences are treated according to contains(0xfffd). - * This function works faster with a frozen set and with a non-negative string length argument. + * Malformed byte sequences are treated according to contains(0xfffd). + * This function works faster with a frozen set and with a non-negative string length argument. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] set the set. Must not be @c NULL. - * @param[in] str start of the string (UTF-8) - * @param[in] length length of the string; >= 0, can be @c -1 for NULL-terminated - * @param[in] span_condition specifies the containment condition + * @param[in] set the set. Must not be @c NULL. + * @param[in] str start of the string (UTF-8) + * @param[in] length length of the string; >= 0, can be @c -1 for NULL-terminated + * @param[in] span_condition specifies the containment condition * * @return the start of the trailing substring according to the @a span_condition; - * the string length if the end of the string does not fit the @a span_condition + * the string length if the end of the string does not fit the @a span_condition * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -999,7 +999,7 @@ int32_t i18n_uset_span_back_utf8(const i18n_uset_h set, const char *str, int32_t * of set2, and vice versa. It answers the question, 'Is set1 equal to set2?' * * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * * @since_tizen 2.3.1 * @param[in] set1 Set to be checked for containment. Must not be @c NULL. @@ -1018,52 +1018,52 @@ i18n_ubool i18n_uset_equals(const i18n_uset_h set1, const i18n_uset_h set2); /** * @brief Serializes this @a set into an array of 16-bit integers. * @details Serialization (currently) only records the characters in the set; - * multicharacter strings are ignored. - * - * The array has following format (each line is one 16-bit integer): - * - * length = (n+2*m) | (m!=0?0x8000:0) - * bmpLength = n; - * present if m!=0 - * bmp[0] - * bmp[1] - * ... - * bmp[n-1] - * supp-high[0] - * supp-low[0] - * supp-high[1] - * supp-low[1] - * ... - * supp-high[m-1] - * supp-low[m-1] - * - * The array starts with a header. After the header are n bmp - * code points, then m supplementary code points. Either n or m - * or both may be zero. n+2*m is always <= 0x7FFF. - * - * If there are no supplementary characters (if m==0) then the - * header is one 16-bit integer, 'length', with value n. - * - * If there are supplementary characters (if m!=0) then the header - * is two 16-bit integers. The first, 'length', has value - * (n+2*m)|0x8000. The second, 'bmpLength', has value n. - * - * After the header the code points are stored in ascending order. - * Supplementary code points are stored as most significant 16 - * bits followed by least significant 16 bits. + * multicharacter strings are ignored. + * + * The array has following format (each line is one 16-bit integer): + * + * length = (n+2*m) | (m!=0?0x8000:0) + * bmpLength = n; + * present if m!=0 + * bmp[0] + * bmp[1] + * ... + * bmp[n-1] + * supp-high[0] + * supp-low[0] + * supp-high[1] + * supp-low[1] + * ... + * supp-high[m-1] + * supp-low[m-1] + * + * The array starts with a header. After the header are n bmp + * code points, then m supplementary code points. Either n or m + * or both may be zero. n+2*m is always <= 0x7FFF. + * + * If there are no supplementary characters (if m==0) then the + * header is one 16-bit integer, 'length', with value n. + * + * If there are supplementary characters (if m!=0) then the header + * is two 16-bit integers. The first, 'length', has value + * (n+2*m)|0x8000. The second, 'bmpLength', has value n. + * + * After the header the code points are stored in ascending order. + * Supplementary code points are stored as most significant 16 + * bits followed by least significant 16 bits. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. + * Error codes are described in Exceptions section and in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] set the set. Must not be @c NULL. - * @param[out] dest pointer to buffer of @a dest_capacity 16-bit integers - * May be NULL only if @a dest_capacity is zero. - * @param[in] dest_capacity size of @a dest, or zero - * Must not be negative. + * @param[in] set the set. Must not be @c NULL. + * @param[out] dest pointer to buffer of @a dest_capacity 16-bit integers + * May be NULL only if @a dest_capacity is zero. + * @param[in] dest_capacity size of @a dest, or zero + * Must not be negative. * * @return the total length of the serialized format, including - * the header, that is, n+2*m+(m != 0 ? 2 : 1), - * or @c 0 on error other than #I18N_ERROR_BUFFER_OVERFLOW. + * the header, that is, n+2*m+(m != 0 ? 2 : 1), + * or @c 0 on error other than #I18N_ERROR_BUFFER_OVERFLOW. * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -1075,12 +1075,12 @@ int32_t i18n_uset_serialize(const i18n_uset_h set, uint16_t *dest, int32_t dest_ /** * @brief Given a serialized array, fill in the given serialized set object. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] src pointer to start of array. Must not be @c NULL. - * @param[in] src_length length of @a src array, >= 0. - * @param[out] fill_set the serialized set to be filled + * @param[in] src pointer to start of array. Must not be @c NULL. + * @param[in] src_length length of @a src array, >= 0. + * @param[out] fill_set the serialized set to be filled * * @return @c true if the given array is valid, otherwise @c false * @@ -1089,14 +1089,14 @@ int32_t i18n_uset_serialize(const i18n_uset_h set, uint16_t *dest, int32_t dest_ * * @see #i18n_userialized_set_s */ -i18n_ubool i18n_uset_get_serialized_set(const uint16_t *src, int32_t src_length, i18n_userialized_set_s* fill_set); +i18n_ubool i18n_uset_get_serialized_set(const uint16_t *src, int32_t src_length, i18n_userialized_set_s *fill_set); /** * @brief Sets the #i18n_userialized_set_s to contain the given @a character (and nothing else). * @since_tizen 2.3.1 * - * @param[in] character the code point to set - * @param[out] fill_set the serialized set to be filled + * @param[in] character the code point to set + * @param[out] fill_set the serialized set to be filled * * @return Error code. * @retval #I18N_ERROR_NONE Successful @@ -1104,16 +1104,16 @@ i18n_ubool i18n_uset_get_serialized_set(const uint16_t *src, int32_t src_length, * * @see #i18n_userialized_set_s */ -int i18n_uset_set_serialized_to_one(i18n_uchar32 character, i18n_userialized_set_s* fill_set); +int i18n_uset_set_serialized_to_one(i18n_uchar32 character, i18n_userialized_set_s *fill_set); /** * @brief Returns @c true if the given #i18n_userialized_set_s contains the given @a character. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] set the serialized set. Must not be @c NULL. - * @param[in] character the code point to check for within the @a set + * @param[in] set the serialized set. Must not be @c NULL. + * @param[in] character the code point to check for within the @a set * * @return @c true if @a set contains @a character * @@ -1121,7 +1121,7 @@ int i18n_uset_set_serialized_to_one(i18n_uchar32 character, i18n_userialized_set * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see #i18n_userialized_set_s */ -i18n_ubool i18n_uset_serialized_contains(const i18n_userialized_set_s* set, i18n_uchar32 character); +i18n_ubool i18n_uset_serialized_contains(const i18n_userialized_set_s *set, i18n_uchar32 character); /** * @brief Returns the number of disjoint ranges of characters contained in @@ -1129,7 +1129,7 @@ i18n_ubool i18n_uset_serialized_contains(const i18n_userialized_set_s* set, i18n * @details Ignores any strings contained in the set. * * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * * @since_tizen 2.3.1 * @param[in] set The serialized set. Must not be @c NULL. @@ -1139,13 +1139,13 @@ i18n_ubool i18n_uset_serialized_contains(const i18n_userialized_set_s* set, i18n * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see #i18n_userialized_set_s */ -int32_t i18n_uset_get_serialized_range_count(const i18n_userialized_set_s* set); +int32_t i18n_uset_get_serialized_range_count(const i18n_userialized_set_s *set); /** * @brief Returns a range of characters contained in the given serialized set. * * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * * @since_tizen 2.3.1 * @param[in] set The serialized set. Must not be @c NULL. @@ -1161,7 +1161,7 @@ int32_t i18n_uset_get_serialized_range_count(const i18n_userialized_set_s* set); * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see #i18n_userialized_set_s */ -i18n_ubool i18n_uset_get_serialized_range(const i18n_userialized_set_s* set, int32_t range_index, i18n_uchar32 *p_start, i18n_uchar32 *p_end); +i18n_ubool i18n_uset_get_serialized_range(const i18n_userialized_set_s *set, int32_t range_index, i18n_uchar32 *p_start, i18n_uchar32 *p_end); /** * @} diff --git a/src/include/mobile/utils_i18n_ustring.h b/src/include/mobile/utils_i18n_ustring.h index 71cbf4e..e6c0d64 100644 --- a/src/include/mobile/utils_i18n_ustring.h +++ b/src/include/mobile/utils_i18n_ustring.h @@ -1,20 +1,20 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * Copyright (C) 1998-2012, International Business Machines - * Corporation and others. All Rights Reserved. + * Corporation and others. All Rights Reserved. */ #ifndef __UTILS_I18N_USTRING_H__ @@ -38,7 +38,7 @@ extern "C" { * @brief The Ustring module provides general unicode string handling information. * * @section CAPI_BASE_UTILS_I18N_USTRING_MODULE_HEADER Required Header - * \#include + * \#include * * @section CAPI_BASE_UTILS_I18N_USTRING_MODULE_OVERVIEW Overview * @details The Ustring module provides general unicode string handling information. @@ -46,23 +46,23 @@ extern "C" { * @section CAPI_BASE_UTILS_I18N_USTIRING_MODULE_SAMPLE_CODE_1 Sample Code 1 * @brief It converts a byte string to a unicode string and then to uppercase letters. * @code - char str_1[64] = {0,}; - i18n_uchar uchar_str_1[64] = {0,}; - i18n_uchar uchar_str_2[64] = {0,}; - int uchar_len = 0; - i18n_uerror_code_e err_code = I18N_ERROR_NONE; + char str_1[64] = {0,}; + i18n_uchar uchar_str_1[64] = {0,}; + i18n_uchar uchar_str_2[64] = {0,}; + int uchar_len = 0; + i18n_uerror_code_e err_code = I18N_ERROR_NONE; - strcpy(str_1, "tizen"); - dlog_print(DLOG_INFO, LOG_TAG, "str_1 is %s\n", str_1); // str_1 is tizen + strcpy(str_1, "tizen"); + dlog_print(DLOG_INFO, LOG_TAG, "str_1 is %s\n", str_1); // str_1 is tizen - // converts a byte string to a unicode string - i18n_ustring_copy_ua_n(uchar_str_1, str_1, strlen(str_1)); + // converts a byte string to a unicode string + i18n_ustring_copy_ua_n(uchar_str_1, str_1, strlen(str_1)); - // converts to uppercase letters - i18n_ustring_to_upper(uchar_str_2, 64, uchar_str_1, i18n_ustring_get_length( uchar_str_1 ), "en_US", &err_code); + // converts to uppercase letters + i18n_ustring_to_upper(uchar_str_2, 64, uchar_str_1, i18n_ustring_get_length( uchar_str_1 ), "en_US", &err_code); - i18n_ustring_copy_au(str_1, uchar_str_2); - dlog_print(DLOG_INFO, LOG_TAG, "str_1 is %s\n", str_1); // str_1 is TIZEN + i18n_ustring_copy_au(str_1, uchar_str_2); + dlog_print(DLOG_INFO, LOG_TAG, "str_1 is %s\n", str_1); // str_1 is TIZEN * @endcode */ @@ -74,10 +74,10 @@ extern "C" { /** * @brief Determines the length of an array of #i18n_uchar. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[in] s The array of #i18n_uchar characters, @c NULL (U+0000) terminated. + * @param[in] s The array of #i18n_uchar characters, @c NULL (U+0000) terminated. * * @return The number of #i18n_uchar characters in @c chars, minus the terminator * @exception #I18N_ERROR_NONE Success @@ -88,14 +88,14 @@ int32_t i18n_ustring_get_length(const i18n_uchar *s); /** * @brief Counts Unicode code points in the length #i18n_uchar code units of the string. * @details A code point may occupy either one or two #i18n_uchar code units. - * Counting code points involves reading all code units. + * Counting code points involves reading all code units. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[in] s The input string. - * @param[in] length The number of #i18n_uchar code units to be checked, or @c -1 to count - * all code points before the first NULL (U+0000). + * @param[in] s The input string. + * @param[in] length The number of #i18n_uchar code units to be checked, or @c -1 to count + * all code points before the first NULL (U+0000). * * @return The number of code points in the specified code units. * @exception #I18N_ERROR_NONE Success @@ -106,17 +106,17 @@ int32_t i18n_ustring_count_char32(const i18n_uchar *s, int32_t length); /** * @brief Checks if the string contains more Unicode code points than a certain number. * @details This is more efficient than counting all code points in the entire string and comparing that number with a threshold. - * This function may not need to scan the string at all if the length is known (not @c -1 for NULL-termination) and falls within a certain range, - * and never needs to count more than 'number+1' code points. - * Logically equivalent to ( i18n_ustring_count_char32 (s, length, &number_of_code_points); number_of_code_points > number ). - * A Unicode code point may occupy either one or two #i18n_uchar code units. + * This function may not need to scan the string at all if the length is known (not @c -1 for NULL-termination) and falls within a certain range, + * and never needs to count more than 'number+1' code points. + * Logically equivalent to ( i18n_ustring_count_char32 (s, length, &number_of_code_points); number_of_code_points > number ). + * A Unicode code point may occupy either one or two #i18n_uchar code units. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[in] s The input string. - * @param[in] length The length of the string, or @c -1 if it is NULL-terminated. - * @param[in] number The number of code points in the string is compared against the @a number parameter. + * @param[in] s The input string. + * @param[in] length The length of the string, or @c -1 if it is NULL-terminated. + * @param[in] number The number of code points in the string is compared against the @a number parameter. * * @return Boolean value for whether the string contains more Unicode code points than @a number. Same as ( i18n_ustring_count_char32 (s, length, &number_of_code_points); number_of_code_points > number). * @exception #I18N_ERROR_NONE Success @@ -127,53 +127,53 @@ i18n_ubool i18n_ustring_has_more_char32_than(const i18n_uchar *s, int32_t length /** * @brief Concatenates two ustrings. * @details Appends a copy of @a src, including the NULL terminator, to @a dest. - * The initial copied character from @a src overwrites the NULL terminator in @a dest. + * The initial copied character from @a src overwrites the NULL terminator in @a dest. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[out] dest The destination string. - * @param[in] src The source string. + * @param[out] dest The destination string. + * @param[in] src The source string. * * @return A pointer to @a dest. * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_cat(i18n_uchar *dest, const i18n_uchar *src); +i18n_uchar *i18n_ustring_cat(i18n_uchar *dest, const i18n_uchar *src); /** * @brief Concatenate two ustrings. * @details Appends a copy of @a src, including the NULL terminator, to @a dest. - * The initial copied character from @a src overwrites the NULL terminator in @a dest. + * The initial copied character from @a src overwrites the NULL terminator in @a dest. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[out] dest The destination string. - * @param[in] src The source string. - * @param[in] n The maximum number of characters to append; no-op if <=0. + * @param[out] dest The destination string. + * @param[in] src The source string. + * @param[in] n The maximum number of characters to append; no-op if <=0. * * @return A pointer to @a dest. * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_cat_n(i18n_uchar *dest, const i18n_uchar *src, int32_t n); +i18n_uchar *i18n_ustring_cat_n(i18n_uchar *dest, const i18n_uchar *src, int32_t n); /** * @brief Finds the first occurrence of a substring in a string. * @details The substring is found at code point boundaries. That means that if the substring begins with a trail surrogate - * or ends with a lead surrogate, then it is found only if these surrogates stand alone in the text. - * Otherwise, the substring edge units would be matched against halves of surrogate pairs. + * or ends with a lead surrogate, then it is found only if these surrogates stand alone in the text. + * Otherwise, the substring edge units would be matched against halves of surrogate pairs. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[in] s The string to search (NULL-terminated). - * @param[in] sub_string The substring to find (NULL-terminated). + * @param[in] s The string to search (NULL-terminated). + * @param[in] sub_string The substring to find (NULL-terminated). * * @return A pointer to the first occurrence of @a sub_string in @a s, - * or @a s itself if the @a sub_string is empty, - * or @c NULL if @a sub_string is not in @a s. + * or @a s itself if the @a sub_string is empty, + * or @c NULL if @a sub_string is not in @a s. * * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -182,25 +182,25 @@ i18n_uchar* i18n_ustring_cat_n(i18n_uchar *dest, const i18n_uchar *src, int32_t * @see i18n_ustring_find_first() * @see i18n_ustring_find_last() */ -i18n_uchar* i18n_ustring_string(const i18n_uchar *s, const i18n_uchar *sub_string); +i18n_uchar *i18n_ustring_string(const i18n_uchar *s, const i18n_uchar *sub_string); /** * @brief Finds the first occurrence of a substring in a string. * @details The substring is found at code point boundaries. That means that if the substring begins with a trail surrogate - * or ends with a lead surrogate, then it is found only if these surrogates stand alone in the text. - * Otherwise, the substring edge units would be matched against halves of surrogate pairs. + * or ends with a lead surrogate, then it is found only if these surrogates stand alone in the text. + * Otherwise, the substring edge units would be matched against halves of surrogate pairs. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[in] s The string to search (NULL-terminated). - * @param[in] length The length of @a s (number of #i18n_uchar characters), or @c -1 if it is NULL-terminated. - * @param[in] sub_string The substring to find (NULL-terminated). - * @param[in] sub_length The length of substring (number of #i18n_uchar characters), or @c -1 if it is NULL-terminated. + * @param[in] s The string to search (NULL-terminated). + * @param[in] length The length of @a s (number of #i18n_uchar characters), or @c -1 if it is NULL-terminated. + * @param[in] sub_string The substring to find (NULL-terminated). + * @param[in] sub_length The length of substring (number of #i18n_uchar characters), or @c -1 if it is NULL-terminated. * * @return A pointer to the first occurrence of @a sub_string in @a s, - * or @a s itself if the @a sub_string is empty, - * or @c NULL if @a sub_string is not in @a s. + * or @a s itself if the @a sub_string is empty, + * or @c NULL if @a sub_string is not in @a s. * * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -208,13 +208,13 @@ i18n_uchar* i18n_ustring_string(const i18n_uchar *s, const i18n_uchar *sub_strin * @see i18n_ustring_string() * @see i18n_ustring_find_last() */ -i18n_uchar* i18n_ustring_find_first(const i18n_uchar *s, int32_t length, const i18n_uchar *sub_string, int32_t sub_length); +i18n_uchar *i18n_ustring_find_first(const i18n_uchar *s, int32_t length, const i18n_uchar *sub_string, int32_t sub_length); /** * @brief Finds the first occurrence of a BMP code point in a string. * @details A surrogate code point is found only if its match in the text is not part of a surrogate pair. A NULL character is found at the string terminator. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s The string to search (NULL-terminated). @@ -229,13 +229,13 @@ i18n_uchar* i18n_ustring_find_first(const i18n_uchar *s, int32_t length, const i * @see i18n_ustring_string() * @see i18n_ustring_find_first() */ -i18n_uchar* i18n_ustring_char(const i18n_uchar *s, i18n_uchar c); +i18n_uchar *i18n_ustring_char(const i18n_uchar *s, i18n_uchar c); /** * @brief Finds the first occurrence of a code point in a string. * @details A surrogate code point is found only if its match in the text is not part of a surrogate pair. A NULL character is found at the string terminator. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s The string to search (NULL-terminated). @@ -250,7 +250,7 @@ i18n_uchar* i18n_ustring_char(const i18n_uchar *s, i18n_uchar c); * @see i18n_ustring_string() * @see i18n_ustring_find_first() */ -i18n_uchar* i18n_ustring_char32(const i18n_uchar *s, i18n_uchar32 c); +i18n_uchar *i18n_ustring_char32(const i18n_uchar *s, i18n_uchar32 c); /** * @brief Finds the last occurrence of a substring in a string. @@ -258,7 +258,7 @@ i18n_uchar* i18n_ustring_char32(const i18n_uchar *s, i18n_uchar32 c); * or ends with a lead surrogate, then it is found only if these surrogates stand alone in the text. * Otherwise, the substring edge units would be matched against halves of surrogate pairs. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s The string to search (NULL-terminated). @@ -273,7 +273,7 @@ i18n_uchar* i18n_ustring_char32(const i18n_uchar *s, i18n_uchar32 c); * @see i18n_ustring_find_first() * @see i18n_ustring_find_last() */ -i18n_uchar* i18n_ustring_r_string(const i18n_uchar *s, const i18n_uchar *sub_string); +i18n_uchar *i18n_ustring_r_string(const i18n_uchar *s, const i18n_uchar *sub_string); /** * @brief Finds the last occurrence of a substring in a string. @@ -281,7 +281,7 @@ i18n_uchar* i18n_ustring_r_string(const i18n_uchar *s, const i18n_uchar *sub_str * or ends with a lead surrogate, then it is found only if these surrogates stand alone in the text. * Otherwise, the substring edge units would be matched against halves of surrogate pairs. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s The string to search. @@ -297,13 +297,13 @@ i18n_uchar* i18n_ustring_r_string(const i18n_uchar *s, const i18n_uchar *sub_str * @see i18n_ustring_string() * @see i18n_ustring_find_first() */ -i18n_uchar* i18n_ustring_find_last(const i18n_uchar *s, int32_t length, const i18n_uchar *sub_string, int32_t sub_length); +i18n_uchar *i18n_ustring_find_last(const i18n_uchar *s, int32_t length, const i18n_uchar *sub_string, int32_t sub_length); /** * @brief Finds the last occurrence of a BMP code point in a string. * @details A surrogate code point is found only if its match in the text is not part of a surrogate pair. A NULL character is found at the string terminator. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s The string to search (NULL-terminated). @@ -318,13 +318,13 @@ i18n_uchar* i18n_ustring_find_last(const i18n_uchar *s, int32_t length, const i1 * @see i18n_ustring_string() * @see i18n_ustring_find_first() */ -i18n_uchar* i18n_ustring_r_char(const i18n_uchar *s, i18n_uchar c); +i18n_uchar *i18n_ustring_r_char(const i18n_uchar *s, i18n_uchar c); /** * @brief Finds the last occurrence of a code point in a string. * @details A surrogate code point is found only if its match in the text is not part of a surrogate pair. A NULL character is found at the string terminator. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s The string to search (NULL-terminated). @@ -339,13 +339,13 @@ i18n_uchar* i18n_ustring_r_char(const i18n_uchar *s, i18n_uchar c); * @see i18n_ustring_string() * @see i18n_ustring_find_first() */ -i18n_uchar* i18n_ustring_r_char32(const i18n_uchar *s, i18n_uchar32 c); +i18n_uchar *i18n_ustring_r_char32(const i18n_uchar *s, i18n_uchar32 c); /** * @brief Locates the first occurrence in the string of any of the characters in the string matchSet. * @details Works just like C's strpbrk but with Unicode. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] string The string in which to search, NULL-terminated. @@ -353,16 +353,16 @@ i18n_uchar* i18n_ustring_r_char32(const i18n_uchar *s, i18n_uchar32 c); * * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter - * @return A pointer to the character in @a string that matches one of the + * @return A pointer to the character in @a string that matches one of the * characters in @a match_set, or NULL if no such character is found. */ -i18n_uchar* i18n_ustring_pbrk(const i18n_uchar *string, const i18n_uchar *match_set); +i18n_uchar *i18n_ustring_pbrk(const i18n_uchar *string, const i18n_uchar *match_set); /** * @brief Returns the number of consecutive characters in string, beginning with the first, that do not occur somewhere in match_set. * @details Works just like C's strcspn but with Unicode. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] string The string in which to search, NULL-terminated. @@ -379,7 +379,7 @@ int32_t i18n_ustring_cspn(const i18n_uchar *string, const i18n_uchar *match_set) * @brief Returns the number of consecutive characters in string, beginning with the first, that occur somewhere in match_set. * @details Works just like C's strspn but with Unicode. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] string The string in which to search, NULL-terminated. @@ -396,7 +396,7 @@ int32_t i18n_ustring_spn(const i18n_uchar *string, const i18n_uchar *match_set); * @brief The string tokenizer API allows an application to break a string into tokens. * @details Works just like C's strspn but with Unicode. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] src String containing token(s). This string will be modified. After the first call to #i18n_ustring_tokenizer_r(), this argument must be NULL to get to the next token. @@ -408,12 +408,12 @@ int32_t i18n_ustring_spn(const i18n_uchar *string, const i18n_uchar *match_set); * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_tokenizer_r(i18n_uchar *src, const i18n_uchar *delim, i18n_uchar **save_state); +i18n_uchar *i18n_ustring_tokenizer_r(i18n_uchar *src, const i18n_uchar *delim, i18n_uchar **save_state); /** * @brief Compares two Unicode strings for bitwise equality (code unit order). * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s1 A string to compare. @@ -430,7 +430,7 @@ int32_t i18n_ustring_compare(const i18n_uchar *s1, const i18n_uchar *s2); * @brief Compare two Unicode strings in code point order. * @details See #i18n_ustring_compare() for details. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s1 A string to compare. @@ -451,7 +451,7 @@ int32_t i18n_ustring_compare_code_point_order(const i18n_uchar *s1, const i18n_u * This functions works with strings of different explicitly specified lengths unlike the ANSI C-like #i18n_ustring_compare() and #i18n_ustring_mem_compare() etc. * NULL-terminated strings are possible with length arguments of -1. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s1 First source string. @@ -494,7 +494,7 @@ int32_t i18n_ustring_case_compare_with_length(const i18n_uchar *s1, int32_t leng * @brief Compare two ustrings for bitwise equality. * @details Compares at most n characters. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s1 A string to compare (can be NULL/invalid if n<=0). @@ -512,7 +512,7 @@ int32_t i18n_ustring_compare_n(const i18n_uchar *s1, const i18n_uchar *s2, int32 * @brief Compare two Unicode strings in code point order. * @details This is different in UTF-16 from #i18n_ustring_compare_n() if supplementary characters are present. For details, see #i18n_ustring_compare_binary_order(). * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s1 A string to compare. @@ -529,15 +529,15 @@ int32_t i18n_ustring_compare_n_code_point_order(const i18n_uchar *s1, const i18n /** * @brief Compare two strings case-insensitively using full case folding. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s1 A string to compare. * @param[in] s2 A string to compare. * @param[in] options bit set of options:\n - * - #I18N_USTRING_U_FOLD_CASE_DEFAULT or 0 is used for default options: Comparison in code unit order with default case folding. - * - #I18N_USTRING_U_COMPARE_CODE_POINT_ORDER Set to choose code point order instead of code unit order (see u_strCompare for details). - * - #I18N_USTRING_U_FOLD_CASE_EXCLUDE_SPECIAL_I + * - #I18N_USTRING_U_FOLD_CASE_DEFAULT or 0 is used for default options: Comparison in code unit order with default case folding. + * - #I18N_USTRING_U_COMPARE_CODE_POINT_ORDER Set to choose code point order instead of code unit order (see u_strCompare for details). + * - #I18N_USTRING_U_FOLD_CASE_EXCLUDE_SPECIAL_I * @return A negative, zero, or positive integer indicating the comparison result. * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -547,16 +547,16 @@ int32_t i18n_ustring_case_compare(const i18n_uchar *s1, const i18n_uchar *s2, ui /** * @brief Compare two strings case-insensitively using full case folding. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s1 A string to compare. * @param[in] s2 A string to compare. * @param[in] n The maximum number of characters each string to case-fold and then compare. * @param[in] options A bit set of options:\n - * - #I18N_USTRING_U_FOLD_CASE_DEFAULT or 0 is used for default options: Comparison in code unit order with default case folding. - * - #I18N_USTRING_U_COMPARE_CODE_POINT_ORDER Set to choose code point order instead of code unit order (see u_strCompare for details). - * - #I18N_USTRING_U_FOLD_CASE_EXCLUDE_SPECIAL_I + * - #I18N_USTRING_U_FOLD_CASE_DEFAULT or 0 is used for default options: Comparison in code unit order with default case folding. + * - #I18N_USTRING_U_COMPARE_CODE_POINT_ORDER Set to choose code point order instead of code unit order (see u_strCompare for details). + * - #I18N_USTRING_U_FOLD_CASE_EXCLUDE_SPECIAL_I * @return A negative, zero, or positive integer indicating the comparison result. * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -566,16 +566,16 @@ int32_t i18n_ustring_case_compare_n(const i18n_uchar *s1, const i18n_uchar *s2, /** * @brief Compare two strings case-insensitively using full case folding. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s1 A string to compare. * @param[in] s2 A string to compare. * @param[in] length The number of characters in each string to case-fold and then compare. * @param[in] options A bit set of options:\n - * - #I18N_USTRING_U_FOLD_CASE_DEFAULT or 0 is used for default options: Comparison in code unit order with default case folding. - * - #I18N_USTRING_U_COMPARE_CODE_POINT_ORDER Set to choose code point order instead of code unit order (see u_strCompare for details). - * - #I18N_USTRING_U_FOLD_CASE_EXCLUDE_SPECIAL_I + * - #I18N_USTRING_U_FOLD_CASE_DEFAULT or 0 is used for default options: Comparison in code unit order with default case folding. + * - #I18N_USTRING_U_COMPARE_CODE_POINT_ORDER Set to choose code point order instead of code unit order (see u_strCompare for details). + * - #I18N_USTRING_U_FOLD_CASE_EXCLUDE_SPECIAL_I * @return A negative, zero, or positive integer indicating the comparison result. * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -585,24 +585,24 @@ int32_t i18n_ustring_mem_case_compare(const i18n_uchar *s1, const i18n_uchar *s2 /** * @brief Copies a ustring. Adds a NULL terminator. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[out] dest The destination string - * @param[in] src The source string + * @param[out] dest The destination string + * @param[in] src The source string * * @return A pointer to @a dest. * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_copy(i18n_uchar *dest, const i18n_uchar *src); +i18n_uchar *i18n_ustring_copy(i18n_uchar *dest, const i18n_uchar *src); /** * @brief Copies a ustring. * @details Copies at most @a n characters. The result will be NULL terminated * if the length of @a src is less than @a n. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest The destination string @@ -613,13 +613,13 @@ i18n_uchar* i18n_ustring_copy(i18n_uchar *dest, const i18n_uchar *src); * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_copy_n(i18n_uchar *dest, const i18n_uchar *src, int32_t n); +i18n_uchar *i18n_ustring_copy_n(i18n_uchar *dest, const i18n_uchar *src, int32_t n); /** * @brief Copies a byte string encoded in the default codepage to a ustring. * @details Adds a NULL terminator. Performs a host byte to #i18n_uchar conversion. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest The destination string @@ -629,15 +629,15 @@ i18n_uchar* i18n_ustring_copy_n(i18n_uchar *dest, const i18n_uchar *src, int32_t * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_copy_ua(i18n_uchar *dest, const char *src); +i18n_uchar *i18n_ustring_copy_ua(i18n_uchar *dest, const char *src); /** * @brief Copies a byte string encoded in the default codepage to a ustring. - * @details Copies at most @a n characters. The result will be NULL terminated + * @details Copies at most @a n characters. The result will be NULL terminated * if the length of @a src is less than @a n. * Performs a host byte to #i18n_uchar conversion. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest The destination string @@ -648,13 +648,13 @@ i18n_uchar* i18n_ustring_copy_ua(i18n_uchar *dest, const char *src); * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_copy_ua_n(i18n_uchar *dest, const char *src, int32_t n); +i18n_uchar *i18n_ustring_copy_ua_n(i18n_uchar *dest, const char *src, int32_t n); /** * @brief Copies a ustring to a byte string encoded in the default codepage. * @details Adds a NULL terminator. Performs an #i18n_uchar to host byte conversion. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest The destination string @@ -664,15 +664,15 @@ i18n_uchar* i18n_ustring_copy_ua_n(i18n_uchar *dest, const char *src, int32_t n) * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -char* i18n_ustring_copy_au(char *dest, const i18n_uchar *src); +char *i18n_ustring_copy_au(char *dest, const i18n_uchar *src); /** * @brief Copies a ustring to a byte string encoded in the default codepage. - * @details Copies at most @a n characters. The result will be NULL terminated + * @details Copies at most @a n characters. The result will be NULL terminated * if the length of @a src is less than @a n. * Performs an #i18n_uchar to host byte conversion. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest The destination string @@ -683,12 +683,12 @@ char* i18n_ustring_copy_au(char *dest, const i18n_uchar *src); * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -char* i18n_ustring_copy_au_n(char *dest, const i18n_uchar *src, int32_t n); +char *i18n_ustring_copy_au_n(char *dest, const i18n_uchar *src, int32_t n); /** * @brief Synonym for memcpy(), but with #i18n_uchar characters only. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest The destination string @@ -699,12 +699,12 @@ char* i18n_ustring_copy_au_n(char *dest, const i18n_uchar *src, int32_t n); * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_mem_copy(i18n_uchar *dest, const i18n_uchar *src, int32_t count); +i18n_uchar *i18n_ustring_mem_copy(i18n_uchar *dest, const i18n_uchar *src, int32_t count); /** * @brief Synonym for memmove(), but with #i18n_uchar characters only. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest The destination string @@ -715,12 +715,12 @@ i18n_uchar* i18n_ustring_mem_copy(i18n_uchar *dest, const i18n_uchar *src, int32 * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_mem_move(i18n_uchar *dest, const i18n_uchar *src, int32_t count); +i18n_uchar *i18n_ustring_mem_move(i18n_uchar *dest, const i18n_uchar *src, int32_t count); /** * @brief Initialize count characters of dest to c. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest The destination string @@ -731,12 +731,12 @@ i18n_uchar* i18n_ustring_mem_move(i18n_uchar *dest, const i18n_uchar *src, int32 * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_mem_set(i18n_uchar *dest, const i18n_uchar c, int32_t count); +i18n_uchar *i18n_ustring_mem_set(i18n_uchar *dest, const i18n_uchar c, int32_t count); /** * @brief Compare the first count #i18n_uchar characters of each buffer. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] buf1 The first string to compare. @@ -754,7 +754,7 @@ int32_t i18n_ustring_mem_compare(const i18n_uchar *buf1, const i18n_uchar *buf2, * @brief Compare two Unicode strings in code point order. * @details This is different in UTF-16 from #i18n_ustring_mem_compare() if supplementary characters are present. For details, see #i18n_ustring_compare_binary_order(). * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s1 A string to compare. @@ -772,7 +772,7 @@ int32_t i18n_ustring_mem_compare_code_point_order(const i18n_uchar *s1, const i1 * @brief Finds the first occurrence of a BMP code point in a string. * @details A surrogate code point is found only if its match in the text is not part of a surrogate pair. A NULL character is found at the string terminator. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s The string to search (contains count #i18n_uchar characters). @@ -786,13 +786,13 @@ int32_t i18n_ustring_mem_compare_code_point_order(const i18n_uchar *s1, const i1 * @see i18n_ustring_mem_char32() * @see i18n_ustring_find_first() */ -i18n_uchar* i18n_ustring_mem_char(const i18n_uchar *s, i18n_uchar c, int32_t count); +i18n_uchar *i18n_ustring_mem_char(const i18n_uchar *s, i18n_uchar c, int32_t count); /** * @brief Finds the first occurrence of a code point in a string. * @details A surrogate code point is found only if its match in the text is not part of a surrogate pair. A NULL character is found at the string terminator. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s The string to search (contains count #i18n_uchar characters). @@ -803,13 +803,13 @@ i18n_uchar* i18n_ustring_mem_char(const i18n_uchar *s, i18n_uchar c, int32_t cou * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_mem_char32(const i18n_uchar *s, i18n_uchar32 c, int32_t count); +i18n_uchar *i18n_ustring_mem_char32(const i18n_uchar *s, i18n_uchar32 c, int32_t count); /** * @brief Finds the last occurrence of a BMP code point in a string. * @details A surrogate code point is found only if its match in the text is not part of a surrogate pair. A NULL character is found at the string terminator. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s The string to search (contains count #i18n_uchar characters). @@ -823,13 +823,13 @@ i18n_uchar* i18n_ustring_mem_char32(const i18n_uchar *s, i18n_uchar32 c, int32_t * @see #i18n_ustring_mem_r_char32 * @see #i18n_ustring_find_last */ -i18n_uchar* i18n_ustring_mem_r_char(const i18n_uchar *s, i18n_uchar c, int32_t count); +i18n_uchar *i18n_ustring_mem_r_char(const i18n_uchar *s, i18n_uchar c, int32_t count); /** * @brief Finds the last occurrence of a code point in a string. * @details A surrogate code point is found only if its match in the text is not part of a surrogate pair. A NULL character is found at the string terminator. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s The string to search (contains count #i18n_uchar characters). @@ -843,7 +843,7 @@ i18n_uchar* i18n_ustring_mem_r_char(const i18n_uchar *s, i18n_uchar c, int32_t c * @see #i18n_ustring_mem_r_char * @see #i18n_ustring_find_last */ -i18n_uchar* i18n_ustring_mem_r_char32(const i18n_uchar *s, i18n_uchar32 c, int32_t count); +i18n_uchar *i18n_ustring_mem_r_char32(const i18n_uchar *s, i18n_uchar32 c, int32_t count); /** * @brief Unescape a string of characters and write the resulting Unicode characters to the destination buffer. @@ -854,7 +854,7 @@ i18n_uchar* i18n_ustring_mem_r_char32(const i18n_uchar *s, i18n_uchar32 c, int32 * Anything else following a backslash is generically escaped. For example, "[a\-z]" returns "[a-z]".\n * If an escape sequence is ill-formed, this method returns an empty string. An example of an ill-formed sequence is "\\u" followed by fewer than 4 hex digits. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] src a zero-terminated string of invariant characters @@ -875,7 +875,7 @@ int32_t i18n_ustring_unescape(const char *src, i18n_uchar *dest, int32_t dest_ca * If offset is out of range, or if the escape sequence is ill-formed, (i18n_uchar32)0xFFFFFFFF is returned. * See documentation of #i18n_ustring_unescape() for a list of recognized sequences. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] char_at callback function that returns a #i18n_uchar of the source text given an offset and a context pointer. @@ -964,7 +964,7 @@ int32_t i18n_ustring_to_lower(i18n_uchar *dest, int32_t dest_capacity, const i18 * If it is @c 0, then @a dest may be @c NULL and the function will only return the length of the result * without writing any of the result string. * @param[in] src The original string - * @param[in] src_len The length of the original string.\n If @c -1, then @a src must be zero-terminated. + * @param[in] src_len The length of the original string.\n If @c -1, then @a src must be zero-terminated. * @param[in] title_iter A break iterator to find the first characters of words * that are to be titlecased\n * If none are provided (NULL), then a standard titlecase @@ -978,7 +978,7 @@ int32_t i18n_ustring_to_lower(i18n_uchar *dest, int32_t dest_capacity, const i18 * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ int32_t i18n_ustring_to_title(i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, i18n_ubreak_iterator_s *title_iter, - const char *locale, i18n_error_code_e *error_code); + const char *locale, i18n_error_code_e *error_code); /** * @brief Titlecases a string. @@ -1006,7 +1006,7 @@ int32_t i18n_ustring_to_title(i18n_uchar *dest, int32_t dest_capacity, const i18 * If it is @c 0, then @a dest may be @c NULL and the function will only return the length of the result * without writing any of the result string. * @param[in] src The original string - * @param[in] src_len The length of the original string.\n If @c -1, then @a src must be zero-terminated. + * @param[in] src_len The length of the original string.\n If @c -1, then @a src must be zero-terminated. * @param[in] title_iter A break iterator to find the first characters of words * that are to be titlecased.\n * If none are provided (@c NULL), then a standard titlecase @@ -1034,7 +1034,7 @@ int32_t i18n_ustring_to_title_new(i18n_uchar *dest, int32_t dest_capacity, const * If it is @c 0, then @a dest may be @c NULL and the function will only return the length of the result * without writing any of the result string. * @param[in] src The original string - * @param[in] src_len The length of the original string.\n If @c -1, then @a src must be zero-terminated. + * @param[in] src_len The length of the original string.\n If @c -1, then @a src must be zero-terminated. * @param[in] options Either #I18N_USTRING_U_FOLD_CASE_DEFAULT or #I18N_USTRING_U_FOLD_CASE_EXCLUDE_SPECIAL_I * @param[out] error_code Must be a valid pointer to an error code value, * which must not indicate a failure before the function call. @@ -1058,14 +1058,14 @@ int32_t i18n_ustring_fold_case(i18n_uchar *dest, int32_t dest_capacity, const i1 * @param[out] dest_len A pointer to receive the number of units written to the destination.\n * If dest_len!=NULL then *dest_len is always set to the number of output units corresponding to the transformation of all the input units, even in case of a buffer overflow. * @param[in] src The original source string. - * @param[in] src_len The length of the original string.\n If @c -1, then @a src must be zero-terminated. + * @param[in] src_len The length of the original string.\n If @c -1, then @a src must be zero-terminated. * @param[out] error_code Must be a valid pointer to an error code value, * which must not indicate a failure before the function call. * @return The pointer to destination buffer. * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -wchar_t* i18n_ustring_to_WCS(wchar_t *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_error_code_e *error_code); +wchar_t *i18n_ustring_to_WCS(wchar_t *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_error_code_e *error_code); /** * @brief Convert a wchar_t string to UTF-16. @@ -1080,14 +1080,14 @@ wchar_t* i18n_ustring_to_WCS(wchar_t *dest, int32_t dest_capacity, int32_t *dest * @param[out] dest_len A pointer to receive the number of units written to the destination.\n * If dest_len!=NULL then *dest_len is always set to the number of output units corresponding to the transformation of all the input units, even in case of a buffer overflow. * @param[in] src The original source string. - * @param[in] src_len The length of the original string.\n If @c -1, then @a src must be zero-terminated. + * @param[in] src_len The length of the original string.\n If @c -1, then @a src must be zero-terminated. * @param[out] error_code Must be a valid pointer to an error code value, * which must not indicate a failure before the function call. * @return The pointer to destination buffer. * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_from_WCS(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const wchar_t *src, int32_t src_len, i18n_error_code_e *error_code); +i18n_uchar *i18n_ustring_from_WCS(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const wchar_t *src, int32_t src_len, i18n_error_code_e *error_code); /** * @brief Converts a UTF-16 string to UTF-8. @@ -1096,7 +1096,7 @@ i18n_uchar* i18n_ustring_from_WCS(i18n_uchar *dest, int32_t dest_capacity, int32 * * @param[out] dest A buffer for the result string.\n * The result will be zero-terminated if the buffer is large enough. - * @param[in] dest_capacity The size of the buffer (number of chars)\n + * @param[in] dest_capacity The size of the buffer (number of chars)\n * If it is @c 0, then @a dest may be @c NULL and the function will only return the length of the * result without writing any of the result string (pre-flighting). * @param[out] dest_len A pointer to receive the number of units written to the destination.\n @@ -1113,7 +1113,7 @@ i18n_uchar* i18n_ustring_from_WCS(i18n_uchar *dest, int32_t dest_capacity, int32 * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ustring_from_UTF8() */ -char* i18n_ustring_to_UTF8(char *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_error_code_e *error_code); +char *i18n_ustring_to_UTF8(char *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_error_code_e *error_code); /** * @brief Converts a UTF-8 string to UTF-16. @@ -1122,7 +1122,7 @@ char* i18n_ustring_to_UTF8(char *dest, int32_t dest_capacity, int32_t *dest_len, * * @param[out] dest A buffer for the result string.\n * The result will be zero-terminated if the buffer is large enough. - * @param[in] dest_capacity The size of the buffer (number of #i18n_uchar characters)\n + * @param[in] dest_capacity The size of the buffer (number of #i18n_uchar characters)\n * If it is @c 0, then @a dest may be @c NULL and the function will only return the length of the * result without writing any of the result string (pre-flighting). * @param[out] dest_len A pointer to receive the number of units written to the destination.\n @@ -1138,7 +1138,7 @@ char* i18n_ustring_to_UTF8(char *dest, int32_t dest_capacity, int32_t *dest_len, * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_from_UTF8(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const char *src, int32_t src_len, i18n_error_code_e *error_code); +i18n_uchar *i18n_ustring_from_UTF8(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const char *src, int32_t src_len, i18n_error_code_e *error_code); /** * @brief Convert a UTF-16 string to UTF-8. @@ -1147,7 +1147,7 @@ i18n_uchar* i18n_ustring_from_UTF8(i18n_uchar *dest, int32_t dest_capacity, int3 * * @param[out] dest A buffer for the result string.\n * The result will be zero-terminated if the buffer is large enough. - * @param[in] dest_capacity The size of the buffer (number of chars)\n + * @param[in] dest_capacity The size of the buffer (number of chars)\n * If it is @c 0, then @a dest may be @c NULL and the function will only return the length of the * result without writing any of the result string (pre-flighting). * @param[out] dest_len A pointer to receive the number of units written to the destination.\n @@ -1169,7 +1169,7 @@ i18n_uchar* i18n_ustring_from_UTF8(i18n_uchar *dest, int32_t dest_capacity, int3 * @see i18n_ustring_to_UTF8() * @see i18n_ustring_from_UTF8_with_sub() */ -char* i18n_ustring_to_UTF8_with_sub(char *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_uchar32 sub_char, int32_t *num_substitutions, i18n_error_code_e *error_code); +char *i18n_ustring_to_UTF8_with_sub(char *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_uchar32 sub_char, int32_t *num_substitutions, i18n_error_code_e *error_code); /** * @brief Convert a UTF-8 string to UTF-16. @@ -1177,7 +1177,7 @@ char* i18n_ustring_to_UTF8_with_sub(char *dest, int32_t dest_capacity, int32_t * * * @param[out] dest A buffer for the result string.\n * The result will be zero-terminated if the buffer is large enough. - * @param[in] dest_capacity The size of the buffer (number of #i18n_uchar characters)\n + * @param[in] dest_capacity The size of the buffer (number of #i18n_uchar characters)\n * If it is @c 0, then @a dest may be @c NULL and the function will only return the length of the * result without writing any of the result string (pre-flighting). * @param[out] dest_len A pointer to receive the number of units written to the destination.\n @@ -1200,8 +1200,8 @@ char* i18n_ustring_to_UTF8_with_sub(char *dest, int32_t dest_capacity, int32_t * * @see i18n_ustring_from_UTF8_lenient() * @see i18n_ustring_to_UTF8_with_sub() */ -i18n_uchar* i18n_ustring_from_UTF8_with_sub(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const char *src, int32_t src_len, i18n_uchar32 sub_char, - int32_t *num_substitutions, i18n_error_code_e *error_code); +i18n_uchar *i18n_ustring_from_UTF8_with_sub(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const char *src, int32_t src_len, i18n_uchar32 sub_char, + int32_t *num_substitutions, i18n_error_code_e *error_code); /** * @brief Convert a UTF-8 string to UTF-16. @@ -1218,7 +1218,7 @@ i18n_uchar* i18n_ustring_from_UTF8_with_sub(i18n_uchar *dest, int32_t dest_capac * * @param[out] dest A buffer for the result string.\n * The result will be zero-terminated if the buffer is large enough. - * @param[in] dest_capacity The size of the buffer (number of #i18n_uchar characters)\n + * @param[in] dest_capacity The size of the buffer (number of #i18n_uchar characters)\n * If it is @c 0, then @a dest may be @c NULL and the function will only return the length of the * result without writing any of the result string (pre-flighting). * Unlike for other I18N functions, if src_len>=0 then it must be dest_capacity>=src_len. @@ -1239,7 +1239,7 @@ i18n_uchar* i18n_ustring_from_UTF8_with_sub(i18n_uchar *dest, int32_t dest_capac * @see i18n_ustring_to_UTF8_with_sub() * @see i18n_ustring_from_UTF8_with_sub() */ -i18n_uchar* i18n_ustring_from_UTF8_lenient(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const char *src, int32_t src_len, i18n_error_code_e *error_code); +i18n_uchar *i18n_ustring_from_UTF8_lenient(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const char *src, int32_t src_len, i18n_error_code_e *error_code); /** * @brief Convert a UTF-16 string to UTF-32. @@ -1248,7 +1248,7 @@ i18n_uchar* i18n_ustring_from_UTF8_lenient(i18n_uchar *dest, int32_t dest_capaci * * @param[out] dest A buffer for the result string.\n * The result will be zero-terminated if the buffer is large enough. - * @param[in] dest_capacity The size of the buffer (number of #i18n_uchar32 characters)\n + * @param[in] dest_capacity The size of the buffer (number of #i18n_uchar32 characters)\n * If it is @c 0, then @a dest may be @c NULL and the function will only return the length of the * result without writing any of the result string (pre-flighting). * @param[out] dest_len A pointer to receive the number of units written to the destination.\n @@ -1265,7 +1265,7 @@ i18n_uchar* i18n_ustring_from_UTF8_lenient(i18n_uchar *dest, int32_t dest_capaci * @see i18n_ustring_to_UTF32_with_sub() * @see i18n_ustring_from_UTF32() */ -i18n_uchar32* i18n_ustring_to_UTF32(i18n_uchar32 *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_error_code_e *error_code); +i18n_uchar32 *i18n_ustring_to_UTF32(i18n_uchar32 *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_error_code_e *error_code); /** * @brief Convert a UTF-32 string to UTF-16. @@ -1274,7 +1274,7 @@ i18n_uchar32* i18n_ustring_to_UTF32(i18n_uchar32 *dest, int32_t dest_capacity, i * * @param[out] dest A buffer for the result string.\n * The result will be zero-terminated if the buffer is large enough. - * @param[in] dest_capacity The size of the buffer (number of #i18n_uchar characters)\n + * @param[in] dest_capacity The size of the buffer (number of #i18n_uchar characters)\n * If it is @c 0, then @a dest may be @c NULL and the function will only return the length of the * result without writing any of the result string (pre-flighting). * @param[out] dest_len A pointer to receive the number of units written to the destination.\n @@ -1291,7 +1291,7 @@ i18n_uchar32* i18n_ustring_to_UTF32(i18n_uchar32 *dest, int32_t dest_capacity, i * @see i18n_ustring_from_UTF32_with_sub() * @see i18n_ustring_to_UTF32() */ -i18n_uchar* i18n_ustring_from_UTF32(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar32 *src, int32_t src_len, i18n_error_code_e *error_code); +i18n_uchar *i18n_ustring_from_UTF32(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar32 *src, int32_t src_len, i18n_error_code_e *error_code); /** * @brief Convert a UTF-16 string to UTF-32. @@ -1300,7 +1300,7 @@ i18n_uchar* i18n_ustring_from_UTF32(i18n_uchar *dest, int32_t dest_capacity, int * * @param[out] dest A buffer for the result string.\n * The result will be zero-terminated if the buffer is large enough. - * @param[in] dest_capacity The size of the buffer (number of i18n_char32s)\n + * @param[in] dest_capacity The size of the buffer (number of i18n_char32s)\n * If it is @c 0, then @a dest may be @c NULL and the function will only return the length of the * result without writing any of the result string (pre-flighting). * @param[out] dest_len A pointer to receive the number of units written to the destination.\n @@ -1321,8 +1321,8 @@ i18n_uchar* i18n_ustring_from_UTF32(i18n_uchar *dest, int32_t dest_capacity, int * @see i18n_ustring_to_UTF32() * @see i18n_ustring_from_UTF32_with_sub() */ -i18n_uchar32* i18n_ustring_to_UTF32_with_sub(i18n_uchar32 *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, - i18n_uchar32 sub_char, int32_t *num_substitutions, i18n_error_code_e *error_code); +i18n_uchar32 *i18n_ustring_to_UTF32_with_sub(i18n_uchar32 *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, + i18n_uchar32 sub_char, int32_t *num_substitutions, i18n_error_code_e *error_code); /** * @brief Convert a UTF-32 string to UTF-16. @@ -1331,7 +1331,7 @@ i18n_uchar32* i18n_ustring_to_UTF32_with_sub(i18n_uchar32 *dest, int32_t dest_ca * * @param[out] dest A buffer for the result string.\n * The result will be zero-terminated if the buffer is large enough. - * @param[in] dest_capacity The size of the buffer (number of i18n_chars)\n + * @param[in] dest_capacity The size of the buffer (number of i18n_chars)\n * If it is @c 0, then @a dest may be @c NULL and the function will only return the length of the * result without writing any of the result string (pre-flighting). * @param[out] dest_len A pointer to receive the number of units written to the destination.\n @@ -1353,7 +1353,7 @@ i18n_uchar32* i18n_ustring_to_UTF32_with_sub(i18n_uchar32 *dest, int32_t dest_ca * @see i18n_ustring_from_UTF32() * @see i18n_ustring_to_UTF32_with_sub() */ -i18n_uchar* i18n_ustring_from_UTF32_with_sub(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar32 *src, int32_t src_len, i18n_uchar32 sub_char, int32_t *num_substitutions, i18n_error_code_e *error_code); +i18n_uchar *i18n_ustring_from_UTF32_with_sub(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar32 *src, int32_t src_len, i18n_uchar32 sub_char, int32_t *num_substitutions, i18n_error_code_e *error_code); #ifdef __cplusplus } @@ -1363,4 +1363,4 @@ i18n_uchar* i18n_ustring_from_UTF32_with_sub(i18n_uchar *dest, int32_t dest_capa * @} * @} */ -#endif /* __UTILS_I18N_USTRING_H__*/ +#endif /* __UTILS_I18N_USTRING_H__*/ diff --git a/src/include/wearable/utils_i18n.h b/src/include/wearable/utils_i18n.h old mode 100755 new mode 100644 index 36345bd..3bdb929 --- a/src/include/wearable/utils_i18n.h +++ b/src/include/wearable/utils_i18n.h @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef __UTILS_I18N_H__ @@ -47,1736 +47,1736 @@ extern "C" { * @ingroup CAPI_BASE_UTILS_MODULE * @defgroup CAPI_BASE_UTILS_I18N_MODULE i18n * @brief The i18n module contains uchar, ucollator, unormalization, usearch, ustring, ucalendar, udate, udatepg, ulocale and unumber. - * This module provides flexible generation of number or date format patterns and helps you format and parse dates/number for any locale. + * This module provides flexible generation of number or date format patterns and helps you format and parse dates/number for any locale. * The i18n module provides various features based on data from ICU. The following table shows the version of ICU used in each Tizen platform. * - * - * - * - * - * - * + * + * + * + * + * + * *
Tizen 2.3, 2.3.1, 2.4ICU 51CLDR 23Unicode 6.2
Tizen 2.3, 2.3.1, 2.4ICU 51CLDR 23Unicode 6.2
* @section CAPI_BASE_UTILS_I18N_MODULE_HEADER Required Header - * \#include + * \#include * @section CAPI_BASE_UTILS_I18N_MODULE_OVERVIEW Overview * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * *
APIDescriptionAPIDescription
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULEThe Timezone module represents a time zone offset, and also figures out daylight savings.@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULEThe Timezone module represents a time zone offset, and also figures out daylight savings.
@ref CAPI_BASE_UTILS_I18N_UENUMERATION_MODULEUEnumeration defines functions for handling String Enumeration.@ref CAPI_BASE_UTILS_I18N_UENUMERATION_MODULEUEnumeration defines functions for handling String Enumeration.
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULEUbrk module defines methods for finding the location of boundaries in text.@ref CAPI_BASE_UTILS_I18N_UBRK_MODULEUbrk module defines methods for finding the location of boundaries in text.
@ref CAPI_BASE_UTILS_I18N_UCOLLATOR_MODULEUcollator module performs locale-sensitive string comparison. It builds searching and sorting routines for natural language text and provides correct sorting orders for most locales.@ref CAPI_BASE_UTILS_I18N_UCOLLATOR_MODULEUcollator module performs locale-sensitive string comparison. It builds searching and sorting routines for natural language text and provides correct sorting orders for most locales.
@ref CAPI_BASE_UTILS_I18N_UCHAR_MODULEUchar module provides low-level access to the Unicode Character Database.@ref CAPI_BASE_UTILS_I18N_UCHAR_MODULEUchar module provides low-level access to the Unicode Character Database.
@ref CAPI_BASE_UTILS_I18N_UNORMALIZATION_MODULEUnormalization module provides Unicode normalization functionality for standard unicode normalization.@ref CAPI_BASE_UTILS_I18N_UNORMALIZATION_MODULEUnormalization module provides Unicode normalization functionality for standard unicode normalization.
@ref CAPI_BASE_UTILS_I18N_USEARCH_MODULEUsearch module provides language-sensitive text searching based on the comparison rules defined in a ucollator data struct.@ref CAPI_BASE_UTILS_I18N_USEARCH_MODULEUsearch module provides language-sensitive text searching based on the comparison rules defined in a ucollator data struct.
@ref CAPI_BASE_UTILS_I18N_USET_MODULEUset module allows to specify a subset of character used in strings.@ref CAPI_BASE_UTILS_I18N_USET_MODULEUset module allows to specify a subset of character used in strings.
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULEUstring module provides general unicode string handling.@ref CAPI_BASE_UTILS_I18N_USTRING_MODULEUstring module provides general unicode string handling.
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULEUcalendar is used for converting between a i18n_udate type and a set of integer fields - such as #I18N_UCALENDAR_YEAR, #I18N_UCALENDAR_MONTH, #I18N_UCALENDAR_DATE, #I18N_UCALENDAR_HOUR, and so on.@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULEUcalendar is used for converting between a i18n_udate type and a set of integer fields + such as #I18N_UCALENDAR_YEAR, #I18N_UCALENDAR_MONTH, #I18N_UCALENDAR_DATE, #I18N_UCALENDAR_HOUR, and so on.
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULEUdate module consists of functions that convert dates and times from their - internal representations to textual form and back again in a language-independent manner.@ref CAPI_BASE_UTILS_I18N_UDATE_MODULEUdate module consists of functions that convert dates and times from their + internal representations to textual form and back again in a language-independent manner.
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE Udatepg module provides flexible generation of date format patterns, like "yy-MM-dd". @ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE Udatepg module provides flexible generation of date format patterns, like "yy-MM-dd".
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULEA ulocale represents a specific geographical, political, or cultural region. @ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULEA ulocale represents a specific geographical, political, or cultural region.
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULEUnumber helps you format and parse numbers for any locale.@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULEUnumber helps you format and parse numbers for any locale.
* * @section CAPI_BASE_UTILS_I18N_MODULE_MAPPING_TABLE Mapping Table * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * *
ModuleNative APIICU APIModuleNative APIICU API
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_create_unknowngetUnknown@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_create_unknowngetUnknown
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_create_gmtgetGMT@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_create_gmtgetGMT
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_createcreateTimeZone@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_createcreateTimeZone
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_destroy@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_destroy
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_foreach_timezone_id_by_regioncreateTimeZoneIDEnumeration@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_foreach_timezone_id_by_regioncreateTimeZoneIDEnumeration
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_foreach_timezone_idcreateEnumeration@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_foreach_timezone_idcreateEnumeration
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_foreach_timezone_id_with_offsetcreateEnumeration@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_foreach_timezone_id_with_offsetcreateEnumeration
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_foreach_timezone_id_by_countrycreateEnumeration@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_foreach_timezone_id_by_countrycreateEnumeration
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_count_equivalent_idscountEquivalentIDs@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_count_equivalent_idscountEquivalentIDs
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_equivalent_idgetEquivalentID@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_equivalent_idgetEquivalentID
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_create_defaultcreateDefault@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_create_defaultcreateDefault
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_set_defaultsetDefault@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_set_defaultsetDefault
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_tzdata_versiongetTZDataVersion@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_tzdata_versiongetTZDataVersion
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_regiongetRegion@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_regiongetRegion
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_offset_with_dategetOffset@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_offset_with_dategetOffset
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_set_raw_offsetsetRawOffset@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_set_raw_offsetsetRawOffset
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_raw_offsetgetRawOffset@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_raw_offsetgetRawOffset
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_idgetID@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_idgetID
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_set_idsetID@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_set_idsetID
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_display_namegetDisplayName@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_display_namegetDisplayName
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_display_name_with_localegetDisplayName@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_display_name_with_localegetDisplayName
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_display_name_with_typegetDisplayName@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_display_name_with_typegetDisplayName
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_display_name_with_type_localegetDisplayName@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_display_name_with_type_localegetDisplayName
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_use_daylight_timeuseDaylightTime@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_use_daylight_timeuseDaylightTime
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_has_same_rulehasSameRules@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_has_same_rulehasSameRules
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_cloneclone@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_cloneclone
@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_dst_savingsgetDSTSavings@ref CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE#i18n_timezone_get_dst_savingsgetDSTSavings
@ref CAPI_BASE_UTILS_I18N_UENUMERATION_MODULE#i18n_uenumeration_destroyuenum_close@ref CAPI_BASE_UTILS_I18N_UENUMERATION_MODULE#i18n_uenumeration_destroyuenum_close
@ref CAPI_BASE_UTILS_I18N_UENUMERATION_MODULE#i18n_uenumeration_countuenum_count@ref CAPI_BASE_UTILS_I18N_UENUMERATION_MODULE#i18n_uenumeration_countuenum_count
@ref CAPI_BASE_UTILS_I18N_UENUMERATION_MODULE#i18n_uenumeration_unextuenum_unext@ref CAPI_BASE_UTILS_I18N_UENUMERATION_MODULE#i18n_uenumeration_unextuenum_unext
@ref CAPI_BASE_UTILS_I18N_UENUMERATION_MODULE#i18n_uenumeration_nextuenum_next@ref CAPI_BASE_UTILS_I18N_UENUMERATION_MODULE#i18n_uenumeration_nextuenum_next
@ref CAPI_BASE_UTILS_I18N_UENUMERATION_MODULE#i18n_uenumeration_resetuenum_reset@ref CAPI_BASE_UTILS_I18N_UENUMERATION_MODULE#i18n_uenumeration_resetuenum_reset
@ref CAPI_BASE_UTILS_I18N_UENUMERATION_MODULE#i18n_uenumeration_uchar_strings_enumeration_createuenum_openUCharStringsEnumeration@ref CAPI_BASE_UTILS_I18N_UENUMERATION_MODULE#i18n_uenumeration_uchar_strings_enumeration_createuenum_openUCharStringsEnumeration
@ref CAPI_BASE_UTILS_I18N_UENUMERATION_MODULE#i18n_uenumeration_char_strings_enumeration_createuenum_openCharStringsEnumeration@ref CAPI_BASE_UTILS_I18N_UENUMERATION_MODULE#i18n_uenumeration_char_strings_enumeration_createuenum_openCharStringsEnumeration
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_createubrk_open@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_createubrk_open
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_create_rulesubrk_openRules@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_create_rulesubrk_openRules
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_safe_cloneubrk_safeClone@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_safe_cloneubrk_safeClone
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_destroyubrk_close@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_destroyubrk_close
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_set_textubrk_setText@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_set_textubrk_setText
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_currentubrk_current@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_currentubrk_current
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_nextubrk_next@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_nextubrk_next
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_precedingubrk_preceding@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_precedingubrk_preceding
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_previousubrk_previous@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_previousubrk_previous
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_firstubrk_first@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_firstubrk_first
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_lastubrk_last@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_lastubrk_last
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_followingubrk_following@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_followingubrk_following
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_get_availableubrk_getAvailable@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_get_availableubrk_getAvailable
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_count_availableubrk_countAvailable@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_count_availableubrk_countAvailable
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_is_boundaryubrk_isBoundary@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_is_boundaryubrk_isBoundary
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_get_rule_statusubrk_getRuleStatus@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_get_rule_statusubrk_getRuleStatus
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_get_rule_status_vecubrk_getRuleStatusVec@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_get_rule_status_vecubrk_getRuleStatusVec
@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_get_locale_by_typeubrk_getLocaleByType@ref CAPI_BASE_UTILS_I18N_UBRK_MODULE#i18n_ubrk_get_locale_by_typeubrk_getLocaleByType
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_set_default_timezoneucal_setDefaultTimeZone@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_set_default_timezoneucal_setDefaultTimeZone
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_nowucal_getNow@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_nowucal_getNow
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_createucal_open@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_createucal_open
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_destroyucal_close@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_destroyucal_close
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_cloneucal_clone@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_cloneucal_clone
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_timezone_displaynameucal_getTimeZoneDisplayName@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_timezone_displaynameucal_getTimeZoneDisplayName
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_is_in_daylight_timeucal_inDaylightTime@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_is_in_daylight_timeucal_inDaylightTime
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_setucal_set@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_setucal_set
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_set_attributeucal_setAttribute@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_set_attributeucal_setAttribute
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_attributeucal_getAttribute@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_attributeucal_getAttribute
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_millisecondsucal_getMillis@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_millisecondsucal_getMillis
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_set_millisecondsucal_setMillis@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_set_millisecondsucal_setMillis
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_set_date_timeucal_setDateTime@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_set_date_timeucal_setDateTime
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_is_equivalent_toucal_equivalentTo@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_is_equivalent_toucal_equivalentTo
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_adducal_add@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_adducal_add
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_getucal_get@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_getucal_get
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_clearucal_clear@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_clearucal_clear
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_clear_fielducal_clearField@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_clear_fielducal_clearField
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_count_availableucal_countAvailable@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_count_availableucal_countAvailable
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_country_timezones_createucal_openCountryTimeZones@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_country_timezones_createucal_openCountryTimeZones
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_availableucal_getAvailable@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_availableucal_getAvailable
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_canonical_timezone_iducal_getCanonicalTimeZoneID@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_canonical_timezone_iducal_getCanonicalTimeZoneID
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_day_of_week_typeucal_getDayOfWeekType@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_day_of_week_typeucal_getDayOfWeekType
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_default_timezoneucal_getDefaultTimeZone@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_default_timezoneucal_getDefaultTimeZone
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_field_differenceucal_getFieldDifference@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_field_differenceucal_getFieldDifference
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_gregorian_changeucal_getGregorianChange@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_gregorian_changeucal_getGregorianChange
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_keyword_values_for_localeucal_getKeywordValuesForLocale@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_keyword_values_for_localeucal_getKeywordValuesForLocale
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_limitucal_getLimit@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_limitucal_getLimit
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_locale_by_typeucal_getLocaleByType@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_locale_by_typeucal_getLocaleByType
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_timezone_iducal_getTimeZoneID@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_timezone_iducal_getTimeZoneID
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_timezone_transition_dateucal_getTimeZoneTransitionDate@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_timezone_transition_dateucal_getTimeZoneTransitionDate
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_typeucal_getType@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_typeucal_getType
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_tz_data_versionucal_getTZDataVersion@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_tz_data_versionucal_getTZDataVersion
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_weekend_transitionucal_getWeekendTransition@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_get_weekend_transitionucal_getWeekendTransition
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_is_setucal_isSet@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_is_setucal_isSet
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_is_weekenducal_isWeekend@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_is_weekenducal_isWeekend
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_rollucal_roll@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_rollucal_roll
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_set_dateucal_setDate@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_set_dateucal_setDate
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_set_gregorian_changeucal_setGregorianChange@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_set_gregorian_changeucal_setGregorianChange
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_set_timezoneucal_setTimeZone@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_set_timezoneucal_setTimeZone
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_timezones_createucal_openTimeZones@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_timezones_createucal_openTimeZones
@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_timezone_id_enumeration_createucal_openTimeZoneIDEnumeration@ref CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE#i18n_ucalendar_timezone_id_enumeration_createucal_openTimeZoneIDEnumeration
@ref CAPI_BASE_UTILS_I18N_UCHAR_MODULE#i18n_uchar_get_int_property_valueu_getIntpropertyValue@ref CAPI_BASE_UTILS_I18N_UCHAR_MODULE#i18n_uchar_get_int_property_valueu_getIntpropertyValue
@ref CAPI_BASE_UTILS_I18N_UCHAR_MODULE#i18n_uchar_get_ublock_codeublock_getCode@ref CAPI_BASE_UTILS_I18N_UCHAR_MODULE#i18n_uchar_get_ublock_codeublock_getCode
@ref CAPI_BASE_UTILS_I18N_UCOLLATOR_MODULE#i18n_ucollator_createucol_open@ref CAPI_BASE_UTILS_I18N_UCOLLATOR_MODULE#i18n_ucollator_createucol_open
@ref CAPI_BASE_UTILS_I18N_UCOLLATOR_MODULE#i18n_ucollator_destroyucol_close@ref CAPI_BASE_UTILS_I18N_UCOLLATOR_MODULE#i18n_ucollator_destroyucol_close
@ref CAPI_BASE_UTILS_I18N_UCOLLATOR_MODULE#i18n_ucollator_str_collatorucol_strcoll@ref CAPI_BASE_UTILS_I18N_UCOLLATOR_MODULE#i18n_ucollator_str_collatorucol_strcoll
@ref CAPI_BASE_UTILS_I18N_UCOLLATOR_MODULE#i18n_ucollator_equalucol_equal@ref CAPI_BASE_UTILS_I18N_UCOLLATOR_MODULE#i18n_ucollator_equalucol_equal
@ref CAPI_BASE_UTILS_I18N_UCOLLATOR_MODULE#i18n_ucollator_set_strengthucol_setStrength@ref CAPI_BASE_UTILS_I18N_UCOLLATOR_MODULE#i18n_ucollator_set_strengthucol_setStrength
@ref CAPI_BASE_UTILS_I18N_UCOLLATOR_MODULE#i18n_ucollator_set_attributeucol_setAttribute@ref CAPI_BASE_UTILS_I18N_UCOLLATOR_MODULE#i18n_ucollator_set_attributeucol_setAttribute
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_createudat_open@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_createudat_open
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_destroyudat_close@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_destroyudat_close
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_format_dateudat_format@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_format_dateudat_format
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_apply_patternudat_applyPattern@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_apply_patternudat_applyPattern
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_cloneudat_clone@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_cloneudat_clone
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_count_availableudat_countAvailable@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_count_availableudat_countAvailable
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_count_symbolsudat_countSymbols@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_count_symbolsudat_countSymbols
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_get_2digit_year_startudat_get2DigitYearStart@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_get_2digit_year_startudat_get2DigitYearStart
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_get_availableudat_getAvailable@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_get_availableudat_getAvailable
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_get_calendarudat_getCalendar@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_get_calendarudat_getCalendar
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_get_locale_by_typeudat_getLocaleByType@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_get_locale_by_typeudat_getLocaleByType
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_get_number_formatudat_getNumberFormat@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_get_number_formatudat_getNumberFormat
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_get_symbolsudat_getSymbols@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_get_symbolsudat_getSymbols
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_is_lenientudat_isLenient@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_is_lenientudat_isLenient
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_parseudat_parse@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_parseudat_parse
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_parse_calendarudat_parseCalendar@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_parse_calendarudat_parseCalendar
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_set_2digit_year_startudat_set2DigitYearStart@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_set_2digit_year_startudat_set2DigitYearStart
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_set_calendarudat_setCalendar@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_set_calendarudat_setCalendar
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_set_contextudat_setContext@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_set_contextudat_setContext
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_set_lenientudat_setLenient@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_set_lenientudat_setLenient
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_set_number_formatudat_setNumberFormat@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_set_number_formatudat_setNumberFormat
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_set_symbolsudat_setSymbols@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_set_symbolsudat_setSymbols
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_to_calendar_date_fieldudat_toCalendarDateField@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_to_calendar_date_fieldudat_toCalendarDateField
@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_to_patternudat_toPattern@ref CAPI_BASE_UTILS_I18N_UDATE_MODULE#i18n_udate_to_patternudat_toPattern
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_createudatpg_open@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_createudatpg_open
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_destroyudatpg_close@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_destroyudatpg_close
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_get_best_patternudatpg_getBestPattern@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_get_best_patternudatpg_getBestPattern
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_add_patternudatpg_addPattern@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_add_patternudatpg_addPattern
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_base_skeletons_createudatpg_openBaseSkeletons@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_base_skeletons_createudatpg_openBaseSkeletons
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_cloneudatpg_clone@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_cloneudatpg_clone
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_create_emptyudatpg_openEmpty@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_create_emptyudatpg_openEmpty
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_get_append_item_formatudatpg_getAppendItemFormat@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_get_append_item_formatudatpg_getAppendItemFormat
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_get_append_item_nameudatpg_getAppendItemName@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_get_append_item_nameudatpg_getAppendItemName
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_get_base_skeletonudatpg_getBaseSkeleton@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_get_base_skeletonudatpg_getBaseSkeleton
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_get_best_pattern_with_optionsudatpg_getBestPatternWithOptions@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_get_best_pattern_with_optionsudatpg_getBestPatternWithOptions
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_get_date_time_formatudatpg_getDateTimeFormat@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_get_date_time_formatudatpg_getDateTimeFormat
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_get_decimaludatpg_getDecimal@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_get_decimaludatpg_getDecimal
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_get_pattern_for_skeletonudatpg_getPatternForSkeleton@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_get_pattern_for_skeletonudatpg_getPatternForSkeleton
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_get_skeletonudatpg_getSkeleton@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_get_skeletonudatpg_getSkeleton
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_replace_field_typesudatpg_replaceFieldTypes@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_replace_field_typesudatpg_replaceFieldTypes
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_replace_field_types_with_optionsudatpg_replaceFieldTypesWithOptions@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_replace_field_types_with_optionsudatpg_replaceFieldTypesWithOptions
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_set_append_item_formatudatpg_setAppendItemFormat@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_set_append_item_formatudatpg_setAppendItemFormat
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_set_append_item_nameudatpg_setAppendItemName@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_set_append_item_nameudatpg_setAppendItemName
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_set_date_time_formatudatpg_setDateTimeFormat@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_set_date_time_formatudatpg_setDateTimeFormat
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_set_decimaludatpg_setDecimal@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_set_decimaludatpg_setDecimal
@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_skeletons_createudatpg_openSkeletons@ref CAPI_BASE_UTILS_I18N_UDATEPG_MODULE#i18n_udatepg_skeletons_createudatpg_openSkeletons
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_defaultuloc_getDefault@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_defaultuloc_getDefault
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_set_defaultuloc_setDefault@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_set_defaultuloc_setDefault
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_languageuloc_getLanguage@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_languageuloc_getLanguage
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_countryuloc_getCountry@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_countryuloc_getCountry
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_display_nameuloc_getDisplayName@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_display_nameuloc_getDisplayName
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_add_likely_subtagsuloc_addLikelySubtags@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_add_likely_subtagsuloc_addLikelySubtags
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_canonicalizeuloc_canonicalize@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_canonicalizeuloc_canonicalize
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_for_language_taguloc_forLanguageTag@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_for_language_taguloc_forLanguageTag
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_base_nameuloc_getBaseName@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_base_nameuloc_getBaseName
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_character_orientationuloc_getCharacterOrientation@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_character_orientationuloc_getCharacterOrientation
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_display_countryuloc_getDisplayCountry@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_display_countryuloc_getDisplayCountry
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_display_keyworduloc_getDisplayKeyword@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_display_keyworduloc_getDisplayKeyword
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_display_keyword_valueuloc_getDisplayKeywordValue@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_display_keyword_valueuloc_getDisplayKeywordValue
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_display_languageuloc_getDisplayLanguage@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_display_languageuloc_getDisplayLanguage
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_display_scriptuloc_getDisplayScript@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_display_scriptuloc_getDisplayScript
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_display_variantuloc_getDisplayVariant@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_display_variantuloc_getDisplayVariant
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_iso3_countryuloc_getISO3Country@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_iso3_countryuloc_getISO3Country
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_iso3_languageuloc_getISO3Language@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_iso3_languageuloc_getISO3Language
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_iso_countriesuloc_getISOCountries@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_iso_countriesuloc_getISOCountries
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_iso_languagesuloc_getISOLanguages@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_iso_languagesuloc_getISOLanguages
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_keyword_valueuloc_getKeywordValue@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_keyword_valueuloc_getKeywordValue
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_lciduloc_getLCID@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_lciduloc_getLCID
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_line_orientationuloc_getLineOrientation@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_line_orientationuloc_getLineOrientation
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_locale_for_lciduloc_getLocaleForLCID@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_locale_for_lciduloc_getLocaleForLCID
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_nameuloc_getName@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_nameuloc_getName
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_parentuloc_getParent@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_parentuloc_getParent
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_scriptuloc_getScript@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_scriptuloc_getScript
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_variantuloc_getVariant@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_variantuloc_getVariant
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_keywords_createuloc_openKeywords@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_keywords_createuloc_openKeywords
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_minimize_subtagsuloc_minimizeSubtags@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_minimize_subtagsuloc_minimizeSubtags
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_set_keyword_valueuloc_setKeywordValue@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_set_keyword_valueuloc_setKeywordValue
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_to_language_taguloc_toLanguageTag@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_to_language_taguloc_toLanguageTag
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_availableuloc_getAvailable@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_get_availableuloc_getAvailable
@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_count_availableuloc_countAvailable@ref CAPI_BASE_UTILS_I18N_ULOCALE_MODULE#i18n_ulocale_count_availableuloc_countAvailable
@ref CAPI_BASE_UTILS_I18N_UNORMALIZATION_MODULE#i18n_unormalization_get_instanceunorm2_getInstance@ref CAPI_BASE_UTILS_I18N_UNORMALIZATION_MODULE#i18n_unormalization_get_instanceunorm2_getInstance
@ref CAPI_BASE_UTILS_I18N_UNORMALIZATION_MODULE#i18n_unormalization_normalizeunorm2_normalize@ref CAPI_BASE_UTILS_I18N_UNORMALIZATION_MODULE#i18n_unormalization_normalizeunorm2_normalize
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_createunum_open@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_createunum_open
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_destroyunum_close@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_destroyunum_close
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_get_symbolunum_getSymbol@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_get_symbolunum_getSymbol
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_apply_patternunum_applyPattern@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_apply_patternunum_applyPattern
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_cloneunum_clone@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_cloneunum_clone
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_count_availableunum_countAvailable@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_count_availableunum_countAvailable
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_formatunum_format@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_formatunum_format
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_format_decimalunum_formatDecimal@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_format_decimalunum_formatDecimal
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_format_doubleunum_formatDouble@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_format_doubleunum_formatDouble
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_format_double_currencyunum_formatDoubleCurrency@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_format_double_currencyunum_formatDoubleCurrency
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_format_int64unum_formatInt64@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_format_int64unum_formatInt64
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_get_attributeunum_getAttribute@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_get_attributeunum_getAttribute
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_get_availableunum_getAvailable@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_get_availableunum_getAvailable
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_get_double_attributeunum_getDoubleAttribute@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_get_double_attributeunum_getDoubleAttribute
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_get_locale_by_typeunum_getLocaleByType@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_get_locale_by_typeunum_getLocaleByType
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_get_text_attributeunum_getTextAttribute@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_get_text_attributeunum_getTextAttribute
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_parseunum_parse@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_parseunum_parse
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_parse_decimalunum_parseDecimal@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_parse_decimalunum_parseDecimal
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_parse_doubleunum_parseDouble@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_parse_doubleunum_parseDouble
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_parse_double_currencyunum_parseDoubleCurrency@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_parse_double_currencyunum_parseDoubleCurrency
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_parse_int64unum_parseInt64@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_parse_int64unum_parseInt64
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_set_attributeunum_setAttribute@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_set_attributeunum_setAttribute
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_set_double_attributeunum_setDoubleAttribute@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_set_double_attributeunum_setDoubleAttribute
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_set_symbolunum_setSymbol@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_set_symbolunum_setSymbol
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_set_text_attributeunum_setTextAttribute@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_set_text_attributeunum_setTextAttribute
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_to_patternunum_toPattern@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULE#i18n_unumber_to_patternunum_toPattern
@ref CAPI_BASE_UTILS_I18N_USEARCH_MODULE#i18n_usearch_create_newusearch_open@ref CAPI_BASE_UTILS_I18N_USEARCH_MODULE#i18n_usearch_create_newusearch_open
@ref CAPI_BASE_UTILS_I18N_USEARCH_MODULE#i18n_usearch_destroyusearch_close@ref CAPI_BASE_UTILS_I18N_USEARCH_MODULE#i18n_usearch_destroyusearch_close
@ref CAPI_BASE_UTILS_I18N_USEARCH_MODULE#i18n_usearch_get_matched_textusearch_getMatchedText@ref CAPI_BASE_UTILS_I18N_USEARCH_MODULE#i18n_usearch_get_matched_textusearch_getMatchedText
@ref CAPI_BASE_UTILS_I18N_USEARCH_MODULE#i18n_usearch_get_collatorusearch_getCollator@ref CAPI_BASE_UTILS_I18N_USEARCH_MODULE#i18n_usearch_get_collatorusearch_getCollator
@ref CAPI_BASE_UTILS_I18N_USEARCH_MODULE#i18n_usearch_firstusearch_first@ref CAPI_BASE_UTILS_I18N_USEARCH_MODULE#i18n_usearch_firstusearch_first
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_create_emptyuset_openEmpty@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_create_emptyuset_openEmpty
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_createuset_open@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_createuset_open
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_create_patternuset_openPattern@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_create_patternuset_openPattern
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_create_pattern_optionsuset_openPatternOptions@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_create_pattern_optionsuset_openPatternOptions
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_destroyuset_close@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_destroyuset_close
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_cloneuset_clone@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_cloneuset_clone
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_is_frozenuset_isFrozen@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_is_frozenuset_isFrozen
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_freezeuset_freeze@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_freezeuset_freeze
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_clone_as_thaweduset_cloneAsThawed@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_clone_as_thaweduset_cloneAsThawed
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_setuset_set@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_setuset_set
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_apply_patternuset_applyPattern@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_apply_patternuset_applyPattern
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_apply_int_property_valueuset_applyIntPropertyValue@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_apply_int_property_valueuset_applyIntPropertyValue
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_apply_property_aliasuset_applyPropertyAlias@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_apply_property_aliasuset_applyPropertyAlias
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_resembles_patternuset_resemblesPattern@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_resembles_patternuset_resemblesPattern
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_to_patternuset_toPattern@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_to_patternuset_toPattern
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_adduset_add@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_adduset_add
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_add_alluset_addAll@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_add_alluset_addAll
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_add_rangeuset_addRange@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_add_rangeuset_addRange
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_add_stringuset_addString@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_add_stringuset_addString
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_add_all_code_pointsuset_addAllCodePoints@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_add_all_code_pointsuset_addAllCodePoints
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_removeuset_remove@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_removeuset_remove
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_remove_rangeuset_removeRange@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_remove_rangeuset_removeRange
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_remove_stringuset_removeString@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_remove_stringuset_removeString
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_remove_alluset_removeAll@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_remove_alluset_removeAll
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_retainuset_retain@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_retainuset_retain
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_retain_alluset_retainAll@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_retain_alluset_retainAll
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_compactuset_compact@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_compactuset_compact
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_complementuset_complement@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_complementuset_complement
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_complement_alluset_complementAll@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_complement_alluset_complementAll
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_clearuset_clear@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_clearuset_clear
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_destroy_overuset_closeOver@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_destroy_overuset_closeOver
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_remove_all_stringsuset_removeAllStrings@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_remove_all_stringsuset_removeAllStrings
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_is_emptyuset_isEmpty@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_is_emptyuset_isEmpty
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_containsuset_contains@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_containsuset_contains
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_contains_rangeuset_containsRange@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_contains_rangeuset_containsRange
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_contains_stringuset_containsString@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_contains_stringuset_containsString
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_index_ofuset_indexOf@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_index_ofuset_indexOf
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_char_atuset_charAt@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_char_atuset_charAt
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_sizeuset_size@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_sizeuset_size
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_get_item_countuset_getItemCount@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_get_item_countuset_getItemCount
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_get_itemuset_getItem@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_get_itemuset_getItem
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_contains_alluset_containsAll@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_contains_alluset_containsAll
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_contains_all_code_pointsuset_containsAllCodePoints@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_contains_all_code_pointsuset_containsAllCodePoints
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_contains_noneuset_containsNone@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_contains_noneuset_containsNone
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_contains_someuset_containsSome@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_contains_someuset_containsSome
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_spanuset_span@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_spanuset_span
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_span_backuset_spanBack@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_span_backuset_spanBack
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_span_utf8uset_spanUTF8@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_span_utf8uset_spanUTF8
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_span_back_utf8uset_spanBackUTF8@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_span_back_utf8uset_spanBackUTF8
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_equalsuset_equals@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_equalsuset_equals
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_serializeuset_serialize@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_serializeuset_serialize
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_get_serialized_setuset_getSerializedSet@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_get_serialized_setuset_getSerializedSet
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_set_serialized_to_oneuset_setSerializedToOne@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_set_serialized_to_oneuset_setSerializedToOne
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_serialized_containsuset_serializedContains@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_serialized_containsuset_serializedContains
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_get_serialized_range_countuset_getSerializedRangeCount@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_get_serialized_range_countuset_getSerializedRangeCount
@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_get_serialized_rangeuset_getSerializedRange@ref CAPI_BASE_UTILS_I18N_USET_MODULE#i18n_uset_get_serialized_rangeuset_getSerializedRange
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_get_lengthu_strlen@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_get_lengthu_strlen
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_count_char32u_countChar32@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_count_char32u_countChar32
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_has_more_char32_thanu_strHasMoreChar32Than@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_has_more_char32_thanu_strHasMoreChar32Than
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_catu_strcat@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_catu_strcat
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_cat_nu_strncat@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_cat_nu_strncat
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_stringu_strstr@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_stringu_strstr
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_find_firstu_strFindFirst@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_find_firstu_strFindFirst
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_charu_strchr@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_charu_strchr
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_char32u_strchr32@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_char32u_strchr32
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_r_stringu_strrstr@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_r_stringu_strrstr
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_find_lastu_strFindLast@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_find_lastu_strFindLast
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_r_charu_strrchr@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_r_charu_strrchr
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_r_char32u_strrchr32@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_r_char32u_strrchr32
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_pbrku_strpbrk@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_pbrku_strpbrk
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_cspnu_strcspn@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_cspnu_strcspn
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_spnu_strspn@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_spnu_strspn
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_tokenizer_ru_strtok_r@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_tokenizer_ru_strtok_r
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_compareu_strcmp@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_compareu_strcmp
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_compare_code_point_orderu_strcmpCodePointOrder@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_compare_code_point_orderu_strcmpCodePointOrder
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_compare_binary_orderu_strCompare@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_compare_binary_orderu_strCompare
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_case_compare_with_lengthu_strCaseCompare@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_case_compare_with_lengthu_strCaseCompare
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_compare_nu_strncmp@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_compare_nu_strncmp
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_compare_n_code_point_orderu_strncmpCodePointOrder@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_compare_n_code_point_orderu_strncmpCodePointOrder
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_case_compareu_strcasecmp@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_case_compareu_strcasecmp
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_case_compare_nu_strncasecmp@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_case_compare_nu_strncasecmp
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_case_compareu_memcasecmp@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_case_compareu_memcasecmp
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_copyu_strcpy@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_copyu_strcpy
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_copy_nu_strncpy@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_copy_nu_strncpy
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_copy_uau_uastrcpy@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_copy_uau_uastrcpy
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_copy_ua_nu_uastrncpy@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_copy_ua_nu_uastrncpy
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_copy_auu_austrcpy@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_copy_auu_austrcpy
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_copy_au_nu_austrncpy@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_copy_au_nu_austrncpy
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_copyu_memcpy@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_copyu_memcpy
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_moveu_memmove@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_moveu_memmove
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_setu_memset@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_setu_memset
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_compareu_memcmp@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_compareu_memcmp
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_compare_code_point_orderu_memcmpCodePointOrder@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_compare_code_point_orderu_memcmpCodePointOrder
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_charu_memchr@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_charu_memchr
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_char32u_memchr32@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_char32u_memchr32
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_r_charu_memrchr@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_r_charu_memrchr
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_r_char32u_memrchr32@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_mem_r_char32u_memrchr32
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_unescapeu_unescape@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_unescapeu_unescape
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_unescape_atu_unescapeAt@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_unescape_atu_unescapeAt
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_to_upperu_strToUpper@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_to_upperu_strToUpper
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_to_loweru_strToLower@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_to_loweru_strToLower
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_to_title_newu_strToTitle@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_to_title_newu_strToTitle
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_fold_caseu_strFoldCase@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_fold_caseu_strFoldCase
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_to_WCSu_strToWCS@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_to_WCSu_strToWCS
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_from_WCSu_strFromWCS@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_from_WCSu_strFromWCS
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_to_UTF8u_strToUTF8@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_to_UTF8u_strToUTF8
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_from_UTF8u_strFromUTF8@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_from_UTF8u_strFromUTF8
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_to_UTF8_with_subu_strToUTF8WithSub@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_to_UTF8_with_subu_strToUTF8WithSub
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_from_UTF8_with_subu_strFromUTF8WithSub@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_from_UTF8_with_subu_strFromUTF8WithSub
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_from_UTF8_lenientu_strFromUTF8Lenient@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_from_UTF8_lenientu_strFromUTF8Lenient
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_to_UTF32u_strToUTF32@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_to_UTF32u_strToUTF32
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_from_UTF32u_strFromUTF32@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_from_UTF32u_strFromUTF32
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_to_UTF32_with_subu_strToUTF32WithSub@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_to_UTF32_with_subu_strToUTF32WithSub
@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_from_UTF32_with_subu_strFromUTF32WithSub@ref CAPI_BASE_UTILS_I18N_USTRING_MODULE#i18n_ustring_from_UTF32_with_subu_strFromUTF32WithSub
*/ @@ -1785,4 +1785,4 @@ extern "C" { } #endif -#endif /* __UTILS_I18N_H__*/ +#endif /* __UTILS_I18N_H__*/ diff --git a/src/include/wearable/utils_i18n_private.h b/src/include/wearable/utils_i18n_private.h old mode 100755 new mode 100644 index 70783e9..692c2dd --- a/src/include/wearable/utils_i18n_private.h +++ b/src/include/wearable/utils_i18n_private.h @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef __UTILS_I18N_PRIVATE_H__ @@ -37,54 +37,54 @@ extern "C" { #define LOG_TAG "BASE_UTILS" #define I18N_ERR(ret) do { \ - if (ret != I18N_ERROR_NONE) { \ - LOGE("err(%d): %s", ret, get_error_message(ret)); \ - } \ -} while (0) + if (ret != I18N_ERROR_NONE) { \ + LOGE("err(%d): %s", ret, get_error_message(ret)); \ + } \ + } while (0) #define ERR(fmt, arg...) LOGE(fmt, ##arg) #define ret_if(expr) do { \ - if (expr) { \ - ERR("(%s)", #expr); \ - return; \ - } \ -} while (0) + if (expr) { \ + ERR("(%s)", #expr); \ + return; \ + } \ + } while (0) #define retv_if(expr, val) do { \ - if (expr) { \ - ERR("(%s)", #expr); \ - return (val); \ - } \ -} while (0) + if (expr) { \ + ERR("(%s)", #expr); \ + return (val); \ + } \ + } while (0) #define retm_if(expr, fmt, arg...) do { \ - if (expr) { \ - ERR(fmt, ##arg); \ - return; \ - } \ -} while (0) + if (expr) { \ + ERR(fmt, ##arg); \ + return; \ + } \ + } while (0) #define retvm_if(expr, val, fmt, arg...) do { \ - if (expr) { \ - ERR(fmt, ##arg); \ - return (val); \ - } \ -} while (0) + if (expr) { \ + ERR(fmt, ##arg); \ + return (val); \ + } \ + } while (0) #define retex_if(expr, val, fmt, arg...) do { \ - if (expr) { \ - ERR(fmt, ##arg); \ - val; \ - goto CATCH; \ - } \ -} while (0); + if (expr) { \ + ERR(fmt, ##arg); \ + val; \ + goto CATCH; \ + } \ + } while (0); #define ERR_MAPPING_REVERSE(BASE_UTILS_ERROR, ICU_ERROR) ICU_ERROR = \ - (UErrorCode)_i18n_error_mapping_reverse((int)BASE_UTILS_ERROR) + (UErrorCode)_i18n_error_mapping_reverse((int)BASE_UTILS_ERROR) #define ERR_MAPPING(ICU_ERROR, BASE_UTILS_ERROR) BASE_UTILS_ERROR = \ - (i18n_error_code_e)_i18n_error_mapping((int)ICU_ERROR) + (i18n_error_code_e)_i18n_error_mapping((int)ICU_ERROR) int _i18n_error_mapping(int err); int _i18n_error_mapping_reverse(int err); @@ -93,4 +93,4 @@ int _i18n_error_mapping_reverse(int err); } #endif -#endif /* __UTILS_I18N_PRIVATE_H__*/ +#endif /* __UTILS_I18N_PRIVATE_H__*/ diff --git a/src/include/wearable/utils_i18n_timezone.h b/src/include/wearable/utils_i18n_timezone.h old mode 100755 new mode 100644 index a537e37..cf43cdc --- a/src/include/wearable/utils_i18n_timezone.h +++ b/src/include/wearable/utils_i18n_timezone.h @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef __UTILS_I18N_TIMEZONE_H__ @@ -34,7 +34,7 @@ extern "C" { * @defgroup CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE Timezone * @brief The Timezone module represents a time zone offset, and also figures out daylight savings. * @section CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE_HEADER Required Header - * \#include + * \#include * * @section CAPI_BASE_UTILS_I18N_TIMEZONE_MODULE_OVERVIEW Overview * @details The Timezone module represents a time zone offset, and also figures out daylight savings.\n @@ -121,7 +121,7 @@ int i18n_timezone_destroy(i18n_timezone_h timezone); * * @retval #I18N_ERROR_NONE Successful */ -int i18n_timezone_foreach_timezone_id_by_region(i18n_system_timezone_type_e timezone_type, const char *region, const int32_t *raw_offset, i18n_timezone_id_cb cb, void* user_data); +int i18n_timezone_foreach_timezone_id_by_region(i18n_system_timezone_type_e timezone_type, const char *region, const int32_t *raw_offset, i18n_timezone_id_cb cb, void *user_data); /** * @brief Returns an enumeration over all recognized time zone IDs. @@ -133,7 +133,7 @@ int i18n_timezone_foreach_timezone_id_by_region(i18n_system_timezone_type_e time * * @retval #I18N_ERROR_NONE Successful */ -int i18n_timezone_foreach_timezone_id(i18n_timezone_id_cb cb, void* user_data); +int i18n_timezone_foreach_timezone_id(i18n_timezone_id_cb cb, void *user_data); /** * @brief Returns an enumeration over time zone IDs with a given raw offset from GMT. @@ -152,7 +152,7 @@ int i18n_timezone_foreach_timezone_id(i18n_timezone_id_cb cb, void* user_data); * * @retval #I18N_ERROR_NONE Successful */ -int i18n_timezone_foreach_timezone_id_with_offset(int32_t raw_offset, i18n_timezone_id_cb cb, void* user_data); +int i18n_timezone_foreach_timezone_id_with_offset(int32_t raw_offset, i18n_timezone_id_cb cb, void *user_data); /** * @brief Returns an enumeration over time zone IDs associated with the given country. @@ -165,7 +165,7 @@ int i18n_timezone_foreach_timezone_id_with_offset(int32_t raw_offset, i18n_timez * * @retval #I18N_ERROR_NONE Successful */ -int i18n_timezone_foreach_timezone_id_by_country(const char *country, i18n_timezone_id_cb cb, void* user_data); +int i18n_timezone_foreach_timezone_id_by_country(const char *country, i18n_timezone_id_cb cb, void *user_data); /** * @brief Returns the number of IDs in the equivalency group that includes the given ID. @@ -194,7 +194,7 @@ int i18n_timezone_count_equivalent_ids(const char *timezone_id, int32_t *count); * @param[in] timezone_id a system time zone ID * @param[in] index a value from 0 to n-1, where n is the out parameter value from i18n_timezone_count_equivalent_ids(timezone_id, &n) * @param[out] equivalent_timezone_id the ID of the index-th zone in the equivalency group containing 'timezone_id', - * or an empty string if 'timezone_id' is not a valid system ID or 'index' is out of range + * or an empty string if 'timezone_id' is not a valid system ID or 'index' is out of range * * @retval #I18N_ERROR_NONE Successful * @see i18n_timezone_count_equivalent_ids() @@ -235,13 +235,13 @@ int i18n_timezone_set_default(i18n_timezone_h timezone); /** * @brief Returns the timezone data version currently used by I18N. * @remarks The specific error code can be obtained using the get_last_result() - * method. Error codes are described in #i18n_error_code_e description. + * method. Error codes are described in #i18n_error_code_e description. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @return the version string, such as "2007f" * @exception #I18N_ERROR_NONE Successful */ -const char* i18n_timezone_get_tzdata_version(void); +const char *i18n_timezone_get_tzdata_version(void); /** * @brief Gets the region code associated with the given system time zone ID. @@ -254,7 +254,7 @@ const char* i18n_timezone_get_tzdata_version(void); * @param[out] region Output buffer for receiving the region code. * @param[out] region_len The length of the region code. * @param[in] region_capacity The size of the output buffer. If it is lower than required @a region buffer size, - * then I18N_ERROR_BUFFER_OVERFLOW error is returned. + * then I18N_ERROR_BUFFER_OVERFLOW error is returned. * * @return the version string, such as "2007f" */ @@ -278,7 +278,7 @@ int i18n_timezone_get_offset_with_date(i18n_timezone_h timezone, i18n_udate date /** * @brief Sets the i18n_timezone_h's raw GMT offset - * (i.e., the number of milliseconds to add to GMT to get local time, before taking daylight savings time into account). + * (i.e., the number of milliseconds to add to GMT to get local time, before taking daylight savings time into account). * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] timezone The i18n_timezone_h to set a raw offset. @@ -314,11 +314,11 @@ int i18n_timezone_get_id(i18n_timezone_h timezone, char **timezone_id); /** * @brief Sets the i18n_timezone_h's ID to the specified value. * @details This doesn't affect any other fields. for example,\n - * \n - * i18n_timezone_h timezone = NULL;\n - * i18n_timezone_create ( &timezone, "America/New_York" );\n - * i18n_timezone_set_id ( "America/Los_Angeles" );\n - * \n + * \n + * i18n_timezone_h timezone = NULL;\n + * i18n_timezone_create ( &timezone, "America/New_York" );\n + * i18n_timezone_set_id ( "America/Los_Angeles" );\n + * \n * the timezone's GMT offset and daylight-savings rules don't change to those for Los Angeles. * They're still those for New York. Only the ID has changed. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif @@ -449,4 +449,4 @@ int i18n_timezone_get_dst_savings(i18n_timezone_h timezone, int32_t *dst_savings * @} * @} */ -#endif /* __UTILS_I18N_TIMEZONE_H__*/ +#endif /* __UTILS_I18N_TIMEZONE_H__*/ diff --git a/src/include/wearable/utils_i18n_types.h b/src/include/wearable/utils_i18n_types.h index 7fa2b7a..833d356 100644 --- a/src/include/wearable/utils_i18n_types.h +++ b/src/include/wearable/utils_i18n_types.h @@ -1,20 +1,20 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * Copyright (C) 1999-2012, International Business Machines - * Corporation and others. All Rights Reserved. + * Corporation and others. All Rights Reserved. */ @@ -46,45 +46,45 @@ extern "C" { * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_ERROR_NONE = TIZEN_ERROR_NONE, /**< No error, no warning */ - I18N_ERROR_MISSING_RESOURCE = TIZEN_ERROR_UTILITY_ICU | 0x01, /**< The requested resource cannot be found */ - I18N_ERROR_INVALID_FORMAT = TIZEN_ERROR_UTILITY_ICU | 0x02, /**< Data format is not what is expected */ - I18N_ERROR_FILE_ACCESS = TIZEN_ERROR_UTILITY_ICU | 0x03, /**< The requested file cannot be found */ - I18N_ERROR_INTERNAL_PROGRAM = TIZEN_ERROR_UTILITY_ICU | 0x04, /**< Indicates a bug in the library code */ - I18N_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */ - I18N_ERROR_INDEX_OUTOFBOUNDS = TIZEN_ERROR_UTILITY_ICU | 0x05, /**< Trying to access the index that is out of bounds */ - I18N_ERROR_INVALID_CHAR_FOUND = TIZEN_ERROR_UTILITY_ICU | 0x06, /**< Character conversion: Unmappable input sequence. In other APIs: Invalid character */ - I18N_ERROR_BUFFER_OVERFLOW = TIZEN_ERROR_UTILITY_ICU | 0x07, /**< A result would not fit in the supplied buffer */ - I18N_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Requested operation is not supported in the current context */ - I18N_ERROR_COLLATOR_VERSION_MISMATCH = TIZEN_ERROR_UTILITY_ICU | 0x08, /**< Collator version is not compatible with the base version */ - I18N_ERROR_USELESS_COLLATOR = TIZEN_ERROR_UTILITY_ICU | 0x09, /**< Collator is options only and no base is specified */ - I18N_ERROR_NO_WRITE_PERMISSION = TIZEN_ERROR_UTILITY_ICU | 0x0A, /**< Attempt to modify read-only or constant data */ - I18N_ERROR_RESOURCE_TYPE_MISMATCH = TIZEN_ERROR_UTILITY_ICU | 0x0B, /**< An operation is requested over a resource that does not support it */ - I18N_ERROR_TOO_MANY_ALIASES = TIZEN_ERROR_UTILITY_ICU | 0x0C, /**< Too many aliases in the path to the requested resource */ - I18N_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid function parameter */ - I18N_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */ - - I18N_ERROR_MESSAGE_PARSE = TIZEN_ERROR_UTILITY_ICU | 0x0D, /**< Unable to parse a message (message format). @if MOBILE (Since 2.3.1) @endif*/ - I18N_ERROR_PARSE = TIZEN_ERROR_UTILITY_ICU | 0x0E, /**< Equivalent to Java ParseException. @if MOBILE (Since 2.3.1) @endif*/ - I18N_ERROR_TRUNCATED_CHAR_FOUND = TIZEN_ERROR_UTILITY_ICU | 0x0F, /**< Character conversion: Incomplete input sequence. @if MOBILE (Since 2.3.1) @endif*/ - I18N_ERROR_ILLEGAL_CHAR_FOUND = TIZEN_ERROR_UTILITY_ICU | 0x10, /**< Character conversion: Illegal input sequence/combination of input units. @if MOBILE (Since 2.3.1) @endif*/ - I18N_ERROR_INVALID_TABLE_FORMAT = TIZEN_ERROR_UTILITY_ICU | 0x11, /**< Conversion table file found, but corrupted. @if MOBILE (Since 2.3.1) @endif*/ - I18N_ERROR_INVALID_TABLE_FILE = TIZEN_ERROR_UTILITY_ICU | 0x12, /**< Conversion table file not found. @if MOBILE (Since 2.3.1) @endif*/ - I18N_ERROR_ILLECAL_ESCAPE_SEQUENCE = TIZEN_ERROR_UTILITY_ICU | 0x13, /**< ISO-2022 illlegal escape sequence. @if MOBILE (Since 2.3.1) @endif*/ - I18N_ERROR_UNSUPPORTED_ESCAPE_SEQUENCE = TIZEN_ERROR_UTILITY_ICU | 0x14, /**< ISO-2022 unsupported escape sequence. @if MOBILE (Since 2.3.1) @endif*/ - I18N_ERROR_NO_SPACE_AVAILABLE = TIZEN_ERROR_UTILITY_ICU | 0x15, /**< No space available for in-buffer expansion for Arabic shaping. @if MOBILE (Since 2.3.1) @endif*/ - I18N_ERROR_CE_NOT_FOUND = TIZEN_ERROR_UTILITY_ICU | 0x16, /**< Currently used only while setting variable top, but can be used generally. @if MOBILE (Since 2.3.1) @endif*/ - I18N_ERROR_PRIMARY_TOO_LONG = TIZEN_ERROR_UTILITY_ICU | 0x17, /**< User tried to set variable top to a primary that is longer than two bytes. @if MOBILE (Since 2.3.1) @endif*/ - I18N_ERROR_STATE_TOO_OLD = TIZEN_ERROR_UTILITY_ICU | 0x18, /**< ICU cannot construct a service from this state, as it is no longer supported. @if MOBILE (Since 2.3.1) @endif*/ - I18N_ERROR_ENUM_OUT_OF_SYNC = TIZEN_ERROR_UTILITY_ICU | 0x19, /**< UEnumeration out of sync with underlying collection. @if MOBILE (Since 2.3.1) @endif*/ - I18N_ERROR_INVARIANT_CONVERSION = TIZEN_ERROR_UTILITY_ICU | 0x1A, /**< Unable to convert a UChar* string to char* with the invariant converter. @if MOBILE (Since 2.3.1) @endif*/ - I18N_ERROR_INVALID_STATE = TIZEN_ERROR_UTILITY_ICU | 0x1B, /**< Requested operation can not be completed with ICU in its current state. @if MOBILE (Since 2.3.1) @endif*/ - I18N_ERROR_MALFORMED_SET = TIZEN_ERROR_UTILITY_ICU | 0x1C, /**< A UnicodeSet pattern is invalid. @if MOBILE (Since 2.3.1) @endif*/ - I18N_WARNING_STRING_NOT_TERMINATED = TIZEN_ERROR_UTILITY_ICU | 0x1D, /**< String not terminated with NULL. @if MOBILE (Since 2.3.1) @endif*/ - I18N_ERROR_STD3_ASCII_RULES = TIZEN_ERROR_UTILITY_ICU | 0x1E, /**< Argument does not satisfy STD3 rules. @if MOBILE (Since 2.3.1) @endif*/ - I18N_ERROR_UNASSIGNED = TIZEN_ERROR_UTILITY_ICU | 0x1F, /**< Unassigned code points are found. @if MOBILE (Since 2.3.1) @endif*/ - I18N_WARNING_SORT_KEY_TOO_SHORT = TIZEN_ERROR_UTILITY_ICU | 0x20, /**< Number of levels requested in getBound is higher than the number of levels in the sort key. @if MOBILE (Since 2.3.1) @endif*/ - I18N_ERROR_UNKNOWN = TIZEN_ERROR_UNKNOWN, /**< Unknown error. @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_NONE = TIZEN_ERROR_NONE, /**< No error, no warning */ + I18N_ERROR_MISSING_RESOURCE = TIZEN_ERROR_UTILITY_ICU | 0x01, /**< The requested resource cannot be found */ + I18N_ERROR_INVALID_FORMAT = TIZEN_ERROR_UTILITY_ICU | 0x02, /**< Data format is not what is expected */ + I18N_ERROR_FILE_ACCESS = TIZEN_ERROR_UTILITY_ICU | 0x03, /**< The requested file cannot be found */ + I18N_ERROR_INTERNAL_PROGRAM = TIZEN_ERROR_UTILITY_ICU | 0x04, /**< Indicates a bug in the library code */ + I18N_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */ + I18N_ERROR_INDEX_OUTOFBOUNDS = TIZEN_ERROR_UTILITY_ICU | 0x05, /**< Trying to access the index that is out of bounds */ + I18N_ERROR_INVALID_CHAR_FOUND = TIZEN_ERROR_UTILITY_ICU | 0x06, /**< Character conversion: Unmappable input sequence. In other APIs: Invalid character */ + I18N_ERROR_BUFFER_OVERFLOW = TIZEN_ERROR_UTILITY_ICU | 0x07, /**< A result would not fit in the supplied buffer */ + I18N_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Requested operation is not supported in the current context */ + I18N_ERROR_COLLATOR_VERSION_MISMATCH = TIZEN_ERROR_UTILITY_ICU | 0x08, /**< Collator version is not compatible with the base version */ + I18N_ERROR_USELESS_COLLATOR = TIZEN_ERROR_UTILITY_ICU | 0x09, /**< Collator is options only and no base is specified */ + I18N_ERROR_NO_WRITE_PERMISSION = TIZEN_ERROR_UTILITY_ICU | 0x0A, /**< Attempt to modify read-only or constant data */ + I18N_ERROR_RESOURCE_TYPE_MISMATCH = TIZEN_ERROR_UTILITY_ICU | 0x0B, /**< An operation is requested over a resource that does not support it */ + I18N_ERROR_TOO_MANY_ALIASES = TIZEN_ERROR_UTILITY_ICU | 0x0C, /**< Too many aliases in the path to the requested resource */ + I18N_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid function parameter */ + I18N_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */ + + I18N_ERROR_MESSAGE_PARSE = TIZEN_ERROR_UTILITY_ICU | 0x0D, /**< Unable to parse a message (message format). @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_PARSE = TIZEN_ERROR_UTILITY_ICU | 0x0E, /**< Equivalent to Java ParseException. @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_TRUNCATED_CHAR_FOUND = TIZEN_ERROR_UTILITY_ICU | 0x0F, /**< Character conversion: Incomplete input sequence. @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_ILLEGAL_CHAR_FOUND = TIZEN_ERROR_UTILITY_ICU | 0x10, /**< Character conversion: Illegal input sequence/combination of input units. @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_INVALID_TABLE_FORMAT = TIZEN_ERROR_UTILITY_ICU | 0x11, /**< Conversion table file found, but corrupted. @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_INVALID_TABLE_FILE = TIZEN_ERROR_UTILITY_ICU | 0x12, /**< Conversion table file not found. @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_ILLECAL_ESCAPE_SEQUENCE = TIZEN_ERROR_UTILITY_ICU | 0x13, /**< ISO-2022 illlegal escape sequence. @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_UNSUPPORTED_ESCAPE_SEQUENCE = TIZEN_ERROR_UTILITY_ICU | 0x14, /**< ISO-2022 unsupported escape sequence. @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_NO_SPACE_AVAILABLE = TIZEN_ERROR_UTILITY_ICU | 0x15, /**< No space available for in-buffer expansion for Arabic shaping. @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_CE_NOT_FOUND = TIZEN_ERROR_UTILITY_ICU | 0x16, /**< Currently used only while setting variable top, but can be used generally. @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_PRIMARY_TOO_LONG = TIZEN_ERROR_UTILITY_ICU | 0x17, /**< User tried to set variable top to a primary that is longer than two bytes. @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_STATE_TOO_OLD = TIZEN_ERROR_UTILITY_ICU | 0x18, /**< ICU cannot construct a service from this state, as it is no longer supported. @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_ENUM_OUT_OF_SYNC = TIZEN_ERROR_UTILITY_ICU | 0x19, /**< UEnumeration out of sync with underlying collection. @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_INVARIANT_CONVERSION = TIZEN_ERROR_UTILITY_ICU | 0x1A, /**< Unable to convert a UChar* string to char* with the invariant converter. @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_INVALID_STATE = TIZEN_ERROR_UTILITY_ICU | 0x1B, /**< Requested operation can not be completed with ICU in its current state. @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_MALFORMED_SET = TIZEN_ERROR_UTILITY_ICU | 0x1C, /**< A UnicodeSet pattern is invalid. @if MOBILE (Since 2.3.1) @endif*/ + I18N_WARNING_STRING_NOT_TERMINATED = TIZEN_ERROR_UTILITY_ICU | 0x1D, /**< String not terminated with NULL. @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_STD3_ASCII_RULES = TIZEN_ERROR_UTILITY_ICU | 0x1E, /**< Argument does not satisfy STD3 rules. @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_UNASSIGNED = TIZEN_ERROR_UTILITY_ICU | 0x1F, /**< Unassigned code points are found. @if MOBILE (Since 2.3.1) @endif*/ + I18N_WARNING_SORT_KEY_TOO_SHORT = TIZEN_ERROR_UTILITY_ICU | 0x20, /**< Number of levels requested in getBound is higher than the number of levels in the sort key. @if MOBILE (Since 2.3.1) @endif*/ + I18N_ERROR_UNKNOWN = TIZEN_ERROR_UNKNOWN, /**< Unknown error. @if MOBILE (Since 2.3.1) @endif*/ } i18n_error_code_e; /** @@ -97,50 +97,50 @@ typedef enum { * @{ */ -#define I18N_U_MASK(x) ((uint32_t)1<<(x)) /**< Get a single-bit bit set (a flag) from a bit number 0..31. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ - -#define I18N_U_GC_CN_MASK I18N_U_MASK(I18N_UCHAR_U_GENERAL_OTHER_TYPES) /**< U_GC_XX_MASK constants are bit flags corresponding to Unicode general category values. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_LU_MASK I18N_U_MASK(I18N_UCHAR_U_UPPERCASE_LETTER) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_LL_MASK I18N_U_MASK(I18N_UCHAR_U_LOWERCASE_LETTER) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_LT_MASK I18N_U_MASK(I18N_UCHAR_U_TITLECASE_LETTER) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_LM_MASK I18N_U_MASK(I18N_UCHAR_U_MODIFIER_LETTER) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_LO_MASK I18N_U_MASK(I18N_UCHAR_U_OTHER_LETTER) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_MN_MASK I18N_U_MASK(I18N_UCHAR_U_NON_SPACING_MARK) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_ME_MASK I18N_U_MASK(I18N_UCHAR_U_ENCLOSING_MARK) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_MC_MASK I18N_U_MASK(I18N_UCHAR_U_COMBINING_SPACING_MARK) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_ND_MASK I18N_U_MASK(I18N_UCHAR_U_DECIMAL_DIGIT_NUMBER) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_NL_MASK I18N_U_MASK(I18N_UCHAR_U_LETTER_NUMBER) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_NO_MASK I18N_U_MASK(I18N_UCHAR_U_OTHER_NUMBER) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_ZS_MASK I18N_U_MASK(I18N_UCHAR_U_SPACE_SEPARATOR) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_ZL_MASK I18N_U_MASK(I18N_UCHAR_U_LINE_SEPARATOR) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_ZP_MASK I18N_U_MASK(I18N_UCHAR_U_PARAGRAPH_SEPARATOR) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_CC_MASK I18N_U_MASK(I18N_UCHAR_U_CONTROL_CHAR) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_CF_MASK I18N_U_MASK(I18N_UCHAR_U_FORMAT_CHAR) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_CO_MASK I18N_U_MASK(I18N_UCHAR_U_PRIVATE_USE_CHAR) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_CS_MASK I18N_U_MASK(I18N_UCHAR_U_SURROGATE) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_PD_MASK I18N_U_MASK(I18N_UCHAR_U_DASH_PUNCTUATION) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_PS_MASK I18N_U_MASK(I18N_UCHAR_U_START_PUNCTUATION) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_PE_MASK I18N_U_MASK(I18N_UCHAR_U_END_PUNCTUATION) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_PC_MASK I18N_U_MASK(I18N_UCHAR_U_CONNECTOR_PUNCTUATION) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_PO_MASK I18N_U_MASK(I18N_UCHAR_U_OTHER_PUNCTUATION) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_SM_MASK I18N_U_MASK(I18N_UCHAR_U_MATH_SYMBOL) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_SC_MASK I18N_U_MASK(I18N_UCHAR_U_CURRENCY_SYMBOL) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_SK_MASK I18N_U_MASK(I18N_UCHAR_U_MODIFIER_SYMBOL) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_SO_MASK I18N_U_MASK(I18N_UCHAR_U_OTHER_SYMBOL) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_PI_MASK I18N_U_MASK(I18N_UCHAR_U_INITIAL_PUNCTUATION) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_PF_MASK I18N_U_MASK(I18N_UCHAR_U_FINAL_PUNCTUATION) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ -#define I18N_U_GC_L_MASK (I18N_U_GC_LU_MASK|I18N_U_GC_LL_MASK|I18N_U_GC_LT_MASK|I18N_U_GC_LM_MASK|I18N_U_GC_LO_MASK) /**in the target of a case mapping. Not the same as the general category Cased_Letter. - */ - I18N_UCHAR_S_TERM, - /**< Binary property STerm (new in Unicode 4.0.1). \n - */ - I18N_UCHAR_VARIATION_SELECTOR, - /**< Binary property Variation_Selector (new in Unicode 4.0.1). \n - Indicates all those characters that qualify as Variation Selectors. - */ - I18N_UCHAR_NFD_INERT, - /**< Binary property NFD_Inert. \n - ICU-specific property for characters that are inert under NFD, i.e., they do not interact with adjacent characters. - */ - I18N_UCHAR_NFKD_INERT, - /**< Binary property NFKD_Inert. \n - ICU-specific property for characters that are inert under NFKD, i.e., they do not interact with adjacent characters. - */ - I18N_UCHAR_NFC_INERT, - /**< Binary property NFC_Inert. \n - ICU-specific property for characters that are inert under NFC, i.e., they do not interact with adjacent characters. - */ - I18N_UCHAR_NFKC_INERT, - /**< Binary property NFKC_Inert. \n - ICU-specific property for characters that are inert under NFKC, i.e., they do not interact with adjacent characters. - */ - I18N_UCHAR_SEGMENT_STARTER, - /**< Binary Property Segment_Starter. \n - Property for characters that are starters in terms of Unicode normalization and combining character sequences. - They have ccc=0 and do not occur in non-initial position of the canonical decomposition of any character - (like a-umlaut in NFD and a Jamo T in an NFD(Hangul LVT)). - */ - I18N_UCHAR_PATTERN_SYNTAX, - /**< Binary property Pattern_Syntax (new in Unicode 4.1). \n - */ - I18N_UCHAR_PATTERN_WHITE_SPACE, - /**< Binary property Pattern_White_Space (new in Unicode 4.1). \n - */ - I18N_UCHAR_POSIX_ALNUM, - /**< Binary property alnum (a C/POSIX character class).*/ - I18N_UCHAR_POSIX_BLANK, - /**< Binary property blank (a C/POSIX character class).*/ - I18N_UCHAR_POSIX_GRAPH, - /**< Binary property graph (a C/POSIX character class). */ - I18N_UCHAR_POSIX_PRINT, - /**< Binary property print (a C/POSIX character class). */ - I18N_UCHAR_POSIX_XDIGIT, - /**< Binary property xdigit (a C/POSIX character class). */ - I18N_UCHAR_CASED, - /**< Binary property Cased. \n - For Lowercase, Uppercase and Titlecase characters. - */ - I18N_UCHAR_CASE_IGNORABLE, - /**< Binary property Case_Ignorable. \n - Used in context-sensitive case mappings. - */ - I18N_UCHAR_CHANGES_WHEN_LOWERCASED, - /**< Binary property Changes_When_Lowercased. */ - I18N_UCHAR_CHANGES_WHEN_UPPERCASED, - /**< Binary property Changes_When_Uppercased. */ - I18N_UCHAR_CHANGES_WHEN_TITLECASED, - /**< Binary property Changes_When_Titlecased. */ - I18N_UCHAR_CHANGES_WHEN_CASEFOLDED, - /**< Binary property Changes_When_Casefolded. */ - I18N_UCHAR_CHANGES_WHEN_CASEMAPPED, - /**< Binary property Changes_When_Casemapped. */ - I18N_UCHAR_CHANGES_WHEN_NFKC_CASEFOLDED, - /**< Binary property Changes_When_NFKC_Casefolded. */ - I18N_UCHAR_BINARY_LIMIT, - /**< One more than the last constant for binary Unicode properties. */ - I18N_UCHAR_BIDI_CLASS = 0x1000, - /**< Enumerated property Bidi_Class. \n - Same as u_charDirection, returns #i18n_uchar_direction_e values. - */ - I18N_UCHAR_INT_START = I18N_UCHAR_BIDI_CLASS, - /**< First constant for enumerated/integer Unicode properties. */ - I18N_UCHAR_BLOCK, - /**< Enumerated property Block. \n - Returns #i18n_uchar_ublock_code_e values. - */ - I18N_UCHAR_CANONICAL_COMBINING_CLASS, - /**< Enumerated property Canonical_Combining_Class. \n - Returns 8-bit numeric values. - */ - I18N_UCHAR_DECOMPOSITION_TYPE, - /**< Enumerated property Decomposition_Type. \n - Returns #i18n_uchar_u_decomposition_type_e values. - */ - I18N_UCHAR_EAST_ASIAN_WIDTH, - /**< Enumerated property East_Asian_Width. \n - Returns #i18n_uchar_u_east_asian_width_e values. - */ - I18N_UCHAR_GENERAL_CATEGORY, - /**< Enumerated property General_Category. \n - Returns #i18n_uchar_category_e values. - */ - I18N_UCHAR_JOINING_GROUP, - /**< Enumerated property Joining_Group. \n - Returns #i18n_uchar_u_joining_group_e values. - */ - I18N_UCHAR_JOINING_TYPE, - /**< Enumerated property Joining_Type. \n - Returns #i18n_uchar_u_joining_type_e values. - */ - I18N_UCHAR_LINE_BREAK, - /**< Enumerated property Line_Break. \n - Returns #i18n_uchar_u_line_break_e values. - */ - I18N_UCHAR_NUMERIC_TYPE, - /**< Enumerated property Numeric_Type. \n - Returns #i18n_uchar_u_numeric_type_e values. - */ - I18N_UCHAR_SCRIPT, - /**< Enumerated property Script. \n - Returns #i18n_uscript_code_e values. - */ - I18N_UCHAR_HANGUL_SYLLABLE_TYPE, - /**< Enumerated property Hangul_Syllable_Type, new in Unicode 4. \n - Returns #i18n_uchar_u_hangul_syllable_type_e values. - */ - I18N_UCHAR_NFD_QUICK_CHECK, - /**< Enumerated property NFD_Quick_Check. \n - Returns #i18n_unormalization_check_result_e values. - */ - I18N_UCHAR_NFKD_QUICK_CHECK, - /**< Enumerated property NFKD_Quick_Check. \n - Returns #i18n_unormalization_check_result_e values. - */ - I18N_UCHAR_NFC_QUICK_CHECK, - /**< Enumerated property NFC_Quick_Check. \n - Returns #i18n_unormalization_check_result_e values. - */ - I18N_UCHAR_NFKC_QUICK_CHECK, - /**< Enumerated property NFKC_Quick_Check. \n - Returns #i18n_unormalization_check_result_e values. - */ - I18N_UCHAR_LEAD_CANONICAL_COMBINING_CLASS, - /**< Enumerated property Lead_Canonical_Combining_Class. \n - Returns 8-bit numeric values like #UCHAR_CANONICAL_COMBINING_CLASS. - */ - I18N_UCHAR_TRAIL_CANONICAL_COMBINING_CLASS, - /**< Enumerated property Trail_Canonical_Combining_Class. \n - Returns 8-bit numeric values like #UCHAR_CANONICAL_COMBINING_CLASS. - */ - I18N_UCHAR_GRAPHEME_CLUSTER_BREAK, - /**< Enumerated property Grapheme_Cluster_Break (new in Unicode 4.1). \n - Returns #i18n_uchar_u_grapheme_cluster_break_e values. - */ - I18N_UCHAR_SENTENCE_BREAK, - /**< Enumerated property Sentence_Break (new in Unicode 4.1). \n - Returns #i18n_uchar_u_sentence_break_e values. - */ - I18N_UCHAR_WORD_BREAK, - /**< Enumerated property Word_Break (new in Unicode 4.1). \n - Returns #i18n_uchar_u_word_break_values_e values. - */ - I18N_UCHAR_BIDI_PAIRED_BRACKET_TYPE, - /**< Enumerated property Bidi_Paired_Bracket_Type. \n - Returns #i18n_uchar_u_bidi_paired_bracket_type_e values . - */ - I18N_UCHAR_INT_LIMIT, - /**< One more than the last constant for enumerated/integer Unicode properties. */ - I18N_UCHAR_GENERAL_CATEGORY_MASK = 0x2000, - /**< Bitmask property General_Category_Mask. \n - Mask values should be cast to uint32_t. - */ - I18N_UCHAR_MASK_START = I18N_UCHAR_GENERAL_CATEGORY_MASK, - /**< First constant for bit-mask Unicode properties. */ - I18N_UCHAR_MASK_LIMIT, - /**< One more than the last constant for bit-mask Unicode properties. */ - I18N_UCHAR_NUMERIC_VALUE = 0x3000, - /**< Double property Numeric_Value. */ - I18N_UCHAR_DOUBLE_START = I18N_UCHAR_NUMERIC_VALUE, - /**< First constant for double Unicode properties. */ - I18N_UCHAR_DOUBLE_LIMIT, - /**< One more than the last constant for double Unicode properties. */ - I18N_UCHAR_AGE = 0x4000, - /**< String property Age. */ - I18N_UCHAR_STRING_START = I18N_UCHAR_AGE, - /**< First constant for string Unicode properties. */ - I18N_UCHAR_BIDI_MIRRORING_GLYPH, - /**< String property Bidi_Mirroring_Glyph. */ - I18N_UCHAR_CASE_FOLDING, - /**< String property Case_Folding. */ - I18N_UCHAR_LOWERCASE_MAPPING = 0x4004, - /**< String property Lowercase_Mapping. */ - I18N_UCHAR_NAME, - /**< String property Name. */ - I18N_UCHAR_SIMPLE_CASE_FOLDING, - /**< String property Simple_Case_Folding. */ - I18N_UCHAR_SIMPLE_LOWERCASE_MAPPING, - /**< String property Simple_Lowercase_Mapping. */ - I18N_UCHAR_SIMPLE_TITLECASE_MAPPING, - /**< String property Simple_Titlecase_Mapping. */ - I18N_UCHAR_SIMPLE_UPPERCASE_MAPPING, - /**< String property Simple_Uppercase_Mapping. */ - I18N_UCHAR_TITLECASE_MAPPING, - /**< String property Titlecase_Mapping. */ - I18N_UCHAR_UPPERCASE_MAPPING = 0x400C, - /**< String property Uppercase_Mapping. */ - I18N_UCHAR_BIDI_PAIRED_BRACKET = 0x400D, - /**< String property Bidi_Paired_Bracket. */ - I18N_UCHAR_STRING_LIMIT, - /**< One more than the last constant for string Unicode properties. */ - I18N_UCHAR_SCRIPT_EXTENSIONS = 0x7000, - /**< Provisional property Script_Extensions (new in Unicode 6.0). */ - I18N_UCHAR_OTHER_PROPERTY_START = I18N_UCHAR_SCRIPT_EXTENSIONS, - /**< First constant for Unicode properties with unusual value types. */ - I18N_UCHAR_OTHER_PROPERTY_LIMIT, - /**< One more than the last constant for Unicode properties with unusual value types. */ - I18N_UCHAR_INVALID_CODE = -1 - /**< Represents a nonexistent or invalid property or property value. */ + I18N_UCHAR_ALPHABETIC = 0, + /**< Binary property Alphabetic. \n + Lu+Ll+Lt+Lm+Lo+Nl+Other_Alphabetic + */ + I18N_UCHAR_BINARY_START = I18N_UCHAR_ALPHABETIC, + /**< First constant for binary Unicode properties. */ + I18N_UCHAR_ASCII_HEX_DIGIT, + /**< Binary property ASCII_Hex_Digit. \n + 0-9 A-F a-f + */ + I18N_UCHAR_BIDI_CONTROL, + /**< Binary property Bidi_Control. \n + Format controls which have specific functions in the Bidi Algorithm. + */ + I18N_UCHAR_BIDI_MIRRORED, + /**< Binary property Bidi_Mirrored. \n + Characters that may change display in RTL text. See Bidi Algorithm, UTR 9. + */ + I18N_UCHAR_DASH, + /**< Binary property Dash. \n + Variations of dashes. + */ + I18N_UCHAR_DEFAULT_IGNORABLE_CODE_POINT, + /**< Binary property Default_Ignorable_Code_Point (new in Unicode 3.2). \n + Ignorable in most processing. <2060..206F, FFF0..FFFB, E0000..E0FFF>+Other_Default_Ignorable_Code_Point+(Cf+Cc+Cs-White_Space) + */ + I18N_UCHAR_DEPRECATED, + /**< Binary property Deprecated (new in Unicode 3.2). \n + The usage of deprecated characters is strongly discouraged. + */ + I18N_UCHAR_DIACRITIC, + /**< Binary property Diacritic. \n + Characters that linguistically modify the meaning of another character to which they apply. + */ + I18N_UCHAR_EXTENDER, + /**< Binary property Extender. \n + Extend the value or shape of a preceding alphabetic character, e.g. length and iteration marks. + */ + I18N_UCHAR_FULL_COMPOSITION_EXCLUSION, + /**< Binary property Full_Composition_Exclusion. \n + CompositionExclusions.txt+Singleton Decompositions+ Non-Starter Decompositions. + */ + I18N_UCHAR_GRAPHEME_BASE, + /**< Binary property Grapheme_Base (new in Unicode 3.2). \n + For programmatic determination of grapheme cluster boundaries. [0..10FFFF]-Cc-Cf-Cs-Co-Cn-Zl-Zp-Grapheme_Link-Grapheme_Extend-CGJ + */ + I18N_UCHAR_GRAPHEME_EXTEND, + /**< Binary property Grapheme_Extend (new in Unicode 3.2). \n + For programmatic determination of grapheme cluster boundaries. Me+Mn+Mc+Other_Grapheme_Extend-Grapheme_Link-CGJ + */ + I18N_UCHAR_GRAPHEME_LINK, + /**< Binary property Grapheme_Link (new in Unicode 3.2). \n + For programmatic determination of grapheme cluster boundaries. + */ + I18N_UCHAR_HEX_DIGIT, + /**< Binary property Hex_Digit. \n + Characters commonly used for hexadecimal numbers. + */ + I18N_UCHAR_HYPHEN, + /**< Binary property Hyphen. \n + Dashes used to mark connections between pieces of words, plus the Katakana middle dot. + */ + I18N_UCHAR_ID_CONTINUE, + /**< Binary property ID_Continue. \n + Characters that can continue an identifier. DerivedCoreProperties.txt also says "NOTE: Cf characters should be filtered out." ID_Start+Mn+Mc+Nd+Pc + */ + I18N_UCHAR_ID_START, + /**< Binary property ID_Start. \n + Characters that can start an identifier. Lu+Ll+Lt+Lm+Lo+Nl + */ + I18N_UCHAR_IDEOGRAPHIC, + /**< Binary property Ideographic. \n + CJKV ideographs. + */ + I18N_UCHAR_IDS_BINARY_OPERATOR, + /**< Binary property IDS_Binary_Operator (new in Unicode 3.2). \n + For programmatic determination of Ideographic Description Sequences. + */ + I18N_UCHAR_IDS_TRINARY_OPERATOR, + /**< Binary property IDS_Trinary_Operator (new in Unicode 3.2). \n + For programmatic determination of Ideographic Description Sequences. + */ + I18N_UCHAR_JOIN_CONTROL, + /**< Binary property Join_Control. \n + Format controls for cursive joining and ligation. + */ + I18N_UCHAR_LOGICAL_ORDER_EXCEPTION, + /**< Binary property Logical_Order_Exception (new in Unicode 3.2). \n + Characters that do not use logical order and require special handling in most processing. + */ + I18N_UCHAR_LOWERCASE, + /**< Binary property Lowercase. \n + Ll+Other_Lowercase + */ + I18N_UCHAR_MATH, + /**< Binary property Math. \n + Sm+Other_Math + */ + I18N_UCHAR_NONCHARACTER_CODE_POINT, + /**< Binary property Noncharacter_Code_Point. \n + Code points that are explicitly defined as illegal for the encoding of characters. + */ + I18N_UCHAR_QUOTATION_MARK, + /**< Binary property Quotation_Mark. \n + */ + I18N_UCHAR_RADICAL, + /**< Binary property Radical (new in Unicode 3.2). \n + For programmatic determination of Ideographic Description Sequences. + */ + I18N_UCHAR_SOFT_DOTTED, + /**< Binary property Soft_Dotted (new in Unicode 3.2). \n + Characters with a "soft dot", like i or j. An accent placed on these characters causes the dot to disappear. + */ + I18N_UCHAR_TERMINAL_PUNCTUATION, + /**< Binary property Terminal_Punctuation. \n + Punctuation characters that generally mark the end of textual units. + */ + I18N_UCHAR_UNIFIED_IDEOGRAPH, + /**< Binary property Unified_Ideograph (new in Unicode 3.2). \n + For programmatic determination of Ideographic Description Sequences. + */ + I18N_UCHAR_UPPERCASE, + /**< Binary property Uppercase. \n + Lu+Other_Uppercase + */ + I18N_UCHAR_WHITE_SPACE, + /**< Binary property White_Space. \n + Space characters+TAB+CR+LF-ZWSP-ZWNBSP + */ + I18N_UCHAR_XID_CONTINUE, + /**< Binary property XID_Continue. \n + ID_Continue modified to allow closure under normalization forms NFKC and NFKD. + */ + I18N_UCHAR_XID_START, + /**< Binary property XID_Start. \n + ID_Start modified to allow closure under normalization forms NFKC and NFKD. + */ + I18N_UCHAR_CASE_SENSITIVE, + /**< Binary property Case_Sensitive. \n + Either the source of a case mapping or in the target of a case mapping. Not the same as the general category Cased_Letter. + */ + I18N_UCHAR_S_TERM, + /**< Binary property STerm (new in Unicode 4.0.1). \n + */ + I18N_UCHAR_VARIATION_SELECTOR, + /**< Binary property Variation_Selector (new in Unicode 4.0.1). \n + Indicates all those characters that qualify as Variation Selectors. + */ + I18N_UCHAR_NFD_INERT, + /**< Binary property NFD_Inert. \n + ICU-specific property for characters that are inert under NFD, i.e., they do not interact with adjacent characters. + */ + I18N_UCHAR_NFKD_INERT, + /**< Binary property NFKD_Inert. \n + ICU-specific property for characters that are inert under NFKD, i.e., they do not interact with adjacent characters. + */ + I18N_UCHAR_NFC_INERT, + /**< Binary property NFC_Inert. \n + ICU-specific property for characters that are inert under NFC, i.e., they do not interact with adjacent characters. + */ + I18N_UCHAR_NFKC_INERT, + /**< Binary property NFKC_Inert. \n + ICU-specific property for characters that are inert under NFKC, i.e., they do not interact with adjacent characters. + */ + I18N_UCHAR_SEGMENT_STARTER, + /**< Binary Property Segment_Starter. \n + Property for characters that are starters in terms of Unicode normalization and combining character sequences. + They have ccc=0 and do not occur in non-initial position of the canonical decomposition of any character + (like a-umlaut in NFD and a Jamo T in an NFD(Hangul LVT)). + */ + I18N_UCHAR_PATTERN_SYNTAX, + /**< Binary property Pattern_Syntax (new in Unicode 4.1). \n + */ + I18N_UCHAR_PATTERN_WHITE_SPACE, + /**< Binary property Pattern_White_Space (new in Unicode 4.1). \n + */ + I18N_UCHAR_POSIX_ALNUM, + /**< Binary property alnum (a C/POSIX character class).*/ + I18N_UCHAR_POSIX_BLANK, + /**< Binary property blank (a C/POSIX character class).*/ + I18N_UCHAR_POSIX_GRAPH, + /**< Binary property graph (a C/POSIX character class). */ + I18N_UCHAR_POSIX_PRINT, + /**< Binary property print (a C/POSIX character class). */ + I18N_UCHAR_POSIX_XDIGIT, + /**< Binary property xdigit (a C/POSIX character class). */ + I18N_UCHAR_CASED, + /**< Binary property Cased. \n + For Lowercase, Uppercase and Titlecase characters. + */ + I18N_UCHAR_CASE_IGNORABLE, + /**< Binary property Case_Ignorable. \n + Used in context-sensitive case mappings. + */ + I18N_UCHAR_CHANGES_WHEN_LOWERCASED, + /**< Binary property Changes_When_Lowercased. */ + I18N_UCHAR_CHANGES_WHEN_UPPERCASED, + /**< Binary property Changes_When_Uppercased. */ + I18N_UCHAR_CHANGES_WHEN_TITLECASED, + /**< Binary property Changes_When_Titlecased. */ + I18N_UCHAR_CHANGES_WHEN_CASEFOLDED, + /**< Binary property Changes_When_Casefolded. */ + I18N_UCHAR_CHANGES_WHEN_CASEMAPPED, + /**< Binary property Changes_When_Casemapped. */ + I18N_UCHAR_CHANGES_WHEN_NFKC_CASEFOLDED, + /**< Binary property Changes_When_NFKC_Casefolded. */ + I18N_UCHAR_BINARY_LIMIT, + /**< One more than the last constant for binary Unicode properties. */ + I18N_UCHAR_BIDI_CLASS = 0x1000, + /**< Enumerated property Bidi_Class. \n + Same as u_charDirection, returns #i18n_uchar_direction_e values. + */ + I18N_UCHAR_INT_START = I18N_UCHAR_BIDI_CLASS, + /**< First constant for enumerated/integer Unicode properties. */ + I18N_UCHAR_BLOCK, + /**< Enumerated property Block. \n + Returns #i18n_uchar_ublock_code_e values. + */ + I18N_UCHAR_CANONICAL_COMBINING_CLASS, + /**< Enumerated property Canonical_Combining_Class. \n + Returns 8-bit numeric values. + */ + I18N_UCHAR_DECOMPOSITION_TYPE, + /**< Enumerated property Decomposition_Type. \n + Returns #i18n_uchar_u_decomposition_type_e values. + */ + I18N_UCHAR_EAST_ASIAN_WIDTH, + /**< Enumerated property East_Asian_Width. \n + Returns #i18n_uchar_u_east_asian_width_e values. + */ + I18N_UCHAR_GENERAL_CATEGORY, + /**< Enumerated property General_Category. \n + Returns #i18n_uchar_category_e values. + */ + I18N_UCHAR_JOINING_GROUP, + /**< Enumerated property Joining_Group. \n + Returns #i18n_uchar_u_joining_group_e values. + */ + I18N_UCHAR_JOINING_TYPE, + /**< Enumerated property Joining_Type. \n + Returns #i18n_uchar_u_joining_type_e values. + */ + I18N_UCHAR_LINE_BREAK, + /**< Enumerated property Line_Break. \n + Returns #i18n_uchar_u_line_break_e values. + */ + I18N_UCHAR_NUMERIC_TYPE, + /**< Enumerated property Numeric_Type. \n + Returns #i18n_uchar_u_numeric_type_e values. + */ + I18N_UCHAR_SCRIPT, + /**< Enumerated property Script. \n + Returns #i18n_uscript_code_e values. + */ + I18N_UCHAR_HANGUL_SYLLABLE_TYPE, + /**< Enumerated property Hangul_Syllable_Type, new in Unicode 4. \n + Returns #i18n_uchar_u_hangul_syllable_type_e values. + */ + I18N_UCHAR_NFD_QUICK_CHECK, + /**< Enumerated property NFD_Quick_Check. \n + Returns #i18n_unormalization_check_result_e values. + */ + I18N_UCHAR_NFKD_QUICK_CHECK, + /**< Enumerated property NFKD_Quick_Check. \n + Returns #i18n_unormalization_check_result_e values. + */ + I18N_UCHAR_NFC_QUICK_CHECK, + /**< Enumerated property NFC_Quick_Check. \n + Returns #i18n_unormalization_check_result_e values. + */ + I18N_UCHAR_NFKC_QUICK_CHECK, + /**< Enumerated property NFKC_Quick_Check. \n + Returns #i18n_unormalization_check_result_e values. + */ + I18N_UCHAR_LEAD_CANONICAL_COMBINING_CLASS, + /**< Enumerated property Lead_Canonical_Combining_Class. \n + Returns 8-bit numeric values like #UCHAR_CANONICAL_COMBINING_CLASS. + */ + I18N_UCHAR_TRAIL_CANONICAL_COMBINING_CLASS, + /**< Enumerated property Trail_Canonical_Combining_Class. \n + Returns 8-bit numeric values like #UCHAR_CANONICAL_COMBINING_CLASS. + */ + I18N_UCHAR_GRAPHEME_CLUSTER_BREAK, + /**< Enumerated property Grapheme_Cluster_Break (new in Unicode 4.1). \n + Returns #i18n_uchar_u_grapheme_cluster_break_e values. + */ + I18N_UCHAR_SENTENCE_BREAK, + /**< Enumerated property Sentence_Break (new in Unicode 4.1). \n + Returns #i18n_uchar_u_sentence_break_e values. + */ + I18N_UCHAR_WORD_BREAK, + /**< Enumerated property Word_Break (new in Unicode 4.1). \n + Returns #i18n_uchar_u_word_break_values_e values. + */ + I18N_UCHAR_BIDI_PAIRED_BRACKET_TYPE, + /**< Enumerated property Bidi_Paired_Bracket_Type. \n + Returns #i18n_uchar_u_bidi_paired_bracket_type_e values . + */ + I18N_UCHAR_INT_LIMIT, + /**< One more than the last constant for enumerated/integer Unicode properties. */ + I18N_UCHAR_GENERAL_CATEGORY_MASK = 0x2000, + /**< Bitmask property General_Category_Mask. \n + Mask values should be cast to uint32_t. + */ + I18N_UCHAR_MASK_START = I18N_UCHAR_GENERAL_CATEGORY_MASK, + /**< First constant for bit-mask Unicode properties. */ + I18N_UCHAR_MASK_LIMIT, + /**< One more than the last constant for bit-mask Unicode properties. */ + I18N_UCHAR_NUMERIC_VALUE = 0x3000, + /**< Double property Numeric_Value. */ + I18N_UCHAR_DOUBLE_START = I18N_UCHAR_NUMERIC_VALUE, + /**< First constant for double Unicode properties. */ + I18N_UCHAR_DOUBLE_LIMIT, + /**< One more than the last constant for double Unicode properties. */ + I18N_UCHAR_AGE = 0x4000, + /**< String property Age. */ + I18N_UCHAR_STRING_START = I18N_UCHAR_AGE, + /**< First constant for string Unicode properties. */ + I18N_UCHAR_BIDI_MIRRORING_GLYPH, + /**< String property Bidi_Mirroring_Glyph. */ + I18N_UCHAR_CASE_FOLDING, + /**< String property Case_Folding. */ + I18N_UCHAR_LOWERCASE_MAPPING = 0x4004, + /**< String property Lowercase_Mapping. */ + I18N_UCHAR_NAME, + /**< String property Name. */ + I18N_UCHAR_SIMPLE_CASE_FOLDING, + /**< String property Simple_Case_Folding. */ + I18N_UCHAR_SIMPLE_LOWERCASE_MAPPING, + /**< String property Simple_Lowercase_Mapping. */ + I18N_UCHAR_SIMPLE_TITLECASE_MAPPING, + /**< String property Simple_Titlecase_Mapping. */ + I18N_UCHAR_SIMPLE_UPPERCASE_MAPPING, + /**< String property Simple_Uppercase_Mapping. */ + I18N_UCHAR_TITLECASE_MAPPING, + /**< String property Titlecase_Mapping. */ + I18N_UCHAR_UPPERCASE_MAPPING = 0x400C, + /**< String property Uppercase_Mapping. */ + I18N_UCHAR_BIDI_PAIRED_BRACKET = 0x400D, + /**< String property Bidi_Paired_Bracket. */ + I18N_UCHAR_STRING_LIMIT, + /**< One more than the last constant for string Unicode properties. */ + I18N_UCHAR_SCRIPT_EXTENSIONS = 0x7000, + /**< Provisional property Script_Extensions (new in Unicode 6.0). */ + I18N_UCHAR_OTHER_PROPERTY_START = I18N_UCHAR_SCRIPT_EXTENSIONS, + /**< First constant for Unicode properties with unusual value types. */ + I18N_UCHAR_OTHER_PROPERTY_LIMIT, + /**< One more than the last constant for Unicode properties with unusual value types. */ + I18N_UCHAR_INVALID_CODE = -1 + /**< Represents a nonexistent or invalid property or property value. */ } i18n_uchar_uproperty_e; /** @@ -588,11 +588,11 @@ typedef enum { * */ typedef enum { - I18N_UCHAR_U_BPT_NONE, /**< Not a paired bracket. */ + I18N_UCHAR_U_BPT_NONE, /**< Not a paired bracket. */ - I18N_UCHAR_U_BPT_OPEN, /**< Open paired bracket. */ + I18N_UCHAR_U_BPT_OPEN, /**< Open paired bracket. */ - I18N_UCHAR_U_BPT_CLOSE, /**< Close paired bracket. */ + I18N_UCHAR_U_BPT_CLOSE, /**< Close paired bracket. */ I18N_UCHAR_U_BPT_COUNT /**< Count */ } i18n_uchar_u_bidi_paired_bracket_type_e; @@ -603,253 +603,253 @@ typedef enum { * */ typedef enum { - I18N_UCHAR_UBLOCK_NO_BLOCK, /**< No Block */ - I18N_UCHAR_UBLOCK_BASIC_LATIN, /**< Basic Latin */ - I18N_UCHAR_UBLOCK_LATIN_1_SUPPLEMENT, /**< Latin_1 Supplement */ - I18N_UCHAR_UBLOCK_LATIN_EXTENDED_A, /**< Latin Extended A */ - I18N_UCHAR_UBLOCK_LATIN_EXTENDED_B, /**< Latin Extended B */ - I18N_UCHAR_UBLOCK_IPA_EXTENSIONS, /**< IPA Extensions */ - I18N_UCHAR_UBLOCK_SPACING_MODIFIER_LETTERS, /**< Spacing Modifier Letters */ - I18N_UCHAR_UBLOCK_COMBINING_DIACRITICAL_MARKS, /**< Combining Diacritical Marks */ - I18N_UCHAR_UBLOCK_GREEK, /**< Greek */ - I18N_UCHAR_UBLOCK_CYRILLIC, /**< Cyrillic */ - I18N_UCHAR_UBLOCK_ARMENIAN, /**< Armenian */ - I18N_UCHAR_UBLOCK_HEBREW, /**< Hebrew */ - I18N_UCHAR_UBLOCK_ARABIC, /**< Arabic */ - I18N_UCHAR_UBLOCK_SYRIAC, /**< Syriac */ - I18N_UCHAR_UBLOCK_THAANA, /**< Thaana */ - I18N_UCHAR_UBLOCK_DEVANAGARI, /**< Devanagari */ - I18N_UCHAR_UBLOCK_BENGALI, /**< Bengali */ - I18N_UCHAR_UBLOCK_GURMUKHI, /**< Gurmukhi */ - I18N_UCHAR_UBLOCK_GUJARATI, /**< Gujarati */ - I18N_UCHAR_UBLOCK_ORIYA, /**< Oriya */ - I18N_UCHAR_UBLOCK_TAMIL, /**< Tamil */ - I18N_UCHAR_UBLOCK_TELUGU, /**< Telugu */ - I18N_UCHAR_UBLOCK_KANNADA, /**< Kannada */ - I18N_UCHAR_UBLOCK_MALAYALAM, /**< Malayalam */ - I18N_UCHAR_UBLOCK_SINHALA, /**< Sinhala */ - I18N_UCHAR_UBLOCK_THAI, /**< Thai */ - I18N_UCHAR_UBLOCK_LAO, /**< Lao */ - I18N_UCHAR_UBLOCK_TIBETAN, /**< Tibetan */ - I18N_UCHAR_UBLOCK_MYANMAR, /**< Myanmar */ - I18N_UCHAR_UBLOCK_GEORGIAN, /**< Georgian */ - I18N_UCHAR_UBLOCK_HANGUL_JAMO, /**< Hangul Jamo */ - I18N_UCHAR_UBLOCK_ETHIOPIC, /**< Ethiopic */ - I18N_UCHAR_UBLOCK_CHEROKEE, /**< Cherokee */ - I18N_UCHAR_UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS, /**< Unified Canadian Aboriginal Syllabics */ - I18N_UCHAR_UBLOCK_OGHAM, /**< Ogham */ - I18N_UCHAR_UBLOCK_RUNIC, /**< Runic */ - I18N_UCHAR_UBLOCK_KHMER, /**< Khmer */ - I18N_UCHAR_UBLOCK_MONGOLIAN, /**< Mongolian */ - I18N_UCHAR_UBLOCK_LATIN_EXTENDED_ADDITIONAL, /**< Latin Extended Additional */ - I18N_UCHAR_UBLOCK_GREEK_EXTENDED, /**< Greek Extended */ - I18N_UCHAR_UBLOCK_GENERAL_PUNCTUATION, /**< General Punctuation */ - I18N_UCHAR_UBLOCK_SUPERSCRIPTS_AND_SUBSCRIPTS, /**< Superscripts And Subscripts */ - I18N_UCHAR_UBLOCK_CURRENCY_SYMBOLS, /**< Currency Symbols */ - I18N_UCHAR_UBLOCK_COMBINING_MARKS_FOR_SYMBOLS, /**< Combining Marks For Symbols */ - I18N_UCHAR_UBLOCK_LETTERLIKE_SYMBOLS, /**< Letterlike Symbols */ - I18N_UCHAR_UBLOCK_NUMBER_FORMS, /**< Number Forms */ - I18N_UCHAR_UBLOCK_ARROWS, /**< Arrows */ - I18N_UCHAR_UBLOCK_MATHEMATICAL_OPERATORS, /**< Mathematical Operators */ - I18N_UCHAR_UBLOCK_MISCELLANEOUS_TECHNICAL, /**< Miscellaneous Technical */ - I18N_UCHAR_UBLOCK_CONTROL_PICTURES, /**< Control Pictures */ - I18N_UCHAR_UBLOCK_OPTICAL_CHARACTER_RECOGNITION, /**< Optical Character Recognition */ - I18N_UCHAR_UBLOCK_ENCLOSED_ALPHANUMERICS, /**< Enclosed Alphanumerics */ - I18N_UCHAR_UBLOCK_BOX_DRAWING, /**< Box Drawing */ - I18N_UCHAR_UBLOCK_BLOCK_ELEMENTS, /**< Block Elements */ - I18N_UCHAR_UBLOCK_GEOMETRIC_SHAPES, /**< Geometric Shapes */ - I18N_UCHAR_UBLOCK_MISCELLANEOUS_SYMBOLS, /**< Miscellaneous Symbols */ - I18N_UCHAR_UBLOCK_DINGBATS, /**< Dingbats */ - I18N_UCHAR_UBLOCK_BRAILLE_PATTERNS, /**< Braille Patterns */ - I18N_UCHAR_UBLOCK_CJK_RADICALS_SUPPLEMENT, /**< CJK Radicals Supplement */ - I18N_UCHAR_UBLOCK_KANGXI_RADICALS, /**< Kangxi Radicals */ - I18N_UCHAR_UBLOCK_IDEOGRAPHIC_DESCRIPTION_CHARACTERS, /**< Ideographic Description Characters */ - I18N_UCHAR_UBLOCK_CJK_SYMBOLS_AND_PUNCTUATION, /**< CJK Symbols And Punctuation */ - I18N_UCHAR_UBLOCK_HIRAGANA, /**< Hiragana */ - I18N_UCHAR_UBLOCK_KATAKANA, /**< Katakana */ - I18N_UCHAR_UBLOCK_BOPOMOFO, /**< Bopomofo */ - I18N_UCHAR_UBLOCK_HANGUL_COMPATIBILITY_JAMO, /**< Hangul Compatibility Jamo */ - I18N_UCHAR_UBLOCK_KANBUN, /**< Kanbun */ - I18N_UCHAR_UBLOCK_BOPOMOFO_EXTENDED, /**< Bopomofo Extended */ - I18N_UCHAR_UBLOCK_ENCLOSED_CJK_LETTERS_AND_MONTHS, /**< Enclosed CJK Letters And Months */ - I18N_UCHAR_UBLOCK_CJK_COMPATIBILITY, /**< CJK Compatibility */ - I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A, /**< CJK Unified Ideographs Extension A */ - I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS, /**< CJK Unified Ideographs */ - I18N_UCHAR_UBLOCK_YI_SYLLABLES, /**< Yi Syllables */ - I18N_UCHAR_UBLOCK_YI_RADICALS, /**< Yi Radicals */ - I18N_UCHAR_UBLOCK_HANGUL_SYLLABLES, /**< Hangul Syllables */ - I18N_UCHAR_UBLOCK_HIGH_SURROGATES, /**< High Surrogates */ - I18N_UCHAR_UBLOCK_HIGH_PRIVATE_USE_SURROGATES, /**< High Private Use Surrogates */ - I18N_UCHAR_UBLOCK_LOW_SURROGATES, /**< Low Surrogates */ - I18N_UCHAR_UBLOCK_PRIVATE_USE_AREA, /**< Private Use Area */ - I18N_UCHAR_UBLOCK_PRIVATE_USE, /**< Private Use */ - I18N_UCHAR_UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS, /**< CJK Compatibility Ideographs */ - - I18N_UCHAR_UBLOCK_ALPHABETIC_PRESENTATION_FORMS, /**< Alphabetic Presentation Forms */ - I18N_UCHAR_UBLOCK_ARABIC_PRESENTATION_FORMS_A, /**< Arabic Presentation Forms A */ - I18N_UCHAR_UBLOCK_COMBINING_HALF_MARKS, /**< Combining Half Marks */ - I18N_UCHAR_UBLOCK_CJK_COMPATIBILITY_FORMS, /**< CJK Compatibility Forms */ - I18N_UCHAR_UBLOCK_SMALL_FORM_VARIANTS, /**< Small Form Variants */ - I18N_UCHAR_UBLOCK_ARABIC_PRESENTATION_FORMS_B, /**< Arabic Presentation Forms B */ - I18N_UCHAR_UBLOCK_SPECIALS, /**< Specials */ - I18N_UCHAR_UBLOCK_HALFWIDTH_AND_FULLWIDTH_FORMS, /**< Halfwidth And Fullwidth Forms */ - I18N_UCHAR_UBLOCK_OLD_ITALIC, /**< Old Italic */ - I18N_UCHAR_UBLOCK_GOTHIC, /**< Gothic */ - I18N_UCHAR_UBLOCK_DESERET, /**< Deseret */ - I18N_UCHAR_UBLOCK_BYZANTINE_MUSICAL_SYMBOLS, /**< Byzantine Musical Symbols */ - I18N_UCHAR_UBLOCK_MUSICAL_SYMBOLS, /**< Musical Symbols */ - I18N_UCHAR_UBLOCK_MATHEMATICAL_ALPHANUMERIC_SYMBOLS, /**< Mathematical Alphanumeric Symbols */ - I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B, /**< CJK Unified Ideographs Extension B */ - I18N_UCHAR_UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT, /**< CJK Compatibility Ideographs Supplement */ - I18N_UCHAR_UBLOCK_TAGS, /**< Tags */ - I18N_UCHAR_UBLOCK_CYRILLIC_SUPPLEMENT, /**< Cyrillic Supplement */ - I18N_UCHAR_UBLOCK_CYRILLIC_SUPPLEMENTARY, /**< Cyrillic Supplementary */ - I18N_UCHAR_UBLOCK_TAGALOG, /**< Tagalog */ - I18N_UCHAR_UBLOCK_HANUNOO, /**< Hanunoo */ - I18N_UCHAR_UBLOCK_BUHID, /**< Buhid */ - I18N_UCHAR_UBLOCK_TAGBANWA, /**< Tagbanwa */ - I18N_UCHAR_UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A, /**< Miscellaneous Mathematical Symbols A */ - I18N_UCHAR_UBLOCK_SUPPLEMENTAL_ARROWS_A, /**< Supplemental Arrows A */ - I18N_UCHAR_UBLOCK_SUPPLEMENTAL_ARROWS_B, /**< Supplemental Arrows B */ - I18N_UCHAR_UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B, /**< Miscellaneous Mathematical Symbols B */ - I18N_UCHAR_UBLOCK_SUPPLEMENTAL_MATHEMATICAL_OPERATORS, /**< Supplemental Mathematical Operators */ - I18N_UCHAR_UBLOCK_KATAKANA_PHONETIC_EXTENSIONS, /**< Katakana Phonetic Extensions */ - I18N_UCHAR_UBLOCK_VARIATION_SELECTORS, /**< Variation Selectors */ - I18N_UCHAR_UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_A, /**< Supplementary Private Use Area A */ - I18N_UCHAR_UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_B, /**< Supplementary Private Use Area B */ - I18N_UCHAR_UBLOCK_LIMBU, /**< Limbu */ - I18N_UCHAR_UBLOCK_TAI_LE, /**< Tai Le */ - I18N_UCHAR_UBLOCK_KHMER_SYMBOLS, /**< Khmer Symbols */ - I18N_UCHAR_UBLOCK_PHONETIC_EXTENSIONS, /**< Phonetic Extensions */ - I18N_UCHAR_UBLOCK_MISCELLANEOUS_SYMBOLS_AND_ARROWS, /**< Miscellaneous Symbols And Arrows */ - I18N_UCHAR_UBLOCK_YIJING_HEXAGRAM_SYMBOLS, /**< Yijing Hexagram Symbols */ - I18N_UCHAR_UBLOCK_LINEAR_B_SYLLABARY, /**< Linear B Syllabary */ - I18N_UCHAR_UBLOCK_LINEAR_B_IDEOGRAMS, /**< Linear B Ideograms */ - I18N_UCHAR_UBLOCK_AEGEAN_NUMBERS, /**< Aegean Numbers */ - I18N_UCHAR_UBLOCK_UGARITIC, /**< Ugaritic */ - I18N_UCHAR_UBLOCK_SHAVIAN, /**< Shavian */ - I18N_UCHAR_UBLOCK_OSMANYA, /**< Osmanya */ - I18N_UCHAR_UBLOCK_CYPRIOT_SYLLABARY, /**< Cypriot Syllabary */ - I18N_UCHAR_UBLOCK_TAI_XUAN_JING_SYMBOLS, /**< Tai Xuan Jing Symbols */ - I18N_UCHAR_UBLOCK_VARIATION_SELECTORS_SUPPLEMENT, /**< Variation Selectors Supplement */ - I18N_UCHAR_UBLOCK_ANCIENT_GREEK_MUSICAL_NOTATION, /**< Ancient Greek Musical Notation */ - I18N_UCHAR_UBLOCK_ANCIENT_GREEK_NUMBERS, /**< Ancient Greek Numbers */ - I18N_UCHAR_UBLOCK_ARABIC_SUPPLEMENT, /**< Arabic Supplement */ - I18N_UCHAR_UBLOCK_BUGINESE, /**< Buginese */ - I18N_UCHAR_UBLOCK_CJK_STROKES, /**< CJK Strokes */ - I18N_UCHAR_UBLOCK_COMBINING_DIACRITICAL_MARKS_SUPPLEMENT, /**< Combining Diacritical Marks Supplement */ - I18N_UCHAR_UBLOCK_COPTIC, /**< Coptic */ - I18N_UCHAR_UBLOCK_ETHIOPIC_EXTENDED, /**< Ethiopic Extended */ - I18N_UCHAR_UBLOCK_ETHIOPIC_SUPPLEMENT, /**< Ethiopic Supplement */ - I18N_UCHAR_UBLOCK_GEORGIAN_SUPPLEMENT, /**< Georgian Supplement */ - I18N_UCHAR_UBLOCK_GLAGOLITIC, /**< Glagolitic */ - I18N_UCHAR_UBLOCK_KHAROSHTHI, /**< Kharoshthi */ - I18N_UCHAR_UBLOCK_MODIFIER_TONE_LETTERS, /**< Modifier Tone Letters */ - I18N_UCHAR_UBLOCK_NEW_TAI_LUE, /**< New Tai Lue */ - I18N_UCHAR_UBLOCK_OLD_PERSIAN, /**< Old Persian */ - I18N_UCHAR_UBLOCK_PHONETIC_EXTENSIONS_SUPPLEMENT, /**< Phonetic Extensions Supplement */ - I18N_UCHAR_UBLOCK_SUPPLEMENTAL_PUNCTUATION, /**< Supplemental Punctuation */ - I18N_UCHAR_UBLOCK_SYLOTI_NAGRI, /**< Syloti Nagri */ - I18N_UCHAR_UBLOCK_TIFINAGH, /**< Tifinagh */ - I18N_UCHAR_UBLOCK_VERTICAL_FORMS, /**< Vertical Forms */ - I18N_UCHAR_UBLOCK_NKO, /**< Nko */ - I18N_UCHAR_UBLOCK_BALINESE, /**< Balinese */ - I18N_UCHAR_UBLOCK_LATIN_EXTENDED_C, /**< Latin Extended C */ - I18N_UCHAR_UBLOCK_LATIN_EXTENDED_D, /**< Latin Extended D */ - I18N_UCHAR_UBLOCK_PHAGS_PA, /**< Phags Pa */ - I18N_UCHAR_UBLOCK_PHOENICIAN, /**< Phoenician */ - I18N_UCHAR_UBLOCK_CUNEIFORM, /**< Cuneiform */ - I18N_UCHAR_UBLOCK_CUNEIFORM_NUMBERS_AND_PUNCTUATION, /**< Cuneiform Numbers And Punctuation */ - I18N_UCHAR_UBLOCK_COUNTING_ROD_NUMERALS, /**< Counting Rod Numerals */ - I18N_UCHAR_UBLOCK_SUNDANESE, /**< Sundanese */ - I18N_UCHAR_UBLOCK_LEPCHA, /**< Lepcha */ - I18N_UCHAR_UBLOCK_OL_CHIKI, /**< Ol Chiki */ - I18N_UCHAR_UBLOCK_CYRILLIC_EXTENDED_A, /**< Cyrillic Extended A */ - I18N_UCHAR_UBLOCK_VAI, /**< Vai */ - I18N_UCHAR_UBLOCK_CYRILLIC_EXTENDED_B, /**< Cyrillic Extended B */ - I18N_UCHAR_UBLOCK_SAURASHTRA, /**< Saurashtra */ - I18N_UCHAR_UBLOCK_KAYAH_LI, /**< Kayah Li */ - I18N_UCHAR_UBLOCK_REJANG, /**< Rejang */ - I18N_UCHAR_UBLOCK_CHAM, /**< Cham */ - I18N_UCHAR_UBLOCK_ANCIENT_SYMBOLS, /**< Ancient Symbols */ - I18N_UCHAR_UBLOCK_PHAISTOS_DISC, /**< Phaistos Disc */ - I18N_UCHAR_UBLOCK_LYCIAN, /**< Lycian */ - I18N_UCHAR_UBLOCK_CARIAN, /**< Carian */ - I18N_UCHAR_UBLOCK_LYDIAN, /**< Lydian */ - I18N_UCHAR_UBLOCK_MAHJONG_TILES, /**< Mahjong Tiles */ - I18N_UCHAR_UBLOCK_DOMINO_TILES, /**< Domino Tiles */ - I18N_UCHAR_UBLOCK_SAMARITAN, /**< Samaritan */ - I18N_UCHAR_UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED, /**< Unified Canadian Aboriginal Syllabics Extended */ - I18N_UCHAR_UBLOCK_TAI_THAM, /**< Tai Tham */ - I18N_UCHAR_UBLOCK_VEDIC_EXTENSIONS, /**< Vedic Extensions */ - I18N_UCHAR_UBLOCK_LISU, /**< Lisu */ - I18N_UCHAR_UBLOCK_BAMUM, /**< Bamum */ - I18N_UCHAR_UBLOCK_COMMON_INDIC_NUMBER_FORMS, /**< Common Indic Number Forms */ - I18N_UCHAR_UBLOCK_DEVANAGARI_EXTENDED, /**< Devanagari Extended */ - I18N_UCHAR_UBLOCK_HANGUL_JAMO_EXTENDED_A, /**< Hangul Jamo Extended A */ - I18N_UCHAR_UBLOCK_JAVANESE, /**< Javanese */ - I18N_UCHAR_UBLOCK_MYANMAR_EXTENDED_A, /**< Myanmar Extended A */ - I18N_UCHAR_UBLOCK_TAI_VIET, /**< Tai Viet */ - I18N_UCHAR_UBLOCK_MEETEI_MAYEK, /**< Meetei Mayek */ - I18N_UCHAR_UBLOCK_HANGUL_JAMO_EXTENDED_B, /**< Hangul Jamo Extended B */ - I18N_UCHAR_UBLOCK_IMPERIAL_ARAMAIC, /**< Imperial Aramaic */ - I18N_UCHAR_UBLOCK_OLD_SOUTH_ARABIAN, /**< Old South Arabian */ - I18N_UCHAR_UBLOCK_AVESTAN, /**< Avestan */ - I18N_UCHAR_UBLOCK_INSCRIPTIONAL_PARTHIAN, /**< Inscriptional Parthian */ - I18N_UCHAR_UBLOCK_INSCRIPTIONAL_PAHLAVI, /**< Inscriptional Pahlavi */ - I18N_UCHAR_UBLOCK_OLD_TURKIC, /**< Old Turkic */ - I18N_UCHAR_UBLOCK_RUMI_NUMERAL_SYMBOLS, /**< Rumi Numeral Symbols */ - I18N_UCHAR_UBLOCK_KAITHI, /**< Kaithi */ - I18N_UCHAR_UBLOCK_EGYPTIAN_HIEROGLYPHS, /**< Egyptian Hieroglyphs */ - I18N_UCHAR_UBLOCK_ENCLOSED_ALPHANUMERIC_SUPPLEMENT, /**< Enclosed Alphanumeric Supplement */ - I18N_UCHAR_UBLOCK_ENCLOSED_IDEOGRAPHIC_SUPPLEMENT, /**< Enclosed Ideographic Supplement */ - I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C, /**< CJK Unified Ideographs Extension C */ - I18N_UCHAR_UBLOCK_MANDAIC, /**< Mandaic */ - I18N_UCHAR_UBLOCK_BATAK, /**< Batak */ - I18N_UCHAR_UBLOCK_ETHIOPIC_EXTENDED_A, /**< Ethiopic Extended A */ - I18N_UCHAR_UBLOCK_BRAHMI, /**< Brahmi */ - I18N_UCHAR_UBLOCK_BAMUM_SUPPLEMENT, /**< Bamum Supplement */ - I18N_UCHAR_UBLOCK_KANA_SUPPLEMENT, /**< Kana Supplement */ - I18N_UCHAR_UBLOCK_PLAYING_CARDS, /**< Playing Cards */ - I18N_UCHAR_UBLOCK_MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS, /**< Miscellaneous Symbols And Pictographs */ - I18N_UCHAR_UBLOCK_EMOTICONS, /**< Emoticons */ - I18N_UCHAR_UBLOCK_TRANSPORT_AND_MAP_SYMBOLS, /**< Transport And Map Symbols */ - I18N_UCHAR_UBLOCK_ALCHEMICAL_SYMBOLS, /**< Alchemical Symbols */ - I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D, /**< CJK Unified Ideographs Extension D */ - I18N_UCHAR_UBLOCK_BASSA_VAH = 221, /**< Bassa Vah (Since 3.0) */ - I18N_UCHAR_UBLOCK_CAUCASIAN_ALBANIAN = 222, /**< Caucasian Albanian (Since 3.0) */ - I18N_UCHAR_UBLOCK_COPTIC_EPACT_NUMBERS = 223, /**< Coptic Epact Numbers (Since 3.0) */ - I18N_UCHAR_UBLOCK_COMBINING_DIACRITICAL_MARKS_EXTENDED = 224, /**< Combining Diacritical Marks Extended (Since 3.0) */ - I18N_UCHAR_UBLOCK_DUPLOYAN = 225, /**< Duployan (Since 3.0) */ - I18N_UCHAR_UBLOCK_ELBASAN = 226, /**< Elbasan (Since 3.0) */ - I18N_UCHAR_UBLOCK_GEOMETRIC_SHAPES_EXTENDED = 227, /**< Geometric Shapes Extended (Since 3.0) */ - I18N_UCHAR_UBLOCK_GRANTHA = 228, /**< Grantha (Since 3.0) */ - I18N_UCHAR_UBLOCK_KHOJKI = 229, /**< Khojki (Since 3.0) */ - I18N_UCHAR_UBLOCK_KHUDAWADI = 230, /**< Khudawadi (Since 3.0) */ - I18N_UCHAR_UBLOCK_LATIN_EXTENDED_E = 231, /**< Latin Extended E (Since 3.0) */ - I18N_UCHAR_UBLOCK_LINEAR_A = 232, /**< Linear A (Since 3.0) */ - I18N_UCHAR_UBLOCK_MAHAJANI = 233, /**< Mahajani (Since 3.0) */ - I18N_UCHAR_UBLOCK_MANICHAEAN = 234, /**< Manichaean (Since 3.0) */ - I18N_UCHAR_UBLOCK_MENDE_KIKAKUI = 235, /**< Mende Kikakui (Since 3.0) */ - I18N_UCHAR_UBLOCK_MODI = 236, /**< Modi (Since 3.0) */ - I18N_UCHAR_UBLOCK_MRO = 237, /**< Mro (Since 3.0) */ - I18N_UCHAR_UBLOCK_MYANMAR_EXTENDED_B = 238, /**< Myanmar Extended B (Since 3.0) */ - I18N_UCHAR_UBLOCK_NABATAEAN = 239, /**< Nabataean (Since 3.0) */ - I18N_UCHAR_UBLOCK_OLD_NORTH_ARABIAN = 240, /**< Old North Arabian (Since 3.0) */ - I18N_UCHAR_UBLOCK_OLD_PERMIC = 241, /**< Old Permic (Since 3.0) */ - I18N_UCHAR_UBLOCK_ORNAMENTAL_DINGBATS = 242, /**< Ornamental Dingbats (Since 3.0) */ - I18N_UCHAR_UBLOCK_PAHAWH_HMONG = 243, /**< Pahawh Hmong (Since 3.0) */ - I18N_UCHAR_UBLOCK_PALMYRENE = 244, /**< Palmyrene (Since 3.0) */ - I18N_UCHAR_UBLOCK_PAU_CIN_HAU = 245, /**< Pau Cin Hau (Since 3.0) */ - I18N_UCHAR_UBLOCK_PSALTER_PAHLAVI = 246, /**< Psalter Pahlavi (Since 3.0) */ - I18N_UCHAR_UBLOCK_SHORTHAND_FORMAT_CONTROLS = 247, /**< Shorthand Format Controls (Since 3.0) */ - I18N_UCHAR_UBLOCK_SIDDHAM = 248, /**< Siddham (Since 3.0) */ - I18N_UCHAR_UBLOCK_SINHALA_ARCHAIC_NUMBERS = 249, /**< Sinhala Archaic Numbers (Since 3.0) */ - I18N_UCHAR_UBLOCK_SUPPLEMENTAL_ARROWS_C = 250, /**< Supplemental Arrows C (Since 3.0) */ - I18N_UCHAR_UBLOCK_TIRHUTA = 251, /**< Tirhuta (Since 3.0) */ - I18N_UCHAR_UBLOCK_WARANG_CITI = 252, /**< Warang Citi (Since 3.0) */ - I18N_UCHAR_UBLOCK_COUNT, /**< Count */ - I18N_UCHAR_UBLOCK_INVALID_CODE = -1 /**< Invalid Code */ + I18N_UCHAR_UBLOCK_NO_BLOCK, /**< No Block */ + I18N_UCHAR_UBLOCK_BASIC_LATIN, /**< Basic Latin */ + I18N_UCHAR_UBLOCK_LATIN_1_SUPPLEMENT, /**< Latin_1 Supplement */ + I18N_UCHAR_UBLOCK_LATIN_EXTENDED_A, /**< Latin Extended A */ + I18N_UCHAR_UBLOCK_LATIN_EXTENDED_B, /**< Latin Extended B */ + I18N_UCHAR_UBLOCK_IPA_EXTENSIONS, /**< IPA Extensions */ + I18N_UCHAR_UBLOCK_SPACING_MODIFIER_LETTERS, /**< Spacing Modifier Letters */ + I18N_UCHAR_UBLOCK_COMBINING_DIACRITICAL_MARKS, /**< Combining Diacritical Marks */ + I18N_UCHAR_UBLOCK_GREEK, /**< Greek */ + I18N_UCHAR_UBLOCK_CYRILLIC, /**< Cyrillic */ + I18N_UCHAR_UBLOCK_ARMENIAN, /**< Armenian */ + I18N_UCHAR_UBLOCK_HEBREW, /**< Hebrew */ + I18N_UCHAR_UBLOCK_ARABIC, /**< Arabic */ + I18N_UCHAR_UBLOCK_SYRIAC, /**< Syriac */ + I18N_UCHAR_UBLOCK_THAANA, /**< Thaana */ + I18N_UCHAR_UBLOCK_DEVANAGARI, /**< Devanagari */ + I18N_UCHAR_UBLOCK_BENGALI, /**< Bengali */ + I18N_UCHAR_UBLOCK_GURMUKHI, /**< Gurmukhi */ + I18N_UCHAR_UBLOCK_GUJARATI, /**< Gujarati */ + I18N_UCHAR_UBLOCK_ORIYA, /**< Oriya */ + I18N_UCHAR_UBLOCK_TAMIL, /**< Tamil */ + I18N_UCHAR_UBLOCK_TELUGU, /**< Telugu */ + I18N_UCHAR_UBLOCK_KANNADA, /**< Kannada */ + I18N_UCHAR_UBLOCK_MALAYALAM, /**< Malayalam */ + I18N_UCHAR_UBLOCK_SINHALA, /**< Sinhala */ + I18N_UCHAR_UBLOCK_THAI, /**< Thai */ + I18N_UCHAR_UBLOCK_LAO, /**< Lao */ + I18N_UCHAR_UBLOCK_TIBETAN, /**< Tibetan */ + I18N_UCHAR_UBLOCK_MYANMAR, /**< Myanmar */ + I18N_UCHAR_UBLOCK_GEORGIAN, /**< Georgian */ + I18N_UCHAR_UBLOCK_HANGUL_JAMO, /**< Hangul Jamo */ + I18N_UCHAR_UBLOCK_ETHIOPIC, /**< Ethiopic */ + I18N_UCHAR_UBLOCK_CHEROKEE, /**< Cherokee */ + I18N_UCHAR_UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS, /**< Unified Canadian Aboriginal Syllabics */ + I18N_UCHAR_UBLOCK_OGHAM, /**< Ogham */ + I18N_UCHAR_UBLOCK_RUNIC, /**< Runic */ + I18N_UCHAR_UBLOCK_KHMER, /**< Khmer */ + I18N_UCHAR_UBLOCK_MONGOLIAN, /**< Mongolian */ + I18N_UCHAR_UBLOCK_LATIN_EXTENDED_ADDITIONAL, /**< Latin Extended Additional */ + I18N_UCHAR_UBLOCK_GREEK_EXTENDED, /**< Greek Extended */ + I18N_UCHAR_UBLOCK_GENERAL_PUNCTUATION, /**< General Punctuation */ + I18N_UCHAR_UBLOCK_SUPERSCRIPTS_AND_SUBSCRIPTS, /**< Superscripts And Subscripts */ + I18N_UCHAR_UBLOCK_CURRENCY_SYMBOLS, /**< Currency Symbols */ + I18N_UCHAR_UBLOCK_COMBINING_MARKS_FOR_SYMBOLS, /**< Combining Marks For Symbols */ + I18N_UCHAR_UBLOCK_LETTERLIKE_SYMBOLS, /**< Letterlike Symbols */ + I18N_UCHAR_UBLOCK_NUMBER_FORMS, /**< Number Forms */ + I18N_UCHAR_UBLOCK_ARROWS, /**< Arrows */ + I18N_UCHAR_UBLOCK_MATHEMATICAL_OPERATORS, /**< Mathematical Operators */ + I18N_UCHAR_UBLOCK_MISCELLANEOUS_TECHNICAL, /**< Miscellaneous Technical */ + I18N_UCHAR_UBLOCK_CONTROL_PICTURES, /**< Control Pictures */ + I18N_UCHAR_UBLOCK_OPTICAL_CHARACTER_RECOGNITION, /**< Optical Character Recognition */ + I18N_UCHAR_UBLOCK_ENCLOSED_ALPHANUMERICS, /**< Enclosed Alphanumerics */ + I18N_UCHAR_UBLOCK_BOX_DRAWING, /**< Box Drawing */ + I18N_UCHAR_UBLOCK_BLOCK_ELEMENTS, /**< Block Elements */ + I18N_UCHAR_UBLOCK_GEOMETRIC_SHAPES, /**< Geometric Shapes */ + I18N_UCHAR_UBLOCK_MISCELLANEOUS_SYMBOLS, /**< Miscellaneous Symbols */ + I18N_UCHAR_UBLOCK_DINGBATS, /**< Dingbats */ + I18N_UCHAR_UBLOCK_BRAILLE_PATTERNS, /**< Braille Patterns */ + I18N_UCHAR_UBLOCK_CJK_RADICALS_SUPPLEMENT, /**< CJK Radicals Supplement */ + I18N_UCHAR_UBLOCK_KANGXI_RADICALS, /**< Kangxi Radicals */ + I18N_UCHAR_UBLOCK_IDEOGRAPHIC_DESCRIPTION_CHARACTERS, /**< Ideographic Description Characters */ + I18N_UCHAR_UBLOCK_CJK_SYMBOLS_AND_PUNCTUATION, /**< CJK Symbols And Punctuation */ + I18N_UCHAR_UBLOCK_HIRAGANA, /**< Hiragana */ + I18N_UCHAR_UBLOCK_KATAKANA, /**< Katakana */ + I18N_UCHAR_UBLOCK_BOPOMOFO, /**< Bopomofo */ + I18N_UCHAR_UBLOCK_HANGUL_COMPATIBILITY_JAMO, /**< Hangul Compatibility Jamo */ + I18N_UCHAR_UBLOCK_KANBUN, /**< Kanbun */ + I18N_UCHAR_UBLOCK_BOPOMOFO_EXTENDED, /**< Bopomofo Extended */ + I18N_UCHAR_UBLOCK_ENCLOSED_CJK_LETTERS_AND_MONTHS, /**< Enclosed CJK Letters And Months */ + I18N_UCHAR_UBLOCK_CJK_COMPATIBILITY, /**< CJK Compatibility */ + I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A, /**< CJK Unified Ideographs Extension A */ + I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS, /**< CJK Unified Ideographs */ + I18N_UCHAR_UBLOCK_YI_SYLLABLES, /**< Yi Syllables */ + I18N_UCHAR_UBLOCK_YI_RADICALS, /**< Yi Radicals */ + I18N_UCHAR_UBLOCK_HANGUL_SYLLABLES, /**< Hangul Syllables */ + I18N_UCHAR_UBLOCK_HIGH_SURROGATES, /**< High Surrogates */ + I18N_UCHAR_UBLOCK_HIGH_PRIVATE_USE_SURROGATES, /**< High Private Use Surrogates */ + I18N_UCHAR_UBLOCK_LOW_SURROGATES, /**< Low Surrogates */ + I18N_UCHAR_UBLOCK_PRIVATE_USE_AREA, /**< Private Use Area */ + I18N_UCHAR_UBLOCK_PRIVATE_USE, /**< Private Use */ + I18N_UCHAR_UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS, /**< CJK Compatibility Ideographs */ + + I18N_UCHAR_UBLOCK_ALPHABETIC_PRESENTATION_FORMS, /**< Alphabetic Presentation Forms */ + I18N_UCHAR_UBLOCK_ARABIC_PRESENTATION_FORMS_A, /**< Arabic Presentation Forms A */ + I18N_UCHAR_UBLOCK_COMBINING_HALF_MARKS, /**< Combining Half Marks */ + I18N_UCHAR_UBLOCK_CJK_COMPATIBILITY_FORMS, /**< CJK Compatibility Forms */ + I18N_UCHAR_UBLOCK_SMALL_FORM_VARIANTS, /**< Small Form Variants */ + I18N_UCHAR_UBLOCK_ARABIC_PRESENTATION_FORMS_B, /**< Arabic Presentation Forms B */ + I18N_UCHAR_UBLOCK_SPECIALS, /**< Specials */ + I18N_UCHAR_UBLOCK_HALFWIDTH_AND_FULLWIDTH_FORMS, /**< Halfwidth And Fullwidth Forms */ + I18N_UCHAR_UBLOCK_OLD_ITALIC, /**< Old Italic */ + I18N_UCHAR_UBLOCK_GOTHIC, /**< Gothic */ + I18N_UCHAR_UBLOCK_DESERET, /**< Deseret */ + I18N_UCHAR_UBLOCK_BYZANTINE_MUSICAL_SYMBOLS, /**< Byzantine Musical Symbols */ + I18N_UCHAR_UBLOCK_MUSICAL_SYMBOLS, /**< Musical Symbols */ + I18N_UCHAR_UBLOCK_MATHEMATICAL_ALPHANUMERIC_SYMBOLS, /**< Mathematical Alphanumeric Symbols */ + I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B, /**< CJK Unified Ideographs Extension B */ + I18N_UCHAR_UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT, /**< CJK Compatibility Ideographs Supplement */ + I18N_UCHAR_UBLOCK_TAGS, /**< Tags */ + I18N_UCHAR_UBLOCK_CYRILLIC_SUPPLEMENT, /**< Cyrillic Supplement */ + I18N_UCHAR_UBLOCK_CYRILLIC_SUPPLEMENTARY, /**< Cyrillic Supplementary */ + I18N_UCHAR_UBLOCK_TAGALOG, /**< Tagalog */ + I18N_UCHAR_UBLOCK_HANUNOO, /**< Hanunoo */ + I18N_UCHAR_UBLOCK_BUHID, /**< Buhid */ + I18N_UCHAR_UBLOCK_TAGBANWA, /**< Tagbanwa */ + I18N_UCHAR_UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A, /**< Miscellaneous Mathematical Symbols A */ + I18N_UCHAR_UBLOCK_SUPPLEMENTAL_ARROWS_A, /**< Supplemental Arrows A */ + I18N_UCHAR_UBLOCK_SUPPLEMENTAL_ARROWS_B, /**< Supplemental Arrows B */ + I18N_UCHAR_UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B, /**< Miscellaneous Mathematical Symbols B */ + I18N_UCHAR_UBLOCK_SUPPLEMENTAL_MATHEMATICAL_OPERATORS, /**< Supplemental Mathematical Operators */ + I18N_UCHAR_UBLOCK_KATAKANA_PHONETIC_EXTENSIONS, /**< Katakana Phonetic Extensions */ + I18N_UCHAR_UBLOCK_VARIATION_SELECTORS, /**< Variation Selectors */ + I18N_UCHAR_UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_A, /**< Supplementary Private Use Area A */ + I18N_UCHAR_UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_B, /**< Supplementary Private Use Area B */ + I18N_UCHAR_UBLOCK_LIMBU, /**< Limbu */ + I18N_UCHAR_UBLOCK_TAI_LE, /**< Tai Le */ + I18N_UCHAR_UBLOCK_KHMER_SYMBOLS, /**< Khmer Symbols */ + I18N_UCHAR_UBLOCK_PHONETIC_EXTENSIONS, /**< Phonetic Extensions */ + I18N_UCHAR_UBLOCK_MISCELLANEOUS_SYMBOLS_AND_ARROWS, /**< Miscellaneous Symbols And Arrows */ + I18N_UCHAR_UBLOCK_YIJING_HEXAGRAM_SYMBOLS, /**< Yijing Hexagram Symbols */ + I18N_UCHAR_UBLOCK_LINEAR_B_SYLLABARY, /**< Linear B Syllabary */ + I18N_UCHAR_UBLOCK_LINEAR_B_IDEOGRAMS, /**< Linear B Ideograms */ + I18N_UCHAR_UBLOCK_AEGEAN_NUMBERS, /**< Aegean Numbers */ + I18N_UCHAR_UBLOCK_UGARITIC, /**< Ugaritic */ + I18N_UCHAR_UBLOCK_SHAVIAN, /**< Shavian */ + I18N_UCHAR_UBLOCK_OSMANYA, /**< Osmanya */ + I18N_UCHAR_UBLOCK_CYPRIOT_SYLLABARY, /**< Cypriot Syllabary */ + I18N_UCHAR_UBLOCK_TAI_XUAN_JING_SYMBOLS, /**< Tai Xuan Jing Symbols */ + I18N_UCHAR_UBLOCK_VARIATION_SELECTORS_SUPPLEMENT, /**< Variation Selectors Supplement */ + I18N_UCHAR_UBLOCK_ANCIENT_GREEK_MUSICAL_NOTATION, /**< Ancient Greek Musical Notation */ + I18N_UCHAR_UBLOCK_ANCIENT_GREEK_NUMBERS, /**< Ancient Greek Numbers */ + I18N_UCHAR_UBLOCK_ARABIC_SUPPLEMENT, /**< Arabic Supplement */ + I18N_UCHAR_UBLOCK_BUGINESE, /**< Buginese */ + I18N_UCHAR_UBLOCK_CJK_STROKES, /**< CJK Strokes */ + I18N_UCHAR_UBLOCK_COMBINING_DIACRITICAL_MARKS_SUPPLEMENT, /**< Combining Diacritical Marks Supplement */ + I18N_UCHAR_UBLOCK_COPTIC, /**< Coptic */ + I18N_UCHAR_UBLOCK_ETHIOPIC_EXTENDED, /**< Ethiopic Extended */ + I18N_UCHAR_UBLOCK_ETHIOPIC_SUPPLEMENT, /**< Ethiopic Supplement */ + I18N_UCHAR_UBLOCK_GEORGIAN_SUPPLEMENT, /**< Georgian Supplement */ + I18N_UCHAR_UBLOCK_GLAGOLITIC, /**< Glagolitic */ + I18N_UCHAR_UBLOCK_KHAROSHTHI, /**< Kharoshthi */ + I18N_UCHAR_UBLOCK_MODIFIER_TONE_LETTERS, /**< Modifier Tone Letters */ + I18N_UCHAR_UBLOCK_NEW_TAI_LUE, /**< New Tai Lue */ + I18N_UCHAR_UBLOCK_OLD_PERSIAN, /**< Old Persian */ + I18N_UCHAR_UBLOCK_PHONETIC_EXTENSIONS_SUPPLEMENT, /**< Phonetic Extensions Supplement */ + I18N_UCHAR_UBLOCK_SUPPLEMENTAL_PUNCTUATION, /**< Supplemental Punctuation */ + I18N_UCHAR_UBLOCK_SYLOTI_NAGRI, /**< Syloti Nagri */ + I18N_UCHAR_UBLOCK_TIFINAGH, /**< Tifinagh */ + I18N_UCHAR_UBLOCK_VERTICAL_FORMS, /**< Vertical Forms */ + I18N_UCHAR_UBLOCK_NKO, /**< Nko */ + I18N_UCHAR_UBLOCK_BALINESE, /**< Balinese */ + I18N_UCHAR_UBLOCK_LATIN_EXTENDED_C, /**< Latin Extended C */ + I18N_UCHAR_UBLOCK_LATIN_EXTENDED_D, /**< Latin Extended D */ + I18N_UCHAR_UBLOCK_PHAGS_PA, /**< Phags Pa */ + I18N_UCHAR_UBLOCK_PHOENICIAN, /**< Phoenician */ + I18N_UCHAR_UBLOCK_CUNEIFORM, /**< Cuneiform */ + I18N_UCHAR_UBLOCK_CUNEIFORM_NUMBERS_AND_PUNCTUATION, /**< Cuneiform Numbers And Punctuation */ + I18N_UCHAR_UBLOCK_COUNTING_ROD_NUMERALS, /**< Counting Rod Numerals */ + I18N_UCHAR_UBLOCK_SUNDANESE, /**< Sundanese */ + I18N_UCHAR_UBLOCK_LEPCHA, /**< Lepcha */ + I18N_UCHAR_UBLOCK_OL_CHIKI, /**< Ol Chiki */ + I18N_UCHAR_UBLOCK_CYRILLIC_EXTENDED_A, /**< Cyrillic Extended A */ + I18N_UCHAR_UBLOCK_VAI, /**< Vai */ + I18N_UCHAR_UBLOCK_CYRILLIC_EXTENDED_B, /**< Cyrillic Extended B */ + I18N_UCHAR_UBLOCK_SAURASHTRA, /**< Saurashtra */ + I18N_UCHAR_UBLOCK_KAYAH_LI, /**< Kayah Li */ + I18N_UCHAR_UBLOCK_REJANG, /**< Rejang */ + I18N_UCHAR_UBLOCK_CHAM, /**< Cham */ + I18N_UCHAR_UBLOCK_ANCIENT_SYMBOLS, /**< Ancient Symbols */ + I18N_UCHAR_UBLOCK_PHAISTOS_DISC, /**< Phaistos Disc */ + I18N_UCHAR_UBLOCK_LYCIAN, /**< Lycian */ + I18N_UCHAR_UBLOCK_CARIAN, /**< Carian */ + I18N_UCHAR_UBLOCK_LYDIAN, /**< Lydian */ + I18N_UCHAR_UBLOCK_MAHJONG_TILES, /**< Mahjong Tiles */ + I18N_UCHAR_UBLOCK_DOMINO_TILES, /**< Domino Tiles */ + I18N_UCHAR_UBLOCK_SAMARITAN, /**< Samaritan */ + I18N_UCHAR_UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED, /**< Unified Canadian Aboriginal Syllabics Extended */ + I18N_UCHAR_UBLOCK_TAI_THAM, /**< Tai Tham */ + I18N_UCHAR_UBLOCK_VEDIC_EXTENSIONS, /**< Vedic Extensions */ + I18N_UCHAR_UBLOCK_LISU, /**< Lisu */ + I18N_UCHAR_UBLOCK_BAMUM, /**< Bamum */ + I18N_UCHAR_UBLOCK_COMMON_INDIC_NUMBER_FORMS, /**< Common Indic Number Forms */ + I18N_UCHAR_UBLOCK_DEVANAGARI_EXTENDED, /**< Devanagari Extended */ + I18N_UCHAR_UBLOCK_HANGUL_JAMO_EXTENDED_A, /**< Hangul Jamo Extended A */ + I18N_UCHAR_UBLOCK_JAVANESE, /**< Javanese */ + I18N_UCHAR_UBLOCK_MYANMAR_EXTENDED_A, /**< Myanmar Extended A */ + I18N_UCHAR_UBLOCK_TAI_VIET, /**< Tai Viet */ + I18N_UCHAR_UBLOCK_MEETEI_MAYEK, /**< Meetei Mayek */ + I18N_UCHAR_UBLOCK_HANGUL_JAMO_EXTENDED_B, /**< Hangul Jamo Extended B */ + I18N_UCHAR_UBLOCK_IMPERIAL_ARAMAIC, /**< Imperial Aramaic */ + I18N_UCHAR_UBLOCK_OLD_SOUTH_ARABIAN, /**< Old South Arabian */ + I18N_UCHAR_UBLOCK_AVESTAN, /**< Avestan */ + I18N_UCHAR_UBLOCK_INSCRIPTIONAL_PARTHIAN, /**< Inscriptional Parthian */ + I18N_UCHAR_UBLOCK_INSCRIPTIONAL_PAHLAVI, /**< Inscriptional Pahlavi */ + I18N_UCHAR_UBLOCK_OLD_TURKIC, /**< Old Turkic */ + I18N_UCHAR_UBLOCK_RUMI_NUMERAL_SYMBOLS, /**< Rumi Numeral Symbols */ + I18N_UCHAR_UBLOCK_KAITHI, /**< Kaithi */ + I18N_UCHAR_UBLOCK_EGYPTIAN_HIEROGLYPHS, /**< Egyptian Hieroglyphs */ + I18N_UCHAR_UBLOCK_ENCLOSED_ALPHANUMERIC_SUPPLEMENT, /**< Enclosed Alphanumeric Supplement */ + I18N_UCHAR_UBLOCK_ENCLOSED_IDEOGRAPHIC_SUPPLEMENT, /**< Enclosed Ideographic Supplement */ + I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C, /**< CJK Unified Ideographs Extension C */ + I18N_UCHAR_UBLOCK_MANDAIC, /**< Mandaic */ + I18N_UCHAR_UBLOCK_BATAK, /**< Batak */ + I18N_UCHAR_UBLOCK_ETHIOPIC_EXTENDED_A, /**< Ethiopic Extended A */ + I18N_UCHAR_UBLOCK_BRAHMI, /**< Brahmi */ + I18N_UCHAR_UBLOCK_BAMUM_SUPPLEMENT, /**< Bamum Supplement */ + I18N_UCHAR_UBLOCK_KANA_SUPPLEMENT, /**< Kana Supplement */ + I18N_UCHAR_UBLOCK_PLAYING_CARDS, /**< Playing Cards */ + I18N_UCHAR_UBLOCK_MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS, /**< Miscellaneous Symbols And Pictographs */ + I18N_UCHAR_UBLOCK_EMOTICONS, /**< Emoticons */ + I18N_UCHAR_UBLOCK_TRANSPORT_AND_MAP_SYMBOLS, /**< Transport And Map Symbols */ + I18N_UCHAR_UBLOCK_ALCHEMICAL_SYMBOLS, /**< Alchemical Symbols */ + I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D, /**< CJK Unified Ideographs Extension D */ + I18N_UCHAR_UBLOCK_BASSA_VAH = 221, /**< Bassa Vah (Since 3.0) */ + I18N_UCHAR_UBLOCK_CAUCASIAN_ALBANIAN = 222, /**< Caucasian Albanian (Since 3.0) */ + I18N_UCHAR_UBLOCK_COPTIC_EPACT_NUMBERS = 223, /**< Coptic Epact Numbers (Since 3.0) */ + I18N_UCHAR_UBLOCK_COMBINING_DIACRITICAL_MARKS_EXTENDED = 224, /**< Combining Diacritical Marks Extended (Since 3.0) */ + I18N_UCHAR_UBLOCK_DUPLOYAN = 225, /**< Duployan (Since 3.0) */ + I18N_UCHAR_UBLOCK_ELBASAN = 226, /**< Elbasan (Since 3.0) */ + I18N_UCHAR_UBLOCK_GEOMETRIC_SHAPES_EXTENDED = 227, /**< Geometric Shapes Extended (Since 3.0) */ + I18N_UCHAR_UBLOCK_GRANTHA = 228, /**< Grantha (Since 3.0) */ + I18N_UCHAR_UBLOCK_KHOJKI = 229, /**< Khojki (Since 3.0) */ + I18N_UCHAR_UBLOCK_KHUDAWADI = 230, /**< Khudawadi (Since 3.0) */ + I18N_UCHAR_UBLOCK_LATIN_EXTENDED_E = 231, /**< Latin Extended E (Since 3.0) */ + I18N_UCHAR_UBLOCK_LINEAR_A = 232, /**< Linear A (Since 3.0) */ + I18N_UCHAR_UBLOCK_MAHAJANI = 233, /**< Mahajani (Since 3.0) */ + I18N_UCHAR_UBLOCK_MANICHAEAN = 234, /**< Manichaean (Since 3.0) */ + I18N_UCHAR_UBLOCK_MENDE_KIKAKUI = 235, /**< Mende Kikakui (Since 3.0) */ + I18N_UCHAR_UBLOCK_MODI = 236, /**< Modi (Since 3.0) */ + I18N_UCHAR_UBLOCK_MRO = 237, /**< Mro (Since 3.0) */ + I18N_UCHAR_UBLOCK_MYANMAR_EXTENDED_B = 238, /**< Myanmar Extended B (Since 3.0) */ + I18N_UCHAR_UBLOCK_NABATAEAN = 239, /**< Nabataean (Since 3.0) */ + I18N_UCHAR_UBLOCK_OLD_NORTH_ARABIAN = 240, /**< Old North Arabian (Since 3.0) */ + I18N_UCHAR_UBLOCK_OLD_PERMIC = 241, /**< Old Permic (Since 3.0) */ + I18N_UCHAR_UBLOCK_ORNAMENTAL_DINGBATS = 242, /**< Ornamental Dingbats (Since 3.0) */ + I18N_UCHAR_UBLOCK_PAHAWH_HMONG = 243, /**< Pahawh Hmong (Since 3.0) */ + I18N_UCHAR_UBLOCK_PALMYRENE = 244, /**< Palmyrene (Since 3.0) */ + I18N_UCHAR_UBLOCK_PAU_CIN_HAU = 245, /**< Pau Cin Hau (Since 3.0) */ + I18N_UCHAR_UBLOCK_PSALTER_PAHLAVI = 246, /**< Psalter Pahlavi (Since 3.0) */ + I18N_UCHAR_UBLOCK_SHORTHAND_FORMAT_CONTROLS = 247, /**< Shorthand Format Controls (Since 3.0) */ + I18N_UCHAR_UBLOCK_SIDDHAM = 248, /**< Siddham (Since 3.0) */ + I18N_UCHAR_UBLOCK_SINHALA_ARCHAIC_NUMBERS = 249, /**< Sinhala Archaic Numbers (Since 3.0) */ + I18N_UCHAR_UBLOCK_SUPPLEMENTAL_ARROWS_C = 250, /**< Supplemental Arrows C (Since 3.0) */ + I18N_UCHAR_UBLOCK_TIRHUTA = 251, /**< Tirhuta (Since 3.0) */ + I18N_UCHAR_UBLOCK_WARANG_CITI = 252, /**< Warang Citi (Since 3.0) */ + I18N_UCHAR_UBLOCK_COUNT, /**< Count */ + I18N_UCHAR_UBLOCK_INVALID_CODE = -1 /**< Invalid Code */ } i18n_uchar_ublock_code_e; /** @@ -857,30 +857,30 @@ typedef enum { * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCHAR_U_LEFT_TO_RIGHT, /**< L */ - I18N_UCHAR_U_RIGHT_TO_LEFT, /**< R */ - I18N_UCHAR_U_EUROPEAN_NUMBER, /**< EN */ - I18N_UCHAR_U_EUROPEAN_NUMBER_SEPARATOR, /**< ES */ - I18N_UCHAR_U_EUROPEAN_NUMBER_TERMINATOR, /**< ET */ - I18N_UCHAR_U_ARABIC_NUMBER, /**< AN */ - I18N_UCHAR_U_COMMON_NUMBER_SEPARATOR, /**< CS */ - I18N_UCHAR_U_BLOCK_SEPARATOR, /**< B */ - I18N_UCHAR_U_SEGMENT_SEPARATOR, /**< S */ - I18N_UCHAR_U_WHITE_SPACE_NEUTRAL, /**< WS */ - I18N_UCHAR_U_OTHER_NEUTRAL, /**< ON */ - I18N_UCHAR_U_LEFT_TO_RIGHT_EMBEDDING, /**< LRE */ - I18N_UCHAR_U_LEFT_TO_RIGHT_OVERRIDE, /**< LRO */ - I18N_UCHAR_U_RIGHT_TO_LEFT_ARABIC, /**< AL */ - I18N_UCHAR_U_RIGHT_TO_LEFT_EMBEDDING, /**< RLE */ - I18N_UCHAR_U_RIGHT_TO_LEFT_OVERRIDE, /**< RLO */ - I18N_UCHAR_U_POP_DIRECTIONAL_FORMAT, /**< PDF */ - I18N_UCHAR_U_DIR_NON_SPACING_MARK, /**< NSM */ - I18N_UCHAR_U_BOUNDARY_NEUTRAL, /**< BN */ - I18N_UCHAR_U_FIRST_STRONG_ISOLATE, /**< FSI (Since 3.0) */ - I18N_UCHAR_U_LEFT_TO_RIGHT_ISOLATE, /**< FSI (Since 3.0) */ - I18N_UCHAR_U_RIGHT_TO_LEFT_ISOLATE, /**< RLI (Since 3.0) */ - I18N_UCHAR_U_POP_DIRECTIONAL_ISOLATE, /**< PDI (Since 3.0) */ - I18N_UCHAR_U_CHAR_DIRECTION_COUNT /**< Count */ + I18N_UCHAR_U_LEFT_TO_RIGHT, /**< L */ + I18N_UCHAR_U_RIGHT_TO_LEFT, /**< R */ + I18N_UCHAR_U_EUROPEAN_NUMBER, /**< EN */ + I18N_UCHAR_U_EUROPEAN_NUMBER_SEPARATOR, /**< ES */ + I18N_UCHAR_U_EUROPEAN_NUMBER_TERMINATOR, /**< ET */ + I18N_UCHAR_U_ARABIC_NUMBER, /**< AN */ + I18N_UCHAR_U_COMMON_NUMBER_SEPARATOR, /**< CS */ + I18N_UCHAR_U_BLOCK_SEPARATOR, /**< B */ + I18N_UCHAR_U_SEGMENT_SEPARATOR, /**< S */ + I18N_UCHAR_U_WHITE_SPACE_NEUTRAL, /**< WS */ + I18N_UCHAR_U_OTHER_NEUTRAL, /**< ON */ + I18N_UCHAR_U_LEFT_TO_RIGHT_EMBEDDING, /**< LRE */ + I18N_UCHAR_U_LEFT_TO_RIGHT_OVERRIDE, /**< LRO */ + I18N_UCHAR_U_RIGHT_TO_LEFT_ARABIC, /**< AL */ + I18N_UCHAR_U_RIGHT_TO_LEFT_EMBEDDING, /**< RLE */ + I18N_UCHAR_U_RIGHT_TO_LEFT_OVERRIDE, /**< RLO */ + I18N_UCHAR_U_POP_DIRECTIONAL_FORMAT, /**< PDF */ + I18N_UCHAR_U_DIR_NON_SPACING_MARK, /**< NSM */ + I18N_UCHAR_U_BOUNDARY_NEUTRAL, /**< BN */ + I18N_UCHAR_U_FIRST_STRONG_ISOLATE, /**< FSI (Since 3.0) */ + I18N_UCHAR_U_LEFT_TO_RIGHT_ISOLATE, /**< FSI (Since 3.0) */ + I18N_UCHAR_U_RIGHT_TO_LEFT_ISOLATE, /**< RLI (Since 3.0) */ + I18N_UCHAR_U_POP_DIRECTIONAL_ISOLATE, /**< PDI (Since 3.0) */ + I18N_UCHAR_U_CHAR_DIRECTION_COUNT /**< Count */ } i18n_uchar_direction_e; /** @@ -888,25 +888,25 @@ typedef enum { * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCHAR_U_DT_NONE, /**< [none] */ - I18N_UCHAR_U_DT_CANONICAL, /**< [can] */ - I18N_UCHAR_U_DT_COMPAT, /**< [com] */ - I18N_UCHAR_U_DT_CIRCLE, /**< [enc] */ - I18N_UCHAR_U_DT_FINAL, /**< [fin] */ - I18N_UCHAR_U_DT_FONT, /**< [font] */ - I18N_UCHAR_U_DT_FRACTION, /**< [fra] */ - I18N_UCHAR_U_DT_INITIAL, /**< [init] */ - I18N_UCHAR_U_DT_ISOLATED, /**< [iso] */ - I18N_UCHAR_U_DT_MEDIAL, /**< [med] */ - I18N_UCHAR_U_DT_NARROW, /**< [nar] */ - I18N_UCHAR_U_DT_NOBREAK, /**< [nb] */ - I18N_UCHAR_U_DT_SMALL, /**< [sml] */ - I18N_UCHAR_U_DT_SQUARE, /**< [sqr] */ - I18N_UCHAR_U_DT_SUB, /**< [sub] */ - I18N_UCHAR_U_DT_SUPER, /**< [sup] */ - I18N_UCHAR_U_DT_VERTICAL, /**< [vert] */ - I18N_UCHAR_U_DT_WIDE, /**< [wide] */ - I18N_UCHAR_U_DT_COUNT /**< 18 */ + I18N_UCHAR_U_DT_NONE, /**< [none] */ + I18N_UCHAR_U_DT_CANONICAL, /**< [can] */ + I18N_UCHAR_U_DT_COMPAT, /**< [com] */ + I18N_UCHAR_U_DT_CIRCLE, /**< [enc] */ + I18N_UCHAR_U_DT_FINAL, /**< [fin] */ + I18N_UCHAR_U_DT_FONT, /**< [font] */ + I18N_UCHAR_U_DT_FRACTION, /**< [fra] */ + I18N_UCHAR_U_DT_INITIAL, /**< [init] */ + I18N_UCHAR_U_DT_ISOLATED, /**< [iso] */ + I18N_UCHAR_U_DT_MEDIAL, /**< [med] */ + I18N_UCHAR_U_DT_NARROW, /**< [nar] */ + I18N_UCHAR_U_DT_NOBREAK, /**< [nb] */ + I18N_UCHAR_U_DT_SMALL, /**< [sml] */ + I18N_UCHAR_U_DT_SQUARE, /**< [sqr] */ + I18N_UCHAR_U_DT_SUB, /**< [sub] */ + I18N_UCHAR_U_DT_SUPER, /**< [sup] */ + I18N_UCHAR_U_DT_VERTICAL, /**< [vert] */ + I18N_UCHAR_U_DT_WIDE, /**< [wide] */ + I18N_UCHAR_U_DT_COUNT /**< 18 */ } i18n_uchar_u_decomposition_type_e; /** @@ -914,13 +914,13 @@ typedef enum { * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCHAR_U_EA_NEUTRAL, /**< [N] */ - I18N_UCHAR_U_EA_AMBIGUOUS, /**< [A] */ - I18N_UCHAR_U_EA_HALFWIDTH, /**< [H] */ - I18N_UCHAR_U_EA_FULLWIDTH, /**< [F] */ - I18N_UCHAR_U_EA_NARROW, /**< [Na] */ - I18N_UCHAR_U_EA_WIDE, /**< [W] */ - I18N_UCHAR_U_EA_COUNT + I18N_UCHAR_U_EA_NEUTRAL, /**< [N] */ + I18N_UCHAR_U_EA_AMBIGUOUS, /**< [A] */ + I18N_UCHAR_U_EA_HALFWIDTH, /**< [H] */ + I18N_UCHAR_U_EA_FULLWIDTH, /**< [F] */ + I18N_UCHAR_U_EA_NARROW, /**< [Na] */ + I18N_UCHAR_U_EA_WIDE, /**< [W] */ + I18N_UCHAR_U_EA_COUNT } i18n_uchar_u_east_asian_width_e; /** @@ -928,38 +928,38 @@ typedef enum { * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCHAR_U_UNASSIGNED, /**< Non-category for unassigned and non-character code points */ - I18N_UCHAR_U_GENERAL_OTHER_TYPES = 0, /**< Cn "Other, Not Assigned (no characters in [UnicodeData.txt] have this property)" (same as #I18N_UCHAR_U_UNASSIGNED!) */ - I18N_UCHAR_U_UPPERCASE_LETTER, /**< Lu */ - I18N_UCHAR_U_LOWERCASE_LETTER, /**< Ll */ - I18N_UCHAR_U_TITLECASE_LETTER, /**< Lt */ - I18N_UCHAR_U_MODIFIER_LETTER, /**< Lm */ - I18N_UCHAR_U_OTHER_LETTER, /**< Lo */ - I18N_UCHAR_U_NON_SPACING_MARK, /**< Mn */ - I18N_UCHAR_U_ENCLOSING_MARK, /**< Me */ - I18N_UCHAR_U_COMBINING_SPACING_MARK, /**< Mc */ - I18N_UCHAR_U_DECIMAL_DIGIT_NUMBER, /**< Nd */ - I18N_UCHAR_U_LETTER_NUMBER, /**< Nl */ - I18N_UCHAR_U_OTHER_NUMBER, /**< No */ - I18N_UCHAR_U_SPACE_SEPARATOR, /**< Zs */ - I18N_UCHAR_U_LINE_SEPARATOR, /**< Zl */ - I18N_UCHAR_U_PARAGRAPH_SEPARATOR, /**< Zp */ - I18N_UCHAR_U_CONTROL_CHAR, /**< Cc */ - I18N_UCHAR_U_FORMAT_CHAR, /**< Cf */ - I18N_UCHAR_U_PRIVATE_USE_CHAR, /**< Co */ - I18N_UCHAR_U_SURROGATE, /**< Cs */ - I18N_UCHAR_U_DASH_PUNCTUATION, /**< Pd */ - I18N_UCHAR_U_START_PUNCTUATION, /**< Ps */ - I18N_UCHAR_U_END_PUNCTUATION, /**< Pe */ - I18N_UCHAR_U_CONNECTOR_PUNCTUATION, /**< Pc */ - I18N_UCHAR_U_OTHER_PUNCTUATION, /**< Po */ - I18N_UCHAR_U_MATH_SYMBOL, /**< Sm */ - I18N_UCHAR_U_CURRENCY_SYMBOL, /**< Sc */ - I18N_UCHAR_U_MODIFIER_SYMBOL, /**< Sk */ - I18N_UCHAR_U_OTHER_SYMBOL, /**< So */ - I18N_UCHAR_U_INITIAL_PUNCTUATION, /**< Pi */ - I18N_UCHAR_U_FINAL_PUNCTUATION, /**< Pf */ - I18N_UCHAR_U_CHAR_CATEGORY_COUNT /**< One higher than the last enum #i18n_uchar_category_e constant */ + I18N_UCHAR_U_UNASSIGNED, /**< Non-category for unassigned and non-character code points */ + I18N_UCHAR_U_GENERAL_OTHER_TYPES = 0, /**< Cn "Other, Not Assigned (no characters in [UnicodeData.txt] have this property)" (same as #I18N_UCHAR_U_UNASSIGNED!) */ + I18N_UCHAR_U_UPPERCASE_LETTER, /**< Lu */ + I18N_UCHAR_U_LOWERCASE_LETTER, /**< Ll */ + I18N_UCHAR_U_TITLECASE_LETTER, /**< Lt */ + I18N_UCHAR_U_MODIFIER_LETTER, /**< Lm */ + I18N_UCHAR_U_OTHER_LETTER, /**< Lo */ + I18N_UCHAR_U_NON_SPACING_MARK, /**< Mn */ + I18N_UCHAR_U_ENCLOSING_MARK, /**< Me */ + I18N_UCHAR_U_COMBINING_SPACING_MARK, /**< Mc */ + I18N_UCHAR_U_DECIMAL_DIGIT_NUMBER, /**< Nd */ + I18N_UCHAR_U_LETTER_NUMBER, /**< Nl */ + I18N_UCHAR_U_OTHER_NUMBER, /**< No */ + I18N_UCHAR_U_SPACE_SEPARATOR, /**< Zs */ + I18N_UCHAR_U_LINE_SEPARATOR, /**< Zl */ + I18N_UCHAR_U_PARAGRAPH_SEPARATOR, /**< Zp */ + I18N_UCHAR_U_CONTROL_CHAR, /**< Cc */ + I18N_UCHAR_U_FORMAT_CHAR, /**< Cf */ + I18N_UCHAR_U_PRIVATE_USE_CHAR, /**< Co */ + I18N_UCHAR_U_SURROGATE, /**< Cs */ + I18N_UCHAR_U_DASH_PUNCTUATION, /**< Pd */ + I18N_UCHAR_U_START_PUNCTUATION, /**< Ps */ + I18N_UCHAR_U_END_PUNCTUATION, /**< Pe */ + I18N_UCHAR_U_CONNECTOR_PUNCTUATION, /**< Pc */ + I18N_UCHAR_U_OTHER_PUNCTUATION, /**< Po */ + I18N_UCHAR_U_MATH_SYMBOL, /**< Sm */ + I18N_UCHAR_U_CURRENCY_SYMBOL, /**< Sc */ + I18N_UCHAR_U_MODIFIER_SYMBOL, /**< Sk */ + I18N_UCHAR_U_OTHER_SYMBOL, /**< So */ + I18N_UCHAR_U_INITIAL_PUNCTUATION, /**< Pi */ + I18N_UCHAR_U_FINAL_PUNCTUATION, /**< Pf */ + I18N_UCHAR_U_CHAR_CATEGORY_COUNT /**< One higher than the last enum #i18n_uchar_category_e constant */ } i18n_uchar_category_e; /** @@ -967,108 +967,108 @@ typedef enum { * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCHAR_U_JG_NO_JOINING_GROUP, /**< No Joining Group */ - I18N_UCHAR_U_JG_AIN, /**< Ain */ - I18N_UCHAR_U_JG_ALAPH, /**< Alaph */ - I18N_UCHAR_U_JG_ALEF, /**< Alef */ - I18N_UCHAR_U_JG_BEH, /**< Beh */ - I18N_UCHAR_U_JG_BETH, /**< Beth */ - I18N_UCHAR_U_JG_DAL, /**< Dal */ - I18N_UCHAR_U_JG_DALATH_RISH, /**< Dalath Rish */ - I18N_UCHAR_U_JG_E, /**< E */ - I18N_UCHAR_U_JG_FEH, /**< Feh */ - I18N_UCHAR_U_JG_FINAL_SEMKATH, /**< Final Semkath */ - I18N_UCHAR_U_JG_GAF, /**< Gaf */ - I18N_UCHAR_U_JG_GAMAL, /**< Gamal */ - I18N_UCHAR_U_JG_HAH, /**< Hah */ - I18N_UCHAR_U_JG_TEH_MARBUTA_GOAL, /**< Teh Marbuta Goal */ - I18N_UCHAR_U_JG_HAMZA_ON_HEH_GOAL = I18N_UCHAR_U_JG_TEH_MARBUTA_GOAL, /**< Hamza On Heh Goal */ - I18N_UCHAR_U_JG_HE, /**< He */ - I18N_UCHAR_U_JG_HEH, /**< Heh */ - I18N_UCHAR_U_JG_HEH_GOAL, /**< Heh Goal */ - I18N_UCHAR_U_JG_HETH, /**< Heth */ - I18N_UCHAR_U_JG_KAF, /**< Kaf */ - I18N_UCHAR_U_JG_KAPH, /**< Kaph */ - I18N_UCHAR_U_JG_KNOTTED_HEH, /**< Knotted Heh */ - I18N_UCHAR_U_JG_LAM, /**< Lam */ - I18N_UCHAR_U_JG_LAMADH, /**< Lamadh */ - I18N_UCHAR_U_JG_MEEM, /**< Meem */ - I18N_UCHAR_U_JG_MIM, /**< Mim */ - I18N_UCHAR_U_JG_NOON, /**< Noon */ - I18N_UCHAR_U_JG_NUN, /**< Nun */ - I18N_UCHAR_U_JG_PE, /**< Pe */ - I18N_UCHAR_U_JG_QAF, /**< Qaf */ - I18N_UCHAR_U_JG_QAPH, /**< Qaph */ - I18N_UCHAR_U_JG_REH, /**< Reh */ - I18N_UCHAR_U_JG_REVERSED_PE, /**< Reversed Pe */ - I18N_UCHAR_U_JG_SAD, /**< Sad */ - I18N_UCHAR_U_JG_SADHE, /**< Sadhe */ - I18N_UCHAR_U_JG_SEEN, /**< Seen */ - I18N_UCHAR_U_JG_SEMKATH, /**< Semkath */ - I18N_UCHAR_U_JG_SHIN, /**< Shin */ - I18N_UCHAR_U_JG_SWASH_KAF, /**< Swash Kaf */ - I18N_UCHAR_U_JG_SYRIAC_WAW, /**< Syriac Waw */ - I18N_UCHAR_U_JG_TAH, /**< Tah */ - I18N_UCHAR_U_JG_TAW, /**< Taw */ - I18N_UCHAR_U_JG_TEH_MARBUTA, /**< Teh Marbuta */ - I18N_UCHAR_U_JG_TETH, /**< Teth */ - I18N_UCHAR_U_JG_WAW, /**< Waw */ - I18N_UCHAR_U_JG_YEH, /**< Yeh */ - I18N_UCHAR_U_JG_YEH_BARREE, /**< Yeh Barree */ - I18N_UCHAR_U_JG_YEH_WITH_TAIL, /**< Yeh With Tail */ - I18N_UCHAR_U_JG_YUDH, /**< Yudh */ - I18N_UCHAR_U_JG_YUDH_HE, /**< Yudh He */ - I18N_UCHAR_U_JG_ZAIN, /**< Zain */ - I18N_UCHAR_U_JG_FE, /**< Fe */ - I18N_UCHAR_U_JG_KHAPH, /**< Khaph */ - I18N_UCHAR_U_JG_ZHAIN, /**< Zhain */ - I18N_UCHAR_U_JG_BURUSHASKI_YEH_BARREE, /**< Burushaski Yeh Barree */ - I18N_UCHAR_U_JG_FARSI_YEH, /**< Farsi Yeh */ - I18N_UCHAR_U_JG_NYA, /**< Nya */ - I18N_UCHAR_U_JG_ROHINGYA_YEH, /**< Rohingya Yeh */ - I18N_UCHAR_U_JG_MANICHAEAN_ALEPH, /**< Manichaean Aleph (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_AYIN, /**< Manichaean Ayin (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_BETH, /**< Manichaean Beth (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_DALETH, /**< Manichaean Daleth (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_DHAMEDH, /**< Manichaean Dhamedh (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_FIVE, /**< Manichaean Five (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_GIMEL, /**< Manichaean Gimel (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_HETH, /**< Manichaean Heth (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_HUNDRED, /**< Manichaean Hundred (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_KAPH, /**< Manichaean Kaph (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_LAMEDH, /**< Manichaean Lamedh (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_MEM, /**< Manichaean Mem (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_NUN, /**< Manichaean Nun (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_ONE, /**< Manichaean One (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_PE, /**< Manichaean Pe (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_QOPH, /**< Manichaean Qoph (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_RESH, /**< Manichaean Resh (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_SADHE, /**< Manichaean Sadhe (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_SAMEKH, /**< Manichaean Samekh (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_TAW, /**< Manichaean Taw (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_TEN, /**< Manichaean Ten (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_TETH, /**< Manichaean Teth (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_THAMEDH, /**< Manichaean Thamedh (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_TWENTY, /**< Manichaean Twenty (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_WAW, /**< Manichaean Waw (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_YODH, /**< Manichaean Yodh (Since 3.0) */ - I18N_UCHAR_U_JG_MANICHAEAN_ZAYIN, /**< Manichaean Zayin (Since 3.0) */ - I18N_UCHAR_U_JG_STRAIGHT_WAW, /**< Manichaean Waw (Since 3.0) */ - I18N_UCHAR_U_JG_COUNT /**< Count */ - } i18n_uchar_u_joining_group_e; + I18N_UCHAR_U_JG_NO_JOINING_GROUP, /**< No Joining Group */ + I18N_UCHAR_U_JG_AIN, /**< Ain */ + I18N_UCHAR_U_JG_ALAPH, /**< Alaph */ + I18N_UCHAR_U_JG_ALEF, /**< Alef */ + I18N_UCHAR_U_JG_BEH, /**< Beh */ + I18N_UCHAR_U_JG_BETH, /**< Beth */ + I18N_UCHAR_U_JG_DAL, /**< Dal */ + I18N_UCHAR_U_JG_DALATH_RISH, /**< Dalath Rish */ + I18N_UCHAR_U_JG_E, /**< E */ + I18N_UCHAR_U_JG_FEH, /**< Feh */ + I18N_UCHAR_U_JG_FINAL_SEMKATH, /**< Final Semkath */ + I18N_UCHAR_U_JG_GAF, /**< Gaf */ + I18N_UCHAR_U_JG_GAMAL, /**< Gamal */ + I18N_UCHAR_U_JG_HAH, /**< Hah */ + I18N_UCHAR_U_JG_TEH_MARBUTA_GOAL, /**< Teh Marbuta Goal */ + I18N_UCHAR_U_JG_HAMZA_ON_HEH_GOAL = I18N_UCHAR_U_JG_TEH_MARBUTA_GOAL, /**< Hamza On Heh Goal */ + I18N_UCHAR_U_JG_HE, /**< He */ + I18N_UCHAR_U_JG_HEH, /**< Heh */ + I18N_UCHAR_U_JG_HEH_GOAL, /**< Heh Goal */ + I18N_UCHAR_U_JG_HETH, /**< Heth */ + I18N_UCHAR_U_JG_KAF, /**< Kaf */ + I18N_UCHAR_U_JG_KAPH, /**< Kaph */ + I18N_UCHAR_U_JG_KNOTTED_HEH, /**< Knotted Heh */ + I18N_UCHAR_U_JG_LAM, /**< Lam */ + I18N_UCHAR_U_JG_LAMADH, /**< Lamadh */ + I18N_UCHAR_U_JG_MEEM, /**< Meem */ + I18N_UCHAR_U_JG_MIM, /**< Mim */ + I18N_UCHAR_U_JG_NOON, /**< Noon */ + I18N_UCHAR_U_JG_NUN, /**< Nun */ + I18N_UCHAR_U_JG_PE, /**< Pe */ + I18N_UCHAR_U_JG_QAF, /**< Qaf */ + I18N_UCHAR_U_JG_QAPH, /**< Qaph */ + I18N_UCHAR_U_JG_REH, /**< Reh */ + I18N_UCHAR_U_JG_REVERSED_PE, /**< Reversed Pe */ + I18N_UCHAR_U_JG_SAD, /**< Sad */ + I18N_UCHAR_U_JG_SADHE, /**< Sadhe */ + I18N_UCHAR_U_JG_SEEN, /**< Seen */ + I18N_UCHAR_U_JG_SEMKATH, /**< Semkath */ + I18N_UCHAR_U_JG_SHIN, /**< Shin */ + I18N_UCHAR_U_JG_SWASH_KAF, /**< Swash Kaf */ + I18N_UCHAR_U_JG_SYRIAC_WAW, /**< Syriac Waw */ + I18N_UCHAR_U_JG_TAH, /**< Tah */ + I18N_UCHAR_U_JG_TAW, /**< Taw */ + I18N_UCHAR_U_JG_TEH_MARBUTA, /**< Teh Marbuta */ + I18N_UCHAR_U_JG_TETH, /**< Teth */ + I18N_UCHAR_U_JG_WAW, /**< Waw */ + I18N_UCHAR_U_JG_YEH, /**< Yeh */ + I18N_UCHAR_U_JG_YEH_BARREE, /**< Yeh Barree */ + I18N_UCHAR_U_JG_YEH_WITH_TAIL, /**< Yeh With Tail */ + I18N_UCHAR_U_JG_YUDH, /**< Yudh */ + I18N_UCHAR_U_JG_YUDH_HE, /**< Yudh He */ + I18N_UCHAR_U_JG_ZAIN, /**< Zain */ + I18N_UCHAR_U_JG_FE, /**< Fe */ + I18N_UCHAR_U_JG_KHAPH, /**< Khaph */ + I18N_UCHAR_U_JG_ZHAIN, /**< Zhain */ + I18N_UCHAR_U_JG_BURUSHASKI_YEH_BARREE, /**< Burushaski Yeh Barree */ + I18N_UCHAR_U_JG_FARSI_YEH, /**< Farsi Yeh */ + I18N_UCHAR_U_JG_NYA, /**< Nya */ + I18N_UCHAR_U_JG_ROHINGYA_YEH, /**< Rohingya Yeh */ + I18N_UCHAR_U_JG_MANICHAEAN_ALEPH, /**< Manichaean Aleph (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_AYIN, /**< Manichaean Ayin (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_BETH, /**< Manichaean Beth (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_DALETH, /**< Manichaean Daleth (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_DHAMEDH, /**< Manichaean Dhamedh (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_FIVE, /**< Manichaean Five (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_GIMEL, /**< Manichaean Gimel (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_HETH, /**< Manichaean Heth (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_HUNDRED, /**< Manichaean Hundred (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_KAPH, /**< Manichaean Kaph (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_LAMEDH, /**< Manichaean Lamedh (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_MEM, /**< Manichaean Mem (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_NUN, /**< Manichaean Nun (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_ONE, /**< Manichaean One (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_PE, /**< Manichaean Pe (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_QOPH, /**< Manichaean Qoph (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_RESH, /**< Manichaean Resh (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_SADHE, /**< Manichaean Sadhe (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_SAMEKH, /**< Manichaean Samekh (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_TAW, /**< Manichaean Taw (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_TEN, /**< Manichaean Ten (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_TETH, /**< Manichaean Teth (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_THAMEDH, /**< Manichaean Thamedh (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_TWENTY, /**< Manichaean Twenty (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_WAW, /**< Manichaean Waw (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_YODH, /**< Manichaean Yodh (Since 3.0) */ + I18N_UCHAR_U_JG_MANICHAEAN_ZAYIN, /**< Manichaean Zayin (Since 3.0) */ + I18N_UCHAR_U_JG_STRAIGHT_WAW, /**< Manichaean Waw (Since 3.0) */ + I18N_UCHAR_U_JG_COUNT /**< Count */ +} i18n_uchar_u_joining_group_e; /** * @brief Enumeration for Joining Type constants. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCHAR_U_JT_NON_JOINING, /**< [U] */ - I18N_UCHAR_U_JT_JOIN_CAUSING, /**< [C] */ - I18N_UCHAR_U_JT_DUAL_JOINING, /**< [D] */ - I18N_UCHAR_U_JT_LEFT_JOINING, /**< [L] */ - I18N_UCHAR_U_JT_RIGHT_JOINING, /**< [R] */ - I18N_UCHAR_U_JT_TRANSPARENT, /**< [T] */ - I18N_UCHAR_U_JT_COUNT /**< 6 */ + I18N_UCHAR_U_JT_NON_JOINING, /**< [U] */ + I18N_UCHAR_U_JT_JOIN_CAUSING, /**< [C] */ + I18N_UCHAR_U_JT_DUAL_JOINING, /**< [D] */ + I18N_UCHAR_U_JT_LEFT_JOINING, /**< [L] */ + I18N_UCHAR_U_JT_RIGHT_JOINING, /**< [R] */ + I18N_UCHAR_U_JT_TRANSPARENT, /**< [T] */ + I18N_UCHAR_U_JT_COUNT /**< 6 */ } i18n_uchar_u_joining_type_e; /** @@ -1076,57 +1076,57 @@ typedef enum { * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCHAR_U_LB_UNKNOWN, /**< [XX] */ - I18N_UCHAR_U_LB_AMBIGUOUS, /**< [AI] */ - I18N_UCHAR_U_LB_ALPHABETIC, /**< [AL] */ - I18N_UCHAR_U_LB_BREAK_BOTH, /**< [B2] */ - I18N_UCHAR_U_LB_BREAK_AFTER, /**< [BA] */ - I18N_UCHAR_U_LB_BREAK_BEFORE, /**< [BB] */ - I18N_UCHAR_U_LB_MANDATORY_BREAK, /**< [BK] */ - I18N_UCHAR_U_LB_CONTINGENT_BREAK, /**< [CB] */ - I18N_UCHAR_U_LB_CLOSE_PUNCTUATION, /**< [CL] */ - I18N_UCHAR_U_LB_COMBINING_MARK, /**< [CM] */ - I18N_UCHAR_U_LB_CARRIAGE_RETURN, /**< [CR] */ - I18N_UCHAR_U_LB_EXCLAMATION, /**< [EX] */ - I18N_UCHAR_U_LB_GLUE, /**< [GL] */ - I18N_UCHAR_U_LB_HYPHEN, /**< [HY] */ - I18N_UCHAR_U_LB_IDEOGRAPHIC, /**< [ID] */ - I18N_UCHAR_U_LB_INSEPARABLE, /**< [IN] */ - I18N_UCHAR_U_LB_INSEPERABLE = I18N_UCHAR_U_LB_INSEPARABLE, - I18N_UCHAR_U_LB_INFIX_NUMERIC, /**< [IS] */ - I18N_UCHAR_U_LB_LINE_FEED, /**< [LF] */ - I18N_UCHAR_U_LB_NONSTARTER, /**< [NS] */ - I18N_UCHAR_U_LB_NUMERIC, /**< [NU] */ - I18N_UCHAR_U_LB_OPEN_PUNCTUATION, /**< [OP] */ - I18N_UCHAR_U_LB_POSTFIX_NUMERIC, /**< [PO] */ - I18N_UCHAR_U_LB_PREFIX_NUMERIC, /**< [PR] */ - I18N_UCHAR_U_LB_QUOTATION, /**< [QU] */ - I18N_UCHAR_U_LB_COMPLEX_CONTEXT, /**< [SA] */ - I18N_UCHAR_U_LB_SURROGATE, /**< [SG] */ - I18N_UCHAR_U_LB_SPACE, /**< [SP] */ - I18N_UCHAR_U_LB_BREAK_SYMBOLS, /**< [SY] */ - I18N_UCHAR_U_LB_ZWSPACE, /**< [ZW] */ - I18N_UCHAR_U_LB_NEXT_LINE, /**< [NL] */ - I18N_UCHAR_U_LB_WORD_JOINER, /**< [WJ] */ - I18N_UCHAR_U_LB_H2, /**< [H2] */ - I18N_UCHAR_U_LB_H3, /**< [H3] */ - I18N_UCHAR_U_LB_JL, /**< [JL] */ - I18N_UCHAR_U_LB_JT, /**< [JT] */ - I18N_UCHAR_U_LB_JV, /**< [JV] */ - I18N_UCHAR_U_LB_CLOSE_PARENTHESIS, /**< [CP] */ - I18N_UCHAR_U_LB_COUNT - } i18n_uchar_u_line_break_e; + I18N_UCHAR_U_LB_UNKNOWN, /**< [XX] */ + I18N_UCHAR_U_LB_AMBIGUOUS, /**< [AI] */ + I18N_UCHAR_U_LB_ALPHABETIC, /**< [AL] */ + I18N_UCHAR_U_LB_BREAK_BOTH, /**< [B2] */ + I18N_UCHAR_U_LB_BREAK_AFTER, /**< [BA] */ + I18N_UCHAR_U_LB_BREAK_BEFORE, /**< [BB] */ + I18N_UCHAR_U_LB_MANDATORY_BREAK, /**< [BK] */ + I18N_UCHAR_U_LB_CONTINGENT_BREAK, /**< [CB] */ + I18N_UCHAR_U_LB_CLOSE_PUNCTUATION, /**< [CL] */ + I18N_UCHAR_U_LB_COMBINING_MARK, /**< [CM] */ + I18N_UCHAR_U_LB_CARRIAGE_RETURN, /**< [CR] */ + I18N_UCHAR_U_LB_EXCLAMATION, /**< [EX] */ + I18N_UCHAR_U_LB_GLUE, /**< [GL] */ + I18N_UCHAR_U_LB_HYPHEN, /**< [HY] */ + I18N_UCHAR_U_LB_IDEOGRAPHIC, /**< [ID] */ + I18N_UCHAR_U_LB_INSEPARABLE, /**< [IN] */ + I18N_UCHAR_U_LB_INSEPERABLE = I18N_UCHAR_U_LB_INSEPARABLE, + I18N_UCHAR_U_LB_INFIX_NUMERIC, /**< [IS] */ + I18N_UCHAR_U_LB_LINE_FEED, /**< [LF] */ + I18N_UCHAR_U_LB_NONSTARTER, /**< [NS] */ + I18N_UCHAR_U_LB_NUMERIC, /**< [NU] */ + I18N_UCHAR_U_LB_OPEN_PUNCTUATION, /**< [OP] */ + I18N_UCHAR_U_LB_POSTFIX_NUMERIC, /**< [PO] */ + I18N_UCHAR_U_LB_PREFIX_NUMERIC, /**< [PR] */ + I18N_UCHAR_U_LB_QUOTATION, /**< [QU] */ + I18N_UCHAR_U_LB_COMPLEX_CONTEXT, /**< [SA] */ + I18N_UCHAR_U_LB_SURROGATE, /**< [SG] */ + I18N_UCHAR_U_LB_SPACE, /**< [SP] */ + I18N_UCHAR_U_LB_BREAK_SYMBOLS, /**< [SY] */ + I18N_UCHAR_U_LB_ZWSPACE, /**< [ZW] */ + I18N_UCHAR_U_LB_NEXT_LINE, /**< [NL] */ + I18N_UCHAR_U_LB_WORD_JOINER, /**< [WJ] */ + I18N_UCHAR_U_LB_H2, /**< [H2] */ + I18N_UCHAR_U_LB_H3, /**< [H3] */ + I18N_UCHAR_U_LB_JL, /**< [JL] */ + I18N_UCHAR_U_LB_JT, /**< [JT] */ + I18N_UCHAR_U_LB_JV, /**< [JV] */ + I18N_UCHAR_U_LB_CLOSE_PARENTHESIS, /**< [CP] */ + I18N_UCHAR_U_LB_COUNT +} i18n_uchar_u_line_break_e; /** * @brief Enumeration for Numeric Type constants. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCHAR_U_NT_NONE, /**< [None] */ - I18N_UCHAR_U_NT_DECIMAL, /**< [de] */ - I18N_UCHAR_U_NT_DIGIT, /**< [di] */ - I18N_UCHAR_U_NT_NUMERIC, /**< [nu] */ - I18N_UCHAR_U_NT_COUNT /**< */ + I18N_UCHAR_U_NT_NONE, /**< [None] */ + I18N_UCHAR_U_NT_DECIMAL, /**< [de] */ + I18N_UCHAR_U_NT_DIGIT, /**< [di] */ + I18N_UCHAR_U_NT_NUMERIC, /**< [nu] */ + I18N_UCHAR_U_NT_COUNT /**< */ } i18n_uchar_u_numeric_type_e; /** @@ -1134,13 +1134,13 @@ typedef enum { * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCHAR_U_HST_NOT_APPLICABLE, /**< [NA] */ - I18N_UCHAR_U_HST_LEADING_JAMO, /**< [L] */ - I18N_UCHAR_U_HST_VOWEL_JAMO, /**< [V] */ - I18N_UCHAR_U_HST_TRAILING_JAMO, /**< [T] */ - I18N_UCHAR_U_HST_LV_SYLLABLE, /**< [LV] */ - I18N_UCHAR_U_HST_LVT_SYLLABLE, /**< [LVT] */ - I18N_UCHAR_U_HST_COUNT /**< */ + I18N_UCHAR_U_HST_NOT_APPLICABLE, /**< [NA] */ + I18N_UCHAR_U_HST_LEADING_JAMO, /**< [L] */ + I18N_UCHAR_U_HST_VOWEL_JAMO, /**< [V] */ + I18N_UCHAR_U_HST_TRAILING_JAMO, /**< [T] */ + I18N_UCHAR_U_HST_LV_SYLLABLE, /**< [LV] */ + I18N_UCHAR_U_HST_LVT_SYLLABLE, /**< [LVT] */ + I18N_UCHAR_U_HST_COUNT /**< */ } i18n_uchar_u_hangul_syllable_type_e; /** @@ -1148,22 +1148,22 @@ typedef enum { * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCHAR_U_SB_OTHER, /**< [XX] */ - I18N_UCHAR_U_SB_ATERM, /**< [AT] */ - I18N_UCHAR_U_SB_CLOSE, /**< [CL] */ - I18N_UCHAR_U_SB_FORMAT, /**< [FO] */ - I18N_UCHAR_U_SB_LOWER, /**< [LO] */ - I18N_UCHAR_U_SB_NUMERIC, /**< [NU] */ - I18N_UCHAR_U_SB_OLETTER, /**< [LE] */ - I18N_UCHAR_U_SB_SEP, /**< [SE] */ - I18N_UCHAR_U_SB_SP, /**< [SP] */ - I18N_UCHAR_U_SB_STERM, /**< [ST] */ - I18N_UCHAR_U_SB_UPPER, /**< [UP] */ - I18N_UCHAR_U_SB_CR, /**< [CR] */ - I18N_UCHAR_U_SB_EXTEND, /**< [EX] */ - I18N_UCHAR_U_SB_LF, /**< [LF] */ - I18N_UCHAR_U_SB_SCONTINUE, /**< [SC] */ - I18N_UCHAR_U_SB_COUNT /**< */ + I18N_UCHAR_U_SB_OTHER, /**< [XX] */ + I18N_UCHAR_U_SB_ATERM, /**< [AT] */ + I18N_UCHAR_U_SB_CLOSE, /**< [CL] */ + I18N_UCHAR_U_SB_FORMAT, /**< [FO] */ + I18N_UCHAR_U_SB_LOWER, /**< [LO] */ + I18N_UCHAR_U_SB_NUMERIC, /**< [NU] */ + I18N_UCHAR_U_SB_OLETTER, /**< [LE] */ + I18N_UCHAR_U_SB_SEP, /**< [SE] */ + I18N_UCHAR_U_SB_SP, /**< [SP] */ + I18N_UCHAR_U_SB_STERM, /**< [ST] */ + I18N_UCHAR_U_SB_UPPER, /**< [UP] */ + I18N_UCHAR_U_SB_CR, /**< [CR] */ + I18N_UCHAR_U_SB_EXTEND, /**< [EX] */ + I18N_UCHAR_U_SB_LF, /**< [LF] */ + I18N_UCHAR_U_SB_SCONTINUE, /**< [SC] */ + I18N_UCHAR_U_SB_COUNT /**< */ } i18n_uchar_u_sentence_break_e; /** @@ -1171,24 +1171,24 @@ typedef enum { * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCHAR_U_WB_OTHER, /**< [XX] */ - I18N_UCHAR_U_WB_ALETTER, /**< [LE] */ - I18N_UCHAR_U_WB_FORMAT, /**< [FO] */ - I18N_UCHAR_U_WB_KATAKANA, /**< [KA] */ - I18N_UCHAR_U_WB_MIDLETTER, /**< [ML] */ - I18N_UCHAR_U_WB_MIDNUM, /**< [MN] */ - I18N_UCHAR_U_WB_NUMERIC, /**< [NU] */ - I18N_UCHAR_U_WB_EXTENDNUMLET, /**< [EX] */ - I18N_UCHAR_U_WB_CR, /**< [CR] */ - I18N_UCHAR_U_WB_EXTEND, /**< [Extend] */ - I18N_UCHAR_U_WB_LF, /**< [LF] */ - I18N_UCHAR_U_WB_MIDNUMLET, /**< [MB] */ - I18N_UCHAR_U_WB_NEWLINE, /**< [NL] */ - I18N_UCHAR_U_WB_REGIONAL_INDICATOR, /**< [RI] (Since 3.0) */ - I18N_UCHAR_U_WB_HEBREW_LETTER, /**< [HL] (Since 3.0) */ - I18N_UCHAR_U_WB_SINGLE_QUOTE, /**< [SQ] (Since 3.0) */ - I18N_UCHAR_U_WB_DOUBLE_QUOTE, /**< [DQ] (Since 3.0) */ - I18N_UCHAR_U_WB_COUNT /**< */ + I18N_UCHAR_U_WB_OTHER, /**< [XX] */ + I18N_UCHAR_U_WB_ALETTER, /**< [LE] */ + I18N_UCHAR_U_WB_FORMAT, /**< [FO] */ + I18N_UCHAR_U_WB_KATAKANA, /**< [KA] */ + I18N_UCHAR_U_WB_MIDLETTER, /**< [ML] */ + I18N_UCHAR_U_WB_MIDNUM, /**< [MN] */ + I18N_UCHAR_U_WB_NUMERIC, /**< [NU] */ + I18N_UCHAR_U_WB_EXTENDNUMLET, /**< [EX] */ + I18N_UCHAR_U_WB_CR, /**< [CR] */ + I18N_UCHAR_U_WB_EXTEND, /**< [Extend] */ + I18N_UCHAR_U_WB_LF, /**< [LF] */ + I18N_UCHAR_U_WB_MIDNUMLET, /**< [MB] */ + I18N_UCHAR_U_WB_NEWLINE, /**< [NL] */ + I18N_UCHAR_U_WB_REGIONAL_INDICATOR, /**< [RI] (Since 3.0) */ + I18N_UCHAR_U_WB_HEBREW_LETTER, /**< [HL] (Since 3.0) */ + I18N_UCHAR_U_WB_SINGLE_QUOTE, /**< [SQ] (Since 3.0) */ + I18N_UCHAR_U_WB_DOUBLE_QUOTE, /**< [DQ] (Since 3.0) */ + I18N_UCHAR_U_WB_COUNT /**< */ } i18n_uchar_u_word_break_values_e; /** @@ -1196,19 +1196,19 @@ typedef enum { * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCHAR_U_GCB_OTHER, /**< [XX] */ - I18N_UCHAR_U_GCB_CONTROL, /**< [CN] */ - I18N_UCHAR_U_GCB_CR, /**< [CR] */ - I18N_UCHAR_U_GCB_EXTEND, /**< [EX] */ - I18N_UCHAR_U_GCB_L, /**< [L] */ - I18N_UCHAR_U_GCB_LF, /**< [LF] */ - I18N_UCHAR_U_GCB_LV, /**< [LV] */ - I18N_UCHAR_U_GCB_LVT, /**< [LVT] */ - I18N_UCHAR_U_GCB_T, /**< [T] */ - I18N_UCHAR_U_GCB_V, /**< [V] */ - I18N_UCHAR_U_GCB_SPACING_MARK, /**< [SM] */ - I18N_UCHAR_U_GCB_PREPEND, /**< [PP] */ - I18N_UCHAR_UCHAR_U_GCB_COUNT /**< */ + I18N_UCHAR_U_GCB_OTHER, /**< [XX] */ + I18N_UCHAR_U_GCB_CONTROL, /**< [CN] */ + I18N_UCHAR_U_GCB_CR, /**< [CR] */ + I18N_UCHAR_U_GCB_EXTEND, /**< [EX] */ + I18N_UCHAR_U_GCB_L, /**< [L] */ + I18N_UCHAR_U_GCB_LF, /**< [LF] */ + I18N_UCHAR_U_GCB_LV, /**< [LV] */ + I18N_UCHAR_U_GCB_LVT, /**< [LVT] */ + I18N_UCHAR_U_GCB_T, /**< [T] */ + I18N_UCHAR_U_GCB_V, /**< [V] */ + I18N_UCHAR_U_GCB_SPACING_MARK, /**< [SM] */ + I18N_UCHAR_U_GCB_PREPEND, /**< [PP] */ + I18N_UCHAR_UCHAR_U_GCB_COUNT /**< */ } i18n_uchar_u_grapheme_cluster_break_e; /** @@ -1229,69 +1229,69 @@ typedef void *i18n_ucollator_h; /** * @brief Enumeration for attributes that collation service understands. - * All the attributes can take #I18N_UCOLLATOR_DEFAULT value, as well as the values specific to each one. + * All the attributes can take #I18N_UCOLLATOR_DEFAULT value, as well as the values specific to each one. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCOLLATOR_FRENCH_COLLATION, /**< Attribute for direction of secondary weights - used in Canadian French. Acceptable values are #I18N_UCOLLATOR_ON, which results in secondary weights being considered backwards, and #I18N_UCOLLATOR_OFF which treats secondary weights in the order they appear */ - I18N_UCOLLATOR_ALTERNATE_HANDLING, /**< Attribute for handling variable elements. Acceptable values are #I18N_UCOLLATOR_NON_IGNORABLE (default) which treats all the codepoints with non-ignorable primary weights in the same way, and #I18N_UCOLLATOR_SHIFTED which causes codepoints with primary weights that are equal or below the variable top value to be ignored at the primary level and moved to the quaternary level */ - I18N_UCOLLATOR_CASE_FIRST, /**< Controls the ordering of upper and lower case letters. Acceptable values are #I18N_UCOLLATOR_OFF (default), which orders upper and lower case letters in accordance to their tertiary weights, #I18N_UCOLLATOR_UPPER_FIRST which forces upper case letters to sort before lower case letters, and #I18N_UCOLLATOR_LOWER_FIRST which does the opposite */ - I18N_UCOLLATOR_CASE_LEVEL, /**< Controls whether an extra case level (positioned before the third level) is generated or not. Acceptable values are #I18N_UCOLLATOR_OFF (default), when case level is not generated, and #I18N_UCOLLATOR_ON which causes the case level to be generated. Contents of the case level are affected by the value of the #I18N_UCOLLATOR_CASE_FIRST attribute. A simple way to ignore accent differences in a string is to set the strength to #I18N_UCOLLATOR_PRIMARY and enable case level */ - I18N_UCOLLATOR_NORMALIZATION_MODE, /**< Controls whether the normalization check and necessary normalizations are performed. When set to #I18N_UCOLLATOR_OFF (default) no normalization check is performed. The correctness of the result is guaranteed only if the input data is in so-called FCD form (see users manual for more info). When set to #I18N_UCOLLATOR_ON, an incremental check is performed to see whether the input data is in the FCD form. If the data is not in the FCD form, incremental NFD normalization is performed */ - I18N_UCOLLATOR_DECOMPOSITION_MODE = I18N_UCOLLATOR_NORMALIZATION_MODE, /**< An alias for the #I18N_UCOLLATOR_NORMALIZATION_MODE attribute */ - I18N_UCOLLATOR_STRENGTH, /**< The strength attribute. Can be either #I18N_UCOLLATOR_PRIMARY, #I18N_UCOLLATOR_SECONDARY, #I18N_UCOLLATOR_TERTIARY, #I18N_UCOLLATOR_QUATERNARY, or #I18N_UCOLLATOR_IDENTICAL. The usual strength for most locales (except Japanese) is tertiary. Quaternary strength is useful when combined with shifted setting for the alternate handling attribute and for JIS X 4061 collation, when it is used to distinguish between Katakana and Hiragana. Otherwise, quaternary level is affected only by the number of non-ignorable code points in the string. Identical strength is rarely useful, as it amounts to codepoints of the NFD form of the string */ - I18N_UCOLLATOR_NUMERIC_COLLATION = I18N_UCOLLATOR_STRENGTH + 2, /**< When turned on, this attribute makes substrings of digits that are sort according to their numeric values. This is a way to get '100' to sort AFTER '2'. Note that the longest digit substring that can be treated as a single unit is 254 digits (not counting leading zeros). If a digit substring is longer than that, the digits beyond the limit will be treated as a separate digit substring. A "digit" in this sense is a code point with General_Category=Nd, which does not include circled numbers, roman numerals, and so on. Only a contiguous digit substring is considered, that is, non-negative integers without separators. There is no support for plus/minus signs, decimals, exponents, and so on */ - I18N_UCOLLATOR_ATTRIBUTE_COUNT /**< The number of i18n_ucollator_attribute_e constants */ + I18N_UCOLLATOR_FRENCH_COLLATION, /**< Attribute for direction of secondary weights - used in Canadian French. Acceptable values are #I18N_UCOLLATOR_ON, which results in secondary weights being considered backwards, and #I18N_UCOLLATOR_OFF which treats secondary weights in the order they appear */ + I18N_UCOLLATOR_ALTERNATE_HANDLING, /**< Attribute for handling variable elements. Acceptable values are #I18N_UCOLLATOR_NON_IGNORABLE (default) which treats all the codepoints with non-ignorable primary weights in the same way, and #I18N_UCOLLATOR_SHIFTED which causes codepoints with primary weights that are equal or below the variable top value to be ignored at the primary level and moved to the quaternary level */ + I18N_UCOLLATOR_CASE_FIRST, /**< Controls the ordering of upper and lower case letters. Acceptable values are #I18N_UCOLLATOR_OFF (default), which orders upper and lower case letters in accordance to their tertiary weights, #I18N_UCOLLATOR_UPPER_FIRST which forces upper case letters to sort before lower case letters, and #I18N_UCOLLATOR_LOWER_FIRST which does the opposite */ + I18N_UCOLLATOR_CASE_LEVEL, /**< Controls whether an extra case level (positioned before the third level) is generated or not. Acceptable values are #I18N_UCOLLATOR_OFF (default), when case level is not generated, and #I18N_UCOLLATOR_ON which causes the case level to be generated. Contents of the case level are affected by the value of the #I18N_UCOLLATOR_CASE_FIRST attribute. A simple way to ignore accent differences in a string is to set the strength to #I18N_UCOLLATOR_PRIMARY and enable case level */ + I18N_UCOLLATOR_NORMALIZATION_MODE, /**< Controls whether the normalization check and necessary normalizations are performed. When set to #I18N_UCOLLATOR_OFF (default) no normalization check is performed. The correctness of the result is guaranteed only if the input data is in so-called FCD form (see users manual for more info). When set to #I18N_UCOLLATOR_ON, an incremental check is performed to see whether the input data is in the FCD form. If the data is not in the FCD form, incremental NFD normalization is performed */ + I18N_UCOLLATOR_DECOMPOSITION_MODE = I18N_UCOLLATOR_NORMALIZATION_MODE, /**< An alias for the #I18N_UCOLLATOR_NORMALIZATION_MODE attribute */ + I18N_UCOLLATOR_STRENGTH, /**< The strength attribute. Can be either #I18N_UCOLLATOR_PRIMARY, #I18N_UCOLLATOR_SECONDARY, #I18N_UCOLLATOR_TERTIARY, #I18N_UCOLLATOR_QUATERNARY, or #I18N_UCOLLATOR_IDENTICAL. The usual strength for most locales (except Japanese) is tertiary. Quaternary strength is useful when combined with shifted setting for the alternate handling attribute and for JIS X 4061 collation, when it is used to distinguish between Katakana and Hiragana. Otherwise, quaternary level is affected only by the number of non-ignorable code points in the string. Identical strength is rarely useful, as it amounts to codepoints of the NFD form of the string */ + I18N_UCOLLATOR_NUMERIC_COLLATION = I18N_UCOLLATOR_STRENGTH + 2, /**< When turned on, this attribute makes substrings of digits that are sort according to their numeric values. This is a way to get '100' to sort AFTER '2'. Note that the longest digit substring that can be treated as a single unit is 254 digits (not counting leading zeros). If a digit substring is longer than that, the digits beyond the limit will be treated as a separate digit substring. A "digit" in this sense is a code point with General_Category=Nd, which does not include circled numbers, roman numerals, and so on. Only a contiguous digit substring is considered, that is, non-negative integers without separators. There is no support for plus/minus signs, decimals, exponents, and so on */ + I18N_UCOLLATOR_ATTRIBUTE_COUNT /**< The number of i18n_ucollator_attribute_e constants */ } i18n_ucollator_attribute_e; /** * @brief Enumeration containing attribute values for controlling collation behavior. - * Here are all the allowable values. Not every attribute can take every value. - * The only universal value is #I18N_UCOLLATOR_DEFAULT, which resets the attribute value to the predefined value for that locale. + * Here are all the allowable values. Not every attribute can take every value. + * The only universal value is #I18N_UCOLLATOR_DEFAULT, which resets the attribute value to the predefined value for that locale. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCOLLATOR_DEFAULT = -1, /**< Accepted by most attributes */ - I18N_UCOLLATOR_PRIMARY = 0, /**< Primary collation strength */ - I18N_UCOLLATOR_SECONDARY = 1, /**< Secondary collation strength */ - I18N_UCOLLATOR_TERTIARY = 2, /**< Tertiary collation strength */ - I18N_UCOLLATOR_DEFAULT_STRENGTH = I18N_UCOLLATOR_TERTIARY, /**< Default collation strength */ - I18N_UCOLLATOR_CE_STRENGTH_LIMIT, - I18N_UCOLLATOR_QUATERNARY = 3, /**< Quaternary collation strength */ - I18N_UCOLLATOR_IDENTICAL = 15, /**< Identical collation strength */ - I18N_UCOLLATOR_STRENGTH_LIMIT, - - I18N_UCOLLATOR_OFF = 16, /**< Turn the feature off - works for #I18N_UCOLLATOR_FRENCH_COLLATION, #I18N_UCOLLATOR_CASE_LEVEL & #I18N_UCOLLATOR_DECOMPOSITION_MODE */ - I18N_UCOLLATOR_ON = 17, /**< Turn the feature on - works for #I18N_UCOLLATOR_FRENCH_COLLATION, #I18N_UCOLLATOR_CASE_LEVEL & #I18N_UCOLLATOR_DECOMPOSITION_MODE */ - - I18N_UCOLLATOR_SHIFTED = 20, /**< Valid for #I18N_UCOLLATOR_ALTERNATE_HANDLING. Alternate handling will be shifted. */ - I18N_UCOLLATOR_NON_IGNORABLE = 21, /**< Valid for #I18N_UCOLLATOR_ALTERNATE_HANDLING. Alternate handling will be non ignorable. */ - I18N_UCOLLATOR_LOWER_FIRST = 24, /**< Valid for #I18N_UCOLLATOR_CASE_FIRST - lower case sorts before upper case. */ - I18N_UCOLLATOR_UPPER_FIRST = 25, /**< Upper case sorts before lower case. */ - I18N_UCOLLATOR_ATTRIBUTE_VALUE_COUNT + I18N_UCOLLATOR_DEFAULT = -1, /**< Accepted by most attributes */ + I18N_UCOLLATOR_PRIMARY = 0, /**< Primary collation strength */ + I18N_UCOLLATOR_SECONDARY = 1, /**< Secondary collation strength */ + I18N_UCOLLATOR_TERTIARY = 2, /**< Tertiary collation strength */ + I18N_UCOLLATOR_DEFAULT_STRENGTH = I18N_UCOLLATOR_TERTIARY, /**< Default collation strength */ + I18N_UCOLLATOR_CE_STRENGTH_LIMIT, + I18N_UCOLLATOR_QUATERNARY = 3, /**< Quaternary collation strength */ + I18N_UCOLLATOR_IDENTICAL = 15, /**< Identical collation strength */ + I18N_UCOLLATOR_STRENGTH_LIMIT, + + I18N_UCOLLATOR_OFF = 16, /**< Turn the feature off - works for #I18N_UCOLLATOR_FRENCH_COLLATION, #I18N_UCOLLATOR_CASE_LEVEL & #I18N_UCOLLATOR_DECOMPOSITION_MODE */ + I18N_UCOLLATOR_ON = 17, /**< Turn the feature on - works for #I18N_UCOLLATOR_FRENCH_COLLATION, #I18N_UCOLLATOR_CASE_LEVEL & #I18N_UCOLLATOR_DECOMPOSITION_MODE */ + + I18N_UCOLLATOR_SHIFTED = 20, /**< Valid for #I18N_UCOLLATOR_ALTERNATE_HANDLING. Alternate handling will be shifted. */ + I18N_UCOLLATOR_NON_IGNORABLE = 21, /**< Valid for #I18N_UCOLLATOR_ALTERNATE_HANDLING. Alternate handling will be non ignorable. */ + I18N_UCOLLATOR_LOWER_FIRST = 24, /**< Valid for #I18N_UCOLLATOR_CASE_FIRST - lower case sorts before upper case. */ + I18N_UCOLLATOR_UPPER_FIRST = 25, /**< Upper case sorts before lower case. */ + I18N_UCOLLATOR_ATTRIBUTE_VALUE_COUNT } i18n_ucollator_attribute_value_e; /** * @brief Enumeration in which the base letter represents a primary difference. Set comparison level to #I18N_UCOLLATOR_PRIMARY to ignore secondary and tertiary differences. Use this to set the strength of an #i18n_ucollator_h. Example of primary difference, "abc" < "abd" - * Diacritical differences on the same base letter represent a secondary difference. Set comparison level to #I18N_UCOLLATOR_SECONDARY to ignore tertiary differences. Use this to set the strength of an #i18n_ucollator_h. Example of secondary difference, "ä" >> "a". - * Uppercase and lowercase versions of the same character represent a tertiary difference. Set comparison level to #I18N_UCOLLATOR_TERTIARY to include all comparison differences. Use this to set the strength of an #i18n_ucollator_h. Example of tertiary difference, "abc" <<< "ABC". - * Two characters are considered "identical" when they have the same unicode spellings. #I18N_UCOLLATOR_IDENTICAL. For example, "ä" == "ä". - * #i18n_ucollator_strength_e is also used to determine the strength of sort keys generated from #i18n_ucollator_h. These values can now be found in the #i18n_ucollator_attribute_value_e enum. + * Diacritical differences on the same base letter represent a secondary difference. Set comparison level to #I18N_UCOLLATOR_SECONDARY to ignore tertiary differences. Use this to set the strength of an #i18n_ucollator_h. Example of secondary difference, "ä" >> "a". + * Uppercase and lowercase versions of the same character represent a tertiary difference. Set comparison level to #I18N_UCOLLATOR_TERTIARY to include all comparison differences. Use this to set the strength of an #i18n_ucollator_h. Example of tertiary difference, "abc" <<< "ABC". + * Two characters are considered "identical" when they have the same unicode spellings. #I18N_UCOLLATOR_IDENTICAL. For example, "ä" == "ä". + * #i18n_ucollator_strength_e is also used to determine the strength of sort keys generated from #i18n_ucollator_h. These values can now be found in the #i18n_ucollator_attribute_value_e enum. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef i18n_ucollator_attribute_value_e i18n_ucollator_strength_e; /** * @brief Enumeration for source and target string comparison result. - * #I18N_UCOLLATOR_LESS is returned if the source string is compared to be less than the target string in the {@link i18n_ucollator_str_collator() } method. - * #I18N_UCOLLATOR_EQUAL is returned if the source string is compared to be equal to the target string in the {@link i18n_ucollator_str_collator() } method. - * #I18N_UCOLLATOR_GREATER is returned if the source string is compared to be greater than the target string in the {@link #i18n_ucollator_str_collator() } method. + * #I18N_UCOLLATOR_LESS is returned if the source string is compared to be less than the target string in the {@link i18n_ucollator_str_collator() } method. + * #I18N_UCOLLATOR_EQUAL is returned if the source string is compared to be equal to the target string in the {@link i18n_ucollator_str_collator() } method. + * #I18N_UCOLLATOR_GREATER is returned if the source string is compared to be greater than the target string in the {@link #i18n_ucollator_str_collator() } method. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCOLLATOR_EQUAL = 0, /**< string a == string b */ - I18N_UCOLLATOR_GREATER = 1, /**< string a > string b */ - I18N_UCOLLATOR_LESS = -1 /**< string a < string b */ + I18N_UCOLLATOR_EQUAL = 0, /**< string a == string b */ + I18N_UCOLLATOR_GREATER = 1, /**< string a > string b */ + I18N_UCOLLATOR_LESS = -1 /**< string a < string b */ } i18n_ucollator_result_e; /** @@ -1311,26 +1311,26 @@ typedef enum { * */ -typedef const void* i18n_unormalizer_h; +typedef const void *i18n_unormalizer_h; /** * @brief Enumeration of constants for normalization modes. - * For details about standard Unicode normalization forms and about the algorithms which are also used with custom mapping tables see http://www.unicode.org/unicode/reports/tr15/ + * For details about standard Unicode normalization forms and about the algorithms which are also used with custom mapping tables see http://www.unicode.org/unicode/reports/tr15/ * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UNORMALIZATION_COMPOSE, /**< Decomposition followed by composition. Same as standard NFC when using an "nfc" instance. Same as standard NFKC when using an "nfkc" instance. - For details about standard Unicode normalization forms see http://www.unicode.org/unicode/reports/tr15/ */ - I18N_UNORMALIZATION_DECOMPOSE, /**< Map and reorder canonically. Same as standard NFD when using an "nfc" instance. Same as standard NFKD when using an "nfkc" instance. - For details about standard Unicode normalization forms see http://www.unicode.org/unicode/reports/tr15/ */ - I18N_UNORMALIZATION_FCD, /**< "Fast C or D" form. If a string is in this form, then further decomposition without reordering would yield the same form as DECOMPOSE. - Text in "Fast C or D" form can be processed efficiently with data tables that are "canonically closed", - that is, that provide equivalent data for equivalent text, without having to be fully normalized. - Not a standard Unicode normalization form. Not a unique form: Different FCD strings can be canonically equivalent. - For details see http://www.unicode.org/notes/tn5/#FCD */ - I18N_UNORMALIZATION_COMPOSE_CONTIGUOUS /**< Compose only contiguously. Also known as "FCC" or "Fast C Contiguous". The result will often but not always be in NFC. - The result will conform to FCD which is useful for processing. Not a standard Unicode normalization form. - For details see http://www.unicode.org/notes/tn5/#FCC */ + I18N_UNORMALIZATION_COMPOSE, /**< Decomposition followed by composition. Same as standard NFC when using an "nfc" instance. Same as standard NFKC when using an "nfkc" instance. + For details about standard Unicode normalization forms see http://www.unicode.org/unicode/reports/tr15/ */ + I18N_UNORMALIZATION_DECOMPOSE, /**< Map and reorder canonically. Same as standard NFD when using an "nfc" instance. Same as standard NFKD when using an "nfkc" instance. + For details about standard Unicode normalization forms see http://www.unicode.org/unicode/reports/tr15/ */ + I18N_UNORMALIZATION_FCD, /**< "Fast C or D" form. If a string is in this form, then further decomposition without reordering would yield the same form as DECOMPOSE. + Text in "Fast C or D" form can be processed efficiently with data tables that are "canonically closed", + that is, that provide equivalent data for equivalent text, without having to be fully normalized. + Not a standard Unicode normalization form. Not a unique form: Different FCD strings can be canonically equivalent. + For details see http://www.unicode.org/notes/tn5/#FCD */ + I18N_UNORMALIZATION_COMPOSE_CONTIGUOUS /**< Compose only contiguously. Also known as "FCC" or "Fast C Contiguous". The result will often but not always be in NFC. + The result will conform to FCD which is useful for processing. Not a standard Unicode normalization form. + For details see http://www.unicode.org/notes/tn5/#FCC */ } i18n_unormalization_mode_e; /** @@ -1339,9 +1339,9 @@ typedef enum { * @since_tizen 2.4 */ typedef enum { - I18N_UNORMALIZATION_NO, /**< The input string is not in the normalization form. */ - I18N_UNORMALIZATION_YES, /**< The input string is in the normalization form. */ - I18N_UNORMALIZATION_MAYBE /**< The input string may or may not be in the normalization form. */ + I18N_UNORMALIZATION_NO, /**< The input string is not in the normalization form. */ + I18N_UNORMALIZATION_YES, /**< The input string is in the normalization form. */ + I18N_UNORMALIZATION_MAYBE /**< The input string may or may not be in the normalization form. */ } i18n_unormalization_check_result_e; /** @@ -1358,7 +1358,7 @@ typedef enum { * @brief i18n_usearch_h. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ -typedef void* i18n_usearch_h; +typedef void *i18n_usearch_h; /** * @} @@ -1374,7 +1374,7 @@ typedef void* i18n_usearch_h; * @brief i18n_ucalendar_h. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ -typedef void* i18n_ucalendar_h; +typedef void *i18n_ucalendar_h; /** * @brief The time zone ID reserved for unknown time zone. @@ -1387,53 +1387,53 @@ typedef void* i18n_ucalendar_h; * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCALENDAR_ERA, /**< Field number indicating the era, e.g., AD or BC in the Gregorian (Julian) calendar */ - I18N_UCALENDAR_YEAR, /**< Field number indicating the year */ - I18N_UCALENDAR_MONTH, /**< Field number indicating the month. This is a calendar-specific value. \n The first month of the year is JANUARY; - the last depends on the number of months in a year */ - I18N_UCALENDAR_WEEK_OF_YEAR, /**< Field number indicating the week number within the current year. \n - The first week of the year, as defined by the #I18N_UCALENDAR_FIRST_DAY_OF_WEEK and #I18N_UCALENDAR_MINIMAL_DAYS_IN_FIRST_WEEK attributes, has value 1. - Subclasses define the value of #I18N_UCALENDAR_WEEK_OF_YEAR for days before the first week of the year */ - I18N_UCALENDAR_WEEK_OF_MONTH, /**< Field number indicating the week number within the current month. \n - The first week of the month, as defined by the #I18N_UCALENDAR_FIRST_DAY_OF_WEEK and #I18N_UCALENDAR_MINIMAL_DAYS_IN_FIRST_WEEK attributes, has value 1. - Subclasses define the value of WEEK_OF_MONTH for days before the first week of the month */ - I18N_UCALENDAR_DATE, /**< Field number indicating the day of the month. \n This is a synonym for DAY_OF_MONTH. The first day of the month has value 1 */ - I18N_UCALENDAR_DAY_OF_YEAR, /**< Field number indicating the day number within the current year. \n The first day of the year has value 1. */ - I18N_UCALENDAR_DAY_OF_WEEK, /**< Field number indicating the day of the week. \n - This field takes values "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday" */ - I18N_UCALENDAR_DAY_OF_WEEK_IN_MONTH, /**< Field number indicating the ordinal number of the day of the week within the current month. \n - Together with the "day of week" field, this uniquely specifies a day within a month. - "day of month" 1 through 7 always correspond to "day of week in month" 1; 8 through 15 correspond to "day of week in month" 2, and so on. - "day of week in month" 0 indicates the week before "day of week in month" 1. - Negative values count back from the end of the month, so the last Sunday of a month is specified as "day of week" = "Sunday", - "day of week in month" = -1. Because negative values count backward they will usually be aligned differently within the month than positive values. - For example, if a month has 31 days, "day of week in month" -1 will overlap "day of week in month" 5 and the end of 4 */ - I18N_UCALENDAR_AM_PM, /**< Field number indicating whether the "hour" is before or after noon. \n E.g., at 10:04:15.250 PM the AM_PM is PM */ - I18N_UCALENDAR_HOUR, /**< Field number indicating the hour of the morning or afternoon. \n "hour" is used for the 12-hour clock. E.g., at 10:04:15.250 PM the "Hour" is 10 */ - I18N_UCALENDAR_HOUR_OF_DAY, /**< Field number indicating the hour of the day. \n "Hour of day" is used for the 24-hour clock. E.g., at 10:04:15.250 PM the "Hour of day" is 22 */ - I18N_UCALENDAR_MINUTE, /**< Field number indicating the minute within the hour. \n E.g., at 10:04:15.250 PM the #I18N_UCALENDAR_MINUTE is 4 */ - I18N_UCALENDAR_SECOND, /**< Field number indicating the second within the minute. \n E.g., at 10:04:15.250 PM the #I18N_UCALENDAR_SECOND is 15 */ - I18N_UCALENDAR_MILLISECOND, /**< Field number indicating the millisecond within the second. \n E.g., at 10:04:15.250 PM the #I18N_UCALENDAR_MILLISECOND is 250 */ - I18N_UCALENDAR_ZONE_OFFSET, /**< Field number indicating the raw offset from GMT in milliseconds */ - I18N_UCALENDAR_DST_OFFSET, /**< Field number indicating the daylight savings offset in milliseconds */ - I18N_UCALENDAR_YEAR_WOY, /**< Field number indicating the extended year corresponding to the #I18N_UCALENDAR_WEEK_OF_YEAR field. \n - This may be one greater or less than the value of #I18N_UCALENDAR_EXTENDED_YEAR */ - I18N_UCALENDAR_DOW_LOCAL, /**< Field number indicating the localized day of the week. \n - This will be a value from 1 to 7 inclusive, with 1 being the localized first day of the week */ - I18N_UCALENDAR_EXTENDED_YEAR, /**< Year of this calendar system, encompassing all supra-year fields. \n - For example, in Gregorian/Julian calendars, positive Extended Year values indicate years AD, 1 BC = 0 extended, 2 BC = -1 extended, and so on */ - I18N_UCALENDAR_JULIAN_DAY, /**< Field number indicating the modified Julian day number. \n - This is different from the conventional Julian day number in two regards. - First, it demarcates days at local zone midnight, rather than noon GMT. Second, it is a local number; that is, it depends on the local time zone. - It can be thought of as a single number that encompasses all the date-related fields */ - I18N_UCALENDAR_MILLISECONDS_IN_DAY, /**< Ranges from 0 to 23:59:59.999 (regardless of DST). \n - This field behaves exactly like a composite of all time-related fields, not including the zone fields. - As such, it also reflects discontinuities in those fields on DST transition days. On a day of DST onset, it will jump forward. - On a day of DST cessation, it will jump backward. - This reflects the fact that it must be combined with the DST offset field to obtain a unique local time value */ - I18N_UCALENDAR_IS_LEAP_MONTH, /**< Whether or not the current month is a leap month (0 or 1) */ - I18N_UCALENDAR_FIELD_COUNT, /**< Number of enumerators */ - I18N_UCALENDAR_DAY_OF_MONTH = I18N_UCALENDAR_DATE /**< Field number indicating the day of the month. \n This is a synonym for #I18N_UCALENDAR_DATE. The first day of the month has value 1 */ + I18N_UCALENDAR_ERA, /**< Field number indicating the era, e.g., AD or BC in the Gregorian (Julian) calendar */ + I18N_UCALENDAR_YEAR, /**< Field number indicating the year */ + I18N_UCALENDAR_MONTH, /**< Field number indicating the month. This is a calendar-specific value. \n The first month of the year is JANUARY; + the last depends on the number of months in a year */ + I18N_UCALENDAR_WEEK_OF_YEAR, /**< Field number indicating the week number within the current year. \n + The first week of the year, as defined by the #I18N_UCALENDAR_FIRST_DAY_OF_WEEK and #I18N_UCALENDAR_MINIMAL_DAYS_IN_FIRST_WEEK attributes, has value 1. + Subclasses define the value of #I18N_UCALENDAR_WEEK_OF_YEAR for days before the first week of the year */ + I18N_UCALENDAR_WEEK_OF_MONTH, /**< Field number indicating the week number within the current month. \n + The first week of the month, as defined by the #I18N_UCALENDAR_FIRST_DAY_OF_WEEK and #I18N_UCALENDAR_MINIMAL_DAYS_IN_FIRST_WEEK attributes, has value 1. + Subclasses define the value of WEEK_OF_MONTH for days before the first week of the month */ + I18N_UCALENDAR_DATE, /**< Field number indicating the day of the month. \n This is a synonym for DAY_OF_MONTH. The first day of the month has value 1 */ + I18N_UCALENDAR_DAY_OF_YEAR, /**< Field number indicating the day number within the current year. \n The first day of the year has value 1. */ + I18N_UCALENDAR_DAY_OF_WEEK, /**< Field number indicating the day of the week. \n + This field takes values "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday" */ + I18N_UCALENDAR_DAY_OF_WEEK_IN_MONTH, /**< Field number indicating the ordinal number of the day of the week within the current month. \n + Together with the "day of week" field, this uniquely specifies a day within a month. + "day of month" 1 through 7 always correspond to "day of week in month" 1; 8 through 15 correspond to "day of week in month" 2, and so on. + "day of week in month" 0 indicates the week before "day of week in month" 1. + Negative values count back from the end of the month, so the last Sunday of a month is specified as "day of week" = "Sunday", + "day of week in month" = -1. Because negative values count backward they will usually be aligned differently within the month than positive values. + For example, if a month has 31 days, "day of week in month" -1 will overlap "day of week in month" 5 and the end of 4 */ + I18N_UCALENDAR_AM_PM, /**< Field number indicating whether the "hour" is before or after noon. \n E.g., at 10:04:15.250 PM the AM_PM is PM */ + I18N_UCALENDAR_HOUR, /**< Field number indicating the hour of the morning or afternoon. \n "hour" is used for the 12-hour clock. E.g., at 10:04:15.250 PM the "Hour" is 10 */ + I18N_UCALENDAR_HOUR_OF_DAY, /**< Field number indicating the hour of the day. \n "Hour of day" is used for the 24-hour clock. E.g., at 10:04:15.250 PM the "Hour of day" is 22 */ + I18N_UCALENDAR_MINUTE, /**< Field number indicating the minute within the hour. \n E.g., at 10:04:15.250 PM the #I18N_UCALENDAR_MINUTE is 4 */ + I18N_UCALENDAR_SECOND, /**< Field number indicating the second within the minute. \n E.g., at 10:04:15.250 PM the #I18N_UCALENDAR_SECOND is 15 */ + I18N_UCALENDAR_MILLISECOND, /**< Field number indicating the millisecond within the second. \n E.g., at 10:04:15.250 PM the #I18N_UCALENDAR_MILLISECOND is 250 */ + I18N_UCALENDAR_ZONE_OFFSET, /**< Field number indicating the raw offset from GMT in milliseconds */ + I18N_UCALENDAR_DST_OFFSET, /**< Field number indicating the daylight savings offset in milliseconds */ + I18N_UCALENDAR_YEAR_WOY, /**< Field number indicating the extended year corresponding to the #I18N_UCALENDAR_WEEK_OF_YEAR field. \n + This may be one greater or less than the value of #I18N_UCALENDAR_EXTENDED_YEAR */ + I18N_UCALENDAR_DOW_LOCAL, /**< Field number indicating the localized day of the week. \n + This will be a value from 1 to 7 inclusive, with 1 being the localized first day of the week */ + I18N_UCALENDAR_EXTENDED_YEAR, /**< Year of this calendar system, encompassing all supra-year fields. \n + For example, in Gregorian/Julian calendars, positive Extended Year values indicate years AD, 1 BC = 0 extended, 2 BC = -1 extended, and so on */ + I18N_UCALENDAR_JULIAN_DAY, /**< Field number indicating the modified Julian day number. \n + This is different from the conventional Julian day number in two regards. + First, it demarcates days at local zone midnight, rather than noon GMT. Second, it is a local number; that is, it depends on the local time zone. + It can be thought of as a single number that encompasses all the date-related fields */ + I18N_UCALENDAR_MILLISECONDS_IN_DAY, /**< Ranges from 0 to 23:59:59.999 (regardless of DST). \n + This field behaves exactly like a composite of all time-related fields, not including the zone fields. + As such, it also reflects discontinuities in those fields on DST transition days. On a day of DST onset, it will jump forward. + On a day of DST cessation, it will jump backward. + This reflects the fact that it must be combined with the DST offset field to obtain a unique local time value */ + I18N_UCALENDAR_IS_LEAP_MONTH, /**< Whether or not the current month is a leap month (0 or 1) */ + I18N_UCALENDAR_FIELD_COUNT, /**< Number of enumerators */ + I18N_UCALENDAR_DAY_OF_MONTH = I18N_UCALENDAR_DATE /**< Field number indicating the day of the month. \n This is a synonym for #I18N_UCALENDAR_DATE. The first day of the month has value 1 */ } i18n_ucalendar_date_fields_e; /** @@ -1441,9 +1441,9 @@ typedef enum { * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCALENDAR_TRADITIONAL, /**< Despite the name, #I18N_UCALENDAR_TRADITIONAL designates the locale's default calendar, which may be the Gregorian calendar or some other calendar */ - I18N_UCALENDAR_DEFAULT = I18N_UCALENDAR_TRADITIONAL, /**< A better name for #I18N_UCALENDAR_TRADITIONAL */ - I18N_UCALENDAR_GREGORIAN /**< Unambiguously designates the Gregorian calendar for the locale */ + I18N_UCALENDAR_TRADITIONAL, /**< Despite the name, #I18N_UCALENDAR_TRADITIONAL designates the locale's default calendar, which may be the Gregorian calendar or some other calendar */ + I18N_UCALENDAR_DEFAULT = I18N_UCALENDAR_TRADITIONAL, /**< A better name for #I18N_UCALENDAR_TRADITIONAL */ + I18N_UCALENDAR_GREGORIAN /**< Unambiguously designates the Gregorian calendar for the locale */ } i18n_ucalendar_type_e; /** @@ -1451,18 +1451,18 @@ typedef enum { * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCALENDAR_JANUARY, /**< January */ - I18N_UCALENDAR_FEBRUARY, /**< February */ - I18N_UCALENDAR_MARCH, /**< March */ - I18N_UCALENDAR_APRIL, /**< April */ - I18N_UCALENDAR_MAY, /**< May */ - I18N_UCALENDAR_JUNE, /**< June */ - I18N_UCALENDAR_JULY, /**< July */ - I18N_UCALENDAR_AUGUST, /**< August */ - I18N_UCALENDAR_SEPTEMBER, /**< September */ - I18N_UCALENDAR_OCTOBER, /**< October */ - I18N_UCALENDAR_NOVEMBER, /**< November */ - I18N_UCALENDAR_DECEMBER /**< December */ + I18N_UCALENDAR_JANUARY, /**< January */ + I18N_UCALENDAR_FEBRUARY, /**< February */ + I18N_UCALENDAR_MARCH, /**< March */ + I18N_UCALENDAR_APRIL, /**< April */ + I18N_UCALENDAR_MAY, /**< May */ + I18N_UCALENDAR_JUNE, /**< June */ + I18N_UCALENDAR_JULY, /**< July */ + I18N_UCALENDAR_AUGUST, /**< August */ + I18N_UCALENDAR_SEPTEMBER, /**< September */ + I18N_UCALENDAR_OCTOBER, /**< October */ + I18N_UCALENDAR_NOVEMBER, /**< November */ + I18N_UCALENDAR_DECEMBER /**< December */ } i18n_ucalendar_months_e; /** @@ -1470,10 +1470,10 @@ typedef enum { * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCALENDAR_STANDARD, /**< Standard display name */ - I18N_UCALENDAR_SHORT_STANDARD, /**< Short standard display name */ - I18N_UCALENDAR_DST, /**< Daylight savings display name */ - I18N_UCALENDAR_SHORT_DST /**< Short daylight savings display name */ + I18N_UCALENDAR_STANDARD, /**< Standard display name */ + I18N_UCALENDAR_SHORT_STANDARD, /**< Short standard display name */ + I18N_UCALENDAR_DST, /**< Daylight savings display name */ + I18N_UCALENDAR_SHORT_DST /**< Short daylight savings display name */ } i18n_ucalendar_displayname_type_e; /** @@ -1481,9 +1481,9 @@ typedef enum { * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCALENDAR_LENIENT, /**< Lenient parsing */ - I18N_UCALENDAR_FIRST_DAY_OF_WEEK, /**< First day of the week */ - I18N_UCALENDAR_MINIMAL_DAYS_IN_FIRST_WEEK /**< Minimum number of days in the first week */ + I18N_UCALENDAR_LENIENT, /**< Lenient parsing */ + I18N_UCALENDAR_FIRST_DAY_OF_WEEK, /**< First day of the week */ + I18N_UCALENDAR_MINIMAL_DAYS_IN_FIRST_WEEK /**< Minimum number of days in the first week */ } i18n_ucalendar_attribute_e; /** @@ -1491,9 +1491,9 @@ typedef enum { * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UCALENDAR_ZONE_TYPE_ANY, /**< Any system zones. */ - I18N_UCALENDAR_ZONE_TYPE_CANONICAL, /**< Canonical system zones. */ - I18N_UCALENDAR_ZONE_TYPE_CANONICAL_LOCATION /**< Canonical system zones associated with actual locations. */ + I18N_UCALENDAR_ZONE_TYPE_ANY, /**< Any system zones. */ + I18N_UCALENDAR_ZONE_TYPE_CANONICAL, /**< Canonical system zones. */ + I18N_UCALENDAR_ZONE_TYPE_CANONICAL_LOCATION /**< Canonical system zones associated with actual locations. */ } i18n_system_timezone_type_e; /** @@ -1501,12 +1501,12 @@ typedef enum { * @since_tizen 2.3.1 */ typedef enum { - I18N_UCALENDAR_MINIMUM, /**< Minimum value */ - I18N_UCALENDAR_MAXIMUM, /**< Maximum value */ - I18N_UCALENDAR_GREATEST_MINIMUM, /**< Greatest minimum value */ - I18N_UCALENDAR_LEAST_MAXIMUM, /**< Least maximum value */ - I18N_UCALENDAR_ACTUAL_MINIMUM, /**< Actual minimum value */ - I18N_UCALENDAR_ACTUAL_MAXIMUM /**< Actual maximum value */ + I18N_UCALENDAR_MINIMUM, /**< Minimum value */ + I18N_UCALENDAR_MAXIMUM, /**< Maximum value */ + I18N_UCALENDAR_GREATEST_MINIMUM, /**< Greatest minimum value */ + I18N_UCALENDAR_LEAST_MAXIMUM, /**< Least maximum value */ + I18N_UCALENDAR_ACTUAL_MINIMUM, /**< Actual minimum value */ + I18N_UCALENDAR_ACTUAL_MAXIMUM /**< Actual maximum value */ } i18n_ucalendar_limit_type_e; /** @@ -1514,28 +1514,28 @@ typedef enum { * @since_tizen 2.3.1 */ typedef enum { - I18N_UCALENDAR_WEEKDAY, /**< Designates a full weekday (no part of the day is included in the weekend). */ - I18N_UCALENDAR_WEEKEND, /**< Designates a full weekend day (the entire day is included in the weekend). */ - I18N_UCALENDAR_WEEKEND_ONSET, /**< Designates a day that starts as a weekday and transitions to the weekend. - Call i18n_ucalendar_get_weekend_transition() to get the time of transition. */ - I18N_UCALENDAR_WEEKEND_CEASE, /**< Designates a day that starts as the weekend and transitions to a weekday. - Call i18n_ucalendar_get_weekend_transition() to get the time of transition. */ + I18N_UCALENDAR_WEEKDAY, /**< Designates a full weekday (no part of the day is included in the weekend). */ + I18N_UCALENDAR_WEEKEND, /**< Designates a full weekend day (the entire day is included in the weekend). */ + I18N_UCALENDAR_WEEKEND_ONSET, /**< Designates a day that starts as a weekday and transitions to the weekend. + Call i18n_ucalendar_get_weekend_transition() to get the time of transition. */ + I18N_UCALENDAR_WEEKEND_CEASE, /**< Designates a day that starts as the weekend and transitions to a weekday. + Call i18n_ucalendar_get_weekend_transition() to get the time of transition. */ } i18n_ucalendar_weekday_type_e; /** * @brief Useful constants for days of week. * @details Note: Calendar day-of-week is 1-based. Clients who create locale resources for the field of first-day-of-week should be aware of this. - * For instance, in US locale, first-day-of-week is set to 1, i.e., #I18N_UCALENDAR_SUNDAY. Possible days of the week in an #i18n_ucalendar_h. + * For instance, in US locale, first-day-of-week is set to 1, i.e., #I18N_UCALENDAR_SUNDAY. Possible days of the week in an #i18n_ucalendar_h. * @since_tizen 2.3.1 */ typedef enum { - I18N_UCALENDAR_SUNDAY = 1, /**< Sunday */ - I18N_UCALENDAR_MONDAY, /**< Monday */ - I18N_UCALENDAR_TUESDAY, /**< Tuesday */ - I18N_UCALENDAR_WEDNESDAY, /**< Wednesday */ - I18N_UCALENDAR_THURSDAY, /**< Thursday */ - I18N_UCALENDAR_FRIDAY, /**< Friday */ - I18N_UCALENDAR_SATURDAY /**< Saturday */ + I18N_UCALENDAR_SUNDAY = 1, /**< Sunday */ + I18N_UCALENDAR_MONDAY, /**< Monday */ + I18N_UCALENDAR_TUESDAY, /**< Tuesday */ + I18N_UCALENDAR_WEDNESDAY, /**< Wednesday */ + I18N_UCALENDAR_THURSDAY, /**< Thursday */ + I18N_UCALENDAR_FRIDAY, /**< Friday */ + I18N_UCALENDAR_SATURDAY /**< Saturday */ } i18n_ucalendar_days_of_week_e; /** @@ -1545,10 +1545,10 @@ typedef enum { * @see i18n_ucalendar_get_timezone_transition_date() */ typedef enum { - I18N_UCALENDAR_TZ_TRANSITION_NEXT, /**< Get the next transition after the current date, i.e. excludes the current date */ - I18N_UCALENDAR_TZ_TRANSITION_NEXT_INCLUSIVE, /**< Get the next transition on or after the current date, i.e. may include the current date */ - I18N_UCALENDAR_TZ_TRANSITION_PREVIOUS, /**< Get the previous transition before the current date, i.e. excludes the current date */ - I18N_UCALENDAR_TZ_TRANSITION_PREVIOUS_INCLUSIVE, /**< Get the previous transition on or before the current date, i.e. may include the current date */ + I18N_UCALENDAR_TZ_TRANSITION_NEXT, /**< Get the next transition after the current date, i.e. excludes the current date */ + I18N_UCALENDAR_TZ_TRANSITION_NEXT_INCLUSIVE, /**< Get the next transition on or after the current date, i.e. may include the current date */ + I18N_UCALENDAR_TZ_TRANSITION_PREVIOUS, /**< Get the previous transition before the current date, i.e. excludes the current date */ + I18N_UCALENDAR_TZ_TRANSITION_PREVIOUS_INCLUSIVE, /**< Get the previous transition on or before the current date, i.e. may include the current date */ } i18n_utimezone_transition_type_e; /** @@ -1583,9 +1583,9 @@ typedef void *i18n_udate_format_h; * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef struct { - int32_t field; /**< The field. */ - int32_t beginIndex; /**< The start of the text range containing field.*/ - int32_t endIndex; /**< The limit of the text range containing field.*/ + int32_t field; /**< The field. */ + int32_t beginIndex; /**< The start of the text range containing field.*/ + int32_t endIndex; /**< The limit of the text range containing field.*/ } i18n_ufield_position_s; /** @@ -1599,18 +1599,18 @@ typedef i18n_ufield_position_s *i18n_ufield_position_h; * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - I18N_UDATE_FULL, /**< Full style */ - I18N_UDATE_LONG, /**< Long style */ - I18N_UDATE_MEDIUM, /**< Medium style */ - I18N_UDATE_SHORT, /**< Short style */ - I18N_UDATE_DEFAULT = I18N_UDATE_MEDIUM, /**< Default style */ - I18N_UDATE_RELATIVE = (1 << 7), /**< Bitfield for relative date */ - I18N_UDATE_FULL_RELATIVE = I18N_UDATE_FULL | I18N_UDATE_RELATIVE, /**< #I18N_UDATE_FULL | #I18N_UDATE_RELATIVE */ - I18N_UDATE_LONG_RELATIVE = I18N_UDATE_LONG | I18N_UDATE_RELATIVE, /**< #I18N_UDATE_LONG | #I18N_UDATE_RELATIVE */ - I18N_UDATE_MEDIUM_RELATIVE = I18N_UDATE_MEDIUM | I18N_UDATE_RELATIVE, /**< #I18N_UDATE_MEDIUM | #I18N_UDATE_RELATIVE */ - I18N_UDATE_SHORT_RELATIVE = I18N_UDATE_SHORT | I18N_UDATE_RELATIVE, /**< #I18N_UDATE_SHORT | #I18N_UDATE_RELATIVE */ - I18N_UDATE_NONE = -1, /**< No style */ - I18N_UDATE_PATTERN = -2 /**< Use the pattern given in the parameter to i18n_udate_create(). */ + I18N_UDATE_FULL, /**< Full style */ + I18N_UDATE_LONG, /**< Long style */ + I18N_UDATE_MEDIUM, /**< Medium style */ + I18N_UDATE_SHORT, /**< Short style */ + I18N_UDATE_DEFAULT = I18N_UDATE_MEDIUM, /**< Default style */ + I18N_UDATE_RELATIVE = (1 << 7), /**< Bitfield for relative date */ + I18N_UDATE_FULL_RELATIVE = I18N_UDATE_FULL | I18N_UDATE_RELATIVE, /**< #I18N_UDATE_FULL | #I18N_UDATE_RELATIVE */ + I18N_UDATE_LONG_RELATIVE = I18N_UDATE_LONG | I18N_UDATE_RELATIVE, /**< #I18N_UDATE_LONG | #I18N_UDATE_RELATIVE */ + I18N_UDATE_MEDIUM_RELATIVE = I18N_UDATE_MEDIUM | I18N_UDATE_RELATIVE, /**< #I18N_UDATE_MEDIUM | #I18N_UDATE_RELATIVE */ + I18N_UDATE_SHORT_RELATIVE = I18N_UDATE_SHORT | I18N_UDATE_RELATIVE, /**< #I18N_UDATE_SHORT | #I18N_UDATE_RELATIVE */ + I18N_UDATE_NONE = -1, /**< No style */ + I18N_UDATE_PATTERN = -2 /**< Use the pattern given in the parameter to i18n_udate_create(). */ } i18n_udate_format_style_e; /** @@ -1618,41 +1618,41 @@ typedef enum { * @since_tizen 2.3.1 */ typedef enum { - I18N_UDATE_FORMAT_ERA_FIELD, /**< Era field */ - I18N_UDATE_FORMAT_YEAR_FIELD, /**< Year field */ - I18N_UDATE_FORMAT_MONTH_FIELD, /**< Month field */ - I18N_UDATE_FORMAT_DATE_FIELD, /**< Date field */ - I18N_UDATE_FORMAT_HOUR_OF_DAY1_FIELD, /**< Hour of day1 field */ - I18N_UDATE_FORMAT_HOUR_OF_DAY0_FIELD, /**< Hour of day0 field */ - I18N_UDATE_FORMAT_MINUTE_FIELD, /**< Minute field */ - I18N_UDATE_FORMAT_SECOND_FIELD, /**< Second field */ - I18N_UDATE_FORMAT_FRACTIONAL_SECOND_FIELD, /**< Fractional second field */ - I18N_UDATE_FORMAT_DAY_OF_WEEK_FIELD, /**< Day of week field */ - I18N_UDATE_FORMAT_DAY_OF_YEAR_FIELD, /**< Day of year field */ - I18N_UDATE_FORMAT_DAY_OF_WEEK_IN_MONTH_FIELD, /**< Day of week in month field */ - I18N_UDATE_FORMAT_WEEK_OF_YEAR_FIELD, /**< Week of year field */ - I18N_UDATE_FORMAT_WEEK_OF_MONTH_FIELD, /**< Week of month field */ - I18N_UDATE_FORMAT_AM_PM_FIELD, /**< a.m. / p.m. field */ - I18N_UDATE_FORMAT_HOUR1_FIELD, /**< Hour1 field */ - I18N_UDATE_FORMAT_HOUR0_FIELD, /**< Hour0 field */ - I18N_UDATE_FORMAT_TIMEZONE_FIELD, /**< Timezone field */ - I18N_UDATE_FORMAT_YEAR_WOY_FIELD, /**< Year woy field */ - I18N_UDATE_FORMAT_DOW_LOCAL_FIELD, /**< Dow local field */ - I18N_UDATE_FORMAT_EXTENDED_YEAR_FIELD, /**< Extended year field */ - I18N_UDATE_FORMAT_JULIAN_DAY_FIELD, /**< Julian day field */ - I18N_UDATE_FORMAT_MILLISECONDS_IN_DAY_FIELD, /**< Milliseconds in day field */ - I18N_UDATE_FORMAT_TIMEZONE_RFC_FIELD, /**< Timezone RFC field */ - I18N_UDATE_FORMAT_TIMEZONE_GENERIC_FIELD, /**< Timezone generic field */ - I18N_UDATE_FORMAT_STANDALONE_DAY_FIELD, /**< Standalone day field */ - I18N_UDATE_FORMAT_STANDALONE_MONTH_FIELD, /**< Standalone month field */ - I18N_UDATE_FORMAT_QUARTER_FIELD, /**< Quarter field */ - I18N_UDATE_FORMAT_STANDALONE_QUARTER_FIELD, /**< Standalone quarter field */ - I18N_UDATE_FORMAT_TIMEZONE_SPECIAL_FIELD, /**< Timezone special field */ - I18N_UDATE_FORMAT_YEAR_NAME_FIELD, /**< Year name field */ - I18N_UDATE_FORMAT_TIMEZONE_LOCALIZED_GMT_OFFSET_FIELD, /**< Timezone localized gmt offset field */ - I18N_UDATE_FORMAT_TIMEZONE_ISO_FIELD, /**< Timezone ISO field */ - I18N_UDATE_FORMAT_TIMEZONE_ISO_LOCAL_FIELD, /**< Timezone ISO local field */ - I18N_UDATE_FORMAT_FIELD_COUNT /**< Field count */ + I18N_UDATE_FORMAT_ERA_FIELD, /**< Era field */ + I18N_UDATE_FORMAT_YEAR_FIELD, /**< Year field */ + I18N_UDATE_FORMAT_MONTH_FIELD, /**< Month field */ + I18N_UDATE_FORMAT_DATE_FIELD, /**< Date field */ + I18N_UDATE_FORMAT_HOUR_OF_DAY1_FIELD, /**< Hour of day1 field */ + I18N_UDATE_FORMAT_HOUR_OF_DAY0_FIELD, /**< Hour of day0 field */ + I18N_UDATE_FORMAT_MINUTE_FIELD, /**< Minute field */ + I18N_UDATE_FORMAT_SECOND_FIELD, /**< Second field */ + I18N_UDATE_FORMAT_FRACTIONAL_SECOND_FIELD, /**< Fractional second field */ + I18N_UDATE_FORMAT_DAY_OF_WEEK_FIELD, /**< Day of week field */ + I18N_UDATE_FORMAT_DAY_OF_YEAR_FIELD, /**< Day of year field */ + I18N_UDATE_FORMAT_DAY_OF_WEEK_IN_MONTH_FIELD, /**< Day of week in month field */ + I18N_UDATE_FORMAT_WEEK_OF_YEAR_FIELD, /**< Week of year field */ + I18N_UDATE_FORMAT_WEEK_OF_MONTH_FIELD, /**< Week of month field */ + I18N_UDATE_FORMAT_AM_PM_FIELD, /**< a.m. / p.m. field */ + I18N_UDATE_FORMAT_HOUR1_FIELD, /**< Hour1 field */ + I18N_UDATE_FORMAT_HOUR0_FIELD, /**< Hour0 field */ + I18N_UDATE_FORMAT_TIMEZONE_FIELD, /**< Timezone field */ + I18N_UDATE_FORMAT_YEAR_WOY_FIELD, /**< Year woy field */ + I18N_UDATE_FORMAT_DOW_LOCAL_FIELD, /**< Dow local field */ + I18N_UDATE_FORMAT_EXTENDED_YEAR_FIELD, /**< Extended year field */ + I18N_UDATE_FORMAT_JULIAN_DAY_FIELD, /**< Julian day field */ + I18N_UDATE_FORMAT_MILLISECONDS_IN_DAY_FIELD, /**< Milliseconds in day field */ + I18N_UDATE_FORMAT_TIMEZONE_RFC_FIELD, /**< Timezone RFC field */ + I18N_UDATE_FORMAT_TIMEZONE_GENERIC_FIELD, /**< Timezone generic field */ + I18N_UDATE_FORMAT_STANDALONE_DAY_FIELD, /**< Standalone day field */ + I18N_UDATE_FORMAT_STANDALONE_MONTH_FIELD, /**< Standalone month field */ + I18N_UDATE_FORMAT_QUARTER_FIELD, /**< Quarter field */ + I18N_UDATE_FORMAT_STANDALONE_QUARTER_FIELD, /**< Standalone quarter field */ + I18N_UDATE_FORMAT_TIMEZONE_SPECIAL_FIELD, /**< Timezone special field */ + I18N_UDATE_FORMAT_YEAR_NAME_FIELD, /**< Year name field */ + I18N_UDATE_FORMAT_TIMEZONE_LOCALIZED_GMT_OFFSET_FIELD, /**< Timezone localized gmt offset field */ + I18N_UDATE_FORMAT_TIMEZONE_ISO_FIELD, /**< Timezone ISO field */ + I18N_UDATE_FORMAT_TIMEZONE_ISO_LOCAL_FIELD, /**< Timezone ISO local field */ + I18N_UDATE_FORMAT_FIELD_COUNT /**< Field count */ } i18n_udate_format_field_e; /** @@ -1660,28 +1660,28 @@ typedef enum { * @since_tizen 2.3.1 */ typedef enum { - I18N_UDATE_FORMAT_SYMBOL_TYPE_ERAS, /**< Eras */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_MONTHS, /**< Months */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_SHORT_MONTHS, /**< Short months */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_WEEKDAYS, /**< Weekdays */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_SHORT_WEEKDAYS, /**< Short weekdays */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_AM_PMS, /**< AM PMs */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_LOCALIZED_CHARS, /**< Localized chars */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_ERA_NAMES, /**< Era names */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_NARROW_MONTHS, /**< Narrow months */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_NARROW_WEEKDAYS, /**< Narrow weekdays */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_MONTHS, /**< Standalone months */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_SHORT_MONTHS, /**< Standalone short months */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_NARROW_MONTHS, /**< Standalone narrow months */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_WEEKDAYS, /**< Standalone weekdays */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_SHORT_WEEKDAYS, /**< Standalone short weekdays */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_NARROW_WEEKDAYS, /**< Standalone narrow weekdays */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_QUARTERS, /**< Quarters */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_SHORT_QUARTERS, /**< Short quarters */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_QUARTERS, /**< Standalone quarters */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_SHORT_QUARTERS, /**< Standalone short quarters */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_SHORTER_WEEKDAYS, /**< Shorter weekdays */ - I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_SHORTER_WEEKDAYS, /**< Standalone shorter weekdays */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_ERAS, /**< Eras */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_MONTHS, /**< Months */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_SHORT_MONTHS, /**< Short months */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_WEEKDAYS, /**< Weekdays */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_SHORT_WEEKDAYS, /**< Short weekdays */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_AM_PMS, /**< AM PMs */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_LOCALIZED_CHARS, /**< Localized chars */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_ERA_NAMES, /**< Era names */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_NARROW_MONTHS, /**< Narrow months */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_NARROW_WEEKDAYS, /**< Narrow weekdays */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_MONTHS, /**< Standalone months */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_SHORT_MONTHS, /**< Standalone short months */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_NARROW_MONTHS, /**< Standalone narrow months */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_WEEKDAYS, /**< Standalone weekdays */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_SHORT_WEEKDAYS, /**< Standalone short weekdays */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_NARROW_WEEKDAYS, /**< Standalone narrow weekdays */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_QUARTERS, /**< Quarters */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_SHORT_QUARTERS, /**< Short quarters */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_QUARTERS, /**< Standalone quarters */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_SHORT_QUARTERS, /**< Standalone short quarters */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_SHORTER_WEEKDAYS, /**< Shorter weekdays */ + I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_SHORTER_WEEKDAYS, /**< Standalone shorter weekdays */ } i18n_udate_format_symbol_type_e; /** @@ -1691,10 +1691,10 @@ typedef enum { */ typedef enum { - I18N_UDISPCTX_TYPE_DIALECT_HANDLING, /** + * \#include * * @section CAPI_BASE_UTILS_I18N_UBRK_MODULE_OVERVIEW Overview * @details Pointer to a #i18n_ubreak_iterator_h maintains a current position and scans over text returning the index of characters where boundaries occur. @@ -53,17 +53,17 @@ extern "C" { /** * @brief Opens a new #i18n_ubreak_iterator_h for locating text boundaries for a specified locale. * @details A #i18n_ubreak_iterator_h may be used for detecting character, line, word, - * and sentence breaks in text. + * and sentence breaks in text. * @remarks Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * @param[in] type The type of #i18n_ubreak_iterator_h to open: one of #I18N_UBRK_CHARACTER, #I18N_UBRK_WORD, * #I18N_UBRK_LINE, #I18N_UBRK_SENTENCE - * @param[in] locale The locale specifying the text-breaking conventions. - * If @c NULL, the default locale will be used. - * @param[in] text The text to be iterated over. May be @c NULL, then the iterator will be created without any text. - * The text can be set later with i18n_ubrk_set_text() function. - * @param[in] text_length The number of characters in text, or -1 if NULL-terminated. - * @param[out] break_iter A pointer to the #i18n_ubreak_iterator_h for the specified locale. + * @param[in] locale The locale specifying the text-breaking conventions. + * If @c NULL, the default locale will be used. + * @param[in] text The text to be iterated over. May be @c NULL, then the iterator will be created without any text. + * The text can be set later with i18n_ubrk_set_text() function. + * @param[in] text_length The number of characters in text, or -1 if NULL-terminated. + * @param[out] break_iter A pointer to the #i18n_ubreak_iterator_h for the specified locale. * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -75,14 +75,14 @@ int i18n_ubrk_create(i18n_ubreak_iterator_type_e type, const char *locale, const * @brief Opens a new #i18n_ubreak_iterator_h for locating text boundaries using specified breaking rules. * @remarks Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 - * @param[in] rules A set of rules specifying the text breaking conventions. - * @param[in] rules_length The number of characters in rules, or -1 if NULL-terminated. - * @param[in] text The text to be iterated over. May be @c NULL, in which case i18n_ubrk_set_text() is - * used to specify the text to be iterated. - * @param[in] text_length The number of characters in text, or -1 if NULL-terminated. - * @param[out] break_iter A pointer to the #i18n_ubreak_iterator_h for the specified rules. - * @param[out] parse_err Receives position and context information for any syntax errors - * detected while parsing the rules. + * @param[in] rules A set of rules specifying the text breaking conventions. + * @param[in] rules_length The number of characters in rules, or -1 if NULL-terminated. + * @param[in] text The text to be iterated over. May be @c NULL, in which case i18n_ubrk_set_text() is + * used to specify the text to be iterated. + * @param[in] text_length The number of characters in text, or -1 if NULL-terminated. + * @param[out] break_iter A pointer to the #i18n_ubreak_iterator_h for the specified rules. + * @param[out] parse_err Receives position and context information for any syntax errors + * detected while parsing the rules. * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -95,15 +95,15 @@ int i18n_ubrk_create_rules(const i18n_uchar *rules, int32_t rules_length, const * @remarks Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * @param[in] break_iter iterator to be cloned. Must not be @c NULL. - * @param[in] stack_buffer (Deprecated Since 3.0. Use NULL instead.) User allocated space for the new clone. If @c NULL new memory will be allocated. - * If buffer is not large enough, new memory will be allocated. - * Clients can use the #I18N_U_BRK_SAFECLONE_BUFFERSIZE. This will probably be enough to avoid memory allocations. + * @param[in] stack_buffer (Deprecated Since 3.0. Use NULL instead.) User allocated space for the new clone. If @c NULL new memory will be allocated. + * If buffer is not large enough, new memory will be allocated. + * Clients can use the #I18N_U_BRK_SAFECLONE_BUFFERSIZE. This will probably be enough to avoid memory allocations. * @param[in] p_buffer_size (Deprecated Since 3.0. Use NULL instead.) A pointer to size of allocated space. - * If *p_buffer_size == 0, a sufficient size for use in cloning will - * be returned ('pre-flighting') - * If *p_buffer_size is not enough for a stack-based safe clone, - * new memory will be allocated. - * @param[out] break_iter_clone A pointer to the cloned #i18n_ubreak_iterator_h. + * If *p_buffer_size == 0, a sufficient size for use in cloning will + * be returned ('pre-flighting') + * If *p_buffer_size is not enough for a stack-based safe clone, + * new memory will be allocated. + * @param[out] break_iter_clone A pointer to the cloned #i18n_ubreak_iterator_h. * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -126,9 +126,9 @@ int i18n_ubrk_destroy(i18n_ubreak_iterator_h break_iter); * @brief Sets an existing iterator to point to a new piece of text. * @remarks Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 - * @param[in] break_iter The iterator to use. Must not be @c NULL. - * @param[in] text The text to be set. Must not be @c NULL. - * @param[in] text_length The length of the text. + * @param[in] break_iter The iterator to use. Must not be @c NULL. + * @param[in] text The text to be set. Must not be @c NULL. + * @param[in] text_length The length of the text. * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -138,11 +138,11 @@ int i18n_ubrk_set_text(i18n_ubreak_iterator_h break_iter, const i18n_uchar *text /** * @brief Determines the most recently-returned text boundary. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * @param[in] break_iter The break iterator to use. Must not be @c NULL. * @return The character index most recently returned by, i18n_ubrk_next(), i18n_ubrk_previous(), - * i18n_ubrk_first(), or i18n_ubrk_last(). + * i18n_ubrk_first(), or i18n_ubrk_last(). * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ @@ -151,11 +151,11 @@ int32_t i18n_ubrk_current(const i18n_ubreak_iterator_h break_iter); /** * @brief Advances the iterator to the boundary following the current boundary. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * @param[in] break_iter The break iterator to use. Must not be @c NULL. * @return The character index of the next text boundary, or #I18N_UBRK_DONE - * if all text boundaries have been returned. + * if all text boundaries have been returned. * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ubrk_previous() @@ -165,11 +165,11 @@ int32_t i18n_ubrk_next(i18n_ubreak_iterator_h break_iter); /** * @brief Sets the iterator position to the boundary preceding the current boundary. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * @param[in] break_iter The break iterator to use. Must not be @c NULL. * @return The character index of the preceding text boundary, or #I18N_UBRK_DONE - * if all text boundaries have been returned. + * if all text boundaries have been returned. * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ubrk_next() @@ -179,7 +179,7 @@ int32_t i18n_ubrk_previous(i18n_ubreak_iterator_h break_iter); /** * @brief Sets the iterator position to zero, the start of the text being scanned. * * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * @param[in] break_iter The break iterator to use. Must not be @c NULL. * @return The new iterator position (zero). @@ -193,7 +193,7 @@ int32_t i18n_ubrk_first(i18n_ubreak_iterator_h break_iter); * @brief Sets the iterator position to the index immediately beyond the last character in the text being scanned. * @details This is not the same as the last character. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * @param[in] break_iter The break iterator to use. Must not be @c NULL. * @return The character offset immediately beyond the last character in the @@ -208,10 +208,10 @@ int32_t i18n_ubrk_last(i18n_ubreak_iterator_h break_iter); * @brief Sets the iterator position to the first boundary preceding the specified @c offset. * @details The new position is always smaller than @c offset, or #I18N_UBRK_DONE. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 - * @param[in] break_iter The break iterator to use. Must not be @c NULL. - * @param[in] offset The offset to begin scanning. + * @param[in] break_iter The break iterator to use. Must not be @c NULL. + * @param[in] offset The offset to begin scanning. * @return The text boundary preceding offset, or #I18N_UBRK_DONE. * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -223,10 +223,10 @@ int32_t i18n_ubrk_preceding(i18n_ubreak_iterator_h break_iter, int32_t offset); * @brief Advances the iterator to the first boundary following the specified @c offset. * @details The value returned is always greater than @c offset, or #I18N_UBRK_DONE. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 - * @param[in] break_iter The break iterator to use. Must not be @c NULL. - * @param[in] offset The offset to begin scanning. + * @param[in] break_iter The break iterator to use. Must not be @c NULL. + * @param[in] offset The offset to begin scanning. * @return The text boundary following offset, or #I18N_UBRK_DONE. * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -237,9 +237,9 @@ int32_t i18n_ubrk_following(i18n_ubreak_iterator_h break_iter, int32_t offset); /** * @brief Gets a locale for which text breaking information is available. * @details A #i18n_ubreak_iterator_h in a locale returned by this function will perform the correct - * text breaking for the locale. + * text breaking for the locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * @param[in] index The index of the desired locale. * @return A locale for which number text breaking information is available, or @c 0 if none. @@ -252,9 +252,9 @@ const char *i18n_ubrk_get_available(int32_t index); /** * @brief Determines how many locales have text breaking information available. * @details This function is most useful as determining the loop ending condition for - * calls to i18n_ubrk_get_available(). + * calls to i18n_ubrk_get_available(). * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * @return The number of locales for which text breaking information is available. * @exception #I18N_ERROR_NONE Successful @@ -265,9 +265,9 @@ int32_t i18n_ubrk_count_available(void); /** * @brief Returns true if the specfied position is a boundary position. * @details As a side effect, leaves the iterator pointing to the first boundary position at - * or after @c offset. + * or after @c offset. * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are - * described in Exceptions section. + * described in Exceptions section. * @since_tizen 2.3.1 * @param[in] break_iter The break iterator to use. Must not be @c NULL. * @param[in] offset The offset to check. @@ -279,14 +279,14 @@ i18n_ubool i18n_ubrk_is_boundary(i18n_ubreak_iterator_h break_iter, int32_t offs /** * @brief Returns the status from the break rule that determined the most recently - * returned break position. + * returned break position. * @details The values appear in the rule source - * within brackets, {123}, for example. For rules that do not specify a - * status, a default value of 0 is returned. - *

- * For word break iterators, the possible values are defined in enum #i18n_uchar_u_word_break_values_e. + * within brackets, {123}, for example. For rules that do not specify a + * status, a default value of 0 is returned. + *

+ * For word break iterators, the possible values are defined in enum #i18n_uchar_u_word_break_values_e. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * @param[in] break_iter The break iterator to use. Must not be @c NULL. * @return The status from the break rule that determined the most recently returned break position. @@ -297,22 +297,22 @@ int32_t i18n_ubrk_get_rule_status(i18n_ubreak_iterator_h break_iter); /** * @brief Gets the statuses from the break rules that determined the most recently - * returned break position. + * returned break position. * @details The values appear in the rule source within brackets, {123}, for example. The default status value for rules - * that do not explicitly provide one is zero. - *

- * For word break iterators, the possible values are defined in enum #i18n_uchar_u_word_break_values_e. + * that do not explicitly provide one is zero. + *

+ * For word break iterators, the possible values are defined in enum #i18n_uchar_u_word_break_values_e. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. + * Error codes are described in Exceptions section and in #i18n_error_code_e description. * * @since_tizen 2.3.1 - * @param[in] break_iter The break iterator to use. Must not be @c NULL. - * @param[out] fill_in_vec An array to be filled in with the status values. - * @param[in] capacity The length of the supplied vector. A length of zero causes - * the function to return the number of status values, in the - * normal way, without attempting to store any values. + * @param[in] break_iter The break iterator to use. Must not be @c NULL. + * @param[out] fill_in_vec An array to be filled in with the status values. + * @param[in] capacity The length of the supplied vector. A length of zero causes + * the function to return the number of status values, in the + * normal way, without attempting to store any values. * @return The number of rule status values from rules that determined - * the most recent boundary returned by the break iterator. + * the most recent boundary returned by the break iterator. * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ @@ -322,11 +322,11 @@ int32_t i18n_ubrk_get_rule_status_vec(i18n_ubreak_iterator_h break_iter, int32_t * @brief Returns the locale of the break iterator. You can choose between the valid and * the actual locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. + * Error codes are described in Exceptions section and in #i18n_error_code_e description. * * @since_tizen 2.3.1 - * @param[in] break_iter Break iterator. Must not be @c NULL. - * @param[in] type Locale type (valid or actual). + * @param[in] break_iter Break iterator. Must not be @c NULL. + * @param[in] type Locale type (valid or actual). * @return locale string * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter diff --git a/src/include/wearable/utils_i18n_ucalendar.h b/src/include/wearable/utils_i18n_ucalendar.h index a725a56..dbd8195 100644 --- a/src/include/wearable/utils_i18n_ucalendar.h +++ b/src/include/wearable/utils_i18n_ucalendar.h @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef __UTILS_I18N_UCALENDAR_H__ @@ -29,14 +29,14 @@ * @ingroup CAPI_BASE_UTILS_I18N_MODULE * @defgroup CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE Ucalendar * @brief The Ucalendar is used for converting between an udate module and a set of integer fields - * such as #I18N_UCALENDAR_YEAR, #I18N_UCALENDAR_MONTH, #I18N_UCALENDAR_DATE, #I18N_UCALENDAR_HOUR, and so on. + * such as #I18N_UCALENDAR_YEAR, #I18N_UCALENDAR_MONTH, #I18N_UCALENDAR_DATE, #I18N_UCALENDAR_HOUR, and so on. * @section CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE_HEADER Required Header - * \#include + * \#include * @section CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE_OVERVIEW Overview * @details The Ucalendar is used for converting between an udate module and a set of integer fields - * such as #I18N_UCALENDAR_YEAR, #I18N_UCALENDAR_MONTH, #I18N_UCALENDAR_DATE, #I18N_UCALENDAR_HOUR, and so on. - * (An udate module represents a specific instant in time with millisecond precision. See udate for - * information about the udate.) + * such as #I18N_UCALENDAR_YEAR, #I18N_UCALENDAR_MONTH, #I18N_UCALENDAR_DATE, #I18N_UCALENDAR_HOUR, and so on. + * (An udate module represents a specific instant in time with millisecond precision. See udate for + * information about the udate.) * * @section CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE_SAMPLE_CODE_1 Sample Code 1 * @brief Converts the given date and time to the corresponding UTC time(number of seconds that have elapsed since January 1, 1970), considering the given time zone @@ -47,66 +47,66 @@ // get time in sec from input date and time long long int _time_convert_itol(char *tzid, int y, int mon, int d, int h, int min, int s) { - long long int lli; - i18n_ucalendar_h ucal; - i18n_udate date; - int ret = I18N_ERROR_NONE; - int year, month, day, hour, minute, second; - int len; - - i18n_uchar *_tzid = NULL; - - if (tzid == NULL) { - tzid = "Etc/GMT"; - } - _tzid = (i18n_uchar*)calloc(strlen(tzid) + 1, sizeof(i18n_uchar)); - if (_tzid == NULL) { - return -1; - } - // converts 'tzid' to unicode string - i18n_ustring_copy_ua(_tzid, tzid); - - // gets length of '_tzid' - len = i18n_ustring_get_length(_tzid); - // creates i18n_ucalendar_h - ret = i18n_ucalendar_create(_tzid, len, "en_US", I18N_UCALENDAR_TRADITIONAL, &ucal); - if (ret) { - dlog_print(DLOG_INFO, LOG_TAG, "i18n_ucalendar_create failed.\n"); - return -1; - } - - // sets i18n_ucalendar_h's date - i18n_ucalendar_set_date_time(ucal, y, mon-1, d, h, min, s); - - // gets the current value of a field from i18n_ucalendar_h - i18n_ucalendar_get(ucal, I18N_UCALENDAR_YEAR, &year); - i18n_ucalendar_get(ucal, I18N_UCALENDAR_MONTH, &month); - i18n_ucalendar_get(ucal, I18N_UCALENDAR_DATE, &day); - i18n_ucalendar_get(ucal, I18N_UCALENDAR_HOUR, &hour); - i18n_ucalendar_get(ucal, I18N_UCALENDAR_MINUTE, &minute); - i18n_ucalendar_get(ucal, I18N_UCALENDAR_SECOND, &second); - dlog_print(DLOG_INFO, LOG_TAG, "Date from ucal, year:%d month:%d day:%d hour:%d minute:%d second:%d.\n",year, month, day, hour, minute, second); - - // gets i18n_ucalendar's current time and converts it from milliseconds to seconds - i18n_ucalendar_get_milliseconds(ucal, &date); - lli = ms2sec(date); - // destroys i18n_ucalendar_h - i18n_ucalendar_destroy(ucal); - if (_tzid) { - free(_tzid); - } - - return lli; + long long int lli; + i18n_ucalendar_h ucal; + i18n_udate date; + int ret = I18N_ERROR_NONE; + int year, month, day, hour, minute, second; + int len; + + i18n_uchar *_tzid = NULL; + + if (tzid == NULL) { + tzid = "Etc/GMT"; + } + _tzid = (i18n_uchar*)calloc(strlen(tzid) + 1, sizeof(i18n_uchar)); + if (_tzid == NULL) { + return -1; + } + // converts 'tzid' to unicode string + i18n_ustring_copy_ua(_tzid, tzid); + + // gets length of '_tzid' + len = i18n_ustring_get_length(_tzid); + // creates i18n_ucalendar_h + ret = i18n_ucalendar_create(_tzid, len, "en_US", I18N_UCALENDAR_TRADITIONAL, &ucal); + if (ret) { + dlog_print(DLOG_INFO, LOG_TAG, "i18n_ucalendar_create failed.\n"); + return -1; + } + + // sets i18n_ucalendar_h's date + i18n_ucalendar_set_date_time(ucal, y, mon-1, d, h, min, s); + + // gets the current value of a field from i18n_ucalendar_h + i18n_ucalendar_get(ucal, I18N_UCALENDAR_YEAR, &year); + i18n_ucalendar_get(ucal, I18N_UCALENDAR_MONTH, &month); + i18n_ucalendar_get(ucal, I18N_UCALENDAR_DATE, &day); + i18n_ucalendar_get(ucal, I18N_UCALENDAR_HOUR, &hour); + i18n_ucalendar_get(ucal, I18N_UCALENDAR_MINUTE, &minute); + i18n_ucalendar_get(ucal, I18N_UCALENDAR_SECOND, &second); + dlog_print(DLOG_INFO, LOG_TAG, "Date from ucal, year:%d month:%d day:%d hour:%d minute:%d second:%d.\n",year, month, day, hour, minute, second); + + // gets i18n_ucalendar's current time and converts it from milliseconds to seconds + i18n_ucalendar_get_milliseconds(ucal, &date); + lli = ms2sec(date); + // destroys i18n_ucalendar_h + i18n_ucalendar_destroy(ucal); + if (_tzid) { + free(_tzid); + } + + return lli; } * @endcode * * @section CAPI_BASE_UTILS_I18N_UCALENDAR_MODULE_SAMPLE_CODE_2 Sample Code 2 * @brief Describes an example that uses _time_convert_itol from 'Sample Code 2' * @code - // converts the given time to UTC time(number of seconds that have elapsed since January 1, 1970) - long long int time = _time_convert_itol("Etc/GMT", 2014, 5, 28, 15, 14, 0); - dlog_print(DLOG_INFO, LOG_TAG, "Time Zone: %s\t, %d/%d/%d/%d/%d/%d\n", "Etc/GMT", 2014, 5, 28, 15, 14, 0); - dlog_print(DLOG_INFO, LOG_TAG, "_time_convert_itol test : %lld\n", time); + // converts the given time to UTC time(number of seconds that have elapsed since January 1, 1970) + long long int time = _time_convert_itol("Etc/GMT", 2014, 5, 28, 15, 14, 0); + dlog_print(DLOG_INFO, LOG_TAG, "Time Zone: %s\t, %d/%d/%d/%d/%d/%d\n", "Etc/GMT", 2014, 5, 28, 15, 14, 0); + dlog_print(DLOG_INFO, LOG_TAG, "_time_convert_itol test : %lld\n", time); * @endcode */ @@ -154,17 +154,17 @@ int i18n_ucalendar_get_now(i18n_udate *date); * @remarks Must release @a calendar using i18n_ucalendar_destroy(). * * @param[in] zone_id The desired TimeZone ID \n - * If @c 0, use the default time zone. + * If @c 0, use the default time zone. * @param[in] len The length of the zone ID, - * otherwise @c -1 if null-terminated + * otherwise @c -1 if null-terminated * @param[in] locale The desired locale - * If @c NULL, the default locale will be used. + * If @c NULL, the default locale will be used. * @param[in] type The type of #I18N_UCALENDAR_DEFAULT to create \n - * This can be #I18N_UCALENDAR_GREGORIAN to create the Gregorian + * This can be #I18N_UCALENDAR_GREGORIAN to create the Gregorian * calendar for the locale, or #I18N_UCALENDAR_DEFAULT to create the default calendar for the locale (the * default calendar may also be Gregorian). * @param[out] calendar A pointer to an #i18n_ucalendar_h, - * otherwise @c 0 if an error occurs + * otherwise @c 0 if an error occurs * * @return An #i18n_error_code_e error code * @retval #I18N_ERROR_NONE Successful @@ -201,14 +201,14 @@ int i18n_ucalendar_clone(const i18n_ucalendar_h cal, i18n_ucalendar_h *identical * @details A display name is suitable for presentation to a user. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[in] calendar The #i18n_ucalendar_h to query - * @param[in] type The desired display name format \n - * One of #I18N_UCALENDAR_STANDARD, #I18N_UCALENDAR_SHORT_STANDARD, #I18N_UCALENDAR_DST, or #I18N_UCALENDAR_SHORT_DST - * @param[in] locale The desired locale for the display name - * @param[out] result A pointer to a buffer to receive the formatted number + * @param[in] calendar The #i18n_ucalendar_h to query + * @param[in] type The desired display name format \n + * One of #I18N_UCALENDAR_STANDARD, #I18N_UCALENDAR_SHORT_STANDARD, #I18N_UCALENDAR_DST, or #I18N_UCALENDAR_SHORT_DST + * @param[in] locale The desired locale for the display name + * @param[out] result A pointer to a buffer to receive the formatted number * @param[in] result_len The maximum size of the result * @param[out] buf_size_needed The total buffer size needed \n - * If greater than @a result_len, the output is truncated + * If greater than @a result_len, the output is truncated * * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -222,7 +222,7 @@ int i18n_ucalendar_get_timezone_displayname(const i18n_ucalendar_h calendar, i18 * * @param[in] calendar The #i18n_ucalendar_h to query * @param[out] is_in If @c true @a calendar is currently in daylight savings time, - * otherwise @c false + * otherwise @c false * * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -236,7 +236,7 @@ int i18n_ucalendar_is_in_daylight_time(const i18n_ucalendar_h calendar, i18n_ubo * * @param[in] cal The #i18n_ucalendar_h to modify * @param[in] field The field to set \n - * One of #I18N_UCALENDAR_ERA, #I18N_UCALENDAR_YEAR, + * One of #I18N_UCALENDAR_ERA, #I18N_UCALENDAR_YEAR, * #I18N_UCALENDAR_MONTH, #I18N_UCALENDAR_WEEK_OF_YEAR, #I18N_UCALENDAR_WEEK_OF_MONTH, * #I18N_UCALENDAR_DATE, #I18N_UCALENDAR_DAY_OF_YEAR, #I18N_UCALENDAR_DAY_OF_WEEK, * #I18N_UCALENDAR_DAY_OF_WEEK_IN_MONTH, #I18N_UCALENDAR_AM_PM, #I18N_UCALENDAR_HOUR, @@ -256,7 +256,7 @@ int i18n_ucalendar_set(i18n_ucalendar_h cal, i18n_ucalendar_date_fields_e field, * * @param[in] calendar The #i18n_ucalendar_h to modify * @param[in] attr The desired attribute \n - * One of #I18N_UCALENDAR_LENIENT, #I18N_UCALENDAR_FIRST_DAY_OF_WEEK, + * One of #I18N_UCALENDAR_LENIENT, #I18N_UCALENDAR_FIRST_DAY_OF_WEEK, * or #I18N_UCALENDAR_MINIMAL_DAYS_IN_FIRST_WEEK. * * @param[in] val The new value of @a attr @@ -274,7 +274,7 @@ int i18n_ucalendar_set_attribute(i18n_ucalendar_h calendar, i18n_ucalendar_attri * * @param[in] calendar The i18n_ucalendar to query * @param[in] attr The desired attribute \n - * One of #I18N_UCALENDAR_LENIENT, #I18N_UCALENDAR_FIRST_DAY_OF_WEEK, + * One of #I18N_UCALENDAR_LENIENT, #I18N_UCALENDAR_FIRST_DAY_OF_WEEK, * or #I18N_UCALENDAR_MINIMAL_DAYS_IN_FIRST_WEEK. * * @param[out] val The value of @a attr @@ -321,8 +321,8 @@ int i18n_ucalendar_set_milliseconds(i18n_ucalendar_h calendar, i18n_udate millis * @param[in] calendar The #i18n_ucalendar_h to set * @param[in] year The desired year * @param[in] month The desired month\n - * One of #I18N_UCALENDAR_JANUARY, #I18N_UCALENDAR_FEBRUARY, #I18N_UCALENDAR_MARCH, #I18N_UCALENDAR_APRIL, #I18N_UCALENDAR_MAY, - * #I18N_UCALENDAR_JUNE, #I18N_UCALENDAR_JULY, #I18N_UCALENDAR_AUGUST, #I18N_UCALENDAR_SEPTEMBER, #I18N_UCALENDAR_OCTOBER, #I18N_UCALENDAR_NOVEMBER, or #I18N_UCALENDAR_DECEMBER + * One of #I18N_UCALENDAR_JANUARY, #I18N_UCALENDAR_FEBRUARY, #I18N_UCALENDAR_MARCH, #I18N_UCALENDAR_APRIL, #I18N_UCALENDAR_MAY, + * #I18N_UCALENDAR_JUNE, #I18N_UCALENDAR_JULY, #I18N_UCALENDAR_AUGUST, #I18N_UCALENDAR_SEPTEMBER, #I18N_UCALENDAR_OCTOBER, #I18N_UCALENDAR_NOVEMBER, or #I18N_UCALENDAR_DECEMBER * @param[in] date The desired day of the month * @param[in] hour The desired hour of the day * @param[in] min The desired minute @@ -361,8 +361,8 @@ int i18n_ucalendar_is_equivalent_to(const i18n_ucalendar_h calendar1, const i18n * #I18N_UCALENDAR_DAY_OF_WEEK_IN_MONTH, #I18N_UCALENDAR_AM_PM, #I18N_UCALENDAR_HOUR, #I18N_UCALENDAR_HOUR_OF_DAY, #I18N_UCALENDAR_MINUTE, #I18N_UCALENDAR_SECOND, * #I18N_UCALENDAR_MILLISECOND. * @param[in] amount The signed amount to add to the field \n - * If the amount causes the value to exceed to maximum or minimum values for that field, - * other fields are modified to preserve the magnitude of the change. + * If the amount causes the value to exceed to maximum or minimum values for that field, + * other fields are modified to preserve the magnitude of the change. * * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -388,32 +388,32 @@ int i18n_ucalendar_add(i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e f int i18n_ucalendar_get(const i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, int32_t *val); -// Newly Added APIs +/* Newly Added APIs */ /** * @brief Returns the difference between the target time and the time this calendar object is currently set to. * @details If the target time is after the current calendar setting, the the returned value will be positive. - * The field parameter specifies the units of the return value. - * For example, if field is I18N_UCALENDAR_MONTH and i18n_ucalendar_get_field_difference returns 3, - * then the target time is 3 to less than 4 months after the current calendar setting.
- * As a side effect of this call, this calendar is advanced toward target by the given amount. - * That is, calling this function has the side effect of calling i18n_ucalendar_add on this calendar with the - * specified field and an amount equal to the return value from this function.
- * A typical way of using this function is to call it first with the largest field of interest, then with progressively smaller fields. + * The field parameter specifies the units of the return value. + * For example, if field is I18N_UCALENDAR_MONTH and i18n_ucalendar_get_field_difference returns 3, + * then the target time is 3 to less than 4 months after the current calendar setting.
+ * As a side effect of this call, this calendar is advanced toward target by the given amount. + * That is, calling this function has the side effect of calling i18n_ucalendar_add on this calendar with the + * specified field and an amount equal to the return value from this function.
+ * A typical way of using this function is to call it first with the largest field of interest, then with progressively smaller fields. * @since_tizen 2.3.1 * * @param[in] calendar The i18n_ucalendar_h to compare and update. * @param[in] target The target date to compare to the current calendar setting. - * @param[in] field One of #I18N_UCALENDAR_ERA, #I18N_UCALENDAR_YEAR, #I18N_UCALENDAR_MONTH, - * #I18N_UCALENDAR_WEEK_OF_YEAR, #I18N_UCALENDAR_WEEK_OF_MONTH, #I18N_UCALENDAR_DATE, - * #I18N_UCALENDAR_DAY_OF_YEAR, #I18N_UCALENDAR_DAY_OF_WEEK, #I18N_UCALENDAR_DAY_OF_WEEK_IN_MONTH, - * #I18N_UCALENDAR_AM_PM, #I18N_UCALENDAR_HOUR, #I18N_UCALENDAR_HOUR_OF_DAY, #I18N_UCALENDAR_MINUTE, - * #I18N_UCALENDAR_SECOND, #I18N_UCALENDAR_MILLISECOND. - * Please note that the returned value type is int32_t. In case of #I18N_UCALENDAR_MILLISECOND, maximal - * difference between dates may be equal to the maximal value of the int32_t, which is 2147483647 (about one month difference). - * If the difference is bigger, then the #I18N_ERROR_INVALID_PARAMETER error will be returned. + * @param[in] field One of #I18N_UCALENDAR_ERA, #I18N_UCALENDAR_YEAR, #I18N_UCALENDAR_MONTH, + * #I18N_UCALENDAR_WEEK_OF_YEAR, #I18N_UCALENDAR_WEEK_OF_MONTH, #I18N_UCALENDAR_DATE, + * #I18N_UCALENDAR_DAY_OF_YEAR, #I18N_UCALENDAR_DAY_OF_WEEK, #I18N_UCALENDAR_DAY_OF_WEEK_IN_MONTH, + * #I18N_UCALENDAR_AM_PM, #I18N_UCALENDAR_HOUR, #I18N_UCALENDAR_HOUR_OF_DAY, #I18N_UCALENDAR_MINUTE, + * #I18N_UCALENDAR_SECOND, #I18N_UCALENDAR_MILLISECOND. + * Please note that the returned value type is int32_t. In case of #I18N_UCALENDAR_MILLISECOND, maximal + * difference between dates may be equal to the maximal value of the int32_t, which is 2147483647 (about one month difference). + * If the difference is bigger, then the #I18N_ERROR_INVALID_PARAMETER error will be returned. * @param[out] status A pointer to an i18n_error_code_e to receive any errors * * @return The date difference for the specified field. @@ -426,12 +426,12 @@ int32_t i18n_ucalendar_get_field_difference(i18n_ucalendar_h calendar, i18n_udat * * @param[in] zone_type The system time zone type. * @param[in] region The ISO 3166 two-letter country code or UN M.49 three-digit - * area code. When @c NULL, no filtering done by region. + * area code. When @c NULL, no filtering done by region. * @param[in] raw_offset An offset from GMT in milliseconds, ignoring the effect - * of daylight savings time, if any. When @c NULL, no filtering done by zone offset. + * of daylight savings time, if any. When @c NULL, no filtering done by zone offset. * * @param[out] enumeration A Pointer to the enumeration object that the caller must dispose of using - * i18n_uenumeration_destroy(), or@c NULL upon failure. + * i18n_uenumeration_destroy(), or@c NULL upon failure. * * @return Error code. Error codes not listed below are described in #i18n_error_code_e * @retval #I18N_ERROR_NONE Successful @@ -444,13 +444,13 @@ int i18n_ucalendar_timezone_id_enumeration_create(i18n_system_timezone_type_e zo * @since_tizen 2.3.1 * * @param[out] enumeration A pointer to the enumeration object that the caller must dispose of using - * i18n_uenumeration_destroy(), or @c NULL upon failure. + * i18n_uenumeration_destroy(), or @c NULL upon failure. * * @return Error code. Error codes not listed below are described in #i18n_error_code_e * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_timezones_create(i18n_uenumeration_h * enumeration); +int i18n_ucalendar_timezones_create(i18n_uenumeration_h *enumeration); /** * @brief Creates an enumeration over all time zones associated with the given country. @@ -460,25 +460,25 @@ int i18n_ucalendar_timezones_create(i18n_uenumeration_h * enumeration); * @param[in] country The ISO 3166 two-letter country code, or @c NULL to retrieve zones not affiliated with any country * * @param[out] enumeration A pointer to the enumeration object that the caller must dispose of using - * i18n_uenumeration_destroy(), or @c NULL upon failure. + * i18n_uenumeration_destroy(), or @c NULL upon failure. * * @return Error code. Error codes not listed below are described in #i18n_error_code_e * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_ucalendar_country_timezones_create(const char *country, i18n_uenumeration_h * enumeration); +int i18n_ucalendar_country_timezones_create(const char *country, i18n_uenumeration_h *enumeration); /** * @brief Returns the default time zone. * @details The default is determined initially by querying the host operating system. - * It may be changed with i18n_ucalendar_set_default_timezone() - * or with the C++ TimeZone API. + * It may be changed with i18n_ucalendar_set_default_timezone() + * or with the C++ TimeZone API. * @remarks The specific error code can be obtained using the get_last_result() - * method. Error codes are described in #i18n_error_code_e description. + * method. Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[out] result A buffer to receive the result, or @c NULL - * @param[in] result_capacity The capacity of the @c result buffer + * @param[in] result_capacity The capacity of the @c result buffer * * @return The @c result string length, not including the terminating @c NULL. * @exception #I18N_ERROR_NONE Successful @@ -504,8 +504,8 @@ int i18n_ucalendar_set_timezone(i18n_ucalendar_h calendar, const i18n_uchar *zon /** * @brief Gets the ID of the calendar's time zone. * @remarks The specific error code can be obtained using the get_last_result() - * method. Error codes are described in Exceptions section and - * #i18n_error_code_e description. + * method. Error codes are described in Exceptions section and + * #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[in] calendar The #i18n_ucalendar_h to query. @@ -521,11 +521,11 @@ int32_t i18n_ucalendar_get_timezone_id(const i18n_ucalendar_h calendar, i18n_uch /** * @brief Sets the Gregorian Calendar change date. * @details This is the point when the switch from Julian dates to Gregorian dates - * occurred. Default is 00:00:00 local time, October 15, 1582. - * Previous to this time and date will be Julian dates. - * This function works only for Gregorian calendars. If the #i18n_ucalendar_h - * is not an instance of a Gregorian calendar, then a - * #I18N_ERROR_NOT_SUPPORTED error code is set. + * occurred. Default is 00:00:00 local time, October 15, 1582. + * Previous to this time and date will be Julian dates. + * This function works only for Gregorian calendars. If the #i18n_ucalendar_h + * is not an instance of a Gregorian calendar, then a + * #I18N_ERROR_NOT_SUPPORTED error code is set. * @since_tizen 2.3.1 * * @param[in] calendar The calendar object. @@ -542,11 +542,11 @@ int i18n_ucalendar_set_gregorian_change(i18n_ucalendar_h calendar, i18n_udate da /** * @brief Gets the Gregorian Calendar change date. * @details This is the point when the switch from Julian dates to Gregorian dates - * occurred. Default is 00:00:00 local time, October 15, 1582. - * Previous to this time and date will be Julian dates. - * This function works only for Gregorian calendars. If the #i18n_ucalendar_h - * is not an instance of a Gregorian calendar, then a - * #I18N_ERROR_NOT_SUPPORTED error code is set. + * occurred. Default is 00:00:00 local time, October 15, 1582. + * Previous to this time and date will be Julian dates. + * This function works only for Gregorian calendars. If the #i18n_ucalendar_h + * is not an instance of a Gregorian calendar, then a + * #I18N_ERROR_NOT_SUPPORTED error code is set. * @since_tizen 2.3.1 * * @param[in] calendar The calendar object. @@ -563,9 +563,9 @@ int i18n_ucalendar_get_gregorian_change(const i18n_ucalendar_h calendar, i18n_ud /** * @brief Gets a locale for which calendars are available. * @details A #i18n_ucalendar_h in a locale returned by this function will contain - * the correct day and month names for the locale. + * the correct day and month names for the locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * * @param[in] locale_index The index of the desired locale. @@ -575,13 +575,13 @@ int i18n_ucalendar_get_gregorian_change(const i18n_ucalendar_h calendar, i18n_ud * @exception #I18N_ERROR_INVALID_PARAMETER Invalid parameter * @see i18n_ucalendar_count_available() */ -const char * i18n_ucalendar_get_available(int32_t locale_index); +const char *i18n_ucalendar_get_available(int32_t locale_index); /** * @brief Determines how many locales have calendars available. * @details This function is most useful as determining the loop ending condition for calls to i18n_ucalendar_get_available(). * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * * @return The number of locales for which calendars are available. @@ -598,8 +598,8 @@ int32_t i18n_ucalendar_count_available(void); * @param[in] calendar The #i18n_ucalendar_h to set. * @param[in] year The desired year. * @param[in] month The desired month; one of #I18N_UCALENDAR_JANUARY, #I18N_UCALENDAR_FEBRUARY, #I18N_UCALENDAR_MARCH, - * #I18N_UCALENDAR_APRIL, #I18N_UCALENDAR_MAY, #I18N_UCALENDAR_JUNE, #I18N_UCALENDAR_JULY, #I18N_UCALENDAR_AUGUST, - * #I18N_UCALENDAR_SEPTEMBER, #I18N_UCALENDAR_OCTOBER, #I18N_UCALENDAR_NOVEMBER, #I18N_UCALENDAR_DECEMBER + * #I18N_UCALENDAR_APRIL, #I18N_UCALENDAR_MAY, #I18N_UCALENDAR_JUNE, #I18N_UCALENDAR_JULY, #I18N_UCALENDAR_AUGUST, + * #I18N_UCALENDAR_SEPTEMBER, #I18N_UCALENDAR_OCTOBER, #I18N_UCALENDAR_NOVEMBER, #I18N_UCALENDAR_DECEMBER * @param[in] date The desired day of the month. * * @return Error code. Error codes not listed below are described in #i18n_error_code_e @@ -616,29 +616,29 @@ int i18n_ucalendar_set_date(i18n_ucalendar_h calendar, int32_t year, int32_t mon /** * @brief Adds a specified signed amount to a particular field in a #i18n_ucalendar_h. * @details This will not modify more significant fields in the calendar. - * Rolling by a positive value always means moving forward in time - * (unless the limit of the field is reached, in which case it may pin or wrap), - * so for Gregorian calendar, starting with 100 BC and - * rolling the year by +1 results in 99 BC. - * When eras have a definite beginning and end (as in the Chinese calendar, - * or as in most eras in the Japanese calendar) then rolling the year past either - * limit of the era will cause the year to wrap around. When eras only have a limit at one end, - * then attempting to roll the year past that limit will result in pinning the year at that limit. - * Note that for most calendars in which era 0 years move forward in time (such as Buddhist, Hebrew, or Islamic), - * it is possible for add or roll to result in negative years for era 0 (that is the - * only way to represent years before the calendar epoch). + * Rolling by a positive value always means moving forward in time + * (unless the limit of the field is reached, in which case it may pin or wrap), + * so for Gregorian calendar, starting with 100 BC and + * rolling the year by +1 results in 99 BC. + * When eras have a definite beginning and end (as in the Chinese calendar, + * or as in most eras in the Japanese calendar) then rolling the year past either + * limit of the era will cause the year to wrap around. When eras only have a limit at one end, + * then attempting to roll the year past that limit will result in pinning the year at that limit. + * Note that for most calendars in which era 0 years move forward in time (such as Buddhist, Hebrew, or Islamic), + * it is possible for add or roll to result in negative years for era 0 (that is the + * only way to represent years before the calendar epoch). * @since_tizen 2.3.1 * * @param[in] calendar The #i18n_ucalendar_h to which to add. * @param[in] field The field to which to add the signed value; one of #I18N_UCALENDAR_ERA, - * #I18N_UCALENDAR_YEAR, #I18N_UCALENDAR_MONTH, #I18N_UCALENDAR_WEEK_OF_YEAR, - * #I18N_UCALENDAR_WEEK_OF_MONTH, #I18N_UCALENDAR_DATE, #I18N_UCALENDAR_DAY_OF_YEAR, - * #I18N_UCALENDAR_DAY_OF_WEEK, #I18N_UCALENDAR_DAY_OF_WEEK_IN_MONTH, #I18N_UCALENDAR_AM_PM, - * #I18N_UCALENDAR_HOUR, #I18N_UCALENDAR_HOUR_OF_DAY, #I18N_UCALENDAR_MINUTE, - * #I18N_UCALENDAR_SECOND, #I18N_UCALENDAR_MILLISECOND. + * #I18N_UCALENDAR_YEAR, #I18N_UCALENDAR_MONTH, #I18N_UCALENDAR_WEEK_OF_YEAR, + * #I18N_UCALENDAR_WEEK_OF_MONTH, #I18N_UCALENDAR_DATE, #I18N_UCALENDAR_DAY_OF_YEAR, + * #I18N_UCALENDAR_DAY_OF_WEEK, #I18N_UCALENDAR_DAY_OF_WEEK_IN_MONTH, #I18N_UCALENDAR_AM_PM, + * #I18N_UCALENDAR_HOUR, #I18N_UCALENDAR_HOUR_OF_DAY, #I18N_UCALENDAR_MINUTE, + * #I18N_UCALENDAR_SECOND, #I18N_UCALENDAR_MILLISECOND. * @param[in] amount The signed amount to add to the @c field. If the amount causes the - * value to exceed to maximum or minimum values for that field, the field is pinned - * to a permissible value. + * value to exceed to maximum or minimum values for that field, the field is pinned + * to a permissible value. * * @return Error code. Error codes not listed below are described in #i18n_error_code_e * @retval #I18N_ERROR_NONE Successful @@ -652,11 +652,11 @@ int i18n_ucalendar_roll(i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e * @brief Determines if a field in a #i18n_ucalendar_h is set. * @details All fields are represented as 32-bit integers. * @remarks The specific error code can be obtained using the get_last_result() - * method. Error codes are described in Exceptions section. + * method. Error codes are described in Exceptions section. * @since_tizen 2.3.1 * * @param[in] calendar The #i18n_ucalendar_h to query. - * @param[in] field The desired field. + * @param[in] field The desired field. * * @return @c true if field is set, @c false otherwise. * @exception #I18N_ERROR_NONE Successful @@ -675,7 +675,7 @@ i18n_ubool i18n_ucalendar_is_set(const i18n_ucalendar_h calendar, i18n_ucalendar * @since_tizen 2.3.1 * * @param[in] calendar The #i18n_ucalendar_h containing the field to clear. - * @param[in] field The field to clear. + * @param[in] field The field to clear. * * @return Error code * @retval #I18N_ERROR_NONE Successful @@ -710,21 +710,21 @@ int i18n_ucalendar_clear(i18n_ucalendar_h calendar); * @brief Determines a limit for a field in an #i18n_ucalendar_h. * @details A limit is a maximum or minimum value for a field. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[in] calendar The #i18n_ucalendar_h to query. - * @param[in] field The desired field; one of #I18N_UCALENDAR_ERA, #I18N_UCALENDAR_YEAR, #I18N_UCALENDAR_MONTH, - * #I18N_UCALENDAR_WEEK_OF_YEAR, #I18N_UCALENDAR_WEEK_OF_MONTH, #I18N_UCALENDAR_DATE, - * #I18N_UCALENDAR_DAY_OF_YEAR, #I18N_UCALENDAR_DAY_OF_WEEK, #I18N_UCALENDAR_DAY_OF_WEEK_IN_MONTH, - * #I18N_UCALENDAR_AM_PM, #I18N_UCALENDAR_HOUR, #I18N_UCALENDAR_HOUR_OF_DAY, - * #I18N_UCALENDAR_MINUTE, #I18N_UCALENDAR_SECOND, #I18N_UCALENDAR_MILLISECOND, - * #I18N_UCALENDAR_ZONE_OFFSET, #I18N_UCALENDAR_DST_OFFSET, #I18N_UCALENDAR_YEAR_WOY, - * #I18N_UCALENDAR_DOW_LOCAL, #I18N_UCALENDAR_EXTENDED_YEAR, #I18N_UCALENDAR_JULIAN_DAY, - * #I18N_UCALENDAR_MILLISECONDS_IN_DAY, #I18N_UCALENDAR_IS_LEAP_MONTH. - * @param[in] type The desired critical point; one of #I18N_UCALENDAR_MINIMUM, #I18N_UCALENDAR_MAXIMUM, - * #I18N_UCALENDAR_GREATEST_MINIMUM, #I18N_UCALENDAR_LEAST_MAXIMUM, - * #I18N_UCALENDAR_ACTUAL_MINIMUM, #I18N_UCALENDAR_ACTUAL_MAXIMUM. + * @param[in] field The desired field; one of #I18N_UCALENDAR_ERA, #I18N_UCALENDAR_YEAR, #I18N_UCALENDAR_MONTH, + * #I18N_UCALENDAR_WEEK_OF_YEAR, #I18N_UCALENDAR_WEEK_OF_MONTH, #I18N_UCALENDAR_DATE, + * #I18N_UCALENDAR_DAY_OF_YEAR, #I18N_UCALENDAR_DAY_OF_WEEK, #I18N_UCALENDAR_DAY_OF_WEEK_IN_MONTH, + * #I18N_UCALENDAR_AM_PM, #I18N_UCALENDAR_HOUR, #I18N_UCALENDAR_HOUR_OF_DAY, + * #I18N_UCALENDAR_MINUTE, #I18N_UCALENDAR_SECOND, #I18N_UCALENDAR_MILLISECOND, + * #I18N_UCALENDAR_ZONE_OFFSET, #I18N_UCALENDAR_DST_OFFSET, #I18N_UCALENDAR_YEAR_WOY, + * #I18N_UCALENDAR_DOW_LOCAL, #I18N_UCALENDAR_EXTENDED_YEAR, #I18N_UCALENDAR_JULIAN_DAY, + * #I18N_UCALENDAR_MILLISECONDS_IN_DAY, #I18N_UCALENDAR_IS_LEAP_MONTH. + * @param[in] type The desired critical point; one of #I18N_UCALENDAR_MINIMUM, #I18N_UCALENDAR_MAXIMUM, + * #I18N_UCALENDAR_GREATEST_MINIMUM, #I18N_UCALENDAR_LEAST_MAXIMUM, + * #I18N_UCALENDAR_ACTUAL_MINIMUM, #I18N_UCALENDAR_ACTUAL_MAXIMUM. * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -737,8 +737,8 @@ int32_t i18n_ucalendar_get_limit(const i18n_ucalendar_h calendar, i18n_ucalendar * @brief Gets the locale for this @c calendar object. * @details You can choose between valid and actual locale. * @remarks The specific error code can be obtained using the get_last_result() - * method. Error codes are described in Exceptions section and - * #i18n_error_code_e description. + * method. Error codes are described in Exceptions section and + * #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[in] calendar The calendar object @@ -753,7 +753,7 @@ const char *i18n_ucalendar_get_locale_by_type(const i18n_ucalendar_h calendar, i /** * @brief Returns the timezone data version currently used by ICU. * @remarks The specific error code can be obtained using the get_last_result() - * method. Error codes are described in #i18n_error_code_e description. + * method. Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * * @return The version string, such as "2007f". @@ -764,8 +764,8 @@ const char *i18n_ucalendar_get_tz_data_version(void); /** * @brief Returns the canonical system timezone ID or the normalized custom time zone ID for the given time zone ID. * @remarks The specific error code can be obtained using the get_last_result() - * method. Error codes are described in Exceptions section and - * #i18n_error_code_e description. + * method. Error codes are described in Exceptions section and + * #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[in] id The input timezone ID to be canonicalized. @@ -778,13 +778,13 @@ const char *i18n_ucalendar_get_tz_data_version(void); * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ucalendar_get_canonical_timezone_id(const i18n_uchar *id, int32_t length, i18n_uchar *result, int32_t result_capacity, i18n_ubool *is_system_id); +int32_t i18n_ucalendar_get_canonical_timezone_id(const i18n_uchar *id, int32_t length, i18n_uchar *result, int32_t result_capacity, i18n_ubool *is_system_id); /** * @brief Gets the resource keyword value string designating the calendar type for the #i18n_ucalendar_h. * @remarks The specific error code can be obtained using the get_last_result() - * method. Error codes are described in Exceptions section and - * #i18n_error_code_e description. + * method. Error codes are described in Exceptions section and + * #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[in] calendar The #i18n_ucalendar_h to query. @@ -798,15 +798,15 @@ const char *i18n_ucalendar_get_type(const i18n_ucalendar_h calendar); /** * @brief Given a key and a locale, returns an array of string values in a preferred order that would make a difference. * @details These are all and only those values where the open (creation) of the service with the - * locale formed from the input locale plus input keyword and that value - * has different behavior than creation with the input locale alone. + * locale formed from the input locale plus input keyword and that value + * has different behavior than creation with the input locale alone. * @since_tizen 2.3.1 * * @param[in] key One of the keys supported by this service. For now, only "calendar" is supported. * @param[in] locale The locale * @param[in] commonly_used If set to @c true it will return only commonly used values with - * the given locale in preferred order. Otherwise, it will return all the available - * values for the locale. + * the given locale in preferred order. Otherwise, it will return all the available + * values for the locale. * * @param[out] enumeration A pointer to the string enumeration over keyword values for the given key and the locale. * @@ -818,14 +818,14 @@ int i18n_ucalendar_get_keyword_values_for_locale(const char *key, const char *lo /** * @brief Returns whether the given day of the week is a weekday, a weekend day, - * or a day that transitions from one to the other, for the locale and calendar system - * associated with this @c #i18n_ucalendar_h (the locale's region is often the most determinant factor). + * or a day that transitions from one to the other, for the locale and calendar system + * associated with this @c #i18n_ucalendar_h (the locale's region is often the most determinant factor). * @details If a transition occurs at midnight, then the days before and after the - * transition will have the type #I18N_UCALENDAR_WEEKDAY or #I18N_UCALENDAR_WEEKEND. - * If a transition occurs at a time other than midnight, then the day of the - * transition will have the type #I18N_UCALENDAR_WEEKEND_ONSET or #I18N_UCALENDAR_WEEKEND_CEASE. - * In this case, the function i18n_ucalendar_get_weekend_transition() will - * return the point of transition. + * transition will have the type #I18N_UCALENDAR_WEEKDAY or #I18N_UCALENDAR_WEEKEND. + * If a transition occurs at a time other than midnight, then the day of the + * transition will have the type #I18N_UCALENDAR_WEEKEND_ONSET or #I18N_UCALENDAR_WEEKEND_CEASE. + * In this case, the function i18n_ucalendar_get_weekend_transition() will + * return the point of transition. * @since_tizen 2.3.1 * * @param[in] calendar The #i18n_ucalendar_h to query. @@ -842,14 +842,14 @@ int i18n_ucalendar_get_day_of_week_type(const i18n_ucalendar_h calendar, i18n_uc /** * @brief Returns the time during the day at which the weekend begins or ends in this calendar system. * @details If i18n_ucalendar_get_day_of_week_type() returns #I18N_UCALENDAR_WEEKEND_ONSET - * for the specified @c day_of_week, return the time at which the weekend begins. If - * i18n_ucalendar_get_day_of_week_type() returns #I18N_UCALENDAR_WEEKEND_CEASE for - * the specified @c day_of_week, return the time at which the weekend ends. If - * i18n_ucalendar_get_day_of_week_type() returns some other #i18n_ucalendar_weekday_type_e - * for the specified @c day_of_week, it is an error condition (#I18N_ERROR_INVALID_PARAMETER). + * for the specified @c day_of_week, return the time at which the weekend begins. If + * i18n_ucalendar_get_day_of_week_type() returns #I18N_UCALENDAR_WEEKEND_CEASE for + * the specified @c day_of_week, return the time at which the weekend ends. If + * i18n_ucalendar_get_day_of_week_type() returns some other #i18n_ucalendar_weekday_type_e + * for the specified @c day_of_week, it is an error condition (#I18N_ERROR_INVALID_PARAMETER). * @remarks The specific error code can be obtained using the get_last_result() - * method. Error codes are described in Exceptions section and - * #i18n_error_code_e description. + * method. Error codes are described in Exceptions section and + * #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[in] calendar The #i18n_ucalendar_h to query. @@ -859,13 +859,13 @@ int i18n_ucalendar_get_day_of_week_type(const i18n_ucalendar_h calendar, i18n_uc * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_ucalendar_get_weekend_transition(const i18n_ucalendar_h calendar, i18n_ucalendar_days_of_week_e day_of_week); +int32_t i18n_ucalendar_get_weekend_transition(const i18n_ucalendar_h calendar, i18n_ucalendar_days_of_week_e day_of_week); /** * @brief Returns @c true if the given #i18n_udate is in the weekend in this calendar system. * @remarks The specific error code can be obtained using the get_last_result() - * method. Error codes are described in Exceptions section and - * #i18n_error_code_e description. + * method. Error codes are described in Exceptions section and + * #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[in] calendar The #i18n_ucalendar_h to query. @@ -879,18 +879,18 @@ i18n_ubool i18n_ucalendar_is_weekend(i18n_ucalendar_h calendar, i18n_udate date) /** * @brief Get the #i18n_udate for the next/previous time zone transition relative - * to the calendar's current date, in the time zone to which the calendar is currently set. + * to the calendar's current date, in the time zone to which the calendar is currently set. * @details If there is no known time zone transition of the requested type relative - * to the calendar's date, the function returns @c false. + * to the calendar's date, the function returns @c false. * @remarks The specific error code can be obtained using the get_last_result() - * method. Error codes are described in Exceptions section and - * #i18n_error_code_e description. + * method. Error codes are described in Exceptions section and + * #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[in] calendar The #i18n_ucalendar_h to query. * @param[in] type The type of transition desired. * @param[out] transition A pointer to a #i18n_udate to be set to the transition time. - * If the function returns @c false, the value set is unspecified. + * If the function returns @c false, the value set is unspecified. * * @return @c true if the given #i18n_udate is in the weekend in this calendar system, @c false otherwise. * @exception #I18N_ERROR_NONE Successful diff --git a/src/include/wearable/utils_i18n_uchar.h b/src/include/wearable/utils_i18n_uchar.h index 4dc6e1e..c104e23 100644 --- a/src/include/wearable/utils_i18n_uchar.h +++ b/src/include/wearable/utils_i18n_uchar.h @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef __UTILS_I18N_UCHAR_H__ @@ -35,7 +35,7 @@ extern "C" { * @brief The Uchar module provides low-level access to the Unicode Character Database. * * @section CAPI_BASE_UTILS_I18N_UCHAR_MODULE_HEADER Required Header - * \#include + * \#include * * @section CAPI_BASE_UTILS_I18N_UCHAR_MODULE_OVERVIEW Overview * @details The Uchar module provides low-level access to the Unicode Character Database. @@ -44,72 +44,72 @@ extern "C" { * @brief Gets the property value of 'east asian width' among an enumerated property, * and the unicode allocation block that contains the character. * @code - int ret = I18N_ERROR_NONE; - i18n_uchar32 code_point = 0; - int property_value = 0; - i18n_uchar_u_east_asian_width_e east_asian_width = I18N_UCHAR_U_EA_NEUTRAL; - i18n_uchar_ublock_code_e block_code = I18N_UCHAR_UBLOCK_NO_BLOCK; - - // How to get the east asian width type for 's' - code_point = 0x73; // 's' - ret = i18n_uchar_get_int_property_value(code_point, I18N_UCHAR_EAST_ASIAN_WIDTH, &property_value); - if (ret != I18N_ERROR_NONE) { - dlog_print(DLOG_INFO, LOG_TAG, "Error occured!!\n"); - } else { - east_asian_width = (i18n_uchar_u_east_asian_width_e)property_value; - dlog_print(DLOG_INFO, LOG_TAG, "East Asian Width Type for ( %.4x ) is ( %d )\n", code_point, east_asian_width); - // East Asian Width Type for ( 0073 ) is ( 4 ) which is I18N_UCHAR_U_EA_NARROW - } - - // How to get the block code for 's' - ret = i18n_uchar_get_ublock_code(code_point, &block_code); - if (ret != I18N_ERROR_NONE) { - dlog_print(DLOG_INFO, LOG_TAG, "Error occured!!\n"); - } else { - dlog_print(DLOG_INFO, LOG_TAG, "block name for ( %.4x ) is ( %d )\n", code_point, block_code); - // block code for ( 0073 ) is ( 1 ) which is I18N_UCHAR_UBLOCK_BASIC_LATIN - } - - // How to get the east asian width type for 'sung' as ideographs - code_point = 0x661F; // 'sung' as ideographs - ret = i18n_uchar_get_int_property_value(code_point, I18N_UCHAR_EAST_ASIAN_WIDTH, &property_value); - if (ret != I18N_ERROR_NONE) { - dlog_print(DLOG_INFO, LOG_TAG, "Error occured!!\n"); - } else { - east_asian_width = (i18n_uchar_u_east_asian_width_e)property_value; - dlog_print(DLOG_INFO, LOG_TAG, "East Asian Width Type for ( %.4x ) is ( %d )\n", code_point, east_asian_width); - // East Asian Width Type for ( 661f ) is ( 5 ) which is I18N_UCHAR_U_EA_WIDE - } - - // How to get the block code for 'sung' as ideographs - ret = i18n_uchar_get_ublock_code(code_point, &block_code); - if (ret != I18N_ERROR_NONE) { - dlog_print(DLOG_INFO, LOG_TAG, "Error occured!!\n"); - } else { - dlog_print(DLOG_INFO, LOG_TAG, "block name for ( %.4x ) is ( %d )\n", code_point, block_code); - // block code for ( 661f ) is ( 71 ) which is I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS - } - - // How to get the east asian width type for 'sung' as hangul - code_point = 0xC131; // 'sung' as hangul - ret = i18n_uchar_get_int_property_value(code_point, I18N_UCHAR_EAST_ASIAN_WIDTH, &property_value); - if (ret != I18N_ERROR_NONE) { - dlog_print(DLOG_INFO, LOG_TAG, "Error occured!!\n"); - } else { - east_asian_width = (i18n_uchar_u_east_asian_width_e)property_value; - dlog_print(DLOG_INFO, LOG_TAG, "East Asian Width Type for ( %.4x ) is ( %d )\n", code_point, east_asian_width); - // East Asian Width Type for ( c131 ) is ( 5 ) which is I18N_UCHAR_U_EA_WIDE - } - - // How to get the block code for 'sung' as hangul - ret = i18n_uchar_get_ublock_code(code_point, &block_code); - if (ret != I18N_ERROR_NONE) { - dlog_print(DLOG_INFO, LOG_TAG, "Error occured!!\n"); - } else { - dlog_print(DLOG_INFO, LOG_TAG, "block name for ( %.4x ) is ( %d )\n", code_point, block_code); - // block code for ( c131 ) is ( 74 ) which is I18N_UCHAR_UBLOCK_HANGUL_SYLLABLES - } - + int ret = I18N_ERROR_NONE; + i18n_uchar32 code_point = 0; + int property_value = 0; + i18n_uchar_u_east_asian_width_e east_asian_width = I18N_UCHAR_U_EA_NEUTRAL; + i18n_uchar_ublock_code_e block_code = I18N_UCHAR_UBLOCK_NO_BLOCK; + + // How to get the east asian width type for 's' + code_point = 0x73; // 's' + ret = i18n_uchar_get_int_property_value(code_point, I18N_UCHAR_EAST_ASIAN_WIDTH, &property_value); + if (ret != I18N_ERROR_NONE) { + dlog_print(DLOG_INFO, LOG_TAG, "Error occured!!\n"); + } else { + east_asian_width = (i18n_uchar_u_east_asian_width_e)property_value; + dlog_print(DLOG_INFO, LOG_TAG, "East Asian Width Type for ( %.4x ) is ( %d )\n", code_point, east_asian_width); + // East Asian Width Type for ( 0073 ) is ( 4 ) which is I18N_UCHAR_U_EA_NARROW + } + + // How to get the block code for 's' + ret = i18n_uchar_get_ublock_code(code_point, &block_code); + if (ret != I18N_ERROR_NONE) { + dlog_print(DLOG_INFO, LOG_TAG, "Error occured!!\n"); + } else { + dlog_print(DLOG_INFO, LOG_TAG, "block name for ( %.4x ) is ( %d )\n", code_point, block_code); + // block code for ( 0073 ) is ( 1 ) which is I18N_UCHAR_UBLOCK_BASIC_LATIN + } + + // How to get the east asian width type for 'sung' as ideographs + code_point = 0x661F; // 'sung' as ideographs + ret = i18n_uchar_get_int_property_value(code_point, I18N_UCHAR_EAST_ASIAN_WIDTH, &property_value); + if (ret != I18N_ERROR_NONE) { + dlog_print(DLOG_INFO, LOG_TAG, "Error occured!!\n"); + } else { + east_asian_width = (i18n_uchar_u_east_asian_width_e)property_value; + dlog_print(DLOG_INFO, LOG_TAG, "East Asian Width Type for ( %.4x ) is ( %d )\n", code_point, east_asian_width); + // East Asian Width Type for ( 661f ) is ( 5 ) which is I18N_UCHAR_U_EA_WIDE + } + + // How to get the block code for 'sung' as ideographs + ret = i18n_uchar_get_ublock_code(code_point, &block_code); + if (ret != I18N_ERROR_NONE) { + dlog_print(DLOG_INFO, LOG_TAG, "Error occured!!\n"); + } else { + dlog_print(DLOG_INFO, LOG_TAG, "block name for ( %.4x ) is ( %d )\n", code_point, block_code); + // block code for ( 661f ) is ( 71 ) which is I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS + } + + // How to get the east asian width type for 'sung' as hangul + code_point = 0xC131; // 'sung' as hangul + ret = i18n_uchar_get_int_property_value(code_point, I18N_UCHAR_EAST_ASIAN_WIDTH, &property_value); + if (ret != I18N_ERROR_NONE) { + dlog_print(DLOG_INFO, LOG_TAG, "Error occured!!\n"); + } else { + east_asian_width = (i18n_uchar_u_east_asian_width_e)property_value; + dlog_print(DLOG_INFO, LOG_TAG, "East Asian Width Type for ( %.4x ) is ( %d )\n", code_point, east_asian_width); + // East Asian Width Type for ( c131 ) is ( 5 ) which is I18N_UCHAR_U_EA_WIDE + } + + // How to get the block code for 'sung' as hangul + ret = i18n_uchar_get_ublock_code(code_point, &block_code); + if (ret != I18N_ERROR_NONE) { + dlog_print(DLOG_INFO, LOG_TAG, "Error occured!!\n"); + } else { + dlog_print(DLOG_INFO, LOG_TAG, "block name for ( %.4x ) is ( %d )\n", code_point, block_code); + // block code for ( c131 ) is ( 74 ) which is I18N_UCHAR_UBLOCK_HANGUL_SYLLABLES + } + * @endcode */ @@ -121,17 +121,17 @@ extern "C" { /** * @brief Gets the property value for an enumerated property for a code point. * @details - * - * int property_value;\n - * #i18n_uchar_u_east_asian_width_e east_asian_width;\n - * #i18n_uchar_get_int_property_value (c, #I18N_UCHAR_EAST_ASIAN_WIDTH, &property_value);\n - * east_asian_width = (#i18n_uchar_u_east_asian_width_e)property_value;\n + * + * int property_value;\n + * #i18n_uchar_u_east_asian_width_e east_asian_width;\n + * #i18n_uchar_get_int_property_value (c, #I18N_UCHAR_EAST_ASIAN_WIDTH, &property_value);\n + * east_asian_width = (#i18n_uchar_u_east_asian_width_e)property_value;\n * - * int property_value;\n - * bool is_ideographic;\n - * #i18n_uchar_get_int_property_value(c, #I18N_UCHAR_IDEOGRAPHIC, &property_value);\n - * is_ideographic = (bool)property_value;\n - * + * int property_value;\n + * bool is_ideographic;\n + * #i18n_uchar_get_int_property_value(c, #I18N_UCHAR_IDEOGRAPHIC, &property_value);\n + * is_ideographic = (bool)property_value;\n + * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] c The code point to test. @@ -158,7 +158,7 @@ int i18n_uchar_get_int_property_value(i18n_uchar32 c, i18n_uchar_uproperty_e whi * @param[in] c The code point to test * @param[out] block_val The block value for the code point * - * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ int i18n_uchar_get_ublock_code(i18n_uchar32 c, i18n_uchar_ublock_code_e *block_val); @@ -172,4 +172,4 @@ int i18n_uchar_get_ublock_code(i18n_uchar32 c, i18n_uchar_ublock_code_e *block_v * @} */ -#endif /* __UTILS_I18N_UCHAR_H__*/ +#endif /* __UTILS_I18N_UCHAR_H__*/ diff --git a/src/include/wearable/utils_i18n_ucollator.h b/src/include/wearable/utils_i18n_ucollator.h old mode 100755 new mode 100644 index a0be21a..9c0c40c --- a/src/include/wearable/utils_i18n_ucollator.h +++ b/src/include/wearable/utils_i18n_ucollator.h @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef __UTILS_I18N_UCOLLATOR_H__ @@ -35,7 +35,7 @@ extern "C" { * @brief The Ucollator module performs locale-sensitive string comparison. * * @section CAPI_BASE_UTILS_I18N_UCOLLATOR_MODULE_HEADER Required Header - * \#include + * \#include * * @section CAPI_BASE_UTILS_I18N_UCOLLATOR_MODULE_OVERVIEW Overview * @details The Ucollator module performs locale-sensitive string comparison. It builds searching and sorting routines for natural language text and provides correct sorting orders for most locales supported. @@ -43,78 +43,78 @@ extern "C" { * @section CAPI_BASE_UTILS_I18N_UCOLLATOR_MODULE_SAMPLE_CODE_1 Sample Code 1 * @brief Converts two different byte strings to two different unicode strings and compares the unicode strings to check if the strings are equal to each other. * @code - i18n_uchar uchar_src[64] = {0,}; - i18n_uchar uchar_target[64] = {0,}; - char *src = "tizen"; - char *target = "bada"; - int uchar_src_len = 0; - int uchar_target_len = 0; - i18n_ucollator_h coll = NULL; - i18n_ubool result = NULL; - - i18n_ustring_from_UTF8( uchar_src, 64, NULL, src, -1 ); - i18n_ustring_from_UTF8( uchar_target, 64, NULL, target, -1 ); - - // creates a collator - i18n_ucollator_create( "en_US", &coll ); - - // sets strength for coll - i18n_ucollator_set_strength( coll, I18N_UCOLLATOR_PRIMARY ); - - // compares uchar_src with uchar_target - i18n_ustring_get_length( uchar_src, &uchar_src_len ); - i18n_ustring_get_length( uchar_target, &uchar_target_len ); - i18n_ucollator_equal( coll, uchar_src, uchar_src_len, uchar_target, uchar_target_len, &result ); - dlog_print(DLOG_INFO, LOG_TAG, "%s %s %s\n", src, result == 1 ? "is equal to" : "is not equal to", target ); // tizen is not equal to bada - - // destroys the collator - i18n_ucollator_destroy( coll ); + i18n_uchar uchar_src[64] = {0,}; + i18n_uchar uchar_target[64] = {0,}; + char *src = "tizen"; + char *target = "bada"; + int uchar_src_len = 0; + int uchar_target_len = 0; + i18n_ucollator_h coll = NULL; + i18n_ubool result = NULL; + + i18n_ustring_from_UTF8( uchar_src, 64, NULL, src, -1 ); + i18n_ustring_from_UTF8( uchar_target, 64, NULL, target, -1 ); + + // creates a collator + i18n_ucollator_create( "en_US", &coll ); + + // sets strength for coll + i18n_ucollator_set_strength( coll, I18N_UCOLLATOR_PRIMARY ); + + // compares uchar_src with uchar_target + i18n_ustring_get_length( uchar_src, &uchar_src_len ); + i18n_ustring_get_length( uchar_target, &uchar_target_len ); + i18n_ucollator_equal( coll, uchar_src, uchar_src_len, uchar_target, uchar_target_len, &result ); + dlog_print(DLOG_INFO, LOG_TAG, "%s %s %s\n", src, result == 1 ? "is equal to" : "is not equal to", target ); // tizen is not equal to bada + + // destroys the collator + i18n_ucollator_destroy( coll ); * @endcode * @section CAPI_BASE_UTILS_I18N_UCOLLATOR_MODULE_SAMPLE_CODE_2 Sample Code 2 * @brief Sorts in ascending order on the given data using string_ucollator * @code - i18n_ucollator_h coll = NULL; - char *src[3] = { "cat", "banana", "airplane" }; - char *tmp = NULL; - i18n_uchar buf_01[16] = {0,}; - i18n_uchar buf_02[16] = {0,}; - i18n_ucollator_result_e result = I18N_UCOLLATOR_EQUAL; - int i = 0, j = 0; - int ret = I18N_ERROR_NONE; - int buf_01_len = 0, buf_02_len = 0; - - for (i = 0; i < sizeof(src) / sizeof(src[0]); i++) { - dlog_print(DLOG_INFO, LOG_TAG, "%s\n", src[i]); - } // cat banana airplane - - // creates a collator - ret = i18n_ucollator_create("en_US", &coll); - - // compares and sorts in ascending order - if (ret == I18N_ERROR_NONE) { - i18n_ucollator_set_strength(coll, I18N_UCOLLATOR_TERTIARY); - for (i = 0; i < 2; i++) { - for (j = 0; j < 2 - i; j++) { - i18n_ustring_copy_ua(buf_01, src[j]); - i18n_ustring_copy_ua(buf_02, src[j+1]); - i18n_ustring_get_length(buf_01, &buf_01_len); - i18n_ustring_get_length(buf_02, &buf_02_len); - // compares buf_01 with buf_02 - i18n_ucollator_str_collator(coll, buf_01, buf_01_len, buf_02, buf_02_len, &result); - if (result == I18N_UCOLLATOR_GREATER) { - tmp = src[j]; - src[j] = src[j+1]; - src[j+1] = tmp; - } - } - } - } - // destroys the collator - i18n_ucollator_destroy( coll ); // deallocate memory for collator - - for (i = 0; i < sizeof(src) / sizeof(src[0]); i++) { - dlog_print(DLOG_INFO, LOG_TAG, "%s\n", src[i]); - } // ariplane banana cat + i18n_ucollator_h coll = NULL; + char *src[3] = { "cat", "banana", "airplane" }; + char *tmp = NULL; + i18n_uchar buf_01[16] = {0,}; + i18n_uchar buf_02[16] = {0,}; + i18n_ucollator_result_e result = I18N_UCOLLATOR_EQUAL; + int i = 0, j = 0; + int ret = I18N_ERROR_NONE; + int buf_01_len = 0, buf_02_len = 0; + + for (i = 0; i < sizeof(src) / sizeof(src[0]); i++) { + dlog_print(DLOG_INFO, LOG_TAG, "%s\n", src[i]); + } // cat banana airplane + + // creates a collator + ret = i18n_ucollator_create("en_US", &coll); + + // compares and sorts in ascending order + if (ret == I18N_ERROR_NONE) { + i18n_ucollator_set_strength(coll, I18N_UCOLLATOR_TERTIARY); + for (i = 0; i < 2; i++) { + for (j = 0; j < 2 - i; j++) { + i18n_ustring_copy_ua(buf_01, src[j]); + i18n_ustring_copy_ua(buf_02, src[j+1]); + i18n_ustring_get_length(buf_01, &buf_01_len); + i18n_ustring_get_length(buf_02, &buf_02_len); + // compares buf_01 with buf_02 + i18n_ucollator_str_collator(coll, buf_01, buf_01_len, buf_02, buf_02_len, &result); + if (result == I18N_UCOLLATOR_GREATER) { + tmp = src[j]; + src[j] = src[j+1]; + src[j+1] = tmp; + } + } + } + } + // destroys the collator + i18n_ucollator_destroy( coll ); // deallocate memory for collator + + for (i = 0; i < sizeof(src) / sizeof(src[0]); i++) { + dlog_print(DLOG_INFO, LOG_TAG, "%s\n", src[i]); + } // ariplane banana cat * @endcode */ @@ -205,7 +205,7 @@ int i18n_ucollator_equal(const i18n_ucollator_h collator, const i18n_uchar *src, * * @param[in] collator The i18n_collator_h to set. * @param[in] strength The desired collation strength.\n - * One of #i18n_ucollator_strength_e + * One of #i18n_ucollator_strength_e * * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter diff --git a/src/include/wearable/utils_i18n_udate.h b/src/include/wearable/utils_i18n_udate.h index 440dfe6..5cf902f 100644 --- a/src/include/wearable/utils_i18n_udate.h +++ b/src/include/wearable/utils_i18n_udate.h @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef __UTILS_I18N_UDATE_H__ @@ -33,7 +33,7 @@ * manner. * * @section CAPI_BASE_UTILS_I18N_UDATE_MODULE_HEADER Required Header - * \#include + * \#include * * @section CAPI_BASE_UTILS_I18N_UDATE_MODULE_OVERVIEW Overview * @details The Udate module consists of functions that convert dates and time from their @@ -50,112 +50,112 @@ * @section CAPI_BASE_UTILS_I18N_UDATE_MODULE_SAMPLE_CODE_1 Sample Code 1 * @brief Gets the best pattern according to a given locale and formats a current date and time using a locale_udate_format_h * @code - i18n_udatepg_h pattern_generator = NULL; - char *locale = I18N_ULOCALE_US; - - dlog_print(DLOG_INFO, LOG_TAG, "pattern_generator\n"); - - if(!pattern_generator) { - // create a pattern generator according to a given locale - i18n_udatepg_create(locale, &pattern_generator); - } - - if(!pattern_generator) { - dlog_print(DLOG_INFO, LOG_TAG, "i18n_udatepg_create fail"); - return ; - } - - i18n_uchar bestPattern[64] = {0,}; - char bestPatternString[64] = {0,}; - int bestPatternLength, len; - const char *custom_format = "yyyy.MM.dd G 'at' HH:mm:ss zzz"; - i18n_uchar uch_custom_format[64]; - int ret = I18N_ERROR_NONE; - - dlog_print(DLOG_INFO, LOG_TAG, "getBestPattern\n"); - - i18n_ustring_copy_ua(uch_custom_format, custom_format); - len = i18n_ustring_get_length(uch_custom_format); - - // gets the best pattern that matches the given custom_format - i18n_udatepg_get_best_pattern(pattern_generator, uch_custom_format, len, bestPattern, 64, &bestPatternLength); - - i18n_ustring_copy_au_n(bestPatternString, bestPattern, 64); - // gets "MM/dd/yyyy G h:mm:ss a zzz" as the best pattern - dlog_print(DLOG_INFO, LOG_TAG, "getBestPattern(char[]) : %s \n", bestPatternString); - - // closes a generator - i18n_udatepg_destroy(pattern_generator); - - i18n_udate_format_h formatter_KR = NULL; - i18n_udate_format_h formatter_LA = NULL; - i18n_udate_format_h formatter_SaoPaulo = NULL; - i18n_uchar formatted[64] = {0,}; - char result[64] = {0,}; - int formattedLength; - i18n_udate date; - const char *timezone_KR = "GMT+9:00"; // TimeZone for Korea/Seoul - const char *timezone_LA = "America/Los_Angeles"; - const char *timezone_SaoPaulo = "America/Sao_Paulo"; // Brazil/East - i18n_uchar utf16_timezone_KR[64] = {0,}; - i18n_uchar utf16_timezone_LA[64] = {0,}; - i18n_uchar utf16_timezone_SaoPaulo[64] = {0,}; - - i18n_ustring_copy_ua_n(utf16_timezone_KR, timezone_KR, strlen(timezone_KR)); - i18n_ustring_copy_ua_n(utf16_timezone_LA, timezone_LA, strlen(timezone_LA)); - i18n_ustring_copy_ua_n(utf16_timezone_SaoPaulo, timezone_SaoPaulo, strlen(timezone_SaoPaulo)); - - // creates new i18n_udate_format_h to format dates and times - ret = i18n_udate_create(I18N_UDATE_FULL , I18N_UDATE_FULL , locale, utf16_timezone_KR, -1, bestPattern, -1, &formatter_KR); - if (ret != I18N_ERROR_NONE) { - dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); - } - if (!formatter_KR) { - dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n"); - } - ret = i18n_udate_create(I18N_UDATE_FULL , I18N_UDATE_FULL , locale, utf16_timezone_LA, -1, bestPattern, -1, &formatter_LA); - if (ret != I18N_ERROR_NONE) { - dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); - } - if (!formatter_LA) { - dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n"); - } - ret = i18n_udate_create(I18N_UDATE_PATTERN , I18N_UDATE_PATTERN , locale, utf16_timezone_SaoPaulo, -1, bestPattern, -1, &formatter_SaoPaulo); - if (ret != I18N_ERROR_NONE) { - dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); - } - if (!formatter_LA) { - dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n"); - } - - dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_format_date\n"); - - // gets the current date and time - i18n_ucalendar_get_now(&date); - - // formats a date using i18n_udate_format_h - i18n_udate_format_date(formatter_KR, date, formatted, 64, NULL, &formattedLength); - i18n_ustring_copy_au_n(result, formatted, 64); - //ex) KOREA/Seoul - Current date : Wednesday, June 18, 2014 1:34:54 PM GMT+09:00 - dlog_print(DLOG_INFO, LOG_TAG, "KOREA/Seoul - Current date : %s\n",result); - - // formats a date using i18n_udate_format - i18n_udate_format_date(formatter_LA, date, formatted, 64, NULL, &formattedLength); - i18n_ustring_copy_au_n(result, formatted, 64); - //ex) America/LOS Angeles - Current date : Tuesday, June 17, 2014 9:34:54 PM Pacific Daylight Time - dlog_print(DLOG_INFO, LOG_TAG, "America/LOS Angeles - Current date : %s\n",result); - - // formats a date using i18n_udate_format_h - i18n_udate_format_date(formatter_SaoPaulo, date, formatted, 64, NULL, &formattedLength); - i18n_ustring_copy_au_n(result, formatted, 64); - //ex) Brazil/Sao Paulo - Current date : 6 18, 2014 AD, 1:34:54 PM GMT-2 - dlog_print(DLOG_INFO, LOG_TAG, "Brazil/Sao Paulo - Current date : %s\n",result); - - dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_destroy\n"); - // destroy an i18n_udate_format_h - i18n_udate_destroy(formatter_KR); - i18n_udate_destroy(formatter_LA); - i18n_udate_destroy(formatter_SaoPaulo); + i18n_udatepg_h pattern_generator = NULL; + char *locale = I18N_ULOCALE_US; + + dlog_print(DLOG_INFO, LOG_TAG, "pattern_generator\n"); + + if(!pattern_generator) { + // create a pattern generator according to a given locale + i18n_udatepg_create(locale, &pattern_generator); + } + + if(!pattern_generator) { + dlog_print(DLOG_INFO, LOG_TAG, "i18n_udatepg_create fail"); + return ; + } + + i18n_uchar bestPattern[64] = {0,}; + char bestPatternString[64] = {0,}; + int bestPatternLength, len; + const char *custom_format = "yyyy.MM.dd G 'at' HH:mm:ss zzz"; + i18n_uchar uch_custom_format[64]; + int ret = I18N_ERROR_NONE; + + dlog_print(DLOG_INFO, LOG_TAG, "getBestPattern\n"); + + i18n_ustring_copy_ua(uch_custom_format, custom_format); + len = i18n_ustring_get_length(uch_custom_format); + + // gets the best pattern that matches the given custom_format + i18n_udatepg_get_best_pattern(pattern_generator, uch_custom_format, len, bestPattern, 64, &bestPatternLength); + + i18n_ustring_copy_au_n(bestPatternString, bestPattern, 64); + // gets "MM/dd/yyyy G h:mm:ss a zzz" as the best pattern + dlog_print(DLOG_INFO, LOG_TAG, "getBestPattern(char[]) : %s \n", bestPatternString); + + // closes a generator + i18n_udatepg_destroy(pattern_generator); + + i18n_udate_format_h formatter_KR = NULL; + i18n_udate_format_h formatter_LA = NULL; + i18n_udate_format_h formatter_SaoPaulo = NULL; + i18n_uchar formatted[64] = {0,}; + char result[64] = {0,}; + int formattedLength; + i18n_udate date; + const char *timezone_KR = "GMT+9:00"; // TimeZone for Korea/Seoul + const char *timezone_LA = "America/Los_Angeles"; + const char *timezone_SaoPaulo = "America/Sao_Paulo"; // Brazil/East + i18n_uchar utf16_timezone_KR[64] = {0,}; + i18n_uchar utf16_timezone_LA[64] = {0,}; + i18n_uchar utf16_timezone_SaoPaulo[64] = {0,}; + + i18n_ustring_copy_ua_n(utf16_timezone_KR, timezone_KR, strlen(timezone_KR)); + i18n_ustring_copy_ua_n(utf16_timezone_LA, timezone_LA, strlen(timezone_LA)); + i18n_ustring_copy_ua_n(utf16_timezone_SaoPaulo, timezone_SaoPaulo, strlen(timezone_SaoPaulo)); + + // creates new i18n_udate_format_h to format dates and times + ret = i18n_udate_create(I18N_UDATE_FULL , I18N_UDATE_FULL , locale, utf16_timezone_KR, -1, bestPattern, -1, &formatter_KR); + if (ret != I18N_ERROR_NONE) { + dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); + } + if (!formatter_KR) { + dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n"); + } + ret = i18n_udate_create(I18N_UDATE_FULL , I18N_UDATE_FULL , locale, utf16_timezone_LA, -1, bestPattern, -1, &formatter_LA); + if (ret != I18N_ERROR_NONE) { + dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); + } + if (!formatter_LA) { + dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n"); + } + ret = i18n_udate_create(I18N_UDATE_PATTERN , I18N_UDATE_PATTERN , locale, utf16_timezone_SaoPaulo, -1, bestPattern, -1, &formatter_SaoPaulo); + if (ret != I18N_ERROR_NONE) { + dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); + } + if (!formatter_LA) { + dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n"); + } + + dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_format_date\n"); + + // gets the current date and time + i18n_ucalendar_get_now(&date); + + // formats a date using i18n_udate_format_h + i18n_udate_format_date(formatter_KR, date, formatted, 64, NULL, &formattedLength); + i18n_ustring_copy_au_n(result, formatted, 64); + //ex) KOREA/Seoul - Current date : Wednesday, June 18, 2014 1:34:54 PM GMT+09:00 + dlog_print(DLOG_INFO, LOG_TAG, "KOREA/Seoul - Current date : %s\n",result); + + // formats a date using i18n_udate_format + i18n_udate_format_date(formatter_LA, date, formatted, 64, NULL, &formattedLength); + i18n_ustring_copy_au_n(result, formatted, 64); + //ex) America/LOS Angeles - Current date : Tuesday, June 17, 2014 9:34:54 PM Pacific Daylight Time + dlog_print(DLOG_INFO, LOG_TAG, "America/LOS Angeles - Current date : %s\n",result); + + // formats a date using i18n_udate_format_h + i18n_udate_format_date(formatter_SaoPaulo, date, formatted, 64, NULL, &formattedLength); + i18n_ustring_copy_au_n(result, formatted, 64); + //ex) Brazil/Sao Paulo - Current date : 6 18, 2014 AD, 1:34:54 PM GMT-2 + dlog_print(DLOG_INFO, LOG_TAG, "Brazil/Sao Paulo - Current date : %s\n",result); + + dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_destroy\n"); + // destroy an i18n_udate_format_h + i18n_udate_destroy(formatter_KR); + i18n_udate_destroy(formatter_LA); + i18n_udate_destroy(formatter_SaoPaulo); * @endcode */ @@ -173,8 +173,8 @@ extern "C" { * @details A #i18n_udate_format_h may be used to format dates in calls to {@link i18n_udate_create()}. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @remarks Must release @a format using i18n_udate_destroy().\n - * If @a pattern parameter is used, pass in #I18N_UDATE_PATTERN for @a time_style and @a date_style. \n - * #I18N_UDATE_PATTERN can only be used in this case, and has to be set for both @a time_style and @a date_style. + * If @a pattern parameter is used, pass in #I18N_UDATE_PATTERN for @a time_style and @a date_style. \n + * #I18N_UDATE_PATTERN can only be used in this case, and has to be set for both @a time_style and @a date_style. * * @param[in] time_style The style used to format times\n One of #I18N_UDATE_FULL, #I18N_UDATE_LONG, * #I18N_UDATE_MEDIUM, #I18N_UDATE_SHORT, #I18N_UDATE_DEFAULT, #I18N_UDATE_PATTERN (see remarks) or #I18N_UDATE_NONE (relative time styles @@ -183,11 +183,11 @@ extern "C" { * #I18N_UDATE_MEDIUM, #I18N_UDATE_SHORT, #I18N_UDATE_DEFAULT, #I18N_UDATE_RELATIVE, #I18N_UDATE_LONG_RELATIVE, * #I18N_UDATE_MEDIUM_RELATIVE, #I18N_UDATE_SHORT_RELATIVE, #I18N_UDATE_PATTERN (see remarks) or #I18N_UDATE_NONE * @param[in] locale The locale specifying the formatting conventions. - * @param[in] tz_id A timezone ID specifying the timezone to use\n If @c 0, use the default timezone. + * @param[in] tz_id A timezone ID specifying the timezone to use\n If @c 0, use the default timezone. * @param[in] tz_id_len The length of @a tz_id, otherwise @c -1 if NULL-terminated. * @param[in] pattern A pattern specifying the format to use. The pattern is generated by Udatepg module.\n - * When the pattern parameter is used, pass in #I18N_UDATE_PATTERN for both time_style and date_style.\n - * See remarks for additional conditions. + * When the pattern parameter is used, pass in #I18N_UDATE_PATTERN for both time_style and date_style.\n + * See remarks for additional conditions. * @param[in] pattern_len The number of characters in the pattern, or otherwise @c -1 if NULL-terminated. * @param[out] format A pointer to an #i18n_udate_format_h to use for formatting dates and times, otherwise @c 0 if an error occurs. * @@ -234,7 +234,7 @@ int i18n_udate_destroy(i18n_udate_format_h format); int i18n_udate_format_date(const i18n_udate_format_h format, i18n_udate date_to_format, i18n_uchar *result, int32_t result_len, i18n_ufield_position_h pos, int32_t *buf_size_needed); -// Newly Added APIs +/* Newly Added APIs */ /** * @brief Maps from an #i18n_udate_format_h to the corresponding #i18n_ucalendar_date_fields_e. @@ -242,8 +242,8 @@ int i18n_udate_format_date(const i18n_udate_format_h format, i18n_udate date_to_ * @since_tizen 2.3.1 * * @param[in] field The #i18n_udate_format_h to map. - * #I18N_UDATE_FORMAT_TIMEZONE_LOCALIZED_GMT_OFFSET_FIELD, #I18N_UDATE_FORMAT_TIMEZONE_ISO_FIELD, - * #I18N_UDATE_FORMAT_TIMEZONE_ISO_LOCAL_FIELD and #I18N_UDATE_FORMAT_FIELD_COUNT are not supported. + * #I18N_UDATE_FORMAT_TIMEZONE_LOCALIZED_GMT_OFFSET_FIELD, #I18N_UDATE_FORMAT_TIMEZONE_ISO_FIELD, + * #I18N_UDATE_FORMAT_TIMEZONE_ISO_LOCAL_FIELD and #I18N_UDATE_FORMAT_FIELD_COUNT are not supported. * @param[out] date_field_type A pointer to the #i18n_ucalendar_date_fields_e. * * @return Error code. @@ -257,7 +257,7 @@ int i18n_udate_to_calendar_date_field(i18n_udate_format_field_e field, i18n_ucal * @details This function performs a deep copy. * @since_tizen 2.3.1 * - * @param[in] format The format to copy. + * @param[in] format The format to copy. * @param[out] format_clone A pointer to clone of @c format. * * @return Error code. Error codes not listed below are described in #i18n_error_code_e @@ -269,19 +269,19 @@ int i18n_udate_clone(const i18n_udate_format_h format, i18n_udate_format_h *form /** * @brief Parses a string into an date/time using an #i18n_udate_format_h. * @details The date will be parsed using the conventions specified in {@link i18n_udate_create()}.
- * Note that the normal date formats associated with some calendars - such as the Chinese lunar calendar - do not specify enough fields to enable dates to be parsed unambiguously. - * In the case of the Chinese lunar calendar, while the year within the current 60-year cycle is specified, - * the number of such cycles since the start date of the calendar (in the #I18N_UCALENDAR_ERA field of the i18n_ucalendar_h) is not normally part of the format, - * and parsing may assume the wrong era. - * For such cases it is recommended that clients parse using i18n_udate_parse_calendar() with the calendar passed in set to the current date, - * or to a date within the era/cycle that should be assumed if absent in the format. + * Note that the normal date formats associated with some calendars - such as the Chinese lunar calendar - do not specify enough fields to enable dates to be parsed unambiguously. + * In the case of the Chinese lunar calendar, while the year within the current 60-year cycle is specified, + * the number of such cycles since the start date of the calendar (in the #I18N_UCALENDAR_ERA field of the i18n_ucalendar_h) is not normally part of the format, + * and parsing may assume the wrong era. + * For such cases it is recommended that clients parse using i18n_udate_parse_calendar() with the calendar passed in set to the current date, + * or to a date within the era/cycle that should be assumed if absent in the format. * @since_tizen 2.3.1 * - * @param[in] format The formatter to use. - * @param[in] text The text to parse. + * @param[in] format The formatter to use. + * @param[in] text The text to parse. * @param[in] text_length The length of text, or -1 if NULL-terminated. - * @param[in] parse_pos If not 0, on input a pointer to an integer specifying the offset at which to begin parsing. - * If not 0, on output the offset at which parsing ended. + * @param[in] parse_pos If not 0, on input a pointer to an integer specifying the offset at which to begin parsing. + * If not 0, on output the offset at which parsing ended. * @param[out] parsed_date A pointer to the value of the parsed date/time. * * @return Error code. Error codes not listed below are described in #i18n_error_code_e @@ -297,16 +297,16 @@ int i18n_udate_parse(const i18n_udate_format_h format, const i18n_uchar *text, i * @details The date will be parsed using the conventions specified in {@link i18n_udate_create()}. * @since_tizen 2.3.1 * - * @param[in] format The formatter to use. - * @param[in,out] calendar A pointer to calendar set on input to the date and time to be used for missing values in the date/time string being parsed, - * and set on output to the parsed date/time. - * When the calendar type is different from the internal calendar held by the #i18n_udate_format_h instance, - * the internal calendar will be cloned to a work calendar set to the same milliseconds and time zone as this calendar parameter, - * field values will be parsed based on the work calendar, then the result (milliseconds and time zone) will be set in this calendar. - * @param[in] text The text to parse. - * @param[in] text_length The length of text, or -1 if NULL-terminated. - * @param[in] parse_pos If not 0, on input a pointer to an integer specifying the offset at which to begin parsing. - * If not 0, on output the offset at which parsing ended. + * @param[in] format The formatter to use. + * @param[in,out] calendar A pointer to calendar set on input to the date and time to be used for missing values in the date/time string being parsed, + * and set on output to the parsed date/time. + * When the calendar type is different from the internal calendar held by the #i18n_udate_format_h instance, + * the internal calendar will be cloned to a work calendar set to the same milliseconds and time zone as this calendar parameter, + * field values will be parsed based on the work calendar, then the result (milliseconds and time zone) will be set in this calendar. + * @param[in] text The text to parse. + * @param[in] text_length The length of text, or -1 if NULL-terminated. + * @param[in] parse_pos If not 0, on input a pointer to an integer specifying the offset at which to begin parsing. + * If not 0, on output the offset at which parsing ended. * * @return Error code. Error codes not listed below are described in #i18n_error_code_e * @retval #I18N_ERROR_NONE Successful @@ -315,16 +315,16 @@ int i18n_udate_parse(const i18n_udate_format_h format, const i18n_uchar *text, i * @see i18n_udate_format_date() */ int i18n_udate_parse_calendar(const i18n_udate_format_h format, i18n_ucalendar_h *calendar, const i18n_uchar *text, - int32_t text_length, int32_t *parse_pos); + int32_t text_length, int32_t *parse_pos); /** * @brief Determines if an #i18n_udate_format_h will perform lenient parsing. * @details With lenient parsing, the parser may use heuristics to interpret inputs that do not precisely match the pattern. - * With strict parsing, inputs must match the pattern. + * With strict parsing, inputs must match the pattern. * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] format The #i18n_udate_format_h to query. + * @param[in] format The #i18n_udate_format_h to query. * * @return true if format is set to perform lenient parsing, false otherwise. * @@ -338,10 +338,10 @@ i18n_ubool i18n_udate_is_lenient(const i18n_udate_format_h format); /** * @brief Specifies whether an #i18n_udate_format_h will perform lenient parsing. * @details With lenient parsing, the parser may use heuristics to interpret inputs that do not precisely match the pattern. - * With strict parsing, inputs must match the pattern. + * With strict parsing, inputs must match the pattern. * @since_tizen 2.3.1 * - * @param[in] format The #i18n_udate_format_h to set. + * @param[in] format The #i18n_udate_format_h to set. * @param[in] is_lenient true if fmt should perform lenient parsing, false otherwise. * * @return Error code. @@ -357,8 +357,8 @@ int i18n_udate_set_lenient(i18n_udate_format_h format, i18n_ubool is_lenient); * @details An #i18n_udate_format_h uses an #i18n_ucalendar_h to convert a raw value to, for example, the day of the week. * @since_tizen 2.3.1 * - * @param[in] format The #i18n_udate_format_h to query. - * @param[out] calendar A pointer to the #i18n_ucalendar_h used by format. + * @param[in] format The #i18n_udate_format_h to query. + * @param[out] calendar A pointer to the #i18n_ucalendar_h used by format. * * @return Error code. * @exception #I18N_ERROR_NONE Successful @@ -373,8 +373,8 @@ int i18n_udate_get_calendar(const i18n_udate_format_h format, i18n_ucalendar_h * * @details An #i18n_udate_format_h uses an #i18n_ucalendar_h to convert a raw value to, for example, the day of the week. * @since_tizen 2.3.1 * - * @param[in] format The #i18n_udate_format_h. - * @param[in] calendar_to_set An #i18n_ucalendar_h to be used by the format. + * @param[in] format The #i18n_udate_format_h. + * @param[in] calendar_to_set An #i18n_ucalendar_h to be used by the format. * * @return Error code. * @retval #I18N_ERROR_NONE Successful @@ -389,8 +389,8 @@ int i18n_udate_set_calendar(i18n_udate_format_h format, const i18n_ucalendar_h c * @details An #i18n_udate_format_h uses an #i18n_unumber_format_h to format numbers within a date, for example the day number. * @since_tizen 2.3.1 * - * @param[in] format The formatter to query. - * @param[out] number_format A pointer to the #i18n_unumber_format_h used by @a format to format numbers. + * @param[in] format The formatter to query. + * @param[out] number_format A pointer to the #i18n_unumber_format_h used by @a format to format numbers. * * @return Error code. * @exception #I18N_ERROR_NONE Successful @@ -405,8 +405,8 @@ int i18n_udate_get_number_format(const i18n_udate_format_h format, i18n_unumber_ * @details An #i18n_udate_format_h uses an #i18n_unumber_format_h to format numbers within a date, for example the day number. * @since_tizen 2.3.1 * - * @param[in] format The #i18n_udate_format_h to set. - * @param[in] number_format_to_set An #i18n_unumber_format_h to be used by @a format to format numbers. + * @param[in] format The #i18n_udate_format_h to set. + * @param[in] number_format_to_set An #i18n_unumber_format_h to be used by @a format to format numbers. * * @return Error code. * @retval #I18N_ERROR_NONE Successful @@ -422,7 +422,7 @@ int i18n_udate_set_number_format(i18n_udate_format_h format, const i18n_unumber_ * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] locale_index The index of the desired locale. + * @param[in] locale_index The index of the desired locale. * * @return A locale for which date/time formatting patterns are available, or 0 if none. * @exception #I18N_ERROR_NONE Successful @@ -452,7 +452,7 @@ int32_t i18n_udate_count_available(void); * * @since_tizen 2.3.1 * - * @param[in] format The #i18n_udate_format_h to get. + * @param[in] format The #i18n_udate_format_h to get. * @param[out] year A pointer to the year relative to which all 2-digit years are interpreted. * * @return Error code. Error codes not listed below are described in #i18n_error_code_e @@ -470,7 +470,7 @@ int i18n_udate_get_2digit_year_start(const i18n_udate_format_h format, i18n_udat * @since_tizen 2.3.1 * * @param[in] format The #i18n_udate_format_h to map. - * @param[in] date The year relative to which all 2-digit years will be interpreted. + * @param[in] date The year relative to which all 2-digit years will be interpreted. * * @return Error code. Error codes not listed below are described in #i18n_error_code_e * @retval #I18N_ERROR_NONE Successful @@ -484,13 +484,13 @@ int i18n_udate_set_2digit_year_start(i18n_udate_format_h format, i18n_udate date * @brief Extracts the pattern from an #i18n_udate_format_h. * @details The pattern will follow the pattern syntax rules. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] format The #i18n_udate_format_h to query. - * @param[in] localized true if the pattern should be localized, false otherwise. - * @param[out] result A pointer to a buffer to receive the pattern. - * @param[in] result_length The maximum size of result. + * @param[in] format The #i18n_udate_format_h to query. + * @param[in] localized true if the pattern should be localized, false otherwise. + * @param[out] result A pointer to a buffer to receive the pattern. + * @param[in] result_length The maximum size of result. * * @return The total buffer size needed; if greater than result_length, the output was truncated. * @@ -500,16 +500,16 @@ int i18n_udate_set_2digit_year_start(i18n_udate_format_h format, i18n_udate date * @see i18n_udate_apply_pattern() */ int32_t i18n_udate_to_pattern(const i18n_udate_format_h format, i18n_ubool localized, i18n_uchar *result, - int32_t result_length); + int32_t result_length); /** * @brief Sets the pattern used by an #i18n_udate_format_h. * @details The pattern should follow the pattern syntax rules. * @since_tizen 2.3.1 * - * @param[in] format The #i18n_udate_format_h to set. - * @param[in] localized true if the pattern is localized, false otherwise. - * @param[in] pattern The new pattern. + * @param[in] format The #i18n_udate_format_h to set. + * @param[in] localized true if the pattern is localized, false otherwise. + * @param[in] pattern The new pattern. * @param[in] pattern_length The length of pattern, or -1 if NULL-terminated. * * @return Error code. @@ -519,20 +519,20 @@ int32_t i18n_udate_to_pattern(const i18n_udate_format_h format, i18n_ubool local * @see i18n_udate_to_pattern() */ int i18n_udate_apply_pattern(i18n_udate_format_h format, i18n_ubool localized, const i18n_uchar *pattern, - int32_t pattern_length); + int32_t pattern_length); /** * @brief Gets the symbols associated with an #i18n_udate_format_h. * @details The symbols are what an #i18n_udate_format_h uses to represent locale-specific data, for example month or day names. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] format The #i18n_udate_format_h to query. - * @param[in] type The type of symbols to get. - * All the types defined in the #i18n_udate_format_symbol_type_e enumeration are supported. - * @param[in] symbol_index The desired symbol of type type. - * @param[out] result A pointer to a buffer to receive the pattern. + * @param[in] format The #i18n_udate_format_h to query. + * @param[in] type The type of symbols to get. + * All the types defined in the #i18n_udate_format_symbol_type_e enumeration are supported. + * @param[in] symbol_index The desired symbol of type type. + * @param[out] result A pointer to a buffer to receive the pattern. * @param[in] result_length The maximum size of the result buffer. * * @return The total buffer size needed; if greater than result_length, the output was truncated. @@ -544,7 +544,7 @@ int i18n_udate_apply_pattern(i18n_udate_format_h format, i18n_ubool localized, c * @see #i18n_udate_set_symbols() */ int32_t i18n_udate_get_symbols(const i18n_udate_format_h format, i18n_udate_format_symbol_type_e type, int32_t symbol_index, - i18n_uchar *result, int32_t result_length); + i18n_uchar *result, int32_t result_length); /** * @brief Counts the number of particular symbols for an #i18n_udate_format_h. @@ -553,8 +553,8 @@ int32_t i18n_udate_get_symbols(const i18n_udate_format_h format, i18n_udate_form * @since_tizen 2.3.1 * * @param[in] format The #i18n_udate_format_h to query. - * @param[in] type The type of symbols to count. - * If wrong type is passed, 0 will be returned. + * @param[in] type The type of symbols to count. + * If wrong type is passed, 0 will be returned. * * @return The number of symbols of type @a type. * @@ -572,12 +572,12 @@ int32_t i18n_udate_count_symbols(const i18n_udate_format_h format, i18n_udate_fo * * @since_tizen 2.3.1 * - * @param[in] format The #i18n_udate_format_h to set. - * @param[in] type The type of symbols to set. - * All the types defined in the #i18n_udate_format_symbol_type_e enumeration are supported. - * If a type not defined in the enumeration is passed, then the #I18N_ERROR_NOT_SUPPORTED error is returned. + * @param[in] format The #i18n_udate_format_h to set. + * @param[in] type The type of symbols to set. + * All the types defined in the #i18n_udate_format_symbol_type_e enumeration are supported. + * If a type not defined in the enumeration is passed, then the #I18N_ERROR_NOT_SUPPORTED error is returned. * @param[in] symbol_index The index of the symbol to set of type type. - * @param[in] value The new value. + * @param[in] value The new value. * @param[in] value_length The length of @a value, or @c -1 if NULL-terminated. * * @return Error code. Error codes not listed below are described in the #i18n_error_code_e enumeration. @@ -588,24 +588,24 @@ int32_t i18n_udate_count_symbols(const i18n_udate_format_h format, i18n_udate_fo * @see #i18n_udate_get_symbols() */ int i18n_udate_set_symbols(i18n_udate_format_h format, i18n_udate_format_symbol_type_e type, int32_t symbol_index, - i18n_uchar *value, int32_t value_length); + i18n_uchar *value, int32_t value_length); /** * @brief Gets the locale for this date format object. * @details You can choose between valid and actual locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[in] format The #i18n_udate_format_h to get the locale from. - * @param[in] type The type of the locale we're looking for (valid or actual). + * @param[in] type The type of the locale we're looking for (valid or actual). * * @return The locale name. * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -const char * i18n_udate_get_locale_by_type(const i18n_udate_format_h format, i18n_ulocale_data_locale_type_e type); +const char *i18n_udate_get_locale_by_type(const i18n_udate_format_h format, i18n_ulocale_data_locale_type_e type); /** * @brief Sets a particular #i18n_udisplay_context_e value in the formatter, such as #I18N_UDISPLAY_CONTEXT_CAPITALIZATION_FOR_STANDALONE. diff --git a/src/include/wearable/utils_i18n_udatepg.h b/src/include/wearable/utils_i18n_udatepg.h old mode 100755 new mode 100644 index 8308288..a2f9f3b --- a/src/include/wearable/utils_i18n_udatepg.h +++ b/src/include/wearable/utils_i18n_udatepg.h @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef __UTILS_I18N_UDATEPG_H__ @@ -31,7 +31,7 @@ * @brief The Udatepg module provides flexible generation of date format patterns, like "yy-MM-dd". The user can build up the generator by adding successive patterns. * * @section CAPI_BASE_UTILS_I18N_UDATEPG_MODULE_HEADER Required Header - * \#include + * \#include * * @section CAPI_BASE_UTILS_I18N_UDATEPG_MODULE_OVERVIEW Overview * @details The Udatepg module provides flexible generation of date format patterns, @@ -49,112 +49,112 @@ * @section CAPI_BASE_UTILS_I18N_UDATEPG_MODULE_SAMPLE_CODE_1 Sample Code 1 * @brief Gets the best pattern according to a given locale and formats a current date and time using an i18n_udate_format_h * @code - i18n_udatepg_h pattern_generator = NULL; - char *locale = I18N_ULOCALE_US; - - dlog_print(DLOG_INFO, LOG_TAG, "pattern_generator\n"); - - if(!pattern_generator) { - // create a pattern generator according to a given locale - i18n_udatepg_create(locale, &pattern_generator); - } - - if(!pattern_generator) { - dlog_print(DLOG_INFO, LOG_TAG, "i18n_udatepg_create fail"); - return ; - } - - i18n_uchar bestPattern[64] = {0,}; - char bestPatternString[64] = {0,}; - int bestPatternLength, len; - const char *custom_format = "yyyy.MM.dd G 'at' HH:mm:ss zzz"; - i18n_uchar uch_custom_format[64]; - int ret = I18N_ERROR_NONE; - - dlog_print(DLOG_INFO, LOG_TAG, "getBestPattern\n"); - - i18n_ustring_copy_ua(uch_custom_format, custom_format); - len = i18n_ustring_get_length(uch_custom_format); - - // gets the best pattern that matches the given custom_format - i18n_udatepg_get_best_pattern(pattern_generator, uch_custom_format, len, bestPattern, 64, &bestPatternLength); - - i18n_ustring_copy_au_n(bestPatternString, bestPattern, 64); - // gets "MM/dd/yyyy G h:mm:ss a zzz" as the best pattern - dlog_print(DLOG_INFO, LOG_TAG, "getBestPattern(char[]) : %s \n", bestPatternString); - - // closes a generator - i18n_udatepg_destroy(pattern_generator); - - i18n_udate_format_h formatter_KR = NULL; - i18n_udate_format_h formatter_LA = NULL; - i18n_udate_format_h formatter_SaoPaulo = NULL; - i18n_uchar formatted[64] = {0,}; - char result[64] = {0,}; - int formattedLength; - i18n_udate date; - const char *timezone_KR = "GMT+9:00"; // TimeZone for Korea/Seoul - const char *timezone_LA = "America/Los_Angeles"; - const char *timezone_SaoPaulo = "America/Sao_Paulo"; // Brazil/East - i18n_uchar utf16_timezone_KR[64] = {0,}; - i18n_uchar utf16_timezone_LA[64] = {0,}; - i18n_uchar utf16_timezone_SaoPaulo[64] = {0,}; - - i18n_ustring_copy_ua_n(utf16_timezone_KR, timezone_KR, strlen(timezone_KR)); - i18n_ustring_copy_ua_n(utf16_timezone_LA, timezone_LA, strlen(timezone_LA)); - i18n_ustring_copy_ua_n(utf16_timezone_SaoPaulo, timezone_SaoPaulo, strlen(timezone_SaoPaulo)); - - // creates new i18n_udate_format to format dates and times - ret = i18n_udate_create(I18N_UDATE_FULL , I18N_UDATE_FULL , locale, utf16_timezone_KR, -1, bestPattern, -1, &formatter_KR); - if (ret != I18N_ERROR_NONE) { - dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); - } - if (!formatter_KR) { - dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n"); - } - ret = i18n_udate_create(I18N_UDATE_FULL , I18N_UDATE_FULL , locale, utf16_timezone_LA, -1, bestPattern, -1, &formatter_LA); - if (ret != I18N_ERROR_NONE) { - dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); - } - if (!formatter_LA) { - dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n"); - } - ret = i18n_udate_create(I18N_UDATE_PATTERN , I18N_UDATE_PATTERN , locale, utf16_timezone_SaoPaulo, -1, bestPattern, -1, &formatter_SaoPaulo); - if (ret != I18N_ERROR_NONE) { - dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); - } - if (!formatter_LA) { - dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n"); - } - - dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_format_date\n"); - - // gets the current date and time - i18n_ucalendar_get_now(&date); - - // formats a date using i18n_udate_format - i18n_udate_format_date(formatter_KR, date, formatted, 64, NULL, &formattedLength); - i18n_ustring_copy_au_n(result, formatted, 64); - //ex) KOREA/Seoul - Current date : Wednesday, June 18, 2014 1:34:54 PM GMT+09:00 - dlog_print(DLOG_INFO, LOG_TAG, "KOREA/Seoul - Current date : %s\n",result); - - // formats a date using i18n_udate_format - i18n_udate_format_date(formatter_LA, date, formatted, 64, NULL, &formattedLength); - i18n_ustring_copy_au_n(result, formatted, 64); - //ex) America/LOS Angeles - Current date : Tuesday, June 17, 2014 9:34:54 PM Pacific Daylight Time - dlog_print(DLOG_INFO, LOG_TAG, "America/LOS Angeles - Current date : %s\n",result); - - // formats a date using i18n_udate_format - i18n_udate_format_date(formatter_SaoPaulo, date, formatted, 64, NULL, &formattedLength); - i18n_ustring_copy_au_n(result, formatted, 64); - //ex) Brazil/Sao Paulo - Current date : 6 18, 2014 AD, 1:34:54 PM GMT-2 - dlog_print(DLOG_INFO, LOG_TAG, "Brazil/Sao Paulo - Current date : %s\n",result); - - dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_destroy\n"); - // destroy an #i18n_udate_format_h - i18n_udate_destroy(formatter_KR); - i18n_udate_destroy(formatter_LA); - i18n_udate_destroy(formatter_SaoPaulo); + i18n_udatepg_h pattern_generator = NULL; + char *locale = I18N_ULOCALE_US; + + dlog_print(DLOG_INFO, LOG_TAG, "pattern_generator\n"); + + if(!pattern_generator) { + // create a pattern generator according to a given locale + i18n_udatepg_create(locale, &pattern_generator); + } + + if(!pattern_generator) { + dlog_print(DLOG_INFO, LOG_TAG, "i18n_udatepg_create fail"); + return ; + } + + i18n_uchar bestPattern[64] = {0,}; + char bestPatternString[64] = {0,}; + int bestPatternLength, len; + const char *custom_format = "yyyy.MM.dd G 'at' HH:mm:ss zzz"; + i18n_uchar uch_custom_format[64]; + int ret = I18N_ERROR_NONE; + + dlog_print(DLOG_INFO, LOG_TAG, "getBestPattern\n"); + + i18n_ustring_copy_ua(uch_custom_format, custom_format); + len = i18n_ustring_get_length(uch_custom_format); + + // gets the best pattern that matches the given custom_format + i18n_udatepg_get_best_pattern(pattern_generator, uch_custom_format, len, bestPattern, 64, &bestPatternLength); + + i18n_ustring_copy_au_n(bestPatternString, bestPattern, 64); + // gets "MM/dd/yyyy G h:mm:ss a zzz" as the best pattern + dlog_print(DLOG_INFO, LOG_TAG, "getBestPattern(char[]) : %s \n", bestPatternString); + + // closes a generator + i18n_udatepg_destroy(pattern_generator); + + i18n_udate_format_h formatter_KR = NULL; + i18n_udate_format_h formatter_LA = NULL; + i18n_udate_format_h formatter_SaoPaulo = NULL; + i18n_uchar formatted[64] = {0,}; + char result[64] = {0,}; + int formattedLength; + i18n_udate date; + const char *timezone_KR = "GMT+9:00"; // TimeZone for Korea/Seoul + const char *timezone_LA = "America/Los_Angeles"; + const char *timezone_SaoPaulo = "America/Sao_Paulo"; // Brazil/East + i18n_uchar utf16_timezone_KR[64] = {0,}; + i18n_uchar utf16_timezone_LA[64] = {0,}; + i18n_uchar utf16_timezone_SaoPaulo[64] = {0,}; + + i18n_ustring_copy_ua_n(utf16_timezone_KR, timezone_KR, strlen(timezone_KR)); + i18n_ustring_copy_ua_n(utf16_timezone_LA, timezone_LA, strlen(timezone_LA)); + i18n_ustring_copy_ua_n(utf16_timezone_SaoPaulo, timezone_SaoPaulo, strlen(timezone_SaoPaulo)); + + // creates new i18n_udate_format to format dates and times + ret = i18n_udate_create(I18N_UDATE_FULL , I18N_UDATE_FULL , locale, utf16_timezone_KR, -1, bestPattern, -1, &formatter_KR); + if (ret != I18N_ERROR_NONE) { + dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); + } + if (!formatter_KR) { + dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n"); + } + ret = i18n_udate_create(I18N_UDATE_FULL , I18N_UDATE_FULL , locale, utf16_timezone_LA, -1, bestPattern, -1, &formatter_LA); + if (ret != I18N_ERROR_NONE) { + dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); + } + if (!formatter_LA) { + dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n"); + } + ret = i18n_udate_create(I18N_UDATE_PATTERN , I18N_UDATE_PATTERN , locale, utf16_timezone_SaoPaulo, -1, bestPattern, -1, &formatter_SaoPaulo); + if (ret != I18N_ERROR_NONE) { + dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); + } + if (!formatter_LA) { + dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n"); + } + + dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_format_date\n"); + + // gets the current date and time + i18n_ucalendar_get_now(&date); + + // formats a date using i18n_udate_format + i18n_udate_format_date(formatter_KR, date, formatted, 64, NULL, &formattedLength); + i18n_ustring_copy_au_n(result, formatted, 64); + //ex) KOREA/Seoul - Current date : Wednesday, June 18, 2014 1:34:54 PM GMT+09:00 + dlog_print(DLOG_INFO, LOG_TAG, "KOREA/Seoul - Current date : %s\n",result); + + // formats a date using i18n_udate_format + i18n_udate_format_date(formatter_LA, date, formatted, 64, NULL, &formattedLength); + i18n_ustring_copy_au_n(result, formatted, 64); + //ex) America/LOS Angeles - Current date : Tuesday, June 17, 2014 9:34:54 PM Pacific Daylight Time + dlog_print(DLOG_INFO, LOG_TAG, "America/LOS Angeles - Current date : %s\n",result); + + // formats a date using i18n_udate_format + i18n_udate_format_date(formatter_SaoPaulo, date, formatted, 64, NULL, &formattedLength); + i18n_ustring_copy_au_n(result, formatted, 64); + //ex) Brazil/Sao Paulo - Current date : 6 18, 2014 AD, 1:34:54 PM GMT-2 + dlog_print(DLOG_INFO, LOG_TAG, "Brazil/Sao Paulo - Current date : %s\n",result); + + dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_destroy\n"); + // destroy an #i18n_udate_format_h + i18n_udate_destroy(formatter_KR); + i18n_udate_destroy(formatter_LA); + i18n_udate_destroy(formatter_SaoPaulo); * @endcode */ @@ -172,8 +172,8 @@ extern "C" { * @remarks Must release @a dtpg using i18n_udatepg_destroy(). * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[in] locale If @c NULL - default locale will be used. - * @param[out] dtpg A pointer to #i18n_udatepg_h. Must not be @c NULL. + * @param[in] locale If @c NULL - default locale will be used. + * @param[out] dtpg A pointer to #i18n_udatepg_h. Must not be @c NULL. * * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -184,7 +184,7 @@ int i18n_udatepg_create(const char *locale, i18n_udatepg_h *dtpg); * @brief Destroys a generator. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[in] dtpg A pointer to #i18n_udatepg_h. Must not be @c NULL. + * @param[in] dtpg A pointer to #i18n_udatepg_h. Must not be @c NULL. * * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -195,19 +195,19 @@ int i18n_udatepg_destroy(i18n_udatepg_h dtpg); * @brief Gets the best pattern matching the input skeleton. * @details It is guaranteed to have all of the fields in the skeleton. * @remarks This function uses a non-const #i18n_udatepg_h: - * It uses a stateful pattern parser which is set up for each generator object, - * rather than creating one for each function call. - * Consecutive calls to this function do not affect each other, - * but this function cannot be used concurrently on a single generator object. + * It uses a stateful pattern parser which is set up for each generator object, + * rather than creating one for each function call. + * Consecutive calls to this function do not affect each other, + * but this function cannot be used concurrently on a single generator object. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[in] dtpg A pointer to #i18n_udatepg_h. Must not be @c NULL. - * @param[in] skeleton The skeleton is a pattern containing only the variable fields.\n - * For example, "MMMdd" and "mmhh" are skeletons. Must not be @c NULL. - * @param[in] len The length of the @a skeleton, >= 0. - * @param[out] best_pattern The best pattern found from the given @a skeleton. - * @param[in] capacity The capacity of @a best_pattern, >= 0 - * @param[out] best_pattern_len The length of @a best_pattern. + * @param[in] dtpg A pointer to #i18n_udatepg_h. Must not be @c NULL. + * @param[in] skeleton The skeleton is a pattern containing only the variable fields.\n + * For example, "MMMdd" and "mmhh" are skeletons. Must not be @c NULL. + * @param[in] len The length of the @a skeleton, >= 0. + * @param[out] best_pattern The best pattern found from the given @a skeleton. + * @param[in] capacity The capacity of @a best_pattern, >= 0 + * @param[out] best_pattern_len The length of @a best_pattern. * * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -216,14 +216,14 @@ int i18n_udatepg_destroy(i18n_udatepg_h dtpg); int i18n_udatepg_get_best_pattern(i18n_udatepg_h dtpg, const i18n_uchar *skeleton, int32_t len, i18n_uchar *best_pattern, int32_t capacity, int32_t *best_pattern_len); -// Newly Added APIs +/* Newly Added APIs */ /** * @brief Creates an empty generator, to be constructed with i18n_udatepg_add_pattern() etc. * @since_tizen 2.3.1 * - * @param[out] dtpg A pointer to the #i18n_udatepg_h handle. + * @param[out] dtpg A pointer to the #i18n_udatepg_h handle. * * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful @@ -235,38 +235,38 @@ int i18n_udatepg_create_empty(i18n_udatepg_h *dtpg); * @brief Creates a copy of a generator. * @since_tizen 2.3.1 * - * @param[in] dtpg An #i18n_udatepg_h handle to be copied. Must not be @c NULL. - * @param[out] dtpg_clone A pointer to clone of @c dtpg handle. + * @param[in] dtpg An #i18n_udatepg_h handle to be copied. Must not be @c NULL. + * @param[out] dtpg_clone A pointer to clone of @c dtpg handle. * * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_udatepg_clone(const i18n_udatepg_h dtpg, i18n_udatepg_h * dtpg_clone); +int i18n_udatepg_clone(const i18n_udatepg_h dtpg, i18n_udatepg_h *dtpg_clone); /** * @brief Gets the best pattern matching the input @a skeleton. * @details It is guaranteed to have all of the fields in the @a skeleton. * - * Note that this function uses a non-const #i18n_udatepg_h: - * It uses a stateful pattern parser which is set up for each generator object, - * rather than creating one for each function call. - * Consecutive calls to this function do not affect each other, - * but this function cannot be used concurrently on a single generator object. + * Note that this function uses a non-const #i18n_udatepg_h: + * It uses a stateful pattern parser which is set up for each generator object, + * rather than creating one for each function call. + * Consecutive calls to this function do not affect each other, + * but this function cannot be used concurrently on a single generator object. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] dtpg An #i18n_udatepg_h handle. Must not be @c NULL. - * @param[in] skeleton The @c skeleton is a pattern containing only the variable fields; - * for example, "MMMdd" and "mmhh" are skeletons. Must not be @c NULL. - * @param[in] length The length of @c skeleton, >= 0. - * @param[in] options Options for forcing the length of specified fields in the - * returned pattern to match those in the @c skeleton (when this - * would not happen otherwise). For default behavior, use - * #I18N_UDATEPG_MATCH_NO_OPTIONS. - * @param[out] best_pattern The best pattern found from the given @c skeleton. - * @param[in] capacity The capacity of @c best_pattern, >= 0. + * @param[in] dtpg An #i18n_udatepg_h handle. Must not be @c NULL. + * @param[in] skeleton The @c skeleton is a pattern containing only the variable fields; + * for example, "MMMdd" and "mmhh" are skeletons. Must not be @c NULL. + * @param[in] length The length of @c skeleton, >= 0. + * @param[in] options Options for forcing the length of specified fields in the + * returned pattern to match those in the @c skeleton (when this + * would not happen otherwise). For default behavior, use + * #I18N_UDATEPG_MATCH_NO_OPTIONS. + * @param[out] best_pattern The best pattern found from the given @c skeleton. + * @param[in] capacity The capacity of @c best_pattern, >= 0. * * @return The length of @c best_pattern. * @@ -274,24 +274,24 @@ int i18n_udatepg_clone(const i18n_udatepg_h dtpg, i18n_udatepg_h * dtpg_clone); * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ int32_t i18n_udatepg_get_best_pattern_with_options(i18n_udatepg_h dtpg, const i18n_uchar *skeleton, int32_t length, - i18n_udatepg_date_time_pattern_match_options_e options, i18n_uchar *best_pattern, int32_t capacity); + i18n_udatepg_date_time_pattern_match_options_e options, i18n_uchar *best_pattern, int32_t capacity); /** * @brief Gets a unique skeleton from a given pattern. For example, both "MMM-dd" and "dd/MMM" produce the skeleton "MMMdd". * @details Note that this function uses a non-const #i18n_udatepg_h: - * It uses a stateful pattern parser which is set up for each generator object, - * rather than creating one for each function call. - * Consecutive calls to this function do not affect each other, - * but this function cannot be used concurrently on a single generator object. + * It uses a stateful pattern parser which is set up for each generator object, + * rather than creating one for each function call. + * Consecutive calls to this function do not affect each other, + * but this function cannot be used concurrently on a single generator object. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] dtpg An #i18n_udatepg_h handle. Must not be @c NULL. - * @param[in] pattern Input pattern, such as "dd/MMM". Must not be @c NULL. - * @param[in] length The length of @c pattern, >= 0. - * @param[out] skeleton Such as "MMMdd". - * @param[in] capacity The capacity of @c skeleton, >= 0. + * @param[in] dtpg An #i18n_udatepg_h handle. Must not be @c NULL. + * @param[in] pattern Input pattern, such as "dd/MMM". Must not be @c NULL. + * @param[in] length The length of @c pattern, >= 0. + * @param[out] skeleton Such as "MMMdd". + * @param[in] capacity The capacity of @c skeleton, >= 0. * * @return The length of @c skeleton. * @@ -303,22 +303,22 @@ int32_t i18n_udatepg_get_skeleton(i18n_udatepg_h dtpg, const i18n_uchar *pattern /** * @brief Gets a unique base skeleton from a given pattern. * @details This is the same as the skeleton, except that differences in length are minimized so - * as to only preserve the difference between string and numeric form. So - * for example, both "MMM-dd" and "d/MMM" produce the skeleton "MMMd"(notice the single d).
- * Note that this function uses a non-const #i18n_udatepg_h : - * It uses a stateful pattern parser which is set up for each generator object, - * rather than creating one for each function call. - * Consecutive calls to this function do not affect each other, - * but this function cannot be used concurrently on a single generator object. + * as to only preserve the difference between string and numeric form. So + * for example, both "MMM-dd" and "d/MMM" produce the skeleton "MMMd"(notice the single d).
+ * Note that this function uses a non-const #i18n_udatepg_h : + * It uses a stateful pattern parser which is set up for each generator object, + * rather than creating one for each function call. + * Consecutive calls to this function do not affect each other, + * but this function cannot be used concurrently on a single generator object. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] dtpg An #i18n_udatepg_h handle. Must not be @c NULL. - * @param[in] pattern Input pattern, such as "dd/MMM". Must not be @c NULL. - * @param[in] length The length of @c pattern, >= 0. - * @param[out] base_skeleton Such as "Md". - * @param[in] capacity The capacity of base @c skeleton, >= 0. + * @param[in] dtpg An #i18n_udatepg_h handle. Must not be @c NULL. + * @param[in] pattern Input pattern, such as "dd/MMM". Must not be @c NULL. + * @param[in] length The length of @c pattern, >= 0. + * @param[out] base_skeleton Such as "Md". + * @param[in] capacity The capacity of base @c skeleton, >= 0. * * @return The length of @c base_skeleton. * @@ -330,48 +330,48 @@ int32_t i18n_udatepg_get_base_skeleton(i18n_udatepg_h dtpg, const i18n_uchar *pa /** * @brief Adds a pattern to the generator. * @details If the pattern has the same skeleton as an existing pattern, - * and the override parameter is set, then the previous - * value is overridden. Otherwise, the previous value is retained. - * In either case, the conflicting status is set and previous value is stored in conflicting pattern.
- * Note that single-field patterns (like "MMM") are automatically added, and don't need to be added explicitly! + * and the override parameter is set, then the previous + * value is overridden. Otherwise, the previous value is retained. + * In either case, the conflicting status is set and previous value is stored in conflicting pattern.
+ * Note that single-field patterns (like "MMM") are automatically added, and don't need to be added explicitly! * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] dtpg An #i18n_udatepg_h handle. Must not be @c NULL. - * @param[in] pattern Input pattern, such as "dd/MMM". Must not be @c NULL. - * @param[in] pattern_length The length of @c pattern, >= 0. - * @param[in] override when existing values are to be overridden use true, - * otherwise use false. - * @param[out] conflicting_pattern Previous pattern with the same skeleton. - * @param[in] capacity The capacity of @c conflicting_pattern. + * @param[in] dtpg An #i18n_udatepg_h handle. Must not be @c NULL. + * @param[in] pattern Input pattern, such as "dd/MMM". Must not be @c NULL. + * @param[in] pattern_length The length of @c pattern, >= 0. + * @param[in] override when existing values are to be overridden use true, + * otherwise use false. + * @param[out] conflicting_pattern Previous pattern with the same skeleton. + * @param[in] capacity The capacity of @c conflicting_pattern. * @param[out] conflict_status A pointer to the conflicting status - * The value could be #I18N_UDATEPG_NO_CONFLICT, #I18N_UDATEPG_BASE_CONFLICT or #I18N_UDATEPG_CONFLICT. + * The value could be #I18N_UDATEPG_NO_CONFLICT, #I18N_UDATEPG_BASE_CONFLICT or #I18N_UDATEPG_CONFLICT. * - * @return Length of @c conflicting_pattern. -1 if @c conflict_status is #I18N_UDATEPG_NO_CONFLICT + * @return Length of @c conflicting_pattern. -1 if @c conflict_status is #I18N_UDATEPG_NO_CONFLICT * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int32_t i18n_udatepg_add_pattern(i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t pattern_length, i18n_ubool override, i18n_uchar *conflicting_pattern, int32_t capacity, i18n_udatepg_date_time_pattern_conflict_e * conflict_status); +int32_t i18n_udatepg_add_pattern(i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t pattern_length, i18n_ubool override, i18n_uchar *conflicting_pattern, int32_t capacity, i18n_udatepg_date_time_pattern_conflict_e *conflict_status); /** * @brief An append_item_format is a pattern used to append a field if there is no good match. * @details For example, suppose that the input skeleton is "GyyyyMMMd", - * and there is no matching pattern internally, but there is a pattern - * matching "yyyyMMMd", say "d-MM-yyyy". Then that pattern is used, plus the G. - * The way these two are conjoined is by using the append_item_format for G (era). - * So if that value is, say "{0}, {1}" then the final resulting - * pattern is "d-MM-yyyy, G".
- * There are actually three available variables : {0} is the pattern so far, - * {1} is the element we are adding, and {2} is the name of the element.
- * This reflects the way that the CLDR data is organized. + * and there is no matching pattern internally, but there is a pattern + * matching "yyyyMMMd", say "d-MM-yyyy". Then that pattern is used, plus the G. + * The way these two are conjoined is by using the append_item_format for G (era). + * So if that value is, say "{0}, {1}" then the final resulting + * pattern is "d-MM-yyyy, G".
+ * There are actually three available variables : {0} is the pattern so far, + * {1} is the element we are adding, and {2} is the name of the element.
+ * This reflects the way that the CLDR data is organized. * @since_tizen 2.3.1 * - * @param[in] dtpg An #i18n_udatepg_h handle. Must not be @c NULL. - * @param[in] field One of #i18n_udatepg_date_time_pattern_field_e, such as #I18N_UDATEPG_ERA_FIELD. - * @param[in] value Pattern, such as "{0}, {1}". Must not be @c NULL. - * @param[in] length The length of @c value, >= 0. + * @param[in] dtpg An #i18n_udatepg_h handle. Must not be @c NULL. + * @param[in] field One of #i18n_udatepg_date_time_pattern_field_e, such as #I18N_UDATEPG_ERA_FIELD. + * @param[in] value Pattern, such as "{0}, {1}". Must not be @c NULL. + * @param[in] length The length of @c value, >= 0. * * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful @@ -385,12 +385,12 @@ int i18n_udatepg_set_append_item_format(i18n_udatepg_h dtpg, i18n_udatepg_date_t * @brief Getter corresponding to i18n_udatepg_set_append_item_format(). * @details Values below 0 or at or above #I18N_UDATEPG_FIELD_COUNT are illegal arguments. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] dtpg An #i18n_udatepg_h handle. Must not be @c NULL. - * @param[in] field One of #i18n_udatepg_date_time_pattern_field_e, such as #I18N_UDATEPG_ERA_FIELD. - * @param[out] pattern_length A pointer that will receive the length of append item format @a value. + * @param[in] dtpg An #i18n_udatepg_h handle. Must not be @c NULL. + * @param[in] field One of #i18n_udatepg_date_time_pattern_field_e, such as #I18N_UDATEPG_ERA_FIELD. + * @param[out] pattern_length A pointer that will receive the length of append item format @a value. * * @return The append_item_format for @a field * @@ -404,13 +404,13 @@ const i18n_uchar *i18n_udatepg_get_append_item_format(const i18n_udatepg_h dtpg, /** * @brief Sets the name of field, e.g. "era" in English for ERA. * @details These are only used if the corresponding append_item_format is used, and if it contains a {2} variable. - * This reflects the way that the CLDR data is organized. + * This reflects the way that the CLDR data is organized. * @since_tizen 2.3.1 * - * @param[in] dtpg An #i18n_udatepg_h handle. Must not be @c NULL. - * @param[in] field #i18n_udatepg_date_time_pattern_field_e, such as #I18N_UDATEPG_ERA_FIELD. - * @param[in] value Name for the @c field. Must not be @c NULL. - * @param[in] length The length of @c value, >= 0. + * @param[in] dtpg An #i18n_udatepg_h handle. Must not be @c NULL. + * @param[in] field #i18n_udatepg_date_time_pattern_field_e, such as #I18N_UDATEPG_ERA_FIELD. + * @param[in] value Name for the @c field. Must not be @c NULL. + * @param[in] length The length of @c value, >= 0. * * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful @@ -419,18 +419,18 @@ const i18n_uchar *i18n_udatepg_get_append_item_format(const i18n_udatepg_h dtpg, * @see i18n_udatepg_get_append_item_name() */ int i18n_udatepg_set_append_item_name(i18n_udatepg_h dtpg, i18n_udatepg_date_time_pattern_field_e field, const i18n_uchar *value, - int32_t length); + int32_t length); /** * @brief Getter corresponding to i18n_udatepg_set_append_item_name(). * @details Values below 0 or at or above #I18N_UDATEPG_FIELD_COUNT are illegal arguments. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] dtpg The #i18n_udate_format_h handle. Must not be @c NULL. - * @param[in] field #i18n_udatepg_date_time_pattern_field_e, such as #I18N_UDATEPG_ERA_FIELD. - * @param[out] pattern_length A pointer that will receive the length of the name for @c field. + * @param[in] dtpg The #i18n_udate_format_h handle. Must not be @c NULL. + * @param[in] field #i18n_udatepg_date_time_pattern_field_e, such as #I18N_UDATEPG_ERA_FIELD. + * @param[out] pattern_length A pointer that will receive the length of the name for @c field. * * @return The name for @c field * @@ -440,23 +440,23 @@ int i18n_udatepg_set_append_item_name(i18n_udatepg_h dtpg, i18n_udatepg_date_tim * @see i18n_udatepg_set_append_item_name() */ const i18n_uchar *i18n_udatepg_get_append_item_name(const i18n_udatepg_h dtpg, i18n_udatepg_date_time_pattern_field_e field, - int32_t *pattern_length); + int32_t *pattern_length); /** * @brief The date time format is a message format pattern used to compose date and time patterns. * @brief The default value is "{0} {1}", where {0} will be replaced by the date pattern and {1} will be replaced by the time pattern. - * This is used when the input skeleton contains both date and time fields, - * but there is not a close match among the added patterns. - * For example, suppose that this object was created by adding "dd-MMM" and "hh:mm", - * and its date time format is the default "{0} {1}". Then if the input skeleton is "MMMdhmm", - * there is not an exact match, so the input skeleton is broken up into two components "MMMd" and "hmm". - * There are close matches for those two skeletons, so the result is put together with this pattern, resulting in "d-MMM h:mm". + * This is used when the input skeleton contains both date and time fields, + * but there is not a close match among the added patterns. + * For example, suppose that this object was created by adding "dd-MMM" and "hh:mm", + * and its date time format is the default "{0} {1}". Then if the input skeleton is "MMMdhmm", + * there is not an exact match, so the input skeleton is broken up into two components "MMMd" and "hmm". + * There are close matches for those two skeletons, so the result is put together with this pattern, resulting in "d-MMM h:mm". * @since_tizen 2.3.1 * - * @param[in] dtpg An #i18n_udate_format_h handle. Must not be @c NULL. - * @param[in] date_time_format A message format pattern, here {0} will be replaced by the date pattern - * and {1} will be replaced by the time pattern. Must not be @c NULL. - * @param[in] length The length of @c date_time_format, >= 0. + * @param[in] dtpg An #i18n_udate_format_h handle. Must not be @c NULL. + * @param[in] date_time_format A message format pattern, here {0} will be replaced by the date pattern + * and {1} will be replaced by the time pattern. Must not be @c NULL. + * @param[in] length The length of @c date_time_format, >= 0. * * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful @@ -469,11 +469,11 @@ int i18n_udatepg_set_date_time_format(const i18n_udatepg_h dtpg, const i18n_ucha /** * @brief Getter corresponding to i18n_udatepg_set_date_time_format(). * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] dtpg An #i18n_udate_format_h handle. Must not be @c NULL. - * @param[out] pattern_length A pointer that will receive the length of the @a date_time_format. + * @param[in] dtpg An #i18n_udate_format_h handle. Must not be @c NULL. + * @param[out] pattern_length A pointer that will receive the length of the @a date_time_format. * * @return A date_time_format * @@ -487,14 +487,14 @@ const i18n_uchar *i18n_udatepg_get_date_time_format(const i18n_udatepg_h dtpg, i /** * @brief The decimal value is used in formatting fractions of seconds. * @details If the skeleton contains fractional seconds, then this is used with the fractional seconds. - * For example, suppose that the input pattern is "hhmmssSSSS", - * and the best matching pattern internally is "H:mm:ss", and the decimal string is ",". - * Then the resulting pattern is modified to be "H:mm:ss,SSSS" + * For example, suppose that the input pattern is "hhmmssSSSS", + * and the best matching pattern internally is "H:mm:ss", and the decimal string is ",". + * Then the resulting pattern is modified to be "H:mm:ss,SSSS" * @since_tizen 2.3.1 * - * @param[in] dtpg The #i18n_udate_format_h handle. Must not be @c NULL. - * @param[in] decimal Decimal. Must not be @c NULL. - * @param[in] length The length of @c decimal, >= 0. + * @param[in] dtpg The #i18n_udate_format_h handle. Must not be @c NULL. + * @param[in] decimal Decimal. Must not be @c NULL. + * @param[in] length The length of @c decimal, >= 0. * * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful @@ -507,11 +507,11 @@ int i18n_udatepg_set_decimal(i18n_udatepg_h dtpg, const i18n_uchar *decimal, int /** * @brief Getter corresponding to i18n_udatepg_set_decimal(). * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] dtpg The #i18n_udate_format_h handle. Must not be @c NULL. - * @param[out] pattern_length A pointer that will receive the length of the @a decimal string. + * @param[in] dtpg The #i18n_udate_format_h handle. Must not be @c NULL. + * @param[out] pattern_length A pointer that will receive the length of the @a decimal string. * * @return Corresponding to the decimal point. * @@ -525,23 +525,23 @@ const i18n_uchar *i18n_udatepg_get_decimal(const i18n_udatepg_h dtpg, int32_t *p /** * @brief Adjusts the field types (width and subtype) of a @a pattern to match what is in a @a skeleton. * @details That is, if you supply a @a pattern like "d-M H:m", and a @a skeleton of "MMMMddhhmm", - * then the input pattern is adjusted to be "dd-MMMM hh:mm". - * This is used internally to get the best match for the input @a skeleton, but can also be used externally.
- * Note that this function uses a non-const #i18n_udatepg_h: - * It uses a stateful pattern parser which is set up for each generator object, - * rather than creating one for each function call. Consecutive calls to this function do not affect each other, - * but this function cannot be used concurrently on a single generator object. + * then the input pattern is adjusted to be "dd-MMMM hh:mm". + * This is used internally to get the best match for the input @a skeleton, but can also be used externally.
+ * Note that this function uses a non-const #i18n_udatepg_h: + * It uses a stateful pattern parser which is set up for each generator object, + * rather than creating one for each function call. Consecutive calls to this function do not affect each other, + * but this function cannot be used concurrently on a single generator object. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] dtpg The #i18n_udate_format_h handle. Must not be @c NULL. - * @param[in] pattern Input pattern. Must not be @c NULL. - * @param[in] pattern_length The length of input @a pattern, >= 0. - * @param[in] skeleton The skeleton. Must not be @c NULL. - * @param[in] skeleton_length The length of input @a skeleton, >= 0. - * @param[out] dest Pattern adjusted to match the @a skeleton fields widths and subtypes. - * @param[in] dest_capacity The capacity of @a dest, >= 0. + * @param[in] dtpg The #i18n_udate_format_h handle. Must not be @c NULL. + * @param[in] pattern Input pattern. Must not be @c NULL. + * @param[in] pattern_length The length of input @a pattern, >= 0. + * @param[in] skeleton The skeleton. Must not be @c NULL. + * @param[in] skeleton_length The length of input @a skeleton, >= 0. + * @param[out] dest Pattern adjusted to match the @a skeleton fields widths and subtypes. + * @param[in] dest_capacity The capacity of @a dest, >= 0. * * @return The length of @a dest. * @@ -549,32 +549,32 @@ const i18n_uchar *i18n_udatepg_get_decimal(const i18n_udatepg_h dtpg, int32_t *p * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ int32_t i18n_udatepg_replace_field_types(i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t pattern_length, - const i18n_uchar *skeleton, int32_t skeleton_length, i18n_uchar *dest, int32_t dest_capacity); + const i18n_uchar *skeleton, int32_t skeleton_length, i18n_uchar *dest, int32_t dest_capacity); /** * @brief Adjusts the field types (width and subtype) of a pattern to match what is in a @a skeleton. * @details That is, if you supply a @a pattern like "d-M H:m", and a @a skeleton of "MMMMddhhmm", - * then the input @a pattern is adjusted to be "dd-MMMM hh:mm". - * This is used internally to get the best match for the input @a skeleton, but can also be used externally.
- * Note that this function uses a non-const #i18n_udatepg_h: - * It uses a stateful pattern parser which is set up for each generator object, - * rather than creating one for each function call. Consecutive calls to this function do not affect each other, - * but this function cannot be used concurrently on a single generator object. + * then the input @a pattern is adjusted to be "dd-MMMM hh:mm". + * This is used internally to get the best match for the input @a skeleton, but can also be used externally.
+ * Note that this function uses a non-const #i18n_udatepg_h: + * It uses a stateful pattern parser which is set up for each generator object, + * rather than creating one for each function call. Consecutive calls to this function do not affect each other, + * but this function cannot be used concurrently on a single generator object. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] dtpg The #i18n_udate_format_h handle. Must not be @c NULL. - * @param[in] pattern Input pattern. Must not be @c NULL. - * @param[in] pattern_length The length of input @a pattern, >= 0. - * @param[in] skeleton The skeleton. Must not be @c NULL. - * @param[in] skeleton_length The length of input @a skeleton, >= 0. - * @param[in] options Options controlling whether the length of specified - * fields in the @a pattern are adjusted to match those in the @a skeleton - * (when this would not happen otherwise). - * For default behavior, use #I18N_UDATEPG_MATCH_NO_OPTIONS. - * @param[out] dest Pattern adjusted to match the @a skeleton fields widths and subtypes. - * @param[in] dest_capacity The capacity of @a dest, >= 0. + * @param[in] dtpg The #i18n_udate_format_h handle. Must not be @c NULL. + * @param[in] pattern Input pattern. Must not be @c NULL. + * @param[in] pattern_length The length of input @a pattern, >= 0. + * @param[in] skeleton The skeleton. Must not be @c NULL. + * @param[in] skeleton_length The length of input @a skeleton, >= 0. + * @param[in] options Options controlling whether the length of specified + * fields in the @a pattern are adjusted to match those in the @a skeleton + * (when this would not happen otherwise). + * For default behavior, use #I18N_UDATEPG_MATCH_NO_OPTIONS. + * @param[out] dest Pattern adjusted to match the @a skeleton fields widths and subtypes. + * @param[in] dest_capacity The capacity of @a dest, >= 0. * * @return The length of @a dest. * @@ -582,15 +582,15 @@ int32_t i18n_udatepg_replace_field_types(i18n_udatepg_h dtpg, const i18n_uchar * * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ int32_t i18n_udatepg_replace_field_types_with_options(i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t pattern_length, - const i18n_uchar *skeleton, int32_t skeleton_length, i18n_udatepg_date_time_pattern_match_options_e options, - i18n_uchar *dest, int32_t dest_capacity); + const i18n_uchar *skeleton, int32_t skeleton_length, i18n_udatepg_date_time_pattern_match_options_e options, + i18n_uchar *dest, int32_t dest_capacity); /** * @brief Creates an #i18n_uenumeration_h for list of all the skeletons in canonical form. * @details Call i18n_udatepg_get_pattern_for_skeleton() to get the corresponding pattern. * @since_tizen 2.3.1 * - * @param[in] dtpg An #i18n_udate_format_h handle. Must not be @c NULL. + * @param[in] dtpg An #i18n_udate_format_h handle. Must not be @c NULL. * @param[out] enumeration A pointer to the #i18n_uenumeration_h for list of all the skeletons. The caller must destroy the object. * * @return The obtained error code. @@ -603,7 +603,7 @@ int i18n_udatepg_skeletons_create(const i18n_udatepg_h dtpg, i18n_uenumeration_h * @brief Creates an #i18n_uenumeration_h for list of all the base skeletons in canonical form. * @since_tizen 2.3.1 * - * @param[in] dtpg An #i18n_udate_format_h handle. Must not be @c NULL. + * @param[in] dtpg An #i18n_udate_format_h handle. Must not be @c NULL. * @param[out] enumeration A pointer to the #i18n_uenumeration_h for list of all the base skeletons. The caller must destroy the object. * * @return The obtained error code. @@ -615,13 +615,13 @@ int i18n_udatepg_base_skeletons_create(const i18n_udatepg_h dtpg, i18n_uenumerat /** * @brief Gets the pattern corresponding to a given skeleton. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] dtpg The #i18n_udate_format_h handle. Must not be @c NULL. - * @param[in] skeleton The skeleton. Must not be @c NULL. - * @param[in] skeleton_length The length of @a skeleton, >= 0. - * @param[out] pattern_length The pointer to the length of return pattern + * @param[in] dtpg The #i18n_udate_format_h handle. Must not be @c NULL. + * @param[in] skeleton The skeleton. Must not be @c NULL. + * @param[in] skeleton_length The length of @a skeleton, >= 0. + * @param[out] pattern_length The pointer to the length of return pattern * * @return Pattern corresponding to a given skeleton * diff --git a/src/include/wearable/utils_i18n_uenumeration.h b/src/include/wearable/utils_i18n_uenumeration.h old mode 100755 new mode 100644 index 543945d..42fab37 --- a/src/include/wearable/utils_i18n_uenumeration.h +++ b/src/include/wearable/utils_i18n_uenumeration.h @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef __UTILS_I18N_UENUMERATION_PRODUCT_H__ @@ -35,11 +35,11 @@ extern "C" { * @brief UEnumeration defines functions for handling String Enumeration. * * @section CAPI_BASE_UTILS_I18N_UENUMERATION_MODULE_HEADER Required Header - * \#include + * \#include * * @section CAPI_BASE_UTILS_I18N_UENUMERATION_MODULE_OVERVIEW Overview * @details The UEnumeration module allows to create String Enumeration - * from chars and uchars. + * from chars and uchars. * */ @@ -51,11 +51,11 @@ extern "C" { /** * @brief Disposes of resources in use by the iterator. * @details If @c enumeration is NULL, does nothing. After this call, any char* or i18n_uchar* returned - * by i18n_uenumeration_unext() or i18n_uenumeration_next() is invalid. + * by i18n_uenumeration_unext() or i18n_uenumeration_next() is invalid. * @remarks Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] enumeration An #i18n_uenumeration_h to destroy + * @param[in] enumeration An #i18n_uenumeration_h to destroy * * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful @@ -66,14 +66,14 @@ int i18n_uenumeration_destroy(i18n_uenumeration_h enumeration); /** * @brief Returns the number of elements that the iterator traverses. * @details If the iterator is out-of-sync with its service, error code is set to #I18N_ERROR_ENUM_OUT_OF_SYNC. - * This is a convenience function. It can end up being very expensive as all the items might have to be pre-fetched - * (depending on the type of data being traversed). - * Use with caution and only when necessary. + * This is a convenience function. It can end up being very expensive as all the items might have to be pre-fetched + * (depending on the type of data being traversed). + * Use with caution and only when necessary. * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exceptions section. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] enumeration An #i18n_uenumeration_h to count + * @param[in] enumeration An #i18n_uenumeration_h to count * * @return The number of elements in the iterator * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -84,21 +84,21 @@ int32_t i18n_uenumeration_count(i18n_uenumeration_h enumeration); /** * @brief Returns the next element in the iterator's list. * @details If there are no more elements, returns NULL. - * If the iterator is out-of-sync with its service, error code is set to #I18N_ERROR_ENUM_OUT_OF_SYNC and NULL is returned. - * If the native service string is a char* string, it is converted to i18n_uchar* with the invariant converter. - * The result is terminated by (i18n_uchar)0. + * If the iterator is out-of-sync with its service, error code is set to #I18N_ERROR_ENUM_OUT_OF_SYNC and NULL is returned. + * If the native service string is a char* string, it is converted to i18n_uchar* with the invariant converter. + * The result is terminated by (i18n_uchar)0. * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exceptions section. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] enumeration An #i18n_uenumeration_h - * @param[out] result_length A pointer to receive the length of the result (not including the terminating \\0). - * If the pointer is NULL it is ignored. + * @param[in] enumeration An #i18n_uenumeration_h + * @param[out] result_length A pointer to receive the length of the result (not including the terminating \\0). + * If the pointer is NULL it is ignored. * * @return A pointer to the string. The string will be zero-terminated. - * The return pointer is owned by this iterator and must not be deleted by the caller. - * The pointer is valid until the next call to any i18n_uenumeration_... method, including i18n_uenumeration_next() or i18n_uenumeration_unext(). - * When all strings have been traversed, returns NULL. + * The return pointer is owned by this iterator and must not be deleted by the caller. + * The pointer is valid until the next call to any i18n_uenumeration_... method, including i18n_uenumeration_next() or i18n_uenumeration_unext(). + * When all strings have been traversed, returns NULL. * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @exception #I18N_ERROR_ENUM_OUT_OF_SYNC The iterator is out of sync */ @@ -107,26 +107,26 @@ const i18n_uchar *i18n_uenumeration_unext(i18n_uenumeration_h enumeration, int32 /** * @brief Returns the next element in the iterator's list. * @details If there are no more elements, returns NULL. If the iterator is out-of-sync with its service, - * the #I18N_ERROR_ENUM_OUT_OF_SYNC error code is set and NULL is returned. - * If the native service string is a i18n_uchar* string, it is converted to char* with the invariant converter. - * The result is terminated by (char)0. If the conversion fails (because a character cannot be converted) - * then the error code is set to #I18N_ERROR_INVARIANT_CONVERSION and the return value is undefined (but non-NULL). + * the #I18N_ERROR_ENUM_OUT_OF_SYNC error code is set and NULL is returned. + * If the native service string is a i18n_uchar* string, it is converted to char* with the invariant converter. + * The result is terminated by (char)0. If the conversion fails (because a character cannot be converted) + * then the error code is set to #I18N_ERROR_INVARIANT_CONVERSION and the return value is undefined (but non-NULL). * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exceptions section. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] enumeration An #i18n_uenumeration_h - * @param[out] result_length A pointer to receive the length of the result (not including the terminating \\0). - * If the pointer is NULL it is ignored. + * @param[in] enumeration An #i18n_uenumeration_h + * @param[out] result_length A pointer to receive the length of the result (not including the terminating \\0). + * If the pointer is NULL it is ignored. * * @return A pointer to the string. The string will be zero-terminated. - * The return pointer is owned by this iterator and must not be deleted by the caller. - * The pointer is valid until the next call to any i18n_uenumeration_... method, including i18n_uenumeration_next() or i18n_uenumeration_unext(). - * When all strings have been traversed, returns NULL. + * The return pointer is owned by this iterator and must not be deleted by the caller. + * The pointer is valid until the next call to any i18n_uenumeration_... method, including i18n_uenumeration_next() or i18n_uenumeration_unext(). + * When all strings have been traversed, returns NULL. * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @exception #I18N_ERROR_ENUM_OUT_OF_SYNC The iterator is out of sync * @exception #I18N_ERROR_INVARIANT_CONVERSION The underlying native string is i18n_uchar* and conversion to char* with the invariant converter fails. - * This error pertains only to current string, so iteration might be able to continue successfully. + * This error pertains only to current string, so iteration might be able to continue successfully. */ const char *i18n_uenumeration_next(i18n_uenumeration_h enumeration, int32_t *result_length); @@ -136,7 +136,7 @@ const char *i18n_uenumeration_next(i18n_uenumeration_h enumeration, int32_t *res * @remarks Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] enumeration An #i18n_uenumeration_h + * @param[in] enumeration An #i18n_uenumeration_h * * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful @@ -147,12 +147,12 @@ int i18n_uenumeration_reset(i18n_uenumeration_h enumeration); /** * @brief Given an array of const i18n_uchar* strings, return an #i18n_uenumeration_h. * @details String pointers from 0..count-1 must not be NULL. - * Do not free or modify either the string array or the characters it points to until this object has been destroyed with i18n_uenumeration_destroy(). + * Do not free or modify either the string array or the characters it points to until this object has been destroyed with i18n_uenumeration_destroy(). * @remarks Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] strings An array of const i18n_uchar* strings (each null terminated). All storage is owned by the caller. - * @param[in] count The length of the array + * @param[in] strings An array of const i18n_uchar* strings (each null terminated). All storage is owned by the caller. + * @param[in] count The length of the array * @param[out] enumeration A pointer to the new #i18n_uenumeration_h. Caller is responsible for calling i18n_uenumeration_destroy() to free memory. * * @return The obtained error code. @@ -166,12 +166,12 @@ int i18n_uenumeration_uchar_strings_enumeration_create(const i18n_uchar *const s /** * @brief Given an array of const char* strings (invariant chars only), return an #i18n_uenumeration_h. * @details String pointers from 0..count-1 must not be NULL. - * Do not free or modify either the string array or the characters it points to until this object has been destroyed with i18n_uenumeration_destroy(). + * Do not free or modify either the string array or the characters it points to until this object has been destroyed with i18n_uenumeration_destroy(). * @remarks Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] strings A array of char* strings (each null terminated). All storage is owned by the caller. - * @param[in] count The length of the array + * @param[in] strings A array of char* strings (each null terminated). All storage is owned by the caller. + * @param[in] count The length of the array * @param[out] enumeration A pointer to the new #i18n_uenumeration_h. Caller is responsible for calling i18n_uenumeration_destroy() to free memory * * @return The obtained error code. @@ -180,7 +180,7 @@ int i18n_uenumeration_uchar_strings_enumeration_create(const i18n_uchar *const s * * @see i18n_uenumeration_destroy() */ -int i18n_uenumeration_char_strings_enumeration_create(const char* const strings[], int32_t count, i18n_uenumeration_h *enumeration); +int i18n_uenumeration_char_strings_enumeration_create(const char *const strings[], int32_t count, i18n_uenumeration_h *enumeration); /** * @} @@ -191,4 +191,4 @@ int i18n_uenumeration_char_strings_enumeration_create(const char* const strings[ } #endif -#endif /* __UTILS_I18N_UENUMERATION_PRODUCT_H__*/ +#endif /* __UTILS_I18N_UENUMERATION_PRODUCT_H__*/ diff --git a/src/include/wearable/utils_i18n_ulocale.h b/src/include/wearable/utils_i18n_ulocale.h index 18af395..e12a790 100644 --- a/src/include/wearable/utils_i18n_ulocale.h +++ b/src/include/wearable/utils_i18n_ulocale.h @@ -1,20 +1,20 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * Copyright (C) 1997-2013, International Business Machines - * Corporation and others. All Rights Reserved. + * Corporation and others. All Rights Reserved. */ #ifndef __UTILS_I18N_ULOCALE_H__ @@ -33,69 +33,69 @@ * @defgroup CAPI_BASE_UTILS_I18N_ULOCALE_MODULE Ulocale * @brief A Locale represents a specific geographical, political, or cultural region. * @section CAPI_BASE_UTILS_I18N_ULOCALE_MODULE_HEADER Required Header - * \#include + * \#include * * @section CAPI_BASE_UTILS_I18N_ULOCALE_MODULE_OVERVIEW Overview * @details A Locale represents a specific geographical, political, or cultural region. - * An operation that requires a Locale to perform its task is called locale-sensitive - * and uses the Locale to tailor information for the user. For example, displaying - * a number is a locale-sensitive operation. The number should be formatted according - * to the customs/conventions of the user's native country, region, or culture. - * In the C APIs, a locale is simply a const char string. + * An operation that requires a Locale to perform its task is called locale-sensitive + * and uses the Locale to tailor information for the user. For example, displaying + * a number is a locale-sensitive operation. The number should be formatted according + * to the customs/conventions of the user's native country, region, or culture. + * In the C APIs, a locale is simply a const char string. * * @section CAPI_BASE_UTILS_I18N_ULOCALE_MODULE_SAMPLE_CODE_1 Sample Code 1 * @brief Gets a default locale and a full name for the locale * @code - const char *locale; - const char *in_locale_id = "en_US"; - char language[64] = {0,}; - i18n_uchar result_w[64] = {0,}; - char result[64] = {0,}; - int language_capacity = 64; - int buf_size_language; - int buf_size_display_name; - int ret = I18N_ERROR_NONE; - - // Sets default locale - ret = i18n_ulocale_set_default(getenv("LC_TIME")); - - // Gets default locale - ret = i18n_ulocale_get_default(&locale); - if (ret != I18N_ERROR_NONE) { - dlog_print(DLOG_ERROR, LOG_TAG, "i18n_ulocale_get_default() failed!!! \n"); - } - dlog_print(DLOG_INFO, LOG_TAG, "default locale : %s\n", locale); // default locale : en_GB.UTF-8 - - // Gets the language code for the specified locale - ret = i18n_ulocale_get_language(locale, language, language_capacity, &buf_size_language); - if (ret != I18N_ERROR_NONE) { - dlog_print(DLOG_ERROR, LOG_TAG, "i18n_ulocale_get_language() failed!!! \n"); - } - dlog_print(DLOG_INFO, LOG_TAG, "language code for the locale : %s\n", language); // language code for the locale : en - - // Gets the full name suitable for display for the specified locale - ret = i18n_ulocale_get_display_name(locale, in_locale_id, result_w, 64, &buf_size_display_name); - if (ret != I18N_ERROR_NONE) { - dlog_print(DLOG_ERROR, LOG_TAG, "i18n_ulocale_get_display_name() failed!!! \n"); - } - i18n_ustring_copy_au(result, result_w); - dlog_print(DLOG_INFO, LOG_TAG, "full name suitable for the locale : %s\n", result); // full name suitable for the locale : English (United Kingdom) + const char *locale; + const char *in_locale_id = "en_US"; + char language[64] = {0,}; + i18n_uchar result_w[64] = {0,}; + char result[64] = {0,}; + int language_capacity = 64; + int buf_size_language; + int buf_size_display_name; + int ret = I18N_ERROR_NONE; + + // Sets default locale + ret = i18n_ulocale_set_default(getenv("LC_TIME")); + + // Gets default locale + ret = i18n_ulocale_get_default(&locale); + if (ret != I18N_ERROR_NONE) { + dlog_print(DLOG_ERROR, LOG_TAG, "i18n_ulocale_get_default() failed!!! \n"); + } + dlog_print(DLOG_INFO, LOG_TAG, "default locale : %s\n", locale); // default locale : en_GB.UTF-8 + + // Gets the language code for the specified locale + ret = i18n_ulocale_get_language(locale, language, language_capacity, &buf_size_language); + if (ret != I18N_ERROR_NONE) { + dlog_print(DLOG_ERROR, LOG_TAG, "i18n_ulocale_get_language() failed!!! \n"); + } + dlog_print(DLOG_INFO, LOG_TAG, "language code for the locale : %s\n", language); // language code for the locale : en + + // Gets the full name suitable for display for the specified locale + ret = i18n_ulocale_get_display_name(locale, in_locale_id, result_w, 64, &buf_size_display_name); + if (ret != I18N_ERROR_NONE) { + dlog_print(DLOG_ERROR, LOG_TAG, "i18n_ulocale_get_display_name() failed!!! \n"); + } + i18n_ustring_copy_au(result, result_w); + dlog_print(DLOG_INFO, LOG_TAG, "full name suitable for the locale : %s\n", result); // full name suitable for the locale : English (United Kingdom) * @endcode * * @section CAPI_BASE_UTILS_I18N_ULOCALE_MODULE_SAMPLE_CODE_2 Sample Code 2 * @brief See all available locales * @code - int i = 0; - int32_t count = i18n_ulocale_count_available(); - for(i = 0; i < count; i++) - { - dlog_print(DLOG_INFO, LOG_TAG, "Available locale %d : %s " ,i, i18n_ulocale_get_available(i)); - // ... - //Available locale 5 : en_GB - //Available locale 6 : en_US - //Available locale 7 : en_US_POSIX - // ... - } + int i = 0; + int32_t count = i18n_ulocale_count_available(); + for(i = 0; i < count; i++) + { + dlog_print(DLOG_INFO, LOG_TAG, "Available locale %d : %s " ,i, i18n_ulocale_get_available(i)); + // ... + //Available locale 5 : en_GB + //Available locale 6 : en_US + //Available locale 7 : en_US_POSIX + // ... + } * @endcode */ @@ -111,11 +111,11 @@ extern "C" { /** * @brief Gets I18N's default locale. * @details The returned string is a snapshot in time, and will remain valid - * and unchanged even when i18n_ulocale_set_default() is called. - * The returned storage is owned by I18N, and must not be altered or deleted by the caller. + * and unchanged even when i18n_ulocale_set_default() is called. + * The returned storage is owned by I18N, and must not be altered or deleted by the caller. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[out] locale The I18N default locale + * @param[out] locale The I18N default locale * * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -125,15 +125,15 @@ int i18n_ulocale_get_default(const char **locale); /** * @brief Sets I18N's default locale. * @details By default (without calling this function), - * I18N's default locale will be based on information obtained from the underlying system environment. + * I18N's default locale will be based on information obtained from the underlying system environment. * - * Changes to I18N's default locale do not propagate back to the system environment. + * Changes to I18N's default locale do not propagate back to the system environment. * - * Changes to I18N's default locale to not affect any services that may already be open based on the previous default locale value. + * Changes to I18N's default locale to not affect any services that may already be open based on the previous default locale value. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[in] locale_id The new I18N default locale.\n - * A value of @c NULL will try to get the system's default locale. + * @param[in] locale_id The new I18N default locale.\n + * A value of @c NULL will try to get the system's default locale. * * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -144,12 +144,12 @@ int i18n_ulocale_set_default(const char *locale_id); * @brief Gets the language code for the specified locale. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[in] locale_id The locale to get the ISO language code with.\n - * @c NULL may be used to specify the default. - * @param[out] language The language code for @a locale_id - * @param[in] language_capacity The size of the @a language buffer to store the language code with - * @param[out] buf_size_language The actual buffer size needed for the language code.\n - * If it's greater than @a language_capacity, the returned language code will be truncated. + * @param[in] locale_id The locale to get the ISO language code with.\n + * @c NULL may be used to specify the default. + * @param[out] language The language code for @a locale_id + * @param[in] language_capacity The size of the @a language buffer to store the language code with + * @param[out] buf_size_language The actual buffer size needed for the language code.\n + * If it's greater than @a language_capacity, the returned language code will be truncated. * * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -160,13 +160,13 @@ int i18n_ulocale_get_language(const char *locale_id, char *language, int32_t lan * @brief Gets the country code for the specified locale. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[in] locale_id The locale to get the country code with - * @param[out] country The country code for @a locale_id - * @param[in] country_capacity The size of the @a country buffer to store the country code with - * @param[out] error Error information if retrieving the country code failed + * @param[in] locale_id The locale to get the country code with + * @param[out] country The country code for @a locale_id + * @param[in] country_capacity The size of the @a country buffer to store the country code with + * @param[out] error Error information if retrieving the country code failed * * @return The actual buffer size needed for the country code.\n - * If it's greater than @a country_capacity, the returned country code will be truncated. + * If it's greater than @a country_capacity, the returned country code will be truncated. */ int32_t i18n_ulocale_get_country(const char *locale_id, char *country, int32_t country_capacity, int *error); @@ -174,14 +174,14 @@ int32_t i18n_ulocale_get_country(const char *locale_id, char *country, int32_t c * @brief Gets the full name suitable for display for the specified locale. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[in] locale_id The locale to get the displayable name with.\n - * @c NULL may be used to specify the default. - * @param[in] in_locale_id The locale to be used to display the name.\n - * @c NULL may be used to specify the default. - * @param[out] result The displayable name for @a locale_id - * @param[in] max_result_size The size of the name buffer to store the displayable full name with - * @param[out] buf_size_display_name The actual buffer size needed for the displayable name.\n - * If it's greater than @a max_result_size, the returned displayable name will be truncated. + * @param[in] locale_id The locale to get the displayable name with.\n + * @c NULL may be used to specify the default. + * @param[in] in_locale_id The locale to be used to display the name.\n + * @c NULL may be used to specify the default. + * @param[out] result The displayable name for @a locale_id + * @param[in] max_result_size The size of the name buffer to store the displayable full name with + * @param[out] buf_size_display_name The actual buffer size needed for the displayable name.\n + * If it's greater than @a max_result_size, the returned displayable name will be truncated. * * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -191,25 +191,25 @@ int i18n_ulocale_get_display_name(const char *locale_id, const char *in_locale_i /** * @brief Gets the specified locale from a list of all available locales. * @details The return value is a pointer to an item of a locale name array. - * Both this array and the pointers it contains are owned by I18N - * and should not be deleted or written through by the caller. - * The locale name is terminated by a null pointer. + * Both this array and the pointers it contains are owned by I18N + * and should not be deleted or written through by the caller. + * The locale name is terminated by a null pointer. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[in] n The specific locale name index of the available locale list + * @param[in] n The specific locale name index of the available locale list * * @return A specified locale name of all available locales * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -const char* i18n_ulocale_get_available(int32_t n); +const char *i18n_ulocale_get_available(int32_t n); /** * @brief Gets the size of the all available locale list. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @return The size of the locale list @@ -217,22 +217,22 @@ const char* i18n_ulocale_get_available(int32_t n); */ int32_t i18n_ulocale_count_available(void); -// Newly Added APIs +/* Newly Added APIs */ /** * @brief Gets the script code for the specified locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] locale_id The locale to get the ISO script code with - * @param[out] script The script code for @a locale_id. Must not be @c NULL. - * @param[in] script_capacity The size of the @a script buffer to store the script code with + * @param[in] locale_id The locale to get the ISO script code with + * @param[out] script The script code for @a locale_id. Must not be @c NULL. + * @param[in] script_capacity The size of the @a script buffer to store the script code with * * @return The actual buffer size needed for the script code. If it's greater than @a script_capacity, - * the returned script code will be truncated. If the @a script buffer is @c NULL - * or the @a script_capacity is lower than @c 0 , then the #I18N_ERROR_INVALID_PARAMETER error will be set - * and @c -1 will be returned. + * the returned script code will be truncated. If the @a script buffer is @c NULL + * or the @a script_capacity is lower than @c 0 , then the #I18N_ERROR_INVALID_PARAMETER error will be set + * and @c -1 will be returned. * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -242,17 +242,17 @@ int32_t i18n_ulocale_get_script(const char *locale_id, char *script, int32_t scr /** * @brief Gets the variant code for the specified locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] locale_id The locale to get the variant code with - * @param[out] variant The variant code for @a locale_id - * @param[in] variant_capacity The size of the @a variant buffer to store the variant code with + * @param[in] locale_id The locale to get the variant code with + * @param[out] variant The variant code for @a locale_id + * @param[in] variant_capacity The size of the @a variant buffer to store the variant code with * * @return The actual buffer size needed for the variant code. If it's greater than @a variant_capacity, - * the returned variant code will be truncated. If the @a variant buffer is @c NULL - * or the @a variant_capacity is lower than @c 0 , then the #I18N_ERROR_INVALID_PARAMETER error will be set - * and @c -1 will be returned. + * the returned variant code will be truncated. If the @a variant buffer is @c NULL + * or the @a variant_capacity is lower than @c 0 , then the #I18N_ERROR_INVALID_PARAMETER error will be set + * and @c -1 will be returned. * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -262,20 +262,20 @@ int32_t i18n_ulocale_get_variant(const char *locale_id, char *variant, int32_t v /** * @brief Gets the full name for the specified locale. * @details Note : This has the effect of 'canonicalizing' the I18N locale ID to - * a certain extent. Upper and lower case are set as needed. - * It does NOT map aliased names in any way. - * See the top of this header file. - * This API supports preflighting. + * a certain extent. Upper and lower case are set as needed. + * It does NOT map aliased names in any way. + * See the top of this header file. + * This API supports preflighting. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in #i18n_error_code_e description. + * Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] locale_id The locale to get the full name with - * @param[out] name Fill in buffer for the name without keywords. - * @param[in] name_capacity Capacity of the fill in buffer. + * @param[in] locale_id The locale to get the full name with + * @param[out] name Fill in buffer for the name without keywords. + * @param[in] name_capacity Capacity of the fill in buffer. * * @return The actual buffer size needed for the full name. If it's greater than @a name_capacity, - * the returned full name will be truncated. + * the returned full name will be truncated. * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_BUFFER_OVERFLOW A result would not fit in the supplied buffer */ @@ -284,20 +284,20 @@ int32_t i18n_ulocale_get_name(const char *locale_id, char *name, int32_t name_ca /** * @brief Gets the full name for the specified locale. * @details Note : This has the effect of 'canonicalizing' the string to - * a certain extent. Upper and lower case are set as needed, - * and if the components were in 'POSIX' format they are changed to - * I18N format. It does NOT map aliased names in any way. - * See the top of this header file. + * a certain extent. Upper and lower case are set as needed, + * and if the components were in 'POSIX' format they are changed to + * I18N format. It does NOT map aliased names in any way. + * See the top of this header file. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in #i18n_error_code_e description. + * Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] locale_id The locale to get the full name with - * @param[out] name The full name for @a locale_id - * @param[in] name_capacity The size of the @a name buffer to store the full name with + * @param[in] locale_id The locale to get the full name with + * @param[out] name The full name for @a locale_id + * @param[in] name_capacity The size of the @a name buffer to store the full name with * * @return The actual buffer size needed for the full name. If it's greater than @a name_capacity, - * the returned full name will be truncated. + * the returned full name will be truncated. * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_BUFFER_OVERFLOW A result would not fit in the supplied buffer */ @@ -306,39 +306,39 @@ int32_t i18n_ulocale_canonicalize(const char *locale_id, char *name, int32_t nam /** * @brief Gets the ISO language code for the specified locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] locale_id The locale to get the ISO language code with + * @param[in] locale_id The locale to get the ISO language code with * * @return A language the ISO language code for @a locale_id * * @exception #I18N_ERROR_NONE Successful */ -const char * i18n_ulocale_get_iso3_language(const char *locale_id); +const char *i18n_ulocale_get_iso3_language(const char *locale_id); /** * @brief Gets the ISO country code for the specified locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] locale_id The locale to get the ISO country code with + * @param[in] locale_id The locale to get the ISO country code with * * @return A country the ISO country code for @a locale_id * * @exception #I18N_ERROR_NONE Successful */ -const char * i18n_ulocale_get_iso3_country(const char *locale_id); +const char *i18n_ulocale_get_iso3_country(const char *locale_id); /** * @brief Gets the Win32 LCID value for the specified locale. * @details If the I18N locale is not recognized by Windows, 0 will be returned. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] locale_id The locale to get the Win32 LCID value with + * @param[in] locale_id The locale to get the Win32 LCID value with * * @return A country the Win32 LCID for @a locale_id * @@ -349,19 +349,19 @@ uint32_t i18n_ulocale_get_lcid(const char *locale_id); /** * @brief Gets the language name suitable for display for the specified locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] locale The locale to get the ISO language code with - * @param[in] display_locale The locale to be used to display the name.\n - * @c NULL may be used to specify the default. - * @param[out] language The displayable language code for @a locale. - * @param[in] language_capacity The size of the @a language buffer to store the displayable language code with + * @param[in] locale The locale to get the ISO language code with + * @param[in] display_locale The locale to be used to display the name.\n + * @c NULL may be used to specify the default. + * @param[out] language The displayable language code for @a locale. + * @param[in] language_capacity The size of the @a language buffer to store the displayable language code with * * @return The actual buffer size needed for the displayable language code. If it's greater than - * @a language_capacity, the returned language code will be truncated. If the @a language buffer is @c NULL - * or the @a language_capacity is lower than @c 0 , then the #I18N_ERROR_INVALID_PARAMETER error will be set - * and @c 0 will be returned. + * @a language_capacity, the returned language code will be truncated. If the @a language buffer is @c NULL + * or the @a language_capacity is lower than @c 0 , then the #I18N_ERROR_INVALID_PARAMETER error will be set + * and @c 0 will be returned. * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -371,18 +371,18 @@ int32_t i18n_ulocale_get_display_language(const char *locale, const char *displa /** * @brief Gets the script name suitable for display for the specified locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] locale The locale to get the displayable script code with. @c NULL may be used to specify the default. - * @param[in] display_locale The locale to be used to display the name. @c NULL may be used to specify the default. - * @param[out] script The displayable country code for @a locale - * @param[in] script_capacity The size of the script buffer to store the displayable script code with + * @param[in] locale The locale to get the displayable script code with. @c NULL may be used to specify the default. + * @param[in] display_locale The locale to be used to display the name. @c NULL may be used to specify the default. + * @param[out] script The displayable country code for @a locale + * @param[in] script_capacity The size of the script buffer to store the displayable script code with * * @return The actual buffer size needed for the displayable script code. If it's greater than @a script_capacity, - * the returned displayable script code will be truncated. If the @a script buffer is @c NULL - * or the @a script_capacity is lower than @c 0 , then the #I18N_ERROR_INVALID_PARAMETER error will be set - * and @c 0 will be returned. + * the returned displayable script code will be truncated. If the @a script buffer is @c NULL + * or the @a script_capacity is lower than @c 0 , then the #I18N_ERROR_INVALID_PARAMETER error will be set + * and @c 0 will be returned. * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -392,18 +392,18 @@ int32_t i18n_ulocale_get_display_script(const char *locale, const char *display_ /** * @brief Gets the country name suitable for display for the specified locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] locale The locale to get the displayable country code with. @c NULL may be used to specify the default. - * @param[in] display_locale The locale to be used to display the name. @c NULL may be used to specify the default. - * @param[out] country The displayable country code for @a locale - * @param[in] country_capacity The size of the @a country buffer to store the displayable country code with + * @param[in] locale The locale to get the displayable country code with. @c NULL may be used to specify the default. + * @param[in] display_locale The locale to be used to display the name. @c NULL may be used to specify the default. + * @param[out] country The displayable country code for @a locale + * @param[in] country_capacity The size of the @a country buffer to store the displayable country code with * * @return The actual buffer size needed for the displayable country code. If it's greater than @a country_capacity, - * the returned displayable country code will be truncated. If the @a country buffer is @c NULL - * or the @a country_capacity is lower than @c 0 , then the #I18N_ERROR_INVALID_PARAMETER error will be set - * and @c 0 will be returned. + * the returned displayable country code will be truncated. If the @a country buffer is @c NULL + * or the @a country_capacity is lower than @c 0 , then the #I18N_ERROR_INVALID_PARAMETER error will be set + * and @c 0 will be returned. * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -413,18 +413,18 @@ int32_t i18n_ulocale_get_display_country(const char *locale, const char *display /** * @brief Gets the variant name suitable for display for the specified locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] locale The locale to get the displayable variant code with. @c NULL may be used to specify the default. - * @param[in] display_locale The locale to be used to display the name. @c NULL may be used to specify the default. - * @param[out] variant The displayable variant code for @a locale - * @param[in] variant_capacity The size of the @a variant buffer to store the displayable variant code with + * @param[in] locale The locale to get the displayable variant code with. @c NULL may be used to specify the default. + * @param[in] display_locale The locale to be used to display the name. @c NULL may be used to specify the default. + * @param[out] variant The displayable variant code for @a locale + * @param[in] variant_capacity The size of the @a variant buffer to store the displayable variant code with * * @return The actual buffer size needed for the displayable variant code. If it's greater than @a variant_capacity, - * the returned displayable variant code will be truncated. If the @a variant buffer is @c NULL - * or the @a variant_capacity is lower than @c 0 , then the #I18N_ERROR_INVALID_PARAMETER error will be set - * and @c 0 will be returned. + * the returned displayable variant code will be truncated. If the @a variant buffer is @c NULL + * or the @a variant_capacity is lower than @c 0 , then the #I18N_ERROR_INVALID_PARAMETER error will be set + * and @c 0 will be returned. * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -434,44 +434,44 @@ int32_t i18n_ulocale_get_display_variant(const char *locale, const char *display /** * @brief Gets the keyword name suitable for display for the specified locale. * @details E.g : for the locale string de_DE\@collation=PHONEBOOK, this API gets the display string for the keyword collation. - * Usage : + * Usage : * @code - * i18n_error_code_e status = I18N_ERROR_NONE; - * const char* keyword = NULL; - * int32_t keyword_len = 0; - * int32_t keyword_count = 0; - * i18n_uchar display_keyword[256]; - * int32_t display_keyword_len = 0; - * i18n_uenumeration_h keyword_enum; - * i18n_ulocale_keywords_create("en_US@collation=PHONEBOOK;calendar=TRADITIONAL", &keyword_enum); - * - * for(keyword_count = i18n_uenumeration_count(keyword_enum); keyword_count > 0; keyword_count--){ - * status = get_last_result(); - * if(status > 0){ - * // something went wrong so handle the error - * break; - * } - * // the uenum_next returns NULL-terminated string - * keyword = i18n_uenumeration_next(keyword_enum, &keyword_len); - * display_keyword_len = i18n_ulocale_get_display_keyword(keyword, "en_US", display_keyword, 256); - * // do something interesting - * } - * i18n_uenumeration_destroy(keyword_enum); + * i18n_error_code_e status = I18N_ERROR_NONE; + * const char* keyword = NULL; + * int32_t keyword_len = 0; + * int32_t keyword_count = 0; + * i18n_uchar display_keyword[256]; + * int32_t display_keyword_len = 0; + * i18n_uenumeration_h keyword_enum; + * i18n_ulocale_keywords_create("en_US@collation=PHONEBOOK;calendar=TRADITIONAL", &keyword_enum); + * + * for(keyword_count = i18n_uenumeration_count(keyword_enum); keyword_count > 0; keyword_count--){ + * status = get_last_result(); + * if(status > 0){ + * // something went wrong so handle the error + * break; + * } + * // the uenum_next returns NULL-terminated string + * keyword = i18n_uenumeration_next(keyword_enum, &keyword_len); + * display_keyword_len = i18n_ulocale_get_display_keyword(keyword, "en_US", display_keyword, 256); + * // do something interesting + * } + * i18n_uenumeration_destroy(keyword_enum); * @endcode * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] keyword The keyword whose display string needs to be returned. - * @param[in] display_locale The locale to be used to display the name. @c NULL may be used to specify the default. - * @param[out] dest The buffer to which the displayable keyword should be written. - * @param[in] dest_capacity The size of the buffer (number of #i18n_uchar characters). If it is 0, then - * @a dest may be @c NULL and the function will only return the length of the result without - * writing any of the result string (pre-flighting). + * @param[in] keyword The keyword whose display string needs to be returned. + * @param[in] display_locale The locale to be used to display the name. @c NULL may be used to specify the default. + * @param[out] dest The buffer to which the displayable keyword should be written. + * @param[in] dest_capacity The size of the buffer (number of #i18n_uchar characters). If it is 0, then + * @a dest may be @c NULL and the function will only return the length of the result without + * writing any of the result string (pre-flighting). * * @return The actual buffer size needed for the displayable variant code. If the @a dest buffer is @c NULL - * or the @a dest_capacity is lower than @c 0 , then the #I18N_ERROR_INVALID_PARAMETER error will be set - * and @c 0 will be returned. + * or the @a dest_capacity is lower than @c 0 , then the #I18N_ERROR_INVALID_PARAMETER error will be set + * and @c 0 will be returned. * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -488,20 +488,20 @@ int32_t i18n_ulocale_get_display_keyword(const char *keyword, const char *displa * @details E.g : for the locale string de_DE\@collation=PHONEBOOK, this API gets the display string for PHONEBOOK, * in the display locale, when "collation" is specified as the keyword. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] locale The locale to get the displayable variant code with. @c NULL may be used to specify the default. - * @param[in] keyword The keyword for whose value should be used. - * @param[in] display_locale The locale to be used to display the name. @c NULL may be used to specify the default. - * @param[out] dest The buffer to which the displayable keyword should be written. - * @param[in] dest_capacity The size of the buffer (number of #i18n_uchar characters). If it is 0, then - * @a dest may be @c NULL and the function will only return the length of the result - * without writing any of the result string (pre-flighting). + * @param[in] locale The locale to get the displayable variant code with. @c NULL may be used to specify the default. + * @param[in] keyword The keyword for whose value should be used. + * @param[in] display_locale The locale to be used to display the name. @c NULL may be used to specify the default. + * @param[out] dest The buffer to which the displayable keyword should be written. + * @param[in] dest_capacity The size of the buffer (number of #i18n_uchar characters). If it is 0, then + * @a dest may be @c NULL and the function will only return the length of the result + * without writing any of the result string (pre-flighting). * * @return The actual buffer size needed for the displayable variant code. If the @a dest buffer is @c NULL - * or the @a dest_capacity is lower than @c 0 , then the #I18N_ERROR_INVALID_PARAMETER error will be set - * and @c 0 will be returned. + * or the @a dest_capacity is lower than @c 0 , then the #I18N_ERROR_INVALID_PARAMETER error will be set + * and @c 0 will be returned. * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -510,84 +510,84 @@ int32_t i18n_ulocale_get_display_keyword_value(const char *locale, const char *k /** * @brief Gets a list of all available 2-letter language codes defined in ISO 639, - * plus additional 3-letter codes determined to be useful for locale generation as - * defined by Unicode CLDR. + * plus additional 3-letter codes determined to be useful for locale generation as + * defined by Unicode CLDR. * @details This is a pointer to an array of pointers to arrays of char. All of these pointers are owned - * by I18N - do not delete them, and do not write through them. - * The array is terminated with a @c NULL pointer. + * by I18N - do not delete them, and do not write through them. + * The array is terminated with a @c NULL pointer. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * * @return A list of all available language codes * * @exception #I18N_ERROR_NONE Successful */ -const char * const *i18n_ulocale_get_iso_languages(void); +const char *const *i18n_ulocale_get_iso_languages(void); /** * * @brief Gets a list of all available 2-letter country codes defined in ISO 639. * @details This is a pointer to an array of pointers to arrays of char. All of these pointers are - * owned by I18N - do not delete them, and do not write through them. - * The array is terminated with a @c NULL pointer. + * owned by I18N - do not delete them, and do not write through them. + * The array is terminated with a @c NULL pointer. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * * @return A list of all available country codes * * @exception #I18N_ERROR_NONE Successful */ -const char * const *i18n_ulocale_get_iso_countries(void); +const char *const *i18n_ulocale_get_iso_countries(void); /** * @brief Truncates the locale ID string to get the parent locale ID. * @details Copies the part of the string before the last underscore. - * The parent locale ID will be an empty string if there is no - * underscore, or if there is only one underscore at @a locale_id[0]. + * The parent locale ID will be an empty string if there is no + * underscore, or if there is only one underscore at @a locale_id[0]. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] locale_id Input locale ID string. - * @param[out] parent Output string buffer for the parent locale ID. Must not be @c NULL. - * @param[in] parent_capacity Size of the output buffer. If it's lower than the number of characters - * stored in the @a locale_id between the first character and the last occurrence - * of the underscore ("_") character, than the error code will be set to - * #I18N_ERROR_BUFFER_OVERFLOW. + * @param[in] locale_id Input locale ID string. + * @param[out] parent Output string buffer for the parent locale ID. Must not be @c NULL. + * @param[in] parent_capacity Size of the output buffer. If it's lower than the number of characters + * stored in the @a locale_id between the first character and the last occurrence + * of the underscore ("_") character, than the error code will be set to + * #I18N_ERROR_BUFFER_OVERFLOW. * * @return The length of the parent locale ID. If the @a parent buffer is @c NULL or the @a parent_capacity is lower than @c 0, - * then the #I18N_ERROR_INVALID_PARAMETER error will be set and @c -1 will be returned. + * then the #I18N_ERROR_INVALID_PARAMETER error will be set and @c -1 will be returned. * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @exception #I18N_ERROR_BUFFER_OVERFLOW If the capacity of the @a parent is lower than the number of characters - * in the @a locale_id from index 0 to the index of the last occurrence of - * the underscore ("_") symbol. + * in the @a locale_id from index 0 to the index of the last occurrence of + * the underscore ("_") symbol. */ int32_t i18n_ulocale_get_parent(const char *locale_id, char *parent, int32_t parent_capacity); /** * @brief Gets the full name for the specified locale, like i18n_ulocale_get_name(), but without keywords. * @details Note : This has the effect of 'canonicalizing' the string to a certain extent. - * Upper and lower case are set as needed, - * and if the components were in 'POSIX' format they are changed to I18N format. - * It does NOT map aliased names in any way. - * See the top of this header file. + * Upper and lower case are set as needed, + * and if the components were in 'POSIX' format they are changed to I18N format. + * It does NOT map aliased names in any way. + * See the top of this header file. * - * This API strips off the keyword part, so "de_DE\@collation=phonebook" will become "de_DE". - * This API supports preflighting. + * This API strips off the keyword part, so "de_DE\@collation=phonebook" will become "de_DE". + * This API supports preflighting. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in #i18n_error_code_e description. + * Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] locale_id The locale to get the full name with - * @param[out] name Fill in buffer for the name without keywords. - * @param[in] name_capacity Capacity of the fill in buffer. + * @param[in] locale_id The locale to get the full name with + * @param[out] name Fill in buffer for the name without keywords. + * @param[in] name_capacity Capacity of the fill in buffer. * * @return The actual buffer size needed for the full name. If it's greater than @a name_capacity, - * the returned full name will be truncated. + * the returned full name will be truncated. * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_BUFFER_OVERFLOW A result would not fit in the supplied buffer */ @@ -599,7 +599,7 @@ int32_t i18n_ulocale_get_base_name(const char *locale_id, char *name, int32_t na * @remarks Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] locale_id The locale to get the variant code with + * @param[in] locale_id The locale to get the variant code with * * @param enumeration A pointer to the enumeration of keywords or @c NULL if there are no keywords. * @return The obtained error code. @@ -612,16 +612,16 @@ int i18n_ulocale_keywords_create(const char *locale_id, i18n_uenumeration_h *enu * @brief Gets the value for a keyword. * @details Locale name does not need to be normalized. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] locale_id A locale name containing the keyword ("de_DE@currency=EURO;collation=PHONEBOOK") - * @param[in] keyword_name The name of the keyword for which we want the value. Case insensitive. - * @param[out] buffer Receiving buffer - * @param[in] buffer_capacity Capacity of receiving @a buffer + * @param[in] locale_id A locale name containing the keyword ("de_DE@currency=EURO;collation=PHONEBOOK") + * @param[in] keyword_name The name of the keyword for which we want the value. Case insensitive. + * @param[out] buffer Receiving buffer + * @param[in] buffer_capacity Capacity of receiving @a buffer * * @return The length of keyword value. If the @a keyword_name or @a buffer is @c NULL or the @a buffer_capacity is lower than @c 0, - * then the #I18N_ERROR_INVALID_PARAMETER error will be set and @c -1 will be returned. + * then the #I18N_ERROR_INVALID_PARAMETER error will be set and @c -1 will be returned. * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -633,11 +633,11 @@ int32_t i18n_ulocale_get_keyword_value(const char *locale_id, const char *keywor * @details For removing all keywords(retrieving only locale base name associated with the keywords), * use i18n_ulocale_get_base_name(). * - * NOTE : Unlike almost every other I18N function which takes a - * buffer, this function will NOT truncate the output text. If a - * #I18N_ERROR_BUFFER_OVERFLOW is received, it means that the original - * buffer is untouched. This is done to prevent incorrect or possibly - * even malformed locales from being generated and used. + * NOTE : Unlike almost every other I18N function which takes a + * buffer, this function will NOT truncate the output text. If a + * #I18N_ERROR_BUFFER_OVERFLOW is received, it means that the original + * buffer is untouched. This is done to prevent incorrect or possibly + * even malformed locales from being generated and used. * * Below code prints following logs in SDK: * @@ -648,56 +648,56 @@ int32_t i18n_ulocale_get_keyword_value(const char *locale_id, const char *keywor * Keyword1 value: 12 * * @code - * int32_t buff_size = 50; - * int32_t sub_buff_size = 45; - * char *buff = malloc(sizeof(char)*buff_size); - * char *sub_buff = malloc(sizeof(char)*sub_buff_size); - * char *locale = "en_US"; - * - * snprintf(buff, buff_size, "%s%s",locale, sub_buff); - * - * i18n_ulocale_set_keyword_value("abc", "cba", buff, buff_size); - * i18n_ulocale_set_keyword_value("def", "34", buff, buff_size); - * - * i18n_uenumeration_h keyword_enum; - * i18n_ulocale_keywords_create(buff, &keyword_enum); - * - * int32_t res_len = 0; - * const char *keyw = i18n_uenumeration_next(keyword_enum, &res_len); - * const char *keyw2 = i18n_uenumeration_next(keyword_enum, &res_len); - * - * char *only_locale = malloc(sizeof(char)*10); - * i18n_ulocale_get_base_name(buff, only_locale, 10); - * - * int32_t buff_size_get = 50; - * char *buff_out = malloc(sizeof(char)*buff_size_get); - * i18n_ulocale_get_keyword_value(buff, "abc", buff_out, buff_size_get); - * - * dlog_print(DLOG_DEBUG, "test", "Locale and keywords: %s", buff); - * dlog_print(DLOG_DEBUG, "test", "keyword1: %s", keyw); - * dlog_print(DLOG_DEBUG, "test", "keyword2: %s", keyw2); - * dlog_print(DLOG_DEBUG, "test", "Locale: %s", only_locale); - * dlog_print(DLOG_DEBUG, "test", "Keyword1 value: %s", buff_out); - * - * i18n_uenumeration_destroy(keyword_enum) - * free(buff); - * free(sub_buff); - * free(only_locale); - * free(buff_out); + * int32_t buff_size = 50; + * int32_t sub_buff_size = 45; + * char *buff = malloc(sizeof(char)*buff_size); + * char *sub_buff = malloc(sizeof(char)*sub_buff_size); + * char *locale = "en_US"; + * + * snprintf(buff, buff_size, "%s%s",locale, sub_buff); + * + * i18n_ulocale_set_keyword_value("abc", "cba", buff, buff_size); + * i18n_ulocale_set_keyword_value("def", "34", buff, buff_size); + * + * i18n_uenumeration_h keyword_enum; + * i18n_ulocale_keywords_create(buff, &keyword_enum); + * + * int32_t res_len = 0; + * const char *keyw = i18n_uenumeration_next(keyword_enum, &res_len); + * const char *keyw2 = i18n_uenumeration_next(keyword_enum, &res_len); + * + * char *only_locale = malloc(sizeof(char)*10); + * i18n_ulocale_get_base_name(buff, only_locale, 10); + * + * int32_t buff_size_get = 50; + * char *buff_out = malloc(sizeof(char)*buff_size_get); + * i18n_ulocale_get_keyword_value(buff, "abc", buff_out, buff_size_get); + * + * dlog_print(DLOG_DEBUG, "test", "Locale and keywords: %s", buff); + * dlog_print(DLOG_DEBUG, "test", "keyword1: %s", keyw); + * dlog_print(DLOG_DEBUG, "test", "keyword2: %s", keyw2); + * dlog_print(DLOG_DEBUG, "test", "Locale: %s", only_locale); + * dlog_print(DLOG_DEBUG, "test", "Keyword1 value: %s", buff_out); + * + * i18n_uenumeration_destroy(keyword_enum) + * free(buff); + * free(sub_buff); + * free(only_locale); + * free(buff_out); * @endcode * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] keyword_name A name of the keyword to be set. Case insensitive. - * @param[in] keyword_value A value of the keyword to be set. If 0-length or - * @c NULL, will result in the keyword being removed. - * No error is given if that keyword does not exist. - * @param[out] buffer Input buffer containing locale to be modified. - * @param[in] buffer_capacity Capacity of receiving @a buffer + * @param[in] keyword_name A name of the keyword to be set. Case insensitive. + * @param[in] keyword_value A value of the keyword to be set. If 0-length or + * @c NULL, will result in the keyword being removed. + * No error is given if that keyword does not exist. + * @param[out] buffer Input buffer containing locale to be modified. + * @param[in] buffer_capacity Capacity of receiving @a buffer * * @return The length needed for the @a buffer. If the @a keyword_name or @a buffer is @c NULL or the @a buffer_capacity is lower than @c 0, - * then the #I18N_ERROR_INVALID_PARAMETER error will be set and @c -1 will be returned. + * then the #I18N_ERROR_INVALID_PARAMETER error will be set and @c -1 will be returned. * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -711,7 +711,7 @@ int32_t i18n_ulocale_set_keyword_value(const char *keyword_name, const char *key * @remarks Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] locale_id locale name + * @param[in] locale_id locale name * @param[out] layout_type A pointer to the enum indicating the layout orientation for characters. * * @return The obtained error code. @@ -725,7 +725,7 @@ int i18n_ulocale_get_character_orientation(const char *locale_id, i18n_ulocale_l * @remarks Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] locale_id locale name + * @param[in] locale_id locale name * @param[out] layout_type A pointer to the enum indicating the layout orientation for lines. * * @return The obtained error code. @@ -737,16 +737,16 @@ int i18n_ulocale_get_line_orientation(const char *locale_id, i18n_ulocale_layout /** * @brief Gets the I18N locale ID for the specified Win32 LCID value. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] host_id The Win32 LCID to translate - * @param[out] locale The output buffer for the I18N locale ID, which will be NULL-terminated if there is room. - * @param[in] locale_capacity The size of the output buffer + * @param[in] host_id The Win32 LCID to translate + * @param[out] locale The output buffer for the I18N locale ID, which will be NULL-terminated if there is room. + * @param[in] locale_capacity The size of the output buffer * * @return The actual size of the locale ID, not including NULL-termination. - * If the @a locale buffer is @c NULL or the @a locale_capacity is lower than @c 0, - * then the #I18N_ERROR_INVALID_PARAMETER error will be set and @c -1 will be returned. + * If the @a locale buffer is @c NULL or the @a locale_capacity is lower than @c 0, + * then the #I18N_ERROR_INVALID_PARAMETER error will be set and @c -1 will be returned. * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -755,33 +755,33 @@ int32_t i18n_ulocale_get_locale_for_lcid(uint32_t host_id, char *locale, int32_t /** * @brief Adds the likely subtags for a provided locale ID, per the algorithm described - * in the following CLDR technical report : http://www.unicode.org/reports/tr35/#Likely_Subtags + * in the following CLDR technical report : http://www.unicode.org/reports/tr35/#Likely_Subtags * @details If @a locale_id is already in the maximal form, or there is no data available - * for maximization, it will be copied to the output buffer. For example, - * "und-Zzzz" cannot be maximized, since there is no reasonable maximization. + * for maximization, it will be copied to the output buffer. For example, + * "und-Zzzz" cannot be maximized, since there is no reasonable maximization. * - * Examples : + * Examples : * - * "en" maximizes to "en_Latn_US" + * "en" maximizes to "en_Latn_US" * - * "de" maximizes to "de_Latn_US" + * "de" maximizes to "de_Latn_US" * - * "sr" maximizes to "sr_Cyrl_RS" + * "sr" maximizes to "sr_Cyrl_RS" * - * "sh" maximizes to "sr_Latn_RS" (Note this will not reverse.) + * "sh" maximizes to "sr_Latn_RS" (Note this will not reverse.) * - * "zh_Hani" maximizes to "zh_Hans_CN" (Note this will not reverse.) + * "zh_Hani" maximizes to "zh_Hans_CN" (Note this will not reverse.) * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in #i18n_error_code_e description. + * Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] locale_id The locale to maximize - * @param[out] maximized_locale_id The maximized locale - * @param[in] maximized_locale_id_capacity The capacity of the @a maximized_locale_id buffer + * @param[in] locale_id The locale to maximize + * @param[out] maximized_locale_id The maximized locale + * @param[in] maximized_locale_id_capacity The capacity of the @a maximized_locale_id buffer * * @return The actual buffer size needed for the maximized locale. If it's - * greater than @a maximized_lacale_id_capacity, the returned ID will be truncated. - * On error, the return value is -1. + * greater than @a maximized_lacale_id_capacity, the returned ID will be truncated. + * On error, the return value is -1. * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ @@ -789,32 +789,32 @@ int32_t i18n_ulocale_add_likely_subtags(const char *locale_id, char *maximized_l /** * @brief Minimizes the subtags for a provided locale ID, per the algorithm described - * in the following CLDR technical report: http://www.unicode.org/reports/tr35/#Likely_Subtags + * in the following CLDR technical report: http://www.unicode.org/reports/tr35/#Likely_Subtags * @details If @a locale_id is already in the minimal form, or there is no data available - * for minimization, it will be copied to the output buffer. Since the - * minimization algorithm relies on proper maximization, see the comments - * for i18n_ulocale_add_likely_subtags() for reasons why there might not be any data. + * for minimization, it will be copied to the output buffer. Since the + * minimization algorithm relies on proper maximization, see the comments + * for i18n_ulocale_add_likely_subtags() for reasons why there might not be any data. * - * Examples : + * Examples : * - * "en_Latn_US" minimizes to "en" + * "en_Latn_US" minimizes to "en" * - * "de_Latn_US" minimizes to "de" + * "de_Latn_US" minimizes to "de" * - * "sr_Cyrl_RS" minimizes to "sr" + * "sr_Cyrl_RS" minimizes to "sr" * - * "zh_Hant_TW" minimizes to "zh_TW" (The region is preferred to the script, and minimizing to "zh" would imply "zh_Hans_CN".) + * "zh_Hant_TW" minimizes to "zh_TW" (The region is preferred to the script, and minimizing to "zh" would imply "zh_Hans_CN".) * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in #i18n_error_code_e description. + * Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] locale_id The locale to minimize - * @param[out] minimized_locale_id The minimized locale - * @param[in] minimized_locale_id_capacity The capacity of the @a minimized_locale_id buffer + * @param[in] locale_id The locale to minimize + * @param[out] minimized_locale_id The minimized locale + * @param[in] minimized_locale_id_capacity The capacity of the @a minimized_locale_id buffer * * @return The actual buffer size needed for the minimized locale. If it's - * greater than @a minimized_locale_id_capacity, the returned ID will be truncated. - * On error, the return value is -1. + * greater than @a minimized_locale_id_capacity, the returned ID will be truncated. + * On error, the return value is -1. * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ @@ -823,28 +823,28 @@ int32_t i18n_ulocale_minimize_subtags(const char *locale_id, char *minimized_loc /** * @brief Returns a locale ID for the specified BCP47 language tag string. * @details If the specified language tag contains any ill-formed subtags, - * the first such subtag and all following subtags are ignored.
- * - * This implements the 'Language-Tag' production of BCP47, and so - * supports grandfathered (regular and irregular) as well as private - * use language tags. Private use tags are represented as 'x-whatever', - * and grandfathered tags are converted to their canonical replacements - * where they exist. Note that a few grandfathered tags have no modern - * replacement, these will be converted using the fallback described in - * the first paragraph, so some information might be lost. + * the first such subtag and all following subtags are ignored.
+ * + * This implements the 'Language-Tag' production of BCP47, and so + * supports grandfathered (regular and irregular) as well as private + * use language tags. Private use tags are represented as 'x-whatever', + * and grandfathered tags are converted to their canonical replacements + * where they exist. Note that a few grandfathered tags have no modern + * replacement, these will be converted using the fallback described in + * the first paragraph, so some information might be lost. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] langtag The input BCP47 language tag. - * @param[out] locale_id The output buffer receiving a locale ID for the - * specified BCP47 language tag. + * @param[in] langtag The input BCP47 language tag. + * @param[out] locale_id The output buffer receiving a locale ID for the + * specified BCP47 language tag. * @param[in] locale_id_capacity The size of the @a locale_id output buffer. - * @param[in] parsed_length If not @c NULL, successfully parsed length - * for the input language tag is set. + * @param[in] parsed_length If not @c NULL, successfully parsed length + * for the input language tag is set. * * @return The length of the locale ID. If the @a langtag or @a locale_id buffer is @c NULL or the @a locale_id_capacity is lower than @c 0, - * then the #I18N_ERROR_INVALID_PARAMETER error will be set and @c -1 will be returned. + * then the #I18N_ERROR_INVALID_PARAMETER error will be set and @c -1 will be returned. * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -854,25 +854,25 @@ int32_t i18n_ulocale_for_language_tag(const char *langtag, char *locale_id, int3 /** * @brief Returns a well-formed language tag for this locale ID. * @details Note : When @a strict is @c false, any locale - * fields which do not satisfy the BCP47 syntax requirement will - * be omitted from the result. When @a strict is - * @c true, this function sets #I18N_ERROR_INVALID_PARAMETER to the - * result if any locale fields do not satisfy the - * BCP47 syntax requirement. + * fields which do not satisfy the BCP47 syntax requirement will + * be omitted from the result. When @a strict is + * @c true, this function sets #I18N_ERROR_INVALID_PARAMETER to the + * result if any locale fields do not satisfy the + * BCP47 syntax requirement. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] locale_id The input locale ID - * @param[out] langtag The output buffer receiving BCP47 language - * tag for the locale ID. - * @param[in] langtag_capacity The size of the BCP47 language tag - * output buffer. - * @param[in] strict Boolean value indicating if the function returns - * an error for an ill-formed input locale ID. + * @param[in] locale_id The input locale ID + * @param[out] langtag The output buffer receiving BCP47 language + * tag for the locale ID. + * @param[in] langtag_capacity The size of the BCP47 language tag + * output buffer. + * @param[in] strict Boolean value indicating if the function returns + * an error for an ill-formed input locale ID. * * @return The length of the BCP47 language tag. If the @a locale_id or @a langtag buffer is @c NULL or the @a langtag_capacity is lower than @c 0, - * then the #I18N_ERROR_INVALID_PARAMETER error will be set and @c -1 will be returned. + * then the #I18N_ERROR_INVALID_PARAMETER error will be set and @c -1 will be returned. * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -888,4 +888,4 @@ int32_t i18n_ulocale_to_language_tag(const char *locale_id, char *langtag, int32 * @} */ -#endif /* __UTILS_I18N_ULOCALE_H__*/ +#endif /* __UTILS_I18N_ULOCALE_H__*/ diff --git a/src/include/wearable/utils_i18n_unormalization.h b/src/include/wearable/utils_i18n_unormalization.h old mode 100755 new mode 100644 index 15bad5d..f83660e --- a/src/include/wearable/utils_i18n_unormalization.h +++ b/src/include/wearable/utils_i18n_unormalization.h @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef __UTILS_I18N_UNORMALIZATION_H__ @@ -35,7 +35,7 @@ extern "C" { * @brief The Unormalization module provides Unicode normalization functionality for standard unicode normalization. * * @section CAPI_BASE_UTILS_I18N_UNORMALIZATION_MODULE_HEADER Required Header - * \#include + * \#include * * @section CAPI_BASE_UTILS_I18N_UNORMALIZATION_MODULE_OVERVIEW Overview * @details The Unormalization module provides Unicode normalization functionality for standard unicode normalization. @@ -45,22 +45,22 @@ extern "C" { * @section CAPI_BASE_UTILS_I18N_UNORMALIZATION_MODULE_SAMPLE_CODE_1 Sample Code 1 * @brief Creates a normalizer and normalizes a unicode string * @code - i18n_unormalizer_h normalizer = NULL; - i18n_uchar src = 0xAC00; - i18n_uchar dest[4] = {0,}; - int dest_str_len = 0; - int i = 0; + i18n_unormalizer_h normalizer = NULL; + i18n_uchar src = 0xAC00; + i18n_uchar dest[4] = {0,}; + int dest_str_len = 0; + int i = 0; - // gets instance for normalizer - i18n_unormalization_get_instance( NULL, "nfc", I18N_UNORMALIZATION_DECOMPOSE, &normalizer ); + // gets instance for normalizer + i18n_unormalization_get_instance( NULL, "nfc", I18N_UNORMALIZATION_DECOMPOSE, &normalizer ); - // normalizes a unicode string - i18n_unormalization_normalize( normalizer, &src, 1, dest, 4, &dest_str_len ); - dlog_print(DLOG_INFO, LOG_TAG, "src is 0x%x\n", src ); // src is 0xAC00 (0xAC00: A Korean character combined with consonant and vowel) + // normalizes a unicode string + i18n_unormalization_normalize( normalizer, &src, 1, dest, 4, &dest_str_len ); + dlog_print(DLOG_INFO, LOG_TAG, "src is 0x%x\n", src ); // src is 0xAC00 (0xAC00: A Korean character combined with consonant and vowel) - for ( i = 0; i < dest_str_len; i++ ) { - dlog_print(DLOG_INFO, LOG_TAG, "dest[%d] is 0x%x\t", i + 1, dest[i] ); // dest[1] is 0x1100 dest[2] is 0x1161 (0x1100: consonant, 0x1161: vowel) - } + for ( i = 0; i < dest_str_len; i++ ) { + dlog_print(DLOG_INFO, LOG_TAG, "dest[%d] is 0x%x\t", i + 1, dest[i] ); // dest[1] is 0x1100 dest[2] is 0x1161 (0x1100: consonant, 0x1161: vowel) + } * @endcode */ @@ -81,8 +81,8 @@ extern "C" { * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_unormalization_get_instance(const char *package_name, const char *name, i18n_unormalization_mode_e mode, - i18n_unormalizer_h *normalizer); +int i18n_unormalization_get_instance(const char *package_name, const char *name, i18n_unormalization_mode_e mode, + i18n_unormalizer_h *normalizer); /** * @brief Writes the normalized form of the source string to the destination string(replacing its contents). @@ -111,4 +111,4 @@ int i18n_unormalization_normalize(i18n_unormalizer_h normalizer, const i18n_ucha * @} */ -#endif /* __UTILS_I18N_UNORMALIZATION_H__*/ +#endif /* __UTILS_I18N_UNORMALIZATION_H__*/ diff --git a/src/include/wearable/utils_i18n_unumber.h b/src/include/wearable/utils_i18n_unumber.h index 4a4e2ac..996bb25 100644 --- a/src/include/wearable/utils_i18n_unumber.h +++ b/src/include/wearable/utils_i18n_unumber.h @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef __UTILS_I18N_UNUMBER_H__ @@ -31,7 +31,7 @@ * @brief The Unumber module helps you format and parse numbers for any locale. * * @section CAPI_BASE_UTILS_I18N_UNUMBER_MODULE_HEADER Required Header - * \#include + * \#include * * @section CAPI_BASE_UTILS_I18N_UNUMBER_MODULE_OVERVIEW Overview * @details The Unumber module helps you format and parse numbers for any locale. @@ -43,23 +43,23 @@ * @section CAPI_BASE_UTILS_I18N_UNUMBER_MODULE_SAMPLE_CODE_1 Sample Code 1 * @brief Gets a currency symbol according to a given locale. * @code - int buf_len; - i18n_uchar u_buffer[64]; - char a_buffer[64]; - i18n_unumber_format_h num_format; + int buf_len; + i18n_uchar u_buffer[64]; + char a_buffer[64]; + i18n_unumber_format_h num_format; - // creates and returns a new unumber_format - i18n_unumber_create(I18N_UNUMBER_CURRENCY, NULL, -1, "en_US", NULL, &num_format); + // creates and returns a new unumber_format + i18n_unumber_create(I18N_UNUMBER_CURRENCY, NULL, -1, "en_US", NULL, &num_format); - // gets a symbol associated with i18n_unumber_format - i18n_unumber_get_symbol(num_format, I18N_UNUMBER_CURRENCY_SYMBOL, u_buffer, 64, &buf_len); + // gets a symbol associated with i18n_unumber_format + i18n_unumber_get_symbol(num_format, I18N_UNUMBER_CURRENCY_SYMBOL, u_buffer, 64, &buf_len); - i18n_ustring_copy_au(a_buffer, u_buffer); - // en_US currency symbol: $ - dlog_print(DLOG_INFO, LOG_TAG, "en_US currency symbol: %s \n", a_buffer); + i18n_ustring_copy_au(a_buffer, u_buffer); + // en_US currency symbol: $ + dlog_print(DLOG_INFO, LOG_TAG, "en_US currency symbol: %s \n", a_buffer); - // destroys i18n_unumber_format - i18n_unumber_destroy(num_format); + // destroys i18n_unumber_format + i18n_unumber_destroy(num_format); * @endcode */ @@ -94,20 +94,20 @@ extern "C" { * or #I18N_UNUMBER_DEFAULT \n * If #I18N_UNUMBER_PATTERN_DECIMAL or #I18N_UNUMBER_PATTERN_RULEBASED is passed then the number format is created using the given pattern, which must conform * to the syntax described in DecimalFormat or RuleBasedNumberFormat, respectively. - * @param[in] pattern A pattern specifying the format to use \n This parameter is ignored unless the style is #I18N_UNUMBER_PATTERN_DECIMAL or #I18N_UNUMBER_PATTERN_RULEBASED. - * @param[in] pattern_len The number of characters in the pattern, otherwise @c -1 if NULL-terminated\n - * This parameter is ignored unless the style is I18N_UNUMBER_PATTERN_*. - * @param[in] locale A locale identifier to use to determine formatting - * and parsing conventions, otherwise @c NULL to use the default locale. - * @param[in] parse_err A pointer to a #i18n_uparse_error_s structure to receive the - * details of any parsing errors, otherwise @c NULL if no parsing error details are desired. - * @param[out] num_format A pointer to a newly created #i18n_unumber_format_h, otherwise @c NULL if an error occurs. + * @param[in] pattern A pattern specifying the format to use \n This parameter is ignored unless the style is #I18N_UNUMBER_PATTERN_DECIMAL or #I18N_UNUMBER_PATTERN_RULEBASED. + * @param[in] pattern_len The number of characters in the pattern, otherwise @c -1 if NULL-terminated\n + * This parameter is ignored unless the style is I18N_UNUMBER_PATTERN_*. + * @param[in] locale A locale identifier to use to determine formatting + * and parsing conventions, otherwise @c NULL to use the default locale. + * @param[in] parse_err A pointer to a #i18n_uparse_error_s structure to receive the + * details of any parsing errors, otherwise @c NULL if no parsing error details are desired. + * @param[out] num_format A pointer to a newly created #i18n_unumber_format_h, otherwise @c NULL if an error occurs. * * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ int i18n_unumber_create(i18n_unumber_format_style_e style, const i18n_uchar *pattern, int32_t pattern_len, const char *locale, - i18n_uparse_error_s *parse_err, i18n_unumber_format_h *num_format); + i18n_uparse_error_s *parse_err, i18n_unumber_format_h *num_format); /** * @brief Destroys an #i18n_unumber_format_h. @@ -141,7 +141,7 @@ int i18n_unumber_destroy(i18n_unumber_format_h fmt); int i18n_unumber_get_symbol(const i18n_unumber_format_h fmt, i18n_unumber_format_symbol_e symbol, i18n_uchar *buffer, int32_t size, int32_t *len_symbol); -// Newly Added APIs +/* Newly Added APIs */ /** @@ -150,7 +150,7 @@ int i18n_unumber_get_symbol(const i18n_unumber_format_h fmt, i18n_unumber_format * @remarks Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] fmt The format to copy. + * @param[in] fmt The format to copy. * @param[out] fmt_clone A pointer to clone of @a fmt. * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful. @@ -163,17 +163,17 @@ int i18n_unumber_clone(const i18n_unumber_format_h fmt, i18n_unumber_format_h *f * @details The integer will be formatted according to the i18n_unumber_format_h's locale. * @since_tizen 2.3.1 * -* @param[in] fmt The formatter to use. -* @param[in] number The number to format. -* @param[out] result A pointer to a buffer to receive the NULL-terminated formatted number. -* If the formatted number fits into dest but cannot be NULL-terminated (length == resultLength) -* then the error code is set to #I18N_WARNING_STRING_NOT_TERMINATED. -* If the formatted number doesn't fit into result then the error code is set to #I18N_ERROR_BUFFER_OVERFLOW. +* @param[in] fmt The formatter to use. +* @param[in] number The number to format. +* @param[out] result A pointer to a buffer to receive the NULL-terminated formatted number. +* If the formatted number fits into dest but cannot be NULL-terminated (length == resultLength) +* then the error code is set to #I18N_WARNING_STRING_NOT_TERMINATED. +* If the formatted number doesn't fit into result then the error code is set to #I18N_ERROR_BUFFER_OVERFLOW. * @param[in] result_length The maximum size of result. -* @param[in] pos A pointer to a i18n_ufield_position. On input, position->field is read. -* On output, position->beginIndex and position->endIndex indicate the beginning and ending indices of field number position->field, if such a field exists. -* This parameter may be NULL, in which case no field -* @param[out] status A pointer to an i18n_error_code_e to receive any errors +* @param[in] pos A pointer to a i18n_ufield_position. On input, position->field is read. +* On output, position->beginIndex and position->endIndex indicate the beginning and ending indices of field number position->field, if such a field exists. +* This parameter may be NULL, in which case no field +* @param[out] status A pointer to an i18n_error_code_e to receive any errors * * @return The total buffer size needed; if greater than result_length, the output was truncated. */ @@ -183,19 +183,19 @@ int32_t i18n_unumber_format(const i18n_unumber_format_h fmt, int32_t number, i18 * @brief Formats an int64 using an #i18n_unumber_format_h. * @details The int64 will be formatted according to the #i18n_unumber_format_h's locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] fmt The formatter to use. - * @param[in] number The number to format. - * @param[out] result A pointer to a buffer to receive the NULL-terminated formatted number. - * If the formatted number fits into @a result but cannot be NULL-terminated (length == result_length) - * then the error code is set to #I18N_WARNING_STRING_NOT_TERMINATED. - * If the formatted number doesn't fit into result then the error code is set to #I18N_ERROR_BUFFER_OVERFLOW. - * @param[in] result_length The maximum size of @a result. - * @param[in,out] pos An #i18n_ufield_position_h handle. On input, position->field is read. - * On output, position->beginIndex and position->endIndex indicate the beginning and ending indices of field number position->field, if such a field exists. - * This parameter may be NULL, in which case no field + * @param[in] fmt The formatter to use. + * @param[in] number The number to format. + * @param[out] result A pointer to a buffer to receive the NULL-terminated formatted number. + * If the formatted number fits into @a result but cannot be NULL-terminated (length == result_length) + * then the error code is set to #I18N_WARNING_STRING_NOT_TERMINATED. + * If the formatted number doesn't fit into result then the error code is set to #I18N_ERROR_BUFFER_OVERFLOW. + * @param[in] result_length The maximum size of @a result. + * @param[in,out] pos An #i18n_ufield_position_h handle. On input, position->field is read. + * On output, position->beginIndex and position->endIndex indicate the beginning and ending indices of field number position->field, if such a field exists. + * This parameter may be NULL, in which case no field * * @return The total buffer size needed; if greater than @a result_length, the output was truncated. * @@ -210,20 +210,20 @@ int32_t i18n_unumber_format_int64(const i18n_unumber_format_h fmt, int64_t numbe * @brief Formats a double using an #i18n_unumber_format_h. * @details The double will be formatted according to the #i18n_unumber_format_h's locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] fmt The formatter to use. - * @param[in] number The number to format. - * @param[out] result A pointer to a buffer to receive the NULL-terminated formatted number. - * If the formatted number fits into @a result but cannot be NULL-terminated (length == result_length) - * then the error code is set to #I18N_WARNING_STRING_NOT_TERMINATED. - * If the formatted number doesn't fit into result then the error code is set to #I18N_ERROR_BUFFER_OVERFLOW. - * @param[in] result_length The maximum size of @a result. - * @param[in,out] pos An #i18n_ufield_position_h handle. On input, position->field is read. - * On output, position->beginIndex and position->endIndex indicate the beginning - * and ending indices of field number position->field, if such a field exists. - * This parameter may be NULL, in which case no field + * @param[in] fmt The formatter to use. + * @param[in] number The number to format. + * @param[out] result A pointer to a buffer to receive the NULL-terminated formatted number. + * If the formatted number fits into @a result but cannot be NULL-terminated (length == result_length) + * then the error code is set to #I18N_WARNING_STRING_NOT_TERMINATED. + * If the formatted number doesn't fit into result then the error code is set to #I18N_ERROR_BUFFER_OVERFLOW. + * @param[in] result_length The maximum size of @a result. + * @param[in,out] pos An #i18n_ufield_position_h handle. On input, position->field is read. + * On output, position->beginIndex and position->endIndex indicate the beginning + * and ending indices of field number position->field, if such a field exists. + * This parameter may be NULL, in which case no field * * @return The total buffer size needed; if greater than @a result_length, the output was truncated. * @@ -237,24 +237,24 @@ int32_t i18n_unumber_format_double(const i18n_unumber_format_h fmt, double numbe /** * @brief Formats a decimal number using an #i18n_unumber_format_h. * @details The number will be formatted according to the #i18n_unumber_format_h's locale. The syntax of the input number - * is a "numeric string" as defined in the Decimal Arithmetic Specification, available at http://speleotrove.com/decimal + * is a "numeric string" as defined in the Decimal Arithmetic Specification, available at http://speleotrove.com/decimal * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] fmt The formatter to use. - * @param[in] number The number to format. - * @param[in] length The length of the input @a number, or -1 if the input is NULL-terminated. - * @param[out] result A pointer to a buffer to receive the NULL-terminated formatted number. - * If the formatted number fits into @a result but cannot be NULL-terminated (length == result_length) then - * the error code is set to #I18N_WARNING_STRING_NOT_TERMINATED. - * If the formatted number doesn't fit into result then the error code is set to - * #I18N_ERROR_BUFFER_OVERFLOW. - * @param[in] result_length The maximum size of @a result. - * @param[in,out] pos An #i18n_ufield_position_h handle. On input, position->field is read. - * On output, position->beginIndex and position->endIndex indicate the beginning and ending - * indices of field number position->field, if such a field exists. - * This parameter may be NULL, in which case it is ignored. + * @param[in] fmt The formatter to use. + * @param[in] number The number to format. + * @param[in] length The length of the input @a number, or -1 if the input is NULL-terminated. + * @param[out] result A pointer to a buffer to receive the NULL-terminated formatted number. + * If the formatted number fits into @a result but cannot be NULL-terminated (length == result_length) then + * the error code is set to #I18N_WARNING_STRING_NOT_TERMINATED. + * If the formatted number doesn't fit into result then the error code is set to + * #I18N_ERROR_BUFFER_OVERFLOW. + * @param[in] result_length The maximum size of @a result. + * @param[in,out] pos An #i18n_ufield_position_h handle. On input, position->field is read. + * On output, position->beginIndex and position->endIndex indicate the beginning and ending + * indices of field number position->field, if such a field exists. + * This parameter may be NULL, in which case it is ignored. * * @return The total buffer size needed; if greater than @a result_length, the output was truncated. * @@ -269,22 +269,22 @@ int32_t i18n_unumber_format_decimal(const i18n_unumber_format_h fmt, const char * @brief Formats a double currency amount using an #i18n_unumber_format_h. * @details The double will be formatted according to the #i18n_unumber_format_h's locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] fmt The formatter to use. - * @param[in] number The number to format. - * @param[in] currency The 3-letter NULL-terminated ISO 4217 currency code. - * @param[out] result A pointer to a buffer to receive the NULL-terminated formatted number. - * If the formatted number fits into @a result but cannot be NULL-terminated (length == result_length) - * then the error code is set to #I18N_WARNING_STRING_NOT_TERMINATED. - * If the formatted number doesn't fit into result then the error code is set to - * #I18N_ERROR_BUFFER_OVERFLOW. - * @param[in] result_length The maximum size of @a result. - * @param[in,out] pos An #i18n_ufield_position_h handle. On input, position->field is read. - * On output, position->beginIndex and position->endIndex indicate the beginning and ending indices - * of field number position->field, if such a field exists. - * This parameter may be NULL, in which case it is ignored. + * @param[in] fmt The formatter to use. + * @param[in] number The number to format. + * @param[in] currency The 3-letter NULL-terminated ISO 4217 currency code. + * @param[out] result A pointer to a buffer to receive the NULL-terminated formatted number. + * If the formatted number fits into @a result but cannot be NULL-terminated (length == result_length) + * then the error code is set to #I18N_WARNING_STRING_NOT_TERMINATED. + * If the formatted number doesn't fit into result then the error code is set to + * #I18N_ERROR_BUFFER_OVERFLOW. + * @param[in] result_length The maximum size of @a result. + * @param[in,out] pos An #i18n_ufield_position_h handle. On input, position->field is read. + * On output, position->beginIndex and position->endIndex indicate the beginning and ending indices + * of field number position->field, if such a field exists. + * This parameter may be NULL, in which case it is ignored. * * @return The total buffer size needed; if greater than @a result_length, the output was truncated. * @@ -299,14 +299,14 @@ int32_t i18n_unumber_format_double_currency(const i18n_unumber_format_h fmt, dou * @brief Parses a string into an integer using an #i18n_unumber_format_h. * @details The string will be parsed according to the #i18n_unumber_format_h's locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] fmt The formatter to use. - * @param[in] text The text to parse. - * @param[in] text_length The length of @a text, or -1 if NULL-terminated. - * @param[in,out] parse_pos If not NULL, on input a pointer to an integer specifying the offset at which to begin parsing. - * If not NULL, on output the offset at which parsing ended. + * @param[in] fmt The formatter to use. + * @param[in] text The text to parse. + * @param[in] text_length The length of @a text, or -1 if NULL-terminated. + * @param[in,out] parse_pos If not NULL, on input a pointer to an integer specifying the offset at which to begin parsing. + * If not NULL, on output the offset at which parsing ended. * * @return The value of the parsed integer * @@ -319,14 +319,14 @@ int32_t i18n_unumber_parse(const i18n_unumber_format_h fmt, const i18n_uchar *te * @brief Parses a string into an int64 using an #i18n_unumber_format_h. * @details The string will be parsed according to the #i18n_unumber_format_h's locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] fmt The formatter to use. - * @param[in] text The text to parse. - * @param[in] text_length The length of @a text, or -1 if NULL-terminated. - * @param[in,out] parse_pos If not NULL, on input a pointer to an integer specifying the offset at which to begin parsing. - * If not NULL, on output the offset at which parsing ended. + * @param[in] fmt The formatter to use. + * @param[in] text The text to parse. + * @param[in] text_length The length of @a text, or -1 if NULL-terminated. + * @param[in,out] parse_pos If not NULL, on input a pointer to an integer specifying the offset at which to begin parsing. + * If not NULL, on output the offset at which parsing ended. * * @return The value of the parsed integer * @@ -339,14 +339,14 @@ int64_t i18n_unumber_parse_int64(const i18n_unumber_format_h fmt, const i18n_uch * @brief Parses a string into a double using an #i18n_unumber_format_h. * @details The string will be parsed according to the #i18n_unumber_format_h's locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] fmt The formatter to use. - * @param[in] text The text to parse. - * @param[out] text_length The length of @a text, or -1 if NULL-terminated. - * @param[in,out] parse_pos If not NULL, on input a pointer to an integer specifying the offset at which to begin parsing. - * If not NULL, on output the offset at which parsing ended. + * @param[in] fmt The formatter to use. + * @param[in] text The text to parse. + * @param[out] text_length The length of @a text, or -1 if NULL-terminated. + * @param[in,out] parse_pos If not NULL, on input a pointer to an integer specifying the offset at which to begin parsing. + * If not NULL, on output the offset at which parsing ended. * * @return The value of the parsed double * @@ -358,21 +358,21 @@ double i18n_unumber_parse_double(const i18n_unumber_format_h fmt, const i18n_uch /** * @brief Parses a number from a string into an unformatted numeric string using an #i18n_unumber_format_h. * @details The input string will be parsed according to the #i18n_unumber_format_h's locale. - * The syntax of the output is a "numeric string" as defined in the Decimal Arithmetic Specification, available at - * http://speleotrove.com/decimal + * The syntax of the output is a "numeric string" as defined in the Decimal Arithmetic Specification, available at + * http://speleotrove.com/decimal * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] fmt The formatter to use. - * @param[in] text The text to parse. - * @param[in] text_length The length of @a text, or -1 if NULL-terminated. - * @param[in,out] parse_pos If not NULL, on input a pointer to an integer specifying the offset at which to begin parsing. - * If not NULL, on output the offset at which parsing ended. - * @param[out] out_buf A (char *) buffer to receive the parsed number as a string. - * The output string will be NULL-terminated if there is sufficient space. - * @param[out] out_buf_length The size of the output buffer. May be zero, in which case the @a out_buf pointer may be NULL, - * and the function will return the size of the output string. + * @param[in] fmt The formatter to use. + * @param[in] text The text to parse. + * @param[in] text_length The length of @a text, or -1 if NULL-terminated. + * @param[in,out] parse_pos If not NULL, on input a pointer to an integer specifying the offset at which to begin parsing. + * If not NULL, on output the offset at which parsing ended. + * @param[out] out_buf A (char *) buffer to receive the parsed number as a string. + * The output string will be NULL-terminated if there is sufficient space. + * @param[out] out_buf_length The size of the output buffer. May be zero, in which case the @a out_buf pointer may be NULL, + * and the function will return the size of the output string. * * @return The length of the output string, not including any terminating NULL. * @@ -385,18 +385,18 @@ int32_t i18n_unumber_parse_decimal(const i18n_unumber_format_h fmt, const i18n_u * @brief Parses a string into a double and a currency using an #i18n_unumber_format_h. * @details The string will be parsed according to the #i18n_unumber_format_h's locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] fmt The formatter to use. - * @param[in] text The text to parse. - * @param[in] text_length The length of @a text, or -1 if NULL-terminated. - * @param[in,out] parse_pos A pointer to an offset index into text at which to begin parsing. On output, @a parse_pos will - * point after the last parsed character. This parameter may be NULL, in which case parsing begins - * at offset 0. - * If not NULL, on output the offset at which parsing ended. - * @param[out] currency A pointer to the buffer to receive the parsed NULL- terminated currency. - * This buffer must have a capacity of at least 4 #i18n_uchar characters. + * @param[in] fmt The formatter to use. + * @param[in] text The text to parse. + * @param[in] text_length The length of @a text, or -1 if NULL-terminated. + * @param[in,out] parse_pos A pointer to an offset index into text at which to begin parsing. On output, @a parse_pos will + * point after the last parsed character. This parameter may be NULL, in which case parsing begins + * at offset 0. + * If not NULL, on output the offset at which parsing ended. + * @param[out] currency A pointer to the buffer to receive the parsed NULL- terminated currency. + * This buffer must have a capacity of at least 4 #i18n_uchar characters. * * @return The parsed double * @@ -411,28 +411,28 @@ double i18n_unumber_parse_double_currency(const i18n_unumber_format_h fmt, const * @remarks Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] format The formatter to set. - * @param[in] localized true if the pattern is localized, false otherwise. - * @param[in] pattern The new pattern - * @param[in] pattern_length The length of @a pattern, or -1 if NULL-terminated. - * @param[out] parse_error A pointer to #i18n_uparse_error_s to receive information about errors occurred during parsing, - * or NULL if no parse error information is desired. + * @param[in] format The formatter to set. + * @param[in] localized true if the pattern is localized, false otherwise. + * @param[in] pattern The new pattern + * @param[in] pattern_length The length of @a pattern, or -1 if NULL-terminated. + * @param[out] parse_error A pointer to #i18n_uparse_error_s to receive information about errors occurred during parsing, + * or NULL if no parse error information is desired. * * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful. * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -int i18n_unumber_apply_pattern(i18n_unumber_format_h format, i18n_ubool localized, const i18n_uchar *pattern, int32_t pattern_length, i18n_uparse_error_s* parse_error); +int i18n_unumber_apply_pattern(i18n_unumber_format_h format, i18n_ubool localized, const i18n_uchar *pattern, int32_t pattern_length, i18n_uparse_error_s *parse_error); /** * @brief Gets a locale for which decimal formatting patterns are available. * @details An #i18n_unumber_format_h in a locale returned by this function will perform the correct formatting and parsing for the locale. - * The results of this call are not valid for rule-based number formats. + * The results of this call are not valid for rule-based number formats. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] locale_index The index of the desired locale. + * @param[in] locale_index The index of the desired locale. * * @return A locale for which number formatting patterns are available, or 0 if none. * @@ -443,9 +443,9 @@ const char *i18n_unumber_get_available(int32_t locale_index); /** * @brief Determines how many locales have decimal formatting patterns available. * @details The results of this call are not valid for rule-based number formats. - * This function is useful for determining the loop ending condition for calls to i18n_unumber_get_available(). + * This function is useful for determining the loop ending condition for calls to i18n_unumber_get_available(). * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * * @return The number of locales for which decimal formatting patterns are available. @@ -458,16 +458,16 @@ int32_t i18n_unumber_count_available(void); * @brief Gets a numeric attribute associated with an #i18n_unumber_format_h. * @details An example of a numeric attribute is the number of integer digits a formatter will produce. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] fmt The formatter to query. - * @param[in] attr The attribute to query; one of #I18N_UNUMBER_PARSE_INT_ONLY, #I18N_UNUMBER_GROUPING_USED, - * #I18N_UNUMBER_DECIMAL_ALWAYS_SHOWN, #I18N_UNUMBER_MAX_INTEGER_DIGITS, #I18N_UNUMBER_MIN_INTEGER_DIGITS, - * #I18N_UNUMBER_INTEGER_DIGITS, #I18N_UNUMBER_MAX_FRACTION_DIGITS, #I18N_UNUMBER_MIN_FRACTION_DIGITS, - * #I18N_UNUMBER_FRACTION_DIGITS, #I18N_UNUMBER_MULTIPLIER, #I18N_UNUMBER_GROUPING_SIZE, - * #I18N_UNUMBER_ROUNDING_MODE, #I18N_UNUMBER_FORMAT_WIDTH, #I18N_UNUMBER_PADDING_POSITION, - * #I18N_UNUMBER_SECONDARY_GROUPING_SIZE, #I18N_UNUM_SCALE. + * @param[in] fmt The formatter to query. + * @param[in] attr The attribute to query; one of #I18N_UNUMBER_PARSE_INT_ONLY, #I18N_UNUMBER_GROUPING_USED, + * #I18N_UNUMBER_DECIMAL_ALWAYS_SHOWN, #I18N_UNUMBER_MAX_INTEGER_DIGITS, #I18N_UNUMBER_MIN_INTEGER_DIGITS, + * #I18N_UNUMBER_INTEGER_DIGITS, #I18N_UNUMBER_MAX_FRACTION_DIGITS, #I18N_UNUMBER_MIN_FRACTION_DIGITS, + * #I18N_UNUMBER_FRACTION_DIGITS, #I18N_UNUMBER_MULTIPLIER, #I18N_UNUMBER_GROUPING_SIZE, + * #I18N_UNUMBER_ROUNDING_MODE, #I18N_UNUMBER_FORMAT_WIDTH, #I18N_UNUMBER_PADDING_POSITION, + * #I18N_UNUMBER_SECONDARY_GROUPING_SIZE, #I18N_UNUM_SCALE. * * @return The value of @a attr or @c -1 if the given attribute is not supported. * @@ -479,21 +479,21 @@ int32_t i18n_unumber_get_attribute(const i18n_unumber_format_h fmt, i18n_unumber /** * @brief Sets a numeric attribute associated with an #i18n_unumber_format_h. * @details An example of a numeric attribute is the number of integer digits a formatter will produce. - * If the formatter does not understand the attribute, the call is ignored. Rule-based formatters only understand - * the lenient-parse attribute. The #I18N_UNUMBER_ROUNDING_INCREMENT attribute is not supported. + * If the formatter does not understand the attribute, the call is ignored. Rule-based formatters only understand + * the lenient-parse attribute. The #I18N_UNUMBER_ROUNDING_INCREMENT attribute is not supported. * @remarks Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] fmt The formatter to set. - * @param[in] attr The attribute to query; one of #I18N_UNUMBER_PARSE_INT_ONLY, #I18N_UNUMBER_GROUPING_USED, - * #I18N_UNUMBER_DECIMAL_ALWAYS_SHOWN, #I18N_UNUMBER_MAX_INTEGER_DIGITS, #I18N_UNUMBER_MIN_INTEGER_DIGITS, - * #I18N_UNUMBER_INTEGER_DIGITS, #I18N_UNUMBER_MAX_FRACTION_DIGITS, #I18N_UNUMBER_MIN_FRACTION_DIGITS, - * #I18N_UNUMBER_FRACTION_DIGITS, #I18N_UNUMBER_MULTIPLIER, #I18N_UNUMBER_GROUPING_SIZE, - * #I18N_UNUMBER_ROUNDING_MODE, #I18N_UNUMBER_FORMAT_WIDTH, #I18N_UNUMBER_PADDING_POSITION, - * #I18N_UNUMBER_SECONDARY_GROUPING_SIZE, #I18N_UNUMBER_SIGNIFICANT_DIGITS_USED, #I18N_UNUMBER_MIN_SIGNIFICANT_DIGITS, - * #I18N_UNUMBER_MAX_SIGNIFICANT_DIGITS, #I18N_UNUMBER_LENIENT_PARSE, #I18N_UNUM_SCALE, - * #I18N_UNUM_FORMAT_FAIL_IF_MORE_THAN_MAX_DIGITS, #I18N_UNUM_PARSE_NO_EXPONENT. - * @param[in] new_value The new value of @a attr. + * @param[in] fmt The formatter to set. + * @param[in] attr The attribute to query; one of #I18N_UNUMBER_PARSE_INT_ONLY, #I18N_UNUMBER_GROUPING_USED, + * #I18N_UNUMBER_DECIMAL_ALWAYS_SHOWN, #I18N_UNUMBER_MAX_INTEGER_DIGITS, #I18N_UNUMBER_MIN_INTEGER_DIGITS, + * #I18N_UNUMBER_INTEGER_DIGITS, #I18N_UNUMBER_MAX_FRACTION_DIGITS, #I18N_UNUMBER_MIN_FRACTION_DIGITS, + * #I18N_UNUMBER_FRACTION_DIGITS, #I18N_UNUMBER_MULTIPLIER, #I18N_UNUMBER_GROUPING_SIZE, + * #I18N_UNUMBER_ROUNDING_MODE, #I18N_UNUMBER_FORMAT_WIDTH, #I18N_UNUMBER_PADDING_POSITION, + * #I18N_UNUMBER_SECONDARY_GROUPING_SIZE, #I18N_UNUMBER_SIGNIFICANT_DIGITS_USED, #I18N_UNUMBER_MIN_SIGNIFICANT_DIGITS, + * #I18N_UNUMBER_MAX_SIGNIFICANT_DIGITS, #I18N_UNUMBER_LENIENT_PARSE, #I18N_UNUM_SCALE, + * #I18N_UNUM_FORMAT_FAIL_IF_MORE_THAN_MAX_DIGITS, #I18N_UNUM_PARSE_NO_EXPONENT. + * @param[in] new_value The new value of @a attr. * * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful. @@ -504,13 +504,13 @@ int i18n_unumber_set_attribute(i18n_unumber_format_h fmt, i18n_unumber_format_at /** * @brief Gets a numeric attribute associated with an #i18n_unumber_format_h. * @details An example of a numeric attribute is the number of integer digits a formatter will produce. - * If the formatter does not understand the attribute, -1 is returned. + * If the formatter does not understand the attribute, -1 is returned. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] fmt The formatter to query. - * @param[in] attr The attribute to query; only #I18N_UNUMBER_ROUNDING_INCREMENT is supported. + * @param[in] fmt The formatter to query. + * @param[in] attr The attribute to query; only #I18N_UNUMBER_ROUNDING_INCREMENT is supported. * * @return The value of @a attr. * @@ -522,13 +522,13 @@ double i18n_unumber_get_double_attribute(const i18n_unumber_format_h fmt, i18n_u /** * @brief Sets a numeric attribute associated with an #i18n_unumber_format_h. * @details An example of a numeric attribute is the number of integer digits a formatter will produce. - * If the formatter does not understand the attribute, this call is ignored. + * If the formatter does not understand the attribute, this call is ignored. * @remarks Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] fmt The formatter to set. - * @param[in] attr The attribute to query; Only #I18N_UNUMBER_ROUNDING_INCREMENT is supported. - * @param[in] new_value The new value of @a attr. + * @param[in] fmt The formatter to set. + * @param[in] attr The attribute to query; Only #I18N_UNUMBER_ROUNDING_INCREMENT is supported. + * @param[in] new_value The new value of @a attr. * * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful. @@ -539,18 +539,18 @@ int i18n_unumber_set_double_attribute(i18n_unumber_format_h fmt, i18n_unumber_fo /** * @brief Gets a text attribute associated with an #i18n_unumber_format_h. * @details An example of a text attribute is the suffix for positive numbers. If the formatter does not understand the attribute, - * #I18N_ERROR_NOT_SUPPORTED error code is set. - * Rule-based formatters only understand #I18N_UNUMBER_DEFAULT_RULESET and #I18N_UNUMBER_PUBLIC_RULESETS. + * #I18N_ERROR_NOT_SUPPORTED error code is set. + * Rule-based formatters only understand #I18N_UNUMBER_DEFAULT_RULESET and #I18N_UNUMBER_PUBLIC_RULESETS. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] fmt The formatter to query. - * @param[in] tag The attribute to query; one of #I18N_UNUMBER_POSITIVE_PREFIX, #I18N_UNUMBER_POSITIVE_SUFFIX, - * #I18N_UNUMBER_NEGATIVE_PREFIX, #I18N_UNUMBER_NEGATIVE_SUFFIX, #I18N_UNUMBER_PADDING_CHARACTER, - * #I18N_UNUMBER_CURRENCY_CODE, #I18N_UNUMBER_DEFAULT_RULESET, or #I18N_UNUMBER_PUBLIC_RULESETS. - * @param[out] result A pointer to a buffer to receive the attribute. - * @param[in] result_length The maximum size of @a result. + * @param[in] fmt The formatter to query. + * @param[in] tag The attribute to query; one of #I18N_UNUMBER_POSITIVE_PREFIX, #I18N_UNUMBER_POSITIVE_SUFFIX, + * #I18N_UNUMBER_NEGATIVE_PREFIX, #I18N_UNUMBER_NEGATIVE_SUFFIX, #I18N_UNUMBER_PADDING_CHARACTER, + * #I18N_UNUMBER_CURRENCY_CODE, #I18N_UNUMBER_DEFAULT_RULESET, or #I18N_UNUMBER_PUBLIC_RULESETS. + * @param[out] result A pointer to a buffer to receive the attribute. + * @param[in] result_length The maximum size of @a result. * * @return The total buffer size needed; if greater than @a result_length, the output was truncated. * @@ -562,16 +562,16 @@ int32_t i18n_unumber_get_text_attribute(const i18n_unumber_format_h fmt, i18n_un /** * @brief Sets a text attribute associated with an #i18n_unumber_format_h. * @details An example of a text attribute is the suffix for positive numbers. Rule-based formatters only understand - * #I18N_UNUMBER_DEFAULT_RULESET. The #I18N_UNUMBER_PUBLIC_RULESETS tag is not supported. + * #I18N_UNUMBER_DEFAULT_RULESET. The #I18N_UNUMBER_PUBLIC_RULESETS tag is not supported. * @remarks Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] fmt The formatter to set. - * @param[in] tag The attribute to set; one of #I18N_UNUMBER_POSITIVE_PREFIX, #I18N_UNUMBER_POSITIVE_SUFFIX, - * #I18N_UNUMBER_NEGATIVE_PREFIX, #I18N_UNUMBER_NEGATIVE_SUFFIX, #I18N_UNUMBER_PADDING_CHARACTER, - * #I18N_UNUMBER_CURRENCY_CODE, #I18N_UNUMBER_DEFAULT_RULESET. - * @param[in] new_value The new value of @a tag. - * @param[in] new_value_length The length of new_value, or -1 if NULL-terminated. + * @param[in] fmt The formatter to set. + * @param[in] tag The attribute to set; one of #I18N_UNUMBER_POSITIVE_PREFIX, #I18N_UNUMBER_POSITIVE_SUFFIX, + * #I18N_UNUMBER_NEGATIVE_PREFIX, #I18N_UNUMBER_NEGATIVE_SUFFIX, #I18N_UNUMBER_PADDING_CHARACTER, + * #I18N_UNUMBER_CURRENCY_CODE, #I18N_UNUMBER_DEFAULT_RULESET. + * @param[in] new_value The new value of @a tag. + * @param[in] new_value_length The length of new_value, or -1 if NULL-terminated. * * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful. @@ -583,14 +583,14 @@ int i18n_unumber_set_text_attribute(const i18n_unumber_format_h fmt, i18n_unumbe * @brief Extracts the pattern from an #i18n_unumber_format_h. * @details The pattern will follow the DecimalFormat pattern syntax. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] fmt The formatter to query. - * @param[in] is_pattern_localized true if the pattern should be localized, false otherwise. - * This is ignored if the formatter is a rule-based formatter. - * @param[out] result A pointer to a buffer to receive the pattern. - * @param[in] result_length The maximum size of @a result. + * @param[in] fmt The formatter to query. + * @param[in] is_pattern_localized true if the pattern should be localized, false otherwise. + * This is ignored if the formatter is a rule-based formatter. + * @param[out] result A pointer to a buffer to receive the pattern. + * @param[in] result_length The maximum size of @a result. * * @return The total buffer size needed; if greater than @a result_length, the output was truncated. * @@ -602,14 +602,14 @@ int32_t i18n_unumber_to_pattern(const i18n_unumber_format_h fmt, i18n_ubool is_p /** * @brief Sets a symbol associated with an #i18n_unumber_format_h. * @details An #i18n_unumber_format_h uses symbols to represent the special locale-dependent characters in a number, for example the percent sign. - * This API is not supported for rule-based formatters. + * This API is not supported for rule-based formatters. * @remarks Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] fmt The formatter to set. - * @param[in] symbol The #i18n_unumber_format_symbol_e constant for the symbol to set - * @param[in] value The string to set the symbol to - * @param[in] length The length of the input string, or -1 for a zero-terminated string + * @param[in] fmt The formatter to set. + * @param[in] symbol The #i18n_unumber_format_symbol_e constant for the symbol to set + * @param[in] value The string to set the symbol to + * @param[in] length The length of the input string, or -1 for a zero-terminated string * * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful. @@ -621,11 +621,11 @@ int i18n_unumber_set_symbol(i18n_unumber_format_h fmt, i18n_unumber_format_symbo * @brief Gets the locale for this number format object. * @details You can choose between valid and actual locale. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and #i18n_error_code_e description. + * Error codes are described in Exceptions section and #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] fmt The formatter to get the locale from. - * @param[in] type Type of the locale we're looking for (valid or actual) + * @param[in] fmt The formatter to get the locale from. + * @param[in] type Type of the locale we're looking for (valid or actual) * * @return The locale name * @@ -644,4 +644,4 @@ const char *i18n_unumber_get_locale_by_type(const i18n_unumber_format_h fmt, i18 * @} */ -#endif /* __UTILS_I18N_UNUMBER_H__*/ +#endif /* __UTILS_I18N_UNUMBER_H__*/ diff --git a/src/include/wearable/utils_i18n_usearch.h b/src/include/wearable/utils_i18n_usearch.h old mode 100755 new mode 100644 index 95ac13a..35b7d03 --- a/src/include/wearable/utils_i18n_usearch.h +++ b/src/include/wearable/utils_i18n_usearch.h @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef __UTILS_I18N_USEARCH_H__ @@ -35,7 +35,7 @@ extern "C" { * @brief The Usearch module provides language-sensitive text searching based on the comparison rules defined in a ucollator data struct. * * @section CAPI_BASE_UTILS_I18N_USEARCH_MODULE_HEADER Required Header - * \#include + * \#include * * @section CAPI_BASE_UTILS_I18N_USEARCH_MODULE_OVERVIEW Overview * @details The Usearch module provides language-sensitive text searching based on the comparison rules defined in a ucollator data struct. @@ -43,35 +43,35 @@ extern "C" { * @section CAPI_BASE_UTILS_I18N_USEARCH_MODULE_SAMPLE_CODE_1 Sample Code 1 * @brief Searches the pattern and gets the matched text. * @code - char *string = "TIZEN"; - char *keyword = "ZE"; - i18n_uchar target[16] = {0,}; - i18n_uchar pattern[16] = {0,}; - i18n_uchar u_matched[16] = {0,}; - char tmp[1] = {0}; - i18n_usearch_h search = NULL; - int pos = 0; - int matched_text_len = 0; - int i = 0; - i18n_error_code_e error_code; - - i18n_ustring_from_UTF8( target, 16, NULL, string, -1, &error_code ); - i18n_ustring_from_UTF8( pattern, 16, NULL, keyword, -1, &error_code ); - - // creates a search - i18n_usearch_create_new( pattern, -1, target, -1, "en_US", NULL, &search ); - - // gets the first index of the target that matches with the pattern - i18n_usearch_first( search, &pos ); - dlog_print(DLOG_INFO, LOG_TAG, "the first index = %d", pos ); // The first index = 2 - - // gets the matched text - i18n_usearch_get_matched_text( search, u_matched, 16, &matched_text_len ); - for ( i = 0; i < matched_text_len; i++) { - i18n_ustring_copy_au_n( tmp, &u_matched[i], 1 ); - dlog_print(DLOG_INFO, LOG_TAG, "u_matched[%d] = %c", i, tmp[0] ); // u_matched[0] = Z, u_matched[1] = E - } - i18n_usearch_destroy( search ); + char *string = "TIZEN"; + char *keyword = "ZE"; + i18n_uchar target[16] = {0,}; + i18n_uchar pattern[16] = {0,}; + i18n_uchar u_matched[16] = {0,}; + char tmp[1] = {0}; + i18n_usearch_h search = NULL; + int pos = 0; + int matched_text_len = 0; + int i = 0; + i18n_error_code_e error_code; + + i18n_ustring_from_UTF8( target, 16, NULL, string, -1, &error_code ); + i18n_ustring_from_UTF8( pattern, 16, NULL, keyword, -1, &error_code ); + + // creates a search + i18n_usearch_create_new( pattern, -1, target, -1, "en_US", NULL, &search ); + + // gets the first index of the target that matches with the pattern + i18n_usearch_first( search, &pos ); + dlog_print(DLOG_INFO, LOG_TAG, "the first index = %d", pos ); // The first index = 2 + + // gets the matched text + i18n_usearch_get_matched_text( search, u_matched, 16, &matched_text_len ); + for ( i = 0; i < matched_text_len; i++) { + i18n_ustring_copy_au_n( tmp, &u_matched[i], 1 ); + dlog_print(DLOG_INFO, LOG_TAG, "u_matched[%d] = %c", i, tmp[0] ); // u_matched[0] = Z, u_matched[1] = E + } + i18n_usearch_destroy( search ); * @endcode */ @@ -102,7 +102,7 @@ extern "C" { * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ int i18n_usearch_create_new(const i18n_uchar *pattern, int32_t pattern_len, const i18n_uchar *text, - int32_t text_len, const char *locale, i18n_ubreak_iterator_h break_iter, i18n_usearch_h *search_iter); + int32_t text_len, const char *locale, i18n_ubreak_iterator_h break_iter, i18n_usearch_h *search_iter); /** * @brief Destroys and cleans up the i18n_usearch_h. @@ -179,4 +179,4 @@ int i18n_usearch_first(i18n_usearch_h search_iter, int32_t *index_first); * @} */ -#endif /* __UTILS_I18N_USEARCH_H__*/ +#endif /* __UTILS_I18N_USEARCH_H__*/ diff --git a/src/include/wearable/utils_i18n_uset.h b/src/include/wearable/utils_i18n_uset.h old mode 100755 new mode 100644 index 8e40c1f..c186efb --- a/src/include/wearable/utils_i18n_uset.h +++ b/src/include/wearable/utils_i18n_uset.h @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * Copyright (C) 1999-2013, International Business Machines Corporation * and others. All Rights Reserved. @@ -39,7 +39,7 @@ extern "C" { * @brief Uset module allows to specify a subset of character used in strings. * * @section CAPI_BASE_UTILS_I18N_USET_MODULE_HEADER Required Header - * \#include + * \#include * * @section CAPI_BASE_UTILS_I18N_USET_MODULE_OVERVIEW Overview * @details Uset module allows to specify a subset of character used in strings. @@ -109,7 +109,7 @@ int i18n_uset_create_pattern(const i18n_uchar *pattern, int32_t pattern_length, * @param[in] pattern_length The length of the pattern, >= 0, or -1 if NULL-terminated * @param[in] options Bitmask for options to apply to the pattern. * Valid options are #I18N_USET_IGNORE_SPACE and #I18N_USET_CASE_INSENSITIVE. - * @param[out] set A pointer to the newly created #i18n_uset_h object. The caller must call i18n_uset_destroy() on + * @param[out] set A pointer to the newly created #i18n_uset_h object. The caller must call i18n_uset_destroy() on * it when done. * * @return Error code. Error codes not listed below are described in #i18n_error_code_e @@ -153,7 +153,7 @@ int i18n_uset_clone(const i18n_uset_h set, i18n_uset_h *set_clone); * @details See the ICU4J Freezable interface for details. * * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * * @since_tizen 2.3.1 * @param[in] set The set. Must not be @c NULL. @@ -229,21 +229,21 @@ int i18n_uset_set(i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end); * A frozen set will not be modified. * * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. + * Error codes are described in Exceptions section and in #i18n_error_code_e description. * * @since_tizen 2.3.1 - * @param[in] set The set to which the pattern is to be applied. Must not be @c NULL. - * @param[in] pattern A pointer to #i18n_uchar string specifying what characters are in the set. - * The character at pattern[0] must be a '['. + * @param[in] set The set to which the pattern is to be applied. Must not be @c NULL. + * @param[in] pattern A pointer to #i18n_uchar string specifying what characters are in the set. + * The character at pattern[0] must be a '['. * @param[in] pattern_length The length of the #i18n_uchar string, >= 0, or -1 if NULL terminated. - * @param[in] options A bitmask for options to apply to the pattern. - * Valid options are #I18N_USET_IGNORE_SPACE and #I18N_USET_CASE_INSENSITIVE. - * @return Upon successful parse, the value is either - * the index of the character after the closing ']' - * of the parsed pattern. - * If the status code indicates failure, then the return value - * is the index of the error in the source. - * If @a set is NULL, 0 is returned. + * @param[in] options A bitmask for options to apply to the pattern. + * Valid options are #I18N_USET_IGNORE_SPACE and #I18N_USET_CASE_INSENSITIVE. + * @return Upon successful parse, the value is either + * the index of the character after the closing ']' + * of the parsed pattern. + * If the status code indicates failure, then the return value + * is the index of the error in the source. + * If @a set is NULL, 0 is returned. * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -252,20 +252,20 @@ int32_t i18n_uset_apply_pattern(i18n_uset_h set, const i18n_uchar *pattern, int3 /** * @brief Modifies the set to contain those code points which have the given value - * for the given binary or enumerated property, as returned by - * i18n_uchar_get_int_property_value(). + * for the given binary or enumerated property, as returned by + * i18n_uchar_get_int_property_value(). * @details Prior contents of this set are lost. - * A frozen set will not be modified. + * A frozen set will not be modified. * * @since_tizen 2.3.1 * @param[in] set The object to contain the code points defined by the property. Must not be @c NULL. * @param[in] prop A property in the range #I18N_UCHAR_INT_START..#I18N_UCHAR_INT_LIMIT-1 - * or #I18N_UCHAR_MASK_START..#I18N_UCHAR_MASK_LIMIT-1. + * or #I18N_UCHAR_MASK_START..#I18N_UCHAR_MASK_LIMIT-1. * @param[in] value A value in the range i18n_uchar_get_int_property_min_value(prop).. - * i18n_uchar_get_int_property_max_value(prop), with one exception. If prop is - * #I18N_UCHAR_GENERAL_CATEGORY_MASK, then value should not be a #i18n_uchar_category_e, but - * rather a mask value produced by I18N_U_GET_GC_MASK(). This allows grouped - * categories such as [:L:] to be represented. + * i18n_uchar_get_int_property_max_value(prop), with one exception. If prop is + * #I18N_UCHAR_GENERAL_CATEGORY_MASK, then value should not be a #i18n_uchar_category_e, but + * rather a mask value produced by I18N_U_GET_GC_MASK(). This allows grouped + * categories such as [:L:] to be represented. * * @return Error code. Error codes not listed below are described in #i18n_error_code_e * @retval #I18N_ERROR_NONE Successful @@ -275,18 +275,18 @@ int i18n_uset_apply_int_property_value(i18n_uset_h set, i18n_uchar_uproperty_e p /** * @brief Modifies the set to contain those code points which have the - * given value for the given property. + * given value for the given property. * @details Prior contents of this set are lost. A frozen set will not be modified. * @since_tizen 2.3.1 * * @param[in] set The object to contain the code points defined by the given - * property and value alias. Must not be @c NULL. + * property and value alias. Must not be @c NULL. * @param[in] prop A string specifying a property alias, either short or long. - * The name is matched loosely. See PropertyAliases.txt for names and a - * description of loose matching. If the value string is empty, then this - * string is interpreted as either a General_Category value alias, a Script - * value alias, a binary property alias, or a special ID. Special IDs are - * matched loosely and correspond to the following sets: + * The name is matched loosely. See PropertyAliases.txt for names and a + * description of loose matching. If the value string is empty, then this + * string is interpreted as either a General_Category value alias, a Script + * value alias, a binary property alias, or a special ID. Special IDs are + * matched loosely and correspond to the following sets: * * "ANY" = [\\u0000-\\U0010FFFF], * "ASCII" = [\\u0000-\\u007F], @@ -294,11 +294,11 @@ int i18n_uset_apply_int_property_value(i18n_uset_h set, i18n_uchar_uproperty_e p * * @param[in] prop_length The length of the @a prop, >= 0, or @c -1 if @c NULL. * @param[in] value A string specifying a value alias, either short or long. - * The name is matched loosely. See PropertyValueAliases.txt for names - * and a description of loose matching. In addition to aliases listed, - * numeric values and canonical combining classes may be expressed - * numerically, e.g., ("nv", "0.5") or ("ccc", "220"). The value string - * may also be empty. + * The name is matched loosely. See PropertyValueAliases.txt for names + * and a description of loose matching. In addition to aliases listed, + * numeric values and canonical combining classes may be expressed + * numerically, e.g., ("nv", "0.5") or ("ccc", "220"). The value string + * may also be empty. * @param[in] value_length The length of the value, >= 0, or -1 if NULL. * * @return Error code. Error codes not listed below are described in #i18n_error_code_e @@ -309,11 +309,11 @@ int i18n_uset_apply_property_alias(i18n_uset_h set, const i18n_uchar *prop, int3 /** * @brief Return true if the given position, in the given pattern, appears - * to be the start of a UnicodeSet pattern. + * to be the start of a UnicodeSet pattern. * @since_tizen 2.3.1 * * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * * @param[in] pattern A string specifying the pattern. * @param[in] pattern_length The length of the pattern, >= 0, or @c -1 if @c NULL. @@ -329,16 +329,16 @@ i18n_ubool i18n_uset_resembles_pattern(const i18n_uchar *pattern, int32_t patter /** * @brief Returns a string representation of the given @a set. * @details If the result of calling this function is passed to an i18n_uset_pattern_create(), - * it will produce another set that is equal to this one. + * it will produce another set that is equal to this one. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. + * Error codes are described in Exceptions section and in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] set The set. Must not be @c NULL. - * @param[in,out] result The string to receive the rules, may be @c NULL. - * @param[in] result_capacity The capacity of @a result, >= 0, may be @c 0 if result is @c NULL. - * @param[in] escape_unprintable If true then convert unprintable character to their hex escape representations, - * \\uxxxx or \\Uxxxxxxxx. Unprintable characters are those other than U+000A, U+0020..U+007E. + * @param[in] set The set. Must not be @c NULL. + * @param[in,out] result The string to receive the rules, may be @c NULL. + * @param[in] result_capacity The capacity of @a result, >= 0, may be @c 0 if result is @c NULL. + * @param[in] escape_unprintable If true then convert unprintable character to their hex escape representations, + * \\uxxxx or \\Uxxxxxxxx. Unprintable characters are those other than U+000A, U+0020..U+007E. * * @return Length of string, >= 0, possibly larger than @a result_capacity. If @a set is NULL, 0 is returned. * @@ -352,11 +352,11 @@ int32_t i18n_uset_to_pattern(const i18n_uset_h set, i18n_uchar *result, int32_t /** * @brief Adds the given character to the given #i18n_uset_h. * @details After this call, i18n_uset_contains(set, character) will return true. - * A frozen set will not be modified. + * A frozen set will not be modified. * @since_tizen 2.3.1 * - * @param[in] set The object to which to add the @a character. Must not be @c NULL. - * @param[in] character The character to add. + * @param[in] set The object to which to add the @a character. Must not be @c NULL. + * @param[in] character The character to add. * * @return Error code. Error codes not listed below are described in #i18n_error_code_e * @retval #I18N_ERROR_NONE Successful @@ -369,11 +369,11 @@ int i18n_uset_add(i18n_uset_h set, i18n_uchar32 character); /** * @brief Adds all of the elements in the specified set to this set if - * they are not already present. + * they are not already present. * @details This operation effectively modifies this set so that its value is the union of the two - * sets. The behavior of this operation is unspecified if the specified - * collection is modified while the operation is in progress. - * A frozen set will not be modified. + * sets. The behavior of this operation is unspecified if the specified + * collection is modified while the operation is in progress. + * A frozen set will not be modified. * * @since_tizen 2.3.1 * @param[in] set The object to which to add the set. Must not be @c NULL. @@ -438,11 +438,11 @@ int i18n_uset_add_all_code_points(i18n_uset_h set, const i18n_uchar *str, int32_ /** * @brief Removes the given @a character from the given #i18n_uset_h. * @details After this call, i18n_uset_contains(set, character) will return @c false. - * A frozen set will not be modified. + * A frozen set will not be modified. * @since_tizen 2.3.1 * - * @param[in] set the object from which to remove the @a character. Must not be @c NULL. - * @param[in] character the character to remove + * @param[in] set the object from which to remove the @a character. Must not be @c NULL. + * @param[in] character the character to remove * * @return Error code. Error codes not listed below are described in #i18n_error_code_e * @retval #I18N_ERROR_NONE Successful @@ -505,7 +505,7 @@ int i18n_uset_remove_all(i18n_uset_h set, const i18n_uset_h remove_set); /** * @brief Retains only the elements in this set that are contained in the specified range. - * @details If start > end then an empty range is retained, leaving the set empty. This is equivalent to + * @details If start > end then an empty range is retained, leaving the set empty. This is equivalent to * a boolean logic AND, or a set INTERSECTION. * A frozen set will not be modified. * @@ -556,7 +556,7 @@ int i18n_uset_retain_all(i18n_uset_h set, const i18n_uset_h retain); int i18n_uset_compact(i18n_uset_h set); /** - * @brief Inverts this set. This operation modifies this set so that + * @brief Inverts this set. This operation modifies this set so that * its value is its complement. * @details This operation does not affect * the multicharacter strings, if any. @@ -652,7 +652,7 @@ int i18n_uset_remove_all_strings(i18n_uset_h set); * strings. * * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * * @since_tizen 2.3.1 * @param[in] set The set. Must not be @c NULL. @@ -667,11 +667,11 @@ i18n_ubool i18n_uset_is_empty(const i18n_uset_h set); * @brief Returns @c true if the given #i18n_uset_h contains the given @a character. * @details This function works faster with a frozen set. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] set the set. Must not be @c NULL. - * @param[in] character the codepoint to check for within the @a set + * @param[in] set the set. Must not be @c NULL. + * @param[in] character the codepoint to check for within the @a set * * @return @c true if @a set contains the given @a character * @@ -685,7 +685,7 @@ i18n_ubool i18n_uset_contains(const i18n_uset_h set, i18n_uchar32 character); * where start <= c && c <= end. * * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * * @since_tizen 2.3.1 * @param[in] set The set. Must not be @c NULL. @@ -703,7 +703,7 @@ i18n_ubool i18n_uset_contains_range(const i18n_uset_h set, i18n_uchar32 start, i * @since_tizen 2.3.1 * * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * * @param[in] set The set. Must not be @c NULL. * @param[in] str The string. @@ -717,15 +717,15 @@ i18n_ubool i18n_uset_contains_string(const i18n_uset_h set, const i18n_uchar *st /** * @brief Returns the index of the given @a character within this @a set, where - * the @a set is ordered by ascending code point. + * the @a set is ordered by ascending code point. * @details If the @a character is not in this @a set, return @c -1. - * The inverse of this function is i18n_uset_char_at(). + * The inverse of this function is i18n_uset_char_at(). * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] set the set. Must not be @c NULL. - * @param[in] character the character to obtain the index for + * @param[in] set the set. Must not be @c NULL. + * @param[in] character the character to obtain the index for * * @return An index from 0..size()-1, or @c -1 * @@ -737,11 +737,11 @@ int32_t i18n_uset_index_of(const i18n_uset_h set, i18n_uchar32 character); /** * @brief Returns the character at the given index within this set, where * the set is ordered by ascending code point. - * @details If the index is out of range, return (i18n_uchar32)-1. The inverse of this function is + * @details If the index is out of range, return (i18n_uchar32)-1. The inverse of this function is * i18n_uset_index_of(). * * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * * @since_tizen 2.3.1 * @param[in] set The set. Must not be @c NULL. @@ -757,7 +757,7 @@ i18n_uchar32 i18n_uset_char_at(const i18n_uset_h set, int32_t char_index); * @brief Returns the number of characters and strings contained in the given #i18n_uset_h. * * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * * @since_tizen 2.3.1 * @param[in] set The set. Must not be @c NULL. @@ -774,7 +774,7 @@ int32_t i18n_uset_size(const i18n_uset_h set); * @details An item is either a range of characters or a single multicharacter string. * * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * * @since_tizen 2.3.1 * @param[in] set The set. Must not be @c NULL. @@ -791,7 +791,7 @@ int32_t i18n_uset_get_item_count(const i18n_uset_h set); * @details An item is either a range of characters or a single multicharacter string. * * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * * @since_tizen 2.3.1 * @param[in] set The set. Must not be @c NULL. @@ -815,7 +815,7 @@ int32_t i18n_uset_get_item(const i18n_uset_h set, int32_t item_index, i18n_uchar * @brief Returns true if set1 contains all the characters and strings of set2. It answers the question, 'Is set1 a superset of set2?' * * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * * @since_tizen 2.3.1 * @param[in] set1 Set to be checked for containment. Must not be @c NULL. @@ -833,7 +833,7 @@ i18n_ubool i18n_uset_contains_all(const i18n_uset_h set1, const i18n_uset_h set2 * clusters, like i18n_uset_contains_string(). * * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * * @since_tizen 2.3.1 * @param[in] set Set of characters to be checked for containment. Must not be @c NULL. @@ -851,7 +851,7 @@ i18n_ubool i18n_uset_contains_all_code_points(const i18n_uset_h set, const i18n_ * @details It answers the question, 'Is set1 a disjoint set of set2?' * * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * * @since_tizen 2.3.1 * @param[in] set1 Set to be checked for containment. Must not be @c NULL. @@ -868,7 +868,7 @@ i18n_ubool i18n_uset_contains_none(const i18n_uset_h set1, const i18n_uset_h set * @details It answers the question, 'Does set1 and set2 have an intersection?' * * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * * @since_tizen 2.3.1 * @param[in] set1 Set to be checked for containment. Must not be @c NULL. @@ -882,25 +882,25 @@ i18n_ubool i18n_uset_contains_some(const i18n_uset_h set1, const i18n_uset_h set /** * @brief Returns the length of the initial substring of the input string which - * consists only of characters and strings that are contained in this set - * (#I18N_USET_SPAN_CONTAINED, #I18N_USET_SPAN_SIMPLE), - * or only of characters and strings that are not contained - * in this set (#I18N_USET_SPAN_NOT_CONTAINED). + * consists only of characters and strings that are contained in this set + * (#I18N_USET_SPAN_CONTAINED, #I18N_USET_SPAN_SIMPLE), + * or only of characters and strings that are not contained + * in this set (#I18N_USET_SPAN_NOT_CONTAINED). * @details See #i18n_uset_span_condition_e for details. - * Similar to the strspn() C library function. - * Unpaired surrogates are treated according to contains() of their surrogate code points. - * This function works faster with a frozen set and with a non-negative string length argument. + * Similar to the strspn() C library function. + * Unpaired surrogates are treated according to contains() of their surrogate code points. + * This function works faster with a frozen set and with a non-negative string length argument. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] set the set. Must not be @c NULL. - * @param[in] str start of the input string. - * @param[in] length length of the @a string; >= 0, can be @c -1 for NULL-terminated - * @param[in] span_condition specifies the containment condition + * @param[in] set the set. Must not be @c NULL. + * @param[in] str start of the input string. + * @param[in] length length of the @a string; >= 0, can be @c -1 for NULL-terminated + * @param[in] span_condition specifies the containment condition * * @return The length of the initial substring according to the @a span_condition; - * @c 0 if the start of the string does not fit the @a span_condition + * @c 0 if the start of the string does not fit the @a span_condition * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -911,24 +911,24 @@ int32_t i18n_uset_span(const i18n_uset_h set, const i18n_uchar *str, int32_t len /** * @brief Returns the start of the trailing substring of the input string which - * consists only of characters and strings that are contained in this set - * (#I18N_USET_SPAN_CONTAINED, #I18N_USET_SPAN_SIMPLE), - * or only of characters and strings that are not contained - * in this set (#I18N_USET_SPAN_NOT_CONTAINED). + * consists only of characters and strings that are contained in this set + * (#I18N_USET_SPAN_CONTAINED, #I18N_USET_SPAN_SIMPLE), + * or only of characters and strings that are not contained + * in this set (#I18N_USET_SPAN_NOT_CONTAINED). * @details See #i18n_uset_span_condition_e for details. - * Unpaired surrogates are treated according to contains() of their surrogate code points. - * This function works faster with a frozen set and with a non-negative string length argument. + * Unpaired surrogates are treated according to contains() of their surrogate code points. + * This function works faster with a frozen set and with a non-negative string length argument. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] set the set. Must not be @c NULL. - * @param[in] str start of the input string - * @param[in] length length of the @ string; >= 0, can be @c -1 for NULL-terminated - * @param[in] span_condition specifies the containment condition + * @param[in] set the set. Must not be @c NULL. + * @param[in] str start of the input string + * @param[in] length length of the @ string; >= 0, can be @c -1 for NULL-terminated + * @param[in] span_condition specifies the containment condition * * @return the start of the trailing substring according to the @a span_condition; - * the string length if the end of the string does not fit the @a span_condition + * the string length if the end of the string does not fit the @a span_condition * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -939,25 +939,25 @@ int32_t i18n_uset_span_back(const i18n_uset_h set, const i18n_uchar *str, int32_ /** * @brief Returns the length of the initial substring of the input string which - * consists only of characters and strings that are contained in this set - * (#I18N_USET_SPAN_CONTAINED, #I18N_USET_SPAN_SIMPLE), - * or only of characters and strings that are not contained - * in this set (#I18N_USET_SPAN_NOT_CONTAINED). + * consists only of characters and strings that are contained in this set + * (#I18N_USET_SPAN_CONTAINED, #I18N_USET_SPAN_SIMPLE), + * or only of characters and strings that are not contained + * in this set (#I18N_USET_SPAN_NOT_CONTAINED). * @details See #i18n_uset_span_condition_e for details. - * Similar to the strspn() C library function. - * Malformed byte sequences are treated according to contains(0xfffd). - * This function works faster with a frozen set and with a non-negative string length argument. + * Similar to the strspn() C library function. + * Malformed byte sequences are treated according to contains(0xfffd). + * This function works faster with a frozen set and with a non-negative string length argument. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] set the set. Must not be @c NULL. - * @param[in] str start of the string (UTF-8) - * @param[in] length length of the string; >= 0, can be @c -1 for NULL-terminated - * @param[in] span_condition specifies the containment condition + * @param[in] set the set. Must not be @c NULL. + * @param[in] str start of the string (UTF-8) + * @param[in] length length of the string; >= 0, can be @c -1 for NULL-terminated + * @param[in] span_condition specifies the containment condition * * @return the length of the initial substring according to the @a span_condition; - * @c 0 if the start of the string does not fit the @a span_condition + * @c 0 if the start of the string does not fit the @a span_condition * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -968,24 +968,24 @@ int32_t i18n_uset_span_utf8(const i18n_uset_h set, const char *str, int32_t leng /** * @brief Returns the start of the trailing substring of the input string which - * consists only of characters and strings that are contained in this set - * (#I18N_USET_SPAN_CONTAINED, #I18N_USET_SPAN_SIMPLE), - * or only of characters and strings that are not contained - * in this set (#I18N_USET_SPAN_NOT_CONTAINED). + * consists only of characters and strings that are contained in this set + * (#I18N_USET_SPAN_CONTAINED, #I18N_USET_SPAN_SIMPLE), + * or only of characters and strings that are not contained + * in this set (#I18N_USET_SPAN_NOT_CONTAINED). * @details See #i18n_uset_span_condition_e for details. - * Malformed byte sequences are treated according to contains(0xfffd). - * This function works faster with a frozen set and with a non-negative string length argument. + * Malformed byte sequences are treated according to contains(0xfffd). + * This function works faster with a frozen set and with a non-negative string length argument. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] set the set. Must not be @c NULL. - * @param[in] str start of the string (UTF-8) - * @param[in] length length of the string; >= 0, can be @c -1 for NULL-terminated - * @param[in] span_condition specifies the containment condition + * @param[in] set the set. Must not be @c NULL. + * @param[in] str start of the string (UTF-8) + * @param[in] length length of the string; >= 0, can be @c -1 for NULL-terminated + * @param[in] span_condition specifies the containment condition * * @return the start of the trailing substring according to the @a span_condition; - * the string length if the end of the string does not fit the @a span_condition + * the string length if the end of the string does not fit the @a span_condition * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -999,7 +999,7 @@ int32_t i18n_uset_span_back_utf8(const i18n_uset_h set, const char *str, int32_t * of set2, and vice versa. It answers the question, 'Is set1 equal to set2?' * * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * * @since_tizen 2.3.1 * @param[in] set1 Set to be checked for containment. Must not be @c NULL. @@ -1018,52 +1018,52 @@ i18n_ubool i18n_uset_equals(const i18n_uset_h set1, const i18n_uset_h set2); /** * @brief Serializes this @a set into an array of 16-bit integers. * @details Serialization (currently) only records the characters in the set; - * multicharacter strings are ignored. - * - * The array has following format (each line is one 16-bit integer): - * - * length = (n+2*m) | (m!=0?0x8000:0) - * bmpLength = n; - * present if m!=0 - * bmp[0] - * bmp[1] - * ... - * bmp[n-1] - * supp-high[0] - * supp-low[0] - * supp-high[1] - * supp-low[1] - * ... - * supp-high[m-1] - * supp-low[m-1] - * - * The array starts with a header. After the header are n bmp - * code points, then m supplementary code points. Either n or m - * or both may be zero. n+2*m is always <= 0x7FFF. - * - * If there are no supplementary characters (if m==0) then the - * header is one 16-bit integer, 'length', with value n. - * - * If there are supplementary characters (if m!=0) then the header - * is two 16-bit integers. The first, 'length', has value - * (n+2*m)|0x8000. The second, 'bmpLength', has value n. - * - * After the header the code points are stored in ascending order. - * Supplementary code points are stored as most significant 16 - * bits followed by least significant 16 bits. + * multicharacter strings are ignored. + * + * The array has following format (each line is one 16-bit integer): + * + * length = (n+2*m) | (m!=0?0x8000:0) + * bmpLength = n; + * present if m!=0 + * bmp[0] + * bmp[1] + * ... + * bmp[n-1] + * supp-high[0] + * supp-low[0] + * supp-high[1] + * supp-low[1] + * ... + * supp-high[m-1] + * supp-low[m-1] + * + * The array starts with a header. After the header are n bmp + * code points, then m supplementary code points. Either n or m + * or both may be zero. n+2*m is always <= 0x7FFF. + * + * If there are no supplementary characters (if m==0) then the + * header is one 16-bit integer, 'length', with value n. + * + * If there are supplementary characters (if m!=0) then the header + * is two 16-bit integers. The first, 'length', has value + * (n+2*m)|0x8000. The second, 'bmpLength', has value n. + * + * After the header the code points are stored in ascending order. + * Supplementary code points are stored as most significant 16 + * bits followed by least significant 16 bits. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. + * Error codes are described in Exceptions section and in #i18n_error_code_e description. * @since_tizen 2.3.1 * - * @param[in] set the set. Must not be @c NULL. - * @param[out] dest pointer to buffer of @a dest_capacity 16-bit integers - * May be NULL only if @a dest_capacity is zero. - * @param[in] dest_capacity size of @a dest, or zero - * Must not be negative. + * @param[in] set the set. Must not be @c NULL. + * @param[out] dest pointer to buffer of @a dest_capacity 16-bit integers + * May be NULL only if @a dest_capacity is zero. + * @param[in] dest_capacity size of @a dest, or zero + * Must not be negative. * * @return the total length of the serialized format, including - * the header, that is, n+2*m+(m != 0 ? 2 : 1), - * or @c 0 on error other than #I18N_ERROR_BUFFER_OVERFLOW. + * the header, that is, n+2*m+(m != 0 ? 2 : 1), + * or @c 0 on error other than #I18N_ERROR_BUFFER_OVERFLOW. * * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -1075,12 +1075,12 @@ int32_t i18n_uset_serialize(const i18n_uset_h set, uint16_t *dest, int32_t dest_ /** * @brief Given a serialized array, fill in the given serialized set object. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] src pointer to start of array. Must not be @c NULL. - * @param[in] src_length length of @a src array, >= 0. - * @param[out] fill_set the serialized set to be filled + * @param[in] src pointer to start of array. Must not be @c NULL. + * @param[in] src_length length of @a src array, >= 0. + * @param[out] fill_set the serialized set to be filled * * @return @c true if the given array is valid, otherwise @c false * @@ -1089,14 +1089,14 @@ int32_t i18n_uset_serialize(const i18n_uset_h set, uint16_t *dest, int32_t dest_ * * @see #i18n_userialized_set_s */ -i18n_ubool i18n_uset_get_serialized_set(const uint16_t *src, int32_t src_length, i18n_userialized_set_s* fill_set); +i18n_ubool i18n_uset_get_serialized_set(const uint16_t *src, int32_t src_length, i18n_userialized_set_s *fill_set); /** * @brief Sets the #i18n_userialized_set_s to contain the given @a character (and nothing else). * @since_tizen 2.3.1 * - * @param[in] character the code point to set - * @param[out] fill_set the serialized set to be filled + * @param[in] character the code point to set + * @param[out] fill_set the serialized set to be filled * * @return Error code. * @retval #I18N_ERROR_NONE Successful @@ -1104,16 +1104,16 @@ i18n_ubool i18n_uset_get_serialized_set(const uint16_t *src, int32_t src_length, * * @see #i18n_userialized_set_s */ -int i18n_uset_set_serialized_to_one(i18n_uchar32 character, i18n_userialized_set_s* fill_set); +int i18n_uset_set_serialized_to_one(i18n_uchar32 character, i18n_userialized_set_s *fill_set); /** * @brief Returns @c true if the given #i18n_userialized_set_s contains the given @a character. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen 2.3.1 * - * @param[in] set the serialized set. Must not be @c NULL. - * @param[in] character the code point to check for within the @a set + * @param[in] set the serialized set. Must not be @c NULL. + * @param[in] character the code point to check for within the @a set * * @return @c true if @a set contains @a character * @@ -1121,7 +1121,7 @@ int i18n_uset_set_serialized_to_one(i18n_uchar32 character, i18n_userialized_set * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see #i18n_userialized_set_s */ -i18n_ubool i18n_uset_serialized_contains(const i18n_userialized_set_s* set, i18n_uchar32 character); +i18n_ubool i18n_uset_serialized_contains(const i18n_userialized_set_s *set, i18n_uchar32 character); /** * @brief Returns the number of disjoint ranges of characters contained in @@ -1129,7 +1129,7 @@ i18n_ubool i18n_uset_serialized_contains(const i18n_userialized_set_s* set, i18n * @details Ignores any strings contained in the set. * * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * * @since_tizen 2.3.1 * @param[in] set The serialized set. Must not be @c NULL. @@ -1139,13 +1139,13 @@ i18n_ubool i18n_uset_serialized_contains(const i18n_userialized_set_s* set, i18n * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see #i18n_userialized_set_s */ -int32_t i18n_uset_get_serialized_range_count(const i18n_userialized_set_s* set); +int32_t i18n_uset_get_serialized_range_count(const i18n_userialized_set_s *set); /** * @brief Returns a range of characters contained in the given serialized set. * * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * * @since_tizen 2.3.1 * @param[in] set The serialized set. Must not be @c NULL. @@ -1161,7 +1161,7 @@ int32_t i18n_uset_get_serialized_range_count(const i18n_userialized_set_s* set); * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see #i18n_userialized_set_s */ -i18n_ubool i18n_uset_get_serialized_range(const i18n_userialized_set_s* set, int32_t range_index, i18n_uchar32 *p_start, i18n_uchar32 *p_end); +i18n_ubool i18n_uset_get_serialized_range(const i18n_userialized_set_s *set, int32_t range_index, i18n_uchar32 *p_start, i18n_uchar32 *p_end); /** * @} diff --git a/src/include/wearable/utils_i18n_ustring.h b/src/include/wearable/utils_i18n_ustring.h old mode 100755 new mode 100644 index 92d5ae0..ce2d838 --- a/src/include/wearable/utils_i18n_ustring.h +++ b/src/include/wearable/utils_i18n_ustring.h @@ -1,20 +1,20 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * Copyright (C) 1998-2012, International Business Machines - * Corporation and others. All Rights Reserved. + * Corporation and others. All Rights Reserved. */ #ifndef __UTILS_I18N_USTRING_H__ @@ -38,7 +38,7 @@ extern "C" { * @brief The Ustring module provides general unicode string handling information. * * @section CAPI_BASE_UTILS_I18N_USTRING_MODULE_HEADER Required Header - * \#include + * \#include * * @section CAPI_BASE_UTILS_I18N_USTRING_MODULE_OVERVIEW Overview * @details The Ustring module provides general unicode string handling information. @@ -46,23 +46,23 @@ extern "C" { * @section CAPI_BASE_UTILS_I18N_USTIRING_MODULE_SAMPLE_CODE_1 Sample Code 1 * @brief It converts a byte string to a unicode string and then to uppercase letters. * @code - char str_1[64] = {0,}; - i18n_uchar uchar_str_1[64] = {0,}; - i18n_uchar uchar_str_2[64] = {0,}; - int uchar_len = 0; - i18n_uerror_code_e err_code = I18N_ERROR_NONE; + char str_1[64] = {0,}; + i18n_uchar uchar_str_1[64] = {0,}; + i18n_uchar uchar_str_2[64] = {0,}; + int uchar_len = 0; + i18n_uerror_code_e err_code = I18N_ERROR_NONE; - strcpy(str_1, "tizen"); - dlog_print(DLOG_INFO, LOG_TAG, "str_1 is %s\n", str_1); // str_1 is tizen + strcpy(str_1, "tizen"); + dlog_print(DLOG_INFO, LOG_TAG, "str_1 is %s\n", str_1); // str_1 is tizen - // converts a byte string to a unicode string - i18n_ustring_copy_ua_n(uchar_str_1, str_1, strlen(str_1)); + // converts a byte string to a unicode string + i18n_ustring_copy_ua_n(uchar_str_1, str_1, strlen(str_1)); - // converts to uppercase letters - i18n_ustring_to_upper(uchar_str_2, 64, uchar_str_1, i18n_ustring_get_length( uchar_str_1 ), "en_US", &err_code); + // converts to uppercase letters + i18n_ustring_to_upper(uchar_str_2, 64, uchar_str_1, i18n_ustring_get_length( uchar_str_1 ), "en_US", &err_code); - i18n_ustring_copy_au(str_1, uchar_str_2); - dlog_print(DLOG_INFO, LOG_TAG, "str_1 is %s\n", str_1); // str_1 is TIZEN + i18n_ustring_copy_au(str_1, uchar_str_2); + dlog_print(DLOG_INFO, LOG_TAG, "str_1 is %s\n", str_1); // str_1 is TIZEN * @endcode */ @@ -74,10 +74,10 @@ extern "C" { /** * @brief Determines the length of an array of #i18n_uchar. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[in] s The array of #i18n_uchar characters, @c NULL (U+0000) terminated. + * @param[in] s The array of #i18n_uchar characters, @c NULL (U+0000) terminated. * * @return The number of #i18n_uchar characters in @c chars, minus the terminator * @exception #I18N_ERROR_NONE Success @@ -88,14 +88,14 @@ int32_t i18n_ustring_get_length(const i18n_uchar *s); /** * @brief Counts Unicode code points in the length #i18n_uchar code units of the string. * @details A code point may occupy either one or two #i18n_uchar code units. - * Counting code points involves reading all code units. + * Counting code points involves reading all code units. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[in] s The input string. - * @param[in] length The number of #i18n_uchar code units to be checked, or @c -1 to count - * all code points before the first NULL (U+0000). + * @param[in] s The input string. + * @param[in] length The number of #i18n_uchar code units to be checked, or @c -1 to count + * all code points before the first NULL (U+0000). * * @return The number of code points in the specified code units. * @exception #I18N_ERROR_NONE Success @@ -106,17 +106,17 @@ int32_t i18n_ustring_count_char32(const i18n_uchar *s, int32_t length); /** * @brief Checks if the string contains more Unicode code points than a certain number. * @details This is more efficient than counting all code points in the entire string and comparing that number with a threshold. - * This function may not need to scan the string at all if the length is known (not @c -1 for NULL-termination) and falls within a certain range, - * and never needs to count more than 'number+1' code points. - * Logically equivalent to ( i18n_ustring_count_char32 (s, length, &number_of_code_points); number_of_code_points > number ). - * A Unicode code point may occupy either one or two #i18n_uchar code units. + * This function may not need to scan the string at all if the length is known (not @c -1 for NULL-termination) and falls within a certain range, + * and never needs to count more than 'number+1' code points. + * Logically equivalent to ( i18n_ustring_count_char32 (s, length, &number_of_code_points); number_of_code_points > number ). + * A Unicode code point may occupy either one or two #i18n_uchar code units. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[in] s The input string. - * @param[in] length The length of the string, or @c -1 if it is NULL-terminated. - * @param[in] number The number of code points in the string is compared against the @a number parameter. + * @param[in] s The input string. + * @param[in] length The length of the string, or @c -1 if it is NULL-terminated. + * @param[in] number The number of code points in the string is compared against the @a number parameter. * * @return Boolean value for whether the string contains more Unicode code points than @a number. Same as ( i18n_ustring_count_char32 (s, length, &number_of_code_points); number_of_code_points > number). * @exception #I18N_ERROR_NONE Success @@ -127,53 +127,53 @@ i18n_ubool i18n_ustring_has_more_char32_than(const i18n_uchar *s, int32_t length /** * @brief Concatenates two ustrings. * @details Appends a copy of @a src, including the NULL terminator, to @a dest. - * The initial copied character from @a src overwrites the NULL terminator in @a dest. + * The initial copied character from @a src overwrites the NULL terminator in @a dest. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[out] dest The destination string. - * @param[in] src The source string. + * @param[out] dest The destination string. + * @param[in] src The source string. * * @return A pointer to @a dest. * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_cat(i18n_uchar *dest, const i18n_uchar *src); +i18n_uchar *i18n_ustring_cat(i18n_uchar *dest, const i18n_uchar *src); /** * @brief Concatenate two ustrings. * @details Appends a copy of @a src, including the NULL terminator, to @a dest. - * The initial copied character from @a src overwrites the NULL terminator in @a dest. + * The initial copied character from @a src overwrites the NULL terminator in @a dest. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[out] dest The destination string. - * @param[in] src The source string. - * @param[in] n The maximum number of characters to append; no-op if <=0. + * @param[out] dest The destination string. + * @param[in] src The source string. + * @param[in] n The maximum number of characters to append; no-op if <=0. * * @return A pointer to @a dest. * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_cat_n(i18n_uchar *dest, const i18n_uchar *src, int32_t n); +i18n_uchar *i18n_ustring_cat_n(i18n_uchar *dest, const i18n_uchar *src, int32_t n); /** * @brief Finds the first occurrence of a substring in a string. * @details The substring is found at code point boundaries. That means that if the substring begins with a trail surrogate - * or ends with a lead surrogate, then it is found only if these surrogates stand alone in the text. - * Otherwise, the substring edge units would be matched against halves of surrogate pairs. + * or ends with a lead surrogate, then it is found only if these surrogates stand alone in the text. + * Otherwise, the substring edge units would be matched against halves of surrogate pairs. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[in] s The string to search (NULL-terminated). - * @param[in] sub_string The substring to find (NULL-terminated). + * @param[in] s The string to search (NULL-terminated). + * @param[in] sub_string The substring to find (NULL-terminated). * * @return A pointer to the first occurrence of @a sub_string in @a s, - * or @a s itself if the @a sub_string is empty, - * or @c NULL if @a sub_string is not in @a s. + * or @a s itself if the @a sub_string is empty, + * or @c NULL if @a sub_string is not in @a s. * * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -182,25 +182,25 @@ i18n_uchar* i18n_ustring_cat_n(i18n_uchar *dest, const i18n_uchar *src, int32_t * @see i18n_ustring_find_first() * @see i18n_ustring_find_last() */ -i18n_uchar* i18n_ustring_string(const i18n_uchar *s, const i18n_uchar *sub_string); +i18n_uchar *i18n_ustring_string(const i18n_uchar *s, const i18n_uchar *sub_string); /** * @brief Finds the first occurrence of a substring in a string. * @details The substring is found at code point boundaries. That means that if the substring begins with a trail surrogate - * or ends with a lead surrogate, then it is found only if these surrogates stand alone in the text. - * Otherwise, the substring edge units would be matched against halves of surrogate pairs. + * or ends with a lead surrogate, then it is found only if these surrogates stand alone in the text. + * Otherwise, the substring edge units would be matched against halves of surrogate pairs. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[in] s The string to search (NULL-terminated). - * @param[in] length The length of @a s (number of #i18n_uchar characters), or @c -1 if it is NULL-terminated. - * @param[in] sub_string The substring to find (NULL-terminated). - * @param[in] sub_length The length of substring (number of #i18n_uchar characters), or @c -1 if it is NULL-terminated. + * @param[in] s The string to search (NULL-terminated). + * @param[in] length The length of @a s (number of #i18n_uchar characters), or @c -1 if it is NULL-terminated. + * @param[in] sub_string The substring to find (NULL-terminated). + * @param[in] sub_length The length of substring (number of #i18n_uchar characters), or @c -1 if it is NULL-terminated. * * @return A pointer to the first occurrence of @a sub_string in @a s, - * or @a s itself if the @a sub_string is empty, - * or @c NULL if @a sub_string is not in @a s. + * or @a s itself if the @a sub_string is empty, + * or @c NULL if @a sub_string is not in @a s. * * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -208,13 +208,13 @@ i18n_uchar* i18n_ustring_string(const i18n_uchar *s, const i18n_uchar *sub_strin * @see i18n_ustring_string() * @see i18n_ustring_find_last() */ -i18n_uchar* i18n_ustring_find_first(const i18n_uchar *s, int32_t length, const i18n_uchar *sub_string, int32_t sub_length); +i18n_uchar *i18n_ustring_find_first(const i18n_uchar *s, int32_t length, const i18n_uchar *sub_string, int32_t sub_length); /** * @brief Finds the first occurrence of a BMP code point in a string. * @details A surrogate code point is found only if its match in the text is not part of a surrogate pair. A NULL character is found at the string terminator. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s The string to search (NULL-terminated). @@ -229,13 +229,13 @@ i18n_uchar* i18n_ustring_find_first(const i18n_uchar *s, int32_t length, const i * @see i18n_ustring_string() * @see i18n_ustring_find_first() */ -i18n_uchar* i18n_ustring_char(const i18n_uchar *s, i18n_uchar c); +i18n_uchar *i18n_ustring_char(const i18n_uchar *s, i18n_uchar c); /** * @brief Finds the first occurrence of a code point in a string. * @details A surrogate code point is found only if its match in the text is not part of a surrogate pair. A NULL character is found at the string terminator. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s The string to search (NULL-terminated). @@ -250,7 +250,7 @@ i18n_uchar* i18n_ustring_char(const i18n_uchar *s, i18n_uchar c); * @see i18n_ustring_string() * @see i18n_ustring_find_first() */ -i18n_uchar* i18n_ustring_char32(const i18n_uchar *s, i18n_uchar32 c); +i18n_uchar *i18n_ustring_char32(const i18n_uchar *s, i18n_uchar32 c); /** * @brief Finds the last occurrence of a substring in a string. @@ -258,7 +258,7 @@ i18n_uchar* i18n_ustring_char32(const i18n_uchar *s, i18n_uchar32 c); * or ends with a lead surrogate, then it is found only if these surrogates stand alone in the text. * Otherwise, the substring edge units would be matched against halves of surrogate pairs. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s The string to search (NULL-terminated). @@ -273,7 +273,7 @@ i18n_uchar* i18n_ustring_char32(const i18n_uchar *s, i18n_uchar32 c); * @see i18n_ustring_find_first() * @see i18n_ustring_find_last() */ -i18n_uchar* i18n_ustring_r_string(const i18n_uchar *s, const i18n_uchar *sub_string); +i18n_uchar *i18n_ustring_r_string(const i18n_uchar *s, const i18n_uchar *sub_string); /** * @brief Finds the last occurrence of a substring in a string. @@ -281,7 +281,7 @@ i18n_uchar* i18n_ustring_r_string(const i18n_uchar *s, const i18n_uchar *sub_str * or ends with a lead surrogate, then it is found only if these surrogates stand alone in the text. * Otherwise, the substring edge units would be matched against halves of surrogate pairs. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s The string to search. @@ -297,13 +297,13 @@ i18n_uchar* i18n_ustring_r_string(const i18n_uchar *s, const i18n_uchar *sub_str * @see i18n_ustring_string() * @see i18n_ustring_find_first() */ -i18n_uchar* i18n_ustring_find_last(const i18n_uchar *s, int32_t length, const i18n_uchar *sub_string, int32_t sub_length); +i18n_uchar *i18n_ustring_find_last(const i18n_uchar *s, int32_t length, const i18n_uchar *sub_string, int32_t sub_length); /** * @brief Finds the last occurrence of a BMP code point in a string. * @details A surrogate code point is found only if its match in the text is not part of a surrogate pair. A NULL character is found at the string terminator. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s The string to search (NULL-terminated). @@ -318,13 +318,13 @@ i18n_uchar* i18n_ustring_find_last(const i18n_uchar *s, int32_t length, const i1 * @see i18n_ustring_string() * @see i18n_ustring_find_first() */ -i18n_uchar* i18n_ustring_r_char(const i18n_uchar *s, i18n_uchar c); +i18n_uchar *i18n_ustring_r_char(const i18n_uchar *s, i18n_uchar c); /** * @brief Finds the last occurrence of a code point in a string. * @details A surrogate code point is found only if its match in the text is not part of a surrogate pair. A NULL character is found at the string terminator. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s The string to search (NULL-terminated). @@ -339,13 +339,13 @@ i18n_uchar* i18n_ustring_r_char(const i18n_uchar *s, i18n_uchar c); * @see i18n_ustring_string() * @see i18n_ustring_find_first() */ -i18n_uchar* i18n_ustring_r_char32(const i18n_uchar *s, i18n_uchar32 c); +i18n_uchar *i18n_ustring_r_char32(const i18n_uchar *s, i18n_uchar32 c); /** * @brief Locates the first occurrence in the string of any of the characters in the string matchSet. * @details Works just like C's strpbrk but with Unicode. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] string The string in which to search, NULL-terminated. @@ -353,16 +353,16 @@ i18n_uchar* i18n_ustring_r_char32(const i18n_uchar *s, i18n_uchar32 c); * * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter - * @return A pointer to the character in @a string that matches one of the + * @return A pointer to the character in @a string that matches one of the * characters in @a match_set, or NULL if no such character is found. */ -i18n_uchar* i18n_ustring_pbrk(const i18n_uchar *string, const i18n_uchar *match_set); +i18n_uchar *i18n_ustring_pbrk(const i18n_uchar *string, const i18n_uchar *match_set); /** * @brief Returns the number of consecutive characters in string, beginning with the first, that do not occur somewhere in match_set. * @details Works just like C's strcspn but with Unicode. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] string The string in which to search, NULL-terminated. @@ -379,7 +379,7 @@ int32_t i18n_ustring_cspn(const i18n_uchar *string, const i18n_uchar *match_set) * @brief Returns the number of consecutive characters in string, beginning with the first, that occur somewhere in match_set. * @details Works just like C's strspn but with Unicode. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] string The string in which to search, NULL-terminated. @@ -396,7 +396,7 @@ int32_t i18n_ustring_spn(const i18n_uchar *string, const i18n_uchar *match_set); * @brief The string tokenizer API allows an application to break a string into tokens. * @details Works just like C's strspn but with Unicode. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] src String containing token(s). This string will be modified. After the first call to #i18n_ustring_tokenizer_r(), this argument must be NULL to get to the next token. @@ -408,12 +408,12 @@ int32_t i18n_ustring_spn(const i18n_uchar *string, const i18n_uchar *match_set); * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_tokenizer_r(i18n_uchar *src, const i18n_uchar *delim, i18n_uchar **save_state); +i18n_uchar *i18n_ustring_tokenizer_r(i18n_uchar *src, const i18n_uchar *delim, i18n_uchar **save_state); /** * @brief Compares two Unicode strings for bitwise equality (code unit order). * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s1 A string to compare. @@ -430,7 +430,7 @@ int32_t i18n_ustring_compare(const i18n_uchar *s1, const i18n_uchar *s2); * @brief Compare two Unicode strings in code point order. * @details See #i18n_ustring_compare() for details. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s1 A string to compare. @@ -451,7 +451,7 @@ int32_t i18n_ustring_compare_code_point_order(const i18n_uchar *s1, const i18n_u * This functions works with strings of different explicitly specified lengths unlike the ANSI C-like #i18n_ustring_compare() and #i18n_ustring_mem_compare() etc. * NULL-terminated strings are possible with length arguments of -1. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s1 First source string. @@ -494,7 +494,7 @@ int32_t i18n_ustring_case_compare_with_length(const i18n_uchar *s1, int32_t leng * @brief Compare two ustrings for bitwise equality. * @details Compares at most n characters. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s1 A string to compare (can be NULL/invalid if n<=0). @@ -512,7 +512,7 @@ int32_t i18n_ustring_compare_n(const i18n_uchar *s1, const i18n_uchar *s2, int32 * @brief Compare two Unicode strings in code point order. * @details This is different in UTF-16 from #i18n_ustring_compare_n() if supplementary characters are present. For details, see #i18n_ustring_compare_binary_order(). * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s1 A string to compare. @@ -529,15 +529,15 @@ int32_t i18n_ustring_compare_n_code_point_order(const i18n_uchar *s1, const i18n /** * @brief Compare two strings case-insensitively using full case folding. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s1 A string to compare. * @param[in] s2 A string to compare. * @param[in] options bit set of options:\n - * - #I18N_USTRING_U_FOLD_CASE_DEFAULT or 0 is used for default options: Comparison in code unit order with default case folding. - * - #I18N_USTRING_U_COMPARE_CODE_POINT_ORDER Set to choose code point order instead of code unit order (see u_strCompare for details). - * - #I18N_USTRING_U_FOLD_CASE_EXCLUDE_SPECIAL_I + * - #I18N_USTRING_U_FOLD_CASE_DEFAULT or 0 is used for default options: Comparison in code unit order with default case folding. + * - #I18N_USTRING_U_COMPARE_CODE_POINT_ORDER Set to choose code point order instead of code unit order (see u_strCompare for details). + * - #I18N_USTRING_U_FOLD_CASE_EXCLUDE_SPECIAL_I * @return A negative, zero, or positive integer indicating the comparison result. * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -547,16 +547,16 @@ int32_t i18n_ustring_case_compare(const i18n_uchar *s1, const i18n_uchar *s2, ui /** * @brief Compare two strings case-insensitively using full case folding. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s1 A string to compare. * @param[in] s2 A string to compare. * @param[in] n The maximum number of characters each string to case-fold and then compare. * @param[in] options A bit set of options:\n - * - #I18N_USTRING_U_FOLD_CASE_DEFAULT or 0 is used for default options: Comparison in code unit order with default case folding. - * - #I18N_USTRING_U_COMPARE_CODE_POINT_ORDER Set to choose code point order instead of code unit order (see u_strCompare for details). - * - #I18N_USTRING_U_FOLD_CASE_EXCLUDE_SPECIAL_I + * - #I18N_USTRING_U_FOLD_CASE_DEFAULT or 0 is used for default options: Comparison in code unit order with default case folding. + * - #I18N_USTRING_U_COMPARE_CODE_POINT_ORDER Set to choose code point order instead of code unit order (see u_strCompare for details). + * - #I18N_USTRING_U_FOLD_CASE_EXCLUDE_SPECIAL_I * @return A negative, zero, or positive integer indicating the comparison result. * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -566,16 +566,16 @@ int32_t i18n_ustring_case_compare_n(const i18n_uchar *s1, const i18n_uchar *s2, /** * @brief Compare two strings case-insensitively using full case folding. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s1 A string to compare. * @param[in] s2 A string to compare. * @param[in] length The number of characters in each string to case-fold and then compare. * @param[in] options A bit set of options:\n - * - #I18N_USTRING_U_FOLD_CASE_DEFAULT or 0 is used for default options: Comparison in code unit order with default case folding. - * - #I18N_USTRING_U_COMPARE_CODE_POINT_ORDER Set to choose code point order instead of code unit order (see u_strCompare for details). - * - #I18N_USTRING_U_FOLD_CASE_EXCLUDE_SPECIAL_I + * - #I18N_USTRING_U_FOLD_CASE_DEFAULT or 0 is used for default options: Comparison in code unit order with default case folding. + * - #I18N_USTRING_U_COMPARE_CODE_POINT_ORDER Set to choose code point order instead of code unit order (see u_strCompare for details). + * - #I18N_USTRING_U_FOLD_CASE_EXCLUDE_SPECIAL_I * @return A negative, zero, or positive integer indicating the comparison result. * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter @@ -585,24 +585,24 @@ int32_t i18n_ustring_mem_case_compare(const i18n_uchar *s1, const i18n_uchar *s2 /** * @brief Copies a ustring. Adds a NULL terminator. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[out] dest The destination string - * @param[in] src The source string + * @param[out] dest The destination string + * @param[in] src The source string * * @return A pointer to @a dest. * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_copy(i18n_uchar *dest, const i18n_uchar *src); +i18n_uchar *i18n_ustring_copy(i18n_uchar *dest, const i18n_uchar *src); /** * @brief Copies a ustring. * @details Copies at most @a n characters. The result will be NULL terminated * if the length of @a src is less than @a n. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest The destination string @@ -613,13 +613,13 @@ i18n_uchar* i18n_ustring_copy(i18n_uchar *dest, const i18n_uchar *src); * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_copy_n(i18n_uchar *dest, const i18n_uchar *src, int32_t n); +i18n_uchar *i18n_ustring_copy_n(i18n_uchar *dest, const i18n_uchar *src, int32_t n); /** * @brief Copies a byte string encoded in the default codepage to a ustring. * @details Adds a NULL terminator. Performs a host byte to #i18n_uchar conversion. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest The destination string @@ -629,15 +629,15 @@ i18n_uchar* i18n_ustring_copy_n(i18n_uchar *dest, const i18n_uchar *src, int32_t * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_copy_ua(i18n_uchar *dest, const char *src); +i18n_uchar *i18n_ustring_copy_ua(i18n_uchar *dest, const char *src); /** * @brief Copies a byte string encoded in the default codepage to a ustring. - * @details Copies at most @a n characters. The result will be NULL terminated + * @details Copies at most @a n characters. The result will be NULL terminated * if the length of @a src is less than @a n. * Performs a host byte to #i18n_uchar conversion. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest The destination string @@ -648,13 +648,13 @@ i18n_uchar* i18n_ustring_copy_ua(i18n_uchar *dest, const char *src); * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_copy_ua_n(i18n_uchar *dest, const char *src, int32_t n); +i18n_uchar *i18n_ustring_copy_ua_n(i18n_uchar *dest, const char *src, int32_t n); /** * @brief Copies a ustring to a byte string encoded in the default codepage. * @details Adds a NULL terminator. Performs an #i18n_uchar to host byte conversion. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest The destination string @@ -664,15 +664,15 @@ i18n_uchar* i18n_ustring_copy_ua_n(i18n_uchar *dest, const char *src, int32_t n) * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -char* i18n_ustring_copy_au(char *dest, const i18n_uchar *src); +char *i18n_ustring_copy_au(char *dest, const i18n_uchar *src); /** * @brief Copies a ustring to a byte string encoded in the default codepage. - * @details Copies at most @a n characters. The result will be NULL terminated + * @details Copies at most @a n characters. The result will be NULL terminated * if the length of @a src is less than @a n. * Performs an #i18n_uchar to host byte conversion. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest The destination string @@ -683,12 +683,12 @@ char* i18n_ustring_copy_au(char *dest, const i18n_uchar *src); * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -char* i18n_ustring_copy_au_n(char *dest, const i18n_uchar *src, int32_t n); +char *i18n_ustring_copy_au_n(char *dest, const i18n_uchar *src, int32_t n); /** * @brief Synonym for memcpy(), but with #i18n_uchar characters only. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest The destination string @@ -699,12 +699,12 @@ char* i18n_ustring_copy_au_n(char *dest, const i18n_uchar *src, int32_t n); * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_mem_copy(i18n_uchar *dest, const i18n_uchar *src, int32_t count); +i18n_uchar *i18n_ustring_mem_copy(i18n_uchar *dest, const i18n_uchar *src, int32_t count); /** * @brief Synonym for memmove(), but with #i18n_uchar characters only. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest The destination string @@ -715,12 +715,12 @@ i18n_uchar* i18n_ustring_mem_copy(i18n_uchar *dest, const i18n_uchar *src, int32 * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_mem_move(i18n_uchar *dest, const i18n_uchar *src, int32_t count); +i18n_uchar *i18n_ustring_mem_move(i18n_uchar *dest, const i18n_uchar *src, int32_t count); /** * @brief Initialize count characters of dest to c. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest The destination string @@ -731,12 +731,12 @@ i18n_uchar* i18n_ustring_mem_move(i18n_uchar *dest, const i18n_uchar *src, int32 * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_mem_set(i18n_uchar *dest, const i18n_uchar c, int32_t count); +i18n_uchar *i18n_ustring_mem_set(i18n_uchar *dest, const i18n_uchar c, int32_t count); /** * @brief Compare the first count #i18n_uchar characters of each buffer. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] buf1 The first string to compare. @@ -754,7 +754,7 @@ int32_t i18n_ustring_mem_compare(const i18n_uchar *buf1, const i18n_uchar *buf2, * @brief Compare two Unicode strings in code point order. * @details This is different in UTF-16 from #i18n_ustring_mem_compare() if supplementary characters are present. For details, see #i18n_ustring_compare_binary_order(). * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s1 A string to compare. @@ -772,7 +772,7 @@ int32_t i18n_ustring_mem_compare_code_point_order(const i18n_uchar *s1, const i1 * @brief Finds the first occurrence of a BMP code point in a string. * @details A surrogate code point is found only if its match in the text is not part of a surrogate pair. A NULL character is found at the string terminator. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s The string to search (contains count #i18n_uchar characters). @@ -786,13 +786,13 @@ int32_t i18n_ustring_mem_compare_code_point_order(const i18n_uchar *s1, const i1 * @see i18n_ustring_mem_char32() * @see i18n_ustring_find_first() */ -i18n_uchar* i18n_ustring_mem_char(const i18n_uchar *s, i18n_uchar c, int32_t count); +i18n_uchar *i18n_ustring_mem_char(const i18n_uchar *s, i18n_uchar c, int32_t count); /** * @brief Finds the first occurrence of a code point in a string. * @details A surrogate code point is found only if its match in the text is not part of a surrogate pair. A NULL character is found at the string terminator. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s The string to search (contains count #i18n_uchar characters). @@ -803,13 +803,13 @@ i18n_uchar* i18n_ustring_mem_char(const i18n_uchar *s, i18n_uchar c, int32_t cou * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_mem_char32(const i18n_uchar *s, i18n_uchar32 c, int32_t count); +i18n_uchar *i18n_ustring_mem_char32(const i18n_uchar *s, i18n_uchar32 c, int32_t count); /** * @brief Finds the last occurrence of a BMP code point in a string. * @details A surrogate code point is found only if its match in the text is not part of a surrogate pair. A NULL character is found at the string terminator. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s The string to search (contains count #i18n_uchar characters). @@ -823,13 +823,13 @@ i18n_uchar* i18n_ustring_mem_char32(const i18n_uchar *s, i18n_uchar32 c, int32_t * @see #i18n_ustring_mem_r_char32 * @see #i18n_ustring_find_last */ -i18n_uchar* i18n_ustring_mem_r_char(const i18n_uchar *s, i18n_uchar c, int32_t count); +i18n_uchar *i18n_ustring_mem_r_char(const i18n_uchar *s, i18n_uchar c, int32_t count); /** * @brief Finds the last occurrence of a code point in a string. * @details A surrogate code point is found only if its match in the text is not part of a surrogate pair. A NULL character is found at the string terminator. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s The string to search (contains count #i18n_uchar characters). @@ -843,7 +843,7 @@ i18n_uchar* i18n_ustring_mem_r_char(const i18n_uchar *s, i18n_uchar c, int32_t c * @see #i18n_ustring_mem_r_char * @see #i18n_ustring_find_last */ -i18n_uchar* i18n_ustring_mem_r_char32(const i18n_uchar *s, i18n_uchar32 c, int32_t count); +i18n_uchar *i18n_ustring_mem_r_char32(const i18n_uchar *s, i18n_uchar32 c, int32_t count); /** * @brief Unescape a string of characters and write the resulting Unicode characters to the destination buffer. @@ -854,7 +854,7 @@ i18n_uchar* i18n_ustring_mem_r_char32(const i18n_uchar *s, i18n_uchar32 c, int32 * Anything else following a backslash is generically escaped. For example, "[a\-z]" returns "[a-z]".\n * If an escape sequence is ill-formed, this method returns an empty string. An example of an ill-formed sequence is "\\u" followed by fewer than 4 hex digits. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] src a zero-terminated string of invariant characters @@ -875,7 +875,7 @@ int32_t i18n_ustring_unescape(const char *src, i18n_uchar *dest, int32_t dest_ca * If offset is out of range, or if the escape sequence is ill-formed, (i18n_uchar32)0xFFFFFFFF is returned. * See documentation of #i18n_ustring_unescape() for a list of recognized sequences. * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. + * Error codes are described in Exceptions section. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] char_at callback function that returns a #i18n_uchar of the source text given an offset and a context pointer. @@ -966,7 +966,7 @@ int32_t i18n_ustring_to_lower(i18n_uchar *dest, int32_t dest_capacity, const i18 * If it is @c 0, then @a dest may be @c NULL and the function will only return the length of the result * without writing any of the result string. * @param[in] src The original string - * @param[in] src_len The length of the original string.\n If @c -1, then @a src must be zero-terminated. + * @param[in] src_len The length of the original string.\n If @c -1, then @a src must be zero-terminated. * @param[in] title_iter A break iterator to find the first characters of words * that are to be titlecased.\n * If none are provided (@c NULL), then a standard titlecase @@ -994,7 +994,7 @@ int32_t i18n_ustring_to_title_new(i18n_uchar *dest, int32_t dest_capacity, const * If it is @c 0, then @a dest may be @c NULL and the function will only return the length of the result * without writing any of the result string. * @param[in] src The original string - * @param[in] src_len The length of the original string.\n If @c -1, then @a src must be zero-terminated. + * @param[in] src_len The length of the original string.\n If @c -1, then @a src must be zero-terminated. * @param[in] options Either #I18N_USTRING_U_FOLD_CASE_DEFAULT or #I18N_USTRING_U_FOLD_CASE_EXCLUDE_SPECIAL_I * @param[out] error_code Must be a valid pointer to an error code value, * which must not indicate a failure before the function call. @@ -1018,14 +1018,14 @@ int32_t i18n_ustring_fold_case(i18n_uchar *dest, int32_t dest_capacity, const i1 * @param[out] dest_len A pointer to receive the number of units written to the destination.\n * If dest_len!=NULL then *dest_len is always set to the number of output units corresponding to the transformation of all the input units, even in case of a buffer overflow. * @param[in] src The original source string. - * @param[in] src_len The length of the original string.\n If @c -1, then @a src must be zero-terminated. + * @param[in] src_len The length of the original string.\n If @c -1, then @a src must be zero-terminated. * @param[out] error_code Must be a valid pointer to an error code value, * which must not indicate a failure before the function call. * @return The pointer to destination buffer. * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -wchar_t* i18n_ustring_to_WCS(wchar_t *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_error_code_e *error_code); +wchar_t *i18n_ustring_to_WCS(wchar_t *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_error_code_e *error_code); /** * @brief Convert a wchar_t string to UTF-16. @@ -1040,14 +1040,14 @@ wchar_t* i18n_ustring_to_WCS(wchar_t *dest, int32_t dest_capacity, int32_t *dest * @param[out] dest_len A pointer to receive the number of units written to the destination.\n * If dest_len!=NULL then *dest_len is always set to the number of output units corresponding to the transformation of all the input units, even in case of a buffer overflow. * @param[in] src The original source string. - * @param[in] src_len The length of the original string.\n If @c -1, then @a src must be zero-terminated. + * @param[in] src_len The length of the original string.\n If @c -1, then @a src must be zero-terminated. * @param[out] error_code Must be a valid pointer to an error code value, * which must not indicate a failure before the function call. * @return The pointer to destination buffer. * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_from_WCS(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const wchar_t *src, int32_t src_len, i18n_error_code_e *error_code); +i18n_uchar *i18n_ustring_from_WCS(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const wchar_t *src, int32_t src_len, i18n_error_code_e *error_code); /** * @brief Converts a UTF-16 string to UTF-8. @@ -1056,7 +1056,7 @@ i18n_uchar* i18n_ustring_from_WCS(i18n_uchar *dest, int32_t dest_capacity, int32 * * @param[out] dest A buffer for the result string.\n * The result will be zero-terminated if the buffer is large enough. - * @param[in] dest_capacity The size of the buffer (number of chars)\n + * @param[in] dest_capacity The size of the buffer (number of chars)\n * If it is @c 0, then @a dest may be @c NULL and the function will only return the length of the * result without writing any of the result string (pre-flighting). * @param[out] dest_len A pointer to receive the number of units written to the destination.\n @@ -1073,7 +1073,7 @@ i18n_uchar* i18n_ustring_from_WCS(i18n_uchar *dest, int32_t dest_capacity, int32 * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ustring_from_UTF8() */ -char* i18n_ustring_to_UTF8(char *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_error_code_e *error_code); +char *i18n_ustring_to_UTF8(char *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_error_code_e *error_code); /** * @brief Converts a UTF-8 string to UTF-16. @@ -1082,7 +1082,7 @@ char* i18n_ustring_to_UTF8(char *dest, int32_t dest_capacity, int32_t *dest_len, * * @param[out] dest A buffer for the result string.\n * The result will be zero-terminated if the buffer is large enough. - * @param[in] dest_capacity The size of the buffer (number of #i18n_uchar characters)\n + * @param[in] dest_capacity The size of the buffer (number of #i18n_uchar characters)\n * If it is @c 0, then @a dest may be @c NULL and the function will only return the length of the * result without writing any of the result string (pre-flighting). * @param[out] dest_len A pointer to receive the number of units written to the destination.\n @@ -1098,7 +1098,7 @@ char* i18n_ustring_to_UTF8(char *dest, int32_t dest_capacity, int32_t *dest_len, * @exception #I18N_ERROR_NONE Success * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ -i18n_uchar* i18n_ustring_from_UTF8(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const char *src, int32_t src_len, i18n_error_code_e *error_code); +i18n_uchar *i18n_ustring_from_UTF8(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const char *src, int32_t src_len, i18n_error_code_e *error_code); /** * @brief Convert a UTF-16 string to UTF-8. @@ -1107,7 +1107,7 @@ i18n_uchar* i18n_ustring_from_UTF8(i18n_uchar *dest, int32_t dest_capacity, int3 * * @param[out] dest A buffer for the result string.\n * The result will be zero-terminated if the buffer is large enough. - * @param[in] dest_capacity The size of the buffer (number of chars)\n + * @param[in] dest_capacity The size of the buffer (number of chars)\n * If it is @c 0, then @a dest may be @c NULL and the function will only return the length of the * result without writing any of the result string (pre-flighting). * @param[out] dest_len A pointer to receive the number of units written to the destination.\n @@ -1129,7 +1129,7 @@ i18n_uchar* i18n_ustring_from_UTF8(i18n_uchar *dest, int32_t dest_capacity, int3 * @see i18n_ustring_to_UTF8() * @see i18n_ustring_from_UTF8_with_sub() */ -char* i18n_ustring_to_UTF8_with_sub(char *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_uchar32 sub_char, int32_t *num_substitutions, i18n_error_code_e *error_code); +char *i18n_ustring_to_UTF8_with_sub(char *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_uchar32 sub_char, int32_t *num_substitutions, i18n_error_code_e *error_code); /** * @brief Convert a UTF-8 string to UTF-16. @@ -1137,7 +1137,7 @@ char* i18n_ustring_to_UTF8_with_sub(char *dest, int32_t dest_capacity, int32_t * * * @param[out] dest A buffer for the result string.\n * The result will be zero-terminated if the buffer is large enough. - * @param[in] dest_capacity The size of the buffer (number of #i18n_uchar characters)\n + * @param[in] dest_capacity The size of the buffer (number of #i18n_uchar characters)\n * If it is @c 0, then @a dest may be @c NULL and the function will only return the length of the * result without writing any of the result string (pre-flighting). * @param[out] dest_len A pointer to receive the number of units written to the destination.\n @@ -1160,8 +1160,8 @@ char* i18n_ustring_to_UTF8_with_sub(char *dest, int32_t dest_capacity, int32_t * * @see i18n_ustring_from_UTF8_lenient() * @see i18n_ustring_to_UTF8_with_sub() */ -i18n_uchar* i18n_ustring_from_UTF8_with_sub(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const char *src, int32_t src_len, i18n_uchar32 sub_char, - int32_t *num_substitutions, i18n_error_code_e *error_code); +i18n_uchar *i18n_ustring_from_UTF8_with_sub(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const char *src, int32_t src_len, i18n_uchar32 sub_char, + int32_t *num_substitutions, i18n_error_code_e *error_code); /** * @brief Convert a UTF-8 string to UTF-16. @@ -1178,7 +1178,7 @@ i18n_uchar* i18n_ustring_from_UTF8_with_sub(i18n_uchar *dest, int32_t dest_capac * * @param[out] dest A buffer for the result string.\n * The result will be zero-terminated if the buffer is large enough. - * @param[in] dest_capacity The size of the buffer (number of #i18n_uchar characters)\n + * @param[in] dest_capacity The size of the buffer (number of #i18n_uchar characters)\n * If it is @c 0, then @a dest may be @c NULL and the function will only return the length of the * result without writing any of the result string (pre-flighting). * Unlike for other I18N functions, if src_len>=0 then it must be dest_capacity>=src_len. @@ -1199,7 +1199,7 @@ i18n_uchar* i18n_ustring_from_UTF8_with_sub(i18n_uchar *dest, int32_t dest_capac * @see i18n_ustring_to_UTF8_with_sub() * @see i18n_ustring_from_UTF8_with_sub() */ -i18n_uchar* i18n_ustring_from_UTF8_lenient(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const char *src, int32_t src_len, i18n_error_code_e *error_code); +i18n_uchar *i18n_ustring_from_UTF8_lenient(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const char *src, int32_t src_len, i18n_error_code_e *error_code); /** * @brief Convert a UTF-16 string to UTF-32. @@ -1208,7 +1208,7 @@ i18n_uchar* i18n_ustring_from_UTF8_lenient(i18n_uchar *dest, int32_t dest_capaci * * @param[out] dest A buffer for the result string.\n * The result will be zero-terminated if the buffer is large enough. - * @param[in] dest_capacity The size of the buffer (number of #i18n_uchar32 characters)\n + * @param[in] dest_capacity The size of the buffer (number of #i18n_uchar32 characters)\n * If it is @c 0, then @a dest may be @c NULL and the function will only return the length of the * result without writing any of the result string (pre-flighting). * @param[out] dest_len A pointer to receive the number of units written to the destination.\n @@ -1225,7 +1225,7 @@ i18n_uchar* i18n_ustring_from_UTF8_lenient(i18n_uchar *dest, int32_t dest_capaci * @see i18n_ustring_to_UTF32_with_sub() * @see i18n_ustring_from_UTF32() */ -i18n_uchar32* i18n_ustring_to_UTF32(i18n_uchar32 *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_error_code_e *error_code); +i18n_uchar32 *i18n_ustring_to_UTF32(i18n_uchar32 *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_error_code_e *error_code); /** * @brief Convert a UTF-32 string to UTF-16. @@ -1234,7 +1234,7 @@ i18n_uchar32* i18n_ustring_to_UTF32(i18n_uchar32 *dest, int32_t dest_capacity, i * * @param[out] dest A buffer for the result string.\n * The result will be zero-terminated if the buffer is large enough. - * @param[in] dest_capacity The size of the buffer (number of #i18n_uchar characters)\n + * @param[in] dest_capacity The size of the buffer (number of #i18n_uchar characters)\n * If it is @c 0, then @a dest may be @c NULL and the function will only return the length of the * result without writing any of the result string (pre-flighting). * @param[out] dest_len A pointer to receive the number of units written to the destination.\n @@ -1251,7 +1251,7 @@ i18n_uchar32* i18n_ustring_to_UTF32(i18n_uchar32 *dest, int32_t dest_capacity, i * @see i18n_ustring_from_UTF32_with_sub() * @see i18n_ustring_to_UTF32() */ -i18n_uchar* i18n_ustring_from_UTF32(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar32 *src, int32_t src_len, i18n_error_code_e *error_code); +i18n_uchar *i18n_ustring_from_UTF32(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar32 *src, int32_t src_len, i18n_error_code_e *error_code); /** * @brief Convert a UTF-16 string to UTF-32. @@ -1260,7 +1260,7 @@ i18n_uchar* i18n_ustring_from_UTF32(i18n_uchar *dest, int32_t dest_capacity, int * * @param[out] dest A buffer for the result string.\n * The result will be zero-terminated if the buffer is large enough. - * @param[in] dest_capacity The size of the buffer (number of i18n_char32s)\n + * @param[in] dest_capacity The size of the buffer (number of i18n_char32s)\n * If it is @c 0, then @a dest may be @c NULL and the function will only return the length of the * result without writing any of the result string (pre-flighting). * @param[out] dest_len A pointer to receive the number of units written to the destination.\n @@ -1281,8 +1281,8 @@ i18n_uchar* i18n_ustring_from_UTF32(i18n_uchar *dest, int32_t dest_capacity, int * @see i18n_ustring_to_UTF32() * @see i18n_ustring_from_UTF32_with_sub() */ -i18n_uchar32* i18n_ustring_to_UTF32_with_sub(i18n_uchar32 *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, - i18n_uchar32 sub_char, int32_t *num_substitutions, i18n_error_code_e *error_code); +i18n_uchar32 *i18n_ustring_to_UTF32_with_sub(i18n_uchar32 *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, + i18n_uchar32 sub_char, int32_t *num_substitutions, i18n_error_code_e *error_code); /** * @brief Convert a UTF-32 string to UTF-16. @@ -1291,7 +1291,7 @@ i18n_uchar32* i18n_ustring_to_UTF32_with_sub(i18n_uchar32 *dest, int32_t dest_ca * * @param[out] dest A buffer for the result string.\n * The result will be zero-terminated if the buffer is large enough. - * @param[in] dest_capacity The size of the buffer (number of i18n_chars)\n + * @param[in] dest_capacity The size of the buffer (number of i18n_chars)\n * If it is @c 0, then @a dest may be @c NULL and the function will only return the length of the * result without writing any of the result string (pre-flighting). * @param[out] dest_len A pointer to receive the number of units written to the destination.\n @@ -1313,7 +1313,7 @@ i18n_uchar32* i18n_ustring_to_UTF32_with_sub(i18n_uchar32 *dest, int32_t dest_ca * @see i18n_ustring_from_UTF32() * @see i18n_ustring_to_UTF32_with_sub() */ -i18n_uchar* i18n_ustring_from_UTF32_with_sub(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar32 *src, int32_t src_len, i18n_uchar32 sub_char, int32_t *num_substitutions, i18n_error_code_e *error_code); +i18n_uchar *i18n_ustring_from_UTF32_with_sub(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar32 *src, int32_t src_len, i18n_uchar32 sub_char, int32_t *num_substitutions, i18n_error_code_e *error_code); #ifdef __cplusplus } @@ -1323,4 +1323,4 @@ i18n_uchar* i18n_ustring_from_UTF32_with_sub(i18n_uchar *dest, int32_t dest_capa * @} * @} */ -#endif /* __UTILS_I18N_USTRING_H__*/ +#endif /* __UTILS_I18N_USTRING_H__*/ diff --git a/src/utils_i18n_private.c b/src/utils_i18n_private.c old mode 100755 new mode 100644 index 1df4b56..17d0a08 --- a/src/utils_i18n_private.c +++ b/src/utils_i18n_private.c @@ -1,247 +1,247 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include int _i18n_error_mapping(int err) { - if (err == U_STRING_NOT_TERMINATED_WARNING) - return I18N_WARNING_STRING_NOT_TERMINATED; - else if (err == U_SORT_KEY_TOO_SHORT_WARNING) - return I18N_WARNING_SORT_KEY_TOO_SHORT; - else if (err <= U_ZERO_ERROR) - return I18N_ERROR_NONE; + if (err == U_STRING_NOT_TERMINATED_WARNING) + return I18N_WARNING_STRING_NOT_TERMINATED; + else if (err == U_SORT_KEY_TOO_SHORT_WARNING) + return I18N_WARNING_SORT_KEY_TOO_SHORT; + else if (err <= U_ZERO_ERROR) + return I18N_ERROR_NONE; - switch (err) { - case U_ILLEGAL_ARGUMENT_ERROR: - return I18N_ERROR_INVALID_PARAMETER; + switch (err) { + case U_ILLEGAL_ARGUMENT_ERROR: + return I18N_ERROR_INVALID_PARAMETER; - case U_MISSING_RESOURCE_ERROR: - return I18N_ERROR_MISSING_RESOURCE; + case U_MISSING_RESOURCE_ERROR: + return I18N_ERROR_MISSING_RESOURCE; - case U_INVALID_FORMAT_ERROR: - return I18N_ERROR_INVALID_FORMAT; + case U_INVALID_FORMAT_ERROR: + return I18N_ERROR_INVALID_FORMAT; - case U_FILE_ACCESS_ERROR: - return I18N_ERROR_FILE_ACCESS; + case U_FILE_ACCESS_ERROR: + return I18N_ERROR_FILE_ACCESS; - case U_INTERNAL_PROGRAM_ERROR: - return I18N_ERROR_INTERNAL_PROGRAM; + case U_INTERNAL_PROGRAM_ERROR: + return I18N_ERROR_INTERNAL_PROGRAM; - case U_MESSAGE_PARSE_ERROR: - return I18N_ERROR_MESSAGE_PARSE; + case U_MESSAGE_PARSE_ERROR: + return I18N_ERROR_MESSAGE_PARSE; - case U_MEMORY_ALLOCATION_ERROR: - return I18N_ERROR_OUT_OF_MEMORY; + case U_MEMORY_ALLOCATION_ERROR: + return I18N_ERROR_OUT_OF_MEMORY; - case U_INDEX_OUTOFBOUNDS_ERROR: - return I18N_ERROR_INDEX_OUTOFBOUNDS; + case U_INDEX_OUTOFBOUNDS_ERROR: + return I18N_ERROR_INDEX_OUTOFBOUNDS; - case U_PARSE_ERROR: - return I18N_ERROR_PARSE; + case U_PARSE_ERROR: + return I18N_ERROR_PARSE; - case U_INVALID_CHAR_FOUND: - return I18N_ERROR_INVALID_CHAR_FOUND; + case U_INVALID_CHAR_FOUND: + return I18N_ERROR_INVALID_CHAR_FOUND; - case U_TRUNCATED_CHAR_FOUND: - return I18N_ERROR_TRUNCATED_CHAR_FOUND; + case U_TRUNCATED_CHAR_FOUND: + return I18N_ERROR_TRUNCATED_CHAR_FOUND; - case U_ILLEGAL_CHAR_FOUND: - return I18N_ERROR_ILLEGAL_CHAR_FOUND; + case U_ILLEGAL_CHAR_FOUND: + return I18N_ERROR_ILLEGAL_CHAR_FOUND; - case U_INVALID_TABLE_FORMAT: - return I18N_ERROR_INVALID_TABLE_FORMAT; + case U_INVALID_TABLE_FORMAT: + return I18N_ERROR_INVALID_TABLE_FORMAT; - case U_INVALID_TABLE_FILE: - return I18N_ERROR_INVALID_TABLE_FILE; + case U_INVALID_TABLE_FILE: + return I18N_ERROR_INVALID_TABLE_FILE; - case U_BUFFER_OVERFLOW_ERROR: - return I18N_ERROR_BUFFER_OVERFLOW; + case U_BUFFER_OVERFLOW_ERROR: + return I18N_ERROR_BUFFER_OVERFLOW; - case U_UNSUPPORTED_ERROR: - return I18N_ERROR_NOT_SUPPORTED; + case U_UNSUPPORTED_ERROR: + return I18N_ERROR_NOT_SUPPORTED; - case U_RESOURCE_TYPE_MISMATCH: - return I18N_ERROR_RESOURCE_TYPE_MISMATCH; + case U_RESOURCE_TYPE_MISMATCH: + return I18N_ERROR_RESOURCE_TYPE_MISMATCH; - case U_ILLEGAL_ESCAPE_SEQUENCE: - return I18N_ERROR_ILLECAL_ESCAPE_SEQUENCE; + case U_ILLEGAL_ESCAPE_SEQUENCE: + return I18N_ERROR_ILLECAL_ESCAPE_SEQUENCE; - case U_UNSUPPORTED_ESCAPE_SEQUENCE: - return I18N_ERROR_UNSUPPORTED_ESCAPE_SEQUENCE; + case U_UNSUPPORTED_ESCAPE_SEQUENCE: + return I18N_ERROR_UNSUPPORTED_ESCAPE_SEQUENCE; - case U_NO_SPACE_AVAILABLE: - return I18N_ERROR_NO_SPACE_AVAILABLE; + case U_NO_SPACE_AVAILABLE: + return I18N_ERROR_NO_SPACE_AVAILABLE; - case U_CE_NOT_FOUND_ERROR: - return I18N_ERROR_CE_NOT_FOUND; + case U_CE_NOT_FOUND_ERROR: + return I18N_ERROR_CE_NOT_FOUND; - case U_PRIMARY_TOO_LONG_ERROR: - return I18N_ERROR_PRIMARY_TOO_LONG; + case U_PRIMARY_TOO_LONG_ERROR: + return I18N_ERROR_PRIMARY_TOO_LONG; - case U_STATE_TOO_OLD_ERROR: - return I18N_ERROR_STATE_TOO_OLD; + case U_STATE_TOO_OLD_ERROR: + return I18N_ERROR_STATE_TOO_OLD; - case U_TOO_MANY_ALIASES_ERROR: - return I18N_ERROR_TOO_MANY_ALIASES; + case U_TOO_MANY_ALIASES_ERROR: + return I18N_ERROR_TOO_MANY_ALIASES; - case U_ENUM_OUT_OF_SYNC_ERROR: - return I18N_ERROR_ENUM_OUT_OF_SYNC; + case U_ENUM_OUT_OF_SYNC_ERROR: + return I18N_ERROR_ENUM_OUT_OF_SYNC; - case U_INVARIANT_CONVERSION_ERROR: - return I18N_ERROR_INVARIANT_CONVERSION; + case U_INVARIANT_CONVERSION_ERROR: + return I18N_ERROR_INVARIANT_CONVERSION; - case U_INVALID_STATE_ERROR: - return I18N_ERROR_INVALID_STATE; + case U_INVALID_STATE_ERROR: + return I18N_ERROR_INVALID_STATE; - case U_COLLATOR_VERSION_MISMATCH: - return I18N_ERROR_COLLATOR_VERSION_MISMATCH; + case U_COLLATOR_VERSION_MISMATCH: + return I18N_ERROR_COLLATOR_VERSION_MISMATCH; - case U_USELESS_COLLATOR_ERROR: - return I18N_ERROR_USELESS_COLLATOR; + case U_USELESS_COLLATOR_ERROR: + return I18N_ERROR_USELESS_COLLATOR; - case U_NO_WRITE_PERMISSION: - return I18N_ERROR_NO_WRITE_PERMISSION; + case U_NO_WRITE_PERMISSION: + return I18N_ERROR_NO_WRITE_PERMISSION; - case U_MALFORMED_SET: - return I18N_ERROR_MALFORMED_SET; + case U_MALFORMED_SET: + return I18N_ERROR_MALFORMED_SET; - case U_IDNA_STD3_ASCII_RULES_ERROR: - return I18N_ERROR_STD3_ASCII_RULES; + case U_IDNA_STD3_ASCII_RULES_ERROR: + return I18N_ERROR_STD3_ASCII_RULES; - case U_IDNA_UNASSIGNED_ERROR: - return I18N_ERROR_UNASSIGNED; + case U_IDNA_UNASSIGNED_ERROR: + return I18N_ERROR_UNASSIGNED; - default: - return I18N_ERROR_UNKNOWN; - } + default: + return I18N_ERROR_UNKNOWN; + } } int _i18n_error_mapping_reverse(int err) { - switch (err) { - case I18N_ERROR_NONE: - return U_ZERO_ERROR; + switch (err) { + case I18N_ERROR_NONE: + return U_ZERO_ERROR; - case I18N_ERROR_INVALID_PARAMETER: - return U_ILLEGAL_ARGUMENT_ERROR; + case I18N_ERROR_INVALID_PARAMETER: + return U_ILLEGAL_ARGUMENT_ERROR; - case I18N_ERROR_MISSING_RESOURCE: - return U_MISSING_RESOURCE_ERROR; + case I18N_ERROR_MISSING_RESOURCE: + return U_MISSING_RESOURCE_ERROR; - case I18N_ERROR_INVALID_FORMAT: - return U_INVALID_FORMAT_ERROR; + case I18N_ERROR_INVALID_FORMAT: + return U_INVALID_FORMAT_ERROR; - case I18N_ERROR_FILE_ACCESS: - return U_FILE_ACCESS_ERROR; + case I18N_ERROR_FILE_ACCESS: + return U_FILE_ACCESS_ERROR; - case I18N_ERROR_INTERNAL_PROGRAM: - return U_INTERNAL_PROGRAM_ERROR; + case I18N_ERROR_INTERNAL_PROGRAM: + return U_INTERNAL_PROGRAM_ERROR; - case I18N_ERROR_MESSAGE_PARSE: - return U_MESSAGE_PARSE_ERROR; + case I18N_ERROR_MESSAGE_PARSE: + return U_MESSAGE_PARSE_ERROR; - case I18N_ERROR_OUT_OF_MEMORY: - return U_MEMORY_ALLOCATION_ERROR; + case I18N_ERROR_OUT_OF_MEMORY: + return U_MEMORY_ALLOCATION_ERROR; - case I18N_ERROR_INDEX_OUTOFBOUNDS: - return U_INDEX_OUTOFBOUNDS_ERROR; + case I18N_ERROR_INDEX_OUTOFBOUNDS: + return U_INDEX_OUTOFBOUNDS_ERROR; - case I18N_ERROR_PARSE: - return U_PARSE_ERROR; + case I18N_ERROR_PARSE: + return U_PARSE_ERROR; - case I18N_ERROR_INVALID_CHAR_FOUND: - return U_INVALID_CHAR_FOUND; + case I18N_ERROR_INVALID_CHAR_FOUND: + return U_INVALID_CHAR_FOUND; - case I18N_ERROR_TRUNCATED_CHAR_FOUND: - return U_TRUNCATED_CHAR_FOUND; + case I18N_ERROR_TRUNCATED_CHAR_FOUND: + return U_TRUNCATED_CHAR_FOUND; - case I18N_ERROR_ILLEGAL_CHAR_FOUND: - return U_ILLEGAL_CHAR_FOUND; + case I18N_ERROR_ILLEGAL_CHAR_FOUND: + return U_ILLEGAL_CHAR_FOUND; - case I18N_ERROR_INVALID_TABLE_FORMAT: - return U_INVALID_TABLE_FORMAT; + case I18N_ERROR_INVALID_TABLE_FORMAT: + return U_INVALID_TABLE_FORMAT; - case I18N_ERROR_INVALID_TABLE_FILE: - return U_INVALID_TABLE_FILE; + case I18N_ERROR_INVALID_TABLE_FILE: + return U_INVALID_TABLE_FILE; - case I18N_ERROR_BUFFER_OVERFLOW: - return U_BUFFER_OVERFLOW_ERROR; + case I18N_ERROR_BUFFER_OVERFLOW: + return U_BUFFER_OVERFLOW_ERROR; - case I18N_ERROR_NOT_SUPPORTED: - return U_UNSUPPORTED_ERROR; + case I18N_ERROR_NOT_SUPPORTED: + return U_UNSUPPORTED_ERROR; - case I18N_ERROR_RESOURCE_TYPE_MISMATCH: - return U_RESOURCE_TYPE_MISMATCH; + case I18N_ERROR_RESOURCE_TYPE_MISMATCH: + return U_RESOURCE_TYPE_MISMATCH; - case I18N_ERROR_ILLECAL_ESCAPE_SEQUENCE: - return U_ILLEGAL_ESCAPE_SEQUENCE; + case I18N_ERROR_ILLECAL_ESCAPE_SEQUENCE: + return U_ILLEGAL_ESCAPE_SEQUENCE; - case I18N_ERROR_UNSUPPORTED_ESCAPE_SEQUENCE: - return U_UNSUPPORTED_ESCAPE_SEQUENCE; + case I18N_ERROR_UNSUPPORTED_ESCAPE_SEQUENCE: + return U_UNSUPPORTED_ESCAPE_SEQUENCE; - case I18N_ERROR_NO_SPACE_AVAILABLE: - return U_NO_SPACE_AVAILABLE; + case I18N_ERROR_NO_SPACE_AVAILABLE: + return U_NO_SPACE_AVAILABLE; - case I18N_ERROR_CE_NOT_FOUND: - return U_CE_NOT_FOUND_ERROR; + case I18N_ERROR_CE_NOT_FOUND: + return U_CE_NOT_FOUND_ERROR; - case I18N_ERROR_PRIMARY_TOO_LONG: - return U_PRIMARY_TOO_LONG_ERROR; + case I18N_ERROR_PRIMARY_TOO_LONG: + return U_PRIMARY_TOO_LONG_ERROR; - case I18N_ERROR_STATE_TOO_OLD: - return U_STATE_TOO_OLD_ERROR; + case I18N_ERROR_STATE_TOO_OLD: + return U_STATE_TOO_OLD_ERROR; - case I18N_ERROR_TOO_MANY_ALIASES: - return U_TOO_MANY_ALIASES_ERROR; + case I18N_ERROR_TOO_MANY_ALIASES: + return U_TOO_MANY_ALIASES_ERROR; - case I18N_ERROR_ENUM_OUT_OF_SYNC: - return U_ENUM_OUT_OF_SYNC_ERROR; + case I18N_ERROR_ENUM_OUT_OF_SYNC: + return U_ENUM_OUT_OF_SYNC_ERROR; - case I18N_ERROR_INVARIANT_CONVERSION: - return U_INVARIANT_CONVERSION_ERROR; + case I18N_ERROR_INVARIANT_CONVERSION: + return U_INVARIANT_CONVERSION_ERROR; - case I18N_ERROR_INVALID_STATE: - return U_INVALID_STATE_ERROR; + case I18N_ERROR_INVALID_STATE: + return U_INVALID_STATE_ERROR; - case I18N_ERROR_COLLATOR_VERSION_MISMATCH: - return U_COLLATOR_VERSION_MISMATCH; + case I18N_ERROR_COLLATOR_VERSION_MISMATCH: + return U_COLLATOR_VERSION_MISMATCH; - case I18N_ERROR_USELESS_COLLATOR: - return U_USELESS_COLLATOR_ERROR; + case I18N_ERROR_USELESS_COLLATOR: + return U_USELESS_COLLATOR_ERROR; - case I18N_ERROR_NO_WRITE_PERMISSION: - return U_NO_WRITE_PERMISSION; + case I18N_ERROR_NO_WRITE_PERMISSION: + return U_NO_WRITE_PERMISSION; - case I18N_ERROR_MALFORMED_SET: - return U_MALFORMED_SET; + case I18N_ERROR_MALFORMED_SET: + return U_MALFORMED_SET; - case I18N_ERROR_STD3_ASCII_RULES: - return U_IDNA_STD3_ASCII_RULES_ERROR; + case I18N_ERROR_STD3_ASCII_RULES: + return U_IDNA_STD3_ASCII_RULES_ERROR; - case I18N_WARNING_STRING_NOT_TERMINATED: - return U_STRING_NOT_TERMINATED_WARNING; + case I18N_WARNING_STRING_NOT_TERMINATED: + return U_STRING_NOT_TERMINATED_WARNING; - case I18N_ERROR_UNASSIGNED: - return U_IDNA_UNASSIGNED_ERROR; + case I18N_ERROR_UNASSIGNED: + return U_IDNA_UNASSIGNED_ERROR; - case I18N_WARNING_SORT_KEY_TOO_SHORT: - return U_SORT_KEY_TOO_SHORT_WARNING; + case I18N_WARNING_SORT_KEY_TOO_SHORT: + return U_SORT_KEY_TOO_SHORT_WARNING; - default: - return U_STANDARD_ERROR_LIMIT; - } + default: + return U_STANDARD_ERROR_LIMIT; + } } diff --git a/src/utils_i18n_ubrk.c b/src/utils_i18n_ubrk.c index ee514b7..e758833 100644 --- a/src/utils_i18n_ubrk.c +++ b/src/utils_i18n_ubrk.c @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include @@ -20,240 +20,240 @@ int i18n_ubrk_create(i18n_ubreak_iterator_type_e type, const char *locale, const i18n_uchar *text, - int32_t text_length, i18n_ubreak_iterator_h *break_iter) + int32_t text_length, i18n_ubreak_iterator_h *break_iter) { - if (type < I18N_UBRK_CHARACTER || type > I18N_UBRK_SENTENCE || NULL == break_iter) - return I18N_ERROR_INVALID_PARAMETER; + if (type < I18N_UBRK_CHARACTER || type > I18N_UBRK_SENTENCE || NULL == break_iter) + return I18N_ERROR_INVALID_PARAMETER; - if (text_length < -1) - return I18N_ERROR_INVALID_PARAMETER; + if (text_length < -1) + return I18N_ERROR_INVALID_PARAMETER; - UErrorCode icu_error = U_ZERO_ERROR; - *break_iter = - (i18n_ubreak_iterator_h) ubrk_open((UBreakIteratorType) type, locale, text, text_length, - &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + UErrorCode icu_error = U_ZERO_ERROR; + *break_iter = + (i18n_ubreak_iterator_h) ubrk_open((UBreakIteratorType) type, locale, text, text_length, + &icu_error); + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } int i18n_ubrk_create_rules(const i18n_uchar *rules, int32_t rules_length, const i18n_uchar *text, - int32_t text_length, i18n_ubreak_iterator_h *break_iter, - i18n_uparse_error_s *parse_err) + int32_t text_length, i18n_ubreak_iterator_h *break_iter, + i18n_uparse_error_s *parse_err) { - if (rules == NULL || rules_length < -1 || text_length < -1 || break_iter == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (rules == NULL || rules_length < -1 || text_length < -1 || break_iter == NULL) + return I18N_ERROR_INVALID_PARAMETER; - UErrorCode icu_error = U_ZERO_ERROR; - *break_iter = - (i18n_ubreak_iterator_h) ubrk_openRules(rules, rules_length, text, text_length, - (UParseError *) parse_err, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + *break_iter = + (i18n_ubreak_iterator_h) ubrk_openRules(rules, rules_length, text, text_length, + (UParseError *) parse_err, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } int i18n_ubrk_safe_clone(const i18n_ubreak_iterator_h break_iter, void *stack_buffer, - int32_t *p_buffer_size, i18n_ubreak_iterator_h *break_iter_clone) + int32_t *p_buffer_size, i18n_ubreak_iterator_h *break_iter_clone) { - if (break_iter == NULL || break_iter_clone == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (break_iter == NULL || break_iter_clone == NULL) + return I18N_ERROR_INVALID_PARAMETER; - UErrorCode icu_error = U_ZERO_ERROR; - *break_iter_clone = - (i18n_ubreak_iterator_h) ubrk_safeClone((const UBreakIterator *)break_iter, stack_buffer, - p_buffer_size, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + *break_iter_clone = + (i18n_ubreak_iterator_h) ubrk_safeClone((const UBreakIterator *)break_iter, stack_buffer, + p_buffer_size, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } int i18n_ubrk_destroy(i18n_ubreak_iterator_h break_iter) { - if (break_iter == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (break_iter == NULL) + return I18N_ERROR_INVALID_PARAMETER; - ubrk_close((UBreakIterator *) break_iter); - return I18N_ERROR_NONE; + ubrk_close((UBreakIterator *) break_iter); + return I18N_ERROR_NONE; } int i18n_ubrk_set_text(i18n_ubreak_iterator_h break_iter, const i18n_uchar *text, - int32_t text_length) + int32_t text_length) { - if (text == NULL || break_iter == NULL || text_length < 0) - return I18N_ERROR_INVALID_PARAMETER; + if (text == NULL || break_iter == NULL || text_length < 0) + return I18N_ERROR_INVALID_PARAMETER; - UErrorCode icu_error = U_ZERO_ERROR; - ubrk_setText((UBreakIterator *) break_iter, text, text_length, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + ubrk_setText((UBreakIterator *) break_iter, text, text_length, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } int32_t i18n_ubrk_current(const i18n_ubreak_iterator_h break_iter) { - if (break_iter == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return -1; - } + if (break_iter == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return -1; + } - set_last_result(I18N_ERROR_NONE); - return ubrk_current((const UBreakIterator *)break_iter); + set_last_result(I18N_ERROR_NONE); + return ubrk_current((const UBreakIterator *)break_iter); } int32_t i18n_ubrk_next(i18n_ubreak_iterator_h break_iter) { - if (break_iter == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return -1; - } + if (break_iter == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return -1; + } - set_last_result(I18N_ERROR_NONE); - return ubrk_next((UBreakIterator *) break_iter); + set_last_result(I18N_ERROR_NONE); + return ubrk_next((UBreakIterator *) break_iter); } int32_t i18n_ubrk_previous(i18n_ubreak_iterator_h break_iter) { - if (break_iter == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return -1; - } + if (break_iter == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return -1; + } - set_last_result(I18N_ERROR_NONE); - return ubrk_previous((UBreakIterator *) break_iter); + set_last_result(I18N_ERROR_NONE); + return ubrk_previous((UBreakIterator *) break_iter); } int32_t i18n_ubrk_first(i18n_ubreak_iterator_h break_iter) { - if (break_iter == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return -1; - } + if (break_iter == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return -1; + } - set_last_result(I18N_ERROR_NONE); - return ubrk_first((UBreakIterator *) break_iter); + set_last_result(I18N_ERROR_NONE); + return ubrk_first((UBreakIterator *) break_iter); } int32_t i18n_ubrk_last(i18n_ubreak_iterator_h break_iter) { - if (break_iter == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return -1; - } + if (break_iter == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return -1; + } - set_last_result(I18N_ERROR_NONE); - return ubrk_last((UBreakIterator *) break_iter); + set_last_result(I18N_ERROR_NONE); + return ubrk_last((UBreakIterator *) break_iter); } int32_t i18n_ubrk_preceding(i18n_ubreak_iterator_h break_iter, int32_t offset) { - if (break_iter == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return -1; - } + if (break_iter == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return -1; + } - set_last_result(I18N_ERROR_NONE); - return ubrk_preceding((UBreakIterator *) break_iter, offset); + set_last_result(I18N_ERROR_NONE); + return ubrk_preceding((UBreakIterator *) break_iter, offset); } int32_t i18n_ubrk_following(i18n_ubreak_iterator_h break_iter, int32_t offset) { - if (break_iter == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return -1; - } + if (break_iter == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return -1; + } - set_last_result(I18N_ERROR_NONE); - return ubrk_following((UBreakIterator *) break_iter, offset); + set_last_result(I18N_ERROR_NONE); + return ubrk_following((UBreakIterator *) break_iter, offset); } const char *i18n_ubrk_get_available(int32_t index) { - if (index < 0) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } + if (index < 0) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } - set_last_result(I18N_ERROR_NONE); - return ubrk_getAvailable(index); + set_last_result(I18N_ERROR_NONE); + return ubrk_getAvailable(index); } int32_t i18n_ubrk_count_available(void) { - set_last_result(I18N_ERROR_NONE); - return ubrk_countAvailable(); + set_last_result(I18N_ERROR_NONE); + return ubrk_countAvailable(); } i18n_ubool i18n_ubrk_is_boundary(i18n_ubreak_iterator_h break_iter, int32_t offset) { - if (break_iter == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return false; - } + if (break_iter == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return false; + } - set_last_result(I18N_ERROR_NONE); - return ubrk_isBoundary((UBreakIterator *) break_iter, offset); + set_last_result(I18N_ERROR_NONE); + return ubrk_isBoundary((UBreakIterator *) break_iter, offset); } int32_t i18n_ubrk_get_rule_status(i18n_ubreak_iterator_h break_iter) { - if (break_iter == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (break_iter == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - set_last_result(I18N_ERROR_NONE); - return ubrk_getRuleStatus((UBreakIterator *) break_iter); + set_last_result(I18N_ERROR_NONE); + return ubrk_getRuleStatus((UBreakIterator *) break_iter); } int32_t i18n_ubrk_get_rule_status_vec(i18n_ubreak_iterator_h break_iter, int32_t *fill_in_vec, - int32_t capacity) + int32_t capacity) { - if (break_iter == NULL || capacity < 0) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (break_iter == NULL || capacity < 0) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - UErrorCode icu_error = U_ZERO_ERROR; - int32_t result_ubrk_getRuleStatusVec = - ubrk_getRuleStatusVec((UBreakIterator *) break_iter, fill_in_vec, capacity, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + int32_t result_ubrk_getRuleStatusVec = + ubrk_getRuleStatusVec((UBreakIterator *) break_iter, fill_in_vec, capacity, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - set_last_result(i18n_error); - return result_ubrk_getRuleStatusVec; + set_last_result(i18n_error); + return result_ubrk_getRuleStatusVec; } const char *i18n_ubrk_get_locale_by_type(const i18n_ubreak_iterator_h break_iter, - i18n_ulocale_data_locale_type_e type) + i18n_ulocale_data_locale_type_e type) { - if (type < I18N_ULOCALE_DATA_LOCALE_TYPE_ACTUAL_LOCALE || - type > I18N_ULOCALE_DATA_LOCALE_TYPE_LIMIT) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } - - UErrorCode icu_error = U_ZERO_ERROR; - const char *result_ubrk_getLocaleByType = - ubrk_getLocaleByType((const UBreakIterator *)break_iter, type, &icu_error); - - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - - set_last_result(i18n_error); - return result_ubrk_getLocaleByType; + if (type < I18N_ULOCALE_DATA_LOCALE_TYPE_ACTUAL_LOCALE || + type > I18N_ULOCALE_DATA_LOCALE_TYPE_LIMIT) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } + + UErrorCode icu_error = U_ZERO_ERROR; + const char *result_ubrk_getLocaleByType = + ubrk_getLocaleByType((const UBreakIterator *)break_iter, type, &icu_error); + + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + + set_last_result(i18n_error); + return result_ubrk_getLocaleByType; } diff --git a/src/utils_i18n_ucalendar.c b/src/utils_i18n_ucalendar.c index b866fdb..5825925 100644 --- a/src/utils_i18n_ucalendar.c +++ b/src/utils_i18n_ucalendar.c @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include @@ -19,588 +19,588 @@ #include int i18n_ucalendar_create(const i18n_uchar *zone_id, int32_t len, const char *locale, - i18n_ucalendar_type_e type, i18n_ucalendar_h *calendar) + i18n_ucalendar_type_e type, i18n_ucalendar_h *calendar) { - retv_if(calendar == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(calendar == NULL, I18N_ERROR_INVALID_PARAMETER); - i18n_error_code_e i18n_error; - UErrorCode icu_error = U_ZERO_ERROR; - *calendar = ucal_open(zone_id, len, locale, type, &icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + *calendar = ucal_open(zone_id, len, locale, type, &icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } int i18n_ucalendar_destroy(i18n_ucalendar_h calendar) { - retv_if(calendar == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(calendar == NULL, I18N_ERROR_INVALID_PARAMETER); - ucal_close(calendar); - return I18N_ERROR_NONE; + ucal_close(calendar); + return I18N_ERROR_NONE; } int i18n_ucalendar_clone(const i18n_ucalendar_h cal, i18n_ucalendar_h *identical_to_cal) { - retv_if(cal == NULL || identical_to_cal == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(cal == NULL || identical_to_cal == NULL, I18N_ERROR_INVALID_PARAMETER); - i18n_error_code_e i18n_error; - UErrorCode icu_error = U_ZERO_ERROR; - *identical_to_cal = ucal_clone(cal, &icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + *identical_to_cal = ucal_clone(cal, &icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } int i18n_ucalendar_add(i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, - int32_t amount) + int32_t amount) { - retv_if(calendar == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(calendar == NULL, I18N_ERROR_INVALID_PARAMETER); - i18n_error_code_e i18n_error; - UErrorCode icu_error = U_ZERO_ERROR; - ucal_add(calendar, field, amount, &icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + ucal_add(calendar, field, amount, &icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } int i18n_ucalendar_is_equivalent_to(const i18n_ucalendar_h calendar1, - const i18n_ucalendar_h calendar2, i18n_ubool *equiv) + const i18n_ucalendar_h calendar2, i18n_ubool *equiv) { - retv_if(equiv == NULL || calendar1 == NULL || calendar2 == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(equiv == NULL || calendar1 == NULL || calendar2 == NULL, I18N_ERROR_INVALID_PARAMETER); - *equiv = ucal_equivalentTo(calendar1, calendar2); - return I18N_ERROR_NONE; + *equiv = ucal_equivalentTo(calendar1, calendar2); + return I18N_ERROR_NONE; } int i18n_ucalendar_get_milliseconds(const i18n_ucalendar_h calendar, i18n_udate *date) { - retv_if(calendar == NULL || date == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(calendar == NULL || date == NULL, I18N_ERROR_INVALID_PARAMETER); - i18n_error_code_e i18n_error; - UErrorCode icu_error = U_ZERO_ERROR; - *date = ucal_getMillis(calendar, &icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + *date = ucal_getMillis(calendar, &icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } int i18n_ucalendar_get(const i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, - int32_t *val) + int32_t *val) { - retv_if(calendar == NULL || val == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(calendar == NULL || val == NULL, I18N_ERROR_INVALID_PARAMETER); - i18n_error_code_e i18n_error; - UErrorCode icu_error = U_ZERO_ERROR; - *val = ucal_get(calendar, field, &icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + *val = ucal_get(calendar, field, &icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } int i18n_ucalendar_get_attribute(i18n_ucalendar_h calendar, i18n_ucalendar_attribute_e attr, - int32_t *val) + int32_t *val) { - retv_if(calendar == NULL || val == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(calendar == NULL || val == NULL, I18N_ERROR_INVALID_PARAMETER); - *val = ucal_getAttribute(calendar, attr); - return I18N_ERROR_NONE; + *val = ucal_getAttribute(calendar, attr); + return I18N_ERROR_NONE; } int i18n_ucalendar_get_timezone_displayname(const i18n_ucalendar_h calendar, - i18n_ucalendar_displayname_type_e type, - const char *locale, i18n_uchar *result, - int32_t result_len, int32_t *buf_size_needed) + i18n_ucalendar_displayname_type_e type, + const char *locale, i18n_uchar *result, + int32_t result_len, int32_t *buf_size_needed) { - retv_if(calendar == NULL || result == NULL - || buf_size_needed == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(calendar == NULL || result == NULL + || buf_size_needed == NULL, I18N_ERROR_INVALID_PARAMETER); - i18n_error_code_e i18n_error; - UErrorCode icu_error = U_ZERO_ERROR; - *buf_size_needed = - ucal_getTimeZoneDisplayName(calendar, type, locale, result, result_len, &icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + *buf_size_needed = + ucal_getTimeZoneDisplayName(calendar, type, locale, result, result_len, &icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } int i18n_ucalendar_is_in_daylight_time(const i18n_ucalendar_h calendar, i18n_ubool *is_in) { - retv_if(calendar == NULL || is_in == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(calendar == NULL || is_in == NULL, I18N_ERROR_INVALID_PARAMETER); - i18n_error_code_e i18n_error; - UErrorCode icu_error = U_ZERO_ERROR; - *is_in = ucal_inDaylightTime(calendar, &icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + *is_in = ucal_inDaylightTime(calendar, &icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } int i18n_ucalendar_set(i18n_ucalendar_h cal, i18n_ucalendar_date_fields_e field, int32_t val) { - retv_if(cal == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(cal == NULL, I18N_ERROR_INVALID_PARAMETER); - ucal_set(cal, field, val); - return I18N_ERROR_NONE; + ucal_set(cal, field, val); + return I18N_ERROR_NONE; } int i18n_ucalendar_set_attribute(i18n_ucalendar_h calendar, i18n_ucalendar_attribute_e attr, - int32_t val) + int32_t val) { - retv_if(calendar == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(calendar == NULL, I18N_ERROR_INVALID_PARAMETER); - ucal_setAttribute(calendar, attr, val); - return I18N_ERROR_NONE; + ucal_setAttribute(calendar, attr, val); + return I18N_ERROR_NONE; } int i18n_ucalendar_set_date_time(i18n_ucalendar_h calendar, int32_t year, int32_t month, - int32_t date, int32_t hour, int32_t min, int32_t sec) + int32_t date, int32_t hour, int32_t min, int32_t sec) { - retv_if(calendar == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(calendar == NULL, I18N_ERROR_INVALID_PARAMETER); - i18n_error_code_e i18n_error; - UErrorCode icu_error = U_ZERO_ERROR; - ucal_setDateTime(calendar, year, month, date, hour, min, sec, &icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + ucal_setDateTime(calendar, year, month, date, hour, min, sec, &icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } int i18n_ucalendar_set_milliseconds(i18n_ucalendar_h calendar, i18n_udate milliseconds) { - retv_if(calendar == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(calendar == NULL, I18N_ERROR_INVALID_PARAMETER); - i18n_error_code_e i18n_error; - UErrorCode icu_error = U_ZERO_ERROR; - ucal_setMillis(calendar, milliseconds, &icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + ucal_setMillis(calendar, milliseconds, &icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } int i18n_ucalendar_set_default_timezone(const i18n_uchar *zone_id) { - retv_if(zone_id == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(zone_id == NULL, I18N_ERROR_INVALID_PARAMETER); - i18n_error_code_e i18n_error; - UErrorCode icu_error = U_ZERO_ERROR; - ucal_setDefaultTimeZone(zone_id, &icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + ucal_setDefaultTimeZone(zone_id, &icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } int32_t i18n_ucalendar_get_field_difference(i18n_ucalendar_h calendar, i18n_udate target, - i18n_ucalendar_date_fields_e field, - i18n_error_code_e *status) + i18n_ucalendar_date_fields_e field, + i18n_error_code_e *status) { - if (calendar == NULL) { - if (NULL != status) - *status = I18N_ERROR_INVALID_PARAMETER; + if (calendar == NULL) { + if (NULL != status) + *status = I18N_ERROR_INVALID_PARAMETER; - return 0; - } + return 0; + } - UErrorCode icu_error = U_ZERO_ERROR; - int32_t result = ucal_getFieldDifference(calendar, target, field, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + int32_t result = ucal_getFieldDifference(calendar, target, field, &icu_error); - if (NULL != status) { - ERR_MAPPING(icu_error, *status); - I18N_ERR(*status); - } + if (NULL != status) { + ERR_MAPPING(icu_error, *status); + I18N_ERR(*status); + } - return result; + return result; } int i18n_ucalendar_get_now(i18n_udate *date) { - retv_if(date == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(date == NULL, I18N_ERROR_INVALID_PARAMETER); - *date = ucal_getNow(); - return I18N_ERROR_NONE; + *date = ucal_getNow(); + return I18N_ERROR_NONE; } -// Newly Added APIs +/* Newly Added APIs */ int i18n_ucalendar_timezone_id_enumeration_create(i18n_system_timezone_type_e zone_type, - const char *region, const int32_t *raw_offset, - i18n_uenumeration_h *enumeration) + const char *region, const int32_t *raw_offset, + i18n_uenumeration_h *enumeration) { - if (region == NULL || enumeration == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (region == NULL || enumeration == NULL) + return I18N_ERROR_INVALID_PARAMETER; - i18n_error_code_e i18n_error; - UErrorCode icu_error = U_ZERO_ERROR; - *enumeration = - (i18n_uenumeration_h) ucal_openTimeZoneIDEnumeration(zone_type, region, raw_offset, - &icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + *enumeration = + (i18n_uenumeration_h) ucal_openTimeZoneIDEnumeration(zone_type, region, raw_offset, + &icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } int i18n_ucalendar_timezones_create(i18n_uenumeration_h *enumeration) { - if (enumeration == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (enumeration == NULL) + return I18N_ERROR_INVALID_PARAMETER; - i18n_error_code_e i18n_error; - UErrorCode icu_error = U_ZERO_ERROR; - *enumeration = (i18n_uenumeration_h) ucal_openTimeZones(&icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + *enumeration = (i18n_uenumeration_h) ucal_openTimeZones(&icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } int i18n_ucalendar_country_timezones_create(const char *country, i18n_uenumeration_h *enumeration) { - if (country == NULL || enumeration == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (country == NULL || enumeration == NULL) + return I18N_ERROR_INVALID_PARAMETER; - i18n_error_code_e i18n_error; - UErrorCode icu_error = U_ZERO_ERROR; - *enumeration = (i18n_uenumeration_h) ucal_openCountryTimeZones(country, &icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + *enumeration = (i18n_uenumeration_h) ucal_openCountryTimeZones(country, &icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } int32_t i18n_ucalendar_get_default_timezone(i18n_uchar *result, int32_t result_capacity) { - i18n_error_code_e i18n_error; - UErrorCode icu_error = U_ZERO_ERROR; - int32_t result_ucal_getDefaultTimeZone = - ucal_getDefaultTimeZone(result, result_capacity, &icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return result_ucal_getDefaultTimeZone; + i18n_error_code_e i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + int32_t result_ucal_getDefaultTimeZone = + ucal_getDefaultTimeZone(result, result_capacity, &icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return result_ucal_getDefaultTimeZone; } int i18n_ucalendar_set_timezone(i18n_ucalendar_h calendar, const i18n_uchar *zone_id, - int32_t length) + int32_t length) { - if (calendar == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (calendar == NULL) + return I18N_ERROR_INVALID_PARAMETER; - i18n_error_code_e i18n_error; - UErrorCode icu_error = U_ZERO_ERROR; - ucal_setTimeZone(calendar, zone_id, length, &icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + ucal_setTimeZone(calendar, zone_id, length, &icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } int32_t i18n_ucalendar_get_timezone_id(const i18n_ucalendar_h calendar, i18n_uchar *result, - int32_t result_length) + int32_t result_length) { - if (calendar == NULL || result == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (calendar == NULL || result == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - i18n_error_code_e i18n_error; - UErrorCode icu_error = U_ZERO_ERROR; - int32_t result_ucal_getTimeZoneID = - ucal_getTimeZoneID(calendar, result, result_length, &icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + int32_t result_ucal_getTimeZoneID = + ucal_getTimeZoneID(calendar, result, result_length, &icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - set_last_result(i18n_error); - return result_ucal_getTimeZoneID; + set_last_result(i18n_error); + return result_ucal_getTimeZoneID; } int i18n_ucalendar_set_gregorian_change(i18n_ucalendar_h calendar, i18n_udate date) { - if (calendar == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (calendar == NULL) + return I18N_ERROR_INVALID_PARAMETER; - i18n_error_code_e i18n_error; - UErrorCode icu_error = U_ZERO_ERROR; - ucal_setGregorianChange(calendar, date, &icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + ucal_setGregorianChange(calendar, date, &icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } int i18n_ucalendar_get_gregorian_change(const i18n_ucalendar_h calendar, i18n_udate *date) { - if (calendar == NULL || date == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (calendar == NULL || date == NULL) + return I18N_ERROR_INVALID_PARAMETER; - i18n_error_code_e i18n_error; - UErrorCode icu_error = U_ZERO_ERROR; - *date = ucal_getGregorianChange(calendar, &icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + *date = ucal_getGregorianChange(calendar, &icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } const char *i18n_ucalendar_get_available(int32_t locale_index) { - if (locale_index < 0) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } + if (locale_index < 0) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } - set_last_result(I18N_ERROR_NONE); - return ucal_getAvailable(locale_index); + set_last_result(I18N_ERROR_NONE); + return ucal_getAvailable(locale_index); } int32_t i18n_ucalendar_count_available(void) { - set_last_result(I18N_ERROR_NONE); - return ucal_countAvailable(); + set_last_result(I18N_ERROR_NONE); + return ucal_countAvailable(); } int i18n_ucalendar_set_date(i18n_ucalendar_h calendar, int32_t year, int32_t month, int32_t date) { - if (calendar == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (calendar == NULL) + return I18N_ERROR_INVALID_PARAMETER; - i18n_error_code_e i18n_error; - UErrorCode icu_error = U_ZERO_ERROR; - ucal_setDate(calendar, year, month, date, &icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + ucal_setDate(calendar, year, month, date, &icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } int i18n_ucalendar_roll(i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, - int32_t amount) + int32_t amount) { - if (calendar == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (calendar == NULL) + return I18N_ERROR_INVALID_PARAMETER; - i18n_error_code_e i18n_error; - UErrorCode icu_error = U_ZERO_ERROR; - ucal_roll(calendar, field, amount, &icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + ucal_roll(calendar, field, amount, &icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } i18n_ubool i18n_ucalendar_is_set(const i18n_ucalendar_h calendar, - i18n_ucalendar_date_fields_e field) + i18n_ucalendar_date_fields_e field) { - if (calendar == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return false; - } + if (calendar == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return false; + } - set_last_result(I18N_ERROR_NONE); - return ucal_isSet(calendar, field); + set_last_result(I18N_ERROR_NONE); + return ucal_isSet(calendar, field); } int i18n_ucalendar_clear_field(i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field) { - if (calendar == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (calendar == NULL) + return I18N_ERROR_INVALID_PARAMETER; - ucal_clearField(calendar, field); - return I18N_ERROR_NONE; + ucal_clearField(calendar, field); + return I18N_ERROR_NONE; } int i18n_ucalendar_clear(i18n_ucalendar_h calendar) { - if (calendar == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (calendar == NULL) + return I18N_ERROR_INVALID_PARAMETER; - ucal_clear(calendar); - return I18N_ERROR_NONE; + ucal_clear(calendar); + return I18N_ERROR_NONE; } int32_t i18n_ucalendar_get_limit(const i18n_ucalendar_h calendar, - i18n_ucalendar_date_fields_e field, - i18n_ucalendar_limit_type_e type) + i18n_ucalendar_date_fields_e field, + i18n_ucalendar_limit_type_e type) { - if (calendar == NULL || field < I18N_UCALENDAR_ERA || field >= I18N_UCALENDAR_FIELD_COUNT) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (calendar == NULL || field < I18N_UCALENDAR_ERA || field >= I18N_UCALENDAR_FIELD_COUNT) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - i18n_error_code_e i18n_error = I18N_ERROR_NONE; - UErrorCode icu_error = U_ZERO_ERROR; - int32_t result_ucal_getLimit = ucal_getLimit(calendar, field, type, &icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error = I18N_ERROR_NONE; + UErrorCode icu_error = U_ZERO_ERROR; + int32_t result_ucal_getLimit = ucal_getLimit(calendar, field, type, &icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - set_last_result(i18n_error); + set_last_result(i18n_error); - return result_ucal_getLimit; + return result_ucal_getLimit; } const char *i18n_ucalendar_get_locale_by_type(const i18n_ucalendar_h calendar, - i18n_ulocale_data_locale_type_e type) + i18n_ulocale_data_locale_type_e type) { - if (calendar == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (calendar == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - i18n_error_code_e i18n_error; - UErrorCode icu_error = U_ZERO_ERROR; - const char *result_ucal_getLocaleByType = ucal_getLocaleByType(calendar, type, &icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + const char *result_ucal_getLocaleByType = ucal_getLocaleByType(calendar, type, &icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - set_last_result(i18n_error); - return result_ucal_getLocaleByType; + set_last_result(i18n_error); + return result_ucal_getLocaleByType; } const char *i18n_ucalendar_get_tz_data_version(void) { - i18n_error_code_e i18n_error; - UErrorCode icu_error = U_ZERO_ERROR; - const char *result_ucal_getTZDataVersion = ucal_getTZDataVersion(&icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + const char *result_ucal_getTZDataVersion = ucal_getTZDataVersion(&icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - set_last_result(i18n_error); - return result_ucal_getTZDataVersion; + set_last_result(i18n_error); + return result_ucal_getTZDataVersion; } int32_t i18n_ucalendar_get_canonical_timezone_id(const i18n_uchar *id, int32_t length, - i18n_uchar *result, int32_t result_capacity, - i18n_ubool *is_system_id) + i18n_uchar *result, int32_t result_capacity, + i18n_ubool *is_system_id) { - if (id == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (id == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - i18n_error_code_e i18n_error; - UErrorCode icu_error = U_ZERO_ERROR; - int32_t result_ucal_getCanonicalTimeZoneID = - ucal_getCanonicalTimeZoneID(id, length, result, result_capacity, is_system_id, &icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + int32_t result_ucal_getCanonicalTimeZoneID = + ucal_getCanonicalTimeZoneID(id, length, result, result_capacity, is_system_id, &icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - set_last_result(i18n_error); - return result_ucal_getCanonicalTimeZoneID; + set_last_result(i18n_error); + return result_ucal_getCanonicalTimeZoneID; } const char *i18n_ucalendar_get_type(const i18n_ucalendar_h calendar) { - if (calendar == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (calendar == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - i18n_error_code_e i18n_error; - UErrorCode icu_error = U_ZERO_ERROR; - const char *result_ucal_getType = ucal_getType(calendar, &icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + const char *result_ucal_getType = ucal_getType(calendar, &icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - set_last_result(i18n_error); - return result_ucal_getType; + set_last_result(i18n_error); + return result_ucal_getType; } int i18n_ucalendar_get_keyword_values_for_locale(const char *key, const char *locale, - i18n_ubool commonly_used, - i18n_uenumeration_h *enumeration) + i18n_ubool commonly_used, + i18n_uenumeration_h *enumeration) { - if (key == NULL || enumeration == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (key == NULL || enumeration == NULL) + return I18N_ERROR_INVALID_PARAMETER; - i18n_error_code_e i18n_error; - UErrorCode icu_error = U_ZERO_ERROR; - *enumeration = - (i18n_uenumeration_h) ucal_getKeywordValuesForLocale(key, locale, commonly_used, - &icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + *enumeration = + (i18n_uenumeration_h) ucal_getKeywordValuesForLocale(key, locale, commonly_used, + &icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } int i18n_ucalendar_get_day_of_week_type(const i18n_ucalendar_h calendar, - i18n_ucalendar_days_of_week_e day_of_week, - i18n_ucalendar_weekday_type_e *weekday_type) + i18n_ucalendar_days_of_week_e day_of_week, + i18n_ucalendar_weekday_type_e *weekday_type) { - if (calendar == NULL || weekday_type == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (calendar == NULL || weekday_type == NULL) + return I18N_ERROR_INVALID_PARAMETER; - i18n_error_code_e i18n_error; - UErrorCode icu_error = U_ZERO_ERROR; - *weekday_type = ucal_getDayOfWeekType(calendar, day_of_week, &icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + *weekday_type = ucal_getDayOfWeekType(calendar, day_of_week, &icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } int32_t i18n_ucalendar_get_weekend_transition(const i18n_ucalendar_h calendar, - i18n_ucalendar_days_of_week_e day_of_week) + i18n_ucalendar_days_of_week_e day_of_week) { - if (calendar == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (calendar == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - i18n_error_code_e i18n_error; - UErrorCode icu_error = U_ZERO_ERROR; - int32_t result_ucal_getWeekendTransition = - ucal_getWeekendTransition(calendar, day_of_week, &icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + int32_t result_ucal_getWeekendTransition = + ucal_getWeekendTransition(calendar, day_of_week, &icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - set_last_result(i18n_error); - return result_ucal_getWeekendTransition; + set_last_result(i18n_error); + return result_ucal_getWeekendTransition; } i18n_ubool i18n_ucalendar_is_weekend(i18n_ucalendar_h calendar, i18n_udate date) { - if (calendar == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (calendar == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - i18n_error_code_e i18n_error; - UErrorCode icu_error = U_ZERO_ERROR; - i18n_ubool result_ucal_isWeekend = ucal_isWeekend(calendar, date, &icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + i18n_ubool result_ucal_isWeekend = ucal_isWeekend(calendar, date, &icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - set_last_result(i18n_error); - return result_ucal_isWeekend; + set_last_result(i18n_error); + return result_ucal_isWeekend; } i18n_ubool i18n_ucalendar_get_timezone_transition_date(const i18n_ucalendar_h calendar, - i18n_utimezone_transition_type_e type, - i18n_udate *transition) -{ - if (calendar == NULL || transition == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } - - i18n_error_code_e i18n_error; - UErrorCode icu_error = U_ZERO_ERROR; - i18n_ubool result_ucal_getTimeZoneTransitionDate = - ucal_getTimeZoneTransitionDate(calendar, type, transition, &icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - - set_last_result(i18n_error); - return result_ucal_getTimeZoneTransitionDate; + i18n_utimezone_transition_type_e type, + i18n_udate *transition) +{ + if (calendar == NULL || transition == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } + + i18n_error_code_e i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + i18n_ubool result_ucal_getTimeZoneTransitionDate = + ucal_getTimeZoneTransitionDate(calendar, type, transition, &icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + + set_last_result(i18n_error); + return result_ucal_getTimeZoneTransitionDate; } diff --git a/src/utils_i18n_uchar.c b/src/utils_i18n_uchar.c old mode 100755 new mode 100644 index 3756dad..7f299a0 --- a/src/utils_i18n_uchar.c +++ b/src/utils_i18n_uchar.c @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include @@ -19,18 +19,18 @@ #include int i18n_uchar_get_int_property_value(i18n_uchar32 c, i18n_uchar_uproperty_e which, - int32_t *property_val) + int32_t *property_val) { - retv_if(property_val == NULL, I18N_ERROR_INVALID_PARAMETER); - *property_val = u_getIntPropertyValue(c, which); + retv_if(property_val == NULL, I18N_ERROR_INVALID_PARAMETER); + *property_val = u_getIntPropertyValue(c, which); - return I18N_ERROR_NONE; + return I18N_ERROR_NONE; } int i18n_uchar_get_ublock_code(i18n_uchar32 c, i18n_uchar_ublock_code_e *block_val) { - retv_if(block_val == NULL, I18N_ERROR_INVALID_PARAMETER); - *block_val = ublock_getCode(c); + retv_if(block_val == NULL, I18N_ERROR_INVALID_PARAMETER); + *block_val = ublock_getCode(c); - return I18N_ERROR_NONE; + return I18N_ERROR_NONE; } diff --git a/src/utils_i18n_ucollator.c b/src/utils_i18n_ucollator.c old mode 100755 new mode 100644 index 1b42fcd..9dd0d0b --- a/src/utils_i18n_ucollator.c +++ b/src/utils_i18n_ucollator.c @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include @@ -20,62 +20,62 @@ int i18n_ucollator_destroy(i18n_ucollator_h collator) { - retv_if(collator == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(collator == NULL, I18N_ERROR_INVALID_PARAMETER); - ucol_close(collator); + ucol_close(collator); - return I18N_ERROR_NONE; + return I18N_ERROR_NONE; } int i18n_ucollator_equal(const i18n_ucollator_h collator, const i18n_uchar *src, int32_t src_len, - const i18n_uchar *target, int32_t target_len, i18n_ubool *equal) + const i18n_uchar *target, int32_t target_len, i18n_ubool *equal) { - retv_if(collator == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(collator == NULL, I18N_ERROR_INVALID_PARAMETER); - *equal = ucol_equal(collator, src, src_len, target, target_len); + *equal = ucol_equal(collator, src, src_len, target, target_len); - return I18N_ERROR_NONE; + return I18N_ERROR_NONE; } int i18n_ucollator_create(const char *locale, i18n_ucollator_h *collator) { - retv_if(collator == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(collator == NULL, I18N_ERROR_INVALID_PARAMETER); - i18n_error_code_e err = I18N_ERROR_NONE; - *collator = ucol_open(locale, (UErrorCode *) & err); - int result = _i18n_error_mapping(err); + i18n_error_code_e err = I18N_ERROR_NONE; + *collator = ucol_open(locale, (UErrorCode *) & err); + int result = _i18n_error_mapping(err); - return result; + return result; } int i18n_ucollator_set_attribute(i18n_ucollator_h collator, i18n_ucollator_attribute_e attr, - i18n_ucollator_attribute_value_e val) + i18n_ucollator_attribute_value_e val) { - retv_if(collator == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(collator == NULL, I18N_ERROR_INVALID_PARAMETER); - i18n_error_code_e err = I18N_ERROR_NONE; - ucol_setAttribute(collator, attr, val, (UErrorCode *) & err); - int result = _i18n_error_mapping(err); + i18n_error_code_e err = I18N_ERROR_NONE; + ucol_setAttribute(collator, attr, val, (UErrorCode *) & err); + int result = _i18n_error_mapping(err); - return result; + return result; } int i18n_ucollator_set_strength(i18n_ucollator_h collator, i18n_ucollator_strength_e strength) { - retv_if(collator == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(collator == NULL, I18N_ERROR_INVALID_PARAMETER); - ucol_setStrength(collator, strength); + ucol_setStrength(collator, strength); - return I18N_ERROR_NONE; + return I18N_ERROR_NONE; } int i18n_ucollator_str_collator(const i18n_ucollator_h collator, const i18n_uchar *src, - int32_t src_len, const i18n_uchar *target, int32_t target_len, - i18n_ucollator_result_e *result) + int32_t src_len, const i18n_uchar *target, int32_t target_len, + i18n_ucollator_result_e *result) { - retv_if(collator == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(collator == NULL, I18N_ERROR_INVALID_PARAMETER); - *result = ucol_strcoll(collator, src, src_len, target, target_len); + *result = ucol_strcoll(collator, src, src_len, target, target_len); - return I18N_ERROR_NONE; + return I18N_ERROR_NONE; } diff --git a/src/utils_i18n_udate.c b/src/utils_i18n_udate.c index c0f3e8c..bdacce4 100644 --- a/src/utils_i18n_udate.c +++ b/src/utils_i18n_udate.c @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include @@ -19,337 +19,337 @@ #include int i18n_udate_create(i18n_udate_format_style_e time_style, i18n_udate_format_style_e date_style, - const char *locale, const i18n_uchar *tz_id, int32_t tz_id_len, - const i18n_uchar *pattern, int32_t pattern_len, i18n_udate_format_h *format) + const char *locale, const i18n_uchar *tz_id, int32_t tz_id_len, + const i18n_uchar *pattern, int32_t pattern_len, i18n_udate_format_h *format) { - retv_if(format == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(format == NULL, I18N_ERROR_INVALID_PARAMETER); - UErrorCode icu_error = U_ZERO_ERROR; - *format = - udat_open(time_style, date_style, locale, tz_id, tz_id_len, pattern, pattern_len, - &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + *format = + udat_open(time_style, date_style, locale, tz_id, tz_id_len, pattern, pattern_len, + &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } int i18n_udate_destroy(i18n_udate_format_h format) { - retv_if(format == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(format == NULL, I18N_ERROR_INVALID_PARAMETER); - udat_close(format); - return I18N_ERROR_NONE; + udat_close(format); + return I18N_ERROR_NONE; } int i18n_udate_format_date(const i18n_udate_format_h format, i18n_udate date_to_format, - i18n_uchar *result, int32_t result_len, i18n_ufield_position_h pos, - int32_t *buf_size_needed) + i18n_uchar *result, int32_t result_len, i18n_ufield_position_h pos, + int32_t *buf_size_needed) { - retv_if(format == NULL || buf_size_needed == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(format == NULL || buf_size_needed == NULL, I18N_ERROR_INVALID_PARAMETER); - UErrorCode icu_error = U_ZERO_ERROR; - *buf_size_needed = - udat_format(format, date_to_format, result, result_len, (UFieldPosition *) pos, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + *buf_size_needed = + udat_format(format, date_to_format, result, result_len, (UFieldPosition *) pos, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } -// Newly Added APIs +/* Newly Added APIs */ int i18n_udate_to_calendar_date_field(i18n_udate_format_field_e field, - i18n_ucalendar_date_fields_e *date_field_type) + i18n_ucalendar_date_fields_e *date_field_type) { - if (date_field_type == NULL) - return I18N_ERROR_INVALID_PARAMETER; - - switch (field) { - case I18N_UDATE_FORMAT_TIMEZONE_LOCALIZED_GMT_OFFSET_FIELD: - case I18N_UDATE_FORMAT_TIMEZONE_ISO_FIELD: - case I18N_UDATE_FORMAT_TIMEZONE_ISO_LOCAL_FIELD: - case I18N_UDATE_FORMAT_FIELD_COUNT: - LOGE("Unsupported field"); - return I18N_ERROR_INVALID_PARAMETER; - - default: - *date_field_type = (i18n_ucalendar_date_fields_e) udat_toCalendarDateField(field); - } - - return I18N_ERROR_NONE; + if (date_field_type == NULL) + return I18N_ERROR_INVALID_PARAMETER; + + switch (field) { + case I18N_UDATE_FORMAT_TIMEZONE_LOCALIZED_GMT_OFFSET_FIELD: + case I18N_UDATE_FORMAT_TIMEZONE_ISO_FIELD: + case I18N_UDATE_FORMAT_TIMEZONE_ISO_LOCAL_FIELD: + case I18N_UDATE_FORMAT_FIELD_COUNT: + LOGE("Unsupported field"); + return I18N_ERROR_INVALID_PARAMETER; + + default: + *date_field_type = (i18n_ucalendar_date_fields_e) udat_toCalendarDateField(field); + } + + return I18N_ERROR_NONE; } int i18n_udate_clone(const i18n_udate_format_h format, i18n_udate_format_h *format_clone) { - if (format == NULL || format_clone == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (format == NULL || format_clone == NULL) + return I18N_ERROR_INVALID_PARAMETER; - UErrorCode icu_error = U_ZERO_ERROR; - *format_clone = (i18n_udate_format_h) udat_clone((const UDateFormat *)format, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + *format_clone = (i18n_udate_format_h) udat_clone((const UDateFormat *)format, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } int i18n_udate_parse(const i18n_udate_format_h format, const i18n_uchar *text, int32_t text_length, - int32_t *parse_pos, i18n_udate *parsed_date) + int32_t *parse_pos, i18n_udate *parsed_date) { - if (format == NULL || text == NULL || text_length < -1 || parsed_date == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (format == NULL || text == NULL || text_length < -1 || parsed_date == NULL) + return I18N_ERROR_INVALID_PARAMETER; - UErrorCode icu_error = U_ZERO_ERROR; - *parsed_date = - udat_parse((const UDateFormat *)format, text, text_length, parse_pos, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + *parsed_date = + udat_parse((const UDateFormat *)format, text, text_length, parse_pos, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } int i18n_udate_parse_calendar(const i18n_udate_format_h format, i18n_ucalendar_h *calendar, - const i18n_uchar *text, int32_t text_length, int32_t *parse_pos) + const i18n_uchar *text, int32_t text_length, int32_t *parse_pos) { - if (format == NULL || calendar == NULL || text == NULL || text_length < -1) - return I18N_ERROR_INVALID_PARAMETER; + if (format == NULL || calendar == NULL || text == NULL || text_length < -1) + return I18N_ERROR_INVALID_PARAMETER; - UErrorCode icu_error = U_ZERO_ERROR; - udat_parseCalendar((const UDateFormat *)format, calendar, text, text_length, parse_pos, - &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + udat_parseCalendar((const UDateFormat *)format, calendar, text, text_length, parse_pos, + &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } i18n_ubool i18n_udate_is_lenient(const i18n_udate_format_h format) { - if (format == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return false; - } + if (format == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return false; + } - set_last_result(I18N_ERROR_NONE); - return udat_isLenient((const UDateFormat *)format); + set_last_result(I18N_ERROR_NONE); + return udat_isLenient((const UDateFormat *)format); } int i18n_udate_set_lenient(i18n_udate_format_h format, i18n_ubool is_lenient) { - if (format == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (format == NULL) + return I18N_ERROR_INVALID_PARAMETER; - udat_setLenient((UDateFormat *) format, is_lenient); - return I18N_ERROR_NONE; + udat_setLenient((UDateFormat *) format, is_lenient); + return I18N_ERROR_NONE; } int i18n_udate_get_calendar(const i18n_udate_format_h format, i18n_ucalendar_h *calendar) { - if (format == NULL || calendar == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (format == NULL || calendar == NULL) + return I18N_ERROR_INVALID_PARAMETER; - *calendar = (i18n_ucalendar_h) udat_getCalendar((const UDateFormat *)format); + *calendar = (i18n_ucalendar_h) udat_getCalendar((const UDateFormat *)format); - return I18N_ERROR_NONE; + return I18N_ERROR_NONE; } int i18n_udate_set_calendar(i18n_udate_format_h format, const i18n_ucalendar_h calendar_to_set) { - if (format == NULL || calendar_to_set == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (format == NULL || calendar_to_set == NULL) + return I18N_ERROR_INVALID_PARAMETER; - udat_setCalendar((UDateFormat *) format, (const UCalendar *)calendar_to_set); - return I18N_ERROR_NONE; + udat_setCalendar((UDateFormat *) format, (const UCalendar *)calendar_to_set); + return I18N_ERROR_NONE; } int i18n_udate_get_number_format(const i18n_udate_format_h format, - i18n_unumber_format_h *number_format) + i18n_unumber_format_h *number_format) { - if (format == NULL || number_format == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (format == NULL || number_format == NULL) + return I18N_ERROR_INVALID_PARAMETER; - set_last_result(I18N_ERROR_NONE); - *number_format = (i18n_unumber_format_h) udat_getNumberFormat((const UDateFormat *)format); - return I18N_ERROR_NONE; + set_last_result(I18N_ERROR_NONE); + *number_format = (i18n_unumber_format_h) udat_getNumberFormat((const UDateFormat *)format); + return I18N_ERROR_NONE; } int i18n_udate_set_number_format(i18n_udate_format_h format, - const i18n_unumber_format_h number_format_to_set) + const i18n_unumber_format_h number_format_to_set) { - if (format == NULL || number_format_to_set == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (format == NULL || number_format_to_set == NULL) + return I18N_ERROR_INVALID_PARAMETER; - udat_setNumberFormat((UDateFormat *) format, (const UNumberFormat *)number_format_to_set); - return I18N_ERROR_NONE; + udat_setNumberFormat((UDateFormat *) format, (const UNumberFormat *)number_format_to_set); + return I18N_ERROR_NONE; } const char *i18n_udate_get_available(int32_t locale_index) { - if (locale_index < 0) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } + if (locale_index < 0) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } - set_last_result(I18N_ERROR_NONE); - return udat_getAvailable(locale_index); + set_last_result(I18N_ERROR_NONE); + return udat_getAvailable(locale_index); } int32_t i18n_udate_count_available(void) { - set_last_result(I18N_ERROR_NONE); - return udat_countAvailable(); + set_last_result(I18N_ERROR_NONE); + return udat_countAvailable(); } int i18n_udate_get_2digit_year_start(const i18n_udate_format_h format, i18n_udate *year) { - if (format == NULL || year == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (format == NULL || year == NULL) + return I18N_ERROR_INVALID_PARAMETER; - UErrorCode icu_error = U_ZERO_ERROR; - *year = (i18n_udate) udat_get2DigitYearStart((const UDateFormat *)format, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + *year = (i18n_udate) udat_get2DigitYearStart((const UDateFormat *)format, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } int i18n_udate_set_2digit_year_start(i18n_udate_format_h format, i18n_udate date) { - if (format == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (format == NULL) + return I18N_ERROR_INVALID_PARAMETER; - UErrorCode icu_error = U_ZERO_ERROR; - udat_set2DigitYearStart((UDateFormat *) format, date, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + udat_set2DigitYearStart((UDateFormat *) format, date, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } int32_t i18n_udate_to_pattern(const i18n_udate_format_h format, i18n_ubool localized, - i18n_uchar *result, int32_t result_length) + i18n_uchar *result, int32_t result_length) { - if (format == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return -1; - } + if (format == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return -1; + } - UErrorCode icu_error = U_ZERO_ERROR; - int32_t needed_buffer_size = - udat_toPattern((const UDateFormat *)format, localized, result, result_length, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + int32_t needed_buffer_size = + udat_toPattern((const UDateFormat *)format, localized, result, result_length, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - set_last_result(i18n_error); - return needed_buffer_size; + set_last_result(i18n_error); + return needed_buffer_size; } int i18n_udate_apply_pattern(i18n_udate_format_h format, i18n_ubool localized, - const i18n_uchar *pattern, int32_t pattern_length) + const i18n_uchar *pattern, int32_t pattern_length) { - if (format == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (format == NULL) + return I18N_ERROR_INVALID_PARAMETER; - udat_applyPattern((UDateFormat *) format, localized, pattern, pattern_length); - return I18N_ERROR_NONE; + udat_applyPattern((UDateFormat *) format, localized, pattern, pattern_length); + return I18N_ERROR_NONE; } int32_t i18n_udate_get_symbols(const i18n_udate_format_h format, - i18n_udate_format_symbol_type_e type, int32_t symbol_index, - i18n_uchar *result, int32_t result_length) + i18n_udate_format_symbol_type_e type, int32_t symbol_index, + i18n_uchar *result, int32_t result_length) { - if (format == NULL || type < I18N_UDATE_FORMAT_SYMBOL_TYPE_ERAS - || type > I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_SHORTER_WEEKDAYS || symbol_index < 0) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return -1; - } - - UErrorCode icu_error = U_ZERO_ERROR; - int32_t needed_buffer_size = - udat_getSymbols((const UDateFormat *)format, type, symbol_index, result, result_length, - &icu_error); - - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - - set_last_result(i18n_error); - return needed_buffer_size; + if (format == NULL || type < I18N_UDATE_FORMAT_SYMBOL_TYPE_ERAS + || type > I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_SHORTER_WEEKDAYS || symbol_index < 0) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return -1; + } + + UErrorCode icu_error = U_ZERO_ERROR; + int32_t needed_buffer_size = + udat_getSymbols((const UDateFormat *)format, type, symbol_index, result, result_length, + &icu_error); + + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + + set_last_result(i18n_error); + return needed_buffer_size; } int32_t i18n_udate_count_symbols(const i18n_udate_format_h format, - i18n_udate_format_symbol_type_e type) + i18n_udate_format_symbol_type_e type) { - if (format == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (format == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - set_last_result(I18N_ERROR_NONE); - return udat_countSymbols((const UDateFormat *)format, type); + set_last_result(I18N_ERROR_NONE); + return udat_countSymbols((const UDateFormat *)format, type); } int i18n_udate_set_symbols(i18n_udate_format_h format, i18n_udate_format_symbol_type_e type, - int32_t symbol_index, i18n_uchar *value, int32_t value_length) + int32_t symbol_index, i18n_uchar *value, int32_t value_length) { - if (format == NULL || symbol_index < 0 || value_length < -1) - return I18N_ERROR_INVALID_PARAMETER; + if (format == NULL || symbol_index < 0 || value_length < -1) + return I18N_ERROR_INVALID_PARAMETER; - UErrorCode icu_error = U_ZERO_ERROR; - udat_setSymbols((UDateFormat *) format, type, symbol_index, value, value_length, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + udat_setSymbols((UDateFormat *) format, type, symbol_index, value, value_length, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } const char *i18n_udate_get_locale_by_type(const i18n_udate_format_h format, - i18n_ulocale_data_locale_type_e type) + i18n_ulocale_data_locale_type_e type) { - if (format == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } + if (format == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } - UErrorCode icu_error = U_ZERO_ERROR; - const char *locale_name = udat_getLocaleByType((const UDateFormat *)format, type, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + const char *locale_name = udat_getLocaleByType((const UDateFormat *)format, type, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - set_last_result(i18n_error); - return locale_name; + set_last_result(i18n_error); + return locale_name; } int i18n_udate_set_context(i18n_udate_format_h format, i18n_udisplay_context_e value) { - if (format == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (format == NULL) + return I18N_ERROR_INVALID_PARAMETER; - UErrorCode icu_error = U_ZERO_ERROR; - udat_setContext((UDateFormat *) format, value, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + udat_setContext((UDateFormat *) format, value, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } diff --git a/src/utils_i18n_udatepg.c b/src/utils_i18n_udatepg.c old mode 100755 new mode 100644 index 8078f22..92d95b3 --- a/src/utils_i18n_udatepg.c +++ b/src/utils_i18n_udatepg.c @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include @@ -20,338 +20,338 @@ int i18n_udatepg_create(const char *locale, i18n_udatepg_h *dtpg) { - retv_if(dtpg == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(dtpg == NULL, I18N_ERROR_INVALID_PARAMETER); - UErrorCode icu_error = U_ZERO_ERROR; - *dtpg = udatpg_open(locale, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + *dtpg = udatpg_open(locale, &icu_error); - return _i18n_error_mapping(icu_error); + return _i18n_error_mapping(icu_error); } int i18n_udatepg_destroy(i18n_udatepg_h dtpg) { - retv_if(dtpg == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(dtpg == NULL, I18N_ERROR_INVALID_PARAMETER); - udatpg_close(dtpg); + udatpg_close(dtpg); - return I18N_ERROR_NONE; + return I18N_ERROR_NONE; } int i18n_udatepg_get_best_pattern(i18n_udatepg_h dtpg, const i18n_uchar *skeleton, int32_t len, - i18n_uchar *best_pattern, int32_t capacity, - int32_t *best_pattern_len) + i18n_uchar *best_pattern, int32_t capacity, + int32_t *best_pattern_len) { - retv_if(dtpg == NULL, I18N_ERROR_INVALID_PARAMETER); - retv_if(skeleton == NULL, I18N_ERROR_INVALID_PARAMETER); - retv_if(len < 0, I18N_ERROR_INVALID_PARAMETER); - retv_if(capacity < 0, I18N_ERROR_INVALID_PARAMETER); + retv_if(dtpg == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(skeleton == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(len < 0, I18N_ERROR_INVALID_PARAMETER); + retv_if(capacity < 0, I18N_ERROR_INVALID_PARAMETER); - UErrorCode icu_error = U_ZERO_ERROR; - *best_pattern_len = - udatpg_getBestPattern(dtpg, skeleton, len, best_pattern, capacity, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + *best_pattern_len = + udatpg_getBestPattern(dtpg, skeleton, len, best_pattern, capacity, &icu_error); - return _i18n_error_mapping(icu_error); + return _i18n_error_mapping(icu_error); } -// Newly Added APIs +/* Newly Added APIs */ int i18n_udatepg_create_empty(i18n_udatepg_h *dtpg) { - if (dtpg == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (dtpg == NULL) + return I18N_ERROR_INVALID_PARAMETER; - UErrorCode icu_error = U_ZERO_ERROR; - *dtpg = (i18n_udatepg_h) udatpg_openEmpty(&icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + *dtpg = (i18n_udatepg_h) udatpg_openEmpty(&icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } int i18n_udatepg_clone(const i18n_udatepg_h dtpg, i18n_udatepg_h *dtpg_clone) { - if (dtpg == NULL || NULL == dtpg_clone) - return I18N_ERROR_INVALID_PARAMETER; + if (dtpg == NULL || NULL == dtpg_clone) + return I18N_ERROR_INVALID_PARAMETER; - UErrorCode icu_error = U_ZERO_ERROR; - *dtpg_clone = (i18n_udatepg_h) udatpg_clone((UDateTimePatternGenerator *) dtpg, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + *dtpg_clone = (i18n_udatepg_h) udatpg_clone((UDateTimePatternGenerator *) dtpg, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - return i18n_error; + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + return i18n_error; } int32_t i18n_udatepg_get_best_pattern_with_options(i18n_udatepg_h dtpg, const i18n_uchar *skeleton, - int32_t length, - i18n_udatepg_date_time_pattern_match_options_e - options, i18n_uchar *best_pattern, - int32_t capacity) + int32_t length, + i18n_udatepg_date_time_pattern_match_options_e + options, i18n_uchar *best_pattern, + int32_t capacity) { - if (dtpg == NULL || skeleton == NULL || length < 0 || capacity < 0) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } - - UErrorCode icu_error = U_ZERO_ERROR; - int32_t length_of_best_pattern = - udatpg_getBestPatternWithOptions((UDateTimePatternGenerator *) dtpg, skeleton, length, - options, best_pattern, capacity, &icu_error); - - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return length_of_best_pattern; + if (dtpg == NULL || skeleton == NULL || length < 0 || capacity < 0) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } + + UErrorCode icu_error = U_ZERO_ERROR; + int32_t length_of_best_pattern = + udatpg_getBestPatternWithOptions((UDateTimePatternGenerator *) dtpg, skeleton, length, + options, best_pattern, capacity, &icu_error); + + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return length_of_best_pattern; } int32_t i18n_udatepg_get_skeleton(i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t length, - i18n_uchar *skeleton, int32_t capacity) + i18n_uchar *skeleton, int32_t capacity) { - if (dtpg == NULL || pattern == NULL || length < 0 || capacity < 0) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } - - UErrorCode icu_error = U_ZERO_ERROR; - int32_t length_of_skeleton = - udatpg_getSkeleton((UDateTimePatternGenerator *) dtpg, pattern, length, skeleton, capacity, - &icu_error); - - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return length_of_skeleton; + if (dtpg == NULL || pattern == NULL || length < 0 || capacity < 0) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } + + UErrorCode icu_error = U_ZERO_ERROR; + int32_t length_of_skeleton = + udatpg_getSkeleton((UDateTimePatternGenerator *) dtpg, pattern, length, skeleton, capacity, + &icu_error); + + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return length_of_skeleton; } int32_t i18n_udatepg_get_base_skeleton(i18n_udatepg_h dtpg, const i18n_uchar *pattern, - int32_t length, i18n_uchar *base_skeleton, int32_t capacity) + int32_t length, i18n_uchar *base_skeleton, int32_t capacity) { - if (dtpg == NULL || pattern == NULL || length < -1 || capacity < 0) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } - - UErrorCode icu_error = U_ZERO_ERROR; - int32_t length_of_skeleton = - udatpg_getBaseSkeleton((UDateTimePatternGenerator *) dtpg, pattern, length, base_skeleton, - capacity, &icu_error); - - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return length_of_skeleton; + if (dtpg == NULL || pattern == NULL || length < -1 || capacity < 0) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } + + UErrorCode icu_error = U_ZERO_ERROR; + int32_t length_of_skeleton = + udatpg_getBaseSkeleton((UDateTimePatternGenerator *) dtpg, pattern, length, base_skeleton, + capacity, &icu_error); + + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return length_of_skeleton; } int32_t i18n_udatepg_add_pattern(i18n_udatepg_h dtpg, const i18n_uchar *pattern, - int32_t pattern_length, i18n_ubool override, - i18n_uchar *conflicting_pattern, int32_t capacity, - i18n_udatepg_date_time_pattern_conflict_e *conflict_status) + int32_t pattern_length, i18n_ubool override, + i18n_uchar *conflicting_pattern, int32_t capacity, + i18n_udatepg_date_time_pattern_conflict_e *conflict_status) { - if (dtpg == NULL || pattern == NULL || pattern_length < 0 || capacity < 0) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return -1; - } - - int32_t confliction_pattern_length; - UErrorCode icu_error = U_ZERO_ERROR; - *conflict_status = - udatpg_addPattern((UDateTimePatternGenerator *) dtpg, pattern, pattern_length, override, - conflicting_pattern, capacity, &confliction_pattern_length, &icu_error); - - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return confliction_pattern_length; + if (dtpg == NULL || pattern == NULL || pattern_length < 0 || capacity < 0) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return -1; + } + + int32_t confliction_pattern_length; + UErrorCode icu_error = U_ZERO_ERROR; + *conflict_status = + udatpg_addPattern((UDateTimePatternGenerator *) dtpg, pattern, pattern_length, override, + conflicting_pattern, capacity, &confliction_pattern_length, &icu_error); + + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return confliction_pattern_length; } int i18n_udatepg_set_append_item_format(i18n_udatepg_h dtpg, - i18n_udatepg_date_time_pattern_field_e field, - const i18n_uchar *value, int32_t length) + i18n_udatepg_date_time_pattern_field_e field, + const i18n_uchar *value, int32_t length) { - if (dtpg == NULL || field < I18N_UDATEPG_ERA_FIELD || field >= I18N_UDATEPG_FIELD_COUNT - || value == NULL || length < 0) - return I18N_ERROR_INVALID_PARAMETER; + if (dtpg == NULL || field < I18N_UDATEPG_ERA_FIELD || field >= I18N_UDATEPG_FIELD_COUNT + || value == NULL || length < 0) + return I18N_ERROR_INVALID_PARAMETER; - udatpg_setAppendItemFormat((UDateTimePatternGenerator *) dtpg, field, value, length); - return I18N_ERROR_NONE; + udatpg_setAppendItemFormat((UDateTimePatternGenerator *) dtpg, field, value, length); + return I18N_ERROR_NONE; } const i18n_uchar *i18n_udatepg_get_append_item_format(const i18n_udatepg_h dtpg, - i18n_udatepg_date_time_pattern_field_e field, - int32_t *pattern_length) + i18n_udatepg_date_time_pattern_field_e field, + int32_t *pattern_length) { - if (dtpg == NULL || field < I18N_UDATEPG_ERA_FIELD || field >= I18N_UDATEPG_FIELD_COUNT) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } + if (dtpg == NULL || field < I18N_UDATEPG_ERA_FIELD || field >= I18N_UDATEPG_FIELD_COUNT) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } - set_last_result(I18N_ERROR_NONE); - return udatpg_getAppendItemFormat((UDateTimePatternGenerator *) dtpg, field, pattern_length); + set_last_result(I18N_ERROR_NONE); + return udatpg_getAppendItemFormat((UDateTimePatternGenerator *) dtpg, field, pattern_length); } int i18n_udatepg_set_append_item_name(i18n_udatepg_h dtpg, - i18n_udatepg_date_time_pattern_field_e field, - const i18n_uchar *value, int32_t length) + i18n_udatepg_date_time_pattern_field_e field, + const i18n_uchar *value, int32_t length) { - if (dtpg == NULL || field < I18N_UDATEPG_ERA_FIELD || field >= I18N_UDATEPG_FIELD_COUNT - || value == NULL || length < 0) - return I18N_ERROR_INVALID_PARAMETER; + if (dtpg == NULL || field < I18N_UDATEPG_ERA_FIELD || field >= I18N_UDATEPG_FIELD_COUNT + || value == NULL || length < 0) + return I18N_ERROR_INVALID_PARAMETER; - udatpg_setAppendItemName((UDateTimePatternGenerator *) dtpg, field, value, length); - return I18N_ERROR_NONE; + udatpg_setAppendItemName((UDateTimePatternGenerator *) dtpg, field, value, length); + return I18N_ERROR_NONE; } const i18n_uchar *i18n_udatepg_get_append_item_name(const i18n_udatepg_h dtpg, - i18n_udatepg_date_time_pattern_field_e field, - int32_t *pattern_length) + i18n_udatepg_date_time_pattern_field_e field, + int32_t *pattern_length) { - if (dtpg == NULL || field < I18N_UDATEPG_ERA_FIELD || field >= I18N_UDATEPG_FIELD_COUNT) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } + if (dtpg == NULL || field < I18N_UDATEPG_ERA_FIELD || field >= I18N_UDATEPG_FIELD_COUNT) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } - set_last_result(I18N_ERROR_NONE); - return udatpg_getAppendItemName((UDateTimePatternGenerator *) dtpg, field, pattern_length); + set_last_result(I18N_ERROR_NONE); + return udatpg_getAppendItemName((UDateTimePatternGenerator *) dtpg, field, pattern_length); } int i18n_udatepg_set_date_time_format(const i18n_udatepg_h dtpg, - const i18n_uchar *date_time_format, int32_t length) + const i18n_uchar *date_time_format, int32_t length) { - if (dtpg == NULL || date_time_format == NULL || length < 0) - return I18N_ERROR_INVALID_PARAMETER; + if (dtpg == NULL || date_time_format == NULL || length < 0) + return I18N_ERROR_INVALID_PARAMETER; - udatpg_setDateTimeFormat((UDateTimePatternGenerator *) dtpg, date_time_format, length); - return I18N_ERROR_NONE; + udatpg_setDateTimeFormat((UDateTimePatternGenerator *) dtpg, date_time_format, length); + return I18N_ERROR_NONE; } const i18n_uchar *i18n_udatepg_get_date_time_format(const i18n_udatepg_h dtpg, - int32_t *pattern_length) + int32_t *pattern_length) { - if (dtpg == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } + if (dtpg == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } - set_last_result(I18N_ERROR_NONE); - return udatpg_getDateTimeFormat((UDateTimePatternGenerator *) dtpg, pattern_length); + set_last_result(I18N_ERROR_NONE); + return udatpg_getDateTimeFormat((UDateTimePatternGenerator *) dtpg, pattern_length); } int i18n_udatepg_set_decimal(i18n_udatepg_h dtpg, const i18n_uchar *decimal, int32_t length) { - if (dtpg == NULL || decimal == NULL || length < 0) - return I18N_ERROR_INVALID_PARAMETER; + if (dtpg == NULL || decimal == NULL || length < 0) + return I18N_ERROR_INVALID_PARAMETER; - udatpg_setDecimal((UDateTimePatternGenerator *) dtpg, decimal, length); - return I18N_ERROR_NONE; + udatpg_setDecimal((UDateTimePatternGenerator *) dtpg, decimal, length); + return I18N_ERROR_NONE; } const i18n_uchar *i18n_udatepg_get_decimal(const i18n_udatepg_h dtpg, int32_t *pattern_length) { - if (dtpg == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } + if (dtpg == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } - set_last_result(I18N_ERROR_NONE); - return udatpg_getDecimal((UDateTimePatternGenerator *) dtpg, pattern_length); + set_last_result(I18N_ERROR_NONE); + return udatpg_getDecimal((UDateTimePatternGenerator *) dtpg, pattern_length); } int32_t i18n_udatepg_replace_field_types(i18n_udatepg_h dtpg, const i18n_uchar *pattern, - int32_t pattern_length, const i18n_uchar *skeleton, - int32_t skeleton_length, i18n_uchar *dest, - int32_t dest_capacity) + int32_t pattern_length, const i18n_uchar *skeleton, + int32_t skeleton_length, i18n_uchar *dest, + int32_t dest_capacity) { - if (dtpg == NULL || pattern == NULL || pattern_length < 0 || skeleton == NULL - || skeleton_length < 0 || dest_capacity < 0) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } - - UErrorCode icu_error = U_ZERO_ERROR; - int32_t length_of_dest = - udatpg_replaceFieldTypes((UDateTimePatternGenerator *) dtpg, pattern, pattern_length, - skeleton, skeleton_length, dest, dest_capacity, &icu_error); - - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return length_of_dest; + if (dtpg == NULL || pattern == NULL || pattern_length < 0 || skeleton == NULL + || skeleton_length < 0 || dest_capacity < 0) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } + + UErrorCode icu_error = U_ZERO_ERROR; + int32_t length_of_dest = + udatpg_replaceFieldTypes((UDateTimePatternGenerator *) dtpg, pattern, pattern_length, + skeleton, skeleton_length, dest, dest_capacity, &icu_error); + + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return length_of_dest; } int32_t i18n_udatepg_replace_field_types_with_options(i18n_udatepg_h dtpg, - const i18n_uchar *pattern, - int32_t pattern_length, - const i18n_uchar *skeleton, - int32_t skeleton_length, - i18n_udatepg_date_time_pattern_match_options_e - options, i18n_uchar *dest, - int32_t dest_capacity) + const i18n_uchar *pattern, + int32_t pattern_length, + const i18n_uchar *skeleton, + int32_t skeleton_length, + i18n_udatepg_date_time_pattern_match_options_e + options, i18n_uchar *dest, + int32_t dest_capacity) { - if (dtpg == NULL || pattern == NULL || pattern_length < 0 || skeleton == NULL - || skeleton_length < 0 || dest_capacity < 0) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } - - UErrorCode icu_error = U_ZERO_ERROR; - int32_t length_of_dest = - udatpg_replaceFieldTypesWithOptions((UDateTimePatternGenerator *) dtpg, pattern, - pattern_length, skeleton, skeleton_length, options, - dest, dest_capacity, &icu_error); - - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return length_of_dest; + if (dtpg == NULL || pattern == NULL || pattern_length < 0 || skeleton == NULL + || skeleton_length < 0 || dest_capacity < 0) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } + + UErrorCode icu_error = U_ZERO_ERROR; + int32_t length_of_dest = + udatpg_replaceFieldTypesWithOptions((UDateTimePatternGenerator *) dtpg, pattern, + pattern_length, skeleton, skeleton_length, options, + dest, dest_capacity, &icu_error); + + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return length_of_dest; } int i18n_udatepg_skeletons_create(const i18n_udatepg_h dtpg, i18n_uenumeration_h *enumeration) { - if (dtpg == NULL || NULL == enumeration) - return I18N_ERROR_INVALID_PARAMETER; + if (dtpg == NULL || NULL == enumeration) + return I18N_ERROR_INVALID_PARAMETER; - UErrorCode icu_error = U_ZERO_ERROR; - *enumeration = udatpg_openSkeletons((const UDateTimePatternGenerator *)dtpg, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + *enumeration = udatpg_openSkeletons((const UDateTimePatternGenerator *)dtpg, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - return i18n_error; + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + return i18n_error; } int i18n_udatepg_base_skeletons_create(const i18n_udatepg_h dtpg, i18n_uenumeration_h *enumeration) { - if (dtpg == NULL || NULL == enumeration) - return I18N_ERROR_INVALID_PARAMETER; + if (dtpg == NULL || NULL == enumeration) + return I18N_ERROR_INVALID_PARAMETER; - UErrorCode icu_error = U_ZERO_ERROR; - *enumeration = udatpg_openBaseSkeletons((const UDateTimePatternGenerator *)dtpg, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + *enumeration = udatpg_openBaseSkeletons((const UDateTimePatternGenerator *)dtpg, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - return i18n_error; + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + return i18n_error; } const i18n_uchar *i18n_udatepg_get_pattern_for_skeleton(const i18n_udatepg_h dtpg, - const i18n_uchar *skeleton, - int32_t skeleton_length, - int32_t *pattern_length) + const i18n_uchar *skeleton, + int32_t skeleton_length, + int32_t *pattern_length) { - if (dtpg == NULL || skeleton == NULL || skeleton_length < 0) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } - - set_last_result(I18N_ERROR_NONE); - return udatpg_getPatternForSkeleton((const UDateTimePatternGenerator *)dtpg, skeleton, - skeleton_length, pattern_length); + if (dtpg == NULL || skeleton == NULL || skeleton_length < 0) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } + + set_last_result(I18N_ERROR_NONE); + return udatpg_getPatternForSkeleton((const UDateTimePatternGenerator *)dtpg, skeleton, + skeleton_length, pattern_length); } diff --git a/src/utils_i18n_uenumeration.c b/src/utils_i18n_uenumeration.c old mode 100755 new mode 100644 index 8f9e982..044f903 --- a/src/utils_i18n_uenumeration.c +++ b/src/utils_i18n_uenumeration.c @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include @@ -20,106 +20,106 @@ int i18n_uenumeration_destroy(i18n_uenumeration_h enumeration) { - if (enumeration == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (enumeration == NULL) + return I18N_ERROR_INVALID_PARAMETER; - uenum_close((UEnumeration *) enumeration); - return I18N_ERROR_NONE; + uenum_close((UEnumeration *) enumeration); + return I18N_ERROR_NONE; } int32_t i18n_uenumeration_count(i18n_uenumeration_h enumeration) { - if (enumeration == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return -1; - } - - UErrorCode icu_error = U_ZERO_ERROR; - int32_t number_of_elements = uenum_count((UEnumeration *) enumeration, &icu_error); - - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return number_of_elements; + if (enumeration == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return -1; + } + + UErrorCode icu_error = U_ZERO_ERROR; + int32_t number_of_elements = uenum_count((UEnumeration *) enumeration, &icu_error); + + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return number_of_elements; } const i18n_uchar *i18n_uenumeration_unext(i18n_uenumeration_h enumeration, int32_t *result_length) { - if (enumeration == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } - - UErrorCode icu_error = U_ZERO_ERROR; - const UChar *ustring = uenum_unext((UEnumeration *) enumeration, result_length, &icu_error); - - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return ustring; + if (enumeration == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } + + UErrorCode icu_error = U_ZERO_ERROR; + const UChar *ustring = uenum_unext((UEnumeration *) enumeration, result_length, &icu_error); + + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return ustring; } const char *i18n_uenumeration_next(i18n_uenumeration_h enumeration, int32_t *result_length) { - if (enumeration == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } - - UErrorCode icu_error = U_ZERO_ERROR; - const char *string = uenum_next((UEnumeration *) enumeration, result_length, &icu_error); - - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return string; + if (enumeration == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } + + UErrorCode icu_error = U_ZERO_ERROR; + const char *string = uenum_next((UEnumeration *) enumeration, result_length, &icu_error); + + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return string; } int i18n_uenumeration_reset(i18n_uenumeration_h enumeration) { - if (enumeration == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (enumeration == NULL) + return I18N_ERROR_INVALID_PARAMETER; - UErrorCode icu_error = U_ZERO_ERROR; - uenum_reset((UEnumeration *) enumeration, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + uenum_reset((UEnumeration *) enumeration, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - return i18n_error; + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + return i18n_error; } int i18n_uenumeration_uchar_strings_enumeration_create(const i18n_uchar *const strings[], - int32_t count, - i18n_uenumeration_h *enumeration) + int32_t count, + i18n_uenumeration_h *enumeration) { - if (count < 0 || NULL == enumeration) - return I18N_ERROR_INVALID_PARAMETER; + if (count < 0 || NULL == enumeration) + return I18N_ERROR_INVALID_PARAMETER; - UErrorCode icu_error = U_ZERO_ERROR; - *enumeration = uenum_openUCharStringsEnumeration(strings, count, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + *enumeration = uenum_openUCharStringsEnumeration(strings, count, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - return i18n_error; + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + return i18n_error; } int i18n_uenumeration_char_strings_enumeration_create(const char *const strings[], int32_t count, - i18n_uenumeration_h *enumeration) + i18n_uenumeration_h *enumeration) { - if (count < 0 || NULL == enumeration) - return I18N_ERROR_INVALID_PARAMETER; + if (count < 0 || NULL == enumeration) + return I18N_ERROR_INVALID_PARAMETER; - UErrorCode icu_error = U_ZERO_ERROR; - *enumeration = - (i18n_uenumeration_h) uenum_openCharStringsEnumeration(strings, count, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + *enumeration = + (i18n_uenumeration_h) uenum_openCharStringsEnumeration(strings, count, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - return i18n_error; + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + return i18n_error; } diff --git a/src/utils_i18n_ulocale.c b/src/utils_i18n_ulocale.c old mode 100755 new mode 100644 index 8570cc1..ab91f1f --- a/src/utils_i18n_ulocale.c +++ b/src/utils_i18n_ulocale.c @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include @@ -20,449 +20,449 @@ int i18n_ulocale_get_default(const char **locale) { - retv_if(locale == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(locale == NULL, I18N_ERROR_INVALID_PARAMETER); - *locale = uloc_getDefault(); + *locale = uloc_getDefault(); - return I18N_ERROR_NONE; + return I18N_ERROR_NONE; } int i18n_ulocale_set_default(const char *locale_id) { - UErrorCode icu_error = U_ZERO_ERROR; - uloc_setDefault(locale_id, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + uloc_setDefault(locale_id, &icu_error); - return _i18n_error_mapping(icu_error); + return _i18n_error_mapping(icu_error); } int i18n_ulocale_get_language(const char *locale_id, char *language, int32_t language_capacity, - int32_t *buf_size_language) + int32_t *buf_size_language) { - retv_if(buf_size_language == NULL || language == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(buf_size_language == NULL || language == NULL, I18N_ERROR_INVALID_PARAMETER); - UErrorCode icu_error = U_ZERO_ERROR; - *buf_size_language = uloc_getLanguage(locale_id, language, language_capacity, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + *buf_size_language = uloc_getLanguage(locale_id, language, language_capacity, &icu_error); - return _i18n_error_mapping(icu_error); + return _i18n_error_mapping(icu_error); } int32_t i18n_ulocale_get_country(const char *locale_id, char *country, int32_t country_capacity, - int *error) + int *error) { - if (NULL == country || country_capacity < 0) { - if (NULL != error) - *error = I18N_ERROR_INVALID_PARAMETER; + if (NULL == country || country_capacity < 0) { + if (NULL != error) + *error = I18N_ERROR_INVALID_PARAMETER; - return 0; - } + return 0; + } - UErrorCode icu_error = U_ZERO_ERROR; - int32_t result = uloc_getCountry(locale_id, country, country_capacity, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + int32_t result = uloc_getCountry(locale_id, country, country_capacity, &icu_error); - if (NULL != error) - *error = _i18n_error_mapping(icu_error); + if (NULL != error) + *error = _i18n_error_mapping(icu_error); - return result; + return result; } int i18n_ulocale_get_display_name(const char *locale_id, const char *in_locale_id, - i18n_uchar *result_w, int32_t max_result_size, - int32_t *buf_size_display_name) + i18n_uchar *result_w, int32_t max_result_size, + int32_t *buf_size_display_name) { - retv_if(buf_size_display_name == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(buf_size_display_name == NULL, I18N_ERROR_INVALID_PARAMETER); - UErrorCode icu_error = U_ZERO_ERROR; - *buf_size_display_name = - uloc_getDisplayName(locale_id, in_locale_id, result_w, max_result_size, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + *buf_size_display_name = + uloc_getDisplayName(locale_id, in_locale_id, result_w, max_result_size, &icu_error); - return _i18n_error_mapping(icu_error); + return _i18n_error_mapping(icu_error); } const char *i18n_ulocale_get_available(int32_t n) { - if (n < 0) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } + if (n < 0) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } - set_last_result(I18N_ERROR_NONE); - return uloc_getAvailable(n); + set_last_result(I18N_ERROR_NONE); + return uloc_getAvailable(n); } int32_t i18n_ulocale_count_available(void) { - set_last_result(I18N_ERROR_NONE); - return uloc_countAvailable(); + set_last_result(I18N_ERROR_NONE); + return uloc_countAvailable(); } -// Newly Added APIs +/* Newly Added APIs */ int32_t i18n_ulocale_get_script(const char *locale_id, char *script, int32_t script_capacity) { - if (NULL == script || script_capacity < 0) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return -1; - } + if (NULL == script || script_capacity < 0) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return -1; + } - UErrorCode icu_error = U_ZERO_ERROR; - int32_t needed_buffer_size = uloc_getScript(locale_id, script, script_capacity, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + int32_t needed_buffer_size = uloc_getScript(locale_id, script, script_capacity, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return needed_buffer_size; + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return needed_buffer_size; } int32_t i18n_ulocale_get_variant(const char *locale_id, char *variant, int32_t variant_capacity) { - if (NULL == variant || variant_capacity < 0) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return -1; - } + if (NULL == variant || variant_capacity < 0) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return -1; + } - UErrorCode icu_error = U_ZERO_ERROR; - int32_t needed_buffer_size = uloc_getVariant(locale_id, variant, variant_capacity, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + int32_t needed_buffer_size = uloc_getVariant(locale_id, variant, variant_capacity, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return needed_buffer_size; + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return needed_buffer_size; } int32_t i18n_ulocale_get_name(const char *locale_id, char *name, int32_t name_capacity) { - UErrorCode icu_error = U_ZERO_ERROR; - int32_t needed_buffer_size = uloc_getName(locale_id, name, name_capacity, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + int32_t needed_buffer_size = uloc_getName(locale_id, name, name_capacity, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return needed_buffer_size; + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return needed_buffer_size; } int32_t i18n_ulocale_canonicalize(const char *locale_id, char *name, int32_t name_capacity) { - UErrorCode icu_error = U_ZERO_ERROR; - int32_t needed_buffer_size = uloc_canonicalize(locale_id, name, name_capacity, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + int32_t needed_buffer_size = uloc_canonicalize(locale_id, name, name_capacity, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return needed_buffer_size; + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return needed_buffer_size; } const char *i18n_ulocale_get_iso3_language(const char *locale_id) { - set_last_result(I18N_ERROR_NONE); - return uloc_getISO3Language(locale_id); + set_last_result(I18N_ERROR_NONE); + return uloc_getISO3Language(locale_id); } const char *i18n_ulocale_get_iso3_country(const char *locale_id) { - set_last_result(I18N_ERROR_NONE); - return uloc_getISO3Country(locale_id); + set_last_result(I18N_ERROR_NONE); + return uloc_getISO3Country(locale_id); } uint32_t i18n_ulocale_get_lcid(const char *locale_id) { - set_last_result(I18N_ERROR_NONE); - return uloc_getLCID(locale_id); + set_last_result(I18N_ERROR_NONE); + return uloc_getLCID(locale_id); } int32_t i18n_ulocale_get_display_language(const char *locale, const char *display_locale, - i18n_uchar *language, int32_t language_capacity) + i18n_uchar *language, int32_t language_capacity) { - UErrorCode icu_error = U_ZERO_ERROR; - int32_t needed_buffer_size = - uloc_getDisplayLanguage(locale, display_locale, language, language_capacity, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + int32_t needed_buffer_size = + uloc_getDisplayLanguage(locale, display_locale, language, language_capacity, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return needed_buffer_size; + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return needed_buffer_size; } int32_t i18n_ulocale_get_display_script(const char *locale, const char *display_locale, - i18n_uchar *script, int32_t script_capacity) + i18n_uchar *script, int32_t script_capacity) { - UErrorCode icu_error = U_ZERO_ERROR; - int32_t needed_buffer_size = - uloc_getDisplayScript(locale, display_locale, script, script_capacity, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + int32_t needed_buffer_size = + uloc_getDisplayScript(locale, display_locale, script, script_capacity, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return needed_buffer_size; + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return needed_buffer_size; } int32_t i18n_ulocale_get_display_country(const char *locale, const char *display_locale, - i18n_uchar *country, int32_t country_capacity) + i18n_uchar *country, int32_t country_capacity) { - UErrorCode icu_error = U_ZERO_ERROR; - int32_t needed_buffer_size = - uloc_getDisplayCountry(locale, display_locale, country, country_capacity, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + int32_t needed_buffer_size = + uloc_getDisplayCountry(locale, display_locale, country, country_capacity, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return needed_buffer_size; + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return needed_buffer_size; } int32_t i18n_ulocale_get_display_variant(const char *locale, const char *display_locale, - i18n_uchar *variant, int32_t variant_capacity) + i18n_uchar *variant, int32_t variant_capacity) { - UErrorCode icu_error = U_ZERO_ERROR; - int32_t needed_buffer_size = - uloc_getDisplayVariant(locale, display_locale, variant, variant_capacity, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + int32_t needed_buffer_size = + uloc_getDisplayVariant(locale, display_locale, variant, variant_capacity, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return needed_buffer_size; + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return needed_buffer_size; } int32_t i18n_ulocale_get_display_keyword(const char *keyword, const char *display_locale, - i18n_uchar *dest, int32_t dest_capacity) + i18n_uchar *dest, int32_t dest_capacity) { - UErrorCode icu_error = U_ZERO_ERROR; - int32_t needed_buffer_size = - uloc_getDisplayKeyword(keyword, display_locale, dest, dest_capacity, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + int32_t needed_buffer_size = + uloc_getDisplayKeyword(keyword, display_locale, dest, dest_capacity, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return needed_buffer_size; + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return needed_buffer_size; } int32_t i18n_ulocale_get_display_keyword_value(const char *locale, const char *keyword, - const char *display_locale, i18n_uchar *dest, - int32_t dest_capacity) + const char *display_locale, i18n_uchar *dest, + int32_t dest_capacity) { - UErrorCode icu_error = U_ZERO_ERROR; - int32_t needed_buffer_size = - uloc_getDisplayKeywordValue(locale, keyword, display_locale, dest, dest_capacity, - &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + int32_t needed_buffer_size = + uloc_getDisplayKeywordValue(locale, keyword, display_locale, dest, dest_capacity, + &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return needed_buffer_size; + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return needed_buffer_size; } const char *const *i18n_ulocale_get_iso_languages(void) { - set_last_result(I18N_ERROR_NONE); - return uloc_getISOLanguages(); + set_last_result(I18N_ERROR_NONE); + return uloc_getISOLanguages(); } const char *const *i18n_ulocale_get_iso_countries(void) { - set_last_result(I18N_ERROR_NONE); - return uloc_getISOCountries(); + set_last_result(I18N_ERROR_NONE); + return uloc_getISOCountries(); } int32_t i18n_ulocale_get_parent(const char *locale_id, char *parent, int32_t parent_capacity) { - if (NULL == parent || parent_capacity < 0) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return -1; - } + if (NULL == parent || parent_capacity < 0) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return -1; + } - UErrorCode icu_error = U_ZERO_ERROR; - int32_t len_of_loc = uloc_getParent(locale_id, parent, parent_capacity, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + int32_t len_of_loc = uloc_getParent(locale_id, parent, parent_capacity, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return len_of_loc; + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return len_of_loc; } int32_t i18n_ulocale_get_base_name(const char *locale_id, char *name, int32_t name_capacity) { - UErrorCode icu_error = U_ZERO_ERROR; - int32_t needed_buffer_size = uloc_getBaseName(locale_id, name, name_capacity, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + int32_t needed_buffer_size = uloc_getBaseName(locale_id, name, name_capacity, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return needed_buffer_size; + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return needed_buffer_size; } int i18n_ulocale_keywords_create(const char *locale_id, i18n_uenumeration_h *enumeration) { - if (NULL == enumeration) - return I18N_ERROR_INVALID_PARAMETER; + if (NULL == enumeration) + return I18N_ERROR_INVALID_PARAMETER; - UErrorCode icu_error = U_ZERO_ERROR; - *enumeration = (i18n_uenumeration_h) uloc_openKeywords(locale_id, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - return i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + *enumeration = (i18n_uenumeration_h) uloc_openKeywords(locale_id, &icu_error); + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + return i18n_error; } int32_t i18n_ulocale_get_keyword_value(const char *locale_id, const char *keyword_name, - char *buffer, int32_t buffer_capacity) + char *buffer, int32_t buffer_capacity) { - if (NULL == locale_id || NULL == keyword_name || NULL == buffer || buffer_capacity < 0) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return -1; - } + if (NULL == locale_id || NULL == keyword_name || NULL == buffer || buffer_capacity < 0) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return -1; + } - UErrorCode icu_error = U_ZERO_ERROR; - int32_t len_of_keyword = - uloc_getKeywordValue(locale_id, keyword_name, buffer, buffer_capacity, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + int32_t len_of_keyword = + uloc_getKeywordValue(locale_id, keyword_name, buffer, buffer_capacity, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return len_of_keyword; + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return len_of_keyword; } int32_t i18n_ulocale_set_keyword_value(const char *keyword_name, const char *keyword_value, - char *buffer, int32_t buffer_capacity) + char *buffer, int32_t buffer_capacity) { - if (NULL == keyword_name || NULL == buffer || buffer_capacity < 0) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return -1; - } + if (NULL == keyword_name || NULL == buffer || buffer_capacity < 0) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return -1; + } - UErrorCode icu_error = U_ZERO_ERROR; - int32_t needed_buffer_size = - uloc_setKeywordValue(keyword_name, keyword_value, buffer, buffer_capacity, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + int32_t needed_buffer_size = + uloc_setKeywordValue(keyword_name, keyword_value, buffer, buffer_capacity, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return needed_buffer_size; + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return needed_buffer_size; } int i18n_ulocale_get_character_orientation(const char *locale_id, - i18n_ulocale_layout_type_e *layout_type) + i18n_ulocale_layout_type_e *layout_type) { - if (NULL == layout_type) - return I18N_ERROR_INVALID_PARAMETER; + if (NULL == layout_type) + return I18N_ERROR_INVALID_PARAMETER; - UErrorCode icu_error = U_ZERO_ERROR; - *layout_type = uloc_getCharacterOrientation(locale_id, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + *layout_type = uloc_getCharacterOrientation(locale_id, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - return i18n_error; + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + return i18n_error; } int i18n_ulocale_get_line_orientation(const char *locale_id, - i18n_ulocale_layout_type_e *layout_type) + i18n_ulocale_layout_type_e *layout_type) { - if (NULL == layout_type) - return I18N_ERROR_INVALID_PARAMETER; + if (NULL == layout_type) + return I18N_ERROR_INVALID_PARAMETER; - UErrorCode icu_error = U_ZERO_ERROR; - *layout_type = uloc_getLineOrientation(locale_id, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + *layout_type = uloc_getLineOrientation(locale_id, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - return i18n_error; + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + return i18n_error; } int32_t i18n_ulocale_get_locale_for_lcid(uint32_t host_id, char *locale, int32_t locale_capacity) { - if (NULL == locale || locale_capacity < 0) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return -1; - } + if (NULL == locale || locale_capacity < 0) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return -1; + } - UErrorCode icu_error = U_ZERO_ERROR; - int32_t needed_buffer_size = - uloc_getLocaleForLCID(host_id, locale, locale_capacity, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + int32_t needed_buffer_size = + uloc_getLocaleForLCID(host_id, locale, locale_capacity, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return needed_buffer_size; + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return needed_buffer_size; } int32_t i18n_ulocale_add_likely_subtags(const char *locale_id, char *maximized_locale_id, - int32_t maximized_locale_id_capacity) + int32_t maximized_locale_id_capacity) { - UErrorCode icu_error = U_ZERO_ERROR; - int32_t needed_buffer_size = - uloc_addLikelySubtags(locale_id, maximized_locale_id, maximized_locale_id_capacity, - &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + int32_t needed_buffer_size = + uloc_addLikelySubtags(locale_id, maximized_locale_id, maximized_locale_id_capacity, + &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return needed_buffer_size; + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return needed_buffer_size; } int32_t i18n_ulocale_minimize_subtags(const char *locale_id, char *minimized_locale_id, - int32_t minimized_locale_id_capacity) + int32_t minimized_locale_id_capacity) { - UErrorCode icu_error = U_ZERO_ERROR; - int32_t needed_buffer_size = - uloc_minimizeSubtags(locale_id, minimized_locale_id, minimized_locale_id_capacity, - &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + int32_t needed_buffer_size = + uloc_minimizeSubtags(locale_id, minimized_locale_id, minimized_locale_id_capacity, + &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return needed_buffer_size; + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return needed_buffer_size; } int32_t i18n_ulocale_for_language_tag(const char *langtag, char *locale_id, - int32_t locale_id_capacity, int32_t *parsed_length) + int32_t locale_id_capacity, int32_t *parsed_length) { - if (NULL == langtag || NULL == locale_id || locale_id_capacity < 0) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return -1; - } + if (NULL == langtag || NULL == locale_id || locale_id_capacity < 0) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return -1; + } - UErrorCode icu_error = U_ZERO_ERROR; - int32_t len_of_loc = - uloc_forLanguageTag(langtag, locale_id, locale_id_capacity, parsed_length, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + int32_t len_of_loc = + uloc_forLanguageTag(langtag, locale_id, locale_id_capacity, parsed_length, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return len_of_loc; + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return len_of_loc; } int32_t i18n_ulocale_to_language_tag(const char *locale_id, char *langtag, int32_t langtag_capacity, - i18n_ubool strict) -{ - if (NULL == locale_id || NULL == langtag || langtag_capacity < 0) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return -1; - } - - UErrorCode icu_error = U_ZERO_ERROR; - int32_t len_of_loc = - uloc_toLanguageTag(locale_id, langtag, langtag_capacity, strict, &icu_error); - - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return len_of_loc; + i18n_ubool strict) +{ + if (NULL == locale_id || NULL == langtag || langtag_capacity < 0) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return -1; + } + + UErrorCode icu_error = U_ZERO_ERROR; + int32_t len_of_loc = + uloc_toLanguageTag(locale_id, langtag, langtag_capacity, strict, &icu_error); + + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return len_of_loc; } diff --git a/src/utils_i18n_unormalization.c b/src/utils_i18n_unormalization.c old mode 100755 new mode 100644 index 39563a2..fe66246 --- a/src/utils_i18n_unormalization.c +++ b/src/utils_i18n_unormalization.c @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include @@ -19,27 +19,27 @@ #include int i18n_unormalization_get_instance(const char *package_name, const char *name, - i18n_unormalization_mode_e mode, - i18n_unormalizer_h *normalizer) + i18n_unormalization_mode_e mode, + i18n_unormalizer_h *normalizer) { - i18n_error_code_e err = I18N_ERROR_NONE; - *normalizer = unorm2_getInstance(package_name, name, mode, (UErrorCode *) & err); - int result = _i18n_error_mapping(err); + i18n_error_code_e err = I18N_ERROR_NONE; + *normalizer = unorm2_getInstance(package_name, name, mode, (UErrorCode *) & err); + int result = _i18n_error_mapping(err); - return result; + return result; } int i18n_unormalization_normalize(i18n_unormalizer_h normalizer, const i18n_uchar *src, - int32_t len, i18n_uchar *dest, int32_t capacity, - int32_t *len_deststr) + int32_t len, i18n_uchar *dest, int32_t capacity, + int32_t *len_deststr) { - retv_if(normalizer == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(normalizer == NULL, I18N_ERROR_INVALID_PARAMETER); - i18n_error_code_e err = I18N_ERROR_NONE; - *len_deststr = - unorm2_normalize((UNormalizer2 *) normalizer, src, len, dest, capacity, - (UErrorCode *) & err); - int result = _i18n_error_mapping(err); + i18n_error_code_e err = I18N_ERROR_NONE; + *len_deststr = + unorm2_normalize((UNormalizer2 *) normalizer, src, len, dest, capacity, + (UErrorCode *) & err); + int result = _i18n_error_mapping(err); - return result; + return result; } diff --git a/src/utils_i18n_unumber.c b/src/utils_i18n_unumber.c old mode 100755 new mode 100644 index 7908a4d..6edabac --- a/src/utils_i18n_unumber.c +++ b/src/utils_i18n_unumber.c @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include @@ -20,422 +20,422 @@ #include int i18n_unumber_create(i18n_unumber_format_style_e style, const i18n_uchar *pattern, - int32_t pattern_len, const char *locale, i18n_uparse_error_s *parse_err, - i18n_unumber_format_h *num_format) + int32_t pattern_len, const char *locale, i18n_uparse_error_s *parse_err, + i18n_unumber_format_h *num_format) { - retv_if(num_format == NULL, I18N_ERROR_INVALID_PARAMETER); - retv_if(style > I18N_UNUMBER_CURRENCY_PLURAL, I18N_ERROR_INVALID_PARAMETER); + retv_if(num_format == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(style > I18N_UNUMBER_CURRENCY_PLURAL, I18N_ERROR_INVALID_PARAMETER); - UErrorCode icu_error = U_ZERO_ERROR; - *num_format = - unum_open(style, pattern, pattern_len, locale, (UParseError *) parse_err, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + *num_format = + unum_open(style, pattern, pattern_len, locale, (UParseError *) parse_err, &icu_error); - return _i18n_error_mapping(icu_error); + return _i18n_error_mapping(icu_error); } int i18n_unumber_destroy(i18n_unumber_format_h fmt) { - retv_if(fmt == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(fmt == NULL, I18N_ERROR_INVALID_PARAMETER); - unum_close(fmt); + unum_close(fmt); - return I18N_ERROR_NONE; + return I18N_ERROR_NONE; } int i18n_unumber_get_symbol(const i18n_unumber_format_h fmt, i18n_unumber_format_symbol_e symbol, - i18n_uchar *buffer, int32_t size, int32_t *len_symbol) + i18n_uchar *buffer, int32_t size, int32_t *len_symbol) { - retv_if(fmt == NULL || len_symbol == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(fmt == NULL || len_symbol == NULL, I18N_ERROR_INVALID_PARAMETER); - UErrorCode icu_error = U_ZERO_ERROR; - *len_symbol = unum_getSymbol(fmt, symbol, buffer, size, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + *len_symbol = unum_getSymbol(fmt, symbol, buffer, size, &icu_error); - return _i18n_error_mapping(icu_error); + return _i18n_error_mapping(icu_error); } -// Newly Added APIs +/* Newly Added APIs */ int i18n_unumber_clone(const i18n_unumber_format_h fmt, i18n_unumber_format_h *fmt_clone) { - if (fmt == NULL || NULL == fmt_clone) - return I18N_ERROR_INVALID_PARAMETER; + if (fmt == NULL || NULL == fmt_clone) + return I18N_ERROR_INVALID_PARAMETER; - UErrorCode icu_error = U_ZERO_ERROR; - *fmt_clone = (i18n_unumber_format_h) unum_clone(fmt, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + *fmt_clone = (i18n_unumber_format_h) unum_clone(fmt, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - return i18n_error; + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + return i18n_error; } int32_t i18n_unumber_format(const i18n_unumber_format_h fmt, int32_t number, i18n_uchar *result, - int32_t result_length, i18n_ufield_position_s *pos, - i18n_error_code_e *status) + int32_t result_length, i18n_ufield_position_s *pos, + i18n_error_code_e *status) { - if (NULL == fmt) { - if (NULL != status) - *status = I18N_ERROR_INVALID_PARAMETER; + if (NULL == fmt) { + if (NULL != status) + *status = I18N_ERROR_INVALID_PARAMETER; - return 0; - } + return 0; + } - UErrorCode icu_error = U_ZERO_ERROR; - int32_t result_unum_format = - unum_format(fmt, number, (UChar *) result, result_length, (UFieldPosition *) pos, - &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + int32_t result_unum_format = + unum_format(fmt, number, (UChar *) result, result_length, (UFieldPosition *) pos, + &icu_error); - if (NULL != status) { - ERR_MAPPING(icu_error, *status); - I18N_ERR(*status); - } + if (NULL != status) { + ERR_MAPPING(icu_error, *status); + I18N_ERR(*status); + } - return result_unum_format; + return result_unum_format; } int32_t i18n_unumber_format_int64(const i18n_unumber_format_h fmt, int64_t number, - i18n_uchar *result, int32_t result_length, - i18n_ufield_position_h pos) + i18n_uchar *result, int32_t result_length, + i18n_ufield_position_h pos) { - if (fmt == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } - - UErrorCode icu_error = U_ZERO_ERROR; - int32_t result_unum_formatInt64 = - unum_formatInt64(fmt, number, result, result_length, (UFieldPosition *) pos, &icu_error); - - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - set_last_result(i18n_error); - I18N_ERR(i18n_error); - return result_unum_formatInt64; + if (fmt == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } + + UErrorCode icu_error = U_ZERO_ERROR; + int32_t result_unum_formatInt64 = + unum_formatInt64(fmt, number, result, result_length, (UFieldPosition *) pos, &icu_error); + + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + set_last_result(i18n_error); + I18N_ERR(i18n_error); + return result_unum_formatInt64; } int32_t i18n_unumber_format_double(const i18n_unumber_format_h fmt, double number, - i18n_uchar *result, int32_t result_length, - i18n_ufield_position_h pos) + i18n_uchar *result, int32_t result_length, + i18n_ufield_position_h pos) { - if (fmt == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } - - UErrorCode icu_error = U_ZERO_ERROR; - int32_t result_unum_formatDouble = - unum_formatDouble(fmt, number, result, result_length, (UFieldPosition *) pos, &icu_error); - - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return result_unum_formatDouble; + if (fmt == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } + + UErrorCode icu_error = U_ZERO_ERROR; + int32_t result_unum_formatDouble = + unum_formatDouble(fmt, number, result, result_length, (UFieldPosition *) pos, &icu_error); + + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return result_unum_formatDouble; } int32_t i18n_unumber_format_decimal(const i18n_unumber_format_h fmt, const char *number, - int32_t length, i18n_uchar *result, int32_t result_length, - i18n_ufield_position_h pos) + int32_t length, i18n_uchar *result, int32_t result_length, + i18n_ufield_position_h pos) { - if (fmt == NULL || number == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } - - UErrorCode icu_error = U_ZERO_ERROR; - int32_t result_unum_formatDecimal = - unum_formatDecimal(fmt, number, length, result, result_length, (UFieldPosition *) pos, - &icu_error); - - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return result_unum_formatDecimal; + if (fmt == NULL || number == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } + + UErrorCode icu_error = U_ZERO_ERROR; + int32_t result_unum_formatDecimal = + unum_formatDecimal(fmt, number, length, result, result_length, (UFieldPosition *) pos, + &icu_error); + + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return result_unum_formatDecimal; } int32_t i18n_unumber_format_double_currency(const i18n_unumber_format_h fmt, double number, - i18n_uchar *currency, i18n_uchar *result, - int32_t result_length, i18n_ufield_position_h pos) + i18n_uchar *currency, i18n_uchar *result, + int32_t result_length, i18n_ufield_position_h pos) { - if (fmt == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } - - UErrorCode icu_error = U_ZERO_ERROR; - int32_t result_unum_formatDoubleCurrency = - unum_formatDoubleCurrency(fmt, number, currency, result, result_length, - (UFieldPosition *) pos, &icu_error); - - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return result_unum_formatDoubleCurrency; + if (fmt == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } + + UErrorCode icu_error = U_ZERO_ERROR; + int32_t result_unum_formatDoubleCurrency = + unum_formatDoubleCurrency(fmt, number, currency, result, result_length, + (UFieldPosition *) pos, &icu_error); + + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return result_unum_formatDoubleCurrency; } int32_t i18n_unumber_parse(const i18n_unumber_format_h fmt, const i18n_uchar *text, - int32_t text_length, int32_t *parse_pos) + int32_t text_length, int32_t *parse_pos) { - if (fmt == NULL || text == NULL || text_length < -1) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } - - UErrorCode icu_error = U_ZERO_ERROR; - int32_t result_unum_parse = unum_parse(fmt, text, text_length, parse_pos, &icu_error); - - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return result_unum_parse; + if (fmt == NULL || text == NULL || text_length < -1) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } + + UErrorCode icu_error = U_ZERO_ERROR; + int32_t result_unum_parse = unum_parse(fmt, text, text_length, parse_pos, &icu_error); + + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return result_unum_parse; } int64_t i18n_unumber_parse_int64(const i18n_unumber_format_h fmt, const i18n_uchar *text, - int32_t text_length, int32_t *parse_pos) + int32_t text_length, int32_t *parse_pos) { - if (fmt == NULL || text == NULL || text_length < -1) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } - - UErrorCode icu_error = U_ZERO_ERROR; - int64_t result_unum_parseInt64 = unum_parseInt64(fmt, text, text_length, parse_pos, &icu_error); - - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return result_unum_parseInt64; + if (fmt == NULL || text == NULL || text_length < -1) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } + + UErrorCode icu_error = U_ZERO_ERROR; + int64_t result_unum_parseInt64 = unum_parseInt64(fmt, text, text_length, parse_pos, &icu_error); + + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return result_unum_parseInt64; } double i18n_unumber_parse_double(const i18n_unumber_format_h fmt, const i18n_uchar *text, - int32_t text_length, int32_t *parse_pos) + int32_t text_length, int32_t *parse_pos) { - if (fmt == NULL || text == NULL || text_length < -1) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } - - UErrorCode icu_error = U_ZERO_ERROR; - double result_unum_parseDouble = - unum_parseDouble(fmt, text, text_length, parse_pos, &icu_error); - - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return result_unum_parseDouble; + if (fmt == NULL || text == NULL || text_length < -1) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } + + UErrorCode icu_error = U_ZERO_ERROR; + double result_unum_parseDouble = + unum_parseDouble(fmt, text, text_length, parse_pos, &icu_error); + + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return result_unum_parseDouble; } int32_t i18n_unumber_parse_decimal(const i18n_unumber_format_h fmt, const i18n_uchar *text, - int32_t text_length, int32_t *parse_pos, char *out_buf, - int32_t out_buf_length) + int32_t text_length, int32_t *parse_pos, char *out_buf, + int32_t out_buf_length) { - if (fmt == NULL || text == NULL || text_length < -1 || out_buf == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } - - UErrorCode icu_error = U_ZERO_ERROR; - int32_t result_unum_parseDecimal = - unum_parseDecimal(fmt, text, text_length, parse_pos, out_buf, out_buf_length, &icu_error); - - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return result_unum_parseDecimal; + if (fmt == NULL || text == NULL || text_length < -1 || out_buf == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } + + UErrorCode icu_error = U_ZERO_ERROR; + int32_t result_unum_parseDecimal = + unum_parseDecimal(fmt, text, text_length, parse_pos, out_buf, out_buf_length, &icu_error); + + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return result_unum_parseDecimal; } double i18n_unumber_parse_double_currency(const i18n_unumber_format_h fmt, const i18n_uchar *text, - int32_t text_length, int32_t *parse_pos, - i18n_uchar *currency) + int32_t text_length, int32_t *parse_pos, + i18n_uchar *currency) { - if (fmt == NULL || text == NULL || text_length < -1 || currency == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } - - UErrorCode icu_error = U_ZERO_ERROR; - int32_t result_unum_parseDoubleCurrency = - unum_parseDoubleCurrency(fmt, text, text_length, parse_pos, currency, &icu_error); - - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return result_unum_parseDoubleCurrency; + if (fmt == NULL || text == NULL || text_length < -1 || currency == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } + + UErrorCode icu_error = U_ZERO_ERROR; + int32_t result_unum_parseDoubleCurrency = + unum_parseDoubleCurrency(fmt, text, text_length, parse_pos, currency, &icu_error); + + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return result_unum_parseDoubleCurrency; } int i18n_unumber_apply_pattern(i18n_unumber_format_h format, i18n_ubool localized, - const i18n_uchar *pattern, int32_t pattern_length, - i18n_uparse_error_s *parse_error) + const i18n_uchar *pattern, int32_t pattern_length, + i18n_uparse_error_s *parse_error) { - if (format == NULL || pattern == NULL || pattern_length < -1) - return I18N_ERROR_INVALID_PARAMETER; + if (format == NULL || pattern == NULL || pattern_length < -1) + return I18N_ERROR_INVALID_PARAMETER; - UErrorCode icu_error = U_ZERO_ERROR; - unum_applyPattern(format, localized, pattern, pattern_length, (UParseError *) parse_error, - &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + unum_applyPattern(format, localized, pattern, pattern_length, (UParseError *) parse_error, + &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } const char *i18n_unumber_get_available(int32_t locale_index) { - if (locale_index < 0) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } + if (locale_index < 0) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } - set_last_result(I18N_ERROR_NONE); - return unum_getAvailable(locale_index); + set_last_result(I18N_ERROR_NONE); + return unum_getAvailable(locale_index); } int32_t i18n_unumber_count_available(void) { - set_last_result(I18N_ERROR_NONE); - return unum_countAvailable(); + set_last_result(I18N_ERROR_NONE); + return unum_countAvailable(); } int32_t i18n_unumber_get_attribute(const i18n_unumber_format_h fmt, - i18n_unumber_format_attribute_e attr) + i18n_unumber_format_attribute_e attr) { - if (fmt == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (fmt == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - set_last_result(I18N_ERROR_NONE); - return unum_getAttribute(fmt, attr); + set_last_result(I18N_ERROR_NONE); + return unum_getAttribute(fmt, attr); } int i18n_unumber_set_attribute(i18n_unumber_format_h fmt, i18n_unumber_format_attribute_e attr, - int32_t new_value) + int32_t new_value) { - if (fmt == NULL || attr == I18N_UNUMBER_ROUNDING_INCREMENT) - return I18N_ERROR_INVALID_PARAMETER; + if (fmt == NULL || attr == I18N_UNUMBER_ROUNDING_INCREMENT) + return I18N_ERROR_INVALID_PARAMETER; - unum_setAttribute(fmt, attr, new_value); - return I18N_ERROR_NONE; + unum_setAttribute(fmt, attr, new_value); + return I18N_ERROR_NONE; } double i18n_unumber_get_double_attribute(const i18n_unumber_format_h fmt, - i18n_unumber_format_attribute_e attr) + i18n_unumber_format_attribute_e attr) { - if (fmt == NULL || I18N_UNUMBER_ROUNDING_INCREMENT != attr) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (fmt == NULL || I18N_UNUMBER_ROUNDING_INCREMENT != attr) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - set_last_result(I18N_ERROR_NONE); - return unum_getDoubleAttribute(fmt, attr); + set_last_result(I18N_ERROR_NONE); + return unum_getDoubleAttribute(fmt, attr); } int i18n_unumber_set_double_attribute(i18n_unumber_format_h fmt, - i18n_unumber_format_attribute_e attr, double new_value) + i18n_unumber_format_attribute_e attr, double new_value) { - if (fmt == NULL || attr != I18N_UNUMBER_ROUNDING_INCREMENT) - return I18N_ERROR_INVALID_PARAMETER; + if (fmt == NULL || attr != I18N_UNUMBER_ROUNDING_INCREMENT) + return I18N_ERROR_INVALID_PARAMETER; - unum_setDoubleAttribute(fmt, attr, new_value); - return I18N_ERROR_NONE; + unum_setDoubleAttribute(fmt, attr, new_value); + return I18N_ERROR_NONE; } int32_t i18n_unumber_get_text_attribute(const i18n_unumber_format_h fmt, - i18n_unumber_format_text_attribute_e tag, - i18n_uchar *result, int32_t result_length) + i18n_unumber_format_text_attribute_e tag, + i18n_uchar *result, int32_t result_length) { - if (fmt == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } - - UErrorCode icu_error = U_ZERO_ERROR; - int32_t result_unum_getTextAttribute = - unum_getTextAttribute(fmt, tag, result, result_length, &icu_error); - - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return result_unum_getTextAttribute; + if (fmt == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } + + UErrorCode icu_error = U_ZERO_ERROR; + int32_t result_unum_getTextAttribute = + unum_getTextAttribute(fmt, tag, result, result_length, &icu_error); + + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return result_unum_getTextAttribute; } int i18n_unumber_set_text_attribute(const i18n_unumber_format_h fmt, - i18n_unumber_format_text_attribute_e tag, - const i18n_uchar *new_value, int32_t new_value_length) + i18n_unumber_format_text_attribute_e tag, + const i18n_uchar *new_value, int32_t new_value_length) { - if (fmt == NULL || new_value == NULL || new_value_length < -1) - return I18N_ERROR_INVALID_PARAMETER; + if (fmt == NULL || new_value == NULL || new_value_length < -1) + return I18N_ERROR_INVALID_PARAMETER; - UErrorCode icu_error = U_ZERO_ERROR; - unum_setTextAttribute((UNumberFormat *) fmt, tag, new_value, new_value_length, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + unum_setTextAttribute((UNumberFormat *) fmt, tag, new_value, new_value_length, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - return i18n_error; + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + return i18n_error; } int32_t i18n_unumber_to_pattern(const i18n_unumber_format_h fmt, i18n_ubool is_pattern_localized, - i18n_uchar *result, int32_t result_length) + i18n_uchar *result, int32_t result_length) { - if (fmt == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } - - UErrorCode icu_error = U_ZERO_ERROR; - int32_t result_unum_toPattern = - unum_toPattern(fmt, is_pattern_localized, result, result_length, &icu_error); - - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return result_unum_toPattern; + if (fmt == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } + + UErrorCode icu_error = U_ZERO_ERROR; + int32_t result_unum_toPattern = + unum_toPattern(fmt, is_pattern_localized, result, result_length, &icu_error); + + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return result_unum_toPattern; } int i18n_unumber_set_symbol(i18n_unumber_format_h fmt, i18n_unumber_format_symbol_e symbol, - const i18n_uchar *value, int32_t length) + const i18n_uchar *value, int32_t length) { - if (fmt == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (fmt == NULL) + return I18N_ERROR_INVALID_PARAMETER; - if (symbol >= I18N_UNUMBER_FORMAT_SYMBOL_COUNT) - return I18N_ERROR_INVALID_PARAMETER; + if (symbol >= I18N_UNUMBER_FORMAT_SYMBOL_COUNT) + return I18N_ERROR_INVALID_PARAMETER; - UErrorCode icu_error = U_ZERO_ERROR; - unum_setSymbol(fmt, symbol, value, length, &icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + unum_setSymbol(fmt, symbol, value, length, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - return i18n_error; + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + return i18n_error; } const char *i18n_unumber_get_locale_by_type(const i18n_unumber_format_h fmt, - i18n_ulocale_data_locale_type_e type) + i18n_ulocale_data_locale_type_e type) { - if (fmt == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } - - UErrorCode icu_error = U_ZERO_ERROR; - const char *result_unum_getLocaleByType = unum_getLocaleByType(fmt, type, &icu_error); - - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - set_last_result(i18n_error); - return result_unum_getLocaleByType; + if (fmt == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } + + UErrorCode icu_error = U_ZERO_ERROR; + const char *result_unum_getLocaleByType = unum_getLocaleByType(fmt, type, &icu_error); + + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + set_last_result(i18n_error); + return result_unum_getLocaleByType; } diff --git a/src/utils_i18n_usearch.c b/src/utils_i18n_usearch.c old mode 100755 new mode 100644 index 566832c..62fa2b7 --- a/src/utils_i18n_usearch.c +++ b/src/utils_i18n_usearch.c @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include @@ -20,70 +20,70 @@ int i18n_usearch_destroy(i18n_usearch_h searchiter) { - retv_if(searchiter == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(searchiter == NULL, I18N_ERROR_INVALID_PARAMETER); - usearch_close(searchiter); + usearch_close(searchiter); - return I18N_ERROR_NONE; + return I18N_ERROR_NONE; } int i18n_usearch_first(i18n_usearch_h strsrch, int32_t *index_first) { - retv_if(strsrch == NULL || index_first == NULL, I18N_ERROR_INVALID_PARAMETER); - UErrorCode err = U_ZERO_ERROR; - *index_first = usearch_first(strsrch, &err); - int result = _i18n_error_mapping(err); - I18N_ERR(result); + retv_if(strsrch == NULL || index_first == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode err = U_ZERO_ERROR; + *index_first = usearch_first(strsrch, &err); + int result = _i18n_error_mapping(err); + I18N_ERR(result); - return result; + return result; } int i18n_usearch_get_collator(const i18n_usearch_h strsrch, i18n_ucollator_h *collator) { - retv_if(strsrch == NULL || collator == NULL, I18N_ERROR_INVALID_PARAMETER); - *collator = usearch_getCollator(strsrch); + retv_if(strsrch == NULL || collator == NULL, I18N_ERROR_INVALID_PARAMETER); + *collator = usearch_getCollator(strsrch); - return I18N_ERROR_NONE; + return I18N_ERROR_NONE; } int i18n_usearch_get_matched_text(const i18n_usearch_h strsrch, i18n_uchar *result_w, - int32_t result_capacity, int32_t *len_matched_text) + int32_t result_capacity, int32_t *len_matched_text) { - UErrorCode err = U_ZERO_ERROR; - *len_matched_text = usearch_getMatchedText(strsrch, result_w, result_capacity, &err); - int result = _i18n_error_mapping(err); - I18N_ERR(result); + UErrorCode err = U_ZERO_ERROR; + *len_matched_text = usearch_getMatchedText(strsrch, result_w, result_capacity, &err); + int result = _i18n_error_mapping(err); + I18N_ERR(result); - return result; + return result; } int i18n_usearch_create(const i18n_uchar *pattern, int32_t pattern_len, const i18n_uchar *text, - int32_t text_len, const char *locale, i18n_ubreak_iterator_s *break_iter, - i18n_usearch_h *search_iter) + int32_t text_len, const char *locale, i18n_ubreak_iterator_s *break_iter, + i18n_usearch_h *search_iter) { - retv_if(search_iter == NULL, I18N_ERROR_INVALID_PARAMETER); - i18n_error_code_e err = I18N_ERROR_NONE; - *search_iter = - usearch_open(pattern, pattern_len, text, text_len, locale, (UBreakIterator *) break_iter, - (UErrorCode *) & err); - int result = _i18n_error_mapping(err); + retv_if(search_iter == NULL, I18N_ERROR_INVALID_PARAMETER); + i18n_error_code_e err = I18N_ERROR_NONE; + *search_iter = + usearch_open(pattern, pattern_len, text, text_len, locale, (UBreakIterator *) break_iter, + (UErrorCode *) & err); + int result = _i18n_error_mapping(err); - return result; + return result; } int i18n_usearch_create_new(const i18n_uchar *pattern, int32_t pattern_len, - const i18n_uchar *text, int32_t text_len, const char *locale, - i18n_ubreak_iterator_h break_iter, i18n_usearch_h *search_iter) + const i18n_uchar *text, int32_t text_len, const char *locale, + i18n_ubreak_iterator_h break_iter, i18n_usearch_h *search_iter) { - retv_if(search_iter == NULL, I18N_ERROR_INVALID_PARAMETER); - UErrorCode icu_error = U_ZERO_ERROR; - *search_iter = - (i18n_usearch_h) usearch_open(pattern, pattern_len, text, text_len, locale, - (UBreakIterator *) break_iter, &icu_error); + retv_if(search_iter == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode icu_error = U_ZERO_ERROR; + *search_iter = + (i18n_usearch_h) usearch_open(pattern, pattern_len, text, text_len, locale, + (UBreakIterator *) break_iter, &icu_error); - i18n_error_code_e i18n_error; - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + i18n_error_code_e i18n_error; + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } diff --git a/src/utils_i18n_uset.c b/src/utils_i18n_uset.c index 6093d10..26d63d2 100644 --- a/src/utils_i18n_uset.c +++ b/src/utils_i18n_uset.c @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include @@ -21,731 +21,731 @@ int i18n_uset_create_empty(i18n_uset_h *set) { - if (set == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (set == NULL) + return I18N_ERROR_INVALID_PARAMETER; - *set = (i18n_uset_h) uset_openEmpty(); - return I18N_ERROR_NONE; + *set = (i18n_uset_h) uset_openEmpty(); + return I18N_ERROR_NONE; } int i18n_uset_create(i18n_uchar32 start, i18n_uchar32 end, i18n_uset_h *set) { - if (set == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (set == NULL) + return I18N_ERROR_INVALID_PARAMETER; - *set = (i18n_uset_h) uset_open(start, end); - return I18N_ERROR_NONE; + *set = (i18n_uset_h) uset_open(start, end); + return I18N_ERROR_NONE; } int i18n_uset_create_pattern(const i18n_uchar *pattern, int32_t pattern_length, i18n_uset_h *set) { - UErrorCode icu_error = U_ZERO_ERROR; - i18n_error_code_e i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + i18n_error_code_e i18n_error; - if (pattern == NULL || pattern_length < -1 || set == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (pattern == NULL || pattern_length < -1 || set == NULL) + return I18N_ERROR_INVALID_PARAMETER; - *set = (i18n_uset_h) uset_openPattern(pattern, pattern_length, &icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + *set = (i18n_uset_h) uset_openPattern(pattern, pattern_length, &icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } int i18n_uset_create_pattern_options(const i18n_uchar *pattern, int32_t pattern_length, - uint32_t options, i18n_uset_h *set) + uint32_t options, i18n_uset_h *set) { - UErrorCode icu_error = U_ZERO_ERROR; - i18n_error_code_e i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + i18n_error_code_e i18n_error; - if (pattern == NULL || pattern_length < -1 || set == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (pattern == NULL || pattern_length < -1 || set == NULL) + return I18N_ERROR_INVALID_PARAMETER; - if ((options != I18N_USET_IGNORE_SPACE) && (options != I18N_USET_CASE_INSENSITIVE)) - return I18N_ERROR_INVALID_PARAMETER; + if ((options != I18N_USET_IGNORE_SPACE) && (options != I18N_USET_CASE_INSENSITIVE)) + return I18N_ERROR_INVALID_PARAMETER; - *set = (i18n_uset_h) uset_openPatternOptions(pattern, pattern_length, options, &icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); - return i18n_error; + *set = (i18n_uset_h) uset_openPatternOptions(pattern, pattern_length, options, &icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); + return i18n_error; } int i18n_uset_destroy(i18n_uset_h set) { - if (set == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (set == NULL) + return I18N_ERROR_INVALID_PARAMETER; - uset_close((USet *) set); - return I18N_ERROR_NONE; + uset_close((USet *) set); + return I18N_ERROR_NONE; } int i18n_uset_clone(const i18n_uset_h set, i18n_uset_h *set_clone) { - if (set == NULL || set_clone == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (set == NULL || set_clone == NULL) + return I18N_ERROR_INVALID_PARAMETER; - *set_clone = (i18n_uset_h) uset_clone((const USet *)set); + *set_clone = (i18n_uset_h) uset_clone((const USet *)set); - return I18N_ERROR_NONE; + return I18N_ERROR_NONE; } i18n_ubool i18n_uset_is_frozen(const i18n_uset_h set) { - set_last_result(I18N_ERROR_NONE); + set_last_result(I18N_ERROR_NONE); - if (set == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return false; - } + if (set == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return false; + } - return uset_isFrozen((const USet *)set); + return uset_isFrozen((const USet *)set); } int i18n_uset_freeze(i18n_uset_h set) { - if (set == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (set == NULL) + return I18N_ERROR_INVALID_PARAMETER; - uset_freeze((USet *) set); - return I18N_ERROR_NONE; + uset_freeze((USet *) set); + return I18N_ERROR_NONE; } int i18n_uset_clone_as_thawed(const i18n_uset_h set, i18n_uset_h *set_copy) { - if (set == NULL || set_copy == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (set == NULL || set_copy == NULL) + return I18N_ERROR_INVALID_PARAMETER; - *set_copy = (i18n_uset_h) uset_cloneAsThawed((const USet *)set); + *set_copy = (i18n_uset_h) uset_cloneAsThawed((const USet *)set); - return I18N_ERROR_NONE; + return I18N_ERROR_NONE; } int i18n_uset_set(i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end) { - if (set == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (set == NULL) + return I18N_ERROR_INVALID_PARAMETER; - uset_set((USet *) set, start, end); - return I18N_ERROR_NONE; + uset_set((USet *) set, start, end); + return I18N_ERROR_NONE; } int32_t i18n_uset_apply_pattern(i18n_uset_h set, const i18n_uchar *pattern, int32_t pattern_length, - uint32_t options) + uint32_t options) { - if (set == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (set == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - if (pattern == NULL || pattern_length < -1) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (pattern == NULL || pattern_length < -1) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - if (options != I18N_USET_IGNORE_SPACE && options != I18N_USET_CASE_INSENSITIVE) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (options != I18N_USET_IGNORE_SPACE && options != I18N_USET_CASE_INSENSITIVE) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - UErrorCode icu_error = U_ZERO_ERROR; - i18n_error_code_e i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + i18n_error_code_e i18n_error; - int32_t result_uset_applyPattern = - uset_applyPattern((USet *) set, pattern, pattern_length, options, &icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + int32_t result_uset_applyPattern = + uset_applyPattern((USet *) set, pattern, pattern_length, options, &icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - set_last_result(i18n_error); - return result_uset_applyPattern; + set_last_result(i18n_error); + return result_uset_applyPattern; } int i18n_uset_apply_int_property_value(i18n_uset_h set, i18n_uchar_uproperty_e prop, int32_t value) { - if (set == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (set == NULL) + return I18N_ERROR_INVALID_PARAMETER; - if ((prop < I18N_UCHAR_INT_START || prop > I18N_UCHAR_INT_LIMIT - 1) && - (prop < I18N_UCHAR_MASK_START || prop > I18N_UCHAR_MASK_LIMIT - 1)) - return I18N_ERROR_INVALID_PARAMETER; + if ((prop < I18N_UCHAR_INT_START || prop > I18N_UCHAR_INT_LIMIT - 1) && + (prop < I18N_UCHAR_MASK_START || prop > I18N_UCHAR_MASK_LIMIT - 1)) + return I18N_ERROR_INVALID_PARAMETER; - if (prop != I18N_UCHAR_GENERAL_CATEGORY_MASK && - (value <= I18N_UCHAR_INVALID_CODE || value >= I18N_UCHAR_OTHER_PROPERTY_LIMIT)) - return I18N_ERROR_INVALID_PARAMETER; + if (prop != I18N_UCHAR_GENERAL_CATEGORY_MASK && + (value <= I18N_UCHAR_INVALID_CODE || value >= I18N_UCHAR_OTHER_PROPERTY_LIMIT)) + return I18N_ERROR_INVALID_PARAMETER; - UErrorCode icu_error = U_ZERO_ERROR; - i18n_error_code_e i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + i18n_error_code_e i18n_error; - uset_applyIntPropertyValue((USet *) set, prop, value, &icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + uset_applyIntPropertyValue((USet *) set, prop, value, &icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } int i18n_uset_apply_property_alias(i18n_uset_h set, const i18n_uchar *prop, int32_t prop_length, - const i18n_uchar *value, int32_t value_length) + const i18n_uchar *value, int32_t value_length) { - if (set == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (set == NULL) + return I18N_ERROR_INVALID_PARAMETER; - if (prop == NULL || prop_length < -1) - return I18N_ERROR_INVALID_PARAMETER; + if (prop == NULL || prop_length < -1) + return I18N_ERROR_INVALID_PARAMETER; - if (value == NULL || value_length < -1) - return I18N_ERROR_INVALID_PARAMETER; + if (value == NULL || value_length < -1) + return I18N_ERROR_INVALID_PARAMETER; - UErrorCode icu_error = U_ZERO_ERROR; - i18n_error_code_e i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + i18n_error_code_e i18n_error; - uset_applyPropertyAlias((USet *) set, prop, prop_length, value, value_length, &icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + uset_applyPropertyAlias((USet *) set, prop, prop_length, value, value_length, &icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - return i18n_error; + return i18n_error; } i18n_ubool i18n_uset_resembles_pattern(const i18n_uchar *pattern, int32_t pattern_length, - int32_t pos) + int32_t pos) { - if (pattern == NULL || pattern_length < -1 || pos < 0) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return false; - } + if (pattern == NULL || pattern_length < -1 || pos < 0) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return false; + } - set_last_result(I18N_ERROR_NONE); - return uset_resemblesPattern(pattern, pattern_length, pos); + set_last_result(I18N_ERROR_NONE); + return uset_resemblesPattern(pattern, pattern_length, pos); } int32_t i18n_uset_to_pattern(const i18n_uset_h set, i18n_uchar *result, int32_t result_capacity, - i18n_ubool escape_unprintable) + i18n_ubool escape_unprintable) { - if (set == NULL || result == NULL || result_capacity < 0) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (set == NULL || result == NULL || result_capacity < 0) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - UErrorCode icu_error = U_ZERO_ERROR; - i18n_error_code_e i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + i18n_error_code_e i18n_error; - int32_t result_uset_toPattern = - uset_toPattern((const USet *)set, result, result_capacity, escape_unprintable, &icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + int32_t result_uset_toPattern = + uset_toPattern((const USet *)set, result, result_capacity, escape_unprintable, &icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - set_last_result(i18n_error); - return result_uset_toPattern; + set_last_result(i18n_error); + return result_uset_toPattern; } int i18n_uset_add(i18n_uset_h set, i18n_uchar32 character) { - if (set == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (set == NULL) + return I18N_ERROR_INVALID_PARAMETER; - uset_add((USet *) set, character); - return I18N_ERROR_NONE; + uset_add((USet *) set, character); + return I18N_ERROR_NONE; } int i18n_uset_add_all(i18n_uset_h set, const i18n_uset_h additional_set) { - if (set == NULL || additional_set == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (set == NULL || additional_set == NULL) + return I18N_ERROR_INVALID_PARAMETER; - uset_addAll((USet *) set, (const USet *)additional_set); - return I18N_ERROR_NONE; + uset_addAll((USet *) set, (const USet *)additional_set); + return I18N_ERROR_NONE; } int i18n_uset_add_range(i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end) { - if (set == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (set == NULL) + return I18N_ERROR_INVALID_PARAMETER; - uset_addRange((USet *) set, start, end); - return I18N_ERROR_NONE; + uset_addRange((USet *) set, start, end); + return I18N_ERROR_NONE; } int i18n_uset_add_string(i18n_uset_h set, const i18n_uchar *str, int32_t str_len) { - if (set == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (set == NULL) + return I18N_ERROR_INVALID_PARAMETER; - if (str == NULL || str_len < -1) - return I18N_ERROR_INVALID_PARAMETER; + if (str == NULL || str_len < -1) + return I18N_ERROR_INVALID_PARAMETER; - uset_addString((USet *) set, str, str_len); - return I18N_ERROR_NONE; + uset_addString((USet *) set, str, str_len); + return I18N_ERROR_NONE; } int i18n_uset_add_all_code_points(i18n_uset_h set, const i18n_uchar *str, int32_t str_len) { - if (set == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (set == NULL) + return I18N_ERROR_INVALID_PARAMETER; - if (str == NULL || str_len < -1) - return I18N_ERROR_INVALID_PARAMETER; + if (str == NULL || str_len < -1) + return I18N_ERROR_INVALID_PARAMETER; - uset_addAllCodePoints((USet *) set, str, str_len); - return I18N_ERROR_NONE; + uset_addAllCodePoints((USet *) set, str, str_len); + return I18N_ERROR_NONE; } int i18n_uset_remove(i18n_uset_h set, i18n_uchar32 character) { - if (set == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (set == NULL) + return I18N_ERROR_INVALID_PARAMETER; - uset_remove((USet *) set, character); - return I18N_ERROR_NONE; + uset_remove((USet *) set, character); + return I18N_ERROR_NONE; } int i18n_uset_remove_range(i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end) { - if (set == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (set == NULL) + return I18N_ERROR_INVALID_PARAMETER; - uset_removeRange((USet *) set, start, end); - return I18N_ERROR_NONE; + uset_removeRange((USet *) set, start, end); + return I18N_ERROR_NONE; } int i18n_uset_remove_string(i18n_uset_h set, const i18n_uchar *str, int32_t str_len) { - if (set == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (set == NULL) + return I18N_ERROR_INVALID_PARAMETER; - if (str == NULL || str_len < -1) - return I18N_ERROR_INVALID_PARAMETER; + if (str == NULL || str_len < -1) + return I18N_ERROR_INVALID_PARAMETER; - uset_removeString((USet *) set, str, str_len); - return I18N_ERROR_NONE; + uset_removeString((USet *) set, str, str_len); + return I18N_ERROR_NONE; } int i18n_uset_remove_all(i18n_uset_h set, const i18n_uset_h remove_set) { - if (set == NULL || remove_set == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (set == NULL || remove_set == NULL) + return I18N_ERROR_INVALID_PARAMETER; - uset_removeAll((USet *) set, (const USet *)remove_set); - return I18N_ERROR_NONE; + uset_removeAll((USet *) set, (const USet *)remove_set); + return I18N_ERROR_NONE; } int i18n_uset_retain(i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end) { - if (set == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (set == NULL) + return I18N_ERROR_INVALID_PARAMETER; - uset_retain((USet *) set, start, end); - return I18N_ERROR_NONE; + uset_retain((USet *) set, start, end); + return I18N_ERROR_NONE; } int i18n_uset_retain_all(i18n_uset_h set, const i18n_uset_h retain) { - if (set == NULL || retain == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (set == NULL || retain == NULL) + return I18N_ERROR_INVALID_PARAMETER; - uset_retainAll((USet *) set, (const USet *)retain); - return I18N_ERROR_NONE; + uset_retainAll((USet *) set, (const USet *)retain); + return I18N_ERROR_NONE; } int i18n_uset_compact(i18n_uset_h set) { - if (set == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (set == NULL) + return I18N_ERROR_INVALID_PARAMETER; - uset_compact((USet *) set); - return I18N_ERROR_NONE; + uset_compact((USet *) set); + return I18N_ERROR_NONE; } int i18n_uset_complement(i18n_uset_h set) { - if (set == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (set == NULL) + return I18N_ERROR_INVALID_PARAMETER; - uset_complement((USet *) set); - return I18N_ERROR_NONE; + uset_complement((USet *) set); + return I18N_ERROR_NONE; } int i18n_uset_complement_all(i18n_uset_h set, const i18n_uset_h complement) { - if (set == NULL || set == complement || complement == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (set == NULL || set == complement || complement == NULL) + return I18N_ERROR_INVALID_PARAMETER; - uset_complementAll((USet *) set, (const USet *)complement); - return I18N_ERROR_NONE; + uset_complementAll((USet *) set, (const USet *)complement); + return I18N_ERROR_NONE; } int i18n_uset_clear(i18n_uset_h set) { - if (set == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (set == NULL) + return I18N_ERROR_INVALID_PARAMETER; - uset_clear((USet *) set); - return I18N_ERROR_NONE; + uset_clear((USet *) set); + return I18N_ERROR_NONE; } int i18n_uset_destroy_over(i18n_uset_h set, int32_t attributes) { - if (set == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (set == NULL) + return I18N_ERROR_INVALID_PARAMETER; - uset_closeOver((USet *) set, attributes); - return I18N_ERROR_NONE; + uset_closeOver((USet *) set, attributes); + return I18N_ERROR_NONE; } int i18n_uset_remove_all_strings(i18n_uset_h set) { - if (set == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (set == NULL) + return I18N_ERROR_INVALID_PARAMETER; - uset_removeAllStrings((USet *) set); - return I18N_ERROR_NONE; + uset_removeAllStrings((USet *) set); + return I18N_ERROR_NONE; } i18n_ubool i18n_uset_is_empty(const i18n_uset_h set) { - if (set == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return false; - } + if (set == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return false; + } - set_last_result(I18N_ERROR_NONE); - return uset_isEmpty((const USet *)set); + set_last_result(I18N_ERROR_NONE); + return uset_isEmpty((const USet *)set); } i18n_ubool i18n_uset_contains(const i18n_uset_h set, i18n_uchar32 character) { - if (set == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return false; - } + if (set == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return false; + } - set_last_result(I18N_ERROR_NONE); - return uset_contains((const USet *)set, character); + set_last_result(I18N_ERROR_NONE); + return uset_contains((const USet *)set, character); } i18n_ubool i18n_uset_contains_range(const i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end) { - if (set == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return false; - } + if (set == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return false; + } - set_last_result(I18N_ERROR_NONE); - return uset_containsRange((const USet *)set, start, end); + set_last_result(I18N_ERROR_NONE); + return uset_containsRange((const USet *)set, start, end); } i18n_ubool i18n_uset_contains_string(const i18n_uset_h set, const i18n_uchar *str, int32_t str_len) { - if (set == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return false; - } + if (set == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return false; + } - if (str == NULL || str_len < -1) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return false; - } + if (str == NULL || str_len < -1) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return false; + } - set_last_result(I18N_ERROR_NONE); - return uset_containsString((const USet *)set, str, str_len); + set_last_result(I18N_ERROR_NONE); + return uset_containsString((const USet *)set, str, str_len); } int32_t i18n_uset_index_of(const i18n_uset_h set, i18n_uchar32 character) { - if (set == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (set == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - set_last_result(I18N_ERROR_NONE); - return uset_indexOf((const USet *)set, character); + set_last_result(I18N_ERROR_NONE); + return uset_indexOf((const USet *)set, character); } i18n_uchar32 i18n_uset_char_at(const i18n_uset_h set, int32_t char_index) { - if (set == NULL || (char_index < 0 || char_index > uset_size((const USet *)set) - 1)) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0x0; - } + if (set == NULL || (char_index < 0 || char_index > uset_size((const USet *)set) - 1)) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0x0; + } - set_last_result(I18N_ERROR_NONE); - return uset_charAt((const USet *)set, char_index); + set_last_result(I18N_ERROR_NONE); + return uset_charAt((const USet *)set, char_index); } int32_t i18n_uset_size(const i18n_uset_h set) { - if (set == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (set == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - set_last_result(I18N_ERROR_NONE); - return uset_size((const USet *)set); + set_last_result(I18N_ERROR_NONE); + return uset_size((const USet *)set); } int32_t i18n_uset_get_item_count(const i18n_uset_h set) { - if (set == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (set == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - set_last_result(I18N_ERROR_NONE); - return uset_getItemCount((const USet *)set); + set_last_result(I18N_ERROR_NONE); + return uset_getItemCount((const USet *)set); } int32_t i18n_uset_get_item(const i18n_uset_h set, int32_t item_index, i18n_uchar32 *start, - i18n_uchar32 *end, i18n_uchar *str, int32_t str_capacity) + i18n_uchar32 *end, i18n_uchar *str, int32_t str_capacity) { - if (set == NULL || (item_index < 0 || item_index > uset_getItemCount((const USet *)set) - 1) - || start == NULL || end == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (set == NULL || (item_index < 0 || item_index > uset_getItemCount((const USet *)set) - 1) + || start == NULL || end == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - if ((str == NULL && str_capacity != 0) || (str != NULL && str_capacity < 0)) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if ((str == NULL && str_capacity != 0) || (str != NULL && str_capacity < 0)) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - UErrorCode icu_error = U_ZERO_ERROR; - i18n_error_code_e i18n_error; + UErrorCode icu_error = U_ZERO_ERROR; + i18n_error_code_e i18n_error; - int32_t result_uset_getItem = - uset_getItem((const USet *)set, item_index, start, end, str, str_capacity, &icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + int32_t result_uset_getItem = + uset_getItem((const USet *)set, item_index, start, end, str, str_capacity, &icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - set_last_result(i18n_error); - return result_uset_getItem; + set_last_result(i18n_error); + return result_uset_getItem; } i18n_ubool i18n_uset_contains_all(const i18n_uset_h set1, const i18n_uset_h set2) { - if (set1 == NULL || set2 == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return false; - } + if (set1 == NULL || set2 == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return false; + } - set_last_result(I18N_ERROR_NONE); - return uset_containsAll((const USet *)set1, (const USet *)set2); + set_last_result(I18N_ERROR_NONE); + return uset_containsAll((const USet *)set1, (const USet *)set2); } i18n_ubool i18n_uset_contains_all_code_points(const i18n_uset_h set, const i18n_uchar *str, - int32_t str_len) + int32_t str_len) { - if (set == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return false; - } + if (set == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return false; + } - if (str == NULL || str_len < -1) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return false; - } + if (str == NULL || str_len < -1) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return false; + } - set_last_result(I18N_ERROR_NONE); - return uset_containsAllCodePoints((const USet *)set, str, str_len); + set_last_result(I18N_ERROR_NONE); + return uset_containsAllCodePoints((const USet *)set, str, str_len); } i18n_ubool i18n_uset_contains_none(const i18n_uset_h set1, const i18n_uset_h set2) { - if (set1 == NULL || set2 == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return false; - } + if (set1 == NULL || set2 == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return false; + } - set_last_result(I18N_ERROR_NONE); - return uset_containsNone((const USet *)set1, (const USet *)set2); + set_last_result(I18N_ERROR_NONE); + return uset_containsNone((const USet *)set1, (const USet *)set2); } i18n_ubool i18n_uset_contains_some(const i18n_uset_h set1, const i18n_uset_h set2) { - if (set1 == NULL || set2 == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return false; - } + if (set1 == NULL || set2 == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return false; + } - set_last_result(I18N_ERROR_NONE); - return uset_containsSome((const USet *)set1, (const USet *)set2); + set_last_result(I18N_ERROR_NONE); + return uset_containsSome((const USet *)set1, (const USet *)set2); } int32_t i18n_uset_span(const i18n_uset_h set, const i18n_uchar *str, int32_t length, - i18n_uset_span_condition_e span_condition) + i18n_uset_span_condition_e span_condition) { - if (set == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (set == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - if (str == NULL || length < -1) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (str == NULL || length < -1) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - set_last_result(I18N_ERROR_NONE); - return uset_span((const USet *)set, str, length, (USetSpanCondition) span_condition); + set_last_result(I18N_ERROR_NONE); + return uset_span((const USet *)set, str, length, (USetSpanCondition) span_condition); } int32_t i18n_uset_span_back(const i18n_uset_h set, const i18n_uchar *str, int32_t length, - i18n_uset_span_condition_e span_condition) + i18n_uset_span_condition_e span_condition) { - if (set == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (set == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - if (str == NULL || length < -1) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (str == NULL || length < -1) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - if (span_condition < I18N_USET_SPAN_NOT_CONTAINED || - span_condition > I18N_USET_SPAN_CONDITION_COUNT) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (span_condition < I18N_USET_SPAN_NOT_CONTAINED || + span_condition > I18N_USET_SPAN_CONDITION_COUNT) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - set_last_result(I18N_ERROR_NONE); - return uset_spanBack((const USet *)set, str, length, (USetSpanCondition) span_condition); + set_last_result(I18N_ERROR_NONE); + return uset_spanBack((const USet *)set, str, length, (USetSpanCondition) span_condition); } int32_t i18n_uset_span_utf8(const i18n_uset_h set, const char *str, int32_t length, - i18n_uset_span_condition_e span_condition) + i18n_uset_span_condition_e span_condition) { - if (set == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (set == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - if (str == NULL || length < -1) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (str == NULL || length < -1) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - if (span_condition < I18N_USET_SPAN_NOT_CONTAINED || - span_condition > I18N_USET_SPAN_CONDITION_COUNT) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (span_condition < I18N_USET_SPAN_NOT_CONTAINED || + span_condition > I18N_USET_SPAN_CONDITION_COUNT) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - set_last_result(I18N_ERROR_NONE); - return uset_spanUTF8((const USet *)set, str, length, (USetSpanCondition) span_condition); + set_last_result(I18N_ERROR_NONE); + return uset_spanUTF8((const USet *)set, str, length, (USetSpanCondition) span_condition); } int32_t i18n_uset_span_back_utf8(const i18n_uset_h set, const char *str, int32_t length, - i18n_uset_span_condition_e span_condition) + i18n_uset_span_condition_e span_condition) { - if (set == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (set == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - if (str == NULL || length < -1) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (str == NULL || length < -1) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - if (span_condition < I18N_USET_SPAN_NOT_CONTAINED || - span_condition > I18N_USET_SPAN_CONDITION_COUNT) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (span_condition < I18N_USET_SPAN_NOT_CONTAINED || + span_condition > I18N_USET_SPAN_CONDITION_COUNT) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - set_last_result(I18N_ERROR_NONE); - return uset_spanBackUTF8((const USet *)set, str, length, (USetSpanCondition) span_condition); + set_last_result(I18N_ERROR_NONE); + return uset_spanBackUTF8((const USet *)set, str, length, (USetSpanCondition) span_condition); } i18n_ubool i18n_uset_equals(const i18n_uset_h set1, const i18n_uset_h set2) { - if (set1 == NULL || set2 == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return false; - } + if (set1 == NULL || set2 == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return false; + } - set_last_result(I18N_ERROR_NONE); - return uset_equals((const USet *)set1, (const USet *)set2); + set_last_result(I18N_ERROR_NONE); + return uset_equals((const USet *)set1, (const USet *)set2); } int32_t i18n_uset_serialize(const i18n_uset_h set, uint16_t *dest, int32_t dest_capacity) { - i18n_error_code_e i18n_error; + i18n_error_code_e i18n_error; - if (set == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (set == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - if (dest == NULL || dest_capacity < 0) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (dest == NULL || dest_capacity < 0) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - UErrorCode icu_error = U_ZERO_ERROR; - int32_t result_uset_serialize = - uset_serialize((const USet *)set, dest, dest_capacity, &icu_error); - ERR_MAPPING(icu_error, i18n_error); - I18N_ERR(i18n_error); + UErrorCode icu_error = U_ZERO_ERROR; + int32_t result_uset_serialize = + uset_serialize((const USet *)set, dest, dest_capacity, &icu_error); + ERR_MAPPING(icu_error, i18n_error); + I18N_ERR(i18n_error); - set_last_result(i18n_error); - return result_uset_serialize; + set_last_result(i18n_error); + return result_uset_serialize; } i18n_ubool i18n_uset_get_serialized_set(const uint16_t *src, int32_t src_length, - i18n_userialized_set_s *fill_set) + i18n_userialized_set_s *fill_set) { - if (src == NULL || src_length < 0 || fill_set == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (src == NULL || src_length < 0 || fill_set == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - set_last_result(I18N_ERROR_NONE); - return uset_getSerializedSet((USerializedSet *) fill_set, src, src_length); + set_last_result(I18N_ERROR_NONE); + return uset_getSerializedSet((USerializedSet *) fill_set, src, src_length); } int i18n_uset_set_serialized_to_one(i18n_uchar32 character, i18n_userialized_set_s *fill_set) { - if (fill_set == NULL) - return I18N_ERROR_INVALID_PARAMETER; + if (fill_set == NULL) + return I18N_ERROR_INVALID_PARAMETER; - uset_setSerializedToOne((USerializedSet *) fill_set, character); - return I18N_ERROR_NONE; + uset_setSerializedToOne((USerializedSet *) fill_set, character); + return I18N_ERROR_NONE; } i18n_ubool i18n_uset_serialized_contains(const i18n_userialized_set_s *set, i18n_uchar32 character) { - if (set == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (set == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - set_last_result(I18N_ERROR_NONE); - return uset_serializedContains((const USerializedSet *)set, character); + set_last_result(I18N_ERROR_NONE); + return uset_serializedContains((const USerializedSet *)set, character); } int32_t i18n_uset_get_serialized_range_count(const i18n_userialized_set_s *set) { - if (set == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (set == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - set_last_result(I18N_ERROR_NONE); - return uset_getSerializedRangeCount((const USerializedSet *)set); + set_last_result(I18N_ERROR_NONE); + return uset_getSerializedRangeCount((const USerializedSet *)set); } i18n_ubool i18n_uset_get_serialized_range(const i18n_userialized_set_s *set, int32_t range_index, - i18n_uchar32 *p_start, i18n_uchar32 *p_end) + i18n_uchar32 *p_start, i18n_uchar32 *p_end) { - if (set == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return false; - } + if (set == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return false; + } - if (range_index < 0 - || range_index > uset_getSerializedRangeCount((const USerializedSet *)set) - 1) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return false; - } + if (range_index < 0 + || range_index > uset_getSerializedRangeCount((const USerializedSet *)set) - 1) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return false; + } - set_last_result(I18N_ERROR_NONE); - return uset_getSerializedRange((const USerializedSet *)set, range_index, p_start, p_end); + set_last_result(I18N_ERROR_NONE); + return uset_getSerializedRange((const USerializedSet *)set, range_index, p_start, p_end); } diff --git a/src/utils_i18n_ustring.c b/src/utils_i18n_ustring.c index 82e101f..9f56f82 100644 --- a/src/utils_i18n_ustring.c +++ b/src/utils_i18n_ustring.c @@ -1,17 +1,17 @@ /* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include @@ -20,738 +20,738 @@ int32_t i18n_ustring_get_length(const i18n_uchar *s) { - if (s == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (s == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - set_last_result(I18N_ERROR_NONE); - return u_strlen(s); + set_last_result(I18N_ERROR_NONE); + return u_strlen(s); } int32_t i18n_ustring_count_char32(const i18n_uchar *s, int32_t length) { - if (s == NULL || length < -1) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (s == NULL || length < -1) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - set_last_result(I18N_ERROR_NONE); - return u_countChar32(s, length); + set_last_result(I18N_ERROR_NONE); + return u_countChar32(s, length); } i18n_ubool i18n_ustring_has_more_char32_than(const i18n_uchar *s, int32_t length, int32_t number) { - if (s == NULL || length < -1) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return false; - } + if (s == NULL || length < -1) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return false; + } - set_last_result(I18N_ERROR_NONE); - return u_strHasMoreChar32Than(s, length, number); + set_last_result(I18N_ERROR_NONE); + return u_strHasMoreChar32Than(s, length, number); } i18n_uchar *i18n_ustring_cat(i18n_uchar *dest, const i18n_uchar *src) { - if (dest == NULL || src == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } + if (dest == NULL || src == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } - set_last_result(I18N_ERROR_NONE); - return u_strcat(dest, src); + set_last_result(I18N_ERROR_NONE); + return u_strcat(dest, src); } i18n_uchar *i18n_ustring_cat_n(i18n_uchar *dest, const i18n_uchar *src, int32_t n) { - if (dest == NULL || src == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } + if (dest == NULL || src == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } - set_last_result(I18N_ERROR_NONE); - return u_strncat(dest, src, n); + set_last_result(I18N_ERROR_NONE); + return u_strncat(dest, src, n); } i18n_uchar *i18n_ustring_string(const i18n_uchar *s, const i18n_uchar *sub_string) { - if (s == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } + if (s == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } - set_last_result(I18N_ERROR_NONE); - return (i18n_uchar *) u_strstr(s, sub_string); + set_last_result(I18N_ERROR_NONE); + return (i18n_uchar *) u_strstr(s, sub_string); } i18n_uchar *i18n_ustring_find_first(const i18n_uchar *s, int32_t length, - const i18n_uchar *sub_string, int32_t sub_length) + const i18n_uchar *sub_string, int32_t sub_length) { - if (s == NULL || length < -1) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } + if (s == NULL || length < -1) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } - set_last_result(I18N_ERROR_NONE); - return u_strFindFirst(s, length, sub_string, sub_length); + set_last_result(I18N_ERROR_NONE); + return u_strFindFirst(s, length, sub_string, sub_length); } i18n_uchar *i18n_ustring_char(const i18n_uchar *s, i18n_uchar c) { - if (s == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } + if (s == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } - set_last_result(I18N_ERROR_NONE); - return (i18n_uchar *) u_strchr(s, c); + set_last_result(I18N_ERROR_NONE); + return (i18n_uchar *) u_strchr(s, c); } i18n_uchar *i18n_ustring_char32(const i18n_uchar *s, i18n_uchar32 c) { - if (s == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } + if (s == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } - set_last_result(I18N_ERROR_NONE); - return (i18n_uchar *) u_strchr32(s, c); + set_last_result(I18N_ERROR_NONE); + return (i18n_uchar *) u_strchr32(s, c); } i18n_uchar *i18n_ustring_r_string(const i18n_uchar *s, const i18n_uchar *sub_string) { - if (s == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } + if (s == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } - set_last_result(I18N_ERROR_NONE); - return (i18n_uchar *) u_strrstr(s, sub_string); + set_last_result(I18N_ERROR_NONE); + return (i18n_uchar *) u_strrstr(s, sub_string); } i18n_uchar *i18n_ustring_find_last(const i18n_uchar *s, int32_t length, - const i18n_uchar *sub_string, int32_t sub_length) + const i18n_uchar *sub_string, int32_t sub_length) { - if (s == NULL || length < -1) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } + if (s == NULL || length < -1) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } - set_last_result(I18N_ERROR_NONE); - return (i18n_uchar *) u_strFindLast(s, length, sub_string, sub_length); + set_last_result(I18N_ERROR_NONE); + return (i18n_uchar *) u_strFindLast(s, length, sub_string, sub_length); } i18n_uchar *i18n_ustring_r_char(const i18n_uchar *s, i18n_uchar c) { - if (s == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } + if (s == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } - set_last_result(I18N_ERROR_NONE); - return (i18n_uchar *) u_strrchr(s, c); + set_last_result(I18N_ERROR_NONE); + return (i18n_uchar *) u_strrchr(s, c); } i18n_uchar *i18n_ustring_r_char32(const i18n_uchar *s, i18n_uchar32 c) { - if (s == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } + if (s == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } - set_last_result(I18N_ERROR_NONE); - return (i18n_uchar *) u_strrchr32(s, c); + set_last_result(I18N_ERROR_NONE); + return (i18n_uchar *) u_strrchr32(s, c); } i18n_uchar *i18n_ustring_pbrk(const i18n_uchar *string, const i18n_uchar *match_set) { - if (string == NULL || match_set == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } + if (string == NULL || match_set == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } - set_last_result(I18N_ERROR_NONE); - return (i18n_uchar *) u_strpbrk(string, match_set); + set_last_result(I18N_ERROR_NONE); + return (i18n_uchar *) u_strpbrk(string, match_set); } int32_t i18n_ustring_cspn(const i18n_uchar *string, const i18n_uchar *match_set) { - if (string == NULL || match_set == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (string == NULL || match_set == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - set_last_result(I18N_ERROR_NONE); - return u_strcspn(string, match_set); + set_last_result(I18N_ERROR_NONE); + return u_strcspn(string, match_set); } int32_t i18n_ustring_spn(const i18n_uchar *string, const i18n_uchar *match_set) { - if (string == NULL || match_set == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (string == NULL || match_set == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - set_last_result(I18N_ERROR_NONE); - return u_strspn(string, match_set); + set_last_result(I18N_ERROR_NONE); + return u_strspn(string, match_set); } i18n_uchar *i18n_ustring_tokenizer_r(i18n_uchar *src, const i18n_uchar *delim, - i18n_uchar ** save_state) + i18n_uchar **save_state) { - if ((src == NULL && save_state == NULL) || delim == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } + if ((src == NULL && save_state == NULL) || delim == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } - set_last_result(I18N_ERROR_NONE); - return u_strtok_r(src, delim, save_state); + set_last_result(I18N_ERROR_NONE); + return u_strtok_r(src, delim, save_state); } int32_t i18n_ustring_compare(const i18n_uchar *s1, const i18n_uchar *s2) { - if (s1 == NULL || s2 == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (s1 == NULL || s2 == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - set_last_result(I18N_ERROR_NONE); - return u_strcmp(s1, s2); + set_last_result(I18N_ERROR_NONE); + return u_strcmp(s1, s2); } int32_t i18n_ustring_compare_code_point_order(const i18n_uchar *s1, const i18n_uchar *s2) { - if (s1 == NULL || s2 == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (s1 == NULL || s2 == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - set_last_result(I18N_ERROR_NONE); - return u_strcmpCodePointOrder(s1, s2); + set_last_result(I18N_ERROR_NONE); + return u_strcmpCodePointOrder(s1, s2); } int32_t i18n_ustring_compare_binary_order(const i18n_uchar *s1, int32_t length1, - const i18n_uchar *s2, int32_t length2, - i18n_ubool code_point_order) + const i18n_uchar *s2, int32_t length2, + i18n_ubool code_point_order) { - if (s1 == NULL || s2 == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (s1 == NULL || s2 == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - set_last_result(I18N_ERROR_NONE); - return u_strCompare(s1, length1, s2, length2, code_point_order); + set_last_result(I18N_ERROR_NONE); + return u_strCompare(s1, length1, s2, length2, code_point_order); } int32_t i18n_ustring_case_compare_with_length(const i18n_uchar *s1, int32_t length1, - const i18n_uchar *s2, int32_t length2, - uint32_t options, i18n_error_code_e *i18n_error) + const i18n_uchar *s2, int32_t length2, + uint32_t options, i18n_error_code_e *i18n_error) { - UErrorCode icu_error = U_ZERO_ERROR; - int32_t result = u_strCaseCompare(s1, length1, s2, length2, options, &icu_error); - *i18n_error = _i18n_error_mapping(icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + int32_t result = u_strCaseCompare(s1, length1, s2, length2, options, &icu_error); + *i18n_error = _i18n_error_mapping(icu_error); - return result; + return result; } int32_t i18n_ustring_compare_n(const i18n_uchar *s1, const i18n_uchar *s2, int32_t n) { - if (s1 == NULL || s2 == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (s1 == NULL || s2 == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - set_last_result(I18N_ERROR_NONE); - return u_strncmp(s1, s2, n); + set_last_result(I18N_ERROR_NONE); + return u_strncmp(s1, s2, n); } int32_t i18n_ustring_compare_n_code_point_order(const i18n_uchar *s1, const i18n_uchar *s2, - int32_t n) + int32_t n) { - if (s1 == NULL || s2 == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (s1 == NULL || s2 == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - set_last_result(I18N_ERROR_NONE); - return u_strncmpCodePointOrder(s1, s2, n); + set_last_result(I18N_ERROR_NONE); + return u_strncmpCodePointOrder(s1, s2, n); } int32_t i18n_ustring_case_compare(const i18n_uchar *s1, const i18n_uchar *s2, uint32_t options) { - if (s1 == NULL || s2 == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (s1 == NULL || s2 == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - set_last_result(I18N_ERROR_NONE); - return u_strcasecmp(s1, s2, options); + set_last_result(I18N_ERROR_NONE); + return u_strcasecmp(s1, s2, options); } int32_t i18n_ustring_case_compare_n(const i18n_uchar *s1, const i18n_uchar *s2, int32_t n, - uint32_t options) + uint32_t options) { - if (s1 == NULL || s2 == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (s1 == NULL || s2 == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - set_last_result(I18N_ERROR_NONE); - return u_strncasecmp(s1, s2, n, options); + set_last_result(I18N_ERROR_NONE); + return u_strncasecmp(s1, s2, n, options); } int32_t i18n_ustring_mem_case_compare(const i18n_uchar *s1, const i18n_uchar *s2, int32_t length, - uint32_t options) + uint32_t options) { - if (s1 == NULL || s2 == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (s1 == NULL || s2 == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - set_last_result(I18N_ERROR_NONE); - return u_memcasecmp(s1, s2, length, options); + set_last_result(I18N_ERROR_NONE); + return u_memcasecmp(s1, s2, length, options); } i18n_uchar *i18n_ustring_copy(i18n_uchar *dest, const i18n_uchar *src) { - if (dest == NULL || src == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } + if (dest == NULL || src == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } - set_last_result(I18N_ERROR_NONE); - return u_strcpy(dest, src); + set_last_result(I18N_ERROR_NONE); + return u_strcpy(dest, src); } i18n_uchar *i18n_ustring_copy_n(i18n_uchar *dest, const i18n_uchar *src, int32_t n) { - if (dest == NULL || src == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } + if (dest == NULL || src == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } - set_last_result(I18N_ERROR_NONE); - return u_strncpy(dest, src, n); + set_last_result(I18N_ERROR_NONE); + return u_strncpy(dest, src, n); } i18n_uchar *i18n_ustring_copy_ua(i18n_uchar *dest, const char *src) { - if (dest == NULL || src == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } + if (dest == NULL || src == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } - set_last_result(I18N_ERROR_NONE); - return u_uastrcpy(dest, src); + set_last_result(I18N_ERROR_NONE); + return u_uastrcpy(dest, src); } i18n_uchar *i18n_ustring_copy_ua_n(i18n_uchar *dest, const char *src, int32_t n) { - if (dest == NULL || src == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } + if (dest == NULL || src == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } - set_last_result(I18N_ERROR_NONE); - return u_uastrncpy(dest, src, n); + set_last_result(I18N_ERROR_NONE); + return u_uastrncpy(dest, src, n); } char *i18n_ustring_copy_au(char *dest, const i18n_uchar *src) { - if (dest == NULL || src == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } + if (dest == NULL || src == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } - set_last_result(I18N_ERROR_NONE); - return u_austrcpy(dest, src); + set_last_result(I18N_ERROR_NONE); + return u_austrcpy(dest, src); } char *i18n_ustring_copy_au_n(char *dest, const i18n_uchar *src, int32_t n) { - if (dest == NULL || src == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } + if (dest == NULL || src == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } - set_last_result(I18N_ERROR_NONE); - return u_austrncpy(dest, src, n); + set_last_result(I18N_ERROR_NONE); + return u_austrncpy(dest, src, n); } i18n_uchar *i18n_ustring_mem_copy(i18n_uchar *dest, const i18n_uchar *src, int32_t count) { - if (dest == NULL || src == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } + if (dest == NULL || src == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } - set_last_result(I18N_ERROR_NONE); - return u_memcpy(dest, src, count); + set_last_result(I18N_ERROR_NONE); + return u_memcpy(dest, src, count); } i18n_uchar *i18n_ustring_mem_move(i18n_uchar *dest, const i18n_uchar *src, int32_t count) { - if (dest == NULL || src == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } + if (dest == NULL || src == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } - set_last_result(I18N_ERROR_NONE); - return u_memmove(dest, src, count); + set_last_result(I18N_ERROR_NONE); + return u_memmove(dest, src, count); } i18n_uchar *i18n_ustring_mem_set(i18n_uchar *dest, const i18n_uchar c, int32_t count) { - if (dest == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } + if (dest == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } - set_last_result(I18N_ERROR_NONE); - return u_memset(dest, c, count); + set_last_result(I18N_ERROR_NONE); + return u_memset(dest, c, count); } int32_t i18n_ustring_mem_compare(const i18n_uchar *buf1, const i18n_uchar *buf2, int32_t count) { - if (buf1 == NULL || buf2 == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (buf1 == NULL || buf2 == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - set_last_result(I18N_ERROR_NONE); - return u_memcmp(buf1, buf2, count); + set_last_result(I18N_ERROR_NONE); + return u_memcmp(buf1, buf2, count); } int32_t i18n_ustring_mem_compare_code_point_order(const i18n_uchar *s1, const i18n_uchar *s2, - int32_t count) + int32_t count) { - if (s1 == NULL || s2 == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (s1 == NULL || s2 == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - set_last_result(I18N_ERROR_NONE); - return u_memcmpCodePointOrder(s1, s2, count); + set_last_result(I18N_ERROR_NONE); + return u_memcmpCodePointOrder(s1, s2, count); } i18n_uchar *i18n_ustring_mem_char(const i18n_uchar *s, i18n_uchar c, int32_t count) { - if (s == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } + if (s == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } - set_last_result(I18N_ERROR_NONE); - return (i18n_uchar *) u_memchr(s, c, count); + set_last_result(I18N_ERROR_NONE); + return (i18n_uchar *) u_memchr(s, c, count); } i18n_uchar *i18n_ustring_mem_char32(const i18n_uchar *s, i18n_uchar32 c, int32_t count) { - if (s == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } + if (s == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } - set_last_result(I18N_ERROR_NONE); - return (i18n_uchar *) u_memchr32(s, c, count); + set_last_result(I18N_ERROR_NONE); + return (i18n_uchar *) u_memchr32(s, c, count); } i18n_uchar *i18n_ustring_mem_r_char(const i18n_uchar *s, i18n_uchar c, int32_t count) { - if (s == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } + if (s == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } - set_last_result(I18N_ERROR_NONE); - return (i18n_uchar *) u_memrchr(s, c, count); + set_last_result(I18N_ERROR_NONE); + return (i18n_uchar *) u_memrchr(s, c, count); } i18n_uchar *i18n_ustring_mem_r_char32(const i18n_uchar *s, i18n_uchar32 c, int32_t count) { - if (s == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return NULL; - } + if (s == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return NULL; + } - set_last_result(I18N_ERROR_NONE); - return (i18n_uchar *) u_memrchr32(s, c, count); + set_last_result(I18N_ERROR_NONE); + return (i18n_uchar *) u_memrchr32(s, c, count); } int32_t i18n_ustring_unescape(const char *src, i18n_uchar *dest, int32_t dest_capacity) { - if (dest == NULL || src == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (dest == NULL || src == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - set_last_result(I18N_ERROR_NONE); - return u_unescape(src, dest, dest_capacity); + set_last_result(I18N_ERROR_NONE); + return u_unescape(src, dest, dest_capacity); } i18n_uchar32 i18n_ustring_unescape_at(i18n_ustring_unescape_char_at_cb char_at, int32_t *offset, - int32_t length, void *context) + int32_t length, void *context) { - if (char_at == NULL || offset == NULL) { - set_last_result(I18N_ERROR_INVALID_PARAMETER); - return 0; - } + if (char_at == NULL || offset == NULL) { + set_last_result(I18N_ERROR_INVALID_PARAMETER); + return 0; + } - set_last_result(I18N_ERROR_NONE); - return u_unescapeAt(char_at, offset, length, context); + set_last_result(I18N_ERROR_NONE); + return u_unescapeAt(char_at, offset, length, context); } int32_t i18n_ustring_to_upper(i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, - int32_t src_len, const char *locale, i18n_error_code_e *i18n_error) + int32_t src_len, const char *locale, i18n_error_code_e *i18n_error) { - UErrorCode icu_error = U_ZERO_ERROR; - int32_t result = u_strToUpper(dest, dest_capacity, src, src_len, locale, &icu_error); - *i18n_error = _i18n_error_mapping(icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + int32_t result = u_strToUpper(dest, dest_capacity, src, src_len, locale, &icu_error); + *i18n_error = _i18n_error_mapping(icu_error); - return result; + return result; } int32_t i18n_ustring_to_lower(i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, - int32_t src_len, const char *locale, i18n_error_code_e *i18n_error) + int32_t src_len, const char *locale, i18n_error_code_e *i18n_error) { - UErrorCode icu_error = U_ZERO_ERROR; - int32_t result = u_strToLower(dest, dest_capacity, src, src_len, locale, &icu_error); - *i18n_error = _i18n_error_mapping(icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + int32_t result = u_strToLower(dest, dest_capacity, src, src_len, locale, &icu_error); + *i18n_error = _i18n_error_mapping(icu_error); - return result; + return result; } int32_t i18n_ustring_to_title(i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, - int32_t src_len, i18n_ubreak_iterator_s *title_iter, - const char *locale, i18n_error_code_e *i18n_error) + int32_t src_len, i18n_ubreak_iterator_s *title_iter, + const char *locale, i18n_error_code_e *i18n_error) { - if (src == NULL) { - *i18n_error = I18N_ERROR_INVALID_PARAMETER; - return 0; - } + if (src == NULL) { + *i18n_error = I18N_ERROR_INVALID_PARAMETER; + return 0; + } - UErrorCode icu_error = U_ZERO_ERROR; - int32_t result = - u_strToTitle(dest, dest_capacity, src, src_len, (UBreakIterator *) title_iter, locale, - &icu_error); - *i18n_error = _i18n_error_mapping(icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + int32_t result = + u_strToTitle(dest, dest_capacity, src, src_len, (UBreakIterator *) title_iter, locale, + &icu_error); + *i18n_error = _i18n_error_mapping(icu_error); - return result; + return result; } int32_t i18n_ustring_to_title_new(i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, - int32_t src_len, i18n_ubreak_iterator_h title_iter, - const char *locale) + int32_t src_len, i18n_ubreak_iterator_h title_iter, + const char *locale) { - UErrorCode err = U_ZERO_ERROR; - int32_t result = - u_strToTitle(dest, dest_capacity, src, src_len, (UBreakIterator *) title_iter, locale, - &err); - set_last_result(_i18n_error_mapping(err)); + UErrorCode err = U_ZERO_ERROR; + int32_t result = + u_strToTitle(dest, dest_capacity, src, src_len, (UBreakIterator *) title_iter, locale, + &err); + set_last_result(_i18n_error_mapping(err)); - return result; + return result; } int32_t i18n_ustring_fold_case(i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, - int32_t src_len, uint32_t options, i18n_error_code_e *i18n_error) + int32_t src_len, uint32_t options, i18n_error_code_e *i18n_error) { - if (src == NULL) { - *i18n_error = I18N_ERROR_INVALID_PARAMETER; - return 0; - } + if (src == NULL) { + *i18n_error = I18N_ERROR_INVALID_PARAMETER; + return 0; + } - UErrorCode icu_error = U_ZERO_ERROR; - int32_t result = u_strFoldCase(dest, dest_capacity, src, src_len, options, &icu_error); - *i18n_error = _i18n_error_mapping(icu_error); - I18N_ERR(*i18n_error); + UErrorCode icu_error = U_ZERO_ERROR; + int32_t result = u_strFoldCase(dest, dest_capacity, src, src_len, options, &icu_error); + *i18n_error = _i18n_error_mapping(icu_error); + I18N_ERR(*i18n_error); - return result; + return result; } wchar_t *i18n_ustring_to_WCS(wchar_t *dest, int32_t dest_capacity, int32_t *dest_len, - const i18n_uchar *src, int32_t src_len, - i18n_error_code_e *i18n_error) + const i18n_uchar *src, int32_t src_len, + i18n_error_code_e *i18n_error) { - if (src == NULL) { - *i18n_error = I18N_ERROR_INVALID_PARAMETER; - return NULL; - } + if (src == NULL) { + *i18n_error = I18N_ERROR_INVALID_PARAMETER; + return NULL; + } - UErrorCode icu_error = U_ZERO_ERROR; - wchar_t *result = u_strToWCS(dest, dest_capacity, dest_len, src, src_len, &icu_error); - *i18n_error = _i18n_error_mapping(icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + wchar_t *result = u_strToWCS(dest, dest_capacity, dest_len, src, src_len, &icu_error); + *i18n_error = _i18n_error_mapping(icu_error); - return result; + return result; } i18n_uchar *i18n_ustring_from_WCS(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, - const wchar_t *src, int32_t src_len, - i18n_error_code_e *i18n_error) + const wchar_t *src, int32_t src_len, + i18n_error_code_e *i18n_error) { - if (src == NULL) { - *i18n_error = I18N_ERROR_INVALID_PARAMETER; - return NULL; - } + if (src == NULL) { + *i18n_error = I18N_ERROR_INVALID_PARAMETER; + return NULL; + } - UErrorCode icu_error = U_ZERO_ERROR; - i18n_uchar *result = u_strFromWCS(dest, dest_capacity, dest_len, src, src_len, &icu_error); - *i18n_error = _i18n_error_mapping(icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + i18n_uchar *result = u_strFromWCS(dest, dest_capacity, dest_len, src, src_len, &icu_error); + *i18n_error = _i18n_error_mapping(icu_error); - return result; + return result; } char *i18n_ustring_to_UTF8(char *dest, int32_t dest_capacity, int32_t *dest_len, - const i18n_uchar *src, int32_t src_len, i18n_error_code_e *i18n_error) + const i18n_uchar *src, int32_t src_len, i18n_error_code_e *i18n_error) { - if (src == NULL) { - *i18n_error = I18N_ERROR_INVALID_PARAMETER; - return NULL; - } + if (src == NULL) { + *i18n_error = I18N_ERROR_INVALID_PARAMETER; + return NULL; + } - UErrorCode icu_error = U_ZERO_ERROR; - char *result = u_strToUTF8(dest, dest_capacity, dest_len, src, src_len, &icu_error); - *i18n_error = _i18n_error_mapping(icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + char *result = u_strToUTF8(dest, dest_capacity, dest_len, src, src_len, &icu_error); + *i18n_error = _i18n_error_mapping(icu_error); - return result; + return result; } i18n_uchar *i18n_ustring_from_UTF8(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, - const char *src, int32_t src_len, i18n_error_code_e *i18n_error) + const char *src, int32_t src_len, i18n_error_code_e *i18n_error) { - if (src == NULL) { - *i18n_error = I18N_ERROR_INVALID_PARAMETER; - return NULL; - } + if (src == NULL) { + *i18n_error = I18N_ERROR_INVALID_PARAMETER; + return NULL; + } - UErrorCode icu_error = U_ZERO_ERROR; - i18n_uchar *result = u_strFromUTF8(dest, dest_capacity, dest_len, src, src_len, &icu_error); - *i18n_error = _i18n_error_mapping(icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + i18n_uchar *result = u_strFromUTF8(dest, dest_capacity, dest_len, src, src_len, &icu_error); + *i18n_error = _i18n_error_mapping(icu_error); - return result; + return result; } char *i18n_ustring_to_UTF8_with_sub(char *dest, int32_t dest_capacity, int32_t *dest_len, - const i18n_uchar *src, int32_t src_len, i18n_uchar32 sub_char, - int32_t *num_substitutions, i18n_error_code_e *i18n_error) + const i18n_uchar *src, int32_t src_len, i18n_uchar32 sub_char, + int32_t *num_substitutions, i18n_error_code_e *i18n_error) { - if (src == NULL) { - *i18n_error = I18N_ERROR_INVALID_PARAMETER; - return NULL; - } + if (src == NULL) { + *i18n_error = I18N_ERROR_INVALID_PARAMETER; + return NULL; + } - UErrorCode icu_error = U_ZERO_ERROR; - char *result = - u_strToUTF8WithSub(dest, dest_capacity, dest_len, src, src_len, sub_char, num_substitutions, - &icu_error); - *i18n_error = _i18n_error_mapping(icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + char *result = + u_strToUTF8WithSub(dest, dest_capacity, dest_len, src, src_len, sub_char, num_substitutions, + &icu_error); + *i18n_error = _i18n_error_mapping(icu_error); - return result; + return result; } i18n_uchar *i18n_ustring_from_UTF8_with_sub(i18n_uchar *dest, int32_t dest_capacity, - int32_t *dest_len, const char *src, int32_t src_len, - i18n_uchar32 sub_char, int32_t *num_substitutions, - i18n_error_code_e *i18n_error) + int32_t *dest_len, const char *src, int32_t src_len, + i18n_uchar32 sub_char, int32_t *num_substitutions, + i18n_error_code_e *i18n_error) { - if (src == NULL) { - *i18n_error = I18N_ERROR_INVALID_PARAMETER; - return NULL; - } + if (src == NULL) { + *i18n_error = I18N_ERROR_INVALID_PARAMETER; + return NULL; + } - UErrorCode icu_error = U_ZERO_ERROR; - i18n_uchar *result = - u_strFromUTF8WithSub(dest, dest_capacity, dest_len, src, src_len, sub_char, - num_substitutions, &icu_error); - *i18n_error = _i18n_error_mapping(icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + i18n_uchar *result = + u_strFromUTF8WithSub(dest, dest_capacity, dest_len, src, src_len, sub_char, + num_substitutions, &icu_error); + *i18n_error = _i18n_error_mapping(icu_error); - return result; + return result; } i18n_uchar *i18n_ustring_from_UTF8_lenient(i18n_uchar *dest, int32_t dest_capacity, - int32_t *dest_len, const char *src, int32_t src_len, - i18n_error_code_e *i18n_error) + int32_t *dest_len, const char *src, int32_t src_len, + i18n_error_code_e *i18n_error) { - if (src == NULL) { - *i18n_error = I18N_ERROR_INVALID_PARAMETER; - return NULL; - } + if (src == NULL) { + *i18n_error = I18N_ERROR_INVALID_PARAMETER; + return NULL; + } - UErrorCode icu_error = U_ZERO_ERROR; - i18n_uchar *result = - u_strFromUTF8Lenient(dest, dest_capacity, dest_len, src, src_len, &icu_error); - *i18n_error = _i18n_error_mapping(icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + i18n_uchar *result = + u_strFromUTF8Lenient(dest, dest_capacity, dest_len, src, src_len, &icu_error); + *i18n_error = _i18n_error_mapping(icu_error); - return result; + return result; } i18n_uchar32 *i18n_ustring_to_UTF32(i18n_uchar32 *dest, int32_t dest_capacity, int32_t *dest_len, - const i18n_uchar *src, int32_t src_len, - i18n_error_code_e *i18n_error) + const i18n_uchar *src, int32_t src_len, + i18n_error_code_e *i18n_error) { - if (src == NULL) { - *i18n_error = I18N_ERROR_INVALID_PARAMETER; - return NULL; - } + if (src == NULL) { + *i18n_error = I18N_ERROR_INVALID_PARAMETER; + return NULL; + } - UErrorCode icu_error = U_ZERO_ERROR; - i18n_uchar32 *result = u_strToUTF32(dest, dest_capacity, dest_len, src, src_len, &icu_error); - *i18n_error = _i18n_error_mapping(icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + i18n_uchar32 *result = u_strToUTF32(dest, dest_capacity, dest_len, src, src_len, &icu_error); + *i18n_error = _i18n_error_mapping(icu_error); - return result; + return result; } i18n_uchar *i18n_ustring_from_UTF32(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, - const i18n_uchar32 *src, int32_t src_len, - i18n_error_code_e *i18n_error) + const i18n_uchar32 *src, int32_t src_len, + i18n_error_code_e *i18n_error) { - if (src == NULL) { - *i18n_error = I18N_ERROR_INVALID_PARAMETER; - return NULL; - } + if (src == NULL) { + *i18n_error = I18N_ERROR_INVALID_PARAMETER; + return NULL; + } - UErrorCode icu_error = U_ZERO_ERROR; - i18n_uchar *result = u_strFromUTF32(dest, dest_capacity, dest_len, src, src_len, &icu_error); - *i18n_error = _i18n_error_mapping(icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + i18n_uchar *result = u_strFromUTF32(dest, dest_capacity, dest_len, src, src_len, &icu_error); + *i18n_error = _i18n_error_mapping(icu_error); - return result; + return result; } i18n_uchar32 *i18n_ustring_to_UTF32_with_sub(i18n_uchar32 *dest, int32_t dest_capacity, - int32_t *dest_len, const i18n_uchar *src, - int32_t src_len, i18n_uchar32 sub_char, - int32_t *num_substitutions, - i18n_error_code_e *i18n_error) + int32_t *dest_len, const i18n_uchar *src, + int32_t src_len, i18n_uchar32 sub_char, + int32_t *num_substitutions, + i18n_error_code_e *i18n_error) { - if (src == NULL) { - *i18n_error = I18N_ERROR_INVALID_PARAMETER; - return NULL; - } + if (src == NULL) { + *i18n_error = I18N_ERROR_INVALID_PARAMETER; + return NULL; + } - UErrorCode icu_error = U_ZERO_ERROR; - i18n_uchar32 *result = - u_strToUTF32WithSub(dest, dest_capacity, dest_len, src, src_len, sub_char, - num_substitutions, &icu_error); - *i18n_error = _i18n_error_mapping(icu_error); + UErrorCode icu_error = U_ZERO_ERROR; + i18n_uchar32 *result = + u_strToUTF32WithSub(dest, dest_capacity, dest_len, src, src_len, sub_char, + num_substitutions, &icu_error); + *i18n_error = _i18n_error_mapping(icu_error); - return result; + return result; } i18n_uchar *i18n_ustring_from_UTF32_with_sub(i18n_uchar *dest, int32_t dest_capacity, - int32_t *dest_len, const i18n_uchar32 *src, - int32_t src_len, i18n_uchar32 sub_char, - int32_t *num_substitutions, - i18n_error_code_e *i18n_error) -{ - if (src == NULL) { - *i18n_error = I18N_ERROR_INVALID_PARAMETER; - return NULL; - } - - UErrorCode icu_error = U_ZERO_ERROR; - i18n_uchar *result = - u_strFromUTF32WithSub(dest, dest_capacity, dest_len, src, src_len, sub_char, - num_substitutions, (UErrorCode *) & icu_error); - *i18n_error = _i18n_error_mapping(icu_error); - - return result; + int32_t *dest_len, const i18n_uchar32 *src, + int32_t src_len, i18n_uchar32 sub_char, + int32_t *num_substitutions, + i18n_error_code_e *i18n_error) +{ + if (src == NULL) { + *i18n_error = I18N_ERROR_INVALID_PARAMETER; + return NULL; + } + + UErrorCode icu_error = U_ZERO_ERROR; + i18n_uchar *result = + u_strFromUTF32WithSub(dest, dest_capacity, dest_len, src, src_len, sub_char, + num_substitutions, (UErrorCode *) & icu_error); + *i18n_error = _i18n_error_mapping(icu_error); + + return result; } -- 2.7.4 From 985363f2dcbbde34a9334a3182a26bfeb1ec4d63 Mon Sep 17 00:00:00 2001 From: MyoungJune Park Date: Mon, 9 May 2016 10:08:38 +0900 Subject: [PATCH 09/16] change version number of @since_tizen on Wearable - rename 2.4 3.0 Change-Id: I24f23e541a2943267f1ffac7fc4b0693e3879cc1 --- src/include/wearable/utils_i18n_types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/include/wearable/utils_i18n_types.h b/src/include/wearable/utils_i18n_types.h index 833d356..4800a5d 100644 --- a/src/include/wearable/utils_i18n_types.h +++ b/src/include/wearable/utils_i18n_types.h @@ -1336,7 +1336,7 @@ typedef enum { /** * @brief Result values for normalization quick check functions. * - * @since_tizen 2.4 + * @since_tizen 3.0 */ typedef enum { I18N_UNORMALIZATION_NO, /**< The input string is not in the normalization form. */ @@ -2642,7 +2642,7 @@ typedef void *i18n_uenumeration_h; /** * @brief Constants for ISO 15924 script codes. - * @since_tizen 2.4 + * @since_tizen 3.0 */ typedef enum { I18N_USCRIPT_INVALID_CODE = -1, -- 2.7.4 From c4fb33f2f1faf4cee20e2542819c0740aa5ff3d7 Mon Sep 17 00:00:00 2001 From: MyoungJune Park Date: Mon, 9 May 2016 11:02:32 +0900 Subject: [PATCH 10/16] add 'common' and 'common_iot' profiles for build configuration Change-Id: I37a501ce7ac690f93c286b8645da3bb0189846af Signed-off-by: Beata Stefaniuk --- packaging/capi-base-utils.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packaging/capi-base-utils.spec b/packaging/capi-base-utils.spec index b3c278c..e7d38ad 100755 --- a/packaging/capi-base-utils.spec +++ b/packaging/capi-base-utils.spec @@ -38,6 +38,13 @@ cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DLIB_INSTALL_DIR:PATH=%{_libdir} -DIN %if "%{profile}" == "mobile" -DTIZEN_MOBILE=YES \ %endif +%if "%{profile}" == "common" + -DTIZEN_MOBILE=YES \ +%endif +%if "%{profile}" == "common_iot" + -DTIZEN_MOBILE=YES \ +%endif + make %{?jobs:-j%jobs} -- 2.7.4 From b603cc2c5106405867bdf39292213f2922a86bdf Mon Sep 17 00:00:00 2001 From: Beata Stefaniuk Date: Fri, 20 May 2016 09:55:00 +0200 Subject: [PATCH 11/16] [Base-utils] udate, udatepg: formatter_LA -> formatter_SaoPaulo fixed Change-Id: Ifa9d5e8139dc8636ab1ea101f688a78bc8af82c8 Signed-off-by: Beata Stefaniuk --- src/include/mobile/utils_i18n_udate.h | 2 +- src/include/mobile/utils_i18n_udatepg.h | 2 +- src/include/wearable/utils_i18n_udate.h | 2 +- src/include/wearable/utils_i18n_udatepg.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/include/mobile/utils_i18n_udate.h b/src/include/mobile/utils_i18n_udate.h index 5cf902f..eb1d646 100644 --- a/src/include/mobile/utils_i18n_udate.h +++ b/src/include/mobile/utils_i18n_udate.h @@ -124,7 +124,7 @@ if (ret != I18N_ERROR_NONE) { dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); } - if (!formatter_LA) { + if (!formatter_SaoPaulo) { dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n"); } diff --git a/src/include/mobile/utils_i18n_udatepg.h b/src/include/mobile/utils_i18n_udatepg.h index a2f9f3b..6463b83 100644 --- a/src/include/mobile/utils_i18n_udatepg.h +++ b/src/include/mobile/utils_i18n_udatepg.h @@ -123,7 +123,7 @@ if (ret != I18N_ERROR_NONE) { dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); } - if (!formatter_LA) { + if (!formatter_SaoPaulo) { dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n"); } diff --git a/src/include/wearable/utils_i18n_udate.h b/src/include/wearable/utils_i18n_udate.h index 5cf902f..eb1d646 100644 --- a/src/include/wearable/utils_i18n_udate.h +++ b/src/include/wearable/utils_i18n_udate.h @@ -124,7 +124,7 @@ if (ret != I18N_ERROR_NONE) { dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); } - if (!formatter_LA) { + if (!formatter_SaoPaulo) { dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n"); } diff --git a/src/include/wearable/utils_i18n_udatepg.h b/src/include/wearable/utils_i18n_udatepg.h index a2f9f3b..6463b83 100644 --- a/src/include/wearable/utils_i18n_udatepg.h +++ b/src/include/wearable/utils_i18n_udatepg.h @@ -123,7 +123,7 @@ if (ret != I18N_ERROR_NONE) { dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n"); } - if (!formatter_LA) { + if (!formatter_SaoPaulo) { dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n"); } -- 2.7.4 From 82f7863f6333346c30d5a84533806d69ae48c3ce Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20Szczekutek?= Date: Thu, 9 Jun 2016 14:27:32 +0200 Subject: [PATCH 12/16] [Base-utils] common header file updated Change-Id: If9c225459d12b4548ea08f5782d306f7062ff41e Signed-off-by: Beata Stefaniuk --- packaging/capi-base-utils.spec | 17 +------ src/include/mobile/utils_i18n_types.h | 86 +++++++++++++++++++++++++++++++++ src/include/wearable/utils_i18n_types.h | 86 +++++++++++++++++++++++++++++++++ 3 files changed, 173 insertions(+), 16 deletions(-) diff --git a/packaging/capi-base-utils.spec b/packaging/capi-base-utils.spec index e7d38ad..7887d68 100755 --- a/packaging/capi-base-utils.spec +++ b/packaging/capi-base-utils.spec @@ -66,20 +66,5 @@ cat LICENSE.ICU >> %{buildroot}/usr/share/license/%{name} %files devel %defattr(-,root,root,-) -%{_includedir}/base/utils_i18n_ucalendar.h -%{_includedir}/base/utils_i18n_udate.h -%{_includedir}/base/utils_i18n_udatepg.h -%{_includedir}/base/utils_i18n_ulocale.h -%{_includedir}/base/utils_i18n_unumber.h -%{_includedir}/base/utils_i18n_uchar.h -%{_includedir}/base/utils_i18n_ucollator.h -%{_includedir}/base/utils_i18n_unormalization.h -%{_includedir}/base/utils_i18n_usearch.h -%{_includedir}/base/utils_i18n_ustring.h -%{_includedir}/base/utils_i18n_timezone.h -%{_includedir}/base/utils_i18n_types.h -%{_includedir}/base/utils_i18n_uenumeration.h -%{_includedir}/base/utils_i18n_uset.h -%{_includedir}/base/utils_i18n_ubrk.h -%{_includedir}/base/utils_i18n.h +%{_includedir}/base/utils_i18n*.h %{_libdir}/pkgconfig/*.pc diff --git a/src/include/mobile/utils_i18n_types.h b/src/include/mobile/utils_i18n_types.h index 833d356..d2f0e4c 100644 --- a/src/include/mobile/utils_i18n_types.h +++ b/src/include/mobile/utils_i18n_types.h @@ -2811,6 +2811,92 @@ typedef enum { I18N_USCRIPT_CODE_LIMIT = 159 /**< Count of i18n_uscript_code_e enumerators*/ } i18n_uscript_code_e; +/** + * @brief Handle to the object of base class for all formats. + * @since_tizen 3.0 + */ +typedef void *i18n_format_h; + +/** + * @brief Handle to the object that represents a formatter for measure objects. + * @since_tizen 3.0 + */ +typedef void *i18n_measure_format_h; + +/** + * @brief Enumeration for various widths. + * @since_tizen 3.0 + */ +typedef enum { + I18N_UMEASFMT_WIDTH_WIDE = 0, /**< Spell out measure units. */ + I18N_UMEASFMT_WIDTH_SHORT = 1, /**< Abbreviate measure units. */ + I18N_UMEASFMT_WIDTH_NARROW = 2, /**< Use symbols for measure units when possible. */ + I18N_UMEASFMT_WIDTH_NUMERIC = 3, /**< Completely omit measure units when possible. + For example, format '5 hours, 37 minutes' as '5:37' */ + I18N_UMEASFMT_WIDTH_COUNT = 4, /**< Count of values in this enumeration. */ +} i18n_umeasure_format_width_e; + +/** + * @brief Handle to the object of class used for formatting #i18n_format_h and its subclasses. + * @since_tizen 3.0 + */ +typedef void *i18n_formattable_h; + +/** + * @brief Enumeration for the flavor of data type contained within an #i18n_formattable_h object. + * @since_tizen 3.0 + */ +typedef enum { + I18N_FORMATTABLE_K_DATE = 0, /**< Selector indicating an #i18n_udate value */ + I18N_FORMATTABLE_K_DOUBLE = 1, /**< Selector indicating a double value */ + I18N_FORMATTABLE_K_LONG = 2, /**< Selector indicating a 32-bit integer value */ + I18N_FORMATTABLE_K_STRING = 3, /**< Selector indicating a UnicodeString value */ + I18N_FORMATTABLE_K_ARRAY = 4, /**< Selector indicating an array of #i18n_formattable_h */ + I18N_FORMATTABLE_K_INT64 = 5, /**< Selector indicating a 64-bit integer value */ + I18N_FORMATTABLE_K_OBJECT = 6, /**< Selector indicating a UObject value */ +} i18n_formattable_type_e; + +/** + * @brief Handle to the object of class used by the #i18n_format_h and its subclasses to identify fields in a formatted output. + * @since_tizen 3.0 + */ +typedef void *i18n_field_position_h; + +/** + * @brief Handle to the object that represents an amount of a specified unit. + * @since_tizen 3.0 + */ +typedef void *i18n_measure_h; + +/** + * @brief Handle to the object that represents a unit such as length, mass, volume, currency, etc. + * @since_tizen 3.0 + */ +typedef void *i18n_measure_unit_h; + +/** + * @brief Callback function for the #i18n_measure_unit_get_available_types() + * that returns an enumeration over all recognized types. + * @since_tizen 3.0 + * + * @param[in] type_id The type ID + * @param[in] user_data The user data passed to the callback function + * + * @return @c true to continue with the next iteration of the loop, + * otherwise @c false to break out of the loop. + */ +typedef bool (*i18n_measure_unit_types_cb)(const char *type_id, void *user_data); + +/** + * @brief Enumeration for the flavor of data type contained within an #i18n_formattable_h object. + * @since_tizen 3.0 + */ +typedef enum { + I18N_ULOC_ACTUAL_LOCALE = 0, /**< This is locale the data actually comes from */ + I18N_ULOC_VALID_LOCALE = 1, /**< This is the most specific locale supported by the ICU */ + I18N_ULOC_REQUESTED_LOCALE = 2, /**< This is the requested locale (deprecated) */ +} i18n_uloc_data_locale_type_e; + #ifdef __cplusplus } #endif diff --git a/src/include/wearable/utils_i18n_types.h b/src/include/wearable/utils_i18n_types.h index 4800a5d..99d0e96 100644 --- a/src/include/wearable/utils_i18n_types.h +++ b/src/include/wearable/utils_i18n_types.h @@ -2811,6 +2811,92 @@ typedef enum { I18N_USCRIPT_CODE_LIMIT = 159 /**< Count of i18n_uscript_code_e enumerators*/ } i18n_uscript_code_e; +/** + * @brief Handle to the object of base class for all formats. + * @since_tizen 3.0 + */ +typedef void *i18n_format_h; + +/** + * @brief Handle to the object that represents a formatter for measure objects. + * @since_tizen 3.0 + */ +typedef void *i18n_measure_format_h; + +/** + * @brief Enumeration for various widths. + * @since_tizen 3.0 + */ +typedef enum { + I18N_UMEASFMT_WIDTH_WIDE = 0, /**< Spell out measure units. */ + I18N_UMEASFMT_WIDTH_SHORT = 1, /**< Abbreviate measure units. */ + I18N_UMEASFMT_WIDTH_NARROW = 2, /**< Use symbols for measure units when possible. */ + I18N_UMEASFMT_WIDTH_NUMERIC = 3, /**< Completely omit measure units when possible. + For example, format '5 hours, 37 minutes' as '5:37' */ + I18N_UMEASFMT_WIDTH_COUNT = 4, /**< Count of values in this enumeration. */ +} i18n_umeasure_format_width_e; + +/** + * @brief Handle to the object of class used for formatting #i18n_format_h and its subclasses. + * @since_tizen 3.0 + */ +typedef void *i18n_formattable_h; + +/** + * @brief Enumeration for the flavor of data type contained within an #i18n_formattable_h object. + * @since_tizen 3.0 + */ +typedef enum { + I18N_FORMATTABLE_K_DATE = 0, /**< Selector indicating an #i18n_udate value */ + I18N_FORMATTABLE_K_DOUBLE = 1, /**< Selector indicating a double value */ + I18N_FORMATTABLE_K_LONG = 2, /**< Selector indicating a 32-bit integer value */ + I18N_FORMATTABLE_K_STRING = 3, /**< Selector indicating a UnicodeString value */ + I18N_FORMATTABLE_K_ARRAY = 4, /**< Selector indicating an array of #i18n_formattable_h */ + I18N_FORMATTABLE_K_INT64 = 5, /**< Selector indicating a 64-bit integer value */ + I18N_FORMATTABLE_K_OBJECT = 6, /**< Selector indicating a UObject value */ +} i18n_formattable_type_e; + +/** + * @brief Handle to the object of class used by the #i18n_format_h and its subclasses to identify fields in a formatted output. + * @since_tizen 3.0 + */ +typedef void *i18n_field_position_h; + +/** + * @brief Handle to the object that represents an amount of a specified unit. + * @since_tizen 3.0 + */ +typedef void *i18n_measure_h; + +/** + * @brief Handle to the object that represents a unit such as length, mass, volume, currency, etc. + * @since_tizen 3.0 + */ +typedef void *i18n_measure_unit_h; + +/** + * @brief Callback function for the #i18n_measure_unit_get_available_types() + * that returns an enumeration over all recognized types. + * @since_tizen 3.0 + * + * @param[in] type_id The type ID + * @param[in] user_data The user data passed to the callback function + * + * @return @c true to continue with the next iteration of the loop, + * otherwise @c false to break out of the loop. + */ +typedef bool (*i18n_measure_unit_types_cb)(const char *type_id, void *user_data); + +/** + * @brief Enumeration for the flavor of data type contained within an #i18n_formattable_h object. + * @since_tizen 3.0 + */ +typedef enum { + I18N_ULOC_ACTUAL_LOCALE = 0, /**< This is locale the data actually comes from */ + I18N_ULOC_VALID_LOCALE = 1, /**< This is the most specific locale supported by the ICU */ + I18N_ULOC_REQUESTED_LOCALE = 2, /**< This is the requested locale (deprecated) */ +} i18n_uloc_data_locale_type_e; + #ifdef __cplusplus } #endif -- 2.7.4 From 10aa25c206ddd272ee19e039b213cab3e5c76bc2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20Szczekutek?= Date: Thu, 23 Jun 2016 12:03:07 +0200 Subject: [PATCH 13/16] [Base-utils][Unumber] Missing description added MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The description for the possible values that can be set with the i18n_unumber_set_attribute() function for the I18N_UNUMBER_PADDING_POSITION attribute. Related enumeration added. Validation added, to prevent from casting invalid values to the enumeration. Change-Id: I97bec5c1c8238a49732dfd20b520b8a730438856 Signed-off-by: Rafał Szczekutek --- src/include/mobile/utils_i18n_types.h | 11 +++++++++++ src/include/mobile/utils_i18n_unumber.h | 4 ++++ src/include/wearable/utils_i18n_types.h | 11 +++++++++++ src/include/wearable/utils_i18n_unumber.h | 4 ++++ src/utils_i18n_unumber.c | 9 +++++++-- 5 files changed, 37 insertions(+), 2 deletions(-) diff --git a/src/include/mobile/utils_i18n_types.h b/src/include/mobile/utils_i18n_types.h index 833d356..24b92ce 100644 --- a/src/include/mobile/utils_i18n_types.h +++ b/src/include/mobile/utils_i18n_types.h @@ -2180,6 +2180,17 @@ typedef enum { } i18n_unumber_format_attribute_e; /** + * @brief Enumeration for the possible values of the #I18N_UNUMBER_PADDING_POSITION attribute. + * @since_tizen 3.0 + */ +typedef enum { + I18N_UNUMBER_PAD_BEFORE_PREFIX, + I18N_UNUMBER_PAD_AFTER_PREFIX, + I18N_UNUMBER_PAD_BEFORE_SUFFIX, + I18N_UNUMBER_PAD_AFTER_SUFFIX, +} i18n_unumber_pad_position_e; + +/** * @brief The possible #i18n_unumber_format_h text attributes. * @since_tizen 2.3.1 */ diff --git a/src/include/mobile/utils_i18n_unumber.h b/src/include/mobile/utils_i18n_unumber.h index 996bb25..b0ab229 100644 --- a/src/include/mobile/utils_i18n_unumber.h +++ b/src/include/mobile/utils_i18n_unumber.h @@ -481,6 +481,9 @@ int32_t i18n_unumber_get_attribute(const i18n_unumber_format_h fmt, i18n_unumber * @details An example of a numeric attribute is the number of integer digits a formatter will produce. * If the formatter does not understand the attribute, the call is ignored. Rule-based formatters only understand * the lenient-parse attribute. The #I18N_UNUMBER_ROUNDING_INCREMENT attribute is not supported. + * + * Note that the value for the #I18N_UNUMBER_PADDING_POSITION attribute should be one of the #i18n_unumber_pad_position_e + * enumeration values. * @remarks Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * @@ -498,6 +501,7 @@ int32_t i18n_unumber_get_attribute(const i18n_unumber_format_h fmt, i18n_unumber * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful. * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_NOT_SUPPORTED Not supported */ int i18n_unumber_set_attribute(i18n_unumber_format_h fmt, i18n_unumber_format_attribute_e attr, int32_t new_value); diff --git a/src/include/wearable/utils_i18n_types.h b/src/include/wearable/utils_i18n_types.h index 4800a5d..e999e64 100644 --- a/src/include/wearable/utils_i18n_types.h +++ b/src/include/wearable/utils_i18n_types.h @@ -2180,6 +2180,17 @@ typedef enum { } i18n_unumber_format_attribute_e; /** + * @brief Enumeration for the possible values of the #I18N_UNUMBER_PADDING_POSITION attribute. + * @since_tizen 3.0 + */ +typedef enum { + I18N_UNUMBER_PAD_BEFORE_PREFIX, + I18N_UNUMBER_PAD_AFTER_PREFIX, + I18N_UNUMBER_PAD_BEFORE_SUFFIX, + I18N_UNUMBER_PAD_AFTER_SUFFIX, +} i18n_unumber_pad_position_e; + +/** * @brief The possible #i18n_unumber_format_h text attributes. * @since_tizen 2.3.1 */ diff --git a/src/include/wearable/utils_i18n_unumber.h b/src/include/wearable/utils_i18n_unumber.h index 996bb25..b0ab229 100644 --- a/src/include/wearable/utils_i18n_unumber.h +++ b/src/include/wearable/utils_i18n_unumber.h @@ -481,6 +481,9 @@ int32_t i18n_unumber_get_attribute(const i18n_unumber_format_h fmt, i18n_unumber * @details An example of a numeric attribute is the number of integer digits a formatter will produce. * If the formatter does not understand the attribute, the call is ignored. Rule-based formatters only understand * the lenient-parse attribute. The #I18N_UNUMBER_ROUNDING_INCREMENT attribute is not supported. + * + * Note that the value for the #I18N_UNUMBER_PADDING_POSITION attribute should be one of the #i18n_unumber_pad_position_e + * enumeration values. * @remarks Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * @@ -498,6 +501,7 @@ int32_t i18n_unumber_get_attribute(const i18n_unumber_format_h fmt, i18n_unumber * @return The obtained error code. * @retval #I18N_ERROR_NONE Successful. * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_NOT_SUPPORTED Not supported */ int i18n_unumber_set_attribute(i18n_unumber_format_h fmt, i18n_unumber_format_attribute_e attr, int32_t new_value); diff --git a/src/utils_i18n_unumber.c b/src/utils_i18n_unumber.c index 6edabac..de5229d 100644 --- a/src/utils_i18n_unumber.c +++ b/src/utils_i18n_unumber.c @@ -320,8 +320,13 @@ int32_t i18n_unumber_get_attribute(const i18n_unumber_format_h fmt, int i18n_unumber_set_attribute(i18n_unumber_format_h fmt, i18n_unumber_format_attribute_e attr, int32_t new_value) { - if (fmt == NULL || attr == I18N_UNUMBER_ROUNDING_INCREMENT) - return I18N_ERROR_INVALID_PARAMETER; + if (fmt == NULL) return I18N_ERROR_INVALID_PARAMETER; + + if (attr == I18N_UNUMBER_ROUNDING_INCREMENT) return I18N_ERROR_NOT_SUPPORTED; + + if (attr == I18N_UNUMBER_PADDING_POSITION && + (new_value < I18N_UNUMBER_PAD_BEFORE_PREFIX || new_value > I18N_UNUMBER_PAD_AFTER_SUFFIX)) + return I18N_ERROR_INVALID_PARAMETER; unum_setAttribute(fmt, attr, new_value); return I18N_ERROR_NONE; -- 2.7.4 From f211980a1cd333f637652817326a7ca7c3e9f5e4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20Szczekutek?= Date: Fri, 24 Jun 2016 18:40:04 +0200 Subject: [PATCH 14/16] [Base-utils][AlphabeticIndex] Complete module added MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: Ib0612ff3ff85f38100b1a4d06d45eda394a6eed2 Signed-off-by: Rafał Szczekutek Signed-off-by: Jakub Siewierski --- packaging/capi-base-utils.spec | 2 +- src/CMakeLists.txt | 2 + src/include/mobile/utils_i18n.h | 137 ++++++++- src/include/mobile/utils_i18n_alpha_idx.h | 415 ++++++++++++++++++++++++++++ src/include/mobile/utils_i18n_types.h | 45 +++ src/include/wearable/utils_i18n.h | 137 ++++++++- src/include/wearable/utils_i18n_alpha_idx.h | 415 ++++++++++++++++++++++++++++ src/include/wearable/utils_i18n_types.h | 45 +++ src/utils_i18n_alpha_idx.cpp | 366 ++++++++++++++++++++++++ 9 files changed, 1561 insertions(+), 3 deletions(-) create mode 100644 src/include/mobile/utils_i18n_alpha_idx.h create mode 100644 src/include/wearable/utils_i18n_alpha_idx.h create mode 100644 src/utils_i18n_alpha_idx.cpp diff --git a/packaging/capi-base-utils.spec b/packaging/capi-base-utils.spec index 7887d68..0ac8647 100755 --- a/packaging/capi-base-utils.spec +++ b/packaging/capi-base-utils.spec @@ -1,6 +1,6 @@ Name: capi-base-utils Summary: Base Utils -Version: 1.2.3 +Version: 1.2.4 Release: 1 Group: Base License: Apache-2.0 and ICU diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b858ab8..0a23693 100755 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -33,6 +33,7 @@ SET(BASEUTILS_SRCS utils_i18n_uset.c utils_i18n_ubrk.c utils_i18n_timezone.cpp + utils_i18n_alpha_idx.cpp ) ADD_LIBRARY(${target_name} SHARED ${BASEUTILS_SRCS} @@ -67,5 +68,6 @@ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${INC_DIR}/utils_i18n_timezone.h DESTI INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${INC_DIR}/utils_i18n_uenumeration.h DESTINATION ${INCLUDE_INSTALL_DIR}/base) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${INC_DIR}/utils_i18n_uset.h DESTINATION ${INCLUDE_INSTALL_DIR}/base) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${INC_DIR}/utils_i18n_ubrk.h DESTINATION ${INCLUDE_INSTALL_DIR}/base) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${INC_DIR}/utils_i18n_alpha_idx.h DESTINATION ${INCLUDE_INSTALL_DIR}/base) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${INC_DIR}/utils_i18n.h DESTINATION ${INCLUDE_INSTALL_DIR}/base) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${pc_name}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) diff --git a/src/include/mobile/utils_i18n.h b/src/include/mobile/utils_i18n.h index 3bdb929..13b23bc 100644 --- a/src/include/mobile/utils_i18n.h +++ b/src/include/mobile/utils_i18n.h @@ -32,6 +32,7 @@ #include #include #include +#include /** * @file utils_i18n.h @@ -46,7 +47,7 @@ extern "C" { /** * @ingroup CAPI_BASE_UTILS_MODULE * @defgroup CAPI_BASE_UTILS_I18N_MODULE i18n - * @brief The i18n module contains uchar, ucollator, unormalization, usearch, ustring, ucalendar, udate, udatepg, ulocale and unumber. + * @brief The i18n module contains uchar, ucollator, unormalization, usearch, ustring, ucalendar, udate, udatepg, ulocale, unumber and alpha_idx. * This module provides flexible generation of number or date format patterns and helps you format and parse dates/number for any locale. * The i18n module provides various features based on data from ICU. The following table shows the version of ICU used in each Tizen platform. * @@ -123,6 +124,10 @@ extern "C" { * * * + * + * + * + * *
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULEUnumber helps you format and parse numbers for any locale.
@ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULEAlpha_idx supports the creation of a UI index appropriate for a given language.
* * @section CAPI_BASE_UTILS_I18N_MODULE_MAPPING_TABLE Mapping Table @@ -1778,6 +1783,136 @@ extern "C" { * #i18n_ustring_from_UTF32_with_sub * u_strFromUTF32WithSub * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_create + * AlphabeticIndex + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_destroy + * ~AlphabeticIndex + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_add_labels + * addLabels + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_add_record + * addRecord + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_get_next_bucket + * nextBucket + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_get_next_record + * nextRecord + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_get_bucket_record_count + * getBucketRecordCount + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_get_bucket_label + * getBucketLabel + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_get_record_data + * getRecordData + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_get_inflow_label + * getInflowLabel + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_set_inflow_label + * setInflowLabel + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_get_overflow_label + * getOverflowLabel + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_set_overflow_label + * setOverflowLabel + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_get_underflow_label + * getUnderflowLabel + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_set_underflow_label + * setUnderflowLabel + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_get_max_label_count + * getMaxLabelCount + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_set_max_label_count + * setMaxLabelCount + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_clear_records + * clearRecords + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_get_bucket_count + * getBucketCount + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_get_record_count + * getRecordCount + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_get_bucket_index + * getBucketIndex(const UnicodeString &itemName, UErrorCode &status) + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_get_current_bucket_index + * getBucketIndex() + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_get_bucket_label_type + * getBucketLabelType + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_get_record_name + * getRecordName + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_reset_bucket_iter + * resetBucketIterator + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_reset_record_iter + * resetRecordIterator + * * */ diff --git a/src/include/mobile/utils_i18n_alpha_idx.h b/src/include/mobile/utils_i18n_alpha_idx.h new file mode 100644 index 0000000..5131a37 --- /dev/null +++ b/src/include/mobile/utils_i18n_alpha_idx.h @@ -0,0 +1,415 @@ +/* + * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __UTILS_I18N_ALPHA_IDX_H__ +#define __UTILS_I18N_ALPHA_IDX_H__ + +#include + +/** + * @file utils_i18n_alpha_idx.h + * @version 0.1 + * @brief utils_i18n_alpha_idx + */ + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @ingroup CAPI_BASE_UTILS_I18N_MODULE + * @defgroup CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE AlphabeticIndex + * @brief AlphabeticIndex supports the creation of a UI index appropriate for a given language. + * @section CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE_HEADER Required Header + * \#include + * + * @section CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE_OVERVIEW Overview + * @details The module can generate a list of labels for use as a UI "index", + * that is, a list of clickable characters (or character sequences) + * that allow the user to see a segment (bucket) of a larger "target" list. + * That is, each label corresponds to a bucket in the target list, where + * everything in the bucket is greater than or equal to the character + * (according to the locale's collation). Strings can be added to the index; + * they will be in sorted order in the right bucket. + * The module also supports having buckets for strings before the first (underflow), + * after the last (overflow), and between scripts (inflow). For example, + * if the index is constructed with labels for Russian and English, + * Greek characters would fall into an inflow bucket between the other two scripts. + */ + +/** + * @addtogroup CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * @{ + */ + +/** + * @brief Creates an alphabetic index object for the specified locale. + * @remarks The created object should be released by the caller with the + * #i18n_alpha_idx_destroy() function. + * + * @param[in] language The language of the locale + * @param[in] country The country of the locale + * @param[out] index The created alphabetic index object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_alpha_idx_create(const char *language, const char *country, + i18_alpha_idx_h *index); + +/** + * @brief Destroys the alphabetic index object. + * + * @param[in] index The alphabetic index to be destroyed + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_destroy(i18_alpha_idx_h index); + +/** + * @brief Adds the index characters from a specified locale to the index. + * + * @param[in] index Label will be added to this alphabetic index + * @param[in] language The language of the locale + * @param[in] country The country of the locale + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_add_labels(i18_alpha_idx_h index, const char *language, + const char *country); + +/** + * @brief Adds the record to the alphabetic index. + * + * @param[in] index Record will be added to this alphabetic index + * @param[in] name The display name for the record + * @param[in] data An optional pointer to user data associated with this item + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_add_record(i18_alpha_idx_h index, const char *name, + const void *data); + +/** + * @brief Sets the next bucket as current bucket in the index. + * + * @param[in] index The alphabetic index, which contains buckets + * @param[out] success A flag set to @c true if the iteration succeeded, + * or @c false at the end of iteration. + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_get_next_bucket(i18_alpha_idx_h index, bool *success); + +/** + * @brief Sets the next record as current record in current bucket of the index. + * @details When i18n_alpha_idx_next_bucket() is called, record iteration is reset + * to just before the first record in the new bucket. + * + * @param[in] index The alphabetic index, which contains buckets with records + * @param[out] success A flag set to @c true if the iteration succeeded, + * or @c false at the end of iteration. + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_get_next_record(i18_alpha_idx_h index, bool *success); + +/** + * @brief Gets the number of records in the current bucket. + * + * @param[in] index The alphabetic index, which contains buckets with records + * @param[out] records_count Number of records in the current bucket + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_get_bucket_record_count(i18_alpha_idx_h index, int32_t *records_count); + +/** + * @brief Gets the name of the label of the current bucket in alphabetic index. + * @remarks The obtained @a label should be released by the caller with the free() function. + * + * @param[in] index The alphabetic index, which contains buckets + * @param[out] label The name of the label of the current bucket + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_get_bucket_label(i18_alpha_idx_h index, char **label); + +/** + * @brief Gets the data pointer of the current record in current bucket in alphabetic index. + * + * @param[in] index The alphabetic index, which contains buckets with records + * @param[out] data The data pointer of the current record + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_INDEX_OUTOFBOUNDS Trying to access the index that is out of bounds + */ +int i18n_alpha_idx_get_record_data(i18_alpha_idx_h index, const void **data); + +/** + * @brief Gets the default label used for abbreviated buckets between other index characters. + * @details For example, consider the labels when Latin and Greek are used: X Y Z ... Α Β + * Γ. + * @remarks The obtained @a label should be released by the caller with the free() function. + * + * @param[in] index The alphabetic index, which contains buckets with records + * @param[out] label The default label used for abbreviated bucket between other index characters + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_get_inflow_label(i18_alpha_idx_h index, char **label); + +/** + * @brief Sets the default label used for abbreviated buckets between other index characters. + * @details An inflow label will be automatically inserted if two otherwise-adjacent label characters + * are from different scripts, e.g. Latin and Cyrillic, and a third script, + * e.g. Greek, sorts between the two. The default inflow character is an ellipsis (...) + * + * @param[in] index The alphabetic index, which contains buckets with records + * @param[in] label The default label used for abbreviated bucket between other index characters + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_set_inflow_label(i18_alpha_idx_h index, const char *label); + +/** + * @brief Gets the special label used for items that sort after the last normal label, + * and that would not otherwise have an appropriate label. + * @remarks The obtained @a label should be released by the caller with the free() function. + * + * @param[in] index The alphabetic index, which contains buckets with records + * @param[out] label The special label used for items that sort after the last normal label + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_get_overflow_label(i18_alpha_idx_h index, char **label); + +/** + * @brief Sets the special label used for items that sort after the last normal label, + * and that would not otherwise have an appropriate label. + * + * @param[in] index The alphabetic index, which contains buckets with records + * @param[in] label The special label used for items that sort after the last normal label + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_set_overflow_label(i18_alpha_idx_h index, const char *label); + +/** + * @brief Gets the special label used for items that sort before the first normal label, + * and that would not otherwise have an appropriate label. + * @remarks The obtained @a label should be released by the caller with the free() function. + * + * @param[in] index The alphabetic index, which contains buckets with records + * @param[out] label The special label used for items that sort before the first normal label + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_get_underflow_label(i18_alpha_idx_h index, char **label); + +/** + * @brief Sets the special label used for items that sort before the first normal label, + * and that would not otherwise have an appropriate label. + * + * @param[in] index The alphabetic index, which contains buckets with records + * @param[in] label The special label used for items that sort before the first normal label + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_set_underflow_label(i18_alpha_idx_h index, const char *label); + +/** + * @brief Gets the limit on the number of labels permitted in the index. + * + * @param[in] index The alphabetic index, which contains buckets with records + * @param[out] max_label_count The maximum number of labels + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_get_max_label_count(i18_alpha_idx_h index, int32_t *max_label_count); + +/** + * @brief Gets the limit on the number of labels permitted in the index. + * + * @param[in] index The alphabetic index, which contains buckets with records + * @param[in] max_label_count The maximum number of labels + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_set_max_label_count(i18_alpha_idx_h index, int32_t max_label_count); + +/** + * @brief Remove all records from the index. + * @details The set of Buckets, which define the headings under which records are classified, + * is not altered. + * + * @param[in] index The alphabetic index, which contains buckets with records + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_clear_records(i18_alpha_idx_h index); + +/** + * @brief Gets the number of labels in this index. + * + * @param[in] index The alphabetic index, which contains buckets with records + * @param[out] bucket_count The number of labels in this index, including any under, + * over or inflow labels + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_get_bucket_count(i18_alpha_idx_h index, int32_t *bucket_count); + +/** + * @brief Gets the total number of records in this index, that is, the number of + * pairs added. + * + * @param[in] index The alphabetic index, which contains buckets with records + * @param[out] record_count The number of records in this index, that is, + * the total number of (name, data) items added with + * i18n_alpha_idx_add_record() + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_get_record_count(i18_alpha_idx_h index, int32_t *record_count); + +/** + * @brief Given the name of a record, returns the zero-based index of the bucket + * in which the item should appear. + * + * @param[in] index The alphabetic index, which contains buckets with records + * @param[in] item_name The name whose bucket position in the index is to be determined + * @param[out] bucket_index The bucket number for this name + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_get_bucket_index(i18_alpha_idx_h index, const char *item_name, int32_t *bucket_index); + +/** + * @brief Gets the zero based index of the current bucket of this index. + * + * @param[in] index The alphabetic index, which contains buckets with records + * @param[out] bucket_index The number of current bucket + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_get_current_bucket_index(i18_alpha_idx_h index, int32_t *bucket_index); + +/** + * @brief Gets the type of the label for the current bucket. + * + * @param[in] index The alphabetic index, which contains buckets with records + * @param[out] type The alphabetic index label type + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_get_bucket_label_type(i18_alpha_idx_h index, + i18_alpha_idx_label_type_e *type); + +/** + * @brief Gets the name of the current record. + * @details Returns NULL if the Record iteration position is before first or after the last. + * @remarks The obtained @a record_name should be released by the caller with the free() function. + * + * @param[in] index The alphabetic index, which contains buckets with records + * @param[out] record_name The name of the current index item + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_INDEX_OUTOFBOUNDS Trying to access the index that is out of bounds + */ +int i18n_alpha_idx_get_record_name(i18_alpha_idx_h index, char **record_name); + +/** + * @brief Resets the bucket iteration for this index. + * @details The next call to i18n_alpha_idx_next_bucket() will restart the iteration at the first label. + * + * @param[in] index The alphabetic index, which contains buckets with records + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_reset_bucket_iter(i18_alpha_idx_h index); + +/** + * @brief Resets the record iteration for this index. + * @details The next call to i18n_alpha_idx_next_record() will restart the iteration at the first label. + * + * @param[in] index The alphabetic index, which contains buckets with records + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_reset_record_iter(i18_alpha_idx_h index); + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* __UTILS_I18N_ALPHA_IDX_H__ */ diff --git a/src/include/mobile/utils_i18n_types.h b/src/include/mobile/utils_i18n_types.h index 009d970..45784f9 100644 --- a/src/include/mobile/utils_i18n_types.h +++ b/src/include/mobile/utils_i18n_types.h @@ -2908,6 +2908,51 @@ typedef enum { I18N_ULOC_REQUESTED_LOCALE = 2, /**< This is the requested locale (deprecated) */ } i18n_uloc_data_locale_type_e; +/* + * @brief The Alphabetic index handle. + * @since_tizen 3.0 + */ +typedef void *i18_alpha_idx_h; + +/** + * @brief Enumeration for alphabetic index label types. + * @since_tizen 3.0 + * + * @see i18n_alpha_idx_get_bucket_label_type() + */ +typedef enum { + /** + * Normal Label, typically the starting letter of the names in the bucket with this label. + */ + I18_ALPHA_IDX_NORMAL, + + /** + * Underflow Label. + * + * The bucket with this label contains names in scripts that sort before any + * of the bucket labels in this index. + */ + I18_ALPHA_IDX_UNDERFLOW, + + /** + * Inflow Label. + * + * The bucket with this label contains names in scripts that sort between + * two of the bucket labels in this index. Inflow labels are created when + * an index contains normal labels for multiple scripts, and skips other + * scripts that sort between some of the included scripts. + */ + I18_ALPHA_IDX_INFLOW, + + /** + * Overflow Label. + * + * The bucket with this label contains names in scripts that sort after + * all of the bucket labels in this index. + */ + I18_ALPHA_IDX_OVERFLOW, +} i18_alpha_idx_label_type_e; + #ifdef __cplusplus } #endif diff --git a/src/include/wearable/utils_i18n.h b/src/include/wearable/utils_i18n.h index 3bdb929..13b23bc 100644 --- a/src/include/wearable/utils_i18n.h +++ b/src/include/wearable/utils_i18n.h @@ -32,6 +32,7 @@ #include #include #include +#include /** * @file utils_i18n.h @@ -46,7 +47,7 @@ extern "C" { /** * @ingroup CAPI_BASE_UTILS_MODULE * @defgroup CAPI_BASE_UTILS_I18N_MODULE i18n - * @brief The i18n module contains uchar, ucollator, unormalization, usearch, ustring, ucalendar, udate, udatepg, ulocale and unumber. + * @brief The i18n module contains uchar, ucollator, unormalization, usearch, ustring, ucalendar, udate, udatepg, ulocale, unumber and alpha_idx. * This module provides flexible generation of number or date format patterns and helps you format and parse dates/number for any locale. * The i18n module provides various features based on data from ICU. The following table shows the version of ICU used in each Tizen platform. * @@ -123,6 +124,10 @@ extern "C" { * * * + * + * + * + * *
@ref CAPI_BASE_UTILS_I18N_UNUMBER_MODULEUnumber helps you format and parse numbers for any locale.
@ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULEAlpha_idx supports the creation of a UI index appropriate for a given language.
* * @section CAPI_BASE_UTILS_I18N_MODULE_MAPPING_TABLE Mapping Table @@ -1778,6 +1783,136 @@ extern "C" { * #i18n_ustring_from_UTF32_with_sub * u_strFromUTF32WithSub * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_create + * AlphabeticIndex + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_destroy + * ~AlphabeticIndex + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_add_labels + * addLabels + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_add_record + * addRecord + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_get_next_bucket + * nextBucket + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_get_next_record + * nextRecord + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_get_bucket_record_count + * getBucketRecordCount + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_get_bucket_label + * getBucketLabel + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_get_record_data + * getRecordData + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_get_inflow_label + * getInflowLabel + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_set_inflow_label + * setInflowLabel + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_get_overflow_label + * getOverflowLabel + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_set_overflow_label + * setOverflowLabel + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_get_underflow_label + * getUnderflowLabel + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_set_underflow_label + * setUnderflowLabel + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_get_max_label_count + * getMaxLabelCount + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_set_max_label_count + * setMaxLabelCount + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_clear_records + * clearRecords + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_get_bucket_count + * getBucketCount + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_get_record_count + * getRecordCount + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_get_bucket_index + * getBucketIndex(const UnicodeString &itemName, UErrorCode &status) + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_get_current_bucket_index + * getBucketIndex() + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_get_bucket_label_type + * getBucketLabelType + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_get_record_name + * getRecordName + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_reset_bucket_iter + * resetBucketIterator + * + * + * @ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * #i18n_alpha_idx_reset_record_iter + * resetRecordIterator + * * */ diff --git a/src/include/wearable/utils_i18n_alpha_idx.h b/src/include/wearable/utils_i18n_alpha_idx.h new file mode 100644 index 0000000..5131a37 --- /dev/null +++ b/src/include/wearable/utils_i18n_alpha_idx.h @@ -0,0 +1,415 @@ +/* + * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __UTILS_I18N_ALPHA_IDX_H__ +#define __UTILS_I18N_ALPHA_IDX_H__ + +#include + +/** + * @file utils_i18n_alpha_idx.h + * @version 0.1 + * @brief utils_i18n_alpha_idx + */ + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @ingroup CAPI_BASE_UTILS_I18N_MODULE + * @defgroup CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE AlphabeticIndex + * @brief AlphabeticIndex supports the creation of a UI index appropriate for a given language. + * @section CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE_HEADER Required Header + * \#include + * + * @section CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE_OVERVIEW Overview + * @details The module can generate a list of labels for use as a UI "index", + * that is, a list of clickable characters (or character sequences) + * that allow the user to see a segment (bucket) of a larger "target" list. + * That is, each label corresponds to a bucket in the target list, where + * everything in the bucket is greater than or equal to the character + * (according to the locale's collation). Strings can be added to the index; + * they will be in sorted order in the right bucket. + * The module also supports having buckets for strings before the first (underflow), + * after the last (overflow), and between scripts (inflow). For example, + * if the index is constructed with labels for Russian and English, + * Greek characters would fall into an inflow bucket between the other two scripts. + */ + +/** + * @addtogroup CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULE + * @{ + */ + +/** + * @brief Creates an alphabetic index object for the specified locale. + * @remarks The created object should be released by the caller with the + * #i18n_alpha_idx_destroy() function. + * + * @param[in] language The language of the locale + * @param[in] country The country of the locale + * @param[out] index The created alphabetic index object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_alpha_idx_create(const char *language, const char *country, + i18_alpha_idx_h *index); + +/** + * @brief Destroys the alphabetic index object. + * + * @param[in] index The alphabetic index to be destroyed + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_destroy(i18_alpha_idx_h index); + +/** + * @brief Adds the index characters from a specified locale to the index. + * + * @param[in] index Label will be added to this alphabetic index + * @param[in] language The language of the locale + * @param[in] country The country of the locale + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_add_labels(i18_alpha_idx_h index, const char *language, + const char *country); + +/** + * @brief Adds the record to the alphabetic index. + * + * @param[in] index Record will be added to this alphabetic index + * @param[in] name The display name for the record + * @param[in] data An optional pointer to user data associated with this item + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_add_record(i18_alpha_idx_h index, const char *name, + const void *data); + +/** + * @brief Sets the next bucket as current bucket in the index. + * + * @param[in] index The alphabetic index, which contains buckets + * @param[out] success A flag set to @c true if the iteration succeeded, + * or @c false at the end of iteration. + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_get_next_bucket(i18_alpha_idx_h index, bool *success); + +/** + * @brief Sets the next record as current record in current bucket of the index. + * @details When i18n_alpha_idx_next_bucket() is called, record iteration is reset + * to just before the first record in the new bucket. + * + * @param[in] index The alphabetic index, which contains buckets with records + * @param[out] success A flag set to @c true if the iteration succeeded, + * or @c false at the end of iteration. + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_get_next_record(i18_alpha_idx_h index, bool *success); + +/** + * @brief Gets the number of records in the current bucket. + * + * @param[in] index The alphabetic index, which contains buckets with records + * @param[out] records_count Number of records in the current bucket + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_get_bucket_record_count(i18_alpha_idx_h index, int32_t *records_count); + +/** + * @brief Gets the name of the label of the current bucket in alphabetic index. + * @remarks The obtained @a label should be released by the caller with the free() function. + * + * @param[in] index The alphabetic index, which contains buckets + * @param[out] label The name of the label of the current bucket + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_get_bucket_label(i18_alpha_idx_h index, char **label); + +/** + * @brief Gets the data pointer of the current record in current bucket in alphabetic index. + * + * @param[in] index The alphabetic index, which contains buckets with records + * @param[out] data The data pointer of the current record + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_INDEX_OUTOFBOUNDS Trying to access the index that is out of bounds + */ +int i18n_alpha_idx_get_record_data(i18_alpha_idx_h index, const void **data); + +/** + * @brief Gets the default label used for abbreviated buckets between other index characters. + * @details For example, consider the labels when Latin and Greek are used: X Y Z ... Α Β + * Γ. + * @remarks The obtained @a label should be released by the caller with the free() function. + * + * @param[in] index The alphabetic index, which contains buckets with records + * @param[out] label The default label used for abbreviated bucket between other index characters + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_get_inflow_label(i18_alpha_idx_h index, char **label); + +/** + * @brief Sets the default label used for abbreviated buckets between other index characters. + * @details An inflow label will be automatically inserted if two otherwise-adjacent label characters + * are from different scripts, e.g. Latin and Cyrillic, and a third script, + * e.g. Greek, sorts between the two. The default inflow character is an ellipsis (...) + * + * @param[in] index The alphabetic index, which contains buckets with records + * @param[in] label The default label used for abbreviated bucket between other index characters + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_set_inflow_label(i18_alpha_idx_h index, const char *label); + +/** + * @brief Gets the special label used for items that sort after the last normal label, + * and that would not otherwise have an appropriate label. + * @remarks The obtained @a label should be released by the caller with the free() function. + * + * @param[in] index The alphabetic index, which contains buckets with records + * @param[out] label The special label used for items that sort after the last normal label + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_get_overflow_label(i18_alpha_idx_h index, char **label); + +/** + * @brief Sets the special label used for items that sort after the last normal label, + * and that would not otherwise have an appropriate label. + * + * @param[in] index The alphabetic index, which contains buckets with records + * @param[in] label The special label used for items that sort after the last normal label + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_set_overflow_label(i18_alpha_idx_h index, const char *label); + +/** + * @brief Gets the special label used for items that sort before the first normal label, + * and that would not otherwise have an appropriate label. + * @remarks The obtained @a label should be released by the caller with the free() function. + * + * @param[in] index The alphabetic index, which contains buckets with records + * @param[out] label The special label used for items that sort before the first normal label + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_get_underflow_label(i18_alpha_idx_h index, char **label); + +/** + * @brief Sets the special label used for items that sort before the first normal label, + * and that would not otherwise have an appropriate label. + * + * @param[in] index The alphabetic index, which contains buckets with records + * @param[in] label The special label used for items that sort before the first normal label + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_set_underflow_label(i18_alpha_idx_h index, const char *label); + +/** + * @brief Gets the limit on the number of labels permitted in the index. + * + * @param[in] index The alphabetic index, which contains buckets with records + * @param[out] max_label_count The maximum number of labels + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_get_max_label_count(i18_alpha_idx_h index, int32_t *max_label_count); + +/** + * @brief Gets the limit on the number of labels permitted in the index. + * + * @param[in] index The alphabetic index, which contains buckets with records + * @param[in] max_label_count The maximum number of labels + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_set_max_label_count(i18_alpha_idx_h index, int32_t max_label_count); + +/** + * @brief Remove all records from the index. + * @details The set of Buckets, which define the headings under which records are classified, + * is not altered. + * + * @param[in] index The alphabetic index, which contains buckets with records + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_clear_records(i18_alpha_idx_h index); + +/** + * @brief Gets the number of labels in this index. + * + * @param[in] index The alphabetic index, which contains buckets with records + * @param[out] bucket_count The number of labels in this index, including any under, + * over or inflow labels + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_get_bucket_count(i18_alpha_idx_h index, int32_t *bucket_count); + +/** + * @brief Gets the total number of records in this index, that is, the number of + * pairs added. + * + * @param[in] index The alphabetic index, which contains buckets with records + * @param[out] record_count The number of records in this index, that is, + * the total number of (name, data) items added with + * i18n_alpha_idx_add_record() + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_get_record_count(i18_alpha_idx_h index, int32_t *record_count); + +/** + * @brief Given the name of a record, returns the zero-based index of the bucket + * in which the item should appear. + * + * @param[in] index The alphabetic index, which contains buckets with records + * @param[in] item_name The name whose bucket position in the index is to be determined + * @param[out] bucket_index The bucket number for this name + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_get_bucket_index(i18_alpha_idx_h index, const char *item_name, int32_t *bucket_index); + +/** + * @brief Gets the zero based index of the current bucket of this index. + * + * @param[in] index The alphabetic index, which contains buckets with records + * @param[out] bucket_index The number of current bucket + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_get_current_bucket_index(i18_alpha_idx_h index, int32_t *bucket_index); + +/** + * @brief Gets the type of the label for the current bucket. + * + * @param[in] index The alphabetic index, which contains buckets with records + * @param[out] type The alphabetic index label type + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_get_bucket_label_type(i18_alpha_idx_h index, + i18_alpha_idx_label_type_e *type); + +/** + * @brief Gets the name of the current record. + * @details Returns NULL if the Record iteration position is before first or after the last. + * @remarks The obtained @a record_name should be released by the caller with the free() function. + * + * @param[in] index The alphabetic index, which contains buckets with records + * @param[out] record_name The name of the current index item + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_INDEX_OUTOFBOUNDS Trying to access the index that is out of bounds + */ +int i18n_alpha_idx_get_record_name(i18_alpha_idx_h index, char **record_name); + +/** + * @brief Resets the bucket iteration for this index. + * @details The next call to i18n_alpha_idx_next_bucket() will restart the iteration at the first label. + * + * @param[in] index The alphabetic index, which contains buckets with records + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_reset_bucket_iter(i18_alpha_idx_h index); + +/** + * @brief Resets the record iteration for this index. + * @details The next call to i18n_alpha_idx_next_record() will restart the iteration at the first label. + * + * @param[in] index The alphabetic index, which contains buckets with records + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_alpha_idx_reset_record_iter(i18_alpha_idx_h index); + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* __UTILS_I18N_ALPHA_IDX_H__ */ diff --git a/src/include/wearable/utils_i18n_types.h b/src/include/wearable/utils_i18n_types.h index ddb8139..5cf1aa1 100644 --- a/src/include/wearable/utils_i18n_types.h +++ b/src/include/wearable/utils_i18n_types.h @@ -2908,6 +2908,51 @@ typedef enum { I18N_ULOC_REQUESTED_LOCALE = 2, /**< This is the requested locale (deprecated) */ } i18n_uloc_data_locale_type_e; +/* + * @brief The Alphabetic index handle. + * @since_tizen 3.0 + */ +typedef void *i18_alpha_idx_h; + +/** + * @brief Enumeration for alphabetic index label types. + * @since_tizen 3.0 + * + * @see i18n_alpha_idx_get_bucket_label_type() + */ +typedef enum { + /** + * Normal Label, typically the starting letter of the names in the bucket with this label. + */ + I18_ALPHA_IDX_NORMAL, + + /** + * Underflow Label. + * + * The bucket with this label contains names in scripts that sort before any + * of the bucket labels in this index. + */ + I18_ALPHA_IDX_UNDERFLOW, + + /** + * Inflow Label. + * + * The bucket with this label contains names in scripts that sort between + * two of the bucket labels in this index. Inflow labels are created when + * an index contains normal labels for multiple scripts, and skips other + * scripts that sort between some of the included scripts. + */ + I18_ALPHA_IDX_INFLOW, + + /** + * Overflow Label. + * + * The bucket with this label contains names in scripts that sort after + * all of the bucket labels in this index. + */ + I18_ALPHA_IDX_OVERFLOW, +} i18_alpha_idx_label_type_e; + #ifdef __cplusplus } #endif diff --git a/src/utils_i18n_alpha_idx.cpp b/src/utils_i18n_alpha_idx.cpp new file mode 100644 index 0000000..e0e8831 --- /dev/null +++ b/src/utils_i18n_alpha_idx.cpp @@ -0,0 +1,366 @@ +/* + * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +#include +#include +#include + +int i18n_alpha_idx_create(const char *language, const char *country, + i18_alpha_idx_h *index) +{ + retv_if(index == NULL, I18N_ERROR_INVALID_PARAMETER); + + Locale locale(language, country, 0, 0); + UErrorCode status = U_ZERO_ERROR; + + *index = new AlphabeticIndex(locale, status); + retv_if(*index == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_alpha_idx_destroy(i18_alpha_idx_h index) +{ + retv_if(index == NULL, I18N_ERROR_INVALID_PARAMETER); + + delete ((AlphabeticIndex *) index); + + return I18N_ERROR_NONE; +} + +int i18n_alpha_idx_add_labels(i18_alpha_idx_h index, + const char *language, const char *country) +{ + retv_if(index == NULL, I18N_ERROR_INVALID_PARAMETER); + + Locale locale(language, country, 0, 0); + UErrorCode status = U_ZERO_ERROR; + + ((AlphabeticIndex *) index)->addLabels(locale, status); + + return _i18n_error_mapping(status); +} + +int i18n_alpha_idx_add_record(i18_alpha_idx_h index, const char *name, + const void *data) +{ + retv_if(index == NULL, I18N_ERROR_INVALID_PARAMETER); + + const UnicodeString _name(name); + UErrorCode status = U_ZERO_ERROR; + + ((AlphabeticIndex *) index)->addRecord(_name, data, status); + + return _i18n_error_mapping(status); +} + +int i18n_alpha_idx_get_next_bucket(i18_alpha_idx_h index, bool *success) +{ + retv_if(index == NULL, I18N_ERROR_INVALID_PARAMETER); + + UErrorCode status = U_ZERO_ERROR; + + if(success != NULL) + *success = ((AlphabeticIndex *) index)->nextBucket(status); + else + ((AlphabeticIndex *) index)->nextBucket(status); + + return _i18n_error_mapping(status); +} + +int i18n_alpha_idx_get_next_record(i18_alpha_idx_h index, bool *success) +{ + retv_if(index == NULL, I18N_ERROR_INVALID_PARAMETER); + + UErrorCode status = U_ZERO_ERROR; + + if(success != NULL) + *success = ((AlphabeticIndex *) index)->nextRecord(status); + else + ((AlphabeticIndex *) index)->nextRecord(status); + + return _i18n_error_mapping(status); +} + +int i18n_alpha_idx_get_bucket_record_count(i18_alpha_idx_h index, + int32_t *records_count) +{ + retv_if(index == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(records_count == NULL, I18N_ERROR_INVALID_PARAMETER); + + *records_count = ((AlphabeticIndex *) index)->getBucketRecordCount(); + + return I18N_ERROR_NONE; +} + +int i18n_alpha_idx_get_bucket_label(i18_alpha_idx_h index, + char **label) +{ + retv_if(index == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(label == NULL, I18N_ERROR_INVALID_PARAMETER); + + UnicodeString _label = ((AlphabeticIndex *) index)->getBucketLabel(); + + std::string _label_string; + _label.toUTF8String(_label_string); + + *label = strdup(_label_string.c_str()); + + return I18N_ERROR_NONE; +} + +int i18n_alpha_idx_get_record_data(i18_alpha_idx_h index, + const void **data) +{ + retv_if(index == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(data == NULL, I18N_ERROR_INVALID_PARAMETER); + + *data = ((AlphabeticIndex *) index)->getRecordData(); + retv_if(*data == NULL, I18N_ERROR_INDEX_OUTOFBOUNDS); + + return I18N_ERROR_NONE; +} + +int i18n_alpha_idx_get_inflow_label(i18_alpha_idx_h index, + char **label) +{ + retv_if(index == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(label == NULL, I18N_ERROR_INVALID_PARAMETER); + + UnicodeString _label = ((AlphabeticIndex *) index)->getInflowLabel(); + + std::string _label_string; + _label.toUTF8String(_label_string); + + *label = strdup(_label_string.c_str()); + + return I18N_ERROR_NONE; +} + +int i18n_alpha_idx_set_inflow_label(i18_alpha_idx_h index, + const char *label) +{ + retv_if(index == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(label == NULL, I18N_ERROR_INVALID_PARAMETER); + + const UnicodeString inflow_label(label); + UErrorCode status = U_ZERO_ERROR; + + ((AlphabeticIndex *) index)->setInflowLabel(inflow_label, status); + + return _i18n_error_mapping(status); +} + +int i18n_alpha_idx_get_overflow_label(i18_alpha_idx_h index, + char **label) +{ + retv_if(index == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(label == NULL, I18N_ERROR_INVALID_PARAMETER); + + const UnicodeString overflow_label = ((AlphabeticIndex *) index)->getOverflowLabel(); + + std::string _label_string; + overflow_label.toUTF8String(_label_string); + + *label = strdup(_label_string.c_str()); + + return I18N_ERROR_NONE; +} + +int i18n_alpha_idx_set_overflow_label(i18_alpha_idx_h index, + const char *label) +{ + retv_if(index == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(label == NULL, I18N_ERROR_INVALID_PARAMETER); + + const UnicodeString overflow_label(label); + UErrorCode status = U_ZERO_ERROR; + + ((AlphabeticIndex *) index)->setOverflowLabel(overflow_label, status); + + return _i18n_error_mapping(status); +} + +int i18n_alpha_idx_get_underflow_label(i18_alpha_idx_h index, + char **label) +{ + retv_if(index == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(label == NULL, I18N_ERROR_INVALID_PARAMETER); + + const UnicodeString overflow_label = ((AlphabeticIndex *) index)->getOverflowLabel(); + + std::string _label_string; + overflow_label.toUTF8String(_label_string); + + *label = strdup(_label_string.c_str()); + + return I18N_ERROR_NONE; +} + +int i18n_alpha_idx_set_underflow_label(i18_alpha_idx_h index, + const char *label) +{ + retv_if(index == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(label == NULL, I18N_ERROR_INVALID_PARAMETER); + + const UnicodeString underflow_label(label); + UErrorCode status = U_ZERO_ERROR; + + ((AlphabeticIndex *) index)->setOverflowLabel(underflow_label, status); + + return _i18n_error_mapping(status); +} + +int i18n_alpha_idx_get_max_label_count(i18_alpha_idx_h index, + int32_t *max_label_count) +{ + retv_if(index == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(max_label_count == NULL, I18N_ERROR_INVALID_PARAMETER); + + *max_label_count = ((AlphabeticIndex *) index)->getMaxLabelCount(); + + return I18N_ERROR_NONE; +} + +int i18n_alpha_idx_set_max_label_count(i18_alpha_idx_h index, + int32_t max_label_count) +{ + retv_if(index == NULL, I18N_ERROR_INVALID_PARAMETER); + + UErrorCode status = U_ZERO_ERROR; + + ((AlphabeticIndex *) index)->setMaxLabelCount(max_label_count, status); + + return _i18n_error_mapping(status); +} + +int i18n_alpha_idx_clear_records(i18_alpha_idx_h index) +{ + retv_if(index == NULL, I18N_ERROR_INVALID_PARAMETER); + + UErrorCode status = U_ZERO_ERROR; + + ((AlphabeticIndex *) index)->clearRecords(status); + + return _i18n_error_mapping(status); +} + +int i18n_alpha_idx_get_bucket_count(i18_alpha_idx_h index, + int32_t *bucket_count) +{ + retv_if(index == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(bucket_count == NULL, I18N_ERROR_INVALID_PARAMETER); + + UErrorCode status = U_ZERO_ERROR; + + *bucket_count = ((AlphabeticIndex *) index)->getBucketCount(status); + + return _i18n_error_mapping(status); +} + +int i18n_alpha_idx_get_record_count(i18_alpha_idx_h index, + int32_t *record_count) +{ + retv_if(index == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(record_count == NULL, I18N_ERROR_INVALID_PARAMETER); + + UErrorCode status = U_ZERO_ERROR; + + *record_count = ((AlphabeticIndex *) index)->getRecordCount(status); + + return _i18n_error_mapping(status); +} + +int i18n_alpha_idx_get_bucket_index(i18_alpha_idx_h index, + const char *item_name, + int32_t *bucket_index) +{ + retv_if(index == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(item_name == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(bucket_index == NULL, I18N_ERROR_INVALID_PARAMETER); + + UnicodeString _item_name(item_name); + UErrorCode status = U_ZERO_ERROR; + + *bucket_index = ((AlphabeticIndex *) index)->getBucketIndex(_item_name, status); + + return _i18n_error_mapping(status); +} + +int i18n_alpha_idx_get_current_bucket_index(i18_alpha_idx_h index, + int32_t *bucket_index) +{ + retv_if(index == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(bucket_index == NULL, I18N_ERROR_INVALID_PARAMETER); + + *bucket_index = ((AlphabeticIndex *) index)->getBucketIndex(); + + return I18N_ERROR_NONE; +} + +int i18n_alpha_idx_get_bucket_label_type(i18_alpha_idx_h index, + i18_alpha_idx_label_type_e *type) +{ + retv_if(index == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(type == NULL, I18N_ERROR_INVALID_PARAMETER); + + *type = (i18_alpha_idx_label_type_e) ((AlphabeticIndex *) index)->getBucketLabelType(); + + return I18N_ERROR_NONE; +} + +int i18n_alpha_idx_get_record_name(i18_alpha_idx_h index, + char **record_name) +{ + retv_if(index == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(record_name == NULL, I18N_ERROR_INVALID_PARAMETER); + + const UnicodeString _record_name = ((AlphabeticIndex *) index)->getRecordName(); + + std::string _record_name_string; + _record_name.toUTF8String(_record_name_string); + + *record_name = strdup(_record_name_string.c_str()); + + if(_record_name.isEmpty()) { + return I18N_ERROR_INDEX_OUTOFBOUNDS; + } + + return I18N_ERROR_NONE; +} + +int i18n_alpha_idx_reset_bucket_iter(i18_alpha_idx_h index) +{ + retv_if(index == NULL, I18N_ERROR_INVALID_PARAMETER); + + UErrorCode status = U_ZERO_ERROR; + + ((AlphabeticIndex *) index)->resetBucketIterator(status); + + return _i18n_error_mapping(status); +} + +int i18n_alpha_idx_reset_record_iter(i18_alpha_idx_h index) +{ + retv_if(index == NULL, I18N_ERROR_INVALID_PARAMETER); + + ((AlphabeticIndex *) index)->resetRecordIterator(); + + return I18N_ERROR_NONE; +} -- 2.7.4 From e677218031eadd3d2909d796a2a9daa757d4c2b4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20Szczekutek?= Date: Mon, 27 Jun 2016 15:19:17 +0200 Subject: [PATCH 15/16] [Base-utils][Formattable] Complete module added MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit implementation + documentation Author: Rafał Szczekutek Change-Id: I88144a36d76058eb18059c7862e0dffa691b529c Signed-off-by: Beata Stefaniuk --- src/CMakeLists.txt | 4 +- src/include/mobile/utils_i18n.h | 136 +++++++- src/include/mobile/utils_i18n_formattable.h | 466 ++++++++++++++++++++++++++ src/include/wearable/utils_i18n.h | 136 +++++++- src/include/wearable/utils_i18n_formattable.h | 466 ++++++++++++++++++++++++++ src/utils_i18n_formattable.cpp | 338 +++++++++++++++++++ 6 files changed, 1543 insertions(+), 3 deletions(-) create mode 100644 src/include/mobile/utils_i18n_formattable.h create mode 100644 src/include/wearable/utils_i18n_formattable.h create mode 100644 src/utils_i18n_formattable.cpp diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0a23693..cb1b4e6 100755 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -34,6 +34,7 @@ SET(BASEUTILS_SRCS utils_i18n_ubrk.c utils_i18n_timezone.cpp utils_i18n_alpha_idx.cpp + utils_i18n_formattable.cpp ) ADD_LIBRARY(${target_name} SHARED ${BASEUTILS_SRCS} @@ -69,5 +70,6 @@ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${INC_DIR}/utils_i18n_uenumeration.h D INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${INC_DIR}/utils_i18n_uset.h DESTINATION ${INCLUDE_INSTALL_DIR}/base) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${INC_DIR}/utils_i18n_ubrk.h DESTINATION ${INCLUDE_INSTALL_DIR}/base) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${INC_DIR}/utils_i18n_alpha_idx.h DESTINATION ${INCLUDE_INSTALL_DIR}/base) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${INC_DIR}/utils_i18n_formattable.h DESTINATION ${INCLUDE_INSTALL_DIR}/base) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${INC_DIR}/utils_i18n.h DESTINATION ${INCLUDE_INSTALL_DIR}/base) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${pc_name}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${pc_name}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) \ No newline at end of file diff --git a/src/include/mobile/utils_i18n.h b/src/include/mobile/utils_i18n.h index 13b23bc..26ddbec 100644 --- a/src/include/mobile/utils_i18n.h +++ b/src/include/mobile/utils_i18n.h @@ -33,6 +33,7 @@ #include #include #include +#include /** * @file utils_i18n.h @@ -47,7 +48,7 @@ extern "C" { /** * @ingroup CAPI_BASE_UTILS_MODULE * @defgroup CAPI_BASE_UTILS_I18N_MODULE i18n - * @brief The i18n module contains uchar, ucollator, unormalization, usearch, ustring, ucalendar, udate, udatepg, ulocale, unumber and alpha_idx. + * @brief The i18n module contains uchar, ucollator, unormalization, usearch, ustring, ucalendar, udate, udatepg, ulocale, unumber, alpha_idx and formattable. * This module provides flexible generation of number or date format patterns and helps you format and parse dates/number for any locale. * The i18n module provides various features based on data from ICU. The following table shows the version of ICU used in each Tizen platform. * @@ -127,6 +128,9 @@ extern "C" { * * * + * + * + * * *
@ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULEAlpha_idx supports the creation of a UI index appropriate for a given language.
@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULEFormattable interconverts between the primitive numeric types (double, long, etc.) as well as the #i18n_udate and char string.
* @@ -1913,6 +1917,136 @@ extern "C" { * #i18n_alpha_idx_reset_record_iter * resetRecordIterator * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_create_default + * Formattable() + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_create_with_udate + * Formattable(UDate d, ISDATE flag) + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_create_with_double + * Formattable(double d) + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_create_with_long + * Formattable(int32_t l) + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_create_with_int64 + * Formattable(int64_t ll) + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_create_with_char_string + * Formattable(const char* strToCopy) + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_create_with_formattable_array + * Formattable(const Formattable* arrayToCopy, int32_t count) + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_destroy + * delete + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_clone + * Formattable::clone + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_get_array + * Formattable::getArray + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_get_date + * Formattable::getDate + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_get_double + * Formattable::getDouble + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_get_int64 + * Formattable::getInt64 + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_get_long + * Formattable::getLong + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_get_string + * Formattable::getString + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_get_type + * Formattable::getType + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_is_numeric + * Formattable::isNumeric + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_not_equal + * Formattable::operator!= + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_equal + * Formattable::operator== + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_element_at + * Formattable::operator[] + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_set_array + * Formattable::setArray + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_set_date + * Formattable::setDate + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_set_double + * Formattable::setDouble + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_set_int64 + * Formattable::setInt64 + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_set_long + * Formattable::setLong + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_set_string + * Formattable::setString + * * */ diff --git a/src/include/mobile/utils_i18n_formattable.h b/src/include/mobile/utils_i18n_formattable.h new file mode 100644 index 0000000..c7abfab --- /dev/null +++ b/src/include/mobile/utils_i18n_formattable.h @@ -0,0 +1,466 @@ +/* + * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef UTILS_I18N_FORMATTABLE_H_ +#define UTILS_I18N_FORMATTABLE_H_ + +#include + +/** + * @file utils_i18n_formattable.h + * @version 0.1 + * @brief utils_i18n_formattable + */ + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @ingroup CAPI_BASE_UTILS_I18N_MODULE + * @defgroup CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE Formattable + * @brief Formattable interconverts between the primitive numeric types + * (double, long, etc.) as well as #i18n_udate and char string. + * + * @section CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE_HEADER Required Header + * \#include + * + * @section CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE_OVERVIEW Overview + * @details Internally, an #i18n_formattable_h handle holds an object + * that is a union of primitive types. + * As such, it can only store one flavor of data at a time. + * To determine what flavor of data it contains, use the + * #i18n_formattable_get_type function. + */ + +/** + * @addtogroup CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * @{ + */ + +/** + * @brief Creates a new default #i18n_formattable_h. + * @remarks The created object should be released by the caller with the + * #i18n_formattable_destroy() function. + * + * @param[out] formattable A pointer to a handle to the newly created formattable + * object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_UNKNOWN Unknown error + */ +int i18n_formattable_create_default(i18n_formattable_h *formattable); + +/** + * @brief Creates a new #i18n_formattable_h handle with an #i18n_udate instance. + * @remarks The created object should be released by the caller with the + * #i18n_formattable_destroy() function. + * + * @param[in] date The #i18n_udate instance + * @param[out] formattable A pointer to a handle to the newly created formattable + * object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_UNKNOWN Unknown error + */ +int i18n_formattable_create_with_udate(i18n_udate date, i18n_formattable_h *formattable); + +/** + * @brief Creates a new #i18n_formattable_h handle with a double number. + * @remarks The created object should be released by the caller with the + * #i18n_formattable_destroy() function. + * + * @param[in] d The double number + * @param[out] formattable A pointer to a handle to the newly created formattable + * object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_UNKNOWN Unknown error + */ +int i18n_formattable_create_with_double(double d, i18n_formattable_h *formattable); + +/** + * @brief Creates a new #i18n_formattable_h handle with a long number. + * @remarks The created object should be released by the caller with the + * #i18n_formattable_destroy() function. + * + * @param[in] l The long number + * @param[out] formattable A pointer to a handle to the newly created formattable + * object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_UNKNOWN Unknown error + */ +int i18n_formattable_create_with_long(int32_t l, i18n_formattable_h *formattable); + +/** + * @brief Creates a new #i18n_formattable_h handle with an int64_t number. + * @remarks The created object should be released by the caller with the + * #i18n_formattable_destroy() function. + * + * @param[in] ll The int64_t number + * @param[out] formattable A pointer to a handle to the newly created formattable + * object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_UNKNOWN Unknown error + */ +int i18n_formattable_create_with_int64(int64_t ll, i18n_formattable_h *formattable); + +/** + * @brief Creates a new #i18n_formattable_h handle with a char string pointer. + * @details Assumes that the char string is null terminated. + * @remarks The created object should be released by the caller with the + * #i18n_formattable_destroy() function. + * + * @param[in] str_to_copy The char string + * @param[out] formattable A pointer to a handle to the newly created formattable + * object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_UNKNOWN Unknown error + */ +int i18n_formattable_create_with_char_string(const char *str_to_copy, i18n_formattable_h *formattable); + +/** + * @brief Creates a new #i18n_formattable_h handle with an array of + * #i18n_formattable_h handles. + * @remarks The created object should be released by the caller with the + * #i18n_formattable_destroy() function. + * + * @param[in] array_to_copy An array with the #i18n_formattable_h handles + * @param[in] count The number of the elements in the array + * @param[out] formattable A pointer to a handle to the newly created + * formattable object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_UNKNOWN Unknown error + */ +int i18n_formattable_create_with_formattable_array(const i18n_formattable_h *array_to_copy, int32_t count, i18n_formattable_h *formattable); + +/** + * @brief Releases the given #i18n_formattable_h handle. + * + * @param[in] formattable A handle to the formattable object to be released + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_formattable_destroy(i18n_formattable_h formattable); + +/** + * @brief Clones the given formattable handle with the related object to the + * @a clone handle. + * @details Clones can be used concurrently in multiple threads. + * @remarks The cloned object should be released by the caller with the + * #i18n_formattable_destroy() function. + * + * @param[in] formattable A handle to the formattable object + * @param[out] clone A pointer to a handle to the formattable object which + * will be filled with a copy of the @a formattable handle. + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_UNKNOWN Unknown error + */ +int i18n_formattable_clone(i18n_formattable_h formattable, i18n_formattable_h *clone); + +/** + * @brief Gets the array value and count of the given formattable object. + * @remarks If this object is not of type #I18N_FORMATTABLE_K_ARRAY then the + * result is undefined. The obtained array should be released by the + * caller with the free() function. + * + * @param[in] formattable A handle to the formattable object + * @param[out] array A pointer to an array of #i18n_formattable_h handles + * @param[out] count A pointer to an int32_t variable which will be filled + * with the number of array's elements + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_formattable_get_array(i18n_formattable_h formattable, i18n_formattable_h **array, int32_t *count); + +/** + * @brief Gets the date value of the given formattable object. + * @remarks If this object is not of type #I18N_FORMATTABLE_K_DATE then the + * result is undefined. + * + * @param[in] formattable A handle to the formattable object + * @param[out] date A pointer to an i18n_udate object which will be filled + * with the date obtained from the given formattable object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_formattable_get_date(i18n_formattable_h formattable, i18n_udate *date); + +/** + * @brief Gets the double value of the given formattable object. + * @remarks If this object is not of type #I18N_FORMATTABLE_K_DOUBLE then the + * result is undefined. + * + * @param[in] formattable A handle to the formattable object + * @param[out] value A pointer to a double variable which will be filled + * with the value obtained from the given formattable object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_formattable_get_double(i18n_formattable_h formattable, double *value); + +/** + * @brief Gets the int64 value of the given formattable object. + * @remarks If this object is not of type #I18N_FORMATTABLE_K_INT64 then the + * result is undefined. + * + * @param[in] formattable A handle to the formattable object + * @param[out] value A pointer to an int64_t variable which will be filled + * with the value obtained from the given formattable object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_formattable_get_int64(i18n_formattable_h formattable, int64_t *value); + +/** + * @brief Gets the long value of the given formattable object. + * @details If the magnitude is too large to fit in a long, then the maximum or + * minimum long value, as appropriate, is set to @value variable and + * the #I18N_ERROR_INVALID_FORMAT error code is returned by the + * function. + * + * @param[in] formattable A handle to the formattable object + * @param[out] value A pointer to a int32_t variable which will be filled + * with the value obtained from the given formattable object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_formattable_get_long(i18n_formattable_h formattable, int32_t *value); + +/** + * @brief Gets the string value of the given formattable object. + * @remarks If the type is not a string, the function returns the + * #I18N_ERROR_INVALID_FORMAT error code and the value is set to @c + * NULL. + * + * @param[in] formattable A handle to the formattable object + * @param[out] value A pointer to a char string variable which will be + * filled with the value obtained from the given formattable object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_INVALID_FORMAT The given formattable type is not a string + * @retval #I18N_ERROR_UNKNOWN Unknown error + */ +int i18n_formattable_get_string(i18n_formattable_h formattable, char **value); + +/** + * @brief Gets the data type of the given formattable object. + * + * @param[in] formattable A handle to the formattable object + * @param[out] type A pointer to an #i18n_formattable_type_e variable which + * will be filled with the type obtained from the given formattable + * object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_formattable_get_type(i18n_formattable_h formattable, i18n_formattable_type_e *type); + +/** + * @brief Sets the variable pointed by the @a is_numeric pointer to @c true if + * the data type of the given formattable object is #I18N_FORMATTABLE_K_DOUBLE, + * #I18N_FORMATTABLE_K_LONG or #I18N_FORMATTABLE_K_INT64. + * + * @param[in] formattable A handle to the formattable object + * @param[out] is_numeric A pointer to a boolean variable which will be filled by + * the function + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_formattable_is_numeric(i18n_formattable_h formattable, bool *is_numeric); + +/** + * @brief Sets the variable pointed by the @a not_equal pointer to @c true if + * the given @a formattable object is not equal to the given @a other + * formattable object. + * + * @param[in] formattable A handle to the formattable object + * @param[in] other A handle to the other formattable object + * @param[out] not_equal A pointer to a boolean variable which will be filled by + * the function + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_formattable_not_equal(i18n_formattable_h formattable, i18n_formattable_h other, bool *not_equal); + +/** + * @brief Sets the variable pointed by the @a equal pointer to @c true if the + * given @a formattable object is equal to the given @a other + * formattable object. + * + * @param[in] formattable A handle to the formattable object + * @param[in] other A handle to the other formattable object + * @param[out] equal A pointer to a boolean variable which will be filled by + * the function + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_formattable_equal(i18n_formattable_h formattable, i18n_formattable_h other, bool *equal); + +/** + * @brief Sets the object pointed by the @a element pointer to the element at + * the @a index position in the array stored by the given formattable + * object (if its type is #I18N_FORMATTABLE_K_ARRAY). + * @remarks If this object is not of type #I18N_FORMATTABLE_K_ARRAY then the + * result is undefined. + * + * The obtained formattable element should not be released by the caller + * as it belongs to the given formattable object of type #I18N_FORMATTABLE_K_ARRAY. + * + * @param[in] formattable A handle to the formattable object + * @param[in] index A number representing the position in the array from + * which the element should be obtained + * @param[out] element A pointer to a handle to the formattable object which + * will be filled by the function + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_INDEX_OUTOFBOUNDS Index value out of range + * @retval #I18N_ERROR_INVALID_FORMAT The given formattable type is not an array + */ +int i18n_formattable_element_at(i18n_formattable_h formattable, int32_t index, i18n_formattable_h *element); + +/** + * @brief Sets the array value and count of the given formattable object and + * changes the type to #I18N_FORMATTABLE_K_ARRAY. + * + * @param[in] formattable A handle to the formattable object + * @param[in] array An array of handles to the formattable objects + * @param[in] count The number of array elements to be copied + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_formattable_set_array(i18n_formattable_h formattable, const i18n_formattable_h *array, int32_t count); + +/** + * @brief Sets the date value of the given formattable object and changes the + * type to the #I18N_FORMATTABLE_K_DATE. + * + * @param[in] formattable A handle to the formattable object + * @param[in] d The new i18n_udate value to be set + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_formattable_set_date(i18n_formattable_h formattable, i18n_udate d); + +/** + * @brief Sets the double value of the given formattable object and changes + * the type to the #I18N_FORMATTABLE_K_DOUBLE. + * + * @param[in] formattable A handle to the formattable object + * @param[in] d The new double value to be set + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_formattable_set_double(i18n_formattable_h formattable, double d); + +/** + * @brief Sets the int64 value of the given formattable object and changes the + * type to the #I18N_FORMATTABLE_K_INT64. + * + * @param[in] formattable A handle to the formattable object + * @param[in] ll The new int64_t value to be set + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_formattable_set_int64(i18n_formattable_h formattable, int64_t ll); + +/** + * @brief Sets the long value of the given formattable object and changes the + * type to the #I18N_FORMATTABLE_K_LONG. + * + * @param[in] formattable A handle to the formattable object + * @param[in] l The new int32_t value to be set + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_formattable_set_long(i18n_formattable_h formattable, int32_t l); + +/** + * @brief Sets the string value of the given formattable object and changes + * the type to the #I18N_FORMATTABLE_K_STRING. + * + * @param[in] formattable A handle to the formattable object + * @param[in] string_to_copy The new string value to be set + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_formattable_set_string(i18n_formattable_h formattable, const char *string_to_copy); + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* UTILS_I18N_FORMATTABLE_H_ */ diff --git a/src/include/wearable/utils_i18n.h b/src/include/wearable/utils_i18n.h index 13b23bc..26ddbec 100644 --- a/src/include/wearable/utils_i18n.h +++ b/src/include/wearable/utils_i18n.h @@ -33,6 +33,7 @@ #include #include #include +#include /** * @file utils_i18n.h @@ -47,7 +48,7 @@ extern "C" { /** * @ingroup CAPI_BASE_UTILS_MODULE * @defgroup CAPI_BASE_UTILS_I18N_MODULE i18n - * @brief The i18n module contains uchar, ucollator, unormalization, usearch, ustring, ucalendar, udate, udatepg, ulocale, unumber and alpha_idx. + * @brief The i18n module contains uchar, ucollator, unormalization, usearch, ustring, ucalendar, udate, udatepg, ulocale, unumber, alpha_idx and formattable. * This module provides flexible generation of number or date format patterns and helps you format and parse dates/number for any locale. * The i18n module provides various features based on data from ICU. The following table shows the version of ICU used in each Tizen platform. * @@ -127,6 +128,9 @@ extern "C" { * * * + * + * + * * *
@ref CAPI_BASE_UTILS_I18N_ALPHA_IDX_MODULEAlpha_idx supports the creation of a UI index appropriate for a given language.
@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULEFormattable interconverts between the primitive numeric types (double, long, etc.) as well as the #i18n_udate and char string.
* @@ -1913,6 +1917,136 @@ extern "C" { * #i18n_alpha_idx_reset_record_iter * resetRecordIterator * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_create_default + * Formattable() + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_create_with_udate + * Formattable(UDate d, ISDATE flag) + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_create_with_double + * Formattable(double d) + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_create_with_long + * Formattable(int32_t l) + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_create_with_int64 + * Formattable(int64_t ll) + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_create_with_char_string + * Formattable(const char* strToCopy) + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_create_with_formattable_array + * Formattable(const Formattable* arrayToCopy, int32_t count) + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_destroy + * delete + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_clone + * Formattable::clone + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_get_array + * Formattable::getArray + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_get_date + * Formattable::getDate + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_get_double + * Formattable::getDouble + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_get_int64 + * Formattable::getInt64 + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_get_long + * Formattable::getLong + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_get_string + * Formattable::getString + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_get_type + * Formattable::getType + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_is_numeric + * Formattable::isNumeric + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_not_equal + * Formattable::operator!= + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_equal + * Formattable::operator== + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_element_at + * Formattable::operator[] + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_set_array + * Formattable::setArray + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_set_date + * Formattable::setDate + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_set_double + * Formattable::setDouble + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_set_int64 + * Formattable::setInt64 + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_set_long + * Formattable::setLong + * + * + * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * #i18n_formattable_set_string + * Formattable::setString + * * */ diff --git a/src/include/wearable/utils_i18n_formattable.h b/src/include/wearable/utils_i18n_formattable.h new file mode 100644 index 0000000..c7abfab --- /dev/null +++ b/src/include/wearable/utils_i18n_formattable.h @@ -0,0 +1,466 @@ +/* + * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef UTILS_I18N_FORMATTABLE_H_ +#define UTILS_I18N_FORMATTABLE_H_ + +#include + +/** + * @file utils_i18n_formattable.h + * @version 0.1 + * @brief utils_i18n_formattable + */ + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @ingroup CAPI_BASE_UTILS_I18N_MODULE + * @defgroup CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE Formattable + * @brief Formattable interconverts between the primitive numeric types + * (double, long, etc.) as well as #i18n_udate and char string. + * + * @section CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE_HEADER Required Header + * \#include + * + * @section CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE_OVERVIEW Overview + * @details Internally, an #i18n_formattable_h handle holds an object + * that is a union of primitive types. + * As such, it can only store one flavor of data at a time. + * To determine what flavor of data it contains, use the + * #i18n_formattable_get_type function. + */ + +/** + * @addtogroup CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE + * @{ + */ + +/** + * @brief Creates a new default #i18n_formattable_h. + * @remarks The created object should be released by the caller with the + * #i18n_formattable_destroy() function. + * + * @param[out] formattable A pointer to a handle to the newly created formattable + * object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_UNKNOWN Unknown error + */ +int i18n_formattable_create_default(i18n_formattable_h *formattable); + +/** + * @brief Creates a new #i18n_formattable_h handle with an #i18n_udate instance. + * @remarks The created object should be released by the caller with the + * #i18n_formattable_destroy() function. + * + * @param[in] date The #i18n_udate instance + * @param[out] formattable A pointer to a handle to the newly created formattable + * object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_UNKNOWN Unknown error + */ +int i18n_formattable_create_with_udate(i18n_udate date, i18n_formattable_h *formattable); + +/** + * @brief Creates a new #i18n_formattable_h handle with a double number. + * @remarks The created object should be released by the caller with the + * #i18n_formattable_destroy() function. + * + * @param[in] d The double number + * @param[out] formattable A pointer to a handle to the newly created formattable + * object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_UNKNOWN Unknown error + */ +int i18n_formattable_create_with_double(double d, i18n_formattable_h *formattable); + +/** + * @brief Creates a new #i18n_formattable_h handle with a long number. + * @remarks The created object should be released by the caller with the + * #i18n_formattable_destroy() function. + * + * @param[in] l The long number + * @param[out] formattable A pointer to a handle to the newly created formattable + * object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_UNKNOWN Unknown error + */ +int i18n_formattable_create_with_long(int32_t l, i18n_formattable_h *formattable); + +/** + * @brief Creates a new #i18n_formattable_h handle with an int64_t number. + * @remarks The created object should be released by the caller with the + * #i18n_formattable_destroy() function. + * + * @param[in] ll The int64_t number + * @param[out] formattable A pointer to a handle to the newly created formattable + * object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_UNKNOWN Unknown error + */ +int i18n_formattable_create_with_int64(int64_t ll, i18n_formattable_h *formattable); + +/** + * @brief Creates a new #i18n_formattable_h handle with a char string pointer. + * @details Assumes that the char string is null terminated. + * @remarks The created object should be released by the caller with the + * #i18n_formattable_destroy() function. + * + * @param[in] str_to_copy The char string + * @param[out] formattable A pointer to a handle to the newly created formattable + * object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_UNKNOWN Unknown error + */ +int i18n_formattable_create_with_char_string(const char *str_to_copy, i18n_formattable_h *formattable); + +/** + * @brief Creates a new #i18n_formattable_h handle with an array of + * #i18n_formattable_h handles. + * @remarks The created object should be released by the caller with the + * #i18n_formattable_destroy() function. + * + * @param[in] array_to_copy An array with the #i18n_formattable_h handles + * @param[in] count The number of the elements in the array + * @param[out] formattable A pointer to a handle to the newly created + * formattable object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_UNKNOWN Unknown error + */ +int i18n_formattable_create_with_formattable_array(const i18n_formattable_h *array_to_copy, int32_t count, i18n_formattable_h *formattable); + +/** + * @brief Releases the given #i18n_formattable_h handle. + * + * @param[in] formattable A handle to the formattable object to be released + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_formattable_destroy(i18n_formattable_h formattable); + +/** + * @brief Clones the given formattable handle with the related object to the + * @a clone handle. + * @details Clones can be used concurrently in multiple threads. + * @remarks The cloned object should be released by the caller with the + * #i18n_formattable_destroy() function. + * + * @param[in] formattable A handle to the formattable object + * @param[out] clone A pointer to a handle to the formattable object which + * will be filled with a copy of the @a formattable handle. + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_UNKNOWN Unknown error + */ +int i18n_formattable_clone(i18n_formattable_h formattable, i18n_formattable_h *clone); + +/** + * @brief Gets the array value and count of the given formattable object. + * @remarks If this object is not of type #I18N_FORMATTABLE_K_ARRAY then the + * result is undefined. The obtained array should be released by the + * caller with the free() function. + * + * @param[in] formattable A handle to the formattable object + * @param[out] array A pointer to an array of #i18n_formattable_h handles + * @param[out] count A pointer to an int32_t variable which will be filled + * with the number of array's elements + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_formattable_get_array(i18n_formattable_h formattable, i18n_formattable_h **array, int32_t *count); + +/** + * @brief Gets the date value of the given formattable object. + * @remarks If this object is not of type #I18N_FORMATTABLE_K_DATE then the + * result is undefined. + * + * @param[in] formattable A handle to the formattable object + * @param[out] date A pointer to an i18n_udate object which will be filled + * with the date obtained from the given formattable object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_formattable_get_date(i18n_formattable_h formattable, i18n_udate *date); + +/** + * @brief Gets the double value of the given formattable object. + * @remarks If this object is not of type #I18N_FORMATTABLE_K_DOUBLE then the + * result is undefined. + * + * @param[in] formattable A handle to the formattable object + * @param[out] value A pointer to a double variable which will be filled + * with the value obtained from the given formattable object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_formattable_get_double(i18n_formattable_h formattable, double *value); + +/** + * @brief Gets the int64 value of the given formattable object. + * @remarks If this object is not of type #I18N_FORMATTABLE_K_INT64 then the + * result is undefined. + * + * @param[in] formattable A handle to the formattable object + * @param[out] value A pointer to an int64_t variable which will be filled + * with the value obtained from the given formattable object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_formattable_get_int64(i18n_formattable_h formattable, int64_t *value); + +/** + * @brief Gets the long value of the given formattable object. + * @details If the magnitude is too large to fit in a long, then the maximum or + * minimum long value, as appropriate, is set to @value variable and + * the #I18N_ERROR_INVALID_FORMAT error code is returned by the + * function. + * + * @param[in] formattable A handle to the formattable object + * @param[out] value A pointer to a int32_t variable which will be filled + * with the value obtained from the given formattable object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_formattable_get_long(i18n_formattable_h formattable, int32_t *value); + +/** + * @brief Gets the string value of the given formattable object. + * @remarks If the type is not a string, the function returns the + * #I18N_ERROR_INVALID_FORMAT error code and the value is set to @c + * NULL. + * + * @param[in] formattable A handle to the formattable object + * @param[out] value A pointer to a char string variable which will be + * filled with the value obtained from the given formattable object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_INVALID_FORMAT The given formattable type is not a string + * @retval #I18N_ERROR_UNKNOWN Unknown error + */ +int i18n_formattable_get_string(i18n_formattable_h formattable, char **value); + +/** + * @brief Gets the data type of the given formattable object. + * + * @param[in] formattable A handle to the formattable object + * @param[out] type A pointer to an #i18n_formattable_type_e variable which + * will be filled with the type obtained from the given formattable + * object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_formattable_get_type(i18n_formattable_h formattable, i18n_formattable_type_e *type); + +/** + * @brief Sets the variable pointed by the @a is_numeric pointer to @c true if + * the data type of the given formattable object is #I18N_FORMATTABLE_K_DOUBLE, + * #I18N_FORMATTABLE_K_LONG or #I18N_FORMATTABLE_K_INT64. + * + * @param[in] formattable A handle to the formattable object + * @param[out] is_numeric A pointer to a boolean variable which will be filled by + * the function + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_formattable_is_numeric(i18n_formattable_h formattable, bool *is_numeric); + +/** + * @brief Sets the variable pointed by the @a not_equal pointer to @c true if + * the given @a formattable object is not equal to the given @a other + * formattable object. + * + * @param[in] formattable A handle to the formattable object + * @param[in] other A handle to the other formattable object + * @param[out] not_equal A pointer to a boolean variable which will be filled by + * the function + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_formattable_not_equal(i18n_formattable_h formattable, i18n_formattable_h other, bool *not_equal); + +/** + * @brief Sets the variable pointed by the @a equal pointer to @c true if the + * given @a formattable object is equal to the given @a other + * formattable object. + * + * @param[in] formattable A handle to the formattable object + * @param[in] other A handle to the other formattable object + * @param[out] equal A pointer to a boolean variable which will be filled by + * the function + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_formattable_equal(i18n_formattable_h formattable, i18n_formattable_h other, bool *equal); + +/** + * @brief Sets the object pointed by the @a element pointer to the element at + * the @a index position in the array stored by the given formattable + * object (if its type is #I18N_FORMATTABLE_K_ARRAY). + * @remarks If this object is not of type #I18N_FORMATTABLE_K_ARRAY then the + * result is undefined. + * + * The obtained formattable element should not be released by the caller + * as it belongs to the given formattable object of type #I18N_FORMATTABLE_K_ARRAY. + * + * @param[in] formattable A handle to the formattable object + * @param[in] index A number representing the position in the array from + * which the element should be obtained + * @param[out] element A pointer to a handle to the formattable object which + * will be filled by the function + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_INDEX_OUTOFBOUNDS Index value out of range + * @retval #I18N_ERROR_INVALID_FORMAT The given formattable type is not an array + */ +int i18n_formattable_element_at(i18n_formattable_h formattable, int32_t index, i18n_formattable_h *element); + +/** + * @brief Sets the array value and count of the given formattable object and + * changes the type to #I18N_FORMATTABLE_K_ARRAY. + * + * @param[in] formattable A handle to the formattable object + * @param[in] array An array of handles to the formattable objects + * @param[in] count The number of array elements to be copied + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_formattable_set_array(i18n_formattable_h formattable, const i18n_formattable_h *array, int32_t count); + +/** + * @brief Sets the date value of the given formattable object and changes the + * type to the #I18N_FORMATTABLE_K_DATE. + * + * @param[in] formattable A handle to the formattable object + * @param[in] d The new i18n_udate value to be set + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_formattable_set_date(i18n_formattable_h formattable, i18n_udate d); + +/** + * @brief Sets the double value of the given formattable object and changes + * the type to the #I18N_FORMATTABLE_K_DOUBLE. + * + * @param[in] formattable A handle to the formattable object + * @param[in] d The new double value to be set + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_formattable_set_double(i18n_formattable_h formattable, double d); + +/** + * @brief Sets the int64 value of the given formattable object and changes the + * type to the #I18N_FORMATTABLE_K_INT64. + * + * @param[in] formattable A handle to the formattable object + * @param[in] ll The new int64_t value to be set + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_formattable_set_int64(i18n_formattable_h formattable, int64_t ll); + +/** + * @brief Sets the long value of the given formattable object and changes the + * type to the #I18N_FORMATTABLE_K_LONG. + * + * @param[in] formattable A handle to the formattable object + * @param[in] l The new int32_t value to be set + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_formattable_set_long(i18n_formattable_h formattable, int32_t l); + +/** + * @brief Sets the string value of the given formattable object and changes + * the type to the #I18N_FORMATTABLE_K_STRING. + * + * @param[in] formattable A handle to the formattable object + * @param[in] string_to_copy The new string value to be set + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_formattable_set_string(i18n_formattable_h formattable, const char *string_to_copy); + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* UTILS_I18N_FORMATTABLE_H_ */ diff --git a/src/utils_i18n_formattable.cpp b/src/utils_i18n_formattable.cpp new file mode 100644 index 0000000..90ae8a6 --- /dev/null +++ b/src/utils_i18n_formattable.cpp @@ -0,0 +1,338 @@ +/* + * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +#include +#include +#include + +int i18n_formattable_create_default(i18n_formattable_h *formattable) +{ + retv_if(formattable == NULL, I18N_ERROR_INVALID_PARAMETER); + + *formattable = new Formattable(); + retv_if(*formattable == NULL, I18N_ERROR_UNKNOWN); + + return I18N_ERROR_NONE; +} + +int i18n_formattable_create_with_udate(i18n_udate date, i18n_formattable_h *formattable) +{ + retv_if(formattable == NULL, I18N_ERROR_INVALID_PARAMETER); + + *formattable = new Formattable(date, Formattable::kIsDate); + retv_if(*formattable == NULL, I18N_ERROR_UNKNOWN); + + return I18N_ERROR_NONE; +} + +int i18n_formattable_create_with_double(double d, i18n_formattable_h *formattable) +{ + retv_if(formattable == NULL, I18N_ERROR_INVALID_PARAMETER); + + *formattable = new Formattable(d); + retv_if(*formattable == NULL, I18N_ERROR_UNKNOWN); + + return I18N_ERROR_NONE; +} + +int i18n_formattable_create_with_long(int32_t l, i18n_formattable_h *formattable) +{ + retv_if(formattable == NULL, I18N_ERROR_INVALID_PARAMETER); + + *formattable = new Formattable(l); + retv_if(*formattable == NULL, I18N_ERROR_UNKNOWN); + + return I18N_ERROR_NONE; +} + +int i18n_formattable_create_with_int64(int64_t ll, i18n_formattable_h *formattable) +{ + retv_if(formattable == NULL, I18N_ERROR_INVALID_PARAMETER); + + *formattable = new Formattable(ll); + retv_if(*formattable == NULL, I18N_ERROR_UNKNOWN); + + return I18N_ERROR_NONE; +} + +int i18n_formattable_create_with_char_string(const char *str_to_copy, i18n_formattable_h *formattable) +{ + retv_if(formattable == NULL, I18N_ERROR_INVALID_PARAMETER); + + *formattable = new Formattable(str_to_copy); + retv_if(*formattable == NULL, I18N_ERROR_UNKNOWN); + + return I18N_ERROR_NONE; +} + +int i18n_formattable_create_with_formattable_array(const i18n_formattable_h *array_to_copy, int32_t count, i18n_formattable_h *formattable) +{ + retv_if(array_to_copy == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(count < 0, I18N_ERROR_INVALID_PARAMETER); + retv_if(formattable == NULL, I18N_ERROR_INVALID_PARAMETER); + + Formattable *f_array = new Formattable[count]; + + for (int i = 0; i < count; i++) { + retv_if(array_to_copy[i] == NULL, I18N_ERROR_INVALID_PARAMETER); + f_array[i] = *((Formattable *)array_to_copy[i]); + } + + *formattable = new Formattable(f_array, count); + + delete[] f_array; + + retv_if(*formattable == NULL, I18N_ERROR_UNKNOWN); + + return I18N_ERROR_NONE; +} + +int i18n_formattable_destroy(i18n_formattable_h formattable) +{ + retv_if(formattable == NULL, I18N_ERROR_INVALID_PARAMETER); + + delete ((Formattable *)formattable); + + formattable = NULL; + + return I18N_ERROR_NONE; +} + +int i18n_formattable_clone(i18n_formattable_h formattable, i18n_formattable_h *clone) +{ + retv_if(formattable == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(clone == NULL, I18N_ERROR_INVALID_PARAMETER); + + *clone = ((Formattable *) formattable)->clone(); + retv_if(*clone == NULL, I18N_ERROR_UNKNOWN); + + return I18N_ERROR_NONE; +} + +int i18n_formattable_get_array(i18n_formattable_h formattable, i18n_formattable_h **array, int32_t *count) +{ + retv_if(formattable == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(array == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(count == NULL, I18N_ERROR_INVALID_PARAMETER); + + UErrorCode status = U_ZERO_ERROR; + const Formattable *f_array = ((Formattable *) formattable)->getArray(*count, status); + + *array = (i18n_formattable_h *)malloc(*count * sizeof(i18n_formattable_h)); + + for (int i = 0; i < *count; i++) { + (*array)[i] = (const i18n_formattable_h) &f_array[i]; + } + + return _i18n_error_mapping(status); +} + +int i18n_formattable_get_date(i18n_formattable_h formattable, i18n_udate *date) +{ + retv_if(formattable == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(date == NULL, I18N_ERROR_INVALID_PARAMETER); + + UErrorCode status = U_ZERO_ERROR; + *date = (i18n_udate) ((Formattable *) formattable)->getDate(status); + + return _i18n_error_mapping(status); +} + +int i18n_formattable_get_double(i18n_formattable_h formattable, double *value) +{ + retv_if(formattable == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(value == NULL, I18N_ERROR_INVALID_PARAMETER); + + UErrorCode status = U_ZERO_ERROR; + *value = ((Formattable *) formattable)->getDouble(status); + + return _i18n_error_mapping(status); +} + +int i18n_formattable_get_int64(i18n_formattable_h formattable, int64_t *value) +{ + retv_if(formattable == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(value == NULL, I18N_ERROR_INVALID_PARAMETER); + + UErrorCode status = U_ZERO_ERROR; + *value = ((Formattable *) formattable)->getInt64(status); + + return _i18n_error_mapping(status); +} + +int i18n_formattable_get_long(i18n_formattable_h formattable, int32_t *value) +{ + retv_if(formattable == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(value == NULL, I18N_ERROR_INVALID_PARAMETER); + + UErrorCode status = U_ZERO_ERROR; + *value = ((Formattable *) formattable)->getLong(status); + + return _i18n_error_mapping(status); +} + +int i18n_formattable_get_string(i18n_formattable_h formattable, char **value) +{ + retv_if(formattable == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(value == NULL, I18N_ERROR_INVALID_PARAMETER); + + *value = NULL; + + UnicodeString result; + UErrorCode status = U_ZERO_ERROR; + ((Formattable *) formattable)->getString(result, status); + + const UChar *uchar_result = result.getTerminatedBuffer(); + retv_if(uchar_result == NULL, I18N_ERROR_INVALID_FORMAT); + + int32_t ulen = u_strlen(uchar_result); + retv_if(ulen <= 0, I18N_ERROR_UNKNOWN); + + *value = (char *) malloc(ulen + 1); + retv_if(*value == NULL, I18N_ERROR_UNKNOWN); + + u_austrcpy(*value, uchar_result); + + return _i18n_error_mapping(status); +} + +int i18n_formattable_get_type(i18n_formattable_h formattable, i18n_formattable_type_e *type) +{ + retv_if(formattable == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(type == NULL, I18N_ERROR_INVALID_PARAMETER); + + *type = (i18n_formattable_type_e) ((Formattable *) formattable)->getType(); + + return I18N_ERROR_NONE; +} + +int i18n_formattable_is_numeric(i18n_formattable_h formattable, bool *is_numeric) +{ + retv_if(formattable == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(is_numeric == NULL, I18N_ERROR_INVALID_PARAMETER); + + *is_numeric = (bool) ((Formattable *) formattable)->isNumeric(); + + return I18N_ERROR_NONE; +} + +int i18n_formattable_not_equal(i18n_formattable_h formattable, i18n_formattable_h other, bool *not_equal) +{ + retv_if(formattable == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(other == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(not_equal == NULL, I18N_ERROR_INVALID_PARAMETER); + + *not_equal = (bool) (((Formattable *) formattable) != ((Formattable *) other)); + + return I18N_ERROR_NONE; +} + +int i18n_formattable_equal(i18n_formattable_h formattable, i18n_formattable_h other, bool *equal) +{ + retv_if(formattable == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(other == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(equal == NULL, I18N_ERROR_INVALID_PARAMETER); + + *equal = (bool) (((Formattable *) formattable) == ((Formattable *) other)); + + return I18N_ERROR_NONE; +} + +int i18n_formattable_element_at(i18n_formattable_h formattable, int32_t index, i18n_formattable_h *element) +{ + retv_if(formattable == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(index < 0, I18N_ERROR_INDEX_OUTOFBOUNDS); + retv_if(element == NULL, I18N_ERROR_INVALID_PARAMETER); + + int32_t count; + UErrorCode status = U_ZERO_ERROR; + ((Formattable *) formattable)->getArray(count, status); + + retv_if(status == U_INVALID_FORMAT_ERROR, I18N_ERROR_INVALID_FORMAT); + retv_if(index >= count, I18N_ERROR_INDEX_OUTOFBOUNDS); + + *element = (i18n_formattable_h) &((Formattable *) formattable)[index]; + + return _i18n_error_mapping(status); +} + +int i18n_formattable_set_array(i18n_formattable_h formattable, const i18n_formattable_h *array, int32_t count) +{ + retv_if(formattable == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(array == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(count < 0, I18N_ERROR_INVALID_PARAMETER); + + Formattable *f_array = new Formattable[count]; + + for (int i = 0; i < count; i++) { + retv_if(array[i] == NULL, I18N_ERROR_INVALID_PARAMETER); + f_array[i] = *((Formattable *)array[i]); + } + + ((Formattable *) formattable)->setArray(f_array, count); + + delete[] f_array; + + return I18N_ERROR_NONE; +} + +int i18n_formattable_set_date(i18n_formattable_h formattable, i18n_udate d) +{ + retv_if(formattable == NULL, I18N_ERROR_INVALID_PARAMETER); + + ((Formattable *) formattable)->setDate(d); + + return I18N_ERROR_NONE; +} + +int i18n_formattable_set_double(i18n_formattable_h formattable, double d) +{ + retv_if(formattable == NULL, I18N_ERROR_INVALID_PARAMETER); + + ((Formattable *) formattable)->setDouble(d); + + return I18N_ERROR_NONE; +} + +int i18n_formattable_set_int64(i18n_formattable_h formattable, int64_t ll) +{ + retv_if(formattable == NULL, I18N_ERROR_INVALID_PARAMETER); + + ((Formattable *) formattable)->setInt64(ll); + + return I18N_ERROR_NONE; +} + +int i18n_formattable_set_long(i18n_formattable_h formattable, int32_t l) +{ + retv_if(formattable == NULL, I18N_ERROR_INVALID_PARAMETER); + + ((Formattable *) formattable)->setLong(l); + + return I18N_ERROR_NONE; +} + +int i18n_formattable_set_string(i18n_formattable_h formattable, const char *string_to_copy) +{ + retv_if(formattable == NULL, I18N_ERROR_INVALID_PARAMETER); + + const UnicodeString stringToCopy(string_to_copy); + ((Formattable *) formattable)->setString(stringToCopy); + + return I18N_ERROR_NONE; +} -- 2.7.4 From 7fb9cf861d8d240febed3d61eba3d0001653b277 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20Szczekutek?= Date: Mon, 27 Jun 2016 15:23:59 +0200 Subject: [PATCH 16/16] [Base-utils][MeasureUnit] Complete module added MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: I375b4b6e57be1e3253eab889ec399f5238392c3c Signed-off-by: Beata Stefaniuk Signed-off-by: Rafał Szczekutek --- packaging/capi-base-utils.spec | 2 +- src/CMakeLists.txt | 2 + src/include/mobile/utils_i18n.h | 718 ++++++++- src/include/mobile/utils_i18n_measure_unit.h | 2013 ++++++++++++++++++++++++ src/include/wearable/utils_i18n.h | 716 +++++++++ src/include/wearable/utils_i18n_measure_unit.h | 2013 ++++++++++++++++++++++++ src/utils_i18n_measure_unit.cpp | 1478 +++++++++++++++++ 7 files changed, 6940 insertions(+), 2 deletions(-) create mode 100644 src/include/mobile/utils_i18n_measure_unit.h create mode 100644 src/include/wearable/utils_i18n_measure_unit.h create mode 100644 src/utils_i18n_measure_unit.cpp diff --git a/packaging/capi-base-utils.spec b/packaging/capi-base-utils.spec index 0ac8647..f95da89 100755 --- a/packaging/capi-base-utils.spec +++ b/packaging/capi-base-utils.spec @@ -1,6 +1,6 @@ Name: capi-base-utils Summary: Base Utils -Version: 1.2.4 +Version: 1.2.5 Release: 1 Group: Base License: Apache-2.0 and ICU diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index cb1b4e6..4b10621 100755 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -35,6 +35,7 @@ SET(BASEUTILS_SRCS utils_i18n_timezone.cpp utils_i18n_alpha_idx.cpp utils_i18n_formattable.cpp + utils_i18n_measure_unit.cpp ) ADD_LIBRARY(${target_name} SHARED ${BASEUTILS_SRCS} @@ -71,5 +72,6 @@ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${INC_DIR}/utils_i18n_uset.h DESTINATI INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${INC_DIR}/utils_i18n_ubrk.h DESTINATION ${INCLUDE_INSTALL_DIR}/base) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${INC_DIR}/utils_i18n_alpha_idx.h DESTINATION ${INCLUDE_INSTALL_DIR}/base) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${INC_DIR}/utils_i18n_formattable.h DESTINATION ${INCLUDE_INSTALL_DIR}/base) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${INC_DIR}/utils_i18n_measure_unit.h DESTINATION ${INCLUDE_INSTALL_DIR}/base) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${INC_DIR}/utils_i18n.h DESTINATION ${INCLUDE_INSTALL_DIR}/base) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${pc_name}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) \ No newline at end of file diff --git a/src/include/mobile/utils_i18n.h b/src/include/mobile/utils_i18n.h index 26ddbec..ae86d15 100644 --- a/src/include/mobile/utils_i18n.h +++ b/src/include/mobile/utils_i18n.h @@ -34,6 +34,7 @@ #include #include #include +#include /** * @file utils_i18n.h @@ -48,7 +49,7 @@ extern "C" { /** * @ingroup CAPI_BASE_UTILS_MODULE * @defgroup CAPI_BASE_UTILS_I18N_MODULE i18n - * @brief The i18n module contains uchar, ucollator, unormalization, usearch, ustring, ucalendar, udate, udatepg, ulocale, unumber, alpha_idx and formattable. + * @brief The i18n module contains uchar, ucollator, unormalization, usearch, ustring, ucalendar, udate, udatepg, ulocale, unumber, alpha_idx, formattable and measure unit. * This module provides flexible generation of number or date format patterns and helps you format and parse dates/number for any locale. * The i18n module provides various features based on data from ICU. The following table shows the version of ICU used in each Tizen platform. * @@ -132,6 +133,10 @@ extern "C" { * * * + * + * + * + * *
@ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULEFormattable interconverts between the primitive numeric types (double, long, etc.) as well as the #i18n_udate and char string.
@ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULEThe MeasureUnit module contains units such as length, mass, volume, currency, etc...
* * @section CAPI_BASE_UTILS_I18N_MODULE_MAPPING_TABLE Mapping Table @@ -2047,6 +2052,717 @@ extern "C" { * #i18n_formattable_set_string * Formattable::setString * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create + * MeasureUnit + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_clone + * clone + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_destroy + * ~MeasureUnit + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_get_type + * getType + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_get_subtype + * getSubtype + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_get_available + * getAvailable + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_get_available_with_type + * getAvailable + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_get_available_types + * getAvailableTypes + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_g_force + * createGForce + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_meter_per_second_squared + * createMeterPerSecondSquared + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_arc_minute + * createArcMinute + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_arc_second + * createArcSecond + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_degree + * createDegree + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_radian + * createRadian + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_revolution_angle + * createRevolutionAngle + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_acre + * createAcre + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_hectare + * createHectare + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_square_centimeter + * createSquareCentimeter + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_square_foot + * createSquareFoot + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_square_inch + * createSquareInch + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_square_kilometer + * createSquareKilometer + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_square_meter + * createSquareMeter + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_square_mile + * createSquareMile + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_square_yard + * createSquareYard + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_karat + * createKarat + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_milligram_per_deciliter + * createMilligramPerDeciliter + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_millimole_per_liter + * createMillimolePerLiter + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_part_per_million + * createPartPerMillion + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_liter_per_100_kilometers + * createLiterPer100Kilometers + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_liter_per_kilometer + * createLiterPerKilometer + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_mile_per_gallon + * createMilePerGallon + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_mile_per_gallon_imperial + * createMilePerGallonImperial + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_bit + * createBit + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_byte + * createByte + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_gigabit + * createGigabit + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_gigabyte + * createGigabyte + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_kilobit + * createKilobit + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_kilobyte + * createKilobyte + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_megabit + * createMegabit + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_megabyte + * createMegabyte + * + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_terabit + * createTerabit + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_terabyte + * createTerabyte + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_century + * createCentury + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_day + * createDay + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_hour + * createHour + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_microsecond + * createMicrosecond + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_millisecond + * createMillisecond + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_minute + * createMinute + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_month + * createMonth + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_nanosecond + * createNanosecond + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_second + * createSecond + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_week + * createWeek + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_year + * createYear + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_ampere + * createAmpere + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_milliampere + * createMilliampere + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_ohm + * createOhm + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_volt + * createVolt + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_calorie + * createCalorie + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_foodcalorie + * createFoodcalorie + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_joule + * createJoule + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_kilocalorie + * createKilocalorie + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_kilojoule + * createKilojoule + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_kilowatt_hour + * createKilowattHour + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_gigahertz + * createGigahertz + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_hertz + * createHertz + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_kilohertz + * createKilohertz + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_megahertz + * createMegahertz + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_astronomical_unit + * createAstronomicalUnit + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_centimeter + * createCentimeter + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_decimeter + * createDecimeter + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_fathom + * createFathom + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_foot + * createFoot + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_furlong + * createFurlong + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_inch + * createInch + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_kilometer + * createKilometer + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_light_year + * createLightYear + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_meter + * createMeter + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_micrometer + * createMicrometer + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_mile + * createMile + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_mile_scandinavian + * createMileScandinavian + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_millimeter + * createMillimeter + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_nanometer + * createNanometer + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_nautical_mile + * createNauticalMile + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_parsec + * createParsec + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_picometer + * createPicometer + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_yard + * createYard + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_lux + * createLux + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_carat + * createCarat + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_gram + * createGram + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_kilogram + * createKilogram + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_metric_ton + * createMetricTon + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_microgram + * createMicrogram + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_milligram + * createMilligram + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_ounce + * createOunce + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_ounce_troy + * createOunceTroy + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_pound + * createPound + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_stone + * createStone + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_ton + * createTon + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_gigawatt + * createGigawatt + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_horsepower + * createHorsepower + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_kilowatt + * createKilowatt + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_megawatt + * createMegawatt + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_milliwatt + * createMilliwatt + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_watt + * createWatt + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_hectopascal + * createHectopascal + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_inch_hg + * createInchHg + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_millibar + * createMillibar + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_millimeter_of_mercury + * createMillimeterOfMercury + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_pound_per_square_inch + * createPoundPerSquareInch + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_kilometer_per_hour + * createKilometerPerHour + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_knot + * createKnot + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_meter_per_second + * createMeterPerSecond + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_mile_per_hour + * createMilePerHour + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_celsius + * createCelsius + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_fahrenheit + * createFahrenheit + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_generic_temperature + * createGenericTemperature + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_kelvin + * createKelvin + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_acre_foot + * createAcreFoot + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_bushel + * createBushel + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_centiliter + * createCentiliter + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_cubic_centimeter + * createCubicCentimeter + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_cubic_foot + * createCubicFoot + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_cubic_inch + * createCubicInch + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_cubic_kilometer + * createCubicKilometer + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_cubic_meter + * createCubicMeter + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_cubic_mile + * createCubicMile + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_cubic_yard + * createCubicYard + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_cup + * createCup + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_cup_metric + * createCupMetric + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_deciliter + * createDeciliter + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_fluid_ounce + * createFluidOunce + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_gallon + * createGallon + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_gallon_imperial + * createGallonImperial + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_hectoliter + * createHectoliter + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_liter + * createLiter + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_megaliter + * createMegaliter + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_milliliter + * createMilliliter + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_pint + * createPint + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_pint_metric + * createPintMetric + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_quart + * createQuart + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_tablespoon + * createTablespoon + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_teaspoon + * createTeaspoon + * * */ diff --git a/src/include/mobile/utils_i18n_measure_unit.h b/src/include/mobile/utils_i18n_measure_unit.h new file mode 100644 index 0000000..144b87f --- /dev/null +++ b/src/include/mobile/utils_i18n_measure_unit.h @@ -0,0 +1,2013 @@ +/* + * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __UTILS_I18N_MEASURE_UNIT_H__ +#define __UTILS_I18N_MEASURE_UNIT_H__ + +#include + +/** + * @file utils_i18n_measure_unit.h + * @version 0.1 + * @brief utils_i18n_measure_unit + */ + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @ingroup CAPI_BASE_UTILS_I18N_MODULE + * @defgroup CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE MeasureUnit + * @brief The MeasureUnit unit such as length, mass, volume, currency, etc. coupled with a numeric amount to produce a Measure. + * @section CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE_HEADER Required Header + * \#include + * + * @section CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE_OVERVIEW Overview + * @details + */ + +/** + * @addtogroup CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * @{ + */ + +/** + * @brief Creates the default measure unit object. + * @remarks The created object should be released by the caller with the + * #i18n_measure_unit_destroy() function. + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create(i18n_measure_unit_h *measure_unit); + +/** + * @brief Creates a polymorphic clone of the given @a clone object. + * @remarks The created object should be released by the caller with the + * #i18n_measure_unit_destroy() function. + * @since_tizen 3.0 + * + * @param[in] measure_unit The measure unit object to be cloned. + * @param[out] clone The clone of the given @a measure_unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_clone(i18n_measure_unit_h measure_unit, i18n_measure_unit_h *clone); + +/** + * @brief Destroys the measure unit object + * @since_tizen 3.0 + * + * @param[in] measure_unit The measure unit object to destroy + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_measure_unit_destroy(i18n_measure_unit_h measure_unit); + +/** + * @brief Destroys the given array of the measure unit objects + * @since_tizen 3.0 + * + * @param[in] array The array of measure unit objects to destroy + * @param[in] array_size The capacity of the @a dest_array + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_measure_unit_array_destroy(i18n_measure_unit_h *array, int32_t array_size); + +/** + * @brief Gets the measure unit object type. + * @remarks The obtained type should not be freed as it is handled by the given measure + * unit object. + * @since_tizen 3.0 + * + * @param[in] measure_unit The measure unit object + * @param[out] type The measure unit object type + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_get_type(i18n_measure_unit_h measure_unit, const char **type); + +/** + * @brief Gets the measure unit object sub type. + * @remarks The obtained subtype should not be freed as it is handled by the given measure + * unit object. + * @since_tizen 3.0 + * + * @param[in] measure_unit The measure unit object + * @param[out] subtype The measure unit object subtype + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_get_subtype(i18n_measure_unit_h measure_unit, const char **subtype); + +/** + * @brief Gets all of the available units. + * @details If there are too many units to fit into @a dest_capacity the returned error code + * is #I18N_ERROR_BUFFER_OVERFLOW. + * @remarks The obtained array of measure unit objects should be released by the caller + * with the #i18n_measure_unit_array_destroy() function. + * @since_tizen 3.0 + * + * @param[in] dest_capacity The capacity of the given @a dest_array + * @param[out] dest_array The destination buffer + * @param[out] available The number of available units + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + * @retval #I18N_ERROR_BUFFER_OVERFLOW Buffer overflow + */ +int i18n_measure_unit_get_available(int32_t dest_capacity, i18n_measure_unit_h **dest_array, int32_t *available); + +/** + * @brief Gets all of the available units for a specific type. + * @details If there are too many units to fit into dest_capacity then the error code + * is set to #I18N_ERROR_BUFFER_OVERFLOW. + * @remarks The obtained array of measure unit objects should be released by the caller + * with the #i18n_measure_unit_array_destroy() function. + * @since_tizen 3.0 + * + * @param[in] dest_capacity The capacity of the given @a dest_array + * @param[in] type The type of the obtained units + * @param[out] dest_array The destination buffer + * @param[out] available The number of available units + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + * @retval #I18N_ERROR_BUFFER_OVERFLOW Buffer overflow + */ +int i18n_measure_unit_get_available_with_type(int32_t dest_capacity, const char *type, i18n_measure_unit_h **dest_array, int32_t *available); + +/** + * @brief Invokes the given callback function for every available measure unit type. + * @since_tizen 3.0 + * + * @param[in] cb The callback function invoked for every available measure unit type + * @param[in] user_data The user data passed to the callback function + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_measure_unit_foreach_available_type(i18n_measure_unit_types_cb cb, void *user_data); + +/** + * @brief Gets unit of acceleration: g-force. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_g_force(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of acceleration: meter-per-second-squared. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_meter_per_second_squared(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of angle: arc-minute. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_arc_minute(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of angle: arc-second. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_arc_second(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of angle: degree. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_degree(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of angle: radian. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_radian(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of angle: acre. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_acre(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of angle: hectare. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_hectare(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit area: square-centimeter. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_square_centimeter(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit area: square-foot. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_square_foot(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit area: square-inch. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_square_inch(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit area: square-kilometer. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_square_kilometer(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit area: square-meter. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_square_meter(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit area: square-mile. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_square_mile(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit area: square-yard. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_square_yard(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of consumption: liter-per-kilometer. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_liter_per_kilometer(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of consumption: mile-per-gallon. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_mile_per_gallon(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of digital: bit. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_bit(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of digital: byte. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_byte(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of digital: gigabit. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_gigabit(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of digital: gigabyte. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_gigabyte(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of digital: kilobit. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_kilobit(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of digital: kilobyte. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_kilobyte(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of digital: megabit. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_megabit(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of digital: megabyte. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_megabyte(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of digital: terabit. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_terabit(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of digital: terabyte. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_terabyte(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of duration: day. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_day(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of duration: hour. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_hour(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of duration: microsecond. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_microsecond(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of duration: millisecond. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_millisecond(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of duration: minute. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_minute(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of duration: month. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_month(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of duration: nanosecond. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_nanosecond(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of duration: second. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_second(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of duration: week. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_week(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of duration: year. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_year(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of electric: ampere. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_ampere(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of electric: milliampere. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_milliampere(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of electric: ohm. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_ohm(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of electric: volt. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_volt(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of energy: calorie. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_calorie(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of energy: foodcalorie. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_foodcalorie(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of energy: joule. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_joule(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of energy: kilocalorie. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_kilocalorie(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of energy: kilojoule. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_kilojoule(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of energy: kilowatt-hour. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_kilowatt_hour(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of frequency: gigahertz. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_gigahertz(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of frequency: hertz. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_hertz(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of frequency: kilohertz. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_kilohertz(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of frequency: megahertz. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_megahertz(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: astronomical-unit. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_astronomical_unit(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: centimeter. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_centimeter(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: decimeter. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_decimeter(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: fathom. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_fathom(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: foot. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_foot(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: furlong. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_furlong(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: inch. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_inch(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: kilometer. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_kilometer(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: light-year. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_light_year(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: meter. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_meter(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: micrometer. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_micrometer(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: mile. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_mile(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: millimeter. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_millimeter(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: nanometer. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_nanometer(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: nautical-mile. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_nautical_mile(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: parsec. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_parsec(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: picometer. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_picometer(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: yard. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_yard(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: lux. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_lux(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of mass: carat. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_carat(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of mass: gram. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_gram(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of mass: kilogram. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_kilogram(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of mass: metric-ton. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_metric_ton(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of mass: microgram. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_microgram(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of mass: milligram. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_milligram(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of mass: ounce. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_ounce(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of mass: ounce-troy. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_ounce_troy(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of mass: pound. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_pound(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of mass: stone. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_stone(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of mass: ton. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_ton(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of power: gigawatt. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_gigawatt(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of power: horsepower. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_horsepower(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of power: kilowatt. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_kilowatt(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of power: megawatt. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_megawatt(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of power: milliwatt. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_milliwatt(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of power: watt. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_watt(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of pressure: hectopascal. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_hectopascal(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of pressure: inch-hg. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_inch_hg(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of pressure: millibar. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_millibar(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of pressure: millimeter-of-mercury. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_millimeter_of_mercury(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of pressure: pound-per-square-inch. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_pound_per_square_inch(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of proportion: karat. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_karat(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of speed: kilometer-per-hour. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_kilometer_per_hour(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of speed: meter-per-second. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_meter_per_second(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of speed: mile-per-hour. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_mile_per_hour(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of temperature: celsius. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_celsius(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of temperature: fahrenheit. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_fahrenheit(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of temperature: kelvin. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_kelvin(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: acre-foot. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_acre_foot(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: bushel. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_bushel(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: centiliter. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_centiliter(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: cubic-centimeter. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_cubic_centimeter(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: cubic-foot. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_cubic_foot(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: cubic-inch. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_cubic_inch(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: cubic-kilometer. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_cubic_kilometer(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: cubic-meter. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_cubic_meter(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: cubic-mile. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_cubic_mile(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: cubic-yard. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_cubic_yard(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: cup. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_cup(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: deciliter. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_deciliter(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: fluid-ounce. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_fluid_ounce(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: gallon. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_gallon(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: hectoliter. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_hectoliter(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: liter. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_liter(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: megaliter. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_megaliter(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: milliliter. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_milliliter(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: pint. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_pint(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: quart. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_quart(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: tablespoon. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_tablespoon(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: teaspoon. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_teaspoon(i18n_measure_unit_h *measure_unit); + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* __UTILS_I18N_MEASURE_UNIT_H__*/ diff --git a/src/include/wearable/utils_i18n.h b/src/include/wearable/utils_i18n.h index 26ddbec..fc0495f 100644 --- a/src/include/wearable/utils_i18n.h +++ b/src/include/wearable/utils_i18n.h @@ -34,6 +34,7 @@ #include #include #include +#include /** * @file utils_i18n.h @@ -132,6 +133,10 @@ extern "C" { * @ref CAPI_BASE_UTILS_I18N_FORMATTABLE_MODULE * Formattable interconverts between the primitive numeric types (double, long, etc.) as well as the #i18n_udate and char string. * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * The MeasureUnit module contains unit such as length, mass, volume, currency, etc.. + * * * * @section CAPI_BASE_UTILS_I18N_MODULE_MAPPING_TABLE Mapping Table @@ -2047,6 +2052,717 @@ extern "C" { * #i18n_formattable_set_string * Formattable::setString * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create + * MeasureUnit + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_clone + * clone + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_destroy + * ~MeasureUnit + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_get_type + * getType + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_get_subtype + * getSubtype + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_get_available + * getAvailable + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_get_available_with_type + * getAvailable + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_get_available_types + * getAvailableTypes + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_g_force + * createGForce + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_meter_per_second_squared + * createMeterPerSecondSquared + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_arc_minute + * createArcMinute + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_arc_second + * createArcSecond + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_degree + * createDegree + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_radian + * createRadian + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_revolution_angle + * createRevolutionAngle + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_acre + * createAcre + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_hectare + * createHectare + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_square_centimeter + * createSquareCentimeter + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_square_foot + * createSquareFoot + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_square_inch + * createSquareInch + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_square_kilometer + * createSquareKilometer + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_square_meter + * createSquareMeter + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_square_mile + * createSquareMile + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_square_yard + * createSquareYard + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_karat + * createKarat + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_milligram_per_deciliter + * createMilligramPerDeciliter + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_millimole_per_liter + * createMillimolePerLiter + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_part_per_million + * createPartPerMillion + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_liter_per_100_kilometers + * createLiterPer100Kilometers + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_liter_per_kilometer + * createLiterPerKilometer + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_mile_per_gallon + * createMilePerGallon + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_mile_per_gallon_imperial + * createMilePerGallonImperial + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_bit + * createBit + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_byte + * createByte + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_gigabit + * createGigabit + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_gigabyte + * createGigabyte + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_kilobit + * createKilobit + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_kilobyte + * createKilobyte + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_megabit + * createMegabit + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_megabyte + * createMegabyte + * + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_terabit + * createTerabit + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_terabyte + * createTerabyte + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_century + * createCentury + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_day + * createDay + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_hour + * createHour + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_microsecond + * createMicrosecond + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_millisecond + * createMillisecond + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_minute + * createMinute + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_month + * createMonth + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_nanosecond + * createNanosecond + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_second + * createSecond + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_week + * createWeek + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_year + * createYear + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_ampere + * createAmpere + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_milliampere + * createMilliampere + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_ohm + * createOhm + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_volt + * createVolt + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_calorie + * createCalorie + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_foodcalorie + * createFoodcalorie + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_joule + * createJoule + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_kilocalorie + * createKilocalorie + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_kilojoule + * createKilojoule + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_kilowatt_hour + * createKilowattHour + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_gigahertz + * createGigahertz + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_hertz + * createHertz + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_kilohertz + * createKilohertz + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_megahertz + * createMegahertz + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_astronomical_unit + * createAstronomicalUnit + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_centimeter + * createCentimeter + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_decimeter + * createDecimeter + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_fathom + * createFathom + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_foot + * createFoot + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_furlong + * createFurlong + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_inch + * createInch + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_kilometer + * createKilometer + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_light_year + * createLightYear + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_meter + * createMeter + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_micrometer + * createMicrometer + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_mile + * createMile + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_mile_scandinavian + * createMileScandinavian + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_millimeter + * createMillimeter + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_nanometer + * createNanometer + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_nautical_mile + * createNauticalMile + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_parsec + * createParsec + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_picometer + * createPicometer + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_yard + * createYard + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_lux + * createLux + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_carat + * createCarat + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_gram + * createGram + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_kilogram + * createKilogram + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_metric_ton + * createMetricTon + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_microgram + * createMicrogram + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_milligram + * createMilligram + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_ounce + * createOunce + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_ounce_troy + * createOunceTroy + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_pound + * createPound + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_stone + * createStone + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_ton + * createTon + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_gigawatt + * createGigawatt + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_horsepower + * createHorsepower + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_kilowatt + * createKilowatt + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_megawatt + * createMegawatt + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_milliwatt + * createMilliwatt + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_watt + * createWatt + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_hectopascal + * createHectopascal + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_inch_hg + * createInchHg + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_millibar + * createMillibar + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_millimeter_of_mercury + * createMillimeterOfMercury + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_pound_per_square_inch + * createPoundPerSquareInch + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_kilometer_per_hour + * createKilometerPerHour + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_knot + * createKnot + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_meter_per_second + * createMeterPerSecond + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_mile_per_hour + * createMilePerHour + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_celsius + * createCelsius + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_fahrenheit + * createFahrenheit + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_generic_temperature + * createGenericTemperature + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_kelvin + * createKelvin + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_acre_foot + * createAcreFoot + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_bushel + * createBushel + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_centiliter + * createCentiliter + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_cubic_centimeter + * createCubicCentimeter + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_cubic_foot + * createCubicFoot + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_cubic_inch + * createCubicInch + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_cubic_kilometer + * createCubicKilometer + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_cubic_meter + * createCubicMeter + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_cubic_mile + * createCubicMile + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_cubic_yard + * createCubicYard + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_cup + * createCup + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_cup_metric + * createCupMetric + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_deciliter + * createDeciliter + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_fluid_ounce + * createFluidOunce + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_gallon + * createGallon + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_gallon_imperial + * createGallonImperial + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_hectoliter + * createHectoliter + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_liter + * createLiter + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_megaliter + * createMegaliter + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_milliliter + * createMilliliter + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_pint + * createPint + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_pint_metric + * createPintMetric + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_quart + * createQuart + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_tablespoon + * createTablespoon + * + * + * @ref CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * #i18n_measure_unit_create_teaspoon + * createTeaspoon + * * */ diff --git a/src/include/wearable/utils_i18n_measure_unit.h b/src/include/wearable/utils_i18n_measure_unit.h new file mode 100644 index 0000000..144b87f --- /dev/null +++ b/src/include/wearable/utils_i18n_measure_unit.h @@ -0,0 +1,2013 @@ +/* + * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __UTILS_I18N_MEASURE_UNIT_H__ +#define __UTILS_I18N_MEASURE_UNIT_H__ + +#include + +/** + * @file utils_i18n_measure_unit.h + * @version 0.1 + * @brief utils_i18n_measure_unit + */ + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @ingroup CAPI_BASE_UTILS_I18N_MODULE + * @defgroup CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE MeasureUnit + * @brief The MeasureUnit unit such as length, mass, volume, currency, etc. coupled with a numeric amount to produce a Measure. + * @section CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE_HEADER Required Header + * \#include + * + * @section CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE_OVERVIEW Overview + * @details + */ + +/** + * @addtogroup CAPI_BASE_UTILS_I18N_MEASURE_UNIT_MODULE + * @{ + */ + +/** + * @brief Creates the default measure unit object. + * @remarks The created object should be released by the caller with the + * #i18n_measure_unit_destroy() function. + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create(i18n_measure_unit_h *measure_unit); + +/** + * @brief Creates a polymorphic clone of the given @a clone object. + * @remarks The created object should be released by the caller with the + * #i18n_measure_unit_destroy() function. + * @since_tizen 3.0 + * + * @param[in] measure_unit The measure unit object to be cloned. + * @param[out] clone The clone of the given @a measure_unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_clone(i18n_measure_unit_h measure_unit, i18n_measure_unit_h *clone); + +/** + * @brief Destroys the measure unit object + * @since_tizen 3.0 + * + * @param[in] measure_unit The measure unit object to destroy + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_measure_unit_destroy(i18n_measure_unit_h measure_unit); + +/** + * @brief Destroys the given array of the measure unit objects + * @since_tizen 3.0 + * + * @param[in] array The array of measure unit objects to destroy + * @param[in] array_size The capacity of the @a dest_array + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_measure_unit_array_destroy(i18n_measure_unit_h *array, int32_t array_size); + +/** + * @brief Gets the measure unit object type. + * @remarks The obtained type should not be freed as it is handled by the given measure + * unit object. + * @since_tizen 3.0 + * + * @param[in] measure_unit The measure unit object + * @param[out] type The measure unit object type + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_get_type(i18n_measure_unit_h measure_unit, const char **type); + +/** + * @brief Gets the measure unit object sub type. + * @remarks The obtained subtype should not be freed as it is handled by the given measure + * unit object. + * @since_tizen 3.0 + * + * @param[in] measure_unit The measure unit object + * @param[out] subtype The measure unit object subtype + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_get_subtype(i18n_measure_unit_h measure_unit, const char **subtype); + +/** + * @brief Gets all of the available units. + * @details If there are too many units to fit into @a dest_capacity the returned error code + * is #I18N_ERROR_BUFFER_OVERFLOW. + * @remarks The obtained array of measure unit objects should be released by the caller + * with the #i18n_measure_unit_array_destroy() function. + * @since_tizen 3.0 + * + * @param[in] dest_capacity The capacity of the given @a dest_array + * @param[out] dest_array The destination buffer + * @param[out] available The number of available units + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + * @retval #I18N_ERROR_BUFFER_OVERFLOW Buffer overflow + */ +int i18n_measure_unit_get_available(int32_t dest_capacity, i18n_measure_unit_h **dest_array, int32_t *available); + +/** + * @brief Gets all of the available units for a specific type. + * @details If there are too many units to fit into dest_capacity then the error code + * is set to #I18N_ERROR_BUFFER_OVERFLOW. + * @remarks The obtained array of measure unit objects should be released by the caller + * with the #i18n_measure_unit_array_destroy() function. + * @since_tizen 3.0 + * + * @param[in] dest_capacity The capacity of the given @a dest_array + * @param[in] type The type of the obtained units + * @param[out] dest_array The destination buffer + * @param[out] available The number of available units + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + * @retval #I18N_ERROR_BUFFER_OVERFLOW Buffer overflow + */ +int i18n_measure_unit_get_available_with_type(int32_t dest_capacity, const char *type, i18n_measure_unit_h **dest_array, int32_t *available); + +/** + * @brief Invokes the given callback function for every available measure unit type. + * @since_tizen 3.0 + * + * @param[in] cb The callback function invoked for every available measure unit type + * @param[in] user_data The user data passed to the callback function + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + */ +int i18n_measure_unit_foreach_available_type(i18n_measure_unit_types_cb cb, void *user_data); + +/** + * @brief Gets unit of acceleration: g-force. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_g_force(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of acceleration: meter-per-second-squared. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_meter_per_second_squared(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of angle: arc-minute. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_arc_minute(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of angle: arc-second. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_arc_second(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of angle: degree. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_degree(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of angle: radian. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_radian(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of angle: acre. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_acre(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of angle: hectare. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_hectare(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit area: square-centimeter. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_square_centimeter(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit area: square-foot. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_square_foot(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit area: square-inch. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_square_inch(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit area: square-kilometer. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_square_kilometer(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit area: square-meter. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_square_meter(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit area: square-mile. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_square_mile(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit area: square-yard. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_square_yard(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of consumption: liter-per-kilometer. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_liter_per_kilometer(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of consumption: mile-per-gallon. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_mile_per_gallon(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of digital: bit. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_bit(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of digital: byte. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_byte(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of digital: gigabit. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_gigabit(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of digital: gigabyte. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_gigabyte(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of digital: kilobit. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_kilobit(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of digital: kilobyte. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_kilobyte(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of digital: megabit. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_megabit(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of digital: megabyte. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_megabyte(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of digital: terabit. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_terabit(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of digital: terabyte. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_terabyte(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of duration: day. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_day(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of duration: hour. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_hour(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of duration: microsecond. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_microsecond(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of duration: millisecond. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_millisecond(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of duration: minute. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_minute(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of duration: month. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_month(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of duration: nanosecond. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_nanosecond(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of duration: second. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_second(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of duration: week. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_week(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of duration: year. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_year(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of electric: ampere. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_ampere(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of electric: milliampere. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_milliampere(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of electric: ohm. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_ohm(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of electric: volt. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_volt(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of energy: calorie. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_calorie(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of energy: foodcalorie. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_foodcalorie(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of energy: joule. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_joule(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of energy: kilocalorie. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_kilocalorie(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of energy: kilojoule. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_kilojoule(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of energy: kilowatt-hour. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_kilowatt_hour(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of frequency: gigahertz. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_gigahertz(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of frequency: hertz. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_hertz(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of frequency: kilohertz. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_kilohertz(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of frequency: megahertz. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_megahertz(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: astronomical-unit. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_astronomical_unit(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: centimeter. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_centimeter(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: decimeter. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_decimeter(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: fathom. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_fathom(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: foot. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_foot(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: furlong. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_furlong(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: inch. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_inch(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: kilometer. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_kilometer(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: light-year. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_light_year(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: meter. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_meter(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: micrometer. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_micrometer(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: mile. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_mile(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: millimeter. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_millimeter(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: nanometer. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_nanometer(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: nautical-mile. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_nautical_mile(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: parsec. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_parsec(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: picometer. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_picometer(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: yard. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_yard(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of length: lux. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_lux(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of mass: carat. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_carat(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of mass: gram. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_gram(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of mass: kilogram. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_kilogram(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of mass: metric-ton. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_metric_ton(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of mass: microgram. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_microgram(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of mass: milligram. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_milligram(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of mass: ounce. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_ounce(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of mass: ounce-troy. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_ounce_troy(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of mass: pound. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_pound(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of mass: stone. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_stone(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of mass: ton. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_ton(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of power: gigawatt. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_gigawatt(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of power: horsepower. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_horsepower(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of power: kilowatt. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_kilowatt(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of power: megawatt. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_megawatt(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of power: milliwatt. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_milliwatt(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of power: watt. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_watt(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of pressure: hectopascal. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_hectopascal(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of pressure: inch-hg. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_inch_hg(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of pressure: millibar. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_millibar(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of pressure: millimeter-of-mercury. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_millimeter_of_mercury(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of pressure: pound-per-square-inch. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_pound_per_square_inch(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of proportion: karat. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_karat(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of speed: kilometer-per-hour. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_kilometer_per_hour(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of speed: meter-per-second. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_meter_per_second(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of speed: mile-per-hour. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_mile_per_hour(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of temperature: celsius. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_celsius(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of temperature: fahrenheit. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_fahrenheit(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of temperature: kelvin. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_kelvin(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: acre-foot. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_acre_foot(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: bushel. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_bushel(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: centiliter. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_centiliter(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: cubic-centimeter. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_cubic_centimeter(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: cubic-foot. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_cubic_foot(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: cubic-inch. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_cubic_inch(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: cubic-kilometer. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_cubic_kilometer(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: cubic-meter. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_cubic_meter(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: cubic-mile. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_cubic_mile(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: cubic-yard. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_cubic_yard(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: cup. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_cup(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: deciliter. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_deciliter(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: fluid-ounce. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_fluid_ounce(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: gallon. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_gallon(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: hectoliter. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_hectoliter(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: liter. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_liter(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: megaliter. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_megaliter(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: milliliter. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_milliliter(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: pint. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_pint(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: quart. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_quart(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: tablespoon. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_tablespoon(i18n_measure_unit_h *measure_unit); + +/** + * @brief Gets unit of volume: teaspoon. + * @remarks The returned @a measure_unit should be freed by the caller + * with i18n_measure_unit_destroy(). + * @since_tizen 3.0 + * + * @param[out] measure_unit The created measure unit object + * + * @return @c 0 on success, otherwise a negative error value + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory + */ +int i18n_measure_unit_create_teaspoon(i18n_measure_unit_h *measure_unit); + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* __UTILS_I18N_MEASURE_UNIT_H__*/ diff --git a/src/utils_i18n_measure_unit.cpp b/src/utils_i18n_measure_unit.cpp new file mode 100644 index 0000000..8f98209 --- /dev/null +++ b/src/utils_i18n_measure_unit.cpp @@ -0,0 +1,1478 @@ +/* + * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +#include +#include + +int i18n_measure_unit_create(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + + *measure_unit = new MeasureUnit(); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return I18N_ERROR_NONE; +} + +int i18n_measure_unit_clone(i18n_measure_unit_h measure_unit, i18n_measure_unit_h *clone) +{ + retv_if(measure_unit == NULL || clone == NULL, I18N_ERROR_INVALID_PARAMETER); + + *clone = ((MeasureUnit *) measure_unit)->clone(); + retv_if(*clone == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return I18N_ERROR_NONE; +} + +int i18n_measure_unit_destroy(i18n_measure_unit_h measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + + delete ((MeasureUnit *) measure_unit); + + return I18N_ERROR_NONE; +} + +int i18n_measure_unit_array_destroy(i18n_measure_unit_h *array, int32_t array_size) +{ + retv_if(array == NULL, I18N_ERROR_INVALID_PARAMETER); + + for (int i = 0; i < array_size; ++i) { + i18n_measure_unit_destroy(array[i]); + } + + delete[] array; + + return I18N_ERROR_NONE; +} + +int i18n_measure_unit_get_type(i18n_measure_unit_h measure_unit, const char **type) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(type == NULL, I18N_ERROR_INVALID_PARAMETER); + *type = ((MeasureUnit *) measure_unit)->getType(); + retv_if(*type == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return I18N_ERROR_NONE; +} + +int i18n_measure_unit_get_subtype(i18n_measure_unit_h measure_unit, const char **subtype) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(subtype == NULL, I18N_ERROR_INVALID_PARAMETER); + *subtype = ((MeasureUnit *) measure_unit)->getSubtype(); + retv_if(*subtype == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return I18N_ERROR_NONE; +} + +int i18n_measure_unit_get_available(int32_t dest_capacity, i18n_measure_unit_h **dest_array, int32_t *available) +{ + retv_if(available == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(dest_array == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(dest_capacity < 0, I18N_ERROR_INVALID_PARAMETER); + + MeasureUnit *mu_array = new MeasureUnit[dest_capacity]; + UErrorCode status = U_ZERO_ERROR; + + *available = MeasureUnit::getAvailable(mu_array, dest_capacity, status); + + *dest_array = new i18n_measure_unit_h[dest_capacity]; + for (int i = 0; i < dest_capacity; ++i) { + (*dest_array)[i] = (const i18n_measure_unit_h) mu_array[i].clone(); + } + + delete[] mu_array; + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_get_available_with_type(int32_t dest_capacity, const char *type, i18n_measure_unit_h **dest_array, int32_t *available) +{ + retv_if(available == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(type == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(dest_array == NULL, I18N_ERROR_INVALID_PARAMETER); + retv_if(dest_capacity < 0, I18N_ERROR_INVALID_PARAMETER); + + MeasureUnit *mu_array = new MeasureUnit[dest_capacity]; + UErrorCode status = U_ZERO_ERROR; + + *available = MeasureUnit::getAvailable(type, mu_array, dest_capacity, status); + + *dest_array = new i18n_measure_unit_h[dest_capacity]; + for (int i = 0; i < dest_capacity; ++i) { + (*dest_array)[i] = (const i18n_measure_unit_h) mu_array[i].clone(); + } + + delete[] mu_array; + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_foreach_available_type(i18n_measure_unit_types_cb cb, void *user_data) +{ + retv_if(cb == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + StringEnumeration *available = MeasureUnit::getAvailableTypes(status); + + UErrorCode err = U_ZERO_ERROR; + int32_t count = available->count(err); + for (int i = 0; i < count; i++) { + int32_t resultLength = 0; + if (cb(available->next(&resultLength, err), user_data) == false ) { + break; + } + } + + delete available; + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_g_force(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createGForce(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_meter_per_second_squared(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createMeterPerSecondSquared(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_arc_minute(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createArcMinute(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_arc_second(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createArcSecond(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_degree(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createDegree(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_radian(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createRadian(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_acre(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createAcre(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_hectare(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createHectare(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_square_centimeter(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createSquareCentimeter(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_square_foot(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createSquareFoot(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_square_inch(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createSquareInch(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_square_kilometer(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createSquareKilometer(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_square_meter(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createSquareMeter(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_square_mile(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createSquareMile(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_square_yard(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createSquareYard(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_liter_per_kilometer(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createLiterPerKilometer(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_mile_per_gallon(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createMilePerGallon(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_bit(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createBit(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_byte(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createByte(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_gigabit(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createGigabit(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_gigabyte(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createGigabyte(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_kilobit(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createKilobit(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_kilobyte(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createKilobyte(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_megabit(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createMegabit(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_megabyte(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createMegabyte(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_terabit(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createTerabit(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_terabyte(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createTerabyte(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_day(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createDay(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_hour(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createHour(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_microsecond(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createMicrosecond(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_millisecond(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createMillisecond(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_minute(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createMinute(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_month(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createMonth(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_nanosecond(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createNanosecond(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_second(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createSecond(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_week(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createWeek(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_year(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createYear(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_ampere(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createAmpere(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_milliampere(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createMilliampere(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_ohm(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createOhm(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_volt(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createVolt(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_calorie(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createCalorie(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_foodcalorie(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createFoodcalorie(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_joule(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createJoule(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_kilocalorie(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createKilocalorie(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_kilojoule(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createKilojoule(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_kilowatt_hour(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createKilowattHour(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_gigahertz(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createGigahertz(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_hertz(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createHertz(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_kilohertz(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createKilohertz(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_megahertz(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createMegahertz(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_astronomical_unit(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createAstronomicalUnit(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_centimeter(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createCentimeter(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_decimeter(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createDecimeter(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_fathom(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createFathom(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_foot(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createFoot(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_furlong(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createFurlong(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_inch(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createInch(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_kilometer(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createKilometer(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_light_year(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createLightYear(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_meter(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createMeter(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_micrometer(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createMicrometer(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_mile(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createMile(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_millimeter(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createMillimeter(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_nanometer(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createNanometer(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_nautical_mile(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createNauticalMile(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_parsec(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createParsec(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_picometer(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createPicometer(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_yard(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createYard(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_lux(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createLux(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_carat(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createCarat(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_gram(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createGram(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_kilogram(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createKilogram(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_metric_ton(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createMetricTon(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_microgram(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createMicrogram(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_milligram(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createMilligram(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_ounce(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createOunce(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_ounce_troy(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createOunceTroy(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_pound(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createPound(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_stone(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createStone(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_ton(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createTon(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_gigawatt(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createGigawatt(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_horsepower(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createHorsepower(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_kilowatt(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createKilowatt(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_megawatt(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createMegawatt(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_milliwatt(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createMilliwatt(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_watt(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createWatt(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_hectopascal(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createHectopascal(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_inch_hg(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createInchHg(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_millibar(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createMillibar(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_millimeter_of_mercury(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createMillimeterOfMercury(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_pound_per_square_inch(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createPoundPerSquareInch(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_karat(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createKarat(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_kilometer_per_hour(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createKilometerPerHour(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_meter_per_second(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createMeterPerSecond(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_mile_per_hour(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createMilePerHour(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_celsius(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createCelsius(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_fahrenheit(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createFahrenheit(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_kelvin(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createKelvin(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_acre_foot(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createAcreFoot(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_bushel(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createBushel(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_centiliter(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createCentiliter(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_cubic_centimeter(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createCubicCentimeter(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_cubic_foot(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createCubicFoot(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_cubic_inch(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createCubicInch(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_cubic_kilometer(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createCubicKilometer(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_cubic_meter(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createCubicMeter(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_cubic_mile(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createCubicMile(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_cubic_yard(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createCubicYard(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_cup(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createCup(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_deciliter(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createDeciliter(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_fluid_ounce(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createFluidOunce(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_gallon(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createGallon(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_hectoliter(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createHectoliter(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_liter(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createLiter(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_megaliter(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createMegaliter(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_milliliter(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createMilliliter(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_pint(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createPint(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_quart(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createQuart(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_tablespoon(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createTablespoon(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + +int i18n_measure_unit_create_teaspoon(i18n_measure_unit_h *measure_unit) +{ + retv_if(measure_unit == NULL, I18N_ERROR_INVALID_PARAMETER); + UErrorCode status = U_ZERO_ERROR; + + *measure_unit = MeasureUnit::createTeaspoon(status); + retv_if(*measure_unit == NULL, I18N_ERROR_OUT_OF_MEMORY); + + return _i18n_error_mapping(status); +} + -- 2.7.4