Puneet's Blog
  • Home
  • About Me
  • Planet KDE
  • GSoC
Follow

GSoC Update!

Jun28
2012
3 Comments Written by Puneet

Hello all KDE Fans,

As my project is concentrated on dbus tubes, I had to develop an application which implemented the dbus tubes. KWhiteboard was the perfect application for that. So I removed all the extra features that were not needed and I was left with a simple application for testing purposes.

My next task was to implement the org.freedesktop.DBus.Peer interface. I had to implement the Ping method and the GetMachineId method in it. At first, I took my time understanding the concepts of interfaces and adaptors. At the very first place, it did not take much time to implement the methods using the session bus, as in Ping method I just had to write a kDebug output and in retrieving the machine ID I used the QDBusConnection::localMachineId () method. Initially, it was working at its best. But as soon as I started testing it with the DBus Tubes by connecting it with a telepathy service, it gave me a lot of problems, the most significant one being explained later in the text. Now, Daniele even found out that the Peer interface was already implemented in QT and was not shown in the Introspect because Daniele’s patch was yet to be released in another QT 4.8.X may be.

One main problem that I faced was the QDBusInterface using blocking DBus calls in constructor. In this case Daniele suggested me to split my program into two halves where one of them would be registered for handling outgoing dbus tubes and the other for incoming dbus tubes.Machine will know by itself about the tube to be handled by respective half and will pass the channels with the right properties. At first it seems pretty easy when you/to work on the interfaces with the session bus, but it creates a lot of problem when it comes to the peer-to-peer DBus. After both, the applications were working successfully on the same machine,thanks to Daniele, I finally got back implementing the interface and didnt took much time as it was already implemented in the QT.

Then it was time to implement the org.freedesktop.DBus.ObjectManager Interface. First job was to send a signal to the other machine that was connected with the DBus Connection; if a new object was registered, some properties are changed and a new interface is added or removed. To send a signal, I couldn’t just write “emit interfaceAdded();”. For this I needed an adaptor that implements the interface on the DBus, but you cannot know when an object is registered, unless it is directly implemented in QT. Therefore some methods, that the applications will use when they register one object on DBus, were needed to tell the interface to emit the signals.
On the other side, an interface (QDBusAbstractInterface) was needed to listen to the signals and to call the methods.I will be explaining the whole process in a new post with much better explanation.

Now as I have completed all this, I have the KWhiteboard ready to test it. As Daniele suggested, I will try to make a tabbed KWhiteboard where when one side opens a new tab, a new object will get registered on the dbus.The adaptor will emit the signal, the proxy will receive it and the program that will be listening to that signal, will open a new tab on the otherside as well.

I have just started writing blog. Any type of suggestions or comments are welcome.

Regards,
Puneet

Posted in GSoC, Planet KDE - Tagged dbus, dbus adaptors, dbus interface, dbus signals, GSoC, objectmanager interface, Peer interface
SHARE THIS Twitter Facebook Delicious StumbleUpon E-mail
← GSoC Project: Enhancement to peer-to-peer DBus for Telepathy DBus Tubes

3 Comments

  1. Ishita's Gravatar Ishita
    June 29, 2012 at 5:54 pm | Permalink

    Nice start!

    Reply
    • Puneet's Gravatar Puneet
      June 29, 2012 at 7:31 pm | Permalink

      thanks :) any suggestions??

      Reply
  2. Roger Pixley's Gravatar Roger Pixley
    July 26, 2012 at 9:20 am | Permalink

    What’s the advantage of having peer to peer tubes for Telepathy? Looking like a promising project so far but do you have a branch where we can see the changes to the kwhiteboard?

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

*

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Recent Posts

  • GSoC Update!
  • GSoC Project: Enhancement to peer-to-peer DBus for Telepathy DBus Tubes

Archives

  • June 2012

Categories

  • GSoC
  • Planet KDE

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

Blogroll

  • Akshit Peer
  • Daniele E. Domenichelli
  • David Edmundson
  • Gautam Prabhakar
  • Planet KDE

EvoLve theme by Theme4Press  •  Powered by WordPress Puneet's Blog