magpie/API/requests/poll.h

26 lines
575 B
C
Raw Permalink Normal View History

2024-01-20 21:17:21 +00:00
// 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;
};
}