From: RafaƂ Szczekutek Date: Thu, 9 Jun 2016 12:27:32 +0000 (+0200) Subject: [Base-utils] common header file updated X-Git-Tag: accepted/tizen/common/20160629.222931^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=82f7863f6333346c30d5a84533806d69ae48c3ce;p=platform%2Fcore%2Fapi%2Fbase-utils.git [Base-utils] common header file updated Change-Id: If9c225459d12b4548ea08f5782d306f7062ff41e Signed-off-by: Beata Stefaniuk --- 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