GSoC week #1

So, GSoC has officially started 🙂 A week has passed already and I have started hacking on my project, kcall. Here is the result of the first week in an image:

KCall screenshot
KCall screenshot

This is a screenshot of what I have coded so far. It presents a contact list in a tree view. The first level of the tree shows the available accounts (here, “gkiagia” refers to my jabber account) and the second level shows the contacts of this account. I also wanted to have one more level for the contact groups, but I haven’t found yet how to get the contact groups using the TelepathyQt4 library. Right clicking the items in that list brings a popup menu with options. For account items, it allows you to set the account status (online, offline, away, etc…) and for contacts, it allows you to call them. The call function is not yet working, though. I expect to spend my next week implementing this functionality.

This is just a draft implementation of the contact list and I don’t expect it to be the same in the final version. There are a couple of things that are still troubling me about it, so I decided to leave it as it is for now, which is usable enough for me, and proceed with implementing making and receiving audio/video calls, which is the most interesting part of the project. Later, I can come back and polish the contact list and the rest of the GUI. (To tell the truth, I don’t like designing GUI’s, so this week I just did the very basics to make it usable for me so that I can forget about it for now and start working on real stuff!)

The implementation was rather easy. Telepathy provides all the stuff I need, so essentially the code does the following: It connects through dbus to the telepathy account manager (I am using mission-control 5 from git as an account manager), it gets the list of available accounts and adds them in the first level of the tree model. For each account then, if the account is connected, it fetches its contacts and adds them in the second level, or else it connects to a signal that notifies it when the account gets online and fetches the contacts when this signal is emitted. In addition, it connects to a couple of other signals to track changes in accounts and contacts, so that it updates the tree when there is some change. The interesting part was implementing the tree. The implementation consists of an abstract “tree model”, which inherits QAbstractItemModel and implements the necessary functions to export a tree, a couple of “tree item” classes, that represent items in that tree, a controller class, which exports actions on the items and handles the popup context menu internally, and an unmodified QTreeView for visualizing the model.

Some of you may wonder now, how does telepathy work? It is rather simple. Different parts of an IM/VoIP client are split into various processes. There are the connection managers, that implement the various protocols (jabber, sip, msn, whatever…), a central account manager that stores all the accounts and the various GUI frontends (there is also the channel dispatcher, but I still haven’t made use of that in kcall and I don’t feel confident talking about how it works, as I don’t really know yet). All of them speak to each other over dbus, so to get information about an account or a contact (like what I did this week) is just a matter of talking to the other processes over dbus and getting the information. This is really cool, because it allows us programmers to reuse code from other projects. For instance, I didn’t write any protocol-specific code for kcall, and this very simple contact list that I wrote can work with *any* protocol for which there is a telepathy connection manager available 🙂 The code was tested with the “gabble” connection manager, which exports the jabber protocol, but I could have used anything else…

So, that’s all I have for now about kcall… I will blog again next week with my progress on making calls 🙂
Stay tuned…


10 thoughts on “GSoC week #1

  1. I wonder, why a separate application instead of improving Kopete?
    I really like having my contacts together in one interface not having to open 100 applications to talk with people in facebook, gmail, jabber , skype, etc. I just want a “my people online” wherever they login I dont care.

  2. I feel the same, why not implementing this in Kopete? (Besides that, the interface already exists and as you don’t like to design interface… :p)

  3. Absolutely. This really should be implemented in Kopete. Kopete has an, IMO, fantastic GUI, and this would be a great addition an already program.

  4. Screw kopete, that’s multi-protocol done the bad way.

    Would be cool if would become the default KDE IM application at some point because it’s made with QT and it’s only made with for Jabber, BUT with time it’s going to support transports with all the other IM services, which is the right way to do multi-protocol imho.

    Do what you wish, but sooner or later. this GUI won’t have so many users and it will be kicked to the sideways.

  5. @ First 3 commenters:
    Sure, in some kind of dream world it would be great to do this in Kopete (in fact, I hope it will even happen in the real world eventually), but it’s a mammoth task to port it to telepathy – way to much for a summer of code, or even 5 summer of codes…

    So, lets have the benefits of Voice/Video calls over jabber/xmpp-local/sip/msn etc that telepathy can bring us through another app in the meantime, and then in due course much of the work done to modernise KCall can be reused in Kopete.

  6. Well, I like kopete, and I think it`s better than pidgin.
    ( not the configuration part, too confusing ).
    I also prefer this to be integrated in kopete rather than creating a new app.

  7. Ok, I get your point. It is a summer of code, the goal is to reach an objective at the end. So I wish you good luck with it, and I’m looking forward for the final result 😉

  8. and is the contact stuff saved in akonadi and searchable in nepomuk ? and using phonon for sound 🙂 ok just joking 🙂 it’s “a lot” of work to integrate all the different kde frameworks !

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s