Monday, May 17, 2010

Telepathy and Ubuntu

As mentioned in my last post about the Ubuntu Developer Summit last week, there's interest in Ubuntu for using the Telepathy framework in more of their projects. There was discussion of using Telepathy in their telephony stack and also on some Ubuntu-specific changes in Empathy, but I was most interested in their effort to make easy and fun to code collaborative applications.

As part of the work on Sugar that Collabora is sponsoring, I also have a big interest in making as easy as possible to use the telepathy framework, be it in applications or in desktop components such as the Sugar shell.

For now, I'm going to help kickstart the process by implementing some toy-like API on top of Telepathy in the form of widgets for Quickly, here is the branch.

This is what we came up with in the brainstorming session about the "easy and fun" API:
class Client(Boo):
def __init__(self):
self.tube_handler = MessageTubeHandler("tubey")
self.tube_handler.connect("handle-channel", self.on_handle_channel)

def on_handle_channel(self, tube):
self.image_tube = tube
tube.connect("message-received", self.on_message_received)

def on_message_received(self, tube, msg):
if "img_url" in msg:

def on_contact_selected(self, contact, account):
self.image_tube = tp.MessageTube(contact, account)
msg = {}
msg["note"] = self.label1.get_text()

def on_tube_initiated(self, tube):
if "kenvandine" in

As PyGI is not packaged yet for Ubuntu and for the sake of getting started quickly, I'm going to do the initial implementation with the old telepathy-python bindings, but I hope that whatever gets into the Maverick release uses the much nicer telepathy-glib API through introspection.

Also will be trying to keep an eye on the collaboration needs of Sugar activities so more people benefit from this effort.

No comments: