1022b6a3c695ecccc54e20432caff3668bd28d4c5Marcel Holtmann/*
2022b6a3c695ecccc54e20432caff3668bd28d4c5Marcel Holtmann *
3022b6a3c695ecccc54e20432caff3668bd28d4c5Marcel Holtmann *  BlueZ - Bluetooth protocol stack for Linux
4022b6a3c695ecccc54e20432caff3668bd28d4c5Marcel Holtmann *
59184e2eeb7b97371c6b83b747c8984e2340d2b47Marcel Holtmann *  Copyright (C) 2004-2010  Marcel Holtmann <marcel@holtmann.org>
6022b6a3c695ecccc54e20432caff3668bd28d4c5Marcel Holtmann *
7022b6a3c695ecccc54e20432caff3668bd28d4c5Marcel Holtmann *
8022b6a3c695ecccc54e20432caff3668bd28d4c5Marcel Holtmann *  This program is free software; you can redistribute it and/or modify
9022b6a3c695ecccc54e20432caff3668bd28d4c5Marcel Holtmann *  it under the terms of the GNU General Public License as published by
10022b6a3c695ecccc54e20432caff3668bd28d4c5Marcel Holtmann *  the Free Software Foundation; either version 2 of the License, or
11022b6a3c695ecccc54e20432caff3668bd28d4c5Marcel Holtmann *  (at your option) any later version.
12022b6a3c695ecccc54e20432caff3668bd28d4c5Marcel Holtmann *
13022b6a3c695ecccc54e20432caff3668bd28d4c5Marcel Holtmann *  This program is distributed in the hope that it will be useful,
14022b6a3c695ecccc54e20432caff3668bd28d4c5Marcel Holtmann *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15022b6a3c695ecccc54e20432caff3668bd28d4c5Marcel Holtmann *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16022b6a3c695ecccc54e20432caff3668bd28d4c5Marcel Holtmann *  GNU General Public License for more details.
17022b6a3c695ecccc54e20432caff3668bd28d4c5Marcel Holtmann *
18022b6a3c695ecccc54e20432caff3668bd28d4c5Marcel Holtmann *  You should have received a copy of the GNU General Public License
19022b6a3c695ecccc54e20432caff3668bd28d4c5Marcel Holtmann *  along with this program; if not, write to the Free Software
20022b6a3c695ecccc54e20432caff3668bd28d4c5Marcel Holtmann *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
21022b6a3c695ecccc54e20432caff3668bd28d4c5Marcel Holtmann *
22022b6a3c695ecccc54e20432caff3668bd28d4c5Marcel Holtmann */
236eab5e203d793fbeea8a488a315a62ab2e69417eClaudio Takahasi
244d39e4d2ea552e2d4ad36c085700f513e10be7e0Marcel Holtmannint set_nonblocking(int fd);
254d39e4d2ea552e2d4ad36c085700f513e10be7e0Marcel Holtmann
263a2024530dd736ece6f8b59db53bd8f67a755361Luiz Augusto von Dentztypedef void (*bt_callback_t) (sdp_list_t *recs, int err, gpointer user_data);
276eab5e203d793fbeea8a488a315a62ab2e69417eClaudio Takahasitypedef void (*bt_destroy_t) (gpointer user_data);
2889f7e6f27acfa9402a5125264f6b5641409ea079Claudio Takahasitypedef void (*bt_hci_result_t) (uint8_t status, gpointer user_data);
296eab5e203d793fbeea8a488a315a62ab2e69417eClaudio Takahasi
306eab5e203d793fbeea8a488a315a62ab2e69417eClaudio Takahasiint bt_discover_services(const bdaddr_t *src, const bdaddr_t *dst,
316eab5e203d793fbeea8a488a315a62ab2e69417eClaudio Takahasi		bt_callback_t cb, void *user_data, bt_destroy_t destroy);
32ea00a446dbacead62040dd2bd7e663774c205c04Claudio Takahasi
33ec96a4be11db022bd8d2b403beb7ca245c5d1ebcLuiz Augusto von Dentzint bt_search_service(const bdaddr_t *src, const bdaddr_t *dst,
343a2024530dd736ece6f8b59db53bd8f67a755361Luiz Augusto von Dentz			uuid_t *uuid, bt_callback_t cb, void *user_data,
35ec96a4be11db022bd8d2b403beb7ca245c5d1ebcLuiz Augusto von Dentz			bt_destroy_t destroy);
36289e29c6c4a073569c7e7aa3c8fc51ed5c46993fLuiz Augusto von Dentzint bt_cancel_discovery(const bdaddr_t *src, const bdaddr_t *dst);
37ec96a4be11db022bd8d2b403beb7ca245c5d1ebcLuiz Augusto von Dentz
38ea00a446dbacead62040dd2bd7e663774c205c04Claudio Takahasigchar *bt_uuid2string(uuid_t *uuid);
39054f044588ee84c300b11ef4d94ddc55fe170539Luiz Augusto von Dentzuint16_t bt_name2class(const char *string);
40054f044588ee84c300b11ef4d94ddc55fe170539Luiz Augusto von Dentzchar *bt_name2string(const char *string);
41497dd72d04902511120a03b0f66333642426be47Cidorvan Leiteint bt_string2uuid(uuid_t *uuid, const char *string);
42b583273d911d67eb202f3f367f18d4460913ad41Claudio Takahasigchar *bt_list2string(GSList *list);
432c52650872bdeede320c4192bc0ac06c029f2732Claudio TakahasiGSList *bt_string2list(const gchar *str);
44ec96a4be11db022bd8d2b403beb7ca245c5d1ebcLuiz Augusto von Dentz
45ad81c796ad12b4ecb4436dd28e5cbdc1f5c5414eClaudio Takahasiint bt_acl_encrypt(const bdaddr_t *src, const bdaddr_t *dst,
4689f7e6f27acfa9402a5125264f6b5641409ea079Claudio Takahasi			bt_hci_result_t cb, gpointer user_data);
47