#6248 HIGH Update.: Presence service is broken with recent NetworkManager
Zarro Boogs per Child
bugtracker at laptop.org
Tue Jan 29 08:28:29 EST 2008
#6248: Presence service is broken with recent NetworkManager
-------------------------------+--------------------------------------------
Reporter: marco | Owner: Collabora
Type: defect | Status: new
Priority: high | Milestone: Update.2
Component: presence-service | Version:
Resolution: | Keywords:
Verified: 0 | Blocking:
Blockedby: |
-------------------------------+--------------------------------------------
Comment(by dcbw):
The D-Bus API for NM has changed quite a bit; but it's easier to
understand. Take a look at
http://svn.gnome.org/viewvc/NetworkManager/trunk/introspection/
you get a nice overview of the D-Bus API. The process for finding the
current IP address is basically:
1) Use the D-Bus properties interface to get the "State" property of
org.freedesktop.NetworkManager
2) If that state is 3 (NM_STATE_CONNECTED) then:
3) Call GetActiveConnections() on org.freedesktop.NetworkManager. This
returns an array of structs as documented in the introspection XML.
4) For each active connection returned, look through the array of devices
that belong to that connection
5) For the first active device object path, use the D-Bus properties
interface to get the "Ip4Address" property of the device
Just repeat the process when the NM state changes.
--
Ticket URL: <http://dev.laptop.org/ticket/6248#comment:2>
One Laptop Per Child <http://dev.laptop.org>
OLPC bug tracking system
More information about the Bugs
mailing list