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.
18 #ifndef __BLUETOOTH_PLUGIN_H
19 #define __BLUETOOTH_PLUGIN_H
26 #define LOG_TAG "BLUETOOTH_FRWK_PLUGIN"
28 #define LOG_COLOR_RESET "\033[0m"
29 #define LOG_COLOR_RED "\033[31m"
30 #define LOG_COLOR_YELLOW "\033[33m"
31 #define LOG_COLOR_GREEN "\033[32m"
32 #define LOG_COLOR_BLUE "\033[36m"
33 #define LOG_COLOR_PURPLE "\033[35m"
35 #define BT_DBG(fmt, args...) \
36 ((SLOGD(fmt, ##args)))
37 #define BT_INFO(fmt, args...) \
38 ((SLOGI(fmt, ##args)))
39 #define BT_ERR(fmt, args...) \
40 ((SLOGE(fmt, ##args)))
42 #define BT_INFO_C(fmt, arg...) \
43 SLOGI_IF(TRUE, LOG_COLOR_GREEN" "fmt" "LOG_COLOR_RESET, ##arg)
44 #define BT_ERR_C(fmt, arg...) \
45 SLOGI_IF(TRUE, LOG_COLOR_RED" "fmt" "LOG_COLOR_RESET, ##arg)
47 #define ret_if(expr) \
50 BT_ERR("(%s) return", #expr); \
55 #define retv_if(expr, val) \
58 BT_ERR("(%s) return", #expr); \
64 BT_AGENT_EVENT_PIN_REQUEST,
65 BT_AGENT_EVENT_PASSKEY_CONFIRM_REQUEST,
66 BT_AGENT_EVENT_PASSKEY_AUTO_ACCEPTED,
67 BT_AGENT_EVENT_PASSKEY_REQUEST,
68 BT_AGENT_EVENT_PASSKEY_DISPLAY_REQUEST,
69 BT_AGENT_EVENT_AUTHORIZE_REQUEST,
70 BT_AGENT_EVENT_CONFIRM_MODE_REQUEST,
71 BT_AGENT_EVENT_APP_CONFIRM_REQUEST,
72 BT_AGENT_EVENT_FILE_RECEIVED,
73 BT_AGENT_EVENT_KEYBOARD_PASSKEY_REQUEST,
74 BT_AGENT_EVENT_SECURITY,
75 BT_AGENT_EVENT_TERMINATE,
76 BT_AGENT_EVENT_EXCHANGE_REQUEST,
77 BT_AGENT_EVENT_PBAP_REQUEST,
78 BT_AGENT_EVENT_MAP_REQUEST,
79 BT_AGENT_EVENT_SYSTEM_RESET_REQUEST,
80 BT_AGENT_EVENT_LEGACY_PAIR_FAILED_FROM_REMOTE,
81 } bt_agent_event_type_t;
83 struct bluetooth_headed_plugin_t {
84 int (*bt_launch_dpmpopup)(char *mode);
85 int (*bt_launch_system_popup)(bt_agent_event_type_t event_type,
86 const char *device_name,
87 const char *remote_address,
88 const unsigned char *auth_info,
91 const char *agent_path);
93 void (*bt_destroy_popup_all)(void);
94 bool (*bt_launch_unable_to_pairing_syspopup)(int result);
95 bool (*bt_is_tethering_enabled)(void);
96 int (*bt_get_mime_type)(char *file_name, char **mime_type);
99 #ifdef TIZEN_FEATURE_BT_DPM
100 #define BT_DPM_SYSPOPUP "dpm-syspopup"
105 #endif /* __BLUETOOTH_PLUGIN_H */