X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=bt-api%2Fbt-adapter.c;h=77290843755610aa382d4ccc689a9155364d34dc;hb=b493a680894d58efc1879d90be656c6fcdda9c50;hp=02ac8a3105da34be94b901791bec9157f268e2be;hpb=94976d690606f1d5f3460c38245a18f97b4c5095;p=platform%2Fcore%2Fconnectivity%2Fbluetooth-frwk.git diff --git a/bt-api/bt-adapter.c b/bt-api/bt-adapter.c index 02ac8a3..7729084 100644 --- a/bt-api/bt-adapter.c +++ b/bt-api/bt-adapter.c @@ -89,7 +89,7 @@ BT_EXPORT_API int bluetooth_enable_adapter(void) BLUETOOTH_ERROR_DEVICE_ALREADY_ENABLED); #ifdef TIZEN_FEATURE_BT_DPM - retv_if(bluetooth_dpm_is_mode_allowed() == BLUETOOTH_DPM_RESULT_ACCESS_DENIED, + retv_if(bluetooth_dpm_is_mode_allowed() == BLUETOOTH_ERROR_PERMISSION_DEINED, BLUETOOTH_ERROR_PERMISSION_DEINED); #endif @@ -277,25 +277,25 @@ BT_EXPORT_API int bluetooth_get_discoverable_mode(bluetooth_discoverable_mode_t BT_CHECK_PARAMETER(discoverable_mode_ptr, return); -#ifndef TIZEN_PROFILE_WEARABLE - int timeout = 0; - /* Requirement in OSP */ - if (bluetooth_check_adapter() == BLUETOOTH_ADAPTER_DISABLED) { - if (vconf_get_int(BT_FILE_VISIBLE_TIME, &timeout) != 0) { - BT_ERR("Fail to get the timeout value"); - return BLUETOOTH_ERROR_DEVICE_NOT_ENABLED; - } + if (!TIZEN_PROFILE_WEARABLE) { + int timeout = 0; + /* Requirement in OSP */ + if (bluetooth_check_adapter() == BLUETOOTH_ADAPTER_DISABLED) { + if (vconf_get_int(BT_FILE_VISIBLE_TIME, &timeout) != 0) { + BT_ERR("Fail to get the timeout value"); + return BLUETOOTH_ERROR_DEVICE_NOT_ENABLED; + } - if (timeout == -1) - *discoverable_mode_ptr = BLUETOOTH_DISCOVERABLE_MODE_GENERAL_DISCOVERABLE; - else - *discoverable_mode_ptr = BLUETOOTH_DISCOVERABLE_MODE_CONNECTABLE; + if (timeout == -1) + *discoverable_mode_ptr = BLUETOOTH_DISCOVERABLE_MODE_GENERAL_DISCOVERABLE; + else + *discoverable_mode_ptr = BLUETOOTH_DISCOVERABLE_MODE_CONNECTABLE; - return BLUETOOTH_ERROR_NONE; + return BLUETOOTH_ERROR_NONE; + } + } else { + BT_CHECK_ENABLED(return); } -#else - BT_CHECK_ENABLED(return); -#endif BT_INIT_PARAMS(); BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param); @@ -364,6 +364,10 @@ BT_EXPORT_API int bluetooth_start_discovery(unsigned short max_response, BT_INIT_PARAMS(); BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param); + g_array_append_vals(in_param1, &max_response, sizeof(unsigned short)); + g_array_append_vals(in_param2, &discovery_duration, sizeof(unsigned short)); + g_array_append_vals(in_param3, &classOfDeviceMask, sizeof(unsigned int)); + result = _bt_send_request(BT_BLUEZ_SERVICE, BT_START_DISCOVERY, in_param1, in_param2, in_param3, in_param4, &out_param);