ladybird/UI/Android/src/main/cpp/RequestServerService.cpp
Olekoop 6f350c51fd Android: Keep up with the times
While some of the changes are due to syntax and have no effect on
the functionality, others are more important.

The major changes are
- Use Painter instead of now removed DeprecatedPainter
- Remove the need of LibArchive by using Java's native zip support
- Have a proper C++23 compiler by updating NDK to r29 beta 2
- Store user data and config in an user accessible way
- Update AGP to 8.11 and update compile target to SDK level 35
2025-07-10 15:44:53 -06:00

38 lines
1 KiB
C++

/*
* Copyright (c) 2018-2020, Andreas Kling <andreas@ladybird.org>
* Copyright (c) 2023, Andrew Kaster <akaster@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include "LadybirdServiceBase.h"
#include <AK/LexicalPath.h>
#include <AK/OwnPtr.h>
#include <LibCore/ArgsParser.h>
#include <LibCore/EventLoop.h>
#include <LibCore/LocalServer.h>
#include <LibCore/System.h>
#include <LibFileSystem/FileSystem.h>
#include <LibIPC/SingleServer.h>
#include <LibTLS/TLSv12.h>
#include <LibWebView/Utilities.h>
#include <RequestServer/ConnectionFromClient.h>
namespace RequestServer {
extern ByteString g_default_certificate_path;
}
ErrorOr<int> service_main(int ipc_socket)
{
RequestServer::g_default_certificate_path = ByteString::formatted("{}/res/ladybird/cacert.pem", WebView::s_ladybird_resource_root);
Core::EventLoop event_loop;
auto socket = TRY(Core::LocalSocket::adopt_fd(ipc_socket));
auto client = TRY(RequestServer::ConnectionFromClient::try_create(make<IPC::Transport>(move(socket))));
return event_loop.exec();
}