1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:38:11 +00:00

Userland: Make IPC results with one return value available directly

This changes client methods so that they return the IPC response's
return value directly - instead of the response struct - for IPC
methods which only have a single return value.
This commit is contained in:
Gunnar Beutner 2021-05-03 13:55:29 +02:00 committed by Andreas Kling
parent 5bb79ea0a7
commit eb21aa65d1
18 changed files with 58 additions and 111 deletions

View file

@ -21,11 +21,6 @@ void RequestClient::handshake()
greet();
}
bool RequestClient::is_supported_protocol(const String& protocol)
{
return IPCProxy::is_supported_protocol(protocol).supported();
}
template<typename RequestHashMapTraits>
RefPtr<Request> RequestClient::start_request(const String& method, const String& url, const HashMap<String, String, RequestHashMapTraits>& request_headers, ReadonlyBytes request_body)
{
@ -49,14 +44,14 @@ bool RequestClient::stop_request(Badge<Request>, Request& request)
{
if (!m_requests.contains(request.id()))
return false;
return IPCProxy::stop_request(request.id()).success();
return IPCProxy::stop_request(request.id());
}
bool RequestClient::set_certificate(Badge<Request>, Request& request, String certificate, String key)
{
if (!m_requests.contains(request.id()))
return false;
return IPCProxy::set_certificate(request.id(), move(certificate), move(key)).success();
return IPCProxy::set_certificate(request.id(), move(certificate), move(key));
}
void RequestClient::request_finished(i32 request_id, bool success, u32 total_size)