2 * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __UTILS_I18N_PRIVATE_H__
18 #define __UTILS_I18N_PRIVATE_H__
22 #include <utils_i18n_types.h>
23 #include <unicode/utypes.h>
26 * @file utils_i18n_private.h
28 * @brief utils_i18n_private
38 #define LOG_TAG "BASE_UTILS"
40 #define ERR(fmt, arg...) SLOGE("%s:%d " fmt, __FUNCTION__, __LINE__, ##arg)
42 #define ret_if(expr) do { \
48 #define retv_if(expr, val) do { \
54 #define retm_if(expr, fmt, arg...) do { \
60 #define retvm_if(expr, val, fmt, arg...) do { \
67 #define retex_if(expr, val, fmt, arg...) do { \
75 #define ERR_MAPPING_REVERSE(BASE_UTILS_ERROR, ICU_ERROR) ICU_ERROR = \
76 (UErrorCode)_i18n_error_mapping_reverse((int)BASE_UTILS_ERROR)
78 #define ERR_MAPPING(ICU_ERROR, BASE_UTILS_ERROR) BASE_UTILS_ERROR = \
79 (i18n_error_code_e)_i18n_error_mapping((int)ICU_ERROR)
81 int _i18n_error_mapping ( int err );
82 int _i18n_error_mapping_reverse ( int err );
88 #endif /* __UTILS_I18N_PRIVATE_H__*/