Kgapi

filefetchcontentjob.h
1/*
2 * This file is part of LibKGAPI library
3 *
4 * SPDX-FileCopyrightText: 2013 Daniel Vrátil <dvratil@redhat.com>
5 *
6 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7 */
8
9#pragma once
10
11#include "fetchjob.h"
12#include "kgapidrive_export.h"
13
14namespace KGAPI2
15{
16namespace Drive
17{
18
19class KGAPIDRIVE_EXPORT FileFetchContentJob : public KGAPI2::FetchJob
20{
21 Q_OBJECT
22
23public:
24 explicit FileFetchContentJob(const FilePtr &file, const AccountPtr &account, QObject *parent = nullptr);
25 explicit FileFetchContentJob(const QUrl &url, const AccountPtr &account, QObject *parent = nullptr);
26 ~FileFetchContentJob() override;
27
28 [[nodiscard]] QByteArray data() const;
29
30protected:
31 void start() override;
32 void handleReply(const QNetworkReply *reply, const QByteArray &rawData) override;
33 void dispatchRequest(QNetworkAccessManager *accessManager, const QNetworkRequest &request, const QByteArray &data, const QString &contentType) override;
34
35 KGAPI2::ObjectsList handleReplyWithItems(const QNetworkReply *reply, const QByteArray &rawData) override;
36
37private:
38 class Private;
39 Private *const d;
40 friend class Private;
41};
42
43} // namespace Drive
44
45} // namespace KGAPI2
Abstract superclass for all jobs that fetch resources from Google.
Definition fetchjob.h:25
Q_SCRIPTABLE Q_NOREPLY void start()
A job to fetch a single map tile described by a StaticMapUrl.
Definition blog.h:16
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:19:52 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.