1/*
2 This file is part of KDE.
3
4 SPDX-FileCopyrightText: 2011 Laszlo Papp <djszapi@archlinux.us>
5
6 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7 */
8
9#ifndef ATTICA_PUTJOB_H
10#define ATTICA_PUTJOB_H
11
12#include <QNetworkRequest>
13
14#include "attica_export.h"
15#include "atticabasejob.h"
16
17// workaround to get initialization working with gcc < 4.4
18typedef QMap<QString, QString> StringMap;
19
20namespace Attica
21{
22class Provider;
23
24/**
25 * @class PutJob putjob.h <Attica/PutJob>
26 *
27 * Represents a put job.
28 */
29class ATTICA_EXPORT PutJob : public BaseJob
30{
31 Q_OBJECT
32
33protected:
34 PutJob(PlatformDependent *internals, const QNetworkRequest &request, QIODevice *data);
35 PutJob(PlatformDependent *internals, const QNetworkRequest &request, const StringMap &parameters = StringMap());
36 PutJob(PlatformDependent *internals, const QNetworkRequest &request, const QByteArray &byteArray);
37
38private:
39 QNetworkReply *executeRequest() override;
40 void parse(const QString &) override;
41
42 QIODevice *m_ioDevice;
43 QByteArray m_byteArray;
44
45 QString m_responseData;
46 const QNetworkRequest m_request;
47
48 QString m_status;
49 QString m_statusMessage;
50
51 friend class Attica::Provider;
52};
53
54}
55
56#endif
57

source code of attica/src/putjob.h