File indexing completed on 2024-05-19 05:57:22

0001 // SPDX-FileCopyrightText: 2023 Plata Hill <plata.hill@kdemail.net>
0002 // SPDX-License-Identifier: LGPL-2.1-or-later
0003 
0004 #pragma once
0005 
0006 #include "types.h"
0007 
0008 #include <QByteArray>
0009 #include <QObject>
0010 #include <QUrl>
0011 
0012 #include <functional>
0013 
0014 class DataProvider : public QObject
0015 {
0016     Q_OBJECT
0017 public:
0018     virtual ~DataProvider() = default;
0019 
0020     virtual void get(const QUrl &url, std::function<void(const QByteArray &)> callback, std::function<void(const Error &)> errorCallback = nullptr) const = 0;
0021 };