RE: Newbie: how to talk to NM by C or C++? Need some hints.



Also try experimenting with qdbus & dbus-send, these are really helping me
find my way around. If you can get the dbus-send to work you should be
able to transfer this to c/perl/python easily

Some examples below:
qdbus --system org.freedesktop.NetworkManager /org/freedesktop/NetworkManager
dbus-send --system --print-reply --dest="org.freedesktop.NetworkManager" /org/freedesktop/NetworkManagerSettings "org.freedesktop.NetworkManagerSettings.ListConnections"


-----Original Message-----
From: networkmanager-list-bounces gnome org [mailto:networkmanager-list-bounces gnome org] On Behalf Of Marc Herbert
Sent: 30 November 2010 14:17
To: networkmanager-list gnome org
Subject: Re: Newbie: how to talk to NM by C or C++? Need some hints.

Le 30/11/2010 09:27, inthawadee C. a écrit :
> 
> I have read many pages recommended in archives such as
> 
> http://projects.gnome.org/NetworkManager/developers/spec.html#org.freedesktop.NetworkManager.AccessPoint <http:///>
> http://projects.gnome.org/NetworkManager/developers/libnm-glib/08/NMActiveConnection.html#NM-ACTIVE-CONNECTION-SERVICE-NAME--CAPS <http:///>
> 
> but still have no clue how to talk to NetworkManager. 
> 
> I just want to use the mentioned parameters as input factors of my
> experiment implemented in C.  Previously, I worked with iwconfig and
> iwlist but want to try the program through Network Manager.

Sorry for stating the obvious but... first you need to be familiar
with D-Bus, did you realize that?

  http://dbus.freedesktop.org/doc/dbus-tutorial.html

> How can I get the current statuses such as signal strength and
> maximum bit rate (also connection status). of wireless access point
> from NetworkManager by programming in C/C++?

For such tasks you might spend less time parsing the output of
"nmcli" or "cnetworkmanager". Especially if your code is just an
"experiment".



_______________________________________________
networkmanager-list mailing list
networkmanager-list gnome org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


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