static int hid_device_probe(struct btd_device *device, GSList *uuids)
{
	struct btd_adapter *adapter = device_get_adapter(device);
	const gchar *path = device_get_path(device);
	const sdp_record_t *rec = btd_device_get_record(device, uuids->data);
	bdaddr_t src, dst;

	DBG("path %s", path);

#ifndef BT_ALT_STACK
	if (!rec)
		return -1;
#endif

	adapter_get_address(adapter, &src);
	device_get_address(device, &dst);

#ifdef BT_ALT_STACK
	return input_device_register(connection, device, path, &src, &dst,
				HID_UUID, 0 /* rec->handle */, idle_timeout * 60);
#else
	return input_device_register(connection, device, path, &src, &dst,
				HID_UUID, rec->handle, idle_timeout * 60);
#endif
}
Exemple #2
0
static int hid_device_probe(struct btd_device *device, GSList *uuids)
{
	struct btd_adapter *adapter = device_get_adapter(device);
	const gchar *path = device_get_path(device);
	const sdp_record_t *rec = btd_device_get_record(device, uuids->data);
	bdaddr_t src, dst;
	sdp_data_t *pdlist;

	DBG("path %s", path);

	if (!rec)
		return -1;

	adapter_get_address(adapter, &src);
	device_get_address(device, &dst);
	if (rec)
		pdlist = sdp_data_get(rec, SDP_ATTR_HID_SDP_DISABLE);

	if (pdlist && pdlist->val.uint8) {
		DBG("cancel discovery is issued");
		bt_cancel_discovery(&src, &dst);
	}

	return input_device_register(connection, device, path, &src, &dst,
				HID_UUID, rec->handle, idle_timeout * 60);
}
Exemple #3
0
static int hid_device_probe(struct btd_profile *p, struct btd_device *device,
								GSList *uuids)
{
	const char *path = device_get_path(device);
	const sdp_record_t *rec = btd_device_get_record(device, uuids->data);

	DBG("path %s", path);

	if (!rec)
		return -1;

	return input_device_register(device, path, HID_UUID, rec,
							idle_timeout * 60);
}
Exemple #4
0
static int hid_device_probe(struct btd_device *device, GSList *uuids)
{
    struct btd_adapter *adapter = device_get_adapter(device);
    const gchar *path = device_get_path(device);
    const sdp_record_t *rec = btd_device_get_record(device, uuids->data);
    bdaddr_t src, dst;

    DBG("path %s", path);

    if (!rec)
        return -1;

    adapter_get_address(adapter, &src);
    device_get_address(device, &dst, NULL);

    return input_device_register(connection, device, path, &src, &dst,
                                 HID_UUID, rec, idle_timeout * 60);
}