2018-07-07 13:08:57 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <functional>
|
|
|
|
|
|
|
|
class QNetworkReply;
|
|
|
|
|
|
|
|
namespace chatterino {
|
|
|
|
|
2018-08-11 22:23:06 +02:00
|
|
|
class Outcome;
|
2018-07-07 13:08:57 +02:00
|
|
|
class NetworkResult;
|
|
|
|
|
2018-08-02 14:23:27 +02:00
|
|
|
using NetworkSuccessCallback = std::function<Outcome(NetworkResult)>;
|
2019-09-19 19:03:50 +02:00
|
|
|
using NetworkErrorCallback = std::function<void(NetworkResult)>;
|
2018-07-07 13:08:57 +02:00
|
|
|
using NetworkReplyCreatedCallback = std::function<void(QNetworkReply *)>;
|
|
|
|
|
|
|
|
enum class NetworkRequestType {
|
|
|
|
Get,
|
|
|
|
Post,
|
|
|
|
Put,
|
|
|
|
Delete,
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace chatterino
|