mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 02:47:35 +00:00
Ladybird/Android: Make bind_service helper public in WebContentService
We'll need to call this from other Ladybird files for future services.
This commit is contained in:
parent
5b03135c46
commit
4956514dfb
2 changed files with 6 additions and 4 deletions
|
@ -31,9 +31,6 @@
|
||||||
#include <WebContent/ConnectionFromClient.h>
|
#include <WebContent/ConnectionFromClient.h>
|
||||||
#include <WebContent/PageHost.h>
|
#include <WebContent/PageHost.h>
|
||||||
|
|
||||||
template<typename Client>
|
|
||||||
static ErrorOr<NonnullRefPtr<Client>> bind_service(void (*bind_method)(int, int));
|
|
||||||
|
|
||||||
static ErrorOr<NonnullRefPtr<Protocol::RequestClient>> bind_request_server_service()
|
static ErrorOr<NonnullRefPtr<Protocol::RequestClient>> bind_request_server_service()
|
||||||
{
|
{
|
||||||
return bind_service<Protocol::RequestClient>(&bind_request_server_java);
|
return bind_service<Protocol::RequestClient>(&bind_request_server_java);
|
||||||
|
@ -92,7 +89,7 @@ ErrorOr<int> service_main(int ipc_socket, int fd_passing_socket)
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename Client>
|
template<typename Client>
|
||||||
static ErrorOr<NonnullRefPtr<Client>> bind_service(void (*bind_method)(int, int))
|
ErrorOr<NonnullRefPtr<Client>> bind_service(void (*bind_method)(int, int))
|
||||||
{
|
{
|
||||||
int socket_fds[2] {};
|
int socket_fds[2] {};
|
||||||
TRY(Core::System::socketpair(AF_LOCAL, SOCK_STREAM, 0, socket_fds));
|
TRY(Core::System::socketpair(AF_LOCAL, SOCK_STREAM, 0, socket_fds));
|
||||||
|
|
|
@ -6,5 +6,10 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <AK/NonnullRefPtr.h>
|
||||||
|
|
||||||
|
template<typename Client>
|
||||||
|
ErrorOr<NonnullRefPtr<Client>> bind_service(void (*bind_method)(int, int));
|
||||||
|
|
||||||
void bind_request_server_java(int ipc_socket, int fd_passing_socket);
|
void bind_request_server_java(int ipc_socket, int fd_passing_socket);
|
||||||
void bind_web_socket_java(int ipc_socket, int fd_passing_socket);
|
void bind_web_socket_java(int ipc_socket, int fd_passing_socket);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue