[SailfishDevel] Nemo DBus typedCall

Dylan Van Assche dylan.van.assche at protonmail.com
Sat Jun 10 09:45:03 UTC 2017


Hi devs,

I'm playing around with the Nemo DBus QML plugin but I'm a little bit stuck when using the function typedCall().

DBusInterface

{

id

:

wifi

bus

:

DBus.SystemBus

service

:

'net.connman'

path

:

'/net/connman/technology/wifi'

iface

:

'net.connman.Technology'

signalsEnabled

:

true

function

setState

(powered)

{

var

value

=

powered

?

'true'

:

'false'

typedCall(

'SetProperty'

,

{

'type'

:

's'

,

'value'

:

value

},

function

()

{

console

.log(

'[INFO]

wifi

power

state set

'

)

},

function

()

{

console

.log(

'[ERROR]

wifi

power

state failed

'

)

})

}

function

propertyChanged

(name,

value)

{

console

.log(

"WiFi

changed

NAME=%1

VALUE=%2"

.arg(

name

).arg(

value

))

}

}

But it seems that I'm doing something wrong when I try to enable/disable wifi. It's my first attempts with DBus but I have managed to read the signals with the plugin without any issues.

Cheers,
Dylan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20170610/f9b31205/attachment.html>


More information about the Devel mailing list