Introduce (optional) KAccounts integration into akonadi_control
ClosedPublic

Authored by dvratil on Sep 10 2019, 8:42 PM.

Details

Summary

The akonadi_control process now reacts to a new KAccounts account being
added, removeda or modified.

When a new KAccounts account is added it looks for the KAccounts services
provided by the account (e.g. contacts, calendars, ...) and it checks the
service details for which agent type can handle this service (e.g. the
google-calendar service can be handled by the akonadi_googlecalendar_resource)
and then it creates a new instance of the resource and calls its new
org.kde.Akonadi.Accounts DBus interface to set the KAccounts account ID,
so the resource can configure itself.

When a KAccounts account is removed, it scans all current resources if
they implement the org.kde.Akonadi.Accounts interface and if they are
configured for the removed account - and if so, it removes them.

When a particular service is enabled or disabled its treated as if it
were added or removed, so the respective resource is added or removed.

Test Plan

Implemented the org.kde.Akonadi.Accounts service in the Google resources
and tested that creating a new account in the Online Accounts KCM causes
the Akonadi Google resources to be created and configured for the given
account. Removing the account from Online Accounts KCM removes the agents.

Video of the proof of concept: https://youtu.be/7plCbvfQlA8

Diff Detail

Repository
R165 Akonadi
Branch
dev/online-accounts
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 16352
Build 16370: arc lint + arc unit
dvratil created this revision.Sep 10 2019, 8:42 PM
Restricted Application added a project: KDE PIM. · View Herald TranscriptSep 10 2019, 8:42 PM
Restricted Application added a subscriber: kde-pim. · View Herald Transcript
dvratil requested review of this revision.Sep 10 2019, 8:42 PM
vkrause accepted this revision.Sep 10 2019, 9:49 PM
This revision is now accepted and ready to land.Sep 10 2019, 9:49 PM