[calendar] Implement SyncToken for Calendar service
Summary:
This is an implementation of a syncToken Google API feature (see T8376: [Calendar] Implement support for syncToken, and
https://developers.google.com/calendar/v3/reference/events/list) which is a
native way to perform incremental updates.
When EventFetchJob is created, we can provide it with a token by calling
job->setSyncToken(token), which will be used as a parameter for fetching.
Note: some of the parameters are incompatible with syncToken (timeMin,
timeMax, updatedMin, see API link above), so if token is provided, those
parameters get ignored.
When the job is finished, the next sync token can be obtained via
job->syncToken(). This token then can be used for the next EventFetchJob.
Test Plan:
- Create an EventFetchJob with no syncToken
- When job is finished, fetch its syncToken
- Create a new job, using previous syncToken
- Only incremental changes are obtained
Reviewers: dvratil
Subscribers: kde-pim
Tags: KDE PIM
Differential Revision: https://phabricator.kde.org/D28162