Ver Fonte

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

This is no longer used by any of our IPC pairs.
Andreas Kling há 4 anos atrás
pai
commit
c1c252ddb2

+ 0 - 1
Userland/Applications/Piano/main.cpp

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

+ 0 - 1
Userland/Applications/SoundPlayer/main.cpp

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

+ 0 - 1
Userland/DevTools/HackStudio/LanguageClient.cpp

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

+ 0 - 4
Userland/DevTools/HackStudio/LanguageClient.h

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

+ 0 - 5
Userland/DevTools/Inspector/InspectorServerClient.h

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

+ 0 - 4
Userland/Libraries/LibAudio/ClientConnection.cpp

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

+ 0 - 1
Userland/Libraries/LibAudio/ClientConnection.h

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

+ 0 - 5
Userland/Libraries/LibDesktop/Launcher.cpp

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

+ 0 - 5
Userland/Libraries/LibGUI/Clipboard.cpp

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

+ 0 - 4
Userland/Libraries/LibGUI/Notification.cpp

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

+ 0 - 5
Userland/Libraries/LibGUI/WindowManagerServerConnection.cpp

@@ -19,11 +19,6 @@ WindowManagerServerConnection& WindowManagerServerConnection::the()
     return *s_connection;
 }
 
-void WindowManagerServerConnection::handshake()
-{
-    // :^)
-}
-
 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,
     bool is_frameless, i32 window_type, String const& title, Gfx::IntRect const& rect, Optional<i32> const& progress)

+ 0 - 2
Userland/Libraries/LibGUI/WindowManagerServerConnection.h

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

+ 1 - 1
Userland/Libraries/LibGUI/WindowServerConnection.cpp

@@ -55,7 +55,7 @@ WindowServerConnection::WindowServerConnection()
 
 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)

+ 0 - 1
Userland/Libraries/LibGUI/WindowServerConnection.h

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

+ 0 - 2
Userland/Libraries/LibIPC/ServerConnection.h

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

+ 0 - 4
Userland/Libraries/LibImageDecoderClient/Client.cpp

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

+ 0 - 2
Userland/Libraries/LibImageDecoderClient/Client.h

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

+ 0 - 5
Userland/Libraries/LibProtocol/RequestClient.cpp

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

+ 0 - 2
Userland/Libraries/LibProtocol/RequestClient.h

@@ -21,8 +21,6 @@ class RequestClient
     C_OBJECT(RequestClient);
 
 public:
-    virtual void handshake() override;
-
     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 = {});
 

+ 0 - 5
Userland/Libraries/LibProtocol/WebSocketClient.cpp

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

+ 0 - 2
Userland/Libraries/LibProtocol/WebSocketClient.h

@@ -21,8 +21,6 @@ class WebSocketClient
     C_OBJECT(WebSocketClient);
 
 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 = {});
 
     u32 ready_state(Badge<WebSocket>, WebSocket&);

+ 0 - 5
Userland/Libraries/LibWeb/WebContentClient.cpp

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

+ 0 - 2
Userland/Libraries/LibWeb/WebContentClient.h

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

+ 0 - 1
Userland/Utilities/aplay.cpp

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

+ 0 - 1
Userland/Utilities/avol.cpp

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