mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:27:44 +00:00
LibIPC+Services: Support URL as a native IPC type
This commit is contained in:
parent
b81b2a85c4
commit
3654710c41
10 changed files with 26 additions and 16 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue