mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-09-05 12:00:05 +00:00
last service
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
||||
@@ -13,13 +13,13 @@
|
||||
|
||||
namespace Service::NGC {
|
||||
|
||||
class NgctServiceImpl final : public ServiceFramework<NgctServiceImpl> {
|
||||
class IService final : public ServiceFramework<IService> {
|
||||
public:
|
||||
explicit NgctServiceImpl(Core::System& system_) : ServiceFramework{system_, "ngct:u"} {
|
||||
explicit IService(Core::System& system_) : ServiceFramework{system_, "ngct:u"} {
|
||||
// clang-format off
|
||||
static const FunctionInfo functions[] = {
|
||||
{0, &NgctServiceImpl::Match, "Match"},
|
||||
{1, &NgctServiceImpl::Filter, "Filter"},
|
||||
{0, &IService::Match, "Match"},
|
||||
{1, &IService::Filter, "Filter"},
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
@@ -146,10 +146,31 @@ private:
|
||||
}
|
||||
};
|
||||
|
||||
class IServiceWithManagementApi final : public ServiceFramework<IServiceWithManagementApi> {
|
||||
public:
|
||||
explicit IServiceWithManagementApi(Core::System& system_) : ServiceFramework(system_, "ngct:s") {
|
||||
// clang-format off
|
||||
static const FunctionInfo functions[] = {
|
||||
{0 , nullptr, "Match"},
|
||||
{1 , nullptr, "Filter"},
|
||||
{100, nullptr, "ConfigureAutoUpdateSetting"},
|
||||
{101, nullptr, "RequestResourceUpdateCheck"},
|
||||
{110, nullptr, "Reload"},
|
||||
{111, nullptr, "IsReloadRequired"},
|
||||
{112, nullptr, "TryAcquireReloadRequestNotifier"},
|
||||
{120, nullptr, "CalculateContentFingerprint"},
|
||||
{130, nullptr, "TryEnableTemporalPassThrough"},
|
||||
};
|
||||
// clang-format on
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
};
|
||||
|
||||
void LoopProcess(Core::System& system) {
|
||||
auto server_manager = std::make_unique<ServerManager>(system);
|
||||
|
||||
server_manager->RegisterNamedService("ngct:u", std::make_shared<NgctServiceImpl>(system));
|
||||
server_manager->RegisterNamedService("ngct:u", std::make_shared<IService>(system));
|
||||
server_manager->RegisterNamedService("ngct:s", std::make_shared<IServiceWithManagementApi>(system));
|
||||
server_manager->RegisterNamedService("ngc:u", std::make_shared<NgcServiceImpl>(system));
|
||||
ServerManager::RunServer(std::move(server_manager));
|
||||
}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
|
||||
@@ -48,12 +48,24 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class ISfDriverServiceCreator final : public ServiceFramework<ISfDriverServiceCreator> {
|
||||
public:
|
||||
explicit ISfDriverServiceCreator(Core::System& system_)
|
||||
: ServiceFramework{system_, "eth:nd"} {
|
||||
// clang-format off
|
||||
static const FunctionInfo functions[] = {
|
||||
{0, nullptr, "CreateDriverService"},
|
||||
};
|
||||
// clang-format on
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
};
|
||||
|
||||
void LoopProcess(Core::System& system) {
|
||||
auto server_manager = std::make_unique<ServerManager>(system);
|
||||
|
||||
server_manager->RegisterNamedService("ethc:c", std::make_shared<ETHC_C>(system));
|
||||
server_manager->RegisterNamedService("ethc:i", std::make_shared<ETHC_I>(system));
|
||||
|
||||
server_manager->RegisterNamedService("bsd:s", std::make_shared<BSD>(system, "bsd:s", false));
|
||||
server_manager->RegisterNamedService("bsd:u", std::make_shared<BSD>(system, "bsd:u", true));
|
||||
server_manager->RegisterNamedService("bsd:a", std::make_shared<BSD>(system, "bsd:a", true));
|
||||
@@ -64,6 +76,8 @@ void LoopProcess(Core::System& system) {
|
||||
server_manager->RegisterNamedService("nsd:u", std::make_shared<NSD>(system, "nsd:u"));
|
||||
server_manager->RegisterNamedService("sfdnsres", std::make_shared<SFDNSRES>(system));
|
||||
server_manager->RegisterNamedService("dns:priv", std::make_shared<DNS_PRIV>(system));
|
||||
server_manager->RegisterNamedService("eth:nd", std::make_shared<ISfDriverServiceCreator>(system));
|
||||
|
||||
server_manager->StartAdditionalHostThreads("bsdsocket", 2);
|
||||
ServerManager::RunServer(std::move(server_manager));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user