Steve Frécinaux

Mathusalem’s birth

After finishing my exams last week and having some other issues to deal with, I finally had some time to do some work on my Summer of Code project, namely the “Long running task manager”.

I think it’s way too early to make a preview release or even to make the git repository available for anyone, but I hope I will have something to show before the end of the week. Currently, I concentrated on defining a good DBus API and on starting coding the daemon.

Finally, the API will present two types of objects : the manager and the tasks. The former will obviously be unique, and will basically allow the client to register a task, to do simple queries and to monitor the task registering. The latter will be defined as an aggregate of a few interfaces, depending on what kind the task actually is. There are the main Task interface, and optional FileOperation, DriveOperation, and so on. The list of interfaces that will be available is not complete yet and will depend on what use case I’ll encounter or think of. Don’t hesitate to tell me what use case you’re thinking about ;-).

My operational DBus understanding has been growing quickly, due mailly to Iain’s and Raphael’s tutorials. Currently, the daemon can register itself on the bus, ensure there is only a single instance of it, show an icon in the notification area (including a menu allowing to shut down the daemon), and respond to a dbus method call by creating a new Task object and registering it on the session bus. The widget to display the task list hasn’t been written yet but you can explore the tasks with dbus-viewer.

Thus the obligatory screenshots will actually be logs. Several calls of the RegisterTask method (the parameters are the title, the owner and the length of the task)…

dbus-send --dest=org.gnome.Mathusalem        \
          --print-reply                      \
          /org/gnome/Mathusalem              \
          org.gnome.Mathusalem.RegisterTask  \
          string:test string:bash uint32:100

…makes the daemon register as many task objects on the bus…

MalemDBusFactory Initialized
MalemTrayIcon Initialized
MalemTask Initialized
task registered: /org/gnome/Mathusalem/Tasks/00000000
MalemTask Initialized
Task registered: /org/gnome/Mathusalem/Tasks/00000001
MalemTask Initialized
Task registered: /org/gnome/Mathusalem/Tasks/00000002

…which makes these available for third party apps:

Screenshot: dbus object tree

Well, it will be more friendly once it will also be available for the user, won’t it?

Ah, and last but not least, Kosai found a great codename for the project: Mathusalem, which is the French name of Methuselah.

See you next days for other great adventures far away from Guadec!