Re: Determine connectivity status



Dan Williams wrote, On 03/12/2010 12:35 AM:
On Wed, 2010-03-10 at 20:07 +0100, Mads Kiilerich wrote:
Mads Kiilerich wrote, On 03/10/2010 02:17 PM:
How can an application be made aware of the machines "online/offline"
status? I assume there is a fine dbus method/event - but which?
Reply to self and archive: It is called State in NM lingo and can be
accessed as below.
Yup, you found it...  Out of curiosity, how easy was it to find out the
answer?

7! ;-)

In the beginning I wasn't sure how NMs "having a network connection" concept was, how explicit it was and how useful it was. I didn't know what to google for - and you know how most google hits for NM looks like ...

"state" could mean so many things. I think I thought it was referring to the daemon itself, not to how successful it had been managing the network. "The overall state of the NetworkManager daemon" is IMHO not exact. Something like "The overall (connectivity) state of the NetworkManager connections" would have helped me more.

The documentation in spec-08.html looks nice, but the deep nesting and lots of whitespace makes it easy to get lost. (Minor comment: It would help a bit if method names GetDevices were marked up as code.)

Try to search through the page for "state" - there are lots of hits, but they are referring to different kind of states, and it isn't obvious what the context is.

Once I know what to look for and code against there were no problem. Especially with the help of d-feet. (D-bus hint: Accept that you _do_ have to repeat yourself all the time ...)

/Mads



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]