Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to remove property and signal handlers from the com.github.hypfvieh.bluetooth.DeviceManager #48

Closed
OlegAndreych opened this issue Oct 1, 2020 · 2 comments

Comments

@OlegAndreych
Copy link

I have a case when the need for subscriptions for different properties comes and goes.

As a workaround, I can have a generic subscription, which will delegate to specific handlers, relieving one from the need to register handlers in the DeviceManager. But having only handlers with a lifecycle tied to the objects representing devices seems more natural.

As far as I can see, underlying org.freedesktop.dbus.connections.impl.DBusConnection already has corresponding methods.

@hypfvieh
Copy link
Owner

hypfvieh commented Oct 2, 2020

I added methods to remove signal handlers.
But you can already do that without these methods by calling deviceManager.getDBusConnection().removeSigHandler(class, handler)

@OlegAndreych
Copy link
Author

But you can already do that without these methods by calling deviceManager.getDBusConnection().removeSigHandler(class, handler)

Thanks for the methods and the idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants