From: ByungWoo Lee Date: Wed, 15 Jul 2015 08:28:27 +0000 (+0900) Subject: Fix bug of i18n_udatepg_get_date_time_format() and remove unnecessary get_last_result() X-Git-Tag: submit/tizen/20150715.082953^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F13%2F43913%2F1;p=platform%2Fcore%2Fapi%2Fbase-utils.git Fix bug of i18n_udatepg_get_date_time_format() and remove unnecessary get_last_result() Change-Id: Ibdfdf788d91d19d51331f5b2895f3d92a1b6813a --- diff --git a/packaging/capi-base-utils.spec b/packaging/capi-base-utils.spec index c2978cf..b8f5be7 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.0.1 +Version: 1.0.2 Release: 1 Group: Base License: Apache-2.0 and ICU diff --git a/src/include/mobile/utils_i18n_timezone.h b/src/include/mobile/utils_i18n_timezone.h index 32aa638..a33865b 100755 --- a/src/include/mobile/utils_i18n_timezone.h +++ b/src/include/mobile/utils_i18n_timezone.h @@ -234,9 +234,12 @@ 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. * @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); diff --git a/src/include/mobile/utils_i18n_types.h b/src/include/mobile/utils_i18n_types.h index beee7fb..1ed1863 100644 --- a/src/include/mobile/utils_i18n_types.h +++ b/src/include/mobile/utils_i18n_types.h @@ -1516,7 +1516,6 @@ typedef void* i18n_unumber_format_h; /** * @brief Definition of context length. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * @internal This is internal API */ #define I18N_U_PARSE_CONTEXT_LEN 16 @@ -1525,10 +1524,10 @@ typedef void* i18n_unumber_format_h; * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef struct { - int32_t line; - int32_t offset; - i18n_uchar preContext[I18N_U_PARSE_CONTEXT_LEN]; - i18n_uchar postContext[I18N_U_PARSE_CONTEXT_LEN]; + int32_t line; /**< The line on which the error occured. */ + int32_t offset; /**< The character offset to the error */ + i18n_uchar preContext[I18N_U_PARSE_CONTEXT_LEN]; /**< Textual context before the error */ + i18n_uchar postContext[I18N_U_PARSE_CONTEXT_LEN]; /**< The error itself and/or textual context after the error */ } i18n_uparse_error_s; /** diff --git a/src/include/mobile/utils_i18n_ubrk.h b/src/include/mobile/utils_i18n_ubrk.h index bdda0b4..e755473 100755 --- a/src/include/mobile/utils_i18n_ubrk.h +++ b/src/include/mobile/utils_i18n_ubrk.h @@ -239,9 +239,13 @@ 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. + * @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] index The index of the desired locale. * @return A locale for which number text breaking information is available, or @c 0 if none. + * @exception #I18N_ERROR_NONE Successful + * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ubrk_count_available() */ const char *i18n_ubrk_get_available (int32_t index); @@ -250,8 +254,11 @@ 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(). + * @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 * @return The number of locales for which text breaking information is available. + * @exception #I18N_ERROR_NONE Successful * @see i18n_ubrk_get_available() */ int32_t i18n_ubrk_count_available (void); diff --git a/src/include/mobile/utils_i18n_ucalendar.h b/src/include/mobile/utils_i18n_ucalendar.h index 21ef6b0..2c6ab1d 100644 --- a/src/include/mobile/utils_i18n_ucalendar.h +++ b/src/include/mobile/utils_i18n_ucalendar.h @@ -471,14 +471,16 @@ int i18n_ucalendar_country_timezones_create (const char *country, i18n_uenumerat * @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. + * @remarks The specific error code can be obtained using the get_last_result() + * 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 * * @return The @c result string length, not including the terminating @c NULL. - * @remarks The specific error code can be obtained using the get_last_result() - * method. Error codes are described in #i18n_error_code_e description. + * @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); @@ -499,6 +501,9 @@ int i18n_ucalendar_set_timezone ( i18n_ucalendar_h calendar, const i18n_uchar *z /** * @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. * @since_tizen 2.3.1 * * @param[in] calendar The #i18n_ucalendar_h to query. @@ -506,9 +511,6 @@ int i18n_ucalendar_set_timezone ( i18n_ucalendar_h calendar, const i18n_uchar *z * @param[in] result_length The maximum size of the @c result. * * @return The total buffer size needed; if greater than @c result_length, the output was truncated. - * @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. * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ @@ -560,13 +562,13 @@ int i18n_ucalendar_get_gregorian_change (const i18n_ucalendar_h calendar, i18n_u * @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. + * @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. * * @return A locale for which calendars are available, or 0 if none. - * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid parameter * @see i18n_ucalendar_count_available() @@ -576,11 +578,11 @@ 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. * @since_tizen 2.3.1 * * @return The number of locales for which calendars are available. - * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. * @exception #I18N_ERROR_NONE Successful * @see i18n_ucalendar_get_available() */ @@ -647,6 +649,8 @@ 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. * @since_tizen 2.3.1 * * @param[in] calendar The #i18n_ucalendar_h to query. @@ -658,9 +662,8 @@ int i18n_ucalendar_roll (i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e * #I18N_UCALENDAR_SECOND, #I18N_UCALENDAR_MILLISECOND, #I18N_UCALENDAR_ZONE_OFFSET, * #I18N_UCALENDAR_DST_OFFSET. * @return @c true if field is set, @c false otherwise. - * @remarks The specific error code can be obtained using the get_last_result() - * method. Error codes are described in Exceptions section. * @exception #I18N_ERROR_NONE Successful + * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ucalendar_get() * @see i18n_ucalendar_set() * @see i18n_ucalendar_clear_field() @@ -715,6 +718,9 @@ int i18n_ucalendar_clear (i18n_ucalendar_h calendar); /** * @brief Determines a limit for a field in a #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. * @since_tizen 2.3.1 * * @param[in] calendar The #i18n_ucalendar_h to query. @@ -726,9 +732,6 @@ int i18n_ucalendar_clear (i18n_ucalendar_h calendar); * @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 - * @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. * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @@ -739,15 +742,15 @@ int32_t i18n_ucalendar_get_limit (const i18n_ucalendar_h calendar, i18n_ucalenda /** * @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. * @since_tizen 2.3.1 * * @param[in] calendar The calendar object * @param[in] type Type of the locale we're looking for (valid or actual) * * @return The requested 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. * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ @@ -755,16 +758,20 @@ const char *i18n_ucalendar_get_locale_by_type (const i18n_ucalendar_h calendar, /** * @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. * @since_tizen 2.3.1 * * @return The version string, such as "2007f". - * @remarks The specific error code can be obtained using the get_last_result() - * method. Error codes are described in #i18n_error_code_e description. + * @exception #I18N_ERROR_NONE Successful */ 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. * @since_tizen 2.3.1 * * @param[in] id The input timezone ID to be canonicalized. @@ -774,9 +781,6 @@ const char *i18n_ucalendar_get_tz_data_version (void); * @param[out] is_system_id Receives if the given @c id is a known system timezone ID. * * @return The result string length, not including the terminating NULL. - * @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. * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ @@ -784,14 +788,14 @@ int32_t i18n_ucalendar_get_canonical_timezone_id (const i18n_uchar *id, int32_t /** * @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. * @since_tizen 2.3.1 * * @param[in] calendar The #i18n_ucalendar_h to query. * * @return The resource keyword value string. - * @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. * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ @@ -849,15 +853,15 @@ int i18n_ucalendar_get_day_of_week_type (const i18n_ucalendar_h calendar, i18n_u * 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. * @since_tizen 2.3.1 * * @param[in] calendar The #i18n_ucalendar_h to query. * @param[in] day_of_week The day of the week whose type is desired (#I18N_UCALENDAR_SUNDAY..#I18N_UCALENDAR_SATURDAY). * * @return The milliseconds after midnight at which the weekend begins or ends. - * @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. * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ @@ -865,15 +869,15 @@ int32_t i18n_ucalendar_get_weekend_transition (const i18n_ucalendar_h calendar, /** * @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. * @since_tizen 2.3.1 * * @param[in] calendar The #i18n_ucalendar_h to query. * @param[in] date The #i18n_udate in question. * * @return @c true if the given #i18n_udate is in the weekend in this calendar system, @c false otherwise. - * @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. * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ @@ -884,6 +888,9 @@ i18n_ubool i18n_ucalendar_is_weekend (i18n_ucalendar_h calendar, i18n_udate date * 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. + * @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 * * @param[in] calendar The #i18n_ucalendar_h to query. @@ -892,9 +899,6 @@ i18n_ubool i18n_ucalendar_is_weekend (i18n_ucalendar_h calendar, i18n_udate date * 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. - * @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. * @exception #I18N_ERROR_NONE Successful * @exception #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 3db5542..0ea5702 100644 --- a/src/include/mobile/utils_i18n_udate.h +++ b/src/include/mobile/utils_i18n_udate.h @@ -421,7 +421,9 @@ int i18n_udate_set_number_format ( i18n_udate_format_h format, const i18n_unumbe * @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 + * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @see i18n_udate_count_available() */ const char *i18n_udate_get_available ( int32_t locale_index ); @@ -488,6 +490,7 @@ int i18n_udate_set_2digit_year_start ( i18n_udate_format_h format, i18n_udate da * * @return The total buffer size needed; if greater than result_length, the output was truncated. * + * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * * @see i18n_udate_apply_pattern() @@ -536,6 +539,7 @@ int i18n_udate_apply_pattern ( i18n_udate_format_h format, i18n_ubool localized, * * @return The total buffer size needed; if greater than result_length, the output was truncated. * + * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * * @see i18n_udate_count_symbols() diff --git a/src/include/mobile/utils_i18n_udatepg.h b/src/include/mobile/utils_i18n_udatepg.h index 42c3745..174690b 100755 --- a/src/include/mobile/utils_i18n_udatepg.h +++ b/src/include/mobile/utils_i18n_udatepg.h @@ -220,8 +220,6 @@ int i18n_udatepg_get_best_pattern ( i18n_udatepg_h dtpg, const i18n_uchar *skele /** * @brief Creates an empty generator, to be constructed with i18n_udatepg_add_pattern() etc. - * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[out] dtpg A pointer to the #i18n_udatepg_h handle. @@ -234,8 +232,6 @@ int i18n_udatepg_create_empty (i18n_udatepg_h *dtpg); /** * @brief Creates a copy of a generator. - * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[in] dtpg An #i18n_udatepg_h handle to be copied. Must not be @c NULL. @@ -369,8 +365,6 @@ int32_t i18n_udatepg_add_pattern ( i18n_udatepg_h dtpg, const i18n_uchar *patte * 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. - * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[in] dtpg An #i18n_udatepg_h handle. Must not be @c NULL. @@ -410,8 +404,6 @@ const i18n_uchar *i18n_udatepg_get_append_item_format ( const i18n_udatepg_h dtp * @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. - * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[in] dtpg An #i18n_udatepg_h handle. Must not be @c NULL. @@ -458,8 +450,6 @@ const i18n_uchar *i18n_udatepg_get_append_item_name ( const i18n_udatepg_h dtpg, * 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". - * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[in] dtpg An #i18n_udate_format_h handle. Must not be @c NULL. @@ -499,8 +489,6 @@ const i18n_uchar *i18n_udatepg_get_date_time_format ( const i18n_udatepg_h dtpg, * 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" - * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[in] dtpg The #i18n_udate_format_h handle. Must not be @c NULL. @@ -599,8 +587,6 @@ int32_t i18n_udatepg_replace_field_types_with_options ( i18n_udatepg_h dtpg, con /** * @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. - * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[in] dtpg An #i18n_udate_format_h handle. Must not be @c NULL. @@ -614,8 +600,6 @@ int i18n_udatepg_skeletons_create ( const i18n_udatepg_h dtpg, i18n_uenumeration /** * @brief Creates an #i18n_uenumeration_h for list of all the base skeletons in canonical form. - * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[in] dtpg An #i18n_udate_format_h handle. Must not be @c NULL. diff --git a/src/include/mobile/utils_i18n_ulocale.h b/src/include/mobile/utils_i18n_ulocale.h index f753af1..51d6e89 100644 --- a/src/include/mobile/utils_i18n_ulocale.h +++ b/src/include/mobile/utils_i18n_ulocale.h @@ -194,19 +194,26 @@ int i18n_ulocale_get_display_name ( const char *locale_id, const char *in_locale * 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. * @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 * * @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 ); /** * @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. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @return The size of the locale list + * @exception #I18N_ERROR_NONE Success */ int32_t i18n_ulocale_count_available ( void ); @@ -269,6 +276,8 @@ int32_t i18n_ulocale_get_variant ( const char *locale_id, char *variant, int32_t * * @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. + * @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 ); @@ -289,6 +298,8 @@ int32_t i18n_ulocale_get_name ( const char *locale_id, char *name, int32_t name_ * * @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. + * @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 ); @@ -575,6 +586,8 @@ int32_t i18n_ulocale_get_parent ( const char *locale_id, char *parent, int32_t p * * @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. + * @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 ); @@ -719,6 +732,8 @@ int32_t i18n_ulocale_get_locale_for_lcid ( uint32_t host_id, char *locale, int32 * @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. + * @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 ); @@ -750,6 +765,8 @@ int32_t i18n_ulocale_add_likely_subtags ( const char *locale_id, char *maximized * @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. + * @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 ); diff --git a/src/include/mobile/utils_i18n_unumber.h b/src/include/mobile/utils_i18n_unumber.h index 8e2b47b..d4f7f56 100644 --- a/src/include/mobile/utils_i18n_unumber.h +++ b/src/include/mobile/utils_i18n_unumber.h @@ -197,6 +197,7 @@ int32_t i18n_unumber_format (const i18n_unumber_format_h fmt, int32_t number, i1 * * @return The total buffer size needed; if greater than @a result_length, the output was truncated. * + * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @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 @@ -224,6 +225,7 @@ int32_t i18n_unumber_format_int64 (const i18n_unumber_format_h fmt, int64_t numb * * @return The total buffer size needed; if greater than @a result_length, the output was truncated. * + * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @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 @@ -254,6 +256,7 @@ int32_t i18n_unumber_format_double (const i18n_unumber_format_h fmt, double numb * * @return The total buffer size needed; if greater than @a result_length, the output was truncated. * + * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @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 @@ -283,6 +286,7 @@ int32_t i18n_unumber_format_decimal (const i18n_unumber_format_h fmt, const char * * @return The total buffer size needed; if greater than @a result_length, the output was truncated. * + * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @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 @@ -304,6 +308,7 @@ int32_t i18n_unumber_format_double_currency (const i18n_unumber_format_h fmt, do * * @return The value of the parsed integer * + * @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); @@ -323,6 +328,7 @@ int32_t i18n_unumber_parse (const i18n_unumber_format_h fmt, const i18n_uchar *t * * @return The value of the parsed integer * + * @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); @@ -342,6 +348,7 @@ int64_t i18n_unumber_parse_int64 (const i18n_unumber_format_h fmt, const i18n_uc * * @return The value of the parsed double * + * @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); @@ -367,6 +374,7 @@ double i18n_unumber_parse_double (const i18n_unumber_format_h fmt, const i18n_uc * * @return The length of the output string, not including any terminating NULL. * + * @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); @@ -390,6 +398,7 @@ int32_t i18n_unumber_parse_decimal (const i18n_unumber_format_h fmt, const i18n_ * * @return The parsed double * + * @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); @@ -541,6 +550,7 @@ int i18n_unumber_set_double_attribute (i18n_unumber_format_h fmt, i18n_unumber_f * * @return The total buffer size needed; if greater than @a result_length, the output was truncated. * + * @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); @@ -580,6 +590,7 @@ int i18n_unumber_set_text_attribute (const i18n_unumber_format_h fmt, i18n_unumb * * @return The total buffer size needed; if greater than @a result_length, the output was truncated. * + * @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); @@ -614,6 +625,7 @@ int i18n_unumber_set_symbol (i18n_unumber_format_h fmt, i18n_unumber_format_symb * * @return The locale name * + * @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); diff --git a/src/include/mobile/utils_i18n_usearch.h b/src/include/mobile/utils_i18n_usearch.h index 7eb4a5a..9a7b90c 100755 --- a/src/include/mobile/utils_i18n_usearch.h +++ b/src/include/mobile/utils_i18n_usearch.h @@ -110,9 +110,6 @@ int i18n_usearch_create ( const i18n_uchar *pattern, int32_t pattern_len, const * @details A collator will be created in the process, which will be owned by * this search and will be deleted in i18n_usearch_destroy(). * @remarks Must release @a search_iter using i18n_usearch_destroy(). - * - * The specific error code can be also obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[in] pattern The pattern for matching @@ -128,9 +125,6 @@ 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 - * - * @exception #I18N_ERROR_NONE Successful - * @exception #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); diff --git a/src/include/mobile/utils_i18n_ustring.h b/src/include/mobile/utils_i18n_ustring.h index 91bf3e9..d4bbc94 100644 --- a/src/include/mobile/utils_i18n_ustring.h +++ b/src/include/mobile/utils_i18n_ustring.h @@ -472,8 +472,6 @@ int32_t i18n_ustring_compare_binary_order( const i18n_uchar *s1, int32_t length1 * In code unit order, high BMP code points sort after supplementary code points because they are stored as pairs of surrogates which are at U+d800..U+dfff.\n * 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 also obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s1 First source string. @@ -899,8 +897,6 @@ i18n_uchar32 i18n_ustring_unescape_at ( i18n_ustring_unescape_char_at_cb char_at * @details Casing is locale-dependent and context-sensitive. * The result may be longer or shorter than the original. * The source string and the destination buffer are allowed to overlap. - * @remarks The specific error code can be also obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest A buffer for the result string\n The result will be zero-terminated if @@ -926,8 +922,6 @@ int32_t i18n_ustring_to_upper ( i18n_uchar *dest, int32_t dest_capacity, const i * @details Casing is locale-dependent and context-sensitive. The result may be longer or shorter than the original. The source string and the destination buffer are allowed to overlap. * The result may be longer or shorter than the original. * The source string and the destination buffer are allowed to overlap. - * @remarks The specific error code can be also obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest A buffer for the result string. The result will be zero-terminated if the buffer is large enough. @@ -952,9 +946,7 @@ int32_t i18n_ustring_to_lower ( i18n_uchar *dest, int32_t dest_capacity, const i * Titlecasing uses a break iterator to find the first characters of words * that are to be titlecased. It titlecases those characters and lowercases * all others. - * @remarks The specific error code can be also obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. - * The titlecase break iterator can be provided to customize arbitrary + * @remarks The titlecase break iterator can be provided to customize arbitrary * styles, using rules and dictionaries beyond the standard iterators. * It may be more efficient to always provide an iterator to avoid * opening and closing one for each string. @@ -1022,6 +1014,7 @@ int32_t i18n_ustring_to_title ( i18n_uchar *dest, int32_t dest_capacity, const i * @param[in] locale The locale to consider, or "" for the root locale or @c NULL for the default locale. * @return The length of the result string. It may be greater than dest_capacity. In that case, * 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() */ @@ -1033,8 +1026,6 @@ int32_t i18n_ustring_to_title_new ( i18n_uchar *dest, int32_t dest_capacity, con * but there is an option for whether to include or exclude mappings for dotted I and dotless i.\n * The result may be longer or shorter than the original. * The source string and the destination buffer are allowed to overlap. - * @remarks The specific error code can be also obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest A buffer for the result string\n @@ -1058,8 +1049,6 @@ int32_t i18n_ustring_fold_case ( i18n_uchar *dest, int32_t dest_capacity, const * @brief Convert a UTF-16 string to a wchar_t string. * @details If it is known at compile time that wchar_t strings are in UTF-16 or UTF-32, then this function simply calls the fast, dedicated function for that. * Otherwise, two conversions UTF-16 -> default charset -> wchar_t* are performed. - * @remarks The specific error code can be also obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest A buffer for the result string. The result will be zero-terminated if the buffer is large enough. @@ -1082,8 +1071,6 @@ wchar_t* i18n_ustring_to_WCS ( wchar_t *dest, int32_t dest_capacity, int32_t *de * @brief Convert a wchar_t string to UTF-16. * @details If it is known at compile time that wchar_t strings are in UTF-16 or UTF-32, then this function simply calls the fast, dedicated function for that. * Otherwise, two conversions wchar_t* -> default charset -> UTF-16 are performed. - * @remarks The specific error code can be also obtained using the get_last_result() method. -* Error codes are described in Exceptions section and in #i18n_error_code_e description. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest A buffer for the result string. The result will be zero-terminated if the buffer is large enough. @@ -1105,8 +1092,6 @@ i18n_uchar* i18n_ustring_from_WCS ( i18n_uchar *dest, int32_t dest_capacity, int /** * @brief Converts 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. - * @remarks The specific error code can be also obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest A buffer for the result string.\n @@ -1133,8 +1118,6 @@ char* i18n_ustring_to_UTF8 ( char *dest, int32_t dest_capacity, int32_t *dest_le /** * @brief Converts a UTF-8 string to UTF-16. * @details If the input string is not well-formed, then the #I18N_ERROR_INVALID_CHAR_FOUND error code is set. - * @remarks The specific error code can be also obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest A buffer for the result string.\n @@ -1161,8 +1144,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. - * @remarks The specific error code can be also obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest A buffer for the result string.\n @@ -1196,8 +1177,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. - * @remarks The specific error code can be also obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest A buffer for the result string.\n @@ -1241,8 +1220,6 @@ i18n_uchar* i18n_ustring_from_UTF8_with_sub ( i18n_uchar *dest, int32_t dest_cap * - Non-shortest forms are not detected and will result in "spoofing" output.\n * For further performance improvement, if src_len is given (>=0), then it must be dest_capacity>=src_len.\n * There is no inverse i18n_ustring_to_UTF8_lenient() function because there is practically no performance gain from not checking that a UTF-16 string is well-formed. - * @remarks The specific error code can be also obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest A buffer for the result string.\n @@ -1275,8 +1252,6 @@ i18n_uchar* i18n_ustring_from_UTF8_lenient ( i18n_uchar *dest, int32_t dest_capa /** * @brief Convert a UTF-16 string to UTF-32. * @details If the input string is not well-formed, then the #I18N_ERROR_INVALID_CHAR_FOUND error code is set. - * @remarks The specific error code can be also obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest A buffer for the result string.\n @@ -1303,8 +1278,6 @@ i18n_uchar32* i18n_ustring_to_UTF32 ( i18n_uchar32 *dest, int32_t dest_capacity, /** * @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. - * @remarks The specific error code can be also obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest A buffer for the result string.\n @@ -1332,8 +1305,6 @@ i18n_uchar* i18n_ustring_from_UTF32 ( i18n_uchar *dest, int32_t dest_capacity, i /** * @brief Convert a UTF-16 string to UTF-32. * @details Same as #i18n_ustring_to_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. - * @remarks The specific error code can be also obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest A buffer for the result string.\n @@ -1368,8 +1339,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. - * @remarks The specific error code can be also obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest A buffer for the result string.\n diff --git a/src/include/wearable/utils_i18n_timezone.h b/src/include/wearable/utils_i18n_timezone.h index 391b343..f049329 100755 --- a/src/include/wearable/utils_i18n_timezone.h +++ b/src/include/wearable/utils_i18n_timezone.h @@ -234,9 +234,12 @@ 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. * @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); diff --git a/src/include/wearable/utils_i18n_types.h b/src/include/wearable/utils_i18n_types.h index beee7fb..1ed1863 100644 --- a/src/include/wearable/utils_i18n_types.h +++ b/src/include/wearable/utils_i18n_types.h @@ -1516,7 +1516,6 @@ typedef void* i18n_unumber_format_h; /** * @brief Definition of context length. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * @internal This is internal API */ #define I18N_U_PARSE_CONTEXT_LEN 16 @@ -1525,10 +1524,10 @@ typedef void* i18n_unumber_format_h; * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef struct { - int32_t line; - int32_t offset; - i18n_uchar preContext[I18N_U_PARSE_CONTEXT_LEN]; - i18n_uchar postContext[I18N_U_PARSE_CONTEXT_LEN]; + int32_t line; /**< The line on which the error occured. */ + int32_t offset; /**< The character offset to the error */ + i18n_uchar preContext[I18N_U_PARSE_CONTEXT_LEN]; /**< Textual context before the error */ + i18n_uchar postContext[I18N_U_PARSE_CONTEXT_LEN]; /**< The error itself and/or textual context after the error */ } i18n_uparse_error_s; /** diff --git a/src/include/wearable/utils_i18n_ubrk.h b/src/include/wearable/utils_i18n_ubrk.h index bdda0b4..e755473 100755 --- a/src/include/wearable/utils_i18n_ubrk.h +++ b/src/include/wearable/utils_i18n_ubrk.h @@ -239,9 +239,13 @@ 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. + * @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] index The index of the desired locale. * @return A locale for which number text breaking information is available, or @c 0 if none. + * @exception #I18N_ERROR_NONE Successful + * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ubrk_count_available() */ const char *i18n_ubrk_get_available (int32_t index); @@ -250,8 +254,11 @@ 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(). + * @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 * @return The number of locales for which text breaking information is available. + * @exception #I18N_ERROR_NONE Successful * @see i18n_ubrk_get_available() */ int32_t i18n_ubrk_count_available (void); diff --git a/src/include/wearable/utils_i18n_ucalendar.h b/src/include/wearable/utils_i18n_ucalendar.h index 21ef6b0..2c6ab1d 100644 --- a/src/include/wearable/utils_i18n_ucalendar.h +++ b/src/include/wearable/utils_i18n_ucalendar.h @@ -471,14 +471,16 @@ int i18n_ucalendar_country_timezones_create (const char *country, i18n_uenumerat * @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. + * @remarks The specific error code can be obtained using the get_last_result() + * 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 * * @return The @c result string length, not including the terminating @c NULL. - * @remarks The specific error code can be obtained using the get_last_result() - * method. Error codes are described in #i18n_error_code_e description. + * @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); @@ -499,6 +501,9 @@ int i18n_ucalendar_set_timezone ( i18n_ucalendar_h calendar, const i18n_uchar *z /** * @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. * @since_tizen 2.3.1 * * @param[in] calendar The #i18n_ucalendar_h to query. @@ -506,9 +511,6 @@ int i18n_ucalendar_set_timezone ( i18n_ucalendar_h calendar, const i18n_uchar *z * @param[in] result_length The maximum size of the @c result. * * @return The total buffer size needed; if greater than @c result_length, the output was truncated. - * @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. * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ @@ -560,13 +562,13 @@ int i18n_ucalendar_get_gregorian_change (const i18n_ucalendar_h calendar, i18n_u * @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. + * @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. * * @return A locale for which calendars are available, or 0 if none. - * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid parameter * @see i18n_ucalendar_count_available() @@ -576,11 +578,11 @@ 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. * @since_tizen 2.3.1 * * @return The number of locales for which calendars are available. - * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in Exceptions section. * @exception #I18N_ERROR_NONE Successful * @see i18n_ucalendar_get_available() */ @@ -647,6 +649,8 @@ 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. * @since_tizen 2.3.1 * * @param[in] calendar The #i18n_ucalendar_h to query. @@ -658,9 +662,8 @@ int i18n_ucalendar_roll (i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e * #I18N_UCALENDAR_SECOND, #I18N_UCALENDAR_MILLISECOND, #I18N_UCALENDAR_ZONE_OFFSET, * #I18N_UCALENDAR_DST_OFFSET. * @return @c true if field is set, @c false otherwise. - * @remarks The specific error code can be obtained using the get_last_result() - * method. Error codes are described in Exceptions section. * @exception #I18N_ERROR_NONE Successful + * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @see i18n_ucalendar_get() * @see i18n_ucalendar_set() * @see i18n_ucalendar_clear_field() @@ -715,6 +718,9 @@ int i18n_ucalendar_clear (i18n_ucalendar_h calendar); /** * @brief Determines a limit for a field in a #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. * @since_tizen 2.3.1 * * @param[in] calendar The #i18n_ucalendar_h to query. @@ -726,9 +732,6 @@ int i18n_ucalendar_clear (i18n_ucalendar_h calendar); * @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 - * @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. * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @@ -739,15 +742,15 @@ int32_t i18n_ucalendar_get_limit (const i18n_ucalendar_h calendar, i18n_ucalenda /** * @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. * @since_tizen 2.3.1 * * @param[in] calendar The calendar object * @param[in] type Type of the locale we're looking for (valid or actual) * * @return The requested 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. * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ @@ -755,16 +758,20 @@ const char *i18n_ucalendar_get_locale_by_type (const i18n_ucalendar_h calendar, /** * @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. * @since_tizen 2.3.1 * * @return The version string, such as "2007f". - * @remarks The specific error code can be obtained using the get_last_result() - * method. Error codes are described in #i18n_error_code_e description. + * @exception #I18N_ERROR_NONE Successful */ 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. * @since_tizen 2.3.1 * * @param[in] id The input timezone ID to be canonicalized. @@ -774,9 +781,6 @@ const char *i18n_ucalendar_get_tz_data_version (void); * @param[out] is_system_id Receives if the given @c id is a known system timezone ID. * * @return The result string length, not including the terminating NULL. - * @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. * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ @@ -784,14 +788,14 @@ int32_t i18n_ucalendar_get_canonical_timezone_id (const i18n_uchar *id, int32_t /** * @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. * @since_tizen 2.3.1 * * @param[in] calendar The #i18n_ucalendar_h to query. * * @return The resource keyword value string. - * @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. * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ @@ -849,15 +853,15 @@ int i18n_ucalendar_get_day_of_week_type (const i18n_ucalendar_h calendar, i18n_u * 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. * @since_tizen 2.3.1 * * @param[in] calendar The #i18n_ucalendar_h to query. * @param[in] day_of_week The day of the week whose type is desired (#I18N_UCALENDAR_SUNDAY..#I18N_UCALENDAR_SATURDAY). * * @return The milliseconds after midnight at which the weekend begins or ends. - * @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. * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ @@ -865,15 +869,15 @@ int32_t i18n_ucalendar_get_weekend_transition (const i18n_ucalendar_h calendar, /** * @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. * @since_tizen 2.3.1 * * @param[in] calendar The #i18n_ucalendar_h to query. * @param[in] date The #i18n_udate in question. * * @return @c true if the given #i18n_udate is in the weekend in this calendar system, @c false otherwise. - * @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. * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ @@ -884,6 +888,9 @@ i18n_ubool i18n_ucalendar_is_weekend (i18n_ucalendar_h calendar, i18n_udate date * 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. + * @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 * * @param[in] calendar The #i18n_ucalendar_h to query. @@ -892,9 +899,6 @@ i18n_ubool i18n_ucalendar_is_weekend (i18n_ucalendar_h calendar, i18n_udate date * 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. - * @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. * @exception #I18N_ERROR_NONE Successful * @exception #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 3db5542..0ea5702 100644 --- a/src/include/wearable/utils_i18n_udate.h +++ b/src/include/wearable/utils_i18n_udate.h @@ -421,7 +421,9 @@ int i18n_udate_set_number_format ( i18n_udate_format_h format, const i18n_unumbe * @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 + * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @see i18n_udate_count_available() */ const char *i18n_udate_get_available ( int32_t locale_index ); @@ -488,6 +490,7 @@ int i18n_udate_set_2digit_year_start ( i18n_udate_format_h format, i18n_udate da * * @return The total buffer size needed; if greater than result_length, the output was truncated. * + * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * * @see i18n_udate_apply_pattern() @@ -536,6 +539,7 @@ int i18n_udate_apply_pattern ( i18n_udate_format_h format, i18n_ubool localized, * * @return The total buffer size needed; if greater than result_length, the output was truncated. * + * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * * @see i18n_udate_count_symbols() diff --git a/src/include/wearable/utils_i18n_udatepg.h b/src/include/wearable/utils_i18n_udatepg.h index 42c3745..174690b 100755 --- a/src/include/wearable/utils_i18n_udatepg.h +++ b/src/include/wearable/utils_i18n_udatepg.h @@ -220,8 +220,6 @@ int i18n_udatepg_get_best_pattern ( i18n_udatepg_h dtpg, const i18n_uchar *skele /** * @brief Creates an empty generator, to be constructed with i18n_udatepg_add_pattern() etc. - * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[out] dtpg A pointer to the #i18n_udatepg_h handle. @@ -234,8 +232,6 @@ int i18n_udatepg_create_empty (i18n_udatepg_h *dtpg); /** * @brief Creates a copy of a generator. - * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[in] dtpg An #i18n_udatepg_h handle to be copied. Must not be @c NULL. @@ -369,8 +365,6 @@ int32_t i18n_udatepg_add_pattern ( i18n_udatepg_h dtpg, const i18n_uchar *patte * 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. - * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[in] dtpg An #i18n_udatepg_h handle. Must not be @c NULL. @@ -410,8 +404,6 @@ const i18n_uchar *i18n_udatepg_get_append_item_format ( const i18n_udatepg_h dtp * @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. - * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[in] dtpg An #i18n_udatepg_h handle. Must not be @c NULL. @@ -458,8 +450,6 @@ const i18n_uchar *i18n_udatepg_get_append_item_name ( const i18n_udatepg_h dtpg, * 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". - * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[in] dtpg An #i18n_udate_format_h handle. Must not be @c NULL. @@ -499,8 +489,6 @@ const i18n_uchar *i18n_udatepg_get_date_time_format ( const i18n_udatepg_h dtpg, * 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" - * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[in] dtpg The #i18n_udate_format_h handle. Must not be @c NULL. @@ -599,8 +587,6 @@ int32_t i18n_udatepg_replace_field_types_with_options ( i18n_udatepg_h dtpg, con /** * @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. - * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[in] dtpg An #i18n_udate_format_h handle. Must not be @c NULL. @@ -614,8 +600,6 @@ int i18n_udatepg_skeletons_create ( const i18n_udatepg_h dtpg, i18n_uenumeration /** * @brief Creates an #i18n_uenumeration_h for list of all the base skeletons in canonical form. - * @remarks The specific error code can be obtained using the get_last_result() method. - * Error codes are described in #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[in] dtpg An #i18n_udate_format_h handle. Must not be @c NULL. diff --git a/src/include/wearable/utils_i18n_ulocale.h b/src/include/wearable/utils_i18n_ulocale.h index f753af1..51d6e89 100644 --- a/src/include/wearable/utils_i18n_ulocale.h +++ b/src/include/wearable/utils_i18n_ulocale.h @@ -194,19 +194,26 @@ int i18n_ulocale_get_display_name ( const char *locale_id, const char *in_locale * 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. * @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 * * @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 ); /** * @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. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @return The size of the locale list + * @exception #I18N_ERROR_NONE Success */ int32_t i18n_ulocale_count_available ( void ); @@ -269,6 +276,8 @@ int32_t i18n_ulocale_get_variant ( const char *locale_id, char *variant, int32_t * * @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. + * @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 ); @@ -289,6 +298,8 @@ int32_t i18n_ulocale_get_name ( const char *locale_id, char *name, int32_t name_ * * @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. + * @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 ); @@ -575,6 +586,8 @@ int32_t i18n_ulocale_get_parent ( const char *locale_id, char *parent, int32_t p * * @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. + * @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 ); @@ -719,6 +732,8 @@ int32_t i18n_ulocale_get_locale_for_lcid ( uint32_t host_id, char *locale, int32 * @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. + * @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 ); @@ -750,6 +765,8 @@ int32_t i18n_ulocale_add_likely_subtags ( const char *locale_id, char *maximized * @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. + * @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 ); diff --git a/src/include/wearable/utils_i18n_unumber.h b/src/include/wearable/utils_i18n_unumber.h index 8e2b47b..d4f7f56 100644 --- a/src/include/wearable/utils_i18n_unumber.h +++ b/src/include/wearable/utils_i18n_unumber.h @@ -197,6 +197,7 @@ int32_t i18n_unumber_format (const i18n_unumber_format_h fmt, int32_t number, i1 * * @return The total buffer size needed; if greater than @a result_length, the output was truncated. * + * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @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 @@ -224,6 +225,7 @@ int32_t i18n_unumber_format_int64 (const i18n_unumber_format_h fmt, int64_t numb * * @return The total buffer size needed; if greater than @a result_length, the output was truncated. * + * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @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 @@ -254,6 +256,7 @@ int32_t i18n_unumber_format_double (const i18n_unumber_format_h fmt, double numb * * @return The total buffer size needed; if greater than @a result_length, the output was truncated. * + * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @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 @@ -283,6 +286,7 @@ int32_t i18n_unumber_format_decimal (const i18n_unumber_format_h fmt, const char * * @return The total buffer size needed; if greater than @a result_length, the output was truncated. * + * @exception #I18N_ERROR_NONE Successful * @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @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 @@ -304,6 +308,7 @@ int32_t i18n_unumber_format_double_currency (const i18n_unumber_format_h fmt, do * * @return The value of the parsed integer * + * @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); @@ -323,6 +328,7 @@ int32_t i18n_unumber_parse (const i18n_unumber_format_h fmt, const i18n_uchar *t * * @return The value of the parsed integer * + * @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); @@ -342,6 +348,7 @@ int64_t i18n_unumber_parse_int64 (const i18n_unumber_format_h fmt, const i18n_uc * * @return The value of the parsed double * + * @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); @@ -367,6 +374,7 @@ double i18n_unumber_parse_double (const i18n_unumber_format_h fmt, const i18n_uc * * @return The length of the output string, not including any terminating NULL. * + * @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); @@ -390,6 +398,7 @@ int32_t i18n_unumber_parse_decimal (const i18n_unumber_format_h fmt, const i18n_ * * @return The parsed double * + * @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); @@ -541,6 +550,7 @@ int i18n_unumber_set_double_attribute (i18n_unumber_format_h fmt, i18n_unumber_f * * @return The total buffer size needed; if greater than @a result_length, the output was truncated. * + * @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); @@ -580,6 +590,7 @@ int i18n_unumber_set_text_attribute (const i18n_unumber_format_h fmt, i18n_unumb * * @return The total buffer size needed; if greater than @a result_length, the output was truncated. * + * @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); @@ -614,6 +625,7 @@ int i18n_unumber_set_symbol (i18n_unumber_format_h fmt, i18n_unumber_format_symb * * @return The locale name * + * @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); diff --git a/src/include/wearable/utils_i18n_usearch.h b/src/include/wearable/utils_i18n_usearch.h index d788a87..5d5e807 100755 --- a/src/include/wearable/utils_i18n_usearch.h +++ b/src/include/wearable/utils_i18n_usearch.h @@ -85,9 +85,6 @@ extern "C" { * @details A collator will be created in the process, which will be owned by * this search and will be deleted in i18n_usearch_destroy(). * @remarks Must release @a search_iter using i18n_usearch_destroy(). - * - * The specific error code can be also obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. * @since_tizen 2.3.1 * * @param[in] pattern The pattern for matching @@ -103,9 +100,6 @@ extern "C" { * * @retval #I18N_ERROR_NONE Successful * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter - * - * @exception #I18N_ERROR_NONE Successful - * @exception #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); diff --git a/src/include/wearable/utils_i18n_ustring.h b/src/include/wearable/utils_i18n_ustring.h index 98eefdf..84fbc56 100644 --- a/src/include/wearable/utils_i18n_ustring.h +++ b/src/include/wearable/utils_i18n_ustring.h @@ -472,8 +472,6 @@ int32_t i18n_ustring_compare_binary_order( const i18n_uchar *s1, int32_t length1 * In code unit order, high BMP code points sort after supplementary code points because they are stored as pairs of surrogates which are at U+d800..U+dfff.\n * 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 also obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] s1 First source string. @@ -899,8 +897,6 @@ i18n_uchar32 i18n_ustring_unescape_at ( i18n_ustring_unescape_char_at_cb char_at * @details Casing is locale-dependent and context-sensitive. * The result may be longer or shorter than the original. * The source string and the destination buffer are allowed to overlap. - * @remarks The specific error code can be also obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest A buffer for the result string\n The result will be zero-terminated if @@ -926,8 +922,6 @@ int32_t i18n_ustring_to_upper ( i18n_uchar *dest, int32_t dest_capacity, const i * @details Casing is locale-dependent and context-sensitive. The result may be longer or shorter than the original. The source string and the destination buffer are allowed to overlap. * The result may be longer or shorter than the original. * The source string and the destination buffer are allowed to overlap. - * @remarks The specific error code can be also obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest A buffer for the result string. The result will be zero-terminated if the buffer is large enough. @@ -980,7 +974,9 @@ int32_t i18n_ustring_to_lower ( i18n_uchar *dest, int32_t dest_capacity, const i * @param[in] locale The locale to consider, or "" for the root locale or @c NULL for the default locale. * @return The length of the result string. It may be greater than dest_capacity. In that case, * 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); @@ -990,8 +986,6 @@ int32_t i18n_ustring_to_title_new ( i18n_uchar *dest, int32_t dest_capacity, con * but there is an option for whether to include or exclude mappings for dotted I and dotless i.\n * The result may be longer or shorter than the original. * The source string and the destination buffer are allowed to overlap. - * @remarks The specific error code can be also obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest A buffer for the result string\n @@ -1015,8 +1009,6 @@ int32_t i18n_ustring_fold_case ( i18n_uchar *dest, int32_t dest_capacity, const * @brief Convert a UTF-16 string to a wchar_t string. * @details If it is known at compile time that wchar_t strings are in UTF-16 or UTF-32, then this function simply calls the fast, dedicated function for that. * Otherwise, two conversions UTF-16 -> default charset -> wchar_t* are performed. - * @remarks The specific error code can be also obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest A buffer for the result string. The result will be zero-terminated if the buffer is large enough. @@ -1039,8 +1031,6 @@ wchar_t* i18n_ustring_to_WCS ( wchar_t *dest, int32_t dest_capacity, int32_t *de * @brief Convert a wchar_t string to UTF-16. * @details If it is known at compile time that wchar_t strings are in UTF-16 or UTF-32, then this function simply calls the fast, dedicated function for that. * Otherwise, two conversions wchar_t* -> default charset -> UTF-16 are performed. - * @remarks The specific error code can be also obtained using the get_last_result() method. -* Error codes are described in Exceptions section and in #i18n_error_code_e description. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest A buffer for the result string. The result will be zero-terminated if the buffer is large enough. @@ -1062,8 +1052,6 @@ i18n_uchar* i18n_ustring_from_WCS ( i18n_uchar *dest, int32_t dest_capacity, int /** * @brief Converts 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. - * @remarks The specific error code can be also obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest A buffer for the result string.\n @@ -1090,8 +1078,6 @@ char* i18n_ustring_to_UTF8 ( char *dest, int32_t dest_capacity, int32_t *dest_le /** * @brief Converts a UTF-8 string to UTF-16. * @details If the input string is not well-formed, then the #I18N_ERROR_INVALID_CHAR_FOUND error code is set. - * @remarks The specific error code can be also obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest A buffer for the result string.\n @@ -1118,8 +1104,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. - * @remarks The specific error code can be also obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest A buffer for the result string.\n @@ -1153,8 +1137,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. - * @remarks The specific error code can be also obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest A buffer for the result string.\n @@ -1198,8 +1180,6 @@ i18n_uchar* i18n_ustring_from_UTF8_with_sub ( i18n_uchar *dest, int32_t dest_cap * - Non-shortest forms are not detected and will result in "spoofing" output.\n * For further performance improvement, if src_len is given (>=0), then it must be dest_capacity>=src_len.\n * There is no inverse i18n_ustring_to_UTF8_lenient() function because there is practically no performance gain from not checking that a UTF-16 string is well-formed. - * @remarks The specific error code can be also obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest A buffer for the result string.\n @@ -1232,8 +1212,6 @@ i18n_uchar* i18n_ustring_from_UTF8_lenient ( i18n_uchar *dest, int32_t dest_capa /** * @brief Convert a UTF-16 string to UTF-32. * @details If the input string is not well-formed, then the #I18N_ERROR_INVALID_CHAR_FOUND error code is set. - * @remarks The specific error code can be also obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest A buffer for the result string.\n @@ -1260,8 +1238,6 @@ i18n_uchar32* i18n_ustring_to_UTF32 ( i18n_uchar32 *dest, int32_t dest_capacity, /** * @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. - * @remarks The specific error code can be also obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest A buffer for the result string.\n @@ -1289,8 +1265,6 @@ i18n_uchar* i18n_ustring_from_UTF32 ( i18n_uchar *dest, int32_t dest_capacity, i /** * @brief Convert a UTF-16 string to UTF-32. * @details Same as #i18n_ustring_to_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. - * @remarks The specific error code can be also obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest A buffer for the result string.\n @@ -1325,8 +1299,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. - * @remarks The specific error code can be also obtained using the get_last_result() method. - * Error codes are described in Exceptions section and in #i18n_error_code_e description. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[out] dest A buffer for the result string.\n diff --git a/src/utils_i18n_udatepg.c b/src/utils_i18n_udatepg.c index 2fc1736..87a242e 100755 --- a/src/utils_i18n_udatepg.c +++ b/src/utils_i18n_udatepg.c @@ -230,8 +230,8 @@ const i18n_uchar *i18n_udatepg_get_date_time_format ( const i18n_udatepg_h dtpg, return NULL; } + set_last_result(I18N_ERROR_NONE); return udatpg_getDateTimeFormat((UDateTimePatternGenerator *)dtpg, pattern_length); - return I18N_ERROR_NONE; } int i18n_udatepg_set_decimal ( i18n_udatepg_h dtpg, const i18n_uchar *decimal, int32_t length ) diff --git a/src/utils_i18n_ulocale.c b/src/utils_i18n_ulocale.c index ff1b2e5..d77f8e6 100755 --- a/src/utils_i18n_ulocale.c +++ b/src/utils_i18n_ulocale.c @@ -85,6 +85,7 @@ const char* i18n_ulocale_get_available (int32_t n) int32_t i18n_ulocale_count_available (void) { + set_last_result(I18N_ERROR_NONE); return uloc_countAvailable(); } diff --git a/src/utils_i18n_unumber.c b/src/utils_i18n_unumber.c index cda3dd9..da12061 100755 --- a/src/utils_i18n_unumber.c +++ b/src/utils_i18n_unumber.c @@ -244,7 +244,6 @@ int i18n_unumber_apply_pattern (i18n_unumber_format_h format, i18n_ubool localiz i18n_error_code_e i18n_error; ERR_MAPPING(icu_error, i18n_error); - set_last_result(i18n_error); return i18n_error; } diff --git a/src/utils_i18n_usearch.c b/src/utils_i18n_usearch.c index 766b309..2a2a761 100755 --- a/src/utils_i18n_usearch.c +++ b/src/utils_i18n_usearch.c @@ -74,7 +74,6 @@ int i18n_usearch_create_new ( const i18n_uchar *pattern, int32_t pattern_len, co i18n_error_code_e i18n_error; ERR_MAPPING(icu_error, i18n_error); - set_last_result(i18n_error); return i18n_error; } diff --git a/src/utils_i18n_uset.c b/src/utils_i18n_uset.c index b8e6f89..2f5e45c 100644 --- a/src/utils_i18n_uset.c +++ b/src/utils_i18n_uset.c @@ -83,7 +83,6 @@ int i18n_uset_destroy ( i18n_uset_h set ) int i18n_uset_clone ( const i18n_uset_h set, i18n_uset_h *set_clone ) { - set_last_result(I18N_ERROR_NONE); if (set == NULL || set_clone == NULL) { return I18N_ERROR_INVALID_PARAMETER; } @@ -103,7 +102,6 @@ i18n_ubool i18n_uset_is_frozen ( const i18n_uset_h set ) int i18n_uset_freeze ( i18n_uset_h set ) { - set_last_result(I18N_ERROR_NONE); if (set == NULL) { return I18N_ERROR_INVALID_PARAMETER; } @@ -113,7 +111,6 @@ int i18n_uset_freeze ( i18n_uset_h set ) int i18n_uset_clone_as_thawed ( const i18n_uset_h set, i18n_uset_h *set_copy ) { - set_last_result(I18N_ERROR_NONE); if (set == NULL || set_copy == NULL) { return I18N_ERROR_INVALID_PARAMETER; } @@ -123,7 +120,6 @@ int i18n_uset_clone_as_thawed ( const i18n_uset_h set, i18n_uset_h *set_copy ) int i18n_uset_set ( i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end ) { - set_last_result(I18N_ERROR_NONE); if (set == NULL) { return I18N_ERROR_INVALID_PARAMETER; }