2 * Copyright (c) 2020 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.
18 #ifndef __UWB_PRIVATE_H__
19 #define __UWB_PRIVATE_H__
25 #include <system_info.h>
27 #define UWB_FEATURE "http://tizen.org/feature/network.uwb"
29 #define CHECK_ALREADY_INITIALIZED() \
30 if (uwb_ctx.manager_proxy != NULL) { \
31 _WARN("Alread initialized"); \
32 return UWB_ERROR_ALREADY_INITIALIZED; \
35 #define CHECK_NOT_INITIALIZED() \
36 if (uwb_ctx.manager_proxy == NULL) { \
37 _WARN("Not initialized"); \
38 return UWB_ERROR_NOT_INITIALIZED; \
41 #define CHECK_INPUT_PARAMETER(arg) \
43 _WARN("INVALID_PARAMETER"); \
44 return UWB_ERROR_INVALID_PARAMETER; \
48 #define CHECK_FEATURE_SUPPORTED(feature_name) \
50 bool uwb_supported = FALSE; \
51 if (!system_info_get_platform_bool(feature_name, &uwb_supported)) { \
52 if (uwb_supported == FALSE) { \
53 _WARN("UWB Manager feature is disabled"); \
54 return UWB_ERROR_NOT_SUPPORTED; \
57 _ERR("Error - Feature getting from System Info"); \
58 return UWB_ERROR_NOT_SUPPORTED; \
62 #define CHECK_FEATURE_SUPPORTED(feature_name) \
64 _WARN("[Feature] Should be check !"); \
80 GSList *remote_node_list;
81 int remote_node_count;
84 #endif /* __UWB_PRIVATE_H__ */