Hey everyone! The month-long Community Bonding period of GSoC ‘20 has ended, and with it begins the exciting phase of beginning work on our projects. My project, EteSync sync backend for Akonadi, will add support for syncing users’ contacts, calendars and tasks to Kontact. Here are the insights I’ve gained about the project, as well as my plans for the upcoming phase.
Resources in Akonadi
All address books, calendars and tasks that can be added to KAddressbook and KOrganizer (KDE PIM apps) are because of Akonadi Resources. Resources are processes that get data from a server, and serve it to KDE PIM apps through Akonadi. To this end, Akonadi provides an abstract class called ResourceBase. To create a new resource, one must subclass ResourceBase and implement the relevant functions. This makes the job of a resource developer quite simple, as compared to manually storing data in Akonadi and dealing with a ton of additional things.
|Akonadi Resources in action|
All resources have their code in the KDE PIM Runtime repository.
So, to create a new resource:
- Create a new subdirectory for the resource
- Get kdepim-runtime to build, with any external libraries you might need for your resource (restart Akonadi to see any changes)
- Implement the resource
I have already added the new resource subdirectory to the project, and the project is building successfully. Now we get an option to select EteSync while adding a new address book.
|Adding a new EteSync address book|
I am now working on implementing read-only sync for contacts. This will allow you to select EteSync while adding a new address book in Kontact. After logging in to your account, all your EteSync contacts will be fetched from the server.
Upcoming work includes implementation to push changes to the server. This needs to be extended to calendars and tasks as well.
Hope to be back with more updates soon!