3
* BlueZ - Bluetooth protocol stack for Linux
5
* Copyright (C) 2009 Marcel Holtmann <marcel@holtmann.org>
6
* Copyright (C) 2009 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);
48
BT_IO_OPT_INVALID = 0,
50
BT_IO_OPT_SOURCE_BDADDR,
52
BT_IO_OPT_DEST_BDADDR,
53
BT_IO_OPT_DEFER_TIMEOUT,
72
typedef void (*BtIOConfirm)(GIOChannel *io, gpointer user_data);
74
typedef void (*BtIOConnect)(GIOChannel *io, GError *err, gpointer user_data);
76
gboolean bt_io_accept(GIOChannel *io, BtIOConnect connect, gpointer user_data,
77
GDestroyNotify destroy, GError **err);
79
gboolean bt_io_set(GIOChannel *io, BtIOType type, GError **err,
80
BtIOOption opt1, ...);
82
gboolean bt_io_get(GIOChannel *io, BtIOType type, GError **err,
83
BtIOOption opt1, ...);
85
GIOChannel *bt_io_connect(BtIOType type, BtIOConnect connect,
86
gpointer user_data, GDestroyNotify destroy,
87
GError **err, BtIOOption opt1, ...);
89
GIOChannel *bt_io_listen(BtIOType type, BtIOConnect connect,
90
BtIOConfirm confirm, gpointer user_data,
91
GDestroyNotify destroy, GError **err,
92
BtIOOption opt1, ...);