g_variant_get(parameters, "(i&s&s&s&sn)", &result, &address,
&uuid, &name, &path, &socket_fd);
+#ifdef RFCOMM_DIRECT
if (_check_uuid_path(path, uuid) == FALSE)
return;
+#else
+ /* TODO: need to check UUID */
+#endif
memset(&req_ind, 0x00, sizeof(bluetooth_rfcomm_connection_request_t));
_bt_convert_addr_string_to_type(req_ind.device_addr.addr,
BT_DBG("-");
}
-#endif
-
int new_connection(const char *path, int fd, bluetooth_device_address_t *addr)
{
rfcomm_cb_data_t *info;
if (err)
g_clear_error(&err);
}
+#endif
BT_EXPORT_API int bluetooth_rfcomm_connect(
const bluetooth_device_address_t *remote_bt_address,
BT_EXPORT_API int bluetooth_rfcomm_client_is_connected(const bluetooth_device_address_t *device_address, gboolean *connected)
{
+#ifdef RFCOMM_DIRECT
GSList *l;
GSList *conn_list = NULL;
rfcomm_cb_data_t *client_info;
}
return BLUETOOTH_ERROR_NONE;
+#else
+ return BLUETOOTH_ERROR_NOT_SUPPORT;
+#endif
}
BT_EXPORT_API gboolean bluetooth_rfcomm_is_client_connected(void)
return result;
#endif
}
-
BT_EXPORT_API int bluetooth_rfcomm_server_is_connected(const bluetooth_device_address_t *device_address, gboolean *connected)
{
+#ifdef RFCOMM_DIRECT
GSList *l;
rfcomm_info_t *info;
char connected_addr[BT_ADDRESS_STRING_SIZE] = { 0 };
}
return BLUETOOTH_ERROR_NONE;
+#else
+ return BLUETOOTH_ERROR_NOT_SUPPORT;
+#endif
}
BT_EXPORT_API int bluetooth_rfcomm_listen_and_accept(int socket_fd, int max_pending_connection)
export LDFLAGS="$CFLAGS -pie"
%endif
+%if %{bt_hal} == ENABLED
+export CFLAGS="$CFLAGS -URFCOMM_DIRECT"
+%else
export CFLAGS="$CFLAGS -DRFCOMM_DIRECT"
+%endif
export LDFLAGS="$CFLAGS -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs"
%if "%{?_with_emulator}" == "1"