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

WIP: dbus helper for modules #1547

Closed
wants to merge 1 commit into from
Closed

WIP: dbus helper for modules #1547

wants to merge 1 commit into from

Conversation

tobes
Copy link
Contributor

@tobes tobes commented Oct 11, 2018

#1546 adds cool udev support

this adds dbus support for modules - the code is still in crude proof of concept form.

The example module is battery_level and it just updates on a dbus power change. Due to how the module currently works it triggers better when we unplug the power than when we plug it in. This is more about the module.

It is very crude and needs more work but I wanted to show the code as relates to #1546 so I think it is good to consider the needs of both

The idea of this is

  • we can subscribe to dbus events
  • get dbus properies (missing)
  • trigger dbus methods (missing)
  • stop modules doing this and having multiple gobject loops etc as currently

but the real issue for now is how modules interact with this and how it fits in with udev

@tobes tobes requested a review from ultrabug October 11, 2018 22:38
@ultrabug
Copy link
Owner

Cool thanks a lot. Mind you we finish we #1546 first?

@lasers lasers added the enhancement 😍 I have created an enhancement label Oct 21, 2018
@ultrabug
Copy link
Owner

Ok then here, can we go for the same on_dbus_ logic with reused constants for triggered actions please?

@tobes
Copy link
Contributor Author

tobes commented Oct 22, 2018

I'm not sure that works because dbus is quite specific and has a whole interface eg calling methods, getting properties, as well as subscribing to events. think - mpis so controlling your music player(s) and showing current song etc so it is a bit more complicated. Maybe we also can do a on dbus path/event but even this gets tricky - but we can see.

@ultrabug
Copy link
Owner

hmm on a second thought indeed this sounds more like the first implementation I made of udev...

@boucman
Copy link
Contributor

boucman commented Dec 9, 2019

@tobes do you intend to work on this some more ?

I might have time to work on it if it's fine with you...

@ultrabug
Copy link
Owner

@boucman by all means, go ahead mate 👍

@ultrabug
Copy link
Owner

Timeout, closing, reopen if needed mates; Thanks!

@ultrabug ultrabug closed this Jul 10, 2020
@boucman
Copy link
Contributor

boucman commented Jul 10, 2020

Well, I had a look and honestly it looked good as is... i'm not sure what needs to be added...

@boucman
Copy link
Contributor

boucman commented Jul 10, 2020

though I should have said so..

@tex
Copy link

tex commented Sep 15, 2022

can you merge this? dbus support would be useful for my plugin...

@ultrabug
Copy link
Owner

ultrabug commented Oct 2, 2022

@tex no I'm sorry, some modules like mpris do implement dbus related logic you could get inspiration from

@tex
Copy link

tex commented Oct 3, 2022

@ultrabug Thanks! That is exactly what I was looking for!

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

Successfully merging this pull request may close these issues.

5 participants