[Kde-hardware-devel] Getting IP addy
David Hubner
hubnerd at ntlworld.com
Tue Dec 15 05:08:06 CET 2009
On Monday 14 Dec 2009 06:43:10 Kevin Ottens wrote:
> On Monday 14 December 2009 03:39:03 David Hubner wrote:
> > Is it possible to get the ipaddress for specific network interfaces through
> > solid::control somewhere? I am not being lazy, i just looked through the
> > API docs and could not find it :)
>
> Solid::Control::NetworkInterfaceList
> Solid::Control::NetworkManager::networkInterfaces();
> Solid::Control::IPv4Config Solid::Control::NetworkInterface::ipV4Config();
> QList<IPv4Address> Solid::Control::IPv4Config::addresses();
>
> Using those should do I guess. Putting it all together is left as an exercise
> to the reader. ;-)
>
> Regards.
>
Thanks that did it, i used Solid::Control::NetworkManager::findNetworkInterface(udi); instead as i knew the udi from the Solid::device. Nice easy code to read, the only problem i had was trying to find out how to target the solid control libs in cmake, got that in 5 mins though after looking in svn.
Thanks
--
David Hubner
IRC: hubnerd
MSN: hubnerd at hubnerd.org
ICQ: 24308559
More information about the Kde-hardware-devel
mailing list