/* * Copyright (c) 2021, Jan de Visser * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include namespace SQLServer { class ConnectionFromClient final : public IPC::ConnectionFromClient { C_OBJECT(ConnectionFromClient); public: virtual ~ConnectionFromClient() override = default; virtual void die() override; static RefPtr client_connection_for(int client_id); private: explicit ConnectionFromClient(NonnullOwnPtr, int client_id); virtual Messages::SQLServer::ConnectResponse connect(String const&) override; virtual Messages::SQLServer::SqlStatementResponse sql_statement(int, String const&) override; virtual void statement_execute(int) override; virtual void disconnect(int) override; }; }