MCPcopy Create free account
hub / github.com/Alexays/Waybar / onObjectAdded

Method onObjectAdded

src/modules/bluetooth.cpp:285–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

283}
284
285auto 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
298auto waybar::modules::Bluetooth::onObjectRemoved(GDBusObjectManager* manager, GDBusObject* object,
299 gpointer user_data) -> void {

Callers

nothing calls this directly

Calls 2

emitMethod · 0.45

Tested by

no test coverage detected