2 * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
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 ////////////////////////////////////////////////////////////////////////////////////////////////////
18 /// \brief This file contains declaration of common APIs for NS_UtilityCenter.
20 ////////////////////////////////////////////////////////////////////////////////////////////////////
22 * @file ns_utility_if.h
25 #ifndef NS_NATIVESERVICES_INC_NATIVE_NS_UTILITY_IF_H_ // NOLINT (build/header_guard)
26 #define NS_NATIVESERVICES_INC_NATIVE_NS_UTILITY_IF_H_
28 #include <native_service/frameworkunified_types.h>
30 /** @addtogroup BaseSystem
33 /** @addtogroup native_service
37 /** @addtogroup framework_unified
38 * @ingroup native_service
41 /** @addtogroup native
42 * @ingroup framework_unified
47 * \~english Macro for invalid/undefined return
49 #define NS_INVALID_RETURN -1
52 * \~english Macro for setting the i bit of x to one
54 #define NS_SETBIT(x, i) ((x) |= (1 << (i)))
57 * \~english Macro for setting the i bit of x to zero
59 #define NS_CLEARBIT(x, i) ((x) &= ~(1 << (i)))
62 * \~english Macro for making the exclusive-OR operator on the i bit of x with one
64 #define NS_TOGGLEBIT(x, i) ((x) ^= (1 << (i)))
67 * \~english Macro for checking whether the i bit of x is one or not
69 #define NS_ISBITSET(x, i) (((x) & (1 << (i))) != 0)
71 #endif // NS_NATIVESERVICES_INC_NATIVE_NS_UTILITY_IF_H_ // NOLINT (build/header_guard)
73 /** @}*/ // end of native
74 /** @}*/ // end of framework_unified
75 /** @}*/ // end of native_service
76 /** @}*/ // end of BaseSystem