[Kde-pim] Hooks for Akonadi resource using Python

Kevin Krammer kevin.krammer at gmx.at
Thu Aug 18 08:17:17 BST 2011


On Wednesday, 2011-08-17, Mario Santagiuliana wrote:
> In data 17/8/2011 18:30:22, Kevin Krammer ha scritto:
> > The only thing the resource gets on the commandline is its identifier.
> > All other requests, such as configure(), are handled through D-Bus: the
> > code  in AgentBase registers a D-Bus object which exports methods such
> > as configure() and D-Bus calls to that object then result in calls to
> > the configure override in the AgentBase/ResourceBase subclass.
> 
> Wonderful!!! So, if I understand correctly, all Akonadi resources are more
> or less standalone applications and Akonadi interact with the resources
> using D-Bus, isn't?

More or less, yes.
All resources are separate processes, started and stopped by a control process 
called Akonadi Control. Requests/Commands to the resource are done through D-
Bus, e.g, Akonadi Control asking a resource to show its configuration UI by 
calling configure() or Akonadi Server asking a resource for its collections by 
calling retrieveCollections().

The data transfer happens on a separate channel, a direct socket connection 
between resource and Akonadi Server, but that is nicely ecapsulated inside the 
Akonadi client libraries so you don't have to worry about that.

> So...I can interact, for debug and test, with my python resource using d-
> bus too, isn't?

Yes and no.
You can call the D-Bus methods directly but some can only work properly within 
the expected environment, i.e. akonadi_control and akonadiserver running.

> Thank you very much Kevin and sorry for my stupid question, I am new in
> akonadi development and in python too (I am a Php developer...).

Not stupid at all, there are quite some concepts to get to know and understand 
:)

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20110818/167b8dc0/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list