Last month, I wrote about adding EteSync address books to Kontact. Since then, I have been working on extending this functionality to calendars and tasks as well. I am happy to report that fetching and modifying EteSync contacts, calendars and tasks is now possible in Kontact. If you want to test it out, skip to ”Testing the resource” section below. You can read on for updates on the project:
When a new EteSync address book or calendar is added to Kontact, a configuration dialog pops up, asking you to enter your EteSync server URL, username, password and existing password. Entering the relevant credentials will fetch your contacts and calendars/tasks in KAddressBook and KOrganizer.
|Fetching EteSync contacts, calendar and tasks|
Kontact now implements a two-way client for EteSync. Not only does it support fetching data, but we can also use it to create, modify and delete contacts, events and tasks. We can even create new EteSync address books, calendars and task lists right from within Kontact.
Here, all changes made using KOrganiser are reflected in the EteSync web client too.
|Creating an event|
|Deleting an event|
Testing the resource is as simple as cloning and building
KDE PIM Runtime from this repo.
- Clone the repo
- Build the project using
- Restart Akonadi (
- Open Kontact and add a new EteSync address book or calendar
- The configuration dialogue is implemented by subclassing the
- There are basically three handler classes for the three different types -
TaskHandler. Classes CalendarHandler and TaskHandler are derived from the abstract class
CalendarTaskBaseHandler, which contains a lot of code common for handling calendars and tasks.
- The configuration dialog is currently a single dialog that takes as input the username, password, server url and encryption password. It should ideally be a two-step process, where the user enters the server url, username, password and then, on successful login, the encryption password should be entered. This is needed to initialise new accounts which do not have encryption passwords set up.
- A lot of stuff needs to be looked up and implemented - like setting up the collection refresh rates, the Akonadi cache policies and Akonadi resource status signals.