manager.h revision 9184e2eeb7b97371c6b83b747c8984e2340d2b47
1e54736f31acc8d26d1f1e4a8b06ed66d258a24efJohan Hedberg/* 2e54736f31acc8d26d1f1e4a8b06ed66d258a24efJohan Hedberg * 3e54736f31acc8d26d1f1e4a8b06ed66d258a24efJohan Hedberg * BlueZ - Bluetooth protocol stack for Linux 4e54736f31acc8d26d1f1e4a8b06ed66d258a24efJohan Hedberg * 5f1659f19cfb3ef0c0c09b5f5b7e2b06d90d079abMarcel Holtmann * Copyright (C) 2006-2007 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 30994212593598a7c176342e616bc99aae45991244Johan Hedbergdbus_bool_t manager_init(DBusConnection *conn, const char *path); 31cb44abb7b70aa160045f8a3f45f769360577fa70Marcel Holtmannvoid manager_cleanup(DBusConnection *conn, const char *path); 32e54736f31acc8d26d1f1e4a8b06ed66d258a24efJohan Hedberg 33795dd43cceb73cbc1e76592edfc26c093517f4e6Marcel Holtmannconst char *manager_get_base_path(void); 3418614bd2b008cb9f3879990883c569c37b72f195Alok Barsodestruct btd_adapter *manager_find_adapter(const bdaddr_t *sba); 3566906625a30d68a96cbdaef97597323896a2685eLuiz Augusto von Dentzstruct btd_adapter *manager_find_adapter_by_address(const char *address); 3618614bd2b008cb9f3879990883c569c37b72f195Alok Barsodestruct btd_adapter *manager_find_adapter_by_path(const char *path); 3718614bd2b008cb9f3879990883c569c37b72f195Alok Barsodestruct btd_adapter *manager_find_adapter_by_id(int id); 38fd2a6409244254452bec619100d73bc6c8d04ec5Claudio TakahasiGSList *manager_get_adapters(void); 39ad37d886cc54a9a975f0f5322165bbb2855dac7fLuiz Augusto von Dentzint manager_register_adapter(int id, gboolean devup); 40dc38fc68b74e98af1139d7769a1d91a98139af99Luiz Augusto von Dentzint manager_unregister_adapter(int id); 41dc38fc68b74e98af1139d7769a1d91a98139af99Luiz Augusto von Dentzint manager_start_adapter(int id); 42dc38fc68b74e98af1139d7769a1d91a98139af99Luiz Augusto von Dentzint manager_stop_adapter(int id); 43999d9b9ac1f8e7d25f620661b99ae6068560c3f1Luiz Augusto von Dentzvoid manager_add_adapter(const char *path); 446adf2ab945cdb8442d0f621501748d6e198b28d6Luiz Augusto von Dentzint manager_get_default_adapter(); 456adf2ab945cdb8442d0f621501748d6e198b28d6Luiz Augusto von Dentzvoid manager_set_default_adapter(int id); 46e00a0b0637a7f4e5108f7398c72920441b448364Alok Barsodevoid manager_update_svc(const bdaddr_t *bdaddr, uint8_t svc); 4759fb9c144f76db70761864fa3b0d1b9d4e61affdJohan Hedbergvoid btd_manager_set_offline(gboolean offline); 48