mirror-chatterino2/src/common/NetworkCommon.hpp

25 lines
431 B
C++
Raw Normal View History

#pragma once
#include <functional>
2018-08-02 14:23:27 +02:00
#include "Common.hpp"
class QNetworkReply;
namespace chatterino {
class NetworkResult;
2018-08-02 14:23:27 +02:00
using NetworkSuccessCallback = std::function<Outcome(NetworkResult)>;
using NetworkErrorCallback = std::function<bool(int)>;
using NetworkReplyCreatedCallback = std::function<void(QNetworkReply *)>;
enum class NetworkRequestType {
Get,
Post,
Put,
Delete,
};
} // namespace chatterino