summaryrefslogtreecommitdiff
path: root/Services/Clipboard
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-05-16 14:11:35 +0200
committerAndreas Kling <kling@serenityos.org>2020-05-16 14:13:09 +0200
commitcd298446328af0d71a74d31f750fb1326689a3fe (patch)
treeacdf2f3444e7cb22325ed60ed13cea5476300e2a /Services/Clipboard
parentf7a75598bb738ae9f9c8293efe161a5724fbb127 (diff)
downloadserenity-cd298446328af0d71a74d31f750fb1326689a3fe.zip
LibIPC: Allow opt-in UTF-8 validation on message parameters
You can now mark String message parameters with the [UTF8] attribute. This will cause the generated decoder to perform UTF-8 validation and reject the message if the given parameter is not a valid UTF-8 string. This frees up the receiving side from having to do this validation at a higher level.
Diffstat (limited to 'Services/Clipboard')
-rw-r--r--Services/Clipboard/ClipboardClient.ipc2
-rw-r--r--Services/Clipboard/ClipboardServer.ipc4
2 files changed, 3 insertions, 3 deletions
diff --git a/Services/Clipboard/ClipboardClient.ipc b/Services/Clipboard/ClipboardClient.ipc
index 4434c56f21..50d695e92a 100644
--- a/Services/Clipboard/ClipboardClient.ipc
+++ b/Services/Clipboard/ClipboardClient.ipc
@@ -1,4 +1,4 @@
endpoint ClipboardClient = 804
{
- ClipboardDataChanged(String mime_type) =|
+ ClipboardDataChanged([UTF8] String mime_type) =|
}
diff --git a/Services/Clipboard/ClipboardServer.ipc b/Services/Clipboard/ClipboardServer.ipc
index 4b419459ec..dc3dd4db28 100644
--- a/Services/Clipboard/ClipboardServer.ipc
+++ b/Services/Clipboard/ClipboardServer.ipc
@@ -2,6 +2,6 @@ endpoint ClipboardServer = 802
{
Greet() => (i32 client_id)
- GetClipboardData() => (i32 shbuf_id, i32 data_size, String mime_type)
- SetClipboardData(i32 shbuf_id, i32 data_size, String mime_type) => ()
+ GetClipboardData() => (i32 shbuf_id, i32 data_size, [UTF8] String mime_type)
+ SetClipboardData(i32 shbuf_id, i32 data_size, [UTF8] String mime_type) => ()
}