Mpris Songbird Extension
Tags: C Plus Plus Javascript- Example DBus Code
- DBus Documentation
- Mozilla Extension Docs
- Mozilla String guide
- Extension page on SongbirdNest.com
There isn't a whole ton I can say really. The project was a great success! It took me about 3 weeks of working after finishing my day at work, though I in no way worked every night. I started off by writing a simple C class to send dbus messages via the dbus C bindings. From there I figured out how to compile an XPCOM extension against Mozilla's developement libraries. Then combines them both and wrote the Javascript.
The extension uses a combination of Javascript and C++, because C++ is needed for the DBus bindings and Javascript is easier to debug and requires no compiling. Because I was using several songbird specific classes, if I'd wanted to do it in C++, I'd have had to get the songbird source/headers. I decided that it would be easier in the long run to compile against the standard Mozilla xulrunner libraries and write the Songbird specific code in Javascript.
I've linked to the files on the side here and put up a bunch of links that I found super helpful for Mozilla and dbus stuff. If you have any questions, take a look at the source and feel free to email me.
On 2009-06-17 18:14:02:
Project complete! Check it out!