2 * Copyright (c) 2011 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.
20 #include "bluetooth-api.h"
21 #include "bt-internal-types.h"
23 #include "bt-common.h"
24 #include "bt-request-sender.h"
25 #include "bt-event-handler.h"
27 /* Avoid the build error related to vconf.h's dependency */
28 #ifndef VCONFKEY_BATTERY_MONITOR_STATUS
29 #define VCONFKEY_BATTERY_MONITOR_STATUS "db/bluetooth/bmstatus"
37 } bt_battery_monitor_state_t;
39 static int battery_monitor_state = BT_MONITOR_NONE;
41 static int __bt_fill_device_list(GArray *out_param2, GPtrArray **dev_list)
45 bluetooth_device_info_t *info;
47 BT_CHECK_PARAMETER(out_param2, return);
48 BT_CHECK_PARAMETER(dev_list, return);
50 size = out_param2->len;
53 BT_ERR("No bonded device");
54 return BLUETOOTH_ERROR_NONE;
57 size = (out_param2->len) / sizeof(bluetooth_device_info_t);
59 for (i = 0; i < size; i++) {
60 bluetooth_device_info_t *dev_info = NULL;
62 info = &g_array_index(out_param2,
63 bluetooth_device_info_t, i);
65 dev_info = g_memdup(info, sizeof(bluetooth_device_info_t));
68 g_ptr_array_add(*dev_list, (gpointer)dev_info);
71 return BLUETOOTH_ERROR_NONE;
74 BT_EXPORT_API int bluetooth_check_adapter(void)
76 int value = VCONFKEY_BT_STATUS_OFF;
78 #ifndef TIZEN_TEST_EMUL
81 ret = _bt_get_adapter_path(_bt_get_system_private_conn(), NULL);
83 if (ret != BLUETOOTH_ERROR_NONE)
84 return BLUETOOTH_ADAPTER_DISABLED;
87 /* check VCONFKEY_BT_STATUS */
88 if (vconf_get_int(VCONFKEY_BT_STATUS, &value) != 0) {
89 BT_ERR("fail to get vconf key!");
90 return BLUETOOTH_ADAPTER_DISABLED;
93 return value == VCONFKEY_BT_STATUS_OFF ? BLUETOOTH_ADAPTER_DISABLED :
94 BLUETOOTH_ADAPTER_ENABLED;
97 BT_EXPORT_API int bluetooth_enable_adapter(void)
101 BT_INFO_C("### Enable adapter");
102 _bt_print_api_caller_name();
103 retv_if(bluetooth_check_adapter() == BLUETOOTH_ADAPTER_ENABLED,
104 BLUETOOTH_ERROR_DEVICE_ALREADY_ENABLED);
106 #ifdef TIZEN_FEATURE_BT_DPM
107 retv_if(bluetooth_dpm_is_mode_allowed() == BLUETOOTH_ERROR_PERMISSION_DEINED,
108 BLUETOOTH_ERROR_PERMISSION_DEINED);
112 BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
114 result = _bt_send_request(BT_BLUEZ_SERVICE, BT_ENABLE_ADAPTER,
115 in_param1, in_param2, in_param3, in_param4, &out_param);
117 BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
122 BT_EXPORT_API int bluetooth_set_battery_monitor_state(bool state)
124 if (vconf_set_bool(VCONFKEY_BATTERY_MONITOR_STATUS, state) != 0)
126 BT_ERR("vconf_set_bool failed");
127 return BLUETOOTH_ERROR_INTERNAL;
130 battery_monitor_state = (state == false) ? BT_MONITOR_OFF : BT_MONITOR_ON;
132 return BLUETOOTH_ERROR_NONE;
135 static void __bt_battery_monitor_status_changed_cb(keynode_t *node, void *data)
137 gboolean status = FALSE;
140 type = vconf_keynode_get_type(node);
141 if (type == VCONF_TYPE_BOOL) {
142 status = vconf_keynode_get_bool(node);
144 BT_DBG("Update the monitor state to %d", status);
146 battery_monitor_state = (status == FALSE) ? BT_MONITOR_OFF : BT_MONITOR_ON;
148 BT_ERR("Invaild vconf key type : %d", type);
153 void _bt_reset_battery_monitor_info(void)
155 vconf_ignore_key_changed(VCONFKEY_BATTERY_MONITOR_STATUS,
156 (vconf_callback_fn)__bt_battery_monitor_status_changed_cb);
158 _bt_rfcomm_server_reset_timer();
159 _bt_rfcomm_client_reset_timer();
161 battery_monitor_state = BT_MONITOR_NONE;
164 BT_EXPORT_API int bluetooth_get_battery_monitor_state()
168 if (battery_monitor_state != BT_MONITOR_NONE)
169 return battery_monitor_state;
171 if (vconf_get_bool(VCONFKEY_BATTERY_MONITOR_STATUS, &state) != 0)
172 BT_ERR("vconf_get_bool failed");
174 battery_monitor_state = state;
176 if (vconf_notify_key_changed(VCONFKEY_BATTERY_MONITOR_STATUS,
177 (vconf_callback_fn)__bt_battery_monitor_status_changed_cb, NULL) < 0)
178 BT_ERR("Unable to register key handler");
183 BT_EXPORT_API int bluetooth_read_battery_data(bt_battery_data *data)
186 bt_battery_dbus_data_t *info = NULL;
188 BT_CHECK_PARAMETER(data, return);
190 BT_INFO("### Requesting battery data");
191 retv_if(bluetooth_check_adapter() != BLUETOOTH_ADAPTER_ENABLED,
192 BLUETOOTH_ADAPTER_DISABLED);
194 retv_if(bluetooth_get_battery_monitor_state() == FALSE,
195 BLUETOOTH_ERROR_NOT_SUPPORT);
197 #ifdef TIZEN_FEATURE_BT_DPM
198 retv_if(bluetooth_dpm_is_mode_allowed() == BLUETOOTH_ERROR_PERMISSION_DEINED,
199 BLUETOOTH_ERROR_PERMISSION_DEINED);
203 BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
205 result = _bt_send_request(BT_BLUEZ_SERVICE, BT_BATTERY_READ_DATA,
206 in_param1, in_param2, in_param3, in_param4, &out_param);
208 if (result != BLUETOOTH_ERROR_NONE) {
209 BT_ERR("Error encountered");
210 BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
214 info = &g_array_index(out_param, bt_battery_dbus_data_t, 0);
216 data->session_start_time = info->session_start_time;
217 data->session_end_time = info->session_end_time;
218 data->session_scan_time = info->session_scan_time;
219 data->session_connected_time = info->session_connected_time;
220 data->atm_list = NULL;
222 BT_DBG("Received battery data in bt-api: %ld %ld %d %d.",
223 data->session_start_time, data->session_end_time,
224 data->session_scan_time, data->session_connected_time);
226 /*Copying app wise details*/
227 int n = NUM_APP_MAX < info->num_app ? NUM_APP_MAX : info->num_app; //Maximum NUM_APP_MAX details will be fetched
229 for (int i = 0; i < n; i++) {
230 bt_battery_app_data *app_data = NULL;
231 app_data = g_malloc0(sizeof(bt_battery_app_data));
232 memcpy(app_data, &(info->app_data[i]), sizeof(bt_battery_app_data));
233 data->atm_list = g_slist_append(data->atm_list, app_data);
236 if (data->atm_list == NULL) {
237 BT_DBG("No app data transaction in this session");
238 BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
242 BT_DBG("App-wise data transaction details:");
243 for (GSList *l = data->atm_list; l != NULL; l = g_slist_next(l)) {
244 bt_battery_app_data *t = (bt_battery_app_data *)(l->data);
245 BT_DBG("%ld %ld %d %d %u", (long int)(t->uid), (long int)(t->pid), t->rx_bytes, t->tx_bytes, t->time);
248 BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
253 BT_EXPORT_API int bluetooth_disable_adapter(void)
257 BT_INFO_C("### Disable adapter");
258 _bt_print_api_caller_name();
259 BT_CHECK_ENABLED(return);
262 BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
264 result = _bt_send_request(BT_BLUEZ_SERVICE, BT_DISABLE_ADAPTER,
265 in_param1, in_param2, in_param3, in_param4, &out_param);
267 BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
272 BT_EXPORT_API int bluetooth_recover_adapter(void)
276 BT_INFO_C("### Recover adapter");
277 BT_CHECK_ENABLED(return);
280 BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
282 result = _bt_send_request(BT_BLUEZ_SERVICE, BT_RECOVER_ADAPTER,
283 in_param1, in_param2, in_param3, in_param4, &out_param);
285 BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
290 BT_EXPORT_API int bluetooth_reset_adapter(void)
296 BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
298 result = _bt_send_request(BT_BLUEZ_SERVICE, BT_RESET_ADAPTER,
299 in_param1, in_param2, in_param3, in_param4, &out_param);
301 BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
306 BT_EXPORT_API int bluetooth_get_local_address(bluetooth_device_address_t *local_address)
310 BT_CHECK_PARAMETER(local_address, return);
311 BT_CHECK_ENABLED_ANY(return);
314 BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
316 result = _bt_send_request(BT_BLUEZ_SERVICE, BT_GET_LOCAL_ADDRESS,
317 in_param1, in_param2, in_param3, in_param4, &out_param);
319 if (result == BLUETOOTH_ERROR_NONE) {
320 *local_address = g_array_index(out_param,
321 bluetooth_device_address_t, 0);
324 BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
329 BT_EXPORT_API int bluetooth_get_local_version(bluetooth_version_t *local_version)
333 BT_CHECK_PARAMETER(local_version, return);
334 BT_CHECK_ENABLED_ANY(return);
337 BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
339 result = _bt_send_request(BT_BLUEZ_SERVICE, BT_GET_LOCAL_VERSION,
340 in_param1, in_param2, in_param3, in_param4, &out_param);
342 if (result == BLUETOOTH_ERROR_NONE)
343 *local_version = g_array_index(out_param, bluetooth_version_t, 0);
345 BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
350 BT_EXPORT_API int bluetooth_get_local_name(bluetooth_device_name_t *local_name)
354 BT_CHECK_PARAMETER(local_name, return);
355 BT_CHECK_ENABLED_ANY(return);
358 BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
360 result = _bt_send_request(BT_BLUEZ_SERVICE, BT_GET_LOCAL_NAME,
361 in_param1, in_param2, in_param3, in_param4, &out_param);
363 if (result == BLUETOOTH_ERROR_NONE) {
364 *local_name = g_array_index(out_param,
365 bluetooth_device_name_t, 0);
368 BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
373 BT_EXPORT_API int bluetooth_set_local_name(const bluetooth_device_name_t *local_name)
377 BT_CHECK_PARAMETER(local_name, return);
378 BT_CHECK_ENABLED_ANY(return);
381 BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
383 g_array_append_vals(in_param1, local_name, sizeof(bluetooth_device_name_t));
385 result = _bt_send_request(BT_BLUEZ_SERVICE, BT_SET_LOCAL_NAME,
386 in_param1, in_param2, in_param3, in_param4, &out_param);
388 BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
393 BT_EXPORT_API int bluetooth_is_service_used(const char *service_uuid,
397 char uuid[BLUETOOTH_UUID_STRING_MAX];
399 BT_CHECK_PARAMETER(service_uuid, return);
400 BT_CHECK_PARAMETER(used, return);
401 BT_CHECK_ENABLED(return);
404 BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
406 g_strlcpy(uuid, service_uuid, sizeof(uuid));
407 g_array_append_vals(in_param1, uuid, BLUETOOTH_UUID_STRING_MAX);
409 result = _bt_send_request(BT_BLUEZ_SERVICE, BT_IS_SERVICE_USED,
410 in_param1, in_param2, in_param3, in_param4, &out_param);
412 if (result == BLUETOOTH_ERROR_NONE)
413 *used = g_array_index(out_param, gboolean, 0);
415 BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
420 BT_EXPORT_API int bluetooth_get_discoverable_mode(bluetooth_discoverable_mode_t *
421 discoverable_mode_ptr)
425 BT_CHECK_PARAMETER(discoverable_mode_ptr, return);
427 if (!TIZEN_PROFILE_WEARABLE) {
429 /* Requirement in OSP */
430 if (bluetooth_check_adapter() == BLUETOOTH_ADAPTER_DISABLED) {
431 if (vconf_get_int(BT_FILE_VISIBLE_TIME, &timeout) != 0) {
432 BT_ERR("Fail to get the timeout value");
433 return BLUETOOTH_ERROR_DEVICE_NOT_ENABLED;
437 *discoverable_mode_ptr = BLUETOOTH_DISCOVERABLE_MODE_GENERAL_DISCOVERABLE;
439 *discoverable_mode_ptr = BLUETOOTH_DISCOVERABLE_MODE_CONNECTABLE;
441 return BLUETOOTH_ERROR_NONE;
444 BT_CHECK_ENABLED(return);
448 BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
450 result = _bt_send_request(BT_BLUEZ_SERVICE, BT_GET_DISCOVERABLE_MODE,
451 in_param1, in_param2, in_param3, in_param4, &out_param);
453 if (result == BLUETOOTH_ERROR_NONE)
454 *discoverable_mode_ptr = g_array_index(out_param, int, 0);
456 BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
461 BT_EXPORT_API int bluetooth_set_discoverable_mode(bluetooth_discoverable_mode_t discoverable_mode,
466 BT_CHECK_ENABLED(return);
469 BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
471 g_array_append_vals(in_param1, &discoverable_mode, sizeof(int));
472 g_array_append_vals(in_param2, &timeout, sizeof(int));
474 result = _bt_send_request(BT_BLUEZ_SERVICE, BT_SET_DISCOVERABLE_MODE,
475 in_param1, in_param2, in_param3, in_param4, &out_param);
477 BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
482 BT_EXPORT_API int bluetooth_get_timeout_value(int *timeout)
486 BT_CHECK_PARAMETER(timeout, return);
487 BT_CHECK_ENABLED(return);
490 BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
492 result = _bt_send_request(BT_BLUEZ_SERVICE, BT_GET_DISCOVERABLE_TIME,
493 in_param1, in_param2, in_param3, in_param4, &out_param);
495 if (result == BLUETOOTH_ERROR_NONE)
496 *timeout = g_array_index(out_param, int, 0);
498 BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
503 BT_EXPORT_API int bluetooth_start_discovery(unsigned short max_response,
504 unsigned short discovery_duration,
505 unsigned int classOfDeviceMask)
509 BT_CHECK_ENABLED(return);
512 BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
514 g_array_append_vals(in_param1, &max_response, sizeof(unsigned short));
515 g_array_append_vals(in_param2, &discovery_duration, sizeof(unsigned short));
516 g_array_append_vals(in_param3, &classOfDeviceMask, sizeof(unsigned int));
518 result = _bt_send_request(BT_BLUEZ_SERVICE, BT_START_DISCOVERY,
519 in_param1, in_param2, in_param3, in_param4, &out_param);
521 BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
526 BT_EXPORT_API int bluetooth_start_custom_discovery(bt_discovery_role_type_t role,
527 unsigned short max_response,
528 unsigned short discovery_duration,
529 unsigned int classOfDeviceMask)
533 if (role == DISCOVERY_ROLE_LE)
534 BT_CHECK_ENABLED_LE(return);
536 BT_CHECK_ENABLED(return);
539 BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
541 g_array_append_vals(in_param1, &role, sizeof(bt_discovery_role_type_t));
542 result = _bt_send_request(BT_BLUEZ_SERVICE, BT_START_CUSTOM_DISCOVERY,
543 in_param1, in_param2, in_param3, in_param4, &out_param);
545 BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
550 BT_EXPORT_API int bluetooth_cancel_discovery(void)
554 BT_CHECK_ENABLED(return);
557 BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
559 result = _bt_send_request(BT_BLUEZ_SERVICE, BT_CANCEL_DISCOVERY,
560 in_param1, in_param2, in_param3, in_param4, &out_param);
563 BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
568 BT_EXPORT_API int bluetooth_is_discovering(void)
571 int is_discovering = FALSE;
573 BT_CHECK_ENABLED(return);
576 BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
578 result = _bt_send_request(BT_BLUEZ_SERVICE, BT_IS_DISCOVERYING,
579 in_param1, in_param2, in_param3, in_param4, &out_param);
581 if (result == BLUETOOTH_ERROR_NONE) {
582 is_discovering = g_array_index(out_param,
585 BT_ERR("Fail to send request");
586 is_discovering = result;
589 BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
591 return is_discovering;
594 BT_EXPORT_API int bluetooth_is_connectable(gboolean *is_connectable)
598 BT_CHECK_ENABLED_ANY(return);
601 BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
603 result = _bt_send_request(BT_BLUEZ_SERVICE, BT_GET_CONNECTABLE,
604 in_param1, in_param2, in_param3, in_param4, &out_param);
606 if (result == BLUETOOTH_ERROR_NONE)
607 *is_connectable = g_array_index(out_param, int, 0);
609 BT_ERR("Fail to send request");
611 BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
616 BT_EXPORT_API int bluetooth_set_connectable(gboolean is_connectable)
620 BT_CHECK_ENABLED_ANY(return);
623 BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
625 g_array_append_vals(in_param1, &is_connectable, sizeof(gboolean));
627 result = _bt_send_request(BT_BLUEZ_SERVICE, BT_SET_CONNECTABLE,
628 in_param1, in_param2, in_param3, in_param4, &out_param);
630 BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
635 BT_EXPORT_API int bluetooth_get_bonded_device_list(GPtrArray **dev_list)
639 BT_CHECK_PARAMETER(dev_list, return);
640 BT_CHECK_ENABLED(return);
643 BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
645 result = _bt_send_request(BT_BLUEZ_SERVICE, BT_GET_BONDED_DEVICES,
646 in_param1, in_param2, in_param3, in_param4, &out_param);
648 if (result == BLUETOOTH_ERROR_NONE)
649 result = __bt_fill_device_list(out_param, dev_list);
651 BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
656 BT_EXPORT_API int bluetooth_get_profile_connected_device_list(
657 const char *profile_uuid, GPtrArray **addr_list)
659 char uuid[BLUETOOTH_UUID_STRING_MAX];
664 BT_CHECK_PARAMETER(profile_uuid, return);
665 BT_CHECK_PARAMETER(addr_list, return);
666 BT_CHECK_ENABLED(return);
669 BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
671 g_strlcpy(uuid, profile_uuid, sizeof(uuid));
672 g_array_append_vals(in_param1, uuid, BLUETOOTH_UUID_STRING_MAX);
674 result = _bt_send_request(BT_BLUEZ_SERVICE, BT_GET_PROFILE_CONNECTED_DEVICES,
675 in_param1, in_param2, in_param3, in_param4, &out_param);
677 if (result == BLUETOOTH_ERROR_NONE) {
678 if (out_param == NULL) {
679 BT_ERR("out_param is NULL");
680 result = BLUETOOTH_ERROR_INTERNAL;
682 size = (out_param->len) / sizeof(bluetooth_device_address_t);
685 BT_ERR("No connected device");
686 result = BLUETOOTH_ERROR_NOT_CONNECTED;
689 for (i = 0; i < size; i++) {
690 bluetooth_device_address_t *addr = NULL;
691 bluetooth_device_address_t *ptr = NULL;
693 ptr = &g_array_index(out_param,
694 bluetooth_device_address_t, i);
696 addr = g_memdup(ptr, sizeof(bluetooth_device_address_t));
699 g_ptr_array_add(*addr_list, (gpointer)addr);
704 BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
709 BT_EXPORT_API int bluetooth_set_manufacturer_data(const bluetooth_manufacturer_data_t *value)
713 BT_CHECK_PARAMETER(value, return);
714 BT_CHECK_ENABLED_ANY(return);
716 if (value->data_len > BLUETOOTH_MANUFACTURER_DATA_LENGTH_MAX)
717 return BLUETOOTH_ERROR_INVALID_PARAM;
720 BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
722 g_array_append_vals(in_param1, value, sizeof(bluetooth_manufacturer_data_t));
724 result = _bt_send_request(BT_BLUEZ_SERVICE, BT_SET_MANUFACTURER_DATA,
725 in_param1, in_param2, in_param3, in_param4, &out_param);
727 BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
732 BT_EXPORT_API int bluetooth_set_passkey_notification(gboolean enable)
736 BT_CHECK_ENABLED_ANY(return);
739 BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
741 g_array_append_vals(in_param1, &enable, sizeof(gboolean));
743 result = _bt_send_request(BT_BLUEZ_SERVICE, BT_SET_PASSKEY_NOTIFICATION,
744 in_param1, in_param2, in_param3, in_param4, &out_param);
746 BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);