maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Trying to know if the device is locked using dbus-send (https://talk.maemo.org/showthread.php?t=55998)

calvin_42 2010-06-12 15:35

Trying to know if the device is locked using dbus-send
 
Hi!

Here is my question : how to check if the device is locked using dbus. I don't want to trigger an action when the signal "locked" is send, I just want to check the current state using dbus-send.

So the following code locks the device :

Code:

dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_tklock_mode_change string:"locked"
Which makes dbus send the following signal :

Code:

signal sender=:1.9 -> dest=(null destination) serial=342 path=/com/nokia/mce/signal; interface=com.nokia.mce.signal; member=tklock_mode_ind
  string "locked"

But I have no idea which method to call to get the status. I would like to run something like :

Code:

dbus-send --system --type=method_call --print-reply --dest=com.nokia.mce /com/nokia/mce/ string:"com.nokia.mce.signal.tklock_mode_ind"
Any idea ? Thanks

qwerty12 2010-06-12 15:36

Re: Trying to know if the device is locked using dbus-send
 
http://talk.maemo.org/showthread.php...902#post708902

calvin_42 2010-06-12 15:44

Re: Trying to know if the device is locked using dbus-send
 
Quote:

Originally Posted by qwerty12 (Post 712070)

Once again, you are my saviour qwerty12! :)

Thanks a lot! Where can I find this kind of information in the future? Like this doc.

qwerty12 2010-06-12 15:46

Re: Trying to know if the device is locked using dbus-send
 
Quote:

Originally Posted by calvin_42 (Post 712077)
Once again, you are my saviour qwerty12! :)

:)

Quote:

Originally Posted by calvin_42 (Post 712077)
Thanks a lot! Where can I find this kind of information in the future? Like this doc.

Despite being closed source, MCE does have a nice page listing the signals it'll emit and the D-Bus methods that are available for you to call: http://maemo.org/api_refs/5.0/5.0-fi...-names_8h.html


All times are GMT. The time now is 09:13.

vBulletin® Version 3.8.8