| 283 | } |
| 284 | |
| 285 | auto waybar::modules::Bluetooth::onObjectAdded(GDBusObjectManager* manager, GDBusObject* object, |
| 286 | gpointer user_data) -> void { |
| 287 | ControllerInfo info; |
| 288 | Bluetooth* bt = static_cast<Bluetooth*>(user_data); |
| 289 | |
| 290 | if (!bt->cur_controller_.has_value() && bt->getControllerProperties(object, info) && |
| 291 | (!bt->config_["controller-alias"].isString() || |
| 292 | bt->config_["controller-alias"].asString() == info.alias)) { |
| 293 | bt->cur_controller_ = std::move(info); |
| 294 | bt->dp.emit(); |
| 295 | } |
| 296 | } |
| 297 | |
| 298 | auto waybar::modules::Bluetooth::onObjectRemoved(GDBusObjectManager* manager, GDBusObject* object, |
| 299 | gpointer user_data) -> void { |
nothing calls this directly
no test coverage detected