[calendar] Implement SyncToken for Calendar service

Authored by poboiko on Mar 20 2020, 1:41 PM.

Description

[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:

  1. Create an EventFetchJob with no syncToken
  2. When job is finished, fetch its syncToken
  3. Create a new job, using previous syncToken
  4. Only incremental changes are obtained

Reviewers: dvratil

Subscribers: kde-pim

Tags: KDE PIM

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

Details

Committed
poboikoMar 20 2020, 2:30 PM
Differential Revision
D28162: [calendar] Implement SyncToken for Calendar service
Parents
R477:7f7d461d1c73: [calendar] Fix event move URL
Branches
Unknown
Tags
Unknown