2021-04-23 22:45:52 +02:00
|
|
|
/*
|
2021-04-28 22:46:44 +02:00
|
|
|
* Copyright (c) 2020, the SerenityOS developers.
|
2021-04-23 22:45:52 +02:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <AK/Badge.h>
|
|
|
|
#include <LibCore/Forward.h>
|
|
|
|
#include <LibGemini/Forward.h>
|
|
|
|
#include <RequestServer/Request.h>
|
|
|
|
|
|
|
|
namespace RequestServer {
|
|
|
|
|
|
|
|
class GeminiRequest final : public Request {
|
|
|
|
public:
|
|
|
|
virtual ~GeminiRequest() override;
|
2024-02-24 14:36:57 +01:00
|
|
|
static NonnullOwnPtr<GeminiRequest> create_with_job(Badge<GeminiProtocol>, ConnectionFromClient&, NonnullRefPtr<Gemini::Job>, NonnullOwnPtr<Core::File>&&, i32 request_id);
|
2021-04-23 22:45:52 +02:00
|
|
|
|
2022-02-02 19:21:55 +03:30
|
|
|
Gemini::Job const& job() const { return *m_job; }
|
2021-09-18 03:48:22 +04:30
|
|
|
|
2024-03-18 16:22:27 +13:00
|
|
|
virtual URL::URL url() const override { return m_job->url(); }
|
2022-01-26 22:35:50 +01:00
|
|
|
|
2021-04-23 22:45:52 +02:00
|
|
|
private:
|
2024-02-24 14:36:57 +01:00
|
|
|
explicit GeminiRequest(ConnectionFromClient&, NonnullRefPtr<Gemini::Job>, NonnullOwnPtr<Core::File>&&, i32 request_id);
|
2021-04-23 22:45:52 +02:00
|
|
|
|
2023-12-16 17:49:34 +03:30
|
|
|
virtual void set_certificate(ByteString certificate, ByteString key) override;
|
2021-04-23 22:45:52 +02:00
|
|
|
|
2022-02-02 19:21:55 +03:30
|
|
|
NonnullRefPtr<Gemini::Job> m_job;
|
2021-04-23 22:45:52 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|