mirror of
https://github.com/RGBCube/serenity
synced 2025-05-25 17:25:08 +00:00

Derivatives of Core::Object should be constructed through ClassName::construct(), to avoid handling ref-counted objects with refcount zero. Fixing the visibility means that misuses like this are more difficult.
36 lines
956 B
C++
36 lines
956 B
C++
/*
|
|
* Copyright (c) 2021, Jan de Visser <jan@de-visser.net>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/HashMap.h>
|
|
#include <LibIPC/ClientConnection.h>
|
|
#include <SQLServer/SQLClientEndpoint.h>
|
|
#include <SQLServer/SQLServerEndpoint.h>
|
|
|
|
namespace SQLServer {
|
|
|
|
class ClientConnection final
|
|
: public IPC::ClientConnection<SQLClientEndpoint, SQLServerEndpoint> {
|
|
C_OBJECT(ClientConnection);
|
|
|
|
public:
|
|
virtual ~ClientConnection() override;
|
|
|
|
virtual void die() override;
|
|
|
|
static RefPtr<ClientConnection> client_connection_for(int client_id);
|
|
|
|
private:
|
|
explicit ClientConnection(NonnullRefPtr<Core::LocalSocket>, 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;
|
|
};
|
|
|
|
}
|