return TRUE;
}
+#ifndef TIZEN_FEATURE_BT_GATT_CLIENT_FD_DISABLE
static bt_gatt_characteristic_notify_info_t * bluetooth_gatt_client_get_characteristic_notify_info(unsigned char *handle , int id)
{
GSList *l;
}
return NULL;
}
+#endif
static bt_gatt_characteristic_notify_info_t * bluetooth_gatt_client_create_watch_io(int fd, int id, int mtu, char * address, unsigned char *uuid)
{
BT_CHECK_PARAMETER(service_handle, return);
BT_CHECK_PARAMETER(char_handle, return);
+#ifndef TIZEN_FEATURE_BT_GATT_CLIENT_FD_DISABLE
chr_info = bluetooth_gatt_client_get_characteristic_notify_info(char_handle->uuid , char_handle->instance_id);
if (chr_info && !is_notify) {
BT_INFO("Already CCCD enabled. fd %d", chr_info->notify_fd);
close(chr_info->notify_fd);
return result;
}
+#endif
/* ASync Function, result expected in callback from bt-service */
g_array_append_vals(in_param3, &is_notify, sizeof(gboolean));
g_array_append_vals(in_param4, &is_indicate, sizeof(gboolean));
+#ifdef TIZEN_FEATURE_BT_GATT_CLIENT_FD_DISABLE
+ result = _bt_send_request(BT_BLUEZ_SERVICE,
+ BT_GATT_WATCH_CHARACTERISTIC,
+ in_param1, in_param2, in_param3, in_param4, &out_param);
+
+ BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
+
+ BT_INFO("Result [%d]", result);
+ return result;
+#endif
GUnixFDList *out_fd_list = NULL;
g_array_append_vals(in_param2, data, sizeof(bluetooth_gatt_att_data_t));
g_array_append_vals(in_param3, &write_type, sizeof(bluetooth_gatt_write_type_e));
+#ifdef TIZEN_FEATURE_BT_GATT_CLIENT_FD_DISABLE
+ goto done;
+#endif
+
if (write_type == BLUETOOTH_GATT_TYPE_WRITE_NO_RESPONSE) {
int fd = -1;
int mtu = 0;
Requires: bluetooth-tools
%define bt_bluez_hal ENABLED
+%define bt_gatt_client_fd DISABLED
BuildRequires: pkgconfig(aul)
BuildRequires: pkgconfig(dlog)
%endif
export LDFLAGS="$CFLAGS -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs"
+%if %{bt_gatt_client_fd} == DISABLED
+export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_GATT_CLIENT_FD_DISABLE"
+%endif
+
%ifarch %{ix86} x86_64
export CFLAGS+=" -DTIZEN_TEST_EMUL"
export CXXFLAGS+=" -DTIZEN_TEST_EMUL"