Shouqun / node-dbus

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

Add callback function support to callMethod in/out defs. #234

Closed iamfat closed 3 years ago

iamfat commented 3 years ago

In some scenario, addProperty does not send correct data to DBus. For example, in bluez api, ManufacturerData's dict key must be uint16), but JS does not support number-type key. Sinceout value was forced to set to Utils.Define('Auto', 'value') in when implementing org.freedesktop.DBus.Properties, the returned value's prop_key was mis-transformed to string.

This PR introduced function support when defining method, so value type could be dynamic returned according args.