3 * BlueZ - Bluetooth protocol stack for Linux
5 * Copyright (C) 2000-2001 Qualcomm Incorporated
6 * Copyright (C) 2002-2003 Maxim Krasnyansky <maxk@qualcomm.com>
7 * Copyright (C) 2002-2009 Marcel Holtmann <marcel@holtmann.org>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 /* When all services should trust a remote device */
27 #define GLOBAL_TRUST "[all]"
30 * Scanning modes, used by DEV_SET_MODE
31 * off: remote devices are not allowed to find or connect to this device
32 * connectable: remote devices are allowed to connect, but they are not
34 * discoverable: remote devices are allowed to connect and find this device
35 * limited: limited discoverable - GIAC + IAC enabled and set limited
36 * bit on device class.
40 #define MODE_CONNECTABLE 0x01
41 #define MODE_DISCOVERABLE 0x02
42 #define MODE_LIMITED 0x03
43 #define MODE_UNKNOWN 0xff
45 #define HCID_DEFAULT_DISCOVERABLE_TIMEOUT 180 /* 3 minutes */
47 /* Timeout for hci_send_req (milliseconds) */
48 #define HCI_REQ_TIMEOUT 5000
60 gboolean remember_powered;
66 uint8_t discov_interval;
67 char deviceid[15]; /* FIXME: */
79 extern struct main_opts main_opts;
81 char *expand_name(char *dst, int size, char *str, int dev_id);
83 void hci_req_queue_remove(int dev_id, bdaddr_t *dba);
85 void start_security_manager(int hdev);
86 void stop_security_manager(int hdev);
88 void btd_start_exit_timer(void);
89 void btd_stop_exit_timer(void);
91 void set_pin_length(bdaddr_t *sba, int length);
93 gboolean plugin_init(GKeyFile *config);
94 void plugin_cleanup(void);
96 void rfkill_init(void);
97 void rfkill_exit(void);
99 void __probe_servers(const char *adapter);
100 void __remove_servers(const char *adapter);