1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:48:11 +00:00

LibIPC: Remove unnecessary IPC::ServerConnection::handshake()

This is no longer used by any of our IPC pairs.
This commit is contained in:
Andreas Kling 2021-05-23 09:46:05 +02:00
parent 2eceabdcfd
commit c1c252ddb2
25 changed files with 1 additions and 71 deletions

View file

@ -33,7 +33,6 @@ int main(int argc, char** argv)
auto app = GUI::Application::construct(argc, argv); auto app = GUI::Application::construct(argc, argv);
auto audio_client = Audio::ClientConnection::construct(); auto audio_client = Audio::ClientConnection::construct();
audio_client->handshake();
TrackManager track_manager; TrackManager track_manager;

View file

@ -27,7 +27,6 @@ int main(int argc, char** argv)
auto app = GUI::Application::construct(argc, argv); auto app = GUI::Application::construct(argc, argv);
auto audio_client = Audio::ClientConnection::construct(); auto audio_client = Audio::ClientConnection::construct();
audio_client->handshake();
if (pledge("stdio recvfd sendfd rpath thread", nullptr) < 0) { if (pledge("stdio recvfd sendfd rpath thread", nullptr) < 0) {
perror("pledge"); perror("pledge");

View file

@ -178,7 +178,6 @@ void ServerConnectionWrapper::create_connection()
VERIFY(m_connection.is_null()); VERIFY(m_connection.is_null());
m_connection = m_connection_creator(); m_connection = m_connection_creator();
m_connection->set_wrapper(*this); m_connection->set_wrapper(*this);
m_connection->handshake();
} }
ServerConnection* ServerConnectionWrapper::connection() ServerConnection* ServerConnectionWrapper::connection()

View file

@ -37,10 +37,6 @@ public:
async_greet(m_project_path); async_greet(m_project_path);
} }
virtual void handshake() override
{
}
WeakPtr<LanguageClient> language_client() { return m_current_language_client; } WeakPtr<LanguageClient> language_client() { return m_current_language_client; }
const String& project_path() const { return m_project_path; } const String& project_path() const { return m_project_path; }

View file

@ -18,17 +18,12 @@ class InspectorServerClient final
C_OBJECT(InspectorServerClient); C_OBJECT(InspectorServerClient);
public: public:
virtual void handshake() override
{
}
virtual ~InspectorServerClient() override = default; virtual ~InspectorServerClient() override = default;
private: private:
InspectorServerClient() InspectorServerClient()
: IPC::ServerConnection<InspectorClientEndpoint, InspectorServerEndpoint>(*this, "/tmp/portal/inspector") : IPC::ServerConnection<InspectorClientEndpoint, InspectorServerEndpoint>(*this, "/tmp/portal/inspector")
{ {
handshake();
} }
virtual void dummy() override { } virtual void dummy() override { }

View file

