Kgapi

fetchjob.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_FETCHJOB_H
10 #define LIBKGAPI2_FETCHJOB_H
11 
12 #include "job.h"
13 #include "kgapicore_export.h"
14 
15 namespace KGAPI2 {
16 
24 class KGAPICORE_EXPORT FetchJob : public KGAPI2::Job
25 {
26  Q_OBJECT
27 
28  public:
29 
35  explicit FetchJob(QObject* parent = nullptr);
36 
43  explicit FetchJob(const KGAPI2::AccountPtr &account, QObject* parent = nullptr);
44 
48  ~FetchJob() override;
49 
59  virtual ObjectsList items() const;
60 
61  protected:
62 
71  void dispatchRequest(QNetworkAccessManager* accessManager, const QNetworkRequest& request,
72  const QByteArray& data, const QString& contentType) override;
73 
80  void handleReply(const QNetworkReply *reply, const QByteArray& rawData) override;
81 
85  void aboutToStart() override;
86 
106  virtual ObjectsList handleReplyWithItems(const QNetworkReply *reply,
107  const QByteArray &rawData);
108 
109  private:
110  class Private;
111  Private * const d;
112  friend class Private;
113 
114 };
115 } // namespace KGAPI2
116 
117 #endif // LIBKGAPI2_FETCHJOB_H
Abstract base class for all jobs in LibKGAPI.
Definition: job.h:40
A job to fetch a single map tile described by a StaticMapUrl.
Definition: blog.h:16
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-2020 The KDE developers.
Generated on Thu Dec 3 2020 23:11:56 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.