1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:47:44 +00:00

LibIPC+Services: Support URL as a native IPC type

This commit is contained in:
Andreas Kling 2020-06-07 22:54:27 +02:00
parent b81b2a85c4
commit 3654710c41
10 changed files with 26 additions and 16 deletions

View file

@ -25,6 +25,7 @@
*/
#include <AK/BufferStream.h>
#include <AK/URL.h>
#include <LibIPC/Decoder.h>
#include <LibIPC/Dictionary.h>
@ -113,6 +114,15 @@ bool Decoder::decode(String& value)
return !m_stream.handle_read_failure();
}
bool Decoder::decode(URL& value)
{
String string;
if (!decode(string))
return false;
value = URL(string);
return true;
}
bool Decoder::decode(Dictionary& dictionary)
{
u64 size = 0;
@ -136,13 +146,4 @@ bool Decoder::decode(Dictionary& dictionary)
return true;
}
void dongle() {
ByteBuffer buffer;
BufferStream stream(buffer);
Decoder d(stream);
Vector<String> x;
d.decode(x);
}
}