Questions regarding Akonadi resource development

Daniel Vrátil dvratil at kde.org
Wed Jul 15 08:32:31 BST 2020


On Thursday, 9 July 2020 13:06:43 CEST Shashwat Jolly wrote:
> Hey everyone!

Hi Shashwat,

sorry for the late response.

> 
> I have been working on a new resource for Akonadi that would enable
> syncing EteSync contacts, calendar and tasks to Kontact. I'm happy to
> report that Kontact now implements a two-way client for EteSync. It
> supports fetching data as well as creating, modifying and deleting
> contacts, events and tasks. We can also create new EteSync address
> books, calendars and task lists right from within Kontact. I had some
> questions regarding the same:
> 
> 1. As I understand it, we can make a new collection (address book,
> calendar or task list) by selecting the "Add folder" option in
> KOrganizer and KAddressBook. However, KOrganizer creates a virtual
> collection when I do this, which does not allow me to add items to it.
> There seems to be a similar problem with other resources as well (I
> tried out the Google resource). Is there any workaround for this?

This will happen if the parent Collection's content mimetypes contain 
Collection::virtualMimeType() - in other words if the parent collection 
indicates it can contain virtual collection, a virtual collection is created 
by default.

Since I believe you do not need virtual collections in EteSync, you can 
probably remove the content mimetype and "Add folder" should always create a 
non-virtual Collection.

> 
> 2. How do I select between creating a new calendar and creating a new
> task list from within KOrganizer? By default, a new calendar is
> created. Or is there another way to create the different collections?

At this moment I don't think it's possible to distinguish this. Sounds like it 
could be a nice small improvement to KOrganizer.

> 3. Currently, I have the resource configuration dialog implemented
> within a subclass of Akonadi::AgentConfigurationBase. It is a single
> dialog that takes as input the username, password, server url and
> encryption password. I have to implement 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.
> Is this multi-step configuration possible using
> AgentConfigurationBase, or should it be done another way?

You could implement the dialog in a way that it recognizes whether it's a 
first-time configuration, which switches it to some sort of a "wizard" mode, 
where you get to input server URL, username and password on one screen, click 
"Next" and, after some background communication takes place, shows a screen 
where to enter encryption password. On the other hand if the dialog knows it's 
already configured it would show everything on a single screen as most other 
resources do now.

/Dan

> 
> Thanks


-- 
Daniel Vrátil
www.dvratil.cz | dvratil at kde.org
IRC: dvratil on Freenode (#kde, #kontact, #akonadi, #fedora-kde)

GPG Key: 0x4D69557AECB13683
Fingerprint: 0ABD FA55 A4E6 BEA9 9A83 EA97 4D69 557A ECB1 3683
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20200715/ae2fc621/attachment-0001.sig>


More information about the kde-pim mailing list