2020-05-14 18:34:18 +10:00
|
|
|
/*
|
2022-02-26 10:55:15 -07:00
|
|
|
* Copyright (c) 2020-2022, the SerenityOS developers.
|
2020-05-14 18:34:18 +10:00
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-05-14 18:34:18 +10:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2022-12-04 18:02:33 +00:00
|
|
|
#include <AK/DeprecatedString.h>
|
2020-05-14 18:34:18 +10:00
|
|
|
#include <LibCore/NetworkResponse.h>
|
|
|
|
|
|
|
|
|
|
namespace Gemini {
|
|
|
|
|
|
|
|
|
|
class GeminiResponse : public Core::NetworkResponse {
|
|
|
|
|
public:
|
2022-02-26 10:55:15 -07:00
|
|
|
virtual ~GeminiResponse() override = default;
|
2022-12-04 18:02:33 +00:00
|
|
|
static NonnullRefPtr<GeminiResponse> create(int status, DeprecatedString meta)
|
2020-05-14 18:34:18 +10:00
|
|
|
{
|
2021-04-23 16:46:57 +02:00
|
|
|
return adopt_ref(*new GeminiResponse(status, meta));
|
2020-05-14 18:34:18 +10:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int status() const { return m_status; }
|
2022-12-04 18:02:33 +00:00
|
|
|
DeprecatedString meta() const { return m_meta; }
|
2020-05-14 18:34:18 +10:00
|
|
|
|
|
|
|
|
private:
|
2022-12-04 18:02:33 +00:00
|
|
|
GeminiResponse(int status, DeprecatedString);
|
2020-05-14 18:34:18 +10:00
|
|
|
|
|
|
|
|
int m_status { 0 };
|
2022-12-04 18:02:33 +00:00
|
|
|
DeprecatedString m_meta;
|
2020-05-14 18:34:18 +10:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|