Kgapi

createjob.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_CREATEJOB_H
24 #define LIBKGAPI2_CREATEJOB_H
25 
26 #include "job.h"
27 #include "kgapicore_export.h"
28 
29 namespace KGAPI2 {
30 
39 class KGAPICORE_EXPORT CreateJob: public KGAPI2::Job
40 {
41  Q_OBJECT
42 
43  public:
44 
50  explicit CreateJob(QObject* parent = nullptr);
51 
58  explicit CreateJob(const KGAPI2::AccountPtr &account, QObject* parent = nullptr);
59 
63  ~CreateJob() override;
64 
68  virtual ObjectsList items() const;
69 
70  protected:
71 
80  void dispatchRequest(QNetworkAccessManager* accessManager,
81  const QNetworkRequest& request,
82  const QByteArray& data, const QString& contentType) override;
83 
90  void handleReply(const QNetworkReply *reply, const QByteArray& rawData) override;
91 
95  void aboutToStart() override;
96 
116  virtual ObjectsList handleReplyWithItems(const QNetworkReply *reply,
117  const QByteArray &rawData);
118 
119 
120  private:
121  class Private;
122  Private * const d;
123  friend class Private;
124 
125 };
126 
127 } // namespace KGAPI2
128 
129 #endif // LIBKGAPI2_CREATEJOB_H
Abstract superclass for all jobs that create new objects on the server.
Definition: createjob.h:39
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
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Jun 5 2020 23:01:09 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.