3 * BlueZ - Bluetooth protocol stack for Linux
5 * Copyright (C) 2009-2010 Marcel Holtmann <marcel@holtmann.org>
6 * Copyright (C) 2009-2010 Nokia Corporation
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
30 BT_IO_ERROR_DISCONNECTED,
31 BT_IO_ERROR_CONNECT_FAILED,
33 BT_IO_ERROR_INVALID_ARGS,
36 #define BT_IO_ERROR bt_io_error_quark()
38 GQuark bt_io_error_quark(void);
49 BT_IO_OPT_INVALID = 0,
51 BT_IO_OPT_SOURCE_BDADDR,
53 BT_IO_OPT_DEST_BDADDR,
54 BT_IO_OPT_DEFER_TIMEOUT,
58 BT_IO_OPT_SOURCE_CHANNEL,
59 BT_IO_OPT_DEST_CHANNEL,
88 typedef void (*BtIOConfirm)(GIOChannel *io, gpointer user_data);
90 typedef void (*BtIOConnect)(GIOChannel *io, GError *err, gpointer user_data);
92 gboolean bt_io_accept(GIOChannel *io, BtIOConnect connect, gpointer user_data,
93 GDestroyNotify destroy, GError **err);
95 gboolean bt_io_set(GIOChannel *io, BtIOType type, GError **err,
96 BtIOOption opt1, ...);
98 gboolean bt_io_get(GIOChannel *io, BtIOType type, GError **err,
99 BtIOOption opt1, ...);
101 GIOChannel *bt_io_connect(BtIOType type, BtIOConnect connect,
102 gpointer user_data, GDestroyNotify destroy,
103 GError **err, BtIOOption opt1, ...);
105 GIOChannel *bt_io_listen(BtIOType type, BtIOConnect connect,
106 BtIOConfirm confirm, gpointer user_data,
107 GDestroyNotify destroy, GError **err,
108 BtIOOption opt1, ...);