2026-09-26 07:29:31

Signed-off-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
lizzie
2026-09-26 07:29:31 +00:00
parent 65bfa66cc0
commit db625441a1
42 changed files with 220 additions and 174 deletions
@@ -14,10 +14,6 @@ namespace Service::AM {
IApplicationProxyService::IApplicationProxyService(Core::System& system_,
WindowSystem& window_system)
: ServiceFramework{system_, "appletOE"}, m_window_system{window_system} {
static const FunctionInfo functions[] = {
{0, D<&IApplicationProxyService::OpenApplicationProxy>, "OpenApplicationProxy"},
};
RegisterHandlers(functions);
}
IApplicationProxyService::~IApplicationProxyService() = default;
@@ -26,6 +26,12 @@ private:
private:
std::shared_ptr<Applet> GetAppletFromProcessId(ProcessId pid);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
{0, D<&IApplicationProxyService::OpenApplicationProxy>, "OpenApplicationProxy"}
);
WindowSystem& m_window_system;
};
@@ -164,16 +164,6 @@ ILibraryAppletCreator::ILibraryAppletCreator(Core::System& system_, std::shared_
WindowSystem& window_system)
: ServiceFramework{system_, "ILibraryAppletCreator"},
m_window_system{window_system}, m_applet{std::move(applet)} {
static const FunctionInfo functions[] = {
{0, D<&ILibraryAppletCreator::CreateLibraryApplet>, "CreateLibraryApplet"},
{1, nullptr, "TerminateAllLibraryApplets"},
{2, nullptr, "AreAnyLibraryAppletsLeft"},
{3, D<&ILibraryAppletCreator::CreateLibraryAppletEx>, "CreateLibraryAppletEx"},
{10, D<&ILibraryAppletCreator::CreateStorage>, "CreateStorage"},
{11, D<&ILibraryAppletCreator::CreateTransferMemoryStorage>, "CreateTransferMemoryStorage"},
{12, D<&ILibraryAppletCreator::CreateHandleStorage>, "CreateHandleStorage"},
};
RegisterHandlers(functions);
}
ILibraryAppletCreator::~ILibraryAppletCreator() = default;
@@ -35,8 +35,20 @@ private:
Out<SharedPointer<IStorage>> out_storage, bool is_writable, s64 size,
InCopyHandle<Kernel::KTransferMemory> transfer_memory_handle);
Result CreateHandleStorage(Out<SharedPointer<IStorage>> out_storage, s64 size,
InCopyHandle<Kernel::KTransferMemory> transfer_memory_handle);
InCopyHandle<Kernel::KTransferMemory> transfer_memory_handle);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
{0, D<&ILibraryAppletCreator::CreateLibraryApplet>, "CreateLibraryApplet"},
{1, nullptr, "TerminateAllLibraryApplets"},
{2, nullptr, "AreAnyLibraryAppletsLeft"},
{3, D<&ILibraryAppletCreator::CreateLibraryAppletEx>, "CreateLibraryAppletEx"},
{10, D<&ILibraryAppletCreator::CreateStorage>, "CreateStorage"},
{11, D<&ILibraryAppletCreator::CreateTransferMemoryStorage>, "CreateTransferMemoryStorage"},
{12, D<&ILibraryAppletCreator::CreateHandleStorage>, "CreateHandleStorage"}
);
WindowSystem& m_window_system;
const std::shared_ptr<Applet> m_applet;
};
@@ -67,12 +67,6 @@ private:
APM::APM(Core::System& system_, std::shared_ptr<Module> apm_, Controller& controller_,
const char* name)
: ServiceFramework{system_, name}, apm(std::move(apm_)), controller{controller_} {
static const FunctionInfo functions[] = {
{0, &APM::OpenSession, "OpenSession"},
{1, &APM::GetPerformanceMode, "GetPerformanceMode"},
{6, &APM::IsCpuOverclockEnabled, "IsCpuOverclockEnabled"},
};
RegisterHandlers(functions);
}
APM::~APM() = default;
+8
View File
@@ -21,6 +21,14 @@ private:
void GetPerformanceMode(HLERequestContext& ctx);
void IsCpuOverclockEnabled(HLERequestContext& ctx);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
{0, &APM::OpenSession, "OpenSession"},
{1, &APM::GetPerformanceMode, "GetPerformanceMode"},
{6, &APM::IsCpuOverclockEnabled, "IsCpuOverclockEnabled"}
);
std::shared_ptr<Module> apm;
Controller& controller;
};
@@ -34,10 +34,6 @@ public:
IFinalOutputRecorderManager::IFinalOutputRecorderManager(Core::System& system_)
: ServiceFramework{system_, "audrec:u"} {
static const FunctionInfo functions[] = {
{0, nullptr, "OpenFinalOutputRecorder"},
};
RegisterHandlers(functions);
}
IFinalOutputRecorderManager::~IFinalOutputRecorderManager() = default;
@@ -15,6 +15,13 @@ class IFinalOutputRecorderManager final : public ServiceFramework<IFinalOutputRe
public:
explicit IFinalOutputRecorderManager(Core::System& system_);
~IFinalOutputRecorderManager() override;
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
{0, nullptr, "OpenFinalOutputRecorder"}
);
};
} // namespace Service::Audio
@@ -26,14 +26,6 @@ std::string_view ToStringView(std::span<const char> buf) {
INewsDataService::INewsDataService(Core::System& system_)
: ServiceFramework{system_, "INewsDataService"} {
static const FunctionInfo functions[] = {
{0, D<&INewsDataService::Open>, "Open"},
{1, D<&INewsDataService::OpenWithNewsRecordV1>, "OpenWithNewsRecordV1"},
{2, D<&INewsDataService::Read>, "Read"},
{3, D<&INewsDataService::GetSize>, "GetSize"},
{1001, D<&INewsDataService::OpenWithNewsRecord>, "OpenWithNewsRecord"},
};
RegisterHandlers(functions);
}
INewsDataService::~INewsDataService() = default;
@@ -31,6 +31,16 @@ private:
Result Read(Out<u64> out_size, s64 offset, OutBuffer<BufferAttr_HipcMapAlias> out_buffer);
Result GetSize(Out<s64> out_size);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
{0, D<&INewsDataService::Open>, "Open"},
{1, D<&INewsDataService::OpenWithNewsRecordV1>, "OpenWithNewsRecordV1"},
{2, D<&INewsDataService::Read>, "Read"},
{3, D<&INewsDataService::GetSize>, "GetSize"},
{1001, D<&INewsDataService::OpenWithNewsRecord>, "OpenWithNewsRecord"}
);
std::vector<u8> opened_payload;
};
@@ -47,16 +47,6 @@ bool UpdateField(NewsRecord& rec, std::string_view column, s32 value, bool addit
INewsDatabaseService::INewsDatabaseService(Core::System& system_)
: ServiceFramework{system_, "INewsDatabaseService"} {
static const FunctionInfo functions[] = {
{0, D<&INewsDatabaseService::GetListV1>, "GetListV1"},
{1, D<&INewsDatabaseService::Count>, "Count"},
{2, D<&INewsDatabaseService::CountWithKey>, "CountWithKey"},
{3, D<&INewsDatabaseService::UpdateIntegerValue>, "UpdateIntegerValue"},
{4, D<&INewsDatabaseService::UpdateIntegerValueWithAddition>, "UpdateIntegerValueWithAddition"},
{5, D<&INewsDatabaseService::UpdateStringValue>, "UpdateStringValue"},
{1000, D<&INewsDatabaseService::GetList>, "GetList"},
};
RegisterHandlers(functions);
}
INewsDatabaseService::~INewsDatabaseService() = default;
@@ -49,6 +49,19 @@ private:
InBuffer<BufferAttr_HipcPointer> where_phrase,
InBuffer<BufferAttr_HipcPointer> order_by_phrase,
s32 offset);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
{0, D<&INewsDatabaseService::GetListV1>, "GetListV1"},
{1, D<&INewsDatabaseService::Count>, "Count"},
{2, D<&INewsDatabaseService::CountWithKey>, "CountWithKey"},
{3, D<&INewsDatabaseService::UpdateIntegerValue>, "UpdateIntegerValue"},
{4, D<&INewsDatabaseService::UpdateIntegerValueWithAddition>, "UpdateIntegerValueWithAddition"},
{5, D<&INewsDatabaseService::UpdateStringValue>, "UpdateStringValue"},
{1000, D<&INewsDatabaseService::GetList>, "GetList"}
);
};
} // namespace Service::News
-5
View File
@@ -7,11 +7,6 @@ namespace Service::Fatal {
Fatal_P::Fatal_P(std::shared_ptr<Module> module_, Core::System& system_)
: Interface(std::move(module_), system_, "fatal:p") {
static const FunctionInfo functions[] = {
{0, nullptr, "GetFatalEvent"},
{10, nullptr, "GetFatalContext"},
};
RegisterHandlers(functions);
}
Fatal_P::~Fatal_P() = default;
+8
View File
@@ -11,6 +11,14 @@ class Fatal_P final : public Module::Interface {
public:
explicit Fatal_P(std::shared_ptr<Module> module_, Core::System& system_);
~Fatal_P() override;
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
{0, nullptr, "GetFatalEvent"},
{10, nullptr, "GetFatalContext"}
);
};
} // namespace Service::Fatal
@@ -12,11 +12,6 @@ IDirectory::IDirectory(Core::System& system_, FileSys::VirtualDir directory_,
FileSys::OpenDirectoryMode mode)
: ServiceFramework{system_, "IDirectory"},
backend(std::make_unique<FileSys::Fsa::IDirectory>(directory_, mode)) {
static const FunctionInfo functions[] = {
{0, D<&IDirectory::Read>, "Read"},
{1, D<&IDirectory::GetEntryCount>, "GetEntryCount"},
};
RegisterHandlers(functions);
}
Result IDirectory::Read(
@@ -26,6 +26,14 @@ private:
Result Read(Out<s64> out_count,
const OutArray<FileSys::DirectoryEntry, BufferAttr_HipcMapAlias> out_entries);
Result GetEntryCount(Out<s64> out_count);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
{0, D<&IDirectory::Read>, "Read"},
{1, D<&IDirectory::GetEntryCount>, "GetEntryCount"}
);
};
} // namespace Service::FileSystem
@@ -17,26 +17,6 @@ IFileSystem::IFileSystem(Core::System& system_, FileSys::VirtualDir dir_, SizeGe
: ServiceFramework{system_, "IFileSystem"}, backend{std::make_unique<FileSys::Fsa::IFileSystem>(
dir_)},
size_getter{std::move(size_getter_)} {
static const FunctionInfo functions[] = {
{0, D<&IFileSystem::CreateFile>, "CreateFile"},
{1, D<&IFileSystem::DeleteFile>, "DeleteFile"},
{2, D<&IFileSystem::CreateDirectory>, "CreateDirectory"},
{3, D<&IFileSystem::DeleteDirectory>, "DeleteDirectory"},
{4, D<&IFileSystem::DeleteDirectoryRecursively>, "DeleteDirectoryRecursively"},
{5, D<&IFileSystem::RenameFile>, "RenameFile"},
{6, D<&IFileSystem::RenameDirectory>, "RenameDirectory"},
{7, D<&IFileSystem::GetEntryType>, "GetEntryType"},
{8, D<&IFileSystem::OpenFile>, "OpenFile"},
{9, D<&IFileSystem::OpenDirectory>, "OpenDirectory"},
{10, D<&IFileSystem::Commit>, "Commit"},
{11, D<&IFileSystem::GetFreeSpaceSize>, "GetFreeSpaceSize"},
{12, D<&IFileSystem::GetTotalSpaceSize>, "GetTotalSpaceSize"},
{13, D<&IFileSystem::CleanDirectoryRecursively>, "CleanDirectoryRecursively"},
{14, D<&IFileSystem::GetFileTimeStampRaw>, "GetFileTimeStampRaw"},
{15, nullptr, "QueryEntry"},
{16, D<&IFileSystem::GetFileSystemAttribute>, "GetFileSystemAttribute"},
};
RegisterHandlers(functions);
}
Result IFileSystem::CreateFile(const InLargeData<FileSys::Sf::Path, BufferAttr_HipcPointer> path,
@@ -58,6 +58,28 @@ public:
Result GetFileSystemAttribute(Out<FileSys::FileSystemAttribute> out_attribute);
private:
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
{0, D<&IFileSystem::CreateFile>, "CreateFile"},
{1, D<&IFileSystem::DeleteFile>, "DeleteFile"},
{2, D<&IFileSystem::CreateDirectory>, "CreateDirectory"},
{3, D<&IFileSystem::DeleteDirectory>, "DeleteDirectory"},
{4, D<&IFileSystem::DeleteDirectoryRecursively>, "DeleteDirectoryRecursively"},
{5, D<&IFileSystem::RenameFile>, "RenameFile"},
{6, D<&IFileSystem::RenameDirectory>, "RenameDirectory"},
{7, D<&IFileSystem::GetEntryType>, "GetEntryType"},
{8, D<&IFileSystem::OpenFile>, "OpenFile"},
{9, D<&IFileSystem::OpenDirectory>, "OpenDirectory"},
{10, D<&IFileSystem::Commit>, "Commit"},
{11, D<&IFileSystem::GetFreeSpaceSize>, "GetFreeSpaceSize"},
{12, D<&IFileSystem::GetTotalSpaceSize>, "GetTotalSpaceSize"},
{13, D<&IFileSystem::CleanDirectoryRecursively>, "CleanDirectoryRecursively"},
{14, D<&IFileSystem::GetFileTimeStampRaw>, "GetFileTimeStampRaw"},
{15, nullptr, "QueryEntry"},
{16, D<&IFileSystem::GetFileSystemAttribute>, "GetFileSystemAttribute"}
);
std::unique_ptr<FileSys::Fsa::IFileSystem> backend;
SizeGetter size_getter;
};
@@ -9,11 +9,6 @@ namespace Service::FileSystem {
IMultiCommitManager::IMultiCommitManager(Core::System& system_)
: ServiceFramework{system_, "IMultiCommitManager"} {
static const FunctionInfo functions[] = {
{1, D<&IMultiCommitManager::Add>, "Add"},
{2, D<&IMultiCommitManager::Commit>, "Commit"},
};
RegisterHandlers(functions);
}
IMultiCommitManager::~IMultiCommitManager() = default;
@@ -17,6 +17,13 @@ private:
Result Add(std::shared_ptr<IFileSystem> filesystem);
Result Commit();
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
{1, D<&IMultiCommitManager::Add>, "Add"},
{2, D<&IMultiCommitManager::Commit>, "Commit"}
);
FileSys::VirtualFile backend;
};
@@ -17,11 +17,6 @@ ISaveDataInfoReader::ISaveDataInfoReader(Core::System& system_,
FileSys::SaveDataSpaceId space)
: ServiceFramework{system_, "ISaveDataInfoReader"}, save_data_controller{
save_data_controller_} {
static const FunctionInfo functions[] = {
{0, D<&ISaveDataInfoReader::ReadSaveDataInfo>, "ReadSaveDataInfo"},
};
RegisterHandlers(functions);
FindAllSaves(space);
}
@@ -42,6 +42,12 @@ private:
void FindNormalSaves(FileSys::SaveDataSpaceId space, const FileSys::VirtualDir& type);
void FindTemporaryStorageSaves(FileSys::SaveDataSpaceId space, const FileSys::VirtualDir& type);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
{0, D<&ISaveDataInfoReader::ReadSaveDataInfo>, "ReadSaveDataInfo"}
);
std::shared_ptr<SaveDataController> save_data_controller;
std::vector<SaveDataInfo> info;
u64 next_entry_index = 0;
@@ -12,15 +12,6 @@ namespace Service::FileSystem {
IStorage::IStorage(Core::System& system_, FileSys::VirtualFile backend_)
: ServiceFramework{system_, "IStorage"}, backend(std::move(backend_)) {
static const FunctionInfo functions[] = {
{0, D<&IStorage::Read>, "Read"},
{1, nullptr, "Write"},
{2, nullptr, "Flush"},
{3, nullptr, "SetSize"},
{4, D<&IStorage::GetSize>, "GetSize"},
{5, nullptr, "OperateRange"},
};
RegisterHandlers(functions);
}
Result IStorage::Read(
@@ -15,12 +15,23 @@ public:
explicit IStorage(Core::System& system_, FileSys::VirtualFile backend_);
private:
FileSys::VirtualFile backend;
Result Read(
OutBuffer<BufferAttr_HipcMapAlias | BufferAttr_HipcMapTransferAllowsNonSecure> out_bytes,
s64 offset, s64 length);
Result GetSize(Out<u64> out_size);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
{0, D<&IStorage::Read>, "Read"},
{1, nullptr, "Write"},
{2, nullptr, "Flush"},
{3, nullptr, "SetSize"},
{4, D<&IStorage::GetSize>, "GetSize"},
{5, nullptr, "OperateRange"}
);
FileSys::VirtualFile backend;
};
} // namespace Service::FileSystem
@@ -7,12 +7,6 @@ namespace Service::Friend {
Friend::Friend(std::shared_ptr<Module> module_, Core::System& system_, const char* name)
: Interface(std::move(module_), system_, name) {
static const FunctionInfo functions[] = {
{0, &Friend::CreateFriendService, "CreateFriendService"},
{1, &Friend::CreateNotificationService, "CreateNotificationService"},
{2, nullptr, "CreateDaemonSuspendSessionService"},
};
RegisterHandlers(functions);
}
Friend::~Friend() = default;
@@ -11,6 +11,15 @@ class Friend final : public Module::Interface {
public:
explicit Friend(std::shared_ptr<Module> module_, Core::System& system_, const char* name);
~Friend() override;
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
{0, &Friend::CreateFriendService, "CreateFriendService"},
{1, &Friend::CreateNotificationService, "CreateNotificationService"},
{2, nullptr, "CreateDaemonSuspendSessionService"}
);
};
} // namespace Service::Friend
@@ -16,10 +16,6 @@ IAppletResource::IAppletResource(Core::System& system_, std::shared_ptr<Resource
u64 applet_resource_user_id)
: ServiceFramework{system_, "IAppletResource"}, aruid{applet_resource_user_id},
resource_manager{resource} {
static const FunctionInfo functions[] = {
{0, C<&IAppletResource::GetSharedMemoryHandle>, "GetSharedMemoryHandle"},
};
RegisterHandlers(functions);
}
IAppletResource::~IAppletResource() {
@@ -29,6 +29,12 @@ public:
private:
Result GetSharedMemoryHandle(OutCopyHandle<Kernel::KSharedMemory> out_shared_memory_handle);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
{0, C<&IAppletResource::GetSharedMemoryHandle>, "GetSharedMemoryHandle"}
);
u64 aruid{};
std::shared_ptr<ResourceManager> resource_manager;
};
@@ -245,24 +245,6 @@ void NVDRV::DumpGraphicsMemoryInfo(HLERequestContext& ctx) {
NVDRV::NVDRV(Core::System& system_, std::shared_ptr<Module> nvdrv_, const char* name)
: ServiceFramework{system_, name}, nvdrv{std::move(nvdrv_)} {
static const FunctionInfo functions[] = {
{0, &NVDRV::Open, "Open"},
{1, &NVDRV::Ioctl1, "Ioctl"},
{2, &NVDRV::Close, "Close"},
{3, &NVDRV::Initialize, "Initialize"},
{4, &NVDRV::QueryEvent, "QueryEvent"},
{5, nullptr, "MapSharedMem"},
{6, &NVDRV::GetStatus, "GetStatus"},
{7, nullptr, "SetAruidForTest"},
{8, &NVDRV::SetAruid, "SetAruid"},
{9, &NVDRV::DumpGraphicsMemoryInfo, "DumpGraphicsMemoryInfo"},
{10, nullptr, "InitializeDevtools"},
{11, &NVDRV::Ioctl2, "Ioctl2"},
{12, &NVDRV::Ioctl3, "Ioctl3"},
{13, &NVDRV::SetGraphicsFirmwareMemoryMarginEnabled,
"SetGraphicsFirmwareMemoryMarginEnabled"},
};
RegisterHandlers(functions);
}
NVDRV::~NVDRV() {
+20 -1
View File
@@ -35,8 +35,27 @@ private:
void ServiceError(HLERequestContext& ctx, NvResult result);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
{0, &NVDRV::Open, "Open"},
{1, &NVDRV::Ioctl1, "Ioctl"},
{2, &NVDRV::Close, "Close"},
{3, &NVDRV::Initialize, "Initialize"},
{4, &NVDRV::QueryEvent, "QueryEvent"},
{5, nullptr, "MapSharedMem"},
{6, &NVDRV::GetStatus, "GetStatus"},
{7, nullptr, "SetAruidForTest"},
{8, &NVDRV::SetAruid, "SetAruid"},
{9, &NVDRV::DumpGraphicsMemoryInfo, "DumpGraphicsMemoryInfo"},
{10, nullptr, "InitializeDevtools"},
{11, &NVDRV::Ioctl2, "Ioctl2"},
{12, &NVDRV::Ioctl3, "Ioctl3"},
{13, &NVDRV::SetGraphicsFirmwareMemoryMarginEnabled,
"SetGraphicsFirmwareMemoryMarginEnabled"}
);
std::shared_ptr<Module> nvdrv;
u64 pid{};
bool is_initialized{};
NvCore::SessionId session_id{};
-5
View File
@@ -11,11 +11,6 @@
namespace Service::Nvidia {
NVMEMP::NVMEMP(Core::System& system_) : ServiceFramework{system_, "nvmemp"} {
static const FunctionInfo functions[] = {
{0, &NVMEMP::Open, "Open"},
{1, &NVMEMP::GetAruid, "GetAruid"},
};
RegisterHandlers(functions);
}
NVMEMP::~NVMEMP() = default;
+8
View File
@@ -19,6 +19,14 @@ public:
private:
void Open(HLERequestContext& ctx);
void GetAruid(HLERequestContext& ctx);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
{0, &NVMEMP::Open, "Open"},
{1, &NVMEMP::GetAruid, "GetAruid"}
);
};
} // namespace Service::Nvidia
@@ -13,13 +13,6 @@ IHOSBinderDriver::IHOSBinderDriver(Core::System& system_,
std::shared_ptr<SurfaceFlinger> surface_flinger)
: ServiceFramework{system_, "IHOSBinderDriver"}, m_server(server),
m_surface_flinger(surface_flinger) {
static const FunctionInfo functions[] = {
{0, C<&IHOSBinderDriver::TransactParcel>, "TransactParcel"},
{1, C<&IHOSBinderDriver::AdjustRefcount>, "AdjustRefcount"},
{2, C<&IHOSBinderDriver::GetNativeHandle>, "GetNativeHandle"},
{3, C<&IHOSBinderDriver::TransactParcelAuto>, "TransactParcelAuto"},
};
RegisterHandlers(functions);
}
IHOSBinderDriver::~IHOSBinderDriver() = default;
@@ -44,6 +44,15 @@ private:
OutBuffer<BufferAttr_HipcAutoSelect> parcel_reply, u32 flags);
private:
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
{0, C<&IHOSBinderDriver::TransactParcel>, "TransactParcel"},
{1, C<&IHOSBinderDriver::AdjustRefcount>, "AdjustRefcount"},
{2, C<&IHOSBinderDriver::GetNativeHandle>, "GetNativeHandle"},
{3, C<&IHOSBinderDriver::TransactParcelAuto>, "TransactParcelAuto"}
);
const std::shared_ptr<HosBinderDriverServer> m_server;
const std::shared_ptr<SurfaceFlinger> m_surface_flinger;
};
@@ -15,12 +15,6 @@ IParentalControlServiceFactory::IParentalControlServiceFactory(Core::System& sys
const char* name_,
Capability capability_)
: ServiceFramework{system_, name_}, capability{capability_} {
static const FunctionInfo functions[] = {
{0, D<&IParentalControlServiceFactory::CreateService>, "CreateService"},
{1, D<&IParentalControlServiceFactory::CreateServiceWithoutInitialize>,
"CreateServiceWithoutInitialize"},
};
RegisterHandlers(functions);
}
IParentalControlServiceFactory::~IParentalControlServiceFactory() = default;
@@ -23,6 +23,13 @@ public:
ClientProcessId process_id);
private:
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
{0, D<&IParentalControlServiceFactory::CreateService>, "CreateService"},
{1, D<&IParentalControlServiceFactory::CreateServiceWithoutInitialize>, "CreateServiceWithoutInitialize"}
);
Capability capability{};
};
-19
View File
@@ -21,25 +21,6 @@
namespace Service::Sockets {
SFDNSRES::SFDNSRES(Core::System& system_) : ServiceFramework{system_, "sfdnsres"} {
static const FunctionInfo functions[] = {
{0, nullptr, "SetDnsAddressesPrivateRequest"},
{1, nullptr, "GetDnsAddressPrivateRequest"},
{2, &SFDNSRES::GetHostByNameRequest, "GetHostByNameRequest"},
{3, nullptr, "GetHostByAddrRequest"},
{4, nullptr, "GetHostStringErrorRequest"},
{5, &SFDNSRES::GetGaiStringErrorRequest, "GetGaiStringErrorRequest"},
{6, &SFDNSRES::GetAddrInfoRequest, "GetAddrInfoRequest"},
{7, nullptr, "GetNameInfoRequest"},
{8, nullptr, "RequestCancelHandleRequest"},
{9, nullptr, "CancelRequest"},
{10, &SFDNSRES::GetHostByNameRequestWithOptions, "GetHostByNameRequestWithOptions"},
{11, nullptr, "GetHostByAddrRequestWithOptions"},
{12, &SFDNSRES::GetAddrInfoRequestWithOptions, "GetAddrInfoRequestWithOptions"},
{13, nullptr, "GetNameInfoRequestWithOptions"},
{14, &SFDNSRES::ResolverSetOptionRequest, "ResolverSetOptionRequest"},
{15, nullptr, "ResolverGetOptionRequest"},
};
RegisterHandlers(functions);
}
SFDNSRES::~SFDNSRES() = default;
+22
View File
@@ -26,6 +26,28 @@ private:
void GetAddrInfoRequest(HLERequestContext& ctx);
void GetAddrInfoRequestWithOptions(HLERequestContext& ctx);
void ResolverSetOptionRequest(HLERequestContext& ctx);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
{0, nullptr, "SetDnsAddressesPrivateRequest"},
{1, nullptr, "GetDnsAddressPrivateRequest"},
{2, &SFDNSRES::GetHostByNameRequest, "GetHostByNameRequest"},
{3, nullptr, "GetHostByAddrRequest"},
{4, nullptr, "GetHostStringErrorRequest"},
{5, &SFDNSRES::GetGaiStringErrorRequest, "GetGaiStringErrorRequest"},
{6, &SFDNSRES::GetAddrInfoRequest, "GetAddrInfoRequest"},
{7, nullptr, "GetNameInfoRequest"},
{8, nullptr, "RequestCancelHandleRequest"},
{9, nullptr, "CancelRequest"},
{10, &SFDNSRES::GetHostByNameRequestWithOptions, "GetHostByNameRequestWithOptions"},
{11, nullptr, "GetHostByAddrRequestWithOptions"},
{12, &SFDNSRES::GetAddrInfoRequestWithOptions, "GetAddrInfoRequestWithOptions"},
{13, nullptr, "GetNameInfoRequestWithOptions"},
{14, &SFDNSRES::ResolverSetOptionRequest, "ResolverSetOptionRequest"},
{15, nullptr, "ResolverGetOptionRequest"}
);
};
class DNS_PRIV final : public ServiceFramework<DNS_PRIV> {
@@ -14,11 +14,6 @@ namespace Service::VI {
IApplicationRootService::IApplicationRootService(Core::System& system_,
std::shared_ptr<Container> container)
: ServiceFramework{system_, "vi:u"}, m_container{std::move(container)} {
static const FunctionInfo functions[] = {
{0, C<&IApplicationRootService::GetDisplayService>, "GetDisplayService"},
{1, nullptr, "GetDisplayServiceWithProxyNameExchange"},
};
RegisterHandlers(functions);
}
IApplicationRootService::~IApplicationRootService() = default;
@@ -27,6 +27,13 @@ private:
Policy policy);
private:
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
{0, C<&IApplicationRootService::GetDisplayService>, "GetDisplayService"},
{1, nullptr, "GetDisplayServiceWithProxyNameExchange"}
);
const std::shared_ptr<Container> m_container;
};
@@ -15,15 +15,6 @@ namespace Service::VI {
IManagerRootService::IManagerRootService(Core::System& system_,
std::shared_ptr<Container> container)
: ServiceFramework{system_, "vi:m"}, m_container{std::move(container)} {
static const FunctionInfo functions[] = {
{2, C<&IManagerRootService::GetDisplayService>, "GetDisplayService"},
{3, nullptr, "GetDisplayServiceWithProxyNameExchange"},
{100, nullptr, "PrepareFatal"},
{101, nullptr, "ShowFatal"},
{102, nullptr, "DrawFatalRectangle"},
{103, nullptr, "DrawFatalText32"},
};
RegisterHandlers(functions);
}
IManagerRootService::~IManagerRootService() = default;
@@ -26,6 +26,17 @@ public:
Policy policy);
private:
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
{2, C<&IManagerRootService::GetDisplayService>, "GetDisplayService"},
{3, nullptr, "GetDisplayServiceWithProxyNameExchange"},
{100, nullptr, "PrepareFatal"},
{101, nullptr, "ShowFatal"},
{102, nullptr, "DrawFatalRectangle"},
{103, nullptr, "DrawFatalText32"}
);
const std::shared_ptr<Container> m_container;
};