D28162: [calendar] Implement SyncToken for Calendar service
Igor Poboiko
noreply at phabricator.kde.org
Fri Mar 20 13:43:15 GMT 2020
poboiko created this revision.
poboiko added a reviewer: dvratil.
Herald added a project: KDE PIM.
poboiko requested review of this revision.
REVISION SUMMARY
This is an implementation of a `syncToken` Google API feature (see T8376: [Calendar] Implement support for syncToken <https://phabricator.kde.org/T8376>, 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
REPOSITORY
R477 KGAPI Library
BRANCH
syncToken (branched from master)
REVISION DETAIL
https://phabricator.kde.org/D28162
AFFECTED FILES
src/calendar/calendarservice.cpp
src/calendar/eventfetchjob.cpp
src/calendar/eventfetchjob.h
src/core/types.h
To: poboiko, dvratil
Cc: kde-pim, fbampaloukas, dcaliste, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20200320/44e17e12/attachment.html>
More information about the kde-pim
mailing list