plasma-framework/examples/dataengines/customDataContainers/httpContainer.h

39 lines
615 B
C
Raw Normal View History

2013-09-04 11:48:06 +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
#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;
}
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:
const QUrl m_url;
QPointer<KJob> m_job;
2013-09-04 11:48:06 +02:00
QByteArray m_data;
};
#endif