node-dbus
node-dbus copied to clipboard
method out signing seem to fail
The following code:
var service = DBus.registerService('session', 'org.gnome.foo');
var obj = service.createObject('/org/gnome/foo');
var iface1 = obj.createInterface('org.gnome.foo');
iface1.addMethod('AddBook', {
in: [DBus.Define(String), DBus.Define(Number)],
out: [DBus.Define(String), DBus.Define(Number)]
}, function(name, quality, callback) {
callback('bar',234);
});
iface1.update();
Does not show the good out: signature on d-feet:

If I add console.log(iface1.methods.AddBook); before iface1.update();
The terminal show correct types
{ handler: [Function], out: [ { type: 's' }, { type: 'd' } ] }
I found a workaround this way:
var DBus = require('dbus');
var service = DBus.registerService('session','org.gnome.foo');
var obj = service.createObject('/org/gnome/foo');
var iface1 = obj.createInterface('org.gnome.foo');
iface1.addMethod('AddBook', {
out:{type:'a(iiissisasii)'}
}, function( callback) {
callback(null, [[ 8, 1539615780, 0, '', 'foo', 13, 'bar', [], 1539561600, 58 ]]);
});
iface1.update();
Im letting this issue opened cuz the method signature is still not reflecting the data sent.
