1e54736f31acc8d26d1f1e4a8b06ed66d258a24efJohan Hedberg/*
2e54736f31acc8d26d1f1e4a8b06ed66d258a24efJohan Hedberg *
3e54736f31acc8d26d1f1e4a8b06ed66d258a24efJohan Hedberg *  BlueZ - Bluetooth protocol stack for Linux
4e54736f31acc8d26d1f1e4a8b06ed66d258a24efJohan Hedberg *
55592142cb9383df0556b27ac59e96547b380310bJohan Hedberg *  Copyright (C) 2006-2010  Nokia Corporation
69184e2eeb7b97371c6b83b747c8984e2340d2b47Marcel Holtmann *  Copyright (C) 2004-2010  Marcel Holtmann <marcel@holtmann.org>
7e54736f31acc8d26d1f1e4a8b06ed66d258a24efJohan Hedberg *
8e54736f31acc8d26d1f1e4a8b06ed66d258a24efJohan Hedberg *
9e54736f31acc8d26d1f1e4a8b06ed66d258a24efJohan Hedberg *  This program is free software; you can redistribute it and/or modify
10e54736f31acc8d26d1f1e4a8b06ed66d258a24efJohan Hedberg *  it under the terms of the GNU General Public License as published by
11e54736f31acc8d26d1f1e4a8b06ed66d258a24efJohan Hedberg *  the Free Software Foundation; either version 2 of the License, or
12e54736f31acc8d26d1f1e4a8b06ed66d258a24efJohan Hedberg *  (at your option) any later version.
13e54736f31acc8d26d1f1e4a8b06ed66d258a24efJohan Hedberg *
14e54736f31acc8d26d1f1e4a8b06ed66d258a24efJohan Hedberg *  This program is distributed in the hope that it will be useful,
15e54736f31acc8d26d1f1e4a8b06ed66d258a24efJohan Hedberg *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16e54736f31acc8d26d1f1e4a8b06ed66d258a24efJohan Hedberg *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17e54736f31acc8d26d1f1e4a8b06ed66d258a24efJohan Hedberg *  GNU General Public License for more details.
18e54736f31acc8d26d1f1e4a8b06ed66d258a24efJohan Hedberg *
19e54736f31acc8d26d1f1e4a8b06ed66d258a24efJohan Hedberg *  You should have received a copy of the GNU General Public License
20e54736f31acc8d26d1f1e4a8b06ed66d258a24efJohan Hedberg *  along with this program; if not, write to the Free Software
21e54736f31acc8d26d1f1e4a8b06ed66d258a24efJohan Hedberg *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
22e54736f31acc8d26d1f1e4a8b06ed66d258a24efJohan Hedberg *
23e54736f31acc8d26d1f1e4a8b06ed66d258a24efJohan Hedberg */
24e54736f31acc8d26d1f1e4a8b06ed66d258a24efJohan Hedberg
25270b9869e7792fabd061b85345fc62140e01a11fMarcel Holtmann#include <bluetooth/bluetooth.h>
26270b9869e7792fabd061b85345fc62140e01a11fMarcel Holtmann#include <dbus/dbus.h>
27270b9869e7792fabd061b85345fc62140e01a11fMarcel Holtmann
28be9288b048e92fd34978dd13ba13ab37d0f22faeMarcel Holtmann#define MANAGER_INTERFACE "org.bluez.Manager"
29e54736f31acc8d26d1f1e4a8b06ed66d258a24efJohan Hedberg
304efb97bdae52e601dfcf1627e39d1e652457c53cJohan Hedbergtypedef void (*adapter_cb) (struct btd_adapter *adapter, gpointer user_data);
314efb97bdae52e601dfcf1627e39d1e652457c53cJohan Hedberg
32994212593598a7c176342e616bc99aae45991244Johan Hedbergdbus_bool_t manager_init(DBusConnection *conn, const char *path);
33cb44abb7b70aa160045f8a3f45f769360577fa70Marcel Holtmannvoid manager_cleanup(DBusConnection *conn, const char *path);
34e54736f31acc8d26d1f1e4a8b06ed66d258a24efJohan Hedberg
35795dd43cceb73cbc1e76592edfc26c093517f4e6Marcel Holtmannconst char *manager_get_base_path(void);
3618614bd2b008cb9f3879990883c569c37b72f195Alok Barsodestruct btd_adapter *manager_find_adapter(const bdaddr_t *sba);
3718614bd2b008cb9f3879990883c569c37b72f195Alok Barsodestruct btd_adapter *manager_find_adapter_by_id(int id);
384efb97bdae52e601dfcf1627e39d1e652457c53cJohan Hedbergvoid manager_foreach_adapter(adapter_cb func, gpointer user_data);
39fd2a6409244254452bec619100d73bc6c8d04ec5Claudio TakahasiGSList *manager_get_adapters(void);
405c1c35eb38790bd068bfd37e0355aafb194f7812Johan Hedbergstruct btd_adapter *btd_manager_register_adapter(int id);
415c1c35eb38790bd068bfd37e0355aafb194f7812Johan Hedbergint btd_manager_unregister_adapter(int id);
42999d9b9ac1f8e7d25f620661b99ae6068560c3f1Luiz Augusto von Dentzvoid manager_add_adapter(const char *path);
4300c2267405ff3416672401cf394f06017a6814c1Johan Hedbergvoid btd_manager_set_did(uint16_t vendor, uint16_t product, uint16_t version);
44