@ -14,10 +14,6 @@ ClientConnection::ClientConnection()
{ {
} }
void ClientConnection::handshake()
{
}
void ClientConnection::enqueue(const Buffer& buffer) void ClientConnection::enqueue(const Buffer& buffer)
{ {
for (;;) { for (;;) {

View file

@ -20,7 +20,6 @@ class ClientConnection : public IPC::ServerConnection<AudioClientEndpoint, Audio
public: public:
ClientConnection(); ClientConnection();
virtual void handshake() override;
void enqueue(const Buffer&); void enqueue(const Buffer&);
bool try_enqueue(const Buffer&); bool try_enqueue(const Buffer&);

View file

@ -37,11 +37,6 @@ auto Launcher::Details::from_details_str(const String& details_str) -> NonnullRe
class LaunchServerConnection : public IPC::ServerConnection<LaunchClientEndpoint, LaunchServerEndpoint> class LaunchServerConnection : public IPC::ServerConnection<LaunchClientEndpoint, LaunchServerEndpoint>
, public LaunchClientEndpoint { , public LaunchClientEndpoint {
C_OBJECT(LaunchServerConnection) C_OBJECT(LaunchServerConnection)
public:
virtual void handshake() override
{
}
private: private:
LaunchServerConnection() LaunchServerConnection()
: IPC::ServerConnection<LaunchClientEndpoint, LaunchServerEndpoint>(*this, "/tmp/portal/launch") : IPC::ServerConnection<LaunchClientEndpoint, LaunchServerEndpoint>(*this, "/tmp/portal/launch")

View file

@ -16,11 +16,6 @@ class ClipboardServerConnection : public IPC::ServerConnection<ClipboardClientEn
, public ClipboardClientEndpoint { , public ClipboardClientEndpoint {
C_OBJECT(ClipboardServerConnection); C_OBJECT(ClipboardServerConnection);
public:
virtual void handshake() override
{
}
private: private:
ClipboardServerConnection() ClipboardServerConnection()
: IPC::ServerConnection<ClipboardClientEndpoint, ClipboardServerEndpoint>(*this, "/tmp/portal/clipboard") : IPC::ServerConnection<ClipboardClientEndpoint, ClipboardServerEndpoint>(*this, "/tmp/portal/clipboard")

View file

@ -18,10 +18,6 @@ class NotificationServerConnection : public IPC::ServerConnection<NotificationCl
friend class Notification; friend class Notification;
public: public:
virtual void handshake() override
{
}
virtual void die() override virtual void die() override
{ {
m_notification->connection_closed(); m_notification->connection_closed();

View file

@ -19,11 +19,6 @@ WindowManagerServerConnection& WindowManagerServerConnection::the()
return *s_connection; return *s_connection;
} }
void WindowManagerServerConnection::handshake()
{
// :^)
}
void WindowManagerServerConnection::window_state_changed(i32 wm_id, i32 client_id, i32 window_id, void WindowManagerServerConnection::window_state_changed(i32 wm_id, i32 client_id, i32 window_id,
i32 parent_client_id, i32 parent_window_id, bool is_active, bool is_minimized, bool is_modal, i32 parent_client_id, i32 parent_window_id, bool is_active, bool is_minimized, bool is_modal,
bool is_frameless, i32 window_type, String const& title, Gfx::IntRect const& rect, Optional<i32> const& progress) bool is_frameless, i32 window_type, String const& title, Gfx::IntRect const& rect, Optional<i32> const& progress)

View file

@ -20,10 +20,8 @@ public:
WindowManagerServerConnection() WindowManagerServerConnection()
: IPC::ServerConnection<WindowManagerClientEndpoint, WindowManagerServerEndpoint>(*this, "/tmp/portal/wm") : IPC::ServerConnection<WindowManagerClientEndpoint, WindowManagerServerEndpoint>(*this, "/tmp/portal/wm")
{ {
handshake();
} }
virtual void handshake() override;
static WindowManagerServerConnection& the(); static WindowManagerServerConnection& the();
private: private:

View file

@ -55,7 +55,7 @@ WindowServerConnection::WindowServerConnection()
void WindowServerConnection::fast_greet(Gfx::IntRect const&, Core::AnonymousBuffer const&, String const&, String const&) void WindowServerConnection::fast_greet(Gfx::IntRect const&, Core::AnonymousBuffer const&, String const&, String const&)
{ {
// NOTE: This message is handled in handshake(). // NOTE: This message is handled in the constructor.
} }
void WindowServerConnection::update_system_theme(Core::AnonymousBuffer const& theme_buffer) void WindowServerConnection::update_system_theme(Core::AnonymousBuffer const& theme_buffer)

View file

@ -17,7 +17,6 @@ class WindowServerConnection
, public WindowClientEndpoint { , public WindowClientEndpoint {
C_OBJECT(WindowServerConnection) C_OBJECT(WindowServerConnection)
public: public:
virtual void handshake() override { }
static WindowServerConnection& the(); static WindowServerConnection& the();
private: private:

View file

@ -33,8 +33,6 @@ public:
VERIFY(this->socket().is_connected()); VERIFY(this->socket().is_connected());
} }
virtual void handshake() = 0;
virtual void die() override virtual void die() override
{ {
// Override this function if you don't want your app to exit if it loses the connection. // Override this function if you don't want your app to exit if it loses the connection.

View file

@ -20,10 +20,6 @@ void Client::die()
on_death(); on_death();
} }
void Client::handshake()
{
}
void Client::dummy() void Client::dummy()
{ {
} }

View file

@ -30,8 +30,6 @@ class Client final
C_OBJECT(Client); C_OBJECT(Client);
public: public:
virtual void handshake() override;
Optional<DecodedImage> decode_image(const ByteBuffer&); Optional<DecodedImage> decode_image(const ByteBuffer&);
Function<void()> on_death; Function<void()> on_death;

View file

@ -12,11 +12,6 @@ namespace Protocol {
RequestClient::RequestClient() RequestClient::RequestClient()
: IPC::ServerConnection<RequestClientEndpoint, RequestServerEndpoint>(*this, "/tmp/portal/request") : IPC::ServerConnection<RequestClientEndpoint, RequestServerEndpoint>(*this, "/tmp/portal/request")
{
handshake();
}
void RequestClient::handshake()
{ {
} }

View file

@ -21,8 +21,6 @@ class RequestClient
C_OBJECT(RequestClient); C_OBJECT(RequestClient);
public: public:
virtual void handshake() override;
template<typename RequestHashMapTraits = Traits<String>> template<typename RequestHashMapTraits = Traits<String>>
RefPtr<Request> start_request(const String& method, const String& url, const HashMap<String, String, RequestHashMapTraits>& request_headers = {}, ReadonlyBytes request_body = {}); RefPtr<Request> start_request(const String& method, const String& url, const HashMap<String, String, RequestHashMapTraits>& request_headers = {}, ReadonlyBytes request_body = {});

View file

@ -11,11 +11,6 @@ namespace Protocol {
WebSocketClient::WebSocketClient() WebSocketClient::WebSocketClient()
: IPC::ServerConnection<WebSocketClientEndpoint, WebSocketServerEndpoint>(*this, "/tmp/portal/websocket") : IPC::ServerConnection<WebSocketClientEndpoint, WebSocketServerEndpoint>(*this, "/tmp/portal/websocket")
{
handshake();
}
void WebSocketClient::handshake()
{ {
} }

View file

@ -21,8 +21,6 @@ class WebSocketClient
C_OBJECT(WebSocketClient); C_OBJECT(WebSocketClient);
public: public:
virtual void handshake() override;
RefPtr<WebSocket> connect(const URL&, const String& origin = {}, const Vector<String>& protocols = {}, const Vector<String>& extensions = {}, const HashMap<String, String>& request_headers = {}); RefPtr<WebSocket> connect(const URL&, const String& origin = {}, const Vector<String>& protocols = {}, const Vector<String>& extensions = {}, const HashMap<String, String>& request_headers = {});
u32 ready_state(Badge<WebSocket>, WebSocket&); u32 ready_state(Badge<WebSocket>, WebSocket&);

View file

@ -15,7 +15,6 @@ WebContentClient::WebContentClient(OutOfProcessWebView& view)
: IPC::ServerConnection<WebContentClientEndpoint, WebContentServerEndpoint>(*this, "/tmp/portal/webcontent") : IPC::ServerConnection<WebContentClientEndpoint, WebContentServerEndpoint>(*this, "/tmp/portal/webcontent")
, m_view(view) , m_view(view)
{ {
handshake();
} }
void WebContentClient::die() void WebContentClient::die()
@ -24,10 +23,6 @@ void WebContentClient::die()
on_web_content_process_crash(); on_web_content_process_crash();
} }
void WebContentClient::handshake()
{
}
void WebContentClient::did_paint(const Gfx::IntRect&, i32 bitmap_id) void WebContentClient::did_paint(const Gfx::IntRect&, i32 bitmap_id)
{ {
m_view.notify_server_did_paint({}, bitmap_id); m_view.notify_server_did_paint({}, bitmap_id);

View file

@ -22,8 +22,6 @@ class WebContentClient final
C_OBJECT(WebContentClient); C_OBJECT(WebContentClient);
public: public:
virtual void handshake() override;
Function<void()> on_web_content_process_crash; Function<void()> on_web_content_process_crash;
private: private:

View file

@ -24,7 +24,6 @@ int main(int argc, char** argv)
Core::EventLoop loop; Core::EventLoop loop;
auto audio_client = Audio::ClientConnection::construct(); auto audio_client = Audio::ClientConnection::construct();
audio_client->handshake();
NonnullRefPtr<Audio::Loader> loader = Audio::Loader::create(path); NonnullRefPtr<Audio::Loader> loader = Audio::Loader::create(path);
if (loader->has_error()) { if (loader->has_error()) {
fprintf(stderr, "Failed to load audio file: %s\n", loader->error_string()); fprintf(stderr, "Failed to load audio file: %s\n", loader->error_string());

View file

@ -14,7 +14,6 @@ int main(int argc, char** argv)
{ {
Core::EventLoop loop; Core::EventLoop loop;
auto audio_client = Audio::ClientConnection::construct(); auto audio_client = Audio::ClientConnection::construct();
audio_client->handshake();
bool mute = false; bool mute = false;
bool unmute = false; bool unmute = false;