summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/Clipboard.cpp
diff options
context:
space:
mode:
authorGunnar Beutner <gbeutner@serenityos.org>2021-05-03 13:33:59 +0200
committerAndreas Kling <kling@serenityos.org>2021-05-03 21:14:40 +0200
commit5bb79ea0a79322d944368825ec617ccfb8912b81 (patch)
tree120c86845f8285f398000386722d0a7cda312440 /Userland/Libraries/LibGUI/Clipboard.cpp
parent78803ce384d62c40958cc8191a036307f5d8bc9f (diff)
downloadserenity-5bb79ea0a79322d944368825ec617ccfb8912b81.zip
Userland: Update IPC calls to use proxies
This updates all existing code to use the auto-generated client methods instead of post_message/send_sync.
Diffstat (limited to 'Userland/Libraries/LibGUI/Clipboard.cpp')
-rw-r--r--Userland/Libraries/LibGUI/Clipboard.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/Userland/Libraries/LibGUI/Clipboard.cpp b/Userland/Libraries/LibGUI/Clipboard.cpp
index dc1660da62..255b6095a4 100644
--- a/Userland/Libraries/LibGUI/Clipboard.cpp
+++ b/Userland/Libraries/LibGUI/Clipboard.cpp
@@ -19,7 +19,7 @@ class ClipboardServerConnection : public IPC::ServerConnection<ClipboardClientEn
public:
virtual void handshake() override
{
- send_sync<Messages::ClipboardServer::Greet>();
+ greet();
}
private:
@@ -56,12 +56,12 @@ Clipboard::Clipboard()
Clipboard::DataAndType Clipboard::data_and_type() const
{
- auto response = connection().send_sync<Messages::ClipboardServer::GetClipboardData>();
- if (!response->data().is_valid())
+ auto response = connection().get_clipboard_data();
+ if (!response.data().is_valid())
return {};
- auto data = ByteBuffer::copy(response->data().data<void>(), response->data().size());
- auto type = response->mime_type();
- auto metadata = response->metadata().entries();
+ auto data = ByteBuffer::copy(response.data().data<void>(), response.data().size());
+ auto type = response.mime_type();
+ auto metadata = response.metadata().entries();
return { data, type, metadata };
}
@@ -75,7 +75,7 @@ void Clipboard::set_data(ReadonlyBytes data, const String& type, const HashMap<S
if (!data.is_empty())
memcpy(buffer.data<void>(), data.data(), data.size());
- connection().send_sync<Messages::ClipboardServer::SetClipboardData>(move(buffer), type, metadata);
+ connection().set_clipboard_data(move(buffer), type, metadata);
}
void ClipboardServerConnection::clipboard_data_changed(String const& mime_type)