[Telepathy] Connectivity manager

Will Stephenson wstephenson at kde.org
Mon Feb 4 11:29:16 PST 2008


On Friday 25 January 2008 15:33:26 Simon McVittie wrote:
> On Fri, 25 Jan 2008 at 14:24:41 +0200, Alberto Mardegan wrote:
> > Is there in Linux some unified way to get notified of connectivity
> > events? (where by connectivity I also include phone, bluetooth, vpn...)
> 
> You may be able to monitor the existence of IP routes using netlink?
> "There is a default route" is the best representation I can think of for
> "we can get on the Internet", and has the advantage of being completely
> generic. NetworkManager uses netlink via libnl in a GLib application, so
> it could make a useful example.
> 
> On systems that use NetworkManager, you can listen for D-Bus signals,
> but we must avoid assuming that all desktop systems use NM.

Right, we do this already in KDE with a (you guessed it) 
abstraction/aggregation layer around system specific network backends in 
Solid::Networking.  Maybe the right place to solve this problem is actually 
belowh Telepathy?  Have a look at our implementation, maybe there is 
something useful for you there.

Interface for app authors:
http://websvn.kde.org/trunk/KDE/kdelibs/solid/solid/networking.h?view=markup

Connectivity manager service implementation:
http://websvn.kde.org/trunk/KDE/kdebase/workspace/solid/networking/

> Most network connection mechanisms have some way to run scripts when
> connectivity changes. This may be the only thing we can do for VPNs.
> 
> > We need a way to classify the various types of connections, and bind
> > them to the mission-control Accounts (or maybe to the Connection 
Managers?).

FYI, NM 0.7 does classify connections and we'll expose an (abstracted) view on 
them in Solid::Control::Networking in KDE 4.1

Will


More information about the Telepathy mailing list