Git Product home page Git Product logo

Comments (15)

diwic avatar diwic commented on June 2, 2024

Patches welcome :-)
...I might look into it myself as well, but no promises right now.

Out of curiosity, which part(s) are the most interesting to you, of

  • Client call to GetManagedObjects
  • Server side handling of GetManagedObjects
  • Client side signal handling (InterfacesAdded, InterfacesRemoved)
  • Server side signal handling

There's also no support currently for PropertiesChanged.

from dbus-rs.

diwic avatar diwic commented on June 2, 2024

BTW, do you know a good test service that's installed on most systems by default? E g, I use a call to policykit just to test my properties implementation. Is there a service I can use to test getmanagedobjects too?

from dbus-rs.

agrover avatar agrover commented on June 2, 2024

I'm interested in server side, so 2 and 4 from your list above. Willing to contribute patches in the medium-term once I'm more familiar with Rust 😄

from dbus-rs.

boghison avatar boghison commented on June 2, 2024

Hi! I have lots of free time and want to help make this better, because I intend to write a crate for a dbus service. What I'd like to help with is Signal support, mostly 2 things:

  1. Add capability for the server to send a signal
  2. Automatically send PropertiesChanged when a property changes (could be optional)

Has this already been implemented? The documentation doesn't really say much :(

from dbus-rs.

diwic avatar diwic commented on June 2, 2024
  1. Add capability for the server to send a signal

Hi! To send a signal, just call Message::new_signal, add whatever data you want to that message, then send it with Connection::send. This can be done for both servers and clients.

  1. Automatically send PropertiesChanged when a property changes (could be optional)

This has not been implemented yet. Maybe it needs some thinking too about how to do it in the best way, considering that the property could have been set from both the local/server side and the remote side in some use cases.

Has this already been implemented? The documentation doesn't really say much :(

Patches to improve the documentation are also welcome :-) Or if you could point out where you looked for that information but couldn't find it.

from dbus-rs.

boghison avatar boghison commented on June 2, 2024

@diwic It doesn't really seem that hard, only edit the property handlers (server-side) and Props::set() (client-side) to send this signal and for the remote side, just listen for the signal?

from dbus-rs.

diwic avatar diwic commented on June 2, 2024

Props::set could send a signal, but would we really want that? Props::set sets a remote property, so we would want the remote to send the signal, not us (right)?

And obj::Property currently does not know what interface and object path it belongs to, this has to be fixed before it can send a PropertiesChanged signal.

from dbus-rs.

diwic avatar diwic commented on June 2, 2024

Also; the most common use case for PropertiesChanged might be that the server itself changes the value - the value might be read-only for the remote side, but the server might change it and then send a signal.

And, there are four values of EmitsChangedSignal (const, true, false, invalidates). Are you planning to support all four of them?

from dbus-rs.

boghison avatar boghison commented on June 2, 2024

Tbh, I just had a great idea, how about some refactoring?

from dbus-rs.

diwic avatar diwic commented on June 2, 2024

Tbh, I just had a great idea, how about some refactoring?

Well, any patch that improves the code is welcome, but if you want to do some larger refactoring you might want to discuss it first so we're both on the same page before you write the code?

from dbus-rs.

boghison avatar boghison commented on June 2, 2024

@diwic Could there be a RFC system? :)

from dbus-rs.

diwic avatar diwic commented on June 2, 2024

Just explain what you want to do and how in a github issue (preferably a new one, since this originally was about ObjectManager support).

from dbus-rs.

boghison avatar boghison commented on June 2, 2024

@diwic Yeah, that's what I thought, but I think I want to test some changes first, then open up an issue

from dbus-rs.

diwic avatar diwic commented on June 2, 2024

Hi!

So I was writing a lot of code last weekend, a rewrite of the entire obj module. The new mdisp module should have both EmitsChangedSignal and ObjectManager support, but so far I haven't written a test case for it, so would you like to try it out and see if it works?

from dbus-rs.

diwic avatar diwic commented on June 2, 2024

Ok, so the new tree module has now been released as dbus v0.2.0 and it has both EmitsChangedSignal and GetManagedObjects support. Enjoy!

from dbus-rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.