return bacmp(&device->bdaddr, bdaddr);
}
+int device_addr_type_cmp(gconstpointer a, gconstpointer b)
+{
+ const struct btd_device *dev = a;
+ const struct device_addr_type *addr = b;
+
+ if (addr->bdaddr_type == BDADDR_BREDR) {
+ if (!dev->bredr)
+ return -1;
+
+ return bacmp(&dev->bdaddr, &addr->bdaddr);
+ }
+
+ if (!dev->le)
+ return -1;
+
+ if (addr->bdaddr_type != dev->bdaddr_type)
+ return -1;
+
+ return bacmp(&dev->bdaddr, &addr->bdaddr);
+}
+
static gboolean record_has_uuid(const sdp_record_t *rec,
const char *profile_uuid)
{
void device_remove(struct btd_device *device, gboolean remove_stored);
int device_address_cmp(gconstpointer a, gconstpointer b);
int device_bdaddr_cmp(gconstpointer a, gconstpointer b);
+
+/* Struct used by device_addr_type_cmp() */
+struct device_addr_type {
+ bdaddr_t bdaddr;
+ uint8_t bdaddr_type;
+};
+
+int device_addr_type_cmp(gconstpointer a, gconstpointer b);
GSList *btd_device_get_uuids(struct btd_device *device);
void device_probe_profiles(struct btd_device *device, GSList *profiles);
const sdp_record_t *btd_device_get_record(struct btd_device *device,