mirror of
https://github.com/RGBCube/serenity
synced 2025-10-28 06:52:06 +00:00
This makes it more symmetrical with adopt_own() (which is used to create a NonnullOwnPtr from the result of a naked new.)
32 lines
633 B
C++
32 lines
633 B
C++
/*
|
|
* Copyright (c) 2020, The SerenityOS developers.
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/String.h>
|
|
#include <LibCore/NetworkResponse.h>
|
|
|
|
namespace Gemini {
|
|
|
|
class GeminiResponse : public Core::NetworkResponse {
|
|
public:
|
|
virtual ~GeminiResponse() override;
|
|
static NonnullRefPtr<GeminiResponse> create(int status, String meta)
|
|
{
|
|
return adopt_ref(*new GeminiResponse(status, meta));
|
|
}
|
|
|
|
int status() const { return m_status; }
|
|
String meta() const { return m_meta; }
|
|
|
|
private:
|
|
GeminiResponse(int status, String);
|
|
|
|
int m_status { 0 };
|
|
String m_meta;
|
|
};
|
|
|
|
}
|