26 lines
575 B
C
26 lines
575 B
C
|
// SPDX-FileCopyrightText: 2023 Yury Gubich <blue@macaw.me>
|
||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||
|
|
||
|
#pragma once
|
||
|
|
||
|
#include "request.h"
|
||
|
|
||
|
namespace Request {
|
||
|
|
||
|
class Poll : public Request {
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
|
Poll (const QUrl& baseUrl, bool clear = false);
|
||
|
|
||
|
protected:
|
||
|
void onSuccess (const QVariantMap& data) override;
|
||
|
void onError (const QString& error, const std::optional<QVariantMap>& data) override;
|
||
|
|
||
|
static QUrl createUrl(QUrl base, const QString& path, bool clear);
|
||
|
|
||
|
static const std::map<QString, QMetaType::Type> updatesStructure;
|
||
|
};
|
||
|
|
||
|
}
|