2019-04-07 14:36:10 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <AK/ByteBuffer.h>
|
2019-05-28 11:53:16 +02:00
|
|
|
#include <AK/Retainable.h>
|
2019-04-07 14:36:10 +02:00
|
|
|
|
2019-04-10 22:28:10 +02:00
|
|
|
class CNetworkResponse : public Retainable<CNetworkResponse> {
|
2019-04-07 14:36:10 +02:00
|
|
|
public:
|
2019-04-10 22:28:10 +02:00
|
|
|
virtual ~CNetworkResponse();
|
2019-04-07 14:36:10 +02:00
|
|
|
|
|
|
|
|
bool is_error() const { return m_error; }
|
|
|
|
|
const ByteBuffer& payload() const { return m_payload; }
|
|
|
|
|
|
|
|
|
|
protected:
|
2019-04-10 22:28:10 +02:00
|
|
|
explicit CNetworkResponse(ByteBuffer&&);
|
2019-04-07 14:36:10 +02:00
|
|
|
|
|
|
|
|
bool m_error { false };
|
|
|
|
|
ByteBuffer m_payload;
|
|
|
|
|
};
|