app/core/CalendarPushSource.h
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #pragma once | ||
| 2 | |||
| 3 | #include "DavPushSource.h" | ||
| 4 | |||
| 5 | class CalendarSyncCoordinator; | ||
| 6 | |||
| 7 | // Sprint 96: calendars and task lists as a DAV-Push source. A thin adapter | ||
| 8 | // over CalendarSyncCoordinator and its DavSyncScheduler (targeted syncs, | ||
| 9 | // fallback polling window); the coordinator stays the only owner of the | ||
| 10 | // calendar read triggers. | ||
| 11 | class CalendarPushSource final : public DavPushSource { | ||
| 12 | Q_OBJECT | ||
| 13 | public: | ||
| 14 | explicit CalendarPushSource(CalendarSyncCoordinator *calendar, QObject *parent = nullptr); | ||
| 15 | |||
| 16 | 896 | QString kind() const override { return QStringLiteral("calendar"); } | |
| 17 | QList<DavPushSourceCollection> collections(const QString &accountId) const override; | ||
| 18 | int intervalMinutes() const override; | ||
| 19 | void requestSync(const QString &accountId, const QStringList &paths, unsigned reasons) override; | ||
| 20 | void requestAll(unsigned reasons) override; | ||
| 21 | QString storedToken(const QString &accountId, const QString &path) const override; | ||
| 22 | void setPushDontNotifyProvider(std::function<QString(const QString &, const QString &)> provider) override; | ||
| 23 | void setFallback(const QString &accountId, bool failing) override; | ||
| 24 | bool inFallback(const QString &accountId) const override; | ||
| 25 | bool syncRunning(const QString &accountId) const override; | ||
| 26 | |||
| 27 | CalendarSyncCoordinator *calendar() const { return m_calendar; } | ||
| 28 | |||
| 29 | private: | ||
| 30 | CalendarSyncCoordinator *m_calendar = nullptr; | ||
| 31 | }; | ||
| 32 |