Posts Tagged ‘dbus’

DBus Testing Framework

Monday, March 6th, 2006

Hello dbus coders out here, i’m pleased to announce the first release of a dbus testing framework.

What is it ?

You may know that testing dbus services or debugging dbus clients is not always easy since it involves creating services and wiring up things you don’t really want to do in a test script.

This framework (quite a buzzword) allows you to easily setup and run dbus services and clients in a linear python script.

Originally written for the telepathy framework (a inter process communication framework aiming to bring conversation as first-class desktop citizen) (don’t laugh rob), an heavy consumer of dbus stuff, and sponsored by Collabora.

Libnotify Sample

Just to have a teaser, here is a libnotify test sample, it opens a notification bubble and then close it and checks that the closing reason and id is correct:

self["notif"] = ("org.freedesktop.Notifications",
"/org/freedesktop/Notifications",
"org.freedesktop.Notifications")

id = self["notif"]["Notify"].call("notifname", 0, "", "title", "content",[],{}, 0)

self["notif"]["NotificationClosed"].listen()
self["notif"]["CloseNotification"].call(id)
results = self["notif"]["NotificationClosed"].wait()

assert results[0] == id

Documentation and download

You can access the full explanation and tutorial and documentation on this page. For the moment the framework is a single python file available here and you can download the sample tests file to get an idea of what kind of scripts can be written.

DBus tutorial, another one

Sunday, August 14th, 2005

I finished writing this nice little tutorial about dbus activation, i hope it will be useful at least for some people !

If there are any corrections/infos/additions to make feel free to contact me, also if you want to include it somewhere, feel free, credit is appreciated 🙂

Epiphany hacking

Wednesday, April 6th, 2005

These days I have been hacking on an epiphany extension poetically called “rss”.
It allows to retreive feeds in any page, and register these feeds in your favorite feed reader (so it’s not a firefox-like handling of rss feeds) !

All this can be accomplished using dbus, patching popular feed readers such as straw, liferea or blam (i did that, the patches can be found in their respective bugzillas). I had to patch epiphany and epiphany-extensions, so it is quite bleeding-edge to test.

Here is a screenshot of the thing:
mozilla.org feeds
Mozilla.org feeds, notice the statusbar icons..

a random blog feeds
A random blog feeds, notice that noth atom AND rss are selected, by default rss are selected before atom ones.

The feeds are selected “intelligently” so normally blogs that have atom/rss versions only have one of the two selected, while sites providing more feeds are selected entirely.

To signal that feeds are present, a little icon appears in the status bar, and a menu entry appears to make the dialog appear.