DBus Help...

Iraq Ja deadpixel01 at gmail.com
Sat Sep 17 11:20:35 PDT 2011


Hi all,

I'm a new developer looking to write an application that interacts
with Network Manager. I've attached my code to this e-mail, it
compiles but doesn't work.

There are two lines in my code which I'm not certain about and
couldn't find answers online.

1. Line 16:   connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
    I'm not sure about the fist parameter, I used the DBusBusType
DBUS_BUS_SYSTEM because I couldn't find anything Network Manager
specific.

2. Line 38:     if (!dbus_g_proxy_call (proxy, "GetAccessPoints()",
&error, G_TYPE_INVALID, name_list, G_TYPE_INVALID))
    this is where my program crashes.

On the Network Manager DBus specification
(http://projects.gnome.org/NetworkManager/developers/api/09/spec.html#org.freedesktop.NetworkManager.Device.Wireless)

It states the prototype for the fuction I'm calling as:

GetAccessPoints ( ) → ao

Get the list of access points visible to this device.

Returns

access_points - aoList of access point object paths

I matched the function parameters to above as best I can, but no
matter what combination I used, I couldn't get it to work.

Any advice/help would be much appreciated.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dbus.c
Type: text/x-csrc
Size: 1130 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20110917/78bf3847/attachment.c>


More information about the dbus mailing list