Comments (15)
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.
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.
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.
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:
- Add capability for the server to send a signal
- 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.
- 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.
- 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.
@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.
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.
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.
Tbh, I just had a great idea, how about some refactoring?
from dbus-rs.
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.
@diwic Could there be a RFC system? :)
from dbus-rs.
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.
@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.
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.
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)
- Help with building a struct from a value in `PropMap` (crossroads) HOT 5
- Large messages require multiple `Connection::process()` calls to be received. HOT 10
- [codegen] generated code has clippy warning HOT 2
- [spawn child exited] client#call_method HOT 2
- [update future version] warning when packaging HOT 4
- Is it possible to return Dict in a dbus-crossroads interface property HOT 2
- Reply missed when dispatcher thread is used HOT 3
- Settable D-Bus properties HOT 1
- "Timeout waiting for reply" when attempting to call any proxy methods HOT 2
- How to get the args of existing signal HOT 1
- "reenable" rustfmt HOT 1
- Error to read into a Vec<VecDeque<Box<RefArg>>> HOT 2
- Cannot dynamically add and remove interfaces from an existing path HOT 2
- When I run the build, This crate report an error HOT 3
- alpine build fail HOT 1
- Monitor example doesn't connect when dbus-monitor does HOT 4
- Support : How to read Array of HashMap HOT 4
- How does dbus-crossroads start X11? HOT 4
- Doesn't compile on ubuntu-latest image HOT 5
- dbus-crossroads: cr.insert() during sync method call HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dbus-rs.