Re: [Evolution] Current network connection state



On Wed, 2010-06-16 at 23:37 +0200, Raphael Frey wrote:
could someone please explain me how Evolution gets the current network
connection state (going offline when the Internet connection gets down)
and if this would be easy to implement in other mail programmes (like
Sylpheed)? Thanks in advance!

NetworkManager's D-Bus service.  We call its state() method at startup
to get the current network state, and listen for StateChanged signals
thereafter.

The code is here:
http://git.gnome.org/browse/evolution/tree/modules/network-manager/evolution-network-manager.c

If some parts look complex it's only because we're using raw libdbus
calls.  The logic should get much simpler once it's ported to GDBus.




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