This commit is contained in:
Vibhav Pant
2023-08-03 17:14:03 +05:30
parent 24d1021bfa
commit 5644e97d46
8 changed files with 34 additions and 31 deletions
@@ -24,6 +24,14 @@ BluetoothDevice::BluetoothDevice(sd_bus *system_bus,
object_path_ = device_object_path;
}
BluetoothDevice::BluetoothDevice(const BluetoothDevice &device) {
if (!device.mac_addr_.empty()) {
mac_addr_ = device.mac_addr_;
}
object_path_ = device.object_path_;
system_bus_ = sd_bus_ref(device.system_bus_);
}
std::string BluetoothDevice::GetName() const {
__attribute__((cleanup(sd_bus_error_free))) sd_bus_error err =
SD_BUS_ERROR_NULL;