Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Use pure JS node-dbus ? #6
Service implementation example: https://github.com/sidorares/node-dbus/blob/master/examples/service/server2.js
I think the first thing to do would be to describe the
Letters used are data types (yeah, it kind of sucks), here is the spec: https://dbus.freedesktop.org/doc/dbus-specification.html#type-system
It seems that for methods, the last item in the types list is the return value. All others are arguments.
Then, we'll need to implement
Tests are a very good idea, but I don't really know how to implement them. Created an issue for that: #7
There's an internal implementation of the properties interface that's different from the exported interface implementation. There's no way to emit events on the internal implementation, so we can't emit
There's no way to make a property readonly either.
I'll do some probing PRs and see if the maintainer has a will to make this work.
Another problem with dbus-native is it has a very unusual and undocumented variant object format you'd need to write a converter for.
The current library node-dbus is no better. It completely ignores the types of the properties. There is no way to represent "1.0" as anything other than a byte which is needed for volume and rate.
I'm beginning to think the best way to fix this is to just write your own dbus service in C because there's not a good library for writing the services in node.
referenced this issue
Oct 27, 2018
Yes definitely a new major release. I'm pretty confident it works ok.
Electron integration is what worries me a little. I've tested it in the Electron sample app and it works fine. However, I can't get it to work in GPMDP. I think they might have some security thing that's disabling the node interfaces. I'm still looking into it.
@acrisci When trying to use
I am a bit confused because Electron 4 is based on Node 10 so everything "should" work, any idea?