Quick Check: calling ListDevices method of Adapter in DBus-GLib-C++

"David Stockwell" <[email protected]>
Newsgroups gmane.linux.bluez.devel
Message-ID <025301c8bd58$5066df70$6701a8c0@freqonedev>
It appears to me that the proper GType that matches up with an Array of Object Paths is:

dbus_g_type_get_collection("GSList", DBUS_TYPE_G_OBJECT_PATH)

This returns a pointer to a singly-linked list (GSList), which one may iterate through using g_slist_foreach, which calls an iterator function for each Object Path in the list.

A gpointer passed to the iterator function contains the Device path: (e.g., /hci0/dev_00_00_00_00_00_00), and may be cast to a (const char *) for processing as a C/C++ string.

Do I have this right, or is there a better way to attack this?

DS

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.