From: Andreas V. <li...@br...> - 2008-12-05 20:30:11
|
Am Fri, 5 Dec 2008 01:45:16 +0100 schrieb Mark: > On Thu, Dec 4, 2008 at 9:23 PM, Andreas Volz <li...@br...> > wrote: > > Am Tue, 2 Dec 2008 22:37:29 +0100 schrieb Mark: > > > >> Hey, > >> > >> First: i posted this message on the normal dbus list as well > >> before i knew that this list was around. Sorry for that. > >> > >> I'm currently trying to figure out how i can make a simple DBus > >> program with the c++ wrapper. > >> I have no previous dbus experience or anythiong dbus related. > >> > >> using the c api from dbus is not an option for me. > >> > >> What i try to do (just as a begin) is reading out just some message > >> from dbus (lets say the currently played song in Rhythmbox or just > >> any app that sends something to dbus). > >> i just can't find any examples of how to use the c++ wrapper and > >> read a dbus message... > >> > >> I hope anyone can help me with this. > > > > Hello Mark, > > > > there're several examples beside the dbus-c++ source: > > > > examples> ls > > echo glib Makefile Makefile.in properties_get_set > > ecore hal Makefile.am properties > > > > The "ecore" example isn't in the main repo. But you should start > > with the "echo" example to understand its basic usage. If you got > > this running and understood the basic usage maybe you could ask more > > detailed questions. Feel free to ask if there're still questions... > > > > regards > > Andreas > > Hi, > > Those examples are exactly the issue. it's nowhere being made clear > how i can add my own function in there like Hello(bla bla) which is in > there. if i add a function i have to ad it to various other files but > i don't know which ones.. that's not being said in those files or > anything close to it. the documentation of the examples is just.. > missing.. There's a XML file beside e.g. the hello example. Maybe you should start to learn more about the introspection format: http://dbus-cplusplus.wiki.sourceforge.net/Introspection+Format Try the simple case with one method/signal, play with parameters and see what the generator creates as output. If you understood the introspection format half of the work is done. You've to use the generated header files in your application. I really have to write a beginners guide in the wiki. If you've success be welcome to write something. > So i can't get anywhere with those examples. > I still prefer using that dbus-c++ lib but i'm thinking of just using > the c api since that does have decent documentation and more users > where i can ask for help. Please help to change the situation! :) regards Andreas |