1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 22:17:44 +00:00

Userland: Rename IPC ClientConnection => ConnectionFromClient

This was done with CLion's automatic rename feature and with:
find . -name ClientConnection.h
    | rename 's/ClientConnection\.h/ConnectionFromClient.h/'

find . -name ClientConnection.cpp
    | rename 's/ClientConnection\.cpp/ConnectionFromClient.cpp/'
This commit is contained in:
Itamar 2022-02-25 12:18:30 +02:00 committed by Andreas Kling
parent efac862570
commit 3a71748e5d
137 changed files with 896 additions and 896 deletions

View file

@ -8,7 +8,7 @@ compile_ipc(InspectorServer.ipc InspectorServerEndpoint.h)
compile_ipc(InspectorClient.ipc InspectorClientEndpoint.h)
set(SOURCES
ClientConnection.cpp
ConnectionFromClient.cpp
main.cpp
InspectableProcess.cpp
InspectorServerEndpoint.h

View file

@ -6,28 +6,28 @@
#include "InspectableProcess.h"
#include <AK/JsonObject.h>
#include <InspectorServer/ClientConnection.h>
#include <InspectorServer/ConnectionFromClient.h>
namespace InspectorServer {
static HashMap<int, RefPtr<ClientConnection>> s_connections;
static HashMap<int, RefPtr<ConnectionFromClient>> s_connections;
ClientConnection::ClientConnection(NonnullOwnPtr<Core::Stream::LocalSocket> socket, int client_id)
: IPC::ClientConnection<InspectorClientEndpoint, InspectorServerEndpoint>(*this, move(socket), client_id)
ConnectionFromClient::ConnectionFromClient(NonnullOwnPtr<Core::Stream::LocalSocket> socket, int client_id)
: IPC::ConnectionFromClient<InspectorClientEndpoint, InspectorServerEndpoint>(*this, move(socket), client_id)
{
s_connections.set(client_id, *this);
}
ClientConnection::~ClientConnection()
ConnectionFromClient::~ConnectionFromClient()
{
}
void ClientConnection::die()
void ConnectionFromClient::die()
{
s_connections.remove(client_id());
}
Messages::InspectorServer::GetAllObjectsResponse ClientConnection::get_all_objects(pid_t pid)
Messages::InspectorServer::GetAllObjectsResponse ConnectionFromClient::get_all_objects(pid_t pid)
{
auto process = InspectableProcess::from_pid(pid);
if (!process)
@ -40,7 +40,7 @@ Messages::InspectorServer::GetAllObjectsResponse ClientConnection::get_all_objec
return response;
}
Messages::InspectorServer::SetInspectedObjectResponse ClientConnection::set_inspected_object(pid_t pid, u64 object_id)
Messages::InspectorServer::SetInspectedObjectResponse ConnectionFromClient::set_inspected_object(pid_t pid, u64 object_id)
{
auto process = InspectableProcess::from_pid(pid);
if (!process)
@ -53,7 +53,7 @@ Messages::InspectorServer::SetInspectedObjectResponse ClientConnection::set_insp
return true;
}
Messages::InspectorServer::SetObjectPropertyResponse ClientConnection::set_object_property(pid_t pid, u64 object_id, String const& name, String const& value)
Messages::InspectorServer::SetObjectPropertyResponse ConnectionFromClient::set_object_property(pid_t pid, u64 object_id, String const& name, String const& value)
{
auto process = InspectableProcess::from_pid(pid);
if (!process)
@ -68,7 +68,7 @@ Messages::InspectorServer::SetObjectPropertyResponse ClientConnection::set_objec
return true;
}
Messages::InspectorServer::IdentifyResponse ClientConnection::identify(pid_t pid)
Messages::InspectorServer::IdentifyResponse ConnectionFromClient::identify(pid_t pid)
{
auto process = InspectableProcess::from_pid(pid);
if (!process)
@ -81,7 +81,7 @@ Messages::InspectorServer::IdentifyResponse ClientConnection::identify(pid_t pid
return response;
}
Messages::InspectorServer::IsInspectableResponse ClientConnection::is_inspectable(pid_t pid)
Messages::InspectorServer::IsInspectableResponse ConnectionFromClient::is_inspectable(pid_t pid)
{
auto process = InspectableProcess::from_pid(pid);
if (!process)

View file

@ -9,21 +9,21 @@
#include <AK/HashMap.h>
#include <InspectorServer/InspectorClientEndpoint.h>
#include <InspectorServer/InspectorServerEndpoint.h>
#include <LibIPC/ClientConnection.h>
#include <LibIPC/ConnectionFromClient.h>
namespace InspectorServer {
class ClientConnection final
: public IPC::ClientConnection<InspectorClientEndpoint, InspectorServerEndpoint> {
C_OBJECT(ClientConnection);
class ConnectionFromClient final
: public IPC::ConnectionFromClient<InspectorClientEndpoint, InspectorServerEndpoint> {
C_OBJECT(ConnectionFromClient);
public:
~ClientConnection() override;
~ConnectionFromClient() override;
virtual void die() override;
private:
explicit ClientConnection(NonnullOwnPtr<Core::Stream::LocalSocket>, int client_id);
explicit ConnectionFromClient(NonnullOwnPtr<Core::Stream::LocalSocket>, int client_id);
virtual Messages::InspectorServer::GetAllObjectsResponse get_all_objects(pid_t) override;
virtual Messages::InspectorServer::SetInspectedObjectResponse set_inspected_object(pid_t, u64 object_id) override;

View file

@ -8,6 +8,6 @@
namespace SymbolServer {
class ClientConnection;
class ConnectionFromClient;
}

View file

@ -5,11 +5,11 @@
*/
#include "InspectableProcess.h"
#include <InspectorServer/ClientConnection.h>
#include <InspectorServer/ConnectionFromClient.h>
#include <LibCore/EventLoop.h>
#include <LibCore/LocalServer.h>
#include <LibCore/System.h>
#include <LibIPC/ClientConnection.h>
#include <LibIPC/ConnectionFromClient.h>
#include <LibIPC/MultiServer.h>
#include <LibMain/Main.h>
@ -19,7 +19,7 @@ ErrorOr<int> serenity_main(Main::Arguments)
TRY(Core::System::pledge("stdio unix accept"));
auto server = TRY(IPC::MultiServer<InspectorServer::ClientConnection>::try_create("/tmp/portal/inspector"));
auto server = TRY(IPC::MultiServer<InspectorServer::ConnectionFromClient>::try_create("/tmp/portal/inspector"));
auto inspectables_server = TRY(Core::LocalServer::try_create());
TRY(inspectables_server->take_over_from_system_server("/tmp/portal/inspectables"));