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
parent
31659e31
Please register or sign in to comment