2013-09-04 11:48:06 +02:00
|
|
|
/*
|
2020-08-13 21:08:54 +02:00
|
|
|
SPDX-FileCopyrightText: 2011 Aaron Seigo <aseigo@kde.org>
|
|
|
|
|
|
|
|
SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
2013-09-04 11:48:06 +02:00
|
|
|
|
|
|
|
#ifndef HTTPCONTAINER_H
|
|
|
|
#define HTTPCONTAINER_H
|
|
|
|
|
2013-09-04 16:09:01 +02:00
|
|
|
#include <QUrl>
|
|
|
|
|
2013-09-04 11:48:06 +02:00
|
|
|
#include <Plasma/DataContainer>
|
|
|
|
|
|
|
|
namespace KIO
|
|
|
|
{
|
2014-04-26 01:45:47 +02:00
|
|
|
class Job;
|
2018-01-26 15:48:27 +01:00
|
|
|
}
|
2013-09-04 11:48:06 +02:00
|
|
|
|
|
|
|
class HttpContainer : public Plasma::DataContainer
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2017-12-13 07:35:58 +01:00
|
|
|
HttpContainer(const QUrl &url, QObject *parent = nullptr);
|
2013-09-04 11:48:06 +02:00
|
|
|
|
|
|
|
void fetchUrl(bool reload = true);
|
|
|
|
|
|
|
|
private Q_SLOTS:
|
|
|
|
void data(KIO::Job *job, const QByteArray &data);
|
|
|
|
void fetchFinished(KJob *);
|
|
|
|
|
|
|
|
private:
|
2013-09-04 16:09:01 +02:00
|
|
|
const QUrl m_url;
|
2018-08-17 15:43:31 +02:00
|
|
|
QPointer<KJob> m_job;
|
2013-09-04 11:48:06 +02:00
|
|
|
QByteArray m_data;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|