/* * Copyright (c) 2021, Jan de Visser * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include #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); void set_database_path(DeprecatedString); Function on_disconnect; private: explicit ConnectionFromClient(NonnullOwnPtr, int client_id); virtual Messages::SQLServer::ConnectResponse connect(DeprecatedString const&) override; virtual Messages::SQLServer::PrepareStatementResponse prepare_statement(SQL::ConnectionID, DeprecatedString const&) override; virtual Messages::SQLServer::ExecuteStatementResponse execute_statement(SQL::StatementID, Vector const& placeholder_values) override; virtual void disconnect(SQL::ConnectionID) override; DeprecatedString m_database_path; }; }