Kgapi

fetchjob.h
1 /*
2  * This file is part of LibKGAPI library
3  *
4  * Copyright (C) 2013 Daniel Vrátil <[email protected]>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) version 3, or any
10  * later version accepted by the membership of KDE e.V. (or its
11  * successor approved by the membership of KDE e.V.), which shall
12  * act as a proxy defined in Section 6 of version 3 of the license.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library. If not, see <https://www.gnu.org/licenses/>.
21  */
22 
23 #ifndef LIBKGAPI2_FETCHJOB_H
24 #define LIBKGAPI2_FETCHJOB_H
25 
26 #include "job.h"
27 #include "kgapicore_export.h"
28 
29 namespace KGAPI2 {
30 
38 class KGAPICORE_EXPORT FetchJob : public KGAPI2::Job
39 {
40  Q_OBJECT
41 
42  public:
43 
49  explicit FetchJob(QObject* parent = nullptr);
50 
57  explicit FetchJob(const KGAPI2::AccountPtr &account, QObject* parent = nullptr);
58 
62  ~FetchJob() override;
63 
73  virtual ObjectsList items() const;
74 
75  protected:
76 
85  void dispatchRequest(QNetworkAccessManager* accessManager, const QNetworkRequest& request,
86  const QByteArray& data, const QString& contentType) override;
87 
94  void handleReply(const QNetworkReply *reply, const QByteArray& rawData) override;
95 
99  void aboutToStart() override;
100 
120  virtual ObjectsList handleReplyWithItems(const QNetworkReply *reply,
121  const QByteArray &rawData);
122 
123  private:
124  class Private;
125  Private * const d;
126  friend class Private;
127 
128 };
129 } // namespace KGAPI2
130 
131 #endif // LIBKGAPI2_FETCHJOB_H
Abstract base class for all jobs in LibKGAPI.
Definition: job.h:55
A job to fetch a single map tile described by a StaticMapUrl.
Definition: blog.h:30
Abstract superclass for all jobs that fetch resources from Google.
Definition: fetchjob.h:38
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Jun 5 2020 23:01:10 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.