Kgapi

taskfetchjob.h
1 /*
2  * This file is part of LibKGAPI library
3  *
4  * SPDX-FileCopyrightText: 2013 Daniel Vrátil <[email protected]>
5  *
6  * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7  */
8 
9 #ifndef LIBKGAPI2_TASKFETCHJOB_H
10 #define LIBKGAPI2_TASKFETCHJOB_H
11 
12 #include "fetchjob.h"
13 #include "kgapitasks_export.h"
14 
15 #include <QScopedPointer>
16 
17 namespace KGAPI2 {
18 
26 class KGAPITASKS_EXPORT TaskFetchJob : public KGAPI2::FetchJob
27 {
28  Q_OBJECT
29 
44  Q_PROPERTY(bool fetchDeleted READ fetchDeleted WRITE setFetchDeleted)
45 
46 
56  Q_PROPERTY(bool fetchCompleted READ fetchCompleted WRITE setFetchCompleted)
57 
71  Q_PROPERTY(quint64 fetchOnlyUpdated READ fetchOnlyUpdated WRITE setFetchOnlyUpdated)
72 
86  Q_PROPERTY(quint64 completedMax READ completedMax WRITE setCompletedMax)
87 
101  Q_PROPERTY(quint64 completedMin READ completedMin WRITE setCompletedMin)
102 
116  Q_PROPERTY(quint64 dueMax READ dueMax WRITE setDueMax)
117 
131  Q_PROPERTY(quint64 dueMin READ dueMin WRITE setDueMin)
132 
133  public:
134 
146  explicit TaskFetchJob(const QString &taskListId, const AccountPtr &account,
147  QObject* parent = nullptr);
148 
162  explicit TaskFetchJob(const QString &taskId, const QString &taskListId,
163  const AccountPtr &account, QObject* parent = nullptr);
164 
168  ~TaskFetchJob() override;
169 
175  void setFetchDeleted(bool fetchDeleted = true);
176 
180  bool fetchDeleted() const;
181 
187  void setFetchCompleted(bool fetchCompleted = true);
188 
192  bool fetchCompleted() const;
193 
199  void setFetchOnlyUpdated(quint64 timestamp);
200 
207  quint64 fetchOnlyUpdated();
208 
214  void setCompletedMax(quint64 timestamp);
215 
219  quint64 completedMax() const;
220 
226  void setCompletedMin(quint64 timestamp);
227 
231  quint64 completedMin() const;
232 
238  void setDueMax(quint64 timestamp);
239 
243  quint64 dueMax() const;
244 
250  void setDueMin(quint64 timestamp);
251 
255  quint64 dueMin() const;
256 
257  protected:
258 
262  void start() override;
263 
270  ObjectsList handleReplyWithItems(const QNetworkReply *reply,
271  const QByteArray& rawData) override;
272 
273  private:
274  class Private;
275  QScopedPointer<Private> const d;
276  friend class Private;
277 
278 };
279 
280 } // namespace KGAPI2
281 
282 #endif // LIBKGAPI2_TASKFETCHJOB_H
A job to fetch a single map tile described by a StaticMapUrl.
Definition: blog.h:16
A job to fetch all tasks from given tasklist in user&#39;s Google Tasks account.
Definition: taskfetchjob.h:26
Abstract superclass for all jobs that fetch resources from Google.
Definition: fetchjob.h:24
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Wed Jan 20 2021 23:16:13 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.