2006-11-12 07:14:14 +08:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* BlueZ - Bluetooth protocol stack for Linux
|
|
|
|
*
|
2010-01-02 09:08:17 +08:00
|
|
|
* Copyright (C) 2004-2010 Marcel Holtmann <marcel@holtmann.org>
|
2006-11-12 07:14:14 +08:00
|
|
|
*
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*
|
|
|
|
*/
|
2007-05-29 11:58:10 +08:00
|
|
|
|
2008-09-10 02:01:31 +08:00
|
|
|
#define HSP_HS_UUID "00001108-0000-1000-8000-00805F9B34FB"
|
|
|
|
#define HID_UUID "00001124-0000-1000-8000-00805f9b34fb"
|
|
|
|
|
2007-05-29 11:58:10 +08:00
|
|
|
#define L2CAP_PSM_HIDP_CTRL 0x11
|
|
|
|
#define L2CAP_PSM_HIDP_INTR 0x13
|
2006-11-12 07:14:14 +08:00
|
|
|
|
2008-07-26 03:26:40 +08:00
|
|
|
struct input_device;
|
|
|
|
struct input_conn;
|
2008-03-15 02:44:00 +08:00
|
|
|
|
|
|
|
struct fake_input {
|
|
|
|
int flags;
|
|
|
|
GIOChannel *io;
|
|
|
|
int uinput; /* uinput socket */
|
|
|
|
int rfcomm; /* RFCOMM socket */
|
|
|
|
uint8_t ch; /* RFCOMM channel number */
|
2009-02-19 06:17:50 +08:00
|
|
|
gboolean (*connect) (struct input_conn *iconn, GError **err);
|
2008-07-26 03:26:40 +08:00
|
|
|
int (*disconnect) (struct input_conn *iconn);
|
2008-03-15 02:44:00 +08:00
|
|
|
void *priv;
|
2010-09-03 00:09:37 +08:00
|
|
|
const struct input_device *idev;
|
2008-03-15 02:44:00 +08:00
|
|
|
};
|
|
|
|
|
2009-04-23 02:41:56 +08:00
|
|
|
int fake_input_register(DBusConnection *conn, struct btd_device *device,
|
|
|
|
const char *path, bdaddr_t *src, bdaddr_t *dst,
|
|
|
|
const char *uuid, uint8_t channel);
|
|
|
|
int input_device_register(DBusConnection *conn, struct btd_device *device,
|
|
|
|
const char *path, const bdaddr_t *src,
|
|
|
|
const bdaddr_t *dst, const char *uuid,
|
|
|
|
uint32_t handle, int timeout);
|
2008-07-26 03:26:40 +08:00
|
|
|
int input_device_unregister(const char *path, const char *uuid);
|
2007-04-12 17:59:15 +08:00
|
|
|
|
2009-02-23 16:34:16 +08:00
|
|
|
int input_device_set_channel(const bdaddr_t *src, const bdaddr_t *dst, int psm,
|
|
|
|
GIOChannel *io);
|
2008-05-16 06:49:02 +08:00
|
|
|
int input_device_close_channels(const bdaddr_t *src, const bdaddr_t *dst);
|