maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Offline mode (https://talk.maemo.org/showthread.php?t=69520)

waelfarouk0 2011-02-08 17:20

Offline mode
 
hello,
Dear All,
How can i check if N900 is in offline mode or normal mode?

C or c++ not QT


kindly advice
Regards
Wael

fahadj2003 2011-02-08 17:58

Re: Offline mode
 
Quote:

Originally Posted by waelfarouk0 (Post 939165)
hello,
Dear All,
How can i check if N900 is in offline mode or normal mode?

C or c++ not QT


kindly advice
Regards
Wael

you will need to open your device which is highly not recommended

Creamy Goodness 2011-02-08 18:30

Re: Offline mode
 
if you want to do it properly, use dbus libraries

http://wiki.maemo.org/Documentation/...per_Guide/DBus

this will work from the command line, but you should figure out which part is which and just send it directly.

/usr/bin/dbus-send --system --type=signal /com/nokia/mce/signal
com.nokia.mce.signal.sig_device_mode_ind string:"flight"

Creamy Goodness 2011-02-08 18:31

Re: Offline mode
 
oh i guess you wanted to check, not change, hmmm...
i'll try to find it

http://maemo.org/api_refs/5.0/beta/m...-names_8h.html

i think flight and offline is the same thing

vi_ 2011-02-08 18:36

Re: Offline mode
 
check wiki for 'phone control', there is a script that returns the current profile.

Creamy Goodness 2011-02-08 18:38

Re: Offline mode
 
script <> programming
he said c or c++
if someone writes a c++ program that uses the shell to run dbus commands, they should not write any apps... lol

waelfarouk0 2011-02-08 21:39

Re: Offline mode
 
Dear All,
Thank you for reply

This sample contain what i need

http://maemo.org/development/trainin...n_html/node12/


Regards
Wael


All times are GMT. The time now is 00:58.

vBulletin® Version 3.8.8