3 * BlueZ - Bluetooth protocol stack for Linux
5 * Copyright (C) 2002-2010 Marcel Holtmann <marcel@holtmann.org>
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.
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.
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
26 int read_device_alias(const char *src, const char *dst, char *alias, size_t size);
27 int write_device_alias(const char *src, const char *dst, const char *alias);
28 int write_discoverable_timeout(bdaddr_t *bdaddr, int timeout);
29 int read_discoverable_timeout(const char *src, int *timeout);
30 int write_pairable_timeout(bdaddr_t *bdaddr, int timeout);
31 int read_pairable_timeout(const char *src, int *timeout);
32 int write_device_mode(bdaddr_t *bdaddr, const char *mode);
33 int read_device_mode(const char *src, char *mode, int length);
34 int read_on_mode(const char *src, char *mode, int length);
35 int write_local_name(bdaddr_t *bdaddr, const char *name);
36 int read_local_name(bdaddr_t *bdaddr, char *name);
37 int write_local_class(bdaddr_t *bdaddr, uint8_t *class);
38 int read_local_class(bdaddr_t *bdaddr, uint8_t *class);
39 int write_remote_appearance(bdaddr_t *local, bdaddr_t *peer,
40 uint8_t bdaddr_type, uint16_t appearance);
41 int read_remote_appearance(bdaddr_t *local, bdaddr_t *peer, uint8_t bdaddr_type,
42 uint16_t *appearance);
43 int write_remote_class(bdaddr_t *local, bdaddr_t *peer, uint32_t class);
44 int read_remote_class(bdaddr_t *local, bdaddr_t *peer, uint32_t *class);
45 int write_device_name(bdaddr_t *local, bdaddr_t *peer, char *name);
46 int read_device_name(const char *src, const char *dst, char *name);
47 int write_remote_eir(bdaddr_t *local, bdaddr_t *peer, uint8_t *data,
49 int read_remote_eir(bdaddr_t *local, bdaddr_t *peer, uint8_t *data);
50 int write_version_info(bdaddr_t *local, bdaddr_t *peer, uint16_t manufacturer, uint8_t lmp_ver, uint16_t lmp_subver);
51 int write_features_info(bdaddr_t *local, bdaddr_t *peer, unsigned char *page1, unsigned char *page2);
52 int read_remote_features(bdaddr_t *local, bdaddr_t *peer, unsigned char *page1, unsigned char *page2);
53 int write_lastseen_info(bdaddr_t *local, bdaddr_t *peer, struct tm *tm);
54 int write_lastused_info(bdaddr_t *local, bdaddr_t *peer, struct tm *tm);
55 int write_link_key(bdaddr_t *local, bdaddr_t *peer, unsigned char *key, uint8_t type, int length);
56 int read_link_key(bdaddr_t *local, bdaddr_t *peer, unsigned char *key, uint8_t *type);
57 ssize_t 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);
59 int write_trust(const char *src, const char *addr, const char *service, gboolean trust);
60 int write_device_profiles(bdaddr_t *src, bdaddr_t *dst, const char *profiles);
61 int delete_entry(bdaddr_t *src, const char *storage, const char *key);
62 int store_record(const gchar *src, const gchar *dst, sdp_record_t *rec);
63 sdp_record_t *record_from_string(const gchar *str);
64 sdp_record_t *fetch_record(const gchar *src, const gchar *dst, const uint32_t handle);
65 int delete_record(const gchar *src, const gchar *dst, const uint32_t handle);
66 void delete_all_records(const bdaddr_t *src, const bdaddr_t *dst);
67 sdp_list_t *read_records(const bdaddr_t *src, const bdaddr_t *dst);
68 sdp_record_t *find_record_in_list(sdp_list_t *recs, const char *uuid);
69 int store_device_id(const gchar *src, const gchar *dst,
70 const uint16_t source, const uint16_t vendor,
71 const uint16_t product, const uint16_t version);
72 int read_device_id(const gchar *src, const gchar *dst,
73 uint16_t *source, uint16_t *vendor,
74 uint16_t *product, uint16_t *version);
75 int write_device_pairable(bdaddr_t *local, gboolean mode);
76 int read_device_pairable(bdaddr_t *local, gboolean *mode);
77 gboolean read_blocked(const bdaddr_t *local, const bdaddr_t *remote);
78 int write_blocked(const bdaddr_t *local, const bdaddr_t *remote,
80 int write_device_services(const bdaddr_t *sba, const bdaddr_t *dba,
81 uint8_t bdaddr_type, const char *services);
82 int delete_device_service(const bdaddr_t *sba, const bdaddr_t *dba,
84 char *read_device_services(const bdaddr_t *sba, const bdaddr_t *dba,
86 int write_device_characteristics(const bdaddr_t *sba, const bdaddr_t *dba,
87 uint8_t bdaddr_type, uint16_t handle,
89 char *read_device_characteristics(const bdaddr_t *sba, const bdaddr_t *dba,
90 uint8_t bdaddr_type, uint16_t handle);
91 int write_device_attribute(const bdaddr_t *sba, const bdaddr_t *dba,
92 uint8_t bdaddr_type, uint16_t handle,
94 int read_device_attributes(const bdaddr_t *sba, textfile_cb func, void *data);
95 int read_device_ccc(bdaddr_t *local, bdaddr_t *peer, uint8_t bdaddr_type,
96 uint16_t handle, uint16_t *value);
97 int write_device_ccc(bdaddr_t *local, bdaddr_t *peer, uint8_t bdaddr_type,
98 uint16_t handle, uint16_t value);
99 void delete_device_ccc(bdaddr_t *local, bdaddr_t *peer);
100 int write_longtermkeys(bdaddr_t *local, bdaddr_t *peer, uint8_t bdaddr_type,
102 gboolean has_longtermkeys(bdaddr_t *local, bdaddr_t *peer, uint8_t bdaddr_type);