On Thu, 2010-04-29 at 21:33 -0700, Nguyen Canh Toan wrote: > Dear Dan, > > I do understand these fundamental concepts. Thank for your useful tutorial > anyway. > > I think my problem is I do not understand object as well as interface > hierarchy exposed by NetworkManager DBus service. > > According to API spec here > (http://projects.gnome.org/NetworkManager/developers/spec-07.html#org.freede > sktop.NetworkManager) and > (http://live.gnome.org/NetworkManager/SystemSetting). I understand it as > below: > > 1. Service DBus named org.freedesktop.NetworkManagerSystemSetting and > org.freedesktop.NetworkManagerUserSetting is one which I need to connect to > inorder to get connection configuration.
Right, these are the service names/bus names that you need to talk to. > 2. Get org.freedesktop.NetworkManagerSettings interface of service proxy Correct; *both* services implement this common interface, since they provide essentially the same information. This way you only write the code once, and you can talk to both services easily. > 3. Invoke ListConnection() on returned interface. I think you mean ListConnections(), but yes. > It seems that your API spec isn't very clear so newcomers, like me, get > confused when doing with this. Yeah, I think what would be helpful is a general overview in the spec or such about how the pieces fit together, possibly with a diagram and some code examples. I've done a bit of that and I'm about to post something to my blog, which we can then rework into some documentation. There are various pages around that explain things, but mostly general overviews and concepts and not really with code examples. Here's one I whipped up yesterday: http://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/examples/python/list-connections.py There's a lot of improvement possible here, especially with examples. > Please instruct me how to get used particularly this service. Or please make > your spec more clearly. I shall try. Contributions and constructive criticism welcome, like you've done above by pointing out that it's not clear how to talk to the settings services. Dan _______________________________________________ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list