DBus for MCabber
I desperately wanted this, so I coded it over a night. Comment on this post if you want a tarball.
Now I can set the mcabber status to the current playing track from mocp using a script.
I desperately wanted this, so I coded it over a night. Comment on this post if you want a tarball.
Now I can set the mcabber status to the current playing track from mocp using a script.
I’m trying to learn to use DBus GLib API in C and found it difficult to get good documentation or a tutorial easily. The D-Bus Tutorial will help you write the simplest possible DBus program and then leaves you! Atleast, so I felt. So here’s some code that I wrote to illustrate subscribing to remote signals using DBus. I’m a newbie programmer, so please suggest better code and help me!
You can find the code here: Signals with DBus.
Sorry for the inconvenience of having it as .odt – wordpress doesn’t allow extensions like .txt or .cpp. However the file doesn’t have any formatting and you can just open it with any text editor, or mv it to a .cpp
a) Your really jobless to setup a blog
b) Use the pkg-config tool to include the required libs/cflags. Put this line in your gcc command (anywhere)
`pkg-config –cflags –libs dbus-1 dbus-glib-1`
jon 5:24 am on November 25, 2008 Permalink | Log in to Reply
Yes please!
Akarsh Simha 2:45 pm on November 25, 2008 Permalink | Log in to Reply
Badly-made Patch against MCabber 0.9.5: http://members.bas.org.in/kstar/mcabber-patch.tar.gz
0.9.5 – modified version: http://members.bas.org.in/kstar/mcabber-edit.tar.bz2
The src/expt directory in the modified tarball has a ‘remote control’ that I wrote. I googled for one of those mocp scripts and found something that used the output of mocp -i to monitor the current playing track.
Of course, the code here is extremely unclean – please bear with me!