Shouqun / node-dbus

dbus module for node
MIT License
150 stars 70 forks source link

Set property strict encoding #175

Closed mokus0 closed 7 years ago

mokus0 commented 7 years ago

When setting properties, the implementation in terms of the 'Set' method currently does not respect the declared type of the property, because the 'Set' method argument is encoded as a variant. This adds an extra parameter to the EncodeObject which allows a caller to indicate the concrete type to use to encode variants, and uses this capability to correctly encode property writes.

This builds on the changes in #174, but not in an essential way - I just wanted to make merging easier because I knew they would conflict otherwise.

Unfortunately, I am not aware of a good way to automate testing of the wire encoding from within Javascript, or familiar enough with the Javascript build and test tools to integrate C or C++ code into the test suite, but I have tested this against live DBus services.

Shouqun commented 7 years ago

sorry for my late response, looks good to me, thanks!