DBUS C++ bindings?

P. Durante shackan at gmail.com
Sun Feb 26 06:54:31 PST 2006


Hi,
I had to use Dbus in a C++ project a while ago and started some rough
"bindings" (using libsigc++) I had to stop working at the end of the
summer because of lack of time, but since the discussion is about how
do tread different data types, the "quick and dirty" solution might be
to "parse" the message at the beginning of the method call, at least
that's how I had to do it (I was quite in a hurry because I knew I
hadn't had much spare time left after summer), for an example use,
check out "HciDevice::GetProperty" here (sorry, as I said the code is
a bit "unpolished"):
http://svn.berlios.de/viewcvs/bluetool/trunk/bin/daemon/src/hci/hci_device.cpp?view=markup

the "bindings" are actually a very thin layer over the low level
C-api, the part where messages are parsed is the Cbus::Message class

http://svn.berlios.de/viewcvs/bluetool/trunk/lib/cbus/include/cbus/cbusmessage.h?view=markup
http://svn.berlios.de/viewcvs/bluetool/trunk/lib/cbus/src/cbusmessage.cpp?view=markup

btw, I have my own mainloop, but it wouldn't be hard to integrate the
one in Glib

regards


More information about the dbus mailing list