This exposes the operation through RequestServer.ipc and RequestClient so the client can create the stub before accessing a content-keyed side-data file.
48 lines
2.7 KiB
Text
48 lines
2.7 KiB
Text
#include <LibCore/AnonymousBuffer.h>
|
|
#include <LibCore/Proxy.h>
|
|
#include <LibHTTP/Cache/CacheMode.h>
|
|
#include <LibHTTP/Cache/DiskCacheSettings.h>
|
|
#include <LibHTTP/Cache/Utilities.h>
|
|
#include <LibHTTP/Cookie/IncludeCredentials.h>
|
|
#include <LibHTTP/Header.h>
|
|
#include <LibIPC/TransportHandle.h>
|
|
#include <LibURL/URL.h>
|
|
#include <RequestServer/CacheLevel.h>
|
|
#include <RequestServer/RequestType.h>
|
|
|
|
endpoint RequestServer
|
|
{
|
|
init_transport(int peer_pid) => (int peer_pid)
|
|
connect_new_client() => (IPC::TransportHandle handle)
|
|
connect_new_clients(size_t count) => (Vector<IPC::TransportHandle> handles)
|
|
|
|
set_disk_cache_settings(HTTP::DiskCacheSettings disk_cache_settings) =|
|
|
|
|
// use_tls: enable DNS over TLS
|
|
set_dns_server(ByteString host_or_address, u16 port, bool use_tls, bool validate_dnssec_locally) =|
|
|
set_use_system_dns() =|
|
|
|
|
// Test if a specific protocol is supported, e.g "http"
|
|
is_supported_protocol(ByteString protocol) => (bool supported)
|
|
|
|
start_request(u64 request_id, ByteString method, URL::URL url, Vector<HTTP::Header> request_headers, ByteBuffer request_body, HTTP::CacheMode cache_mode, HTTP::Cookie::IncludeCredentials include_credentials, Core::ProxyData proxy_data) =|
|
|
stop_request(u64 request_id) => (bool success)
|
|
set_certificate(u64 request_id, ByteString certificate, ByteString key) => (bool success)
|
|
|
|
ensure_connection(u64 request_id, URL::URL url, ::RequestServer::CacheLevel cache_level) =|
|
|
|
|
retrieved_http_cookie(int client_id, u64 request_id, ::RequestServer::RequestType request_type, String cookie) =|
|
|
|
|
estimate_cache_size_accessed_since(u64 cache_size_estimation_id, UnixDateTime since) =|
|
|
remove_cache_entries_accessed_since(UnixDateTime since) =|
|
|
store_cache_associated_data(URL::URL url, ByteString method, Vector<HTTP::Header> request_headers, Optional<u64> vary_key, HTTP::CacheEntryAssociatedData associated_data, Core::AnonymousBuffer data) => (bool stored)
|
|
retrieve_cache_associated_data(URL::URL url, ByteString method, Vector<HTTP::Header> request_headers, Optional<u64> vary_key, HTTP::CacheEntryAssociatedData associated_data) => (Optional<Core::AnonymousBuffer> data)
|
|
create_synthetic_cache_entry(URL::URL url, ByteString method) => (bool created)
|
|
|
|
// Websocket Connection API
|
|
websocket_connect(u64 websocket_id, URL::URL url, ByteString origin, Vector<ByteString> protocols, Vector<ByteString> extensions, Vector<HTTP::Header> additional_request_headers) =|
|
|
websocket_send(u64 websocket_id, bool is_text, ByteBuffer data) =|
|
|
websocket_close(u64 websocket_id, u16 code, ByteString reason) =|
|
|
websocket_set_certificate(u64 request_id, ByteString certificate, ByteString key) => (bool success)
|
|
|
|
}
|