Claudio Takahasi | 506c952 | 2008-08-27 17:13:41 -0300 | [diff] [blame] | 1 | /* |
| 2 | * |
| 3 | * BlueZ - Bluetooth protocol stack for Linux |
| 4 | * |
Marcel Holtmann | 9184e2e | 2010-01-01 17:08:17 -0800 | [diff] [blame] | 5 | * Copyright (C) 2002-2010 Marcel Holtmann <marcel@holtmann.org> |
Claudio Takahasi | 506c952 | 2008-08-27 17:13:41 -0300 | [diff] [blame] | 6 | * |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License as published by |
| 10 | * the Free Software Foundation; either version 2 of the License, or |
| 11 | * (at your option) any later version. |
| 12 | * |
| 13 | * This program is distributed in the hope that it will be useful, |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | * GNU General Public License for more details. |
| 17 | * |
| 18 | * You should have received a copy of the GNU General Public License |
| 19 | * along with this program; if not, write to the Free Software |
| 20 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 21 | * |
| 22 | */ |
| 23 | |
| 24 | int read_device_alias(const char *src, const char *dst, char *alias, size_t size); |
| 25 | int write_device_alias(const char *src, const char *dst, const char *alias); |
| 26 | int write_discoverable_timeout(bdaddr_t *bdaddr, int timeout); |
Claudio Takahasi | 676f5e7 | 2008-08-30 09:54:27 -0300 | [diff] [blame] | 27 | int read_discoverable_timeout(const char *src, int *timeout); |
Luiz Augusto von Dentz | 3ee81ca | 2008-11-27 16:46:45 -0300 | [diff] [blame] | 28 | int write_pairable_timeout(bdaddr_t *bdaddr, int timeout); |
| 29 | int read_pairable_timeout(const char *src, int *timeout); |
Claudio Takahasi | 506c952 | 2008-08-27 17:13:41 -0300 | [diff] [blame] | 30 | int write_device_mode(bdaddr_t *bdaddr, const char *mode); |
Claudio Takahasi | 676f5e7 | 2008-08-30 09:54:27 -0300 | [diff] [blame] | 31 | int read_device_mode(const char *src, char *mode, int length); |
Claudio Takahasi | 506c952 | 2008-08-27 17:13:41 -0300 | [diff] [blame] | 32 | int read_on_mode(const char *src, char *mode, int length); |
Johan Hedberg | 31e380b | 2009-08-05 10:12:52 +0300 | [diff] [blame] | 33 | int write_local_name(bdaddr_t *bdaddr, const char *name); |
Claudio Takahasi | 506c952 | 2008-08-27 17:13:41 -0300 | [diff] [blame] | 34 | int read_local_name(bdaddr_t *bdaddr, char *name); |
| 35 | int write_local_class(bdaddr_t *bdaddr, uint8_t *class); |
| 36 | int read_local_class(bdaddr_t *bdaddr, uint8_t *class); |
| 37 | int write_remote_class(bdaddr_t *local, bdaddr_t *peer, uint32_t class); |
| 38 | int read_remote_class(bdaddr_t *local, bdaddr_t *peer, uint32_t *class); |
| 39 | int write_device_name(bdaddr_t *local, bdaddr_t *peer, char *name); |
| 40 | int read_device_name(const char *src, const char *dst, char *name); |
| 41 | int write_remote_eir(bdaddr_t *local, bdaddr_t *peer, uint8_t *data); |
Johan Hedberg | 0f26327 | 2008-12-04 15:37:16 +0200 | [diff] [blame] | 42 | int read_remote_eir(bdaddr_t *local, bdaddr_t *peer, uint8_t *data); |
Claudio Takahasi | 506c952 | 2008-08-27 17:13:41 -0300 | [diff] [blame] | 43 | int write_l2cap_info(bdaddr_t *local, bdaddr_t *peer, |
| 44 | uint16_t mtu_result, uint16_t mtu, |
| 45 | uint16_t mask_result, uint32_t mask); |
| 46 | int read_l2cap_info(bdaddr_t *local, bdaddr_t *peer, |
| 47 | uint16_t *mtu_result, uint16_t *mtu, |
| 48 | uint16_t *mask_result, uint32_t *mask); |
| 49 | int write_version_info(bdaddr_t *local, bdaddr_t *peer, uint16_t manufacturer, uint8_t lmp_ver, uint16_t lmp_subver); |
Johan Hedberg | c7eadb0 | 2010-02-03 10:52:59 -0800 | [diff] [blame] | 50 | int write_features_info(bdaddr_t *local, bdaddr_t *peer, unsigned char *page1, unsigned char *page2); |
Johan Hedberg | 989c60c | 2010-02-03 12:02:42 -0800 | [diff] [blame] | 51 | int read_remote_features(bdaddr_t *local, bdaddr_t *peer, unsigned char *page1, unsigned char *page2); |
Claudio Takahasi | 506c952 | 2008-08-27 17:13:41 -0300 | [diff] [blame] | 52 | int write_lastseen_info(bdaddr_t *local, bdaddr_t *peer, struct tm *tm); |
| 53 | int write_lastused_info(bdaddr_t *local, bdaddr_t *peer, struct tm *tm); |
| 54 | int write_link_key(bdaddr_t *local, bdaddr_t *peer, unsigned char *key, uint8_t type, int length); |
| 55 | int read_link_key(bdaddr_t *local, bdaddr_t *peer, unsigned char *key, uint8_t *type); |
| 56 | int read_pin_length(bdaddr_t *local, bdaddr_t *peer); |
| 57 | int read_pin_code(bdaddr_t *local, bdaddr_t *peer, char *pin); |
| 58 | gboolean read_trust(const bdaddr_t *local, const char *addr, const char *service); |
Claudio Takahasi | d498295 | 2008-08-27 18:46:48 -0300 | [diff] [blame] | 59 | int write_trust(const char *src, const char *addr, const char *service, gboolean trust); |
Claudio Takahasi | 506c952 | 2008-08-27 17:13:41 -0300 | [diff] [blame] | 60 | GSList *list_trusts(bdaddr_t *local, const char *service); |
| 61 | int write_device_profiles(bdaddr_t *src, bdaddr_t *dst, const char *profiles); |
| 62 | int delete_entry(bdaddr_t *src, const char *storage, const char *key); |
| 63 | int store_record(const gchar *src, const gchar *dst, sdp_record_t *rec); |
Bastien Nocera | fe78585 | 2008-10-15 15:20:22 +0100 | [diff] [blame] | 64 | sdp_record_t *record_from_string(const gchar *str); |
Claudio Takahasi | 506c952 | 2008-08-27 17:13:41 -0300 | [diff] [blame] | 65 | sdp_record_t *fetch_record(const gchar *src, const gchar *dst, const uint32_t handle); |
| 66 | int delete_record(const gchar *src, const gchar *dst, const uint32_t handle); |
Johan Hedberg | adad645 | 2009-10-29 23:15:24 +0200 | [diff] [blame] | 67 | void delete_all_records(const bdaddr_t *src, const bdaddr_t *dst); |
| 68 | sdp_list_t *read_records(const bdaddr_t *src, const bdaddr_t *dst); |
David Woodhouse | 60af857 | 2008-09-14 12:24:43 -0700 | [diff] [blame] | 69 | sdp_record_t *find_record_in_list(sdp_list_t *recs, const char *uuid); |
Marcel Holtmann | fce6db5 | 2008-09-14 18:23:44 +0200 | [diff] [blame] | 70 | int store_device_id(const gchar *src, const gchar *dst, |
| 71 | const uint16_t source, const uint16_t vendor, |
| 72 | const uint16_t product, const uint16_t version); |
| 73 | int read_device_id(const gchar *src, const gchar *dst, |
| 74 | uint16_t *source, uint16_t *vendor, |
| 75 | uint16_t *product, uint16_t *version); |
Luiz Augusto von Dentz | 0c561f7 | 2008-11-20 16:33:30 -0300 | [diff] [blame] | 76 | int write_device_pairable(bdaddr_t *local, gboolean mode); |
| 77 | int read_device_pairable(bdaddr_t *local, gboolean *mode); |
Johan Hedberg | 1e4d4fe | 2010-05-17 17:32:26 +0200 | [diff] [blame] | 78 | gboolean read_blocked(const bdaddr_t *local, const bdaddr_t *remote); |
| 79 | int write_blocked(const bdaddr_t *local, const bdaddr_t *remote, |
| 80 | gboolean blocked); |
David Woodhouse | af8bb26 | 2008-09-14 12:28:30 -0700 | [diff] [blame] | 81 | |
| 82 | #define PNP_UUID "00001200-0000-1000-8000-00805f9b34fb" |
| 83 | |