diff --git a/src/device.c b/src/device.c
index eabbe0a..ce307c3 100644
--- a/src/device.c
+++ b/src/device.c
DEVICE_INTERFACE, "Icon");
}
+void device_update_addr(struct btd_device *device, const bdaddr_t *bdaddr,
+ uint8_t bdaddr_type)
+{
+ if (!bacmp(bdaddr, &device->bdaddr) &&
+ bdaddr_type == device->bdaddr_type)
+ return;
+
+ bacpy(&device->bdaddr, bdaddr);
+ device->bdaddr_type = bdaddr_type;
+
+ g_dbus_emit_property_changed(dbus_conn, device->path,
+ DEVICE_INTERFACE, "Address");
+}
+
uint32_t btd_device_get_class(struct btd_device *device)
{
return device->class;
diff --git a/src/device.h b/src/device.h
index 3a33cb2..f896a00 100644
--- a/src/device.h
+++ b/src/device.h
void device_get_name(struct btd_device *device, char *name, size_t len);
bool device_name_known(struct btd_device *device);
void device_set_class(struct btd_device *device, uint32_t class);
+void device_update_addr(struct btd_device *device, const bdaddr_t *bdaddr,
+ uint8_t bdaddr_type);
uint32_t btd_device_get_class(struct btd_device *device);
uint16_t btd_device_get_vendor(struct btd_device *device);
uint16_t btd_device_get_vendor_src(struct btd_device *device);