summaryrefslogtreecommitdiff
path: root/Userland/Services/Clipboard
diff options
context:
space:
mode:
authorGunnar Beutner <gbeutner@serenityos.org>2021-05-02 19:54:34 +0200
committerAndreas Kling <kling@serenityos.org>2021-05-03 21:14:06 +0200
commit065040872f62f608374da6709502033720442882 (patch)
treec9e974c1d32837df87ad334515a1535113fdc756 /Userland/Services/Clipboard
parentd47f15ab8b8ff545864fed2a0e275674c1431549 (diff)
downloadserenity-065040872f62f608374da6709502033720442882.zip
Userland: Change IPC funcs to use plain arguments instead of a struct
Instead of having a single overloaded handle method each method gets its own unique method name now.
Diffstat (limited to 'Userland/Services/Clipboard')
-rw-r--r--Userland/Services/Clipboard/ClientConnection.cpp8
-rw-r--r--Userland/Services/Clipboard/ClientConnection.h6
2 files changed, 7 insertions, 7 deletions
diff --git a/Userland/Services/Clipboard/ClientConnection.cpp b/Userland/Services/Clipboard/ClientConnection.cpp
index 3ffe3c0116..fbba429880 100644
--- a/Userland/Services/Clipboard/ClientConnection.cpp
+++ b/Userland/Services/Clipboard/ClientConnection.cpp
@@ -35,16 +35,16 @@ void ClientConnection::die()
s_connections.remove(client_id());
}
-void ClientConnection::handle(const Messages::ClipboardServer::Greet&)
+void ClientConnection::greet()
{
}
-void ClientConnection::handle(const Messages::ClipboardServer::SetClipboardData& message)
+void ClientConnection::set_clipboard_data(Core::AnonymousBuffer const& data, String const& mime_type, IPC::Dictionary const& metadata)
{
- Storage::the().set_data(message.data(), message.mime_type(), message.metadata().entries());
+ Storage::the().set_data(data, mime_type, metadata.entries());
}
-Messages::ClipboardServer::GetClipboardDataResponse ClientConnection::handle(const Messages::ClipboardServer::GetClipboardData&)
+Messages::ClipboardServer::GetClipboardDataResponse ClientConnection::get_clipboard_data()
{
auto& storage = Storage::the();
return { storage.buffer(), storage.mime_type(), storage.metadata() };
diff --git a/Userland/Services/Clipboard/ClientConnection.h b/Userland/Services/Clipboard/ClientConnection.h
index ccce598abe..70d33da56d 100644
--- a/Userland/Services/Clipboard/ClientConnection.h
+++ b/Userland/Services/Clipboard/ClientConnection.h
@@ -30,9 +30,9 @@ public:
void notify_about_clipboard_change();
private:
- virtual void handle(const Messages::ClipboardServer::Greet&) override;
- virtual Messages::ClipboardServer::GetClipboardDataResponse handle(const Messages::ClipboardServer::GetClipboardData&) override;
- virtual void handle(const Messages::ClipboardServer::SetClipboardData&) override;
+ virtual void greet() override;
+ virtual Messages::ClipboardServer::GetClipboardDataResponse get_clipboard_data() override;
+ virtual void set_clipboard_data(Core::AnonymousBuffer const&, String const&, IPC::Dictionary const&) override;
};
}