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
25 #define LOG_TAG "BLUETOOTH_FRWK_PLUGIN"
27 #define LOG_COLOR_RESET "\033[0m"
28 #define LOG_COLOR_RED "\033[31m"
29 #define LOG_COLOR_YELLOW "\033[33m"
30 #define LOG_COLOR_GREEN "\033[32m"
31 #define LOG_COLOR_BLUE "\033[36m"
32 #define LOG_COLOR_PURPLE "\033[35m"
34 #define BT_DBG(fmt, args...) \
35 ((SLOGD(fmt, ##args)))
36 #define BT_INFO(fmt, args...) \
37 ((SLOGI(fmt, ##args)))
38 #define BT_ERR(fmt, args...) \
39 ((SLOGE(fmt, ##args)))
41 #define BT_INFO_C(fmt, arg...) \
42 SLOGI_IF(TRUE, LOG_COLOR_GREEN" "fmt" "LOG_COLOR_RESET, ##arg)
43 #define BT_ERR_C(fmt, arg...) \
44 SLOGI_IF(TRUE, LOG_COLOR_RED" "fmt" "LOG_COLOR_RESET, ##arg)
46 #define ret_if(expr) \
49 BT_ERR("(%s) return", #expr); \
54 #define retv_if(expr, val) \
57 BT_ERR("(%s) return", #expr); \
63 BT_AGENT_EVENT_PIN_REQUEST,
64 BT_AGENT_EVENT_PASSKEY_CONFIRM_REQUEST,
65 BT_AGENT_EVENT_PASSKEY_AUTO_ACCEPTED,
66 BT_AGENT_EVENT_PASSKEY_REQUEST,
67 BT_AGENT_EVENT_PASSKEY_DISPLAY_REQUEST,
68 BT_AGENT_EVENT_AUTHORIZE_REQUEST,
69 BT_AGENT_EVENT_CONFIRM_MODE_REQUEST,
70 BT_AGENT_EVENT_APP_CONFIRM_REQUEST,
71 BT_AGENT_EVENT_FILE_RECEIVED,
72 BT_AGENT_EVENT_KEYBOARD_PASSKEY_REQUEST,
73 BT_AGENT_EVENT_SECURITY,
74 BT_AGENT_EVENT_TERMINATE,
75 BT_AGENT_EVENT_EXCHANGE_REQUEST,
76 BT_AGENT_EVENT_PBAP_REQUEST,
77 BT_AGENT_EVENT_MAP_REQUEST,
78 BT_AGENT_EVENT_SYSTEM_RESET_REQUEST,
79 BT_AGENT_EVENT_LEGACY_PAIR_FAILED_FROM_REMOTE,
80 } bt_agent_event_type_t;
82 struct bluetooth_headed_plugin_t {
83 int (*bt_launch_dpmpopup) (char *mode);
84 int (*bt_launch_system_popup)(bt_agent_event_type_t event_type,
85 const char *device_name,
86 const unsigned char *auth_info,
89 const char *agent_path);
91 void (*bt_destroy_popup_all)(void);
92 gboolean (*bt_launch_unable_to_pairing_syspopup)(int result);
95 #ifdef TIZEN_FEATURE_BT_DPM
96 #define BT_DPM_SYSPOPUP "dpm-syspopup"
101 #endif /* __BLUETOOTH_PLUGIN_H */