Introduce (optional) KAccounts integration into akonadi_control

Authored by dvratil on Sep 11 2019, 7:15 AM.

Description

Introduce (optional) KAccounts integration into akonadi_control

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

Reviewers: vkrause

Reviewed By: vkrause

Subscribers: kde-pim

Tags: KDE PIM

Differential Revision: https://phabricator.kde.org/D23856

Details

Committed
dvratilSep 11 2019, 7:15 AM
Reviewer
vkrause
Differential Revision
D23856: Introduce (optional) KAccounts integration into akonadi_control
Parents
R165:31659e318e9e: GIT_SILENT: minor qstring optimization
Branches
Unknown
Tags
Unknown