mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-10-04 21:29:36 +00:00
@@ -51,10 +51,8 @@ FileSys::PatchManager::Metadata GetApplicationMetadata(Core::System& system, u64
|
||||
|
||||
} // Anonymous namespace
|
||||
|
||||
IApplicationFunctions::IApplicationFunctions(Core::System& system_, std::shared_ptr<Applet> applet)
|
||||
: ServiceFramework{system_, "IApplicationFunctions"}, m_applet{std::move(applet)} {
|
||||
// clang-format off
|
||||
static const FunctionInfo functions[] = {
|
||||
ServiceFrameworkBase::FunctionInfoBase const* IApplicationFunctions::FindRequest(u32 key) {
|
||||
static constexpr auto functions = CreateStaticMap(
|
||||
FunctionInfo{1, D<&IApplicationFunctions::PopLaunchParameter>, "PopLaunchParameter"},
|
||||
FunctionInfo{10, nullptr, "CreateApplicationAndPushAndRequestToStart"},
|
||||
FunctionInfo{11, nullptr, "CreateApplicationAndPushAndRequestToStartForQuest"},
|
||||
@@ -122,13 +120,16 @@ IApplicationFunctions::IApplicationFunctions(Core::System& system_, std::shared_
|
||||
FunctionInfo{330, D<&IApplicationFunctions::Unknown330>, "Unknown330"}, // [20.0.0+]
|
||||
FunctionInfo{500, nullptr, "StartContinuousRecordingFlushForDebug"},
|
||||
FunctionInfo{1000, nullptr, "CreateMovieMaker"},
|
||||
FunctionInfo{1001, D<&IApplicationFunctions::PrepareForJit>, "PrepareForJit"},
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
RegisterHandlers(functions);
|
||||
FunctionInfo{1001, D<&IApplicationFunctions::PrepareForJit>, "PrepareForJit"}
|
||||
);
|
||||
return HandlerTableGenerateWithFind(key, functions);
|
||||
}
|
||||
|
||||
IApplicationFunctions::IApplicationFunctions(Core::System& system_, std::shared_ptr<Applet> applet)
|
||||
: ServiceFramework{system_, "IApplicationFunctions"}
|
||||
, m_applet{std::move(applet)}
|
||||
{}
|
||||
|
||||
IApplicationFunctions::~IApplicationFunctions() = default;
|
||||
|
||||
Result IApplicationFunctions::PopLaunchParameter(Out<SharedPointer<IStorage>> out_storage,
|
||||
|
||||
@@ -84,6 +84,7 @@ private:
|
||||
Result GetUnknownEvent210(OutCopyHandle<Kernel::KReadableEvent> out_event);
|
||||
Result Unknown330(Out<u8> out);
|
||||
Result PrepareForJit();
|
||||
FunctionInfoBase const* FindRequest(u32 key) override;
|
||||
|
||||
const std::shared_ptr<Applet> m_applet;
|
||||
};
|
||||
|
||||
@@ -12,14 +12,16 @@
|
||||
|
||||
namespace Service::AM {
|
||||
|
||||
ServiceFrameworkBase::FunctionInfoBase const* IStorage::FindRequest(u32 key) {
|
||||
static constexpr auto functions = CreateStaticMap(
|
||||
FunctionInfo{0, D<&IStorage::Open>, "Open"},
|
||||
FunctionInfo{1, D<&IStorage::OpenTransferStorage>, "OpenTransferStorage"}
|
||||
);
|
||||
return HandlerTableGenerateWithFind(key, functions);
|
||||
}
|
||||
|
||||
IStorage::IStorage(Core::System& system_, std::shared_ptr<LibraryAppletStorage> impl)
|
||||
: ServiceFramework{system_, "IStorage"}, m_impl{std::move(impl)} {
|
||||
static const FunctionInfo functions[] = {
|
||||
FunctionInfo{0, D<&IStorage::Open>, "Open"},
|
||||
FunctionInfo{1, D<&IStorage::OpenTransferStorage>, "OpenTransferStorage"},
|
||||
};
|
||||
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
IStorage::IStorage(Core::System& system_, std::vector<u8>&& data)
|
||||
|
||||
@@ -29,6 +29,7 @@ private:
|
||||
Result OpenTransferStorage(
|
||||
Out<SharedPointer<ITransferStorageAccessor>> out_transfer_storage_accessor);
|
||||
|
||||
FunctionInfoBase const* FindRequest(u32 key) override;
|
||||
const std::shared_ptr<LibraryAppletStorage> m_impl;
|
||||
};
|
||||
|
||||
|
||||
@@ -8,16 +8,18 @@
|
||||
|
||||
namespace Service::AM {
|
||||
|
||||
ServiceFrameworkBase::FunctionInfoBase const* IStorageAccessor::FindRequest(u32 key) {
|
||||
static constexpr auto functions = CreateStaticMap(
|
||||
FunctionInfo{0, D<&IStorageAccessor::GetSize>, "GetSize"},
|
||||
FunctionInfo{10, D<&IStorageAccessor::Write>, "Write"},
|
||||
FunctionInfo{11, D<&IStorageAccessor::Read>, "Read"}
|
||||
);
|
||||
return HandlerTableGenerateWithFind(key, functions);
|
||||
}
|
||||
|
||||
IStorageAccessor::IStorageAccessor(Core::System& system_,
|
||||
std::shared_ptr<LibraryAppletStorage> impl)
|
||||
: ServiceFramework{system_, "IStorageAccessor"}, m_impl{std::move(impl)} {
|
||||
static const FunctionInfo functions[] = {
|
||||
FunctionInfo{0, D<&IStorageAccessor::GetSize>, "GetSize"},
|
||||
FunctionInfo{10, D<&IStorageAccessor::Write>, "Write"},
|
||||
FunctionInfo{11, D<&IStorageAccessor::Read>, "Read"},
|
||||
};
|
||||
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
IStorageAccessor::~IStorageAccessor() = default;
|
||||
@@ -38,15 +40,17 @@ Result IStorageAccessor::Read(OutBuffer<BufferAttr_HipcAutoSelect> out_buffer, s
|
||||
R_RETURN(m_impl->Read(offset, out_buffer.data(), out_buffer.size()));
|
||||
}
|
||||
|
||||
ServiceFrameworkBase::FunctionInfoBase const* ITransferStorageAccessor::FindRequest(u32 key) {
|
||||
static constexpr auto functions = CreateStaticMap(
|
||||
FunctionInfo{0, D<&ITransferStorageAccessor::GetSize>, "GetSize"},
|
||||
FunctionInfo{1, D<&ITransferStorageAccessor::GetHandle>, "GetHandle"}
|
||||
);
|
||||
return HandlerTableGenerateWithFind(key, functions);
|
||||
}
|
||||
|
||||
ITransferStorageAccessor::ITransferStorageAccessor(Core::System& system_,
|
||||
std::shared_ptr<LibraryAppletStorage> impl)
|
||||
: ServiceFramework{system_, "ITransferStorageAccessor"}, m_impl{std::move(impl)} {
|
||||
static const FunctionInfo functions[] = {
|
||||
FunctionInfo{0, D<&ITransferStorageAccessor::GetSize>, "GetSize"},
|
||||
FunctionInfo{1, D<&ITransferStorageAccessor::GetHandle>, "GetHandle"},
|
||||
};
|
||||
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
ITransferStorageAccessor::~ITransferStorageAccessor() = default;
|
||||
|
||||
@@ -19,6 +19,7 @@ private:
|
||||
Result Write(InBuffer<BufferAttr_HipcAutoSelect> buffer, s64 offset);
|
||||
Result Read(OutBuffer<BufferAttr_HipcAutoSelect> out_buffer, s64 offset);
|
||||
|
||||
FunctionInfoBase const* FindRequest(u32 key) override;
|
||||
const std::shared_ptr<LibraryAppletStorage> m_impl;
|
||||
};
|
||||
|
||||
@@ -32,6 +33,7 @@ private:
|
||||
Result GetSize(Out<s64> out_size);
|
||||
Result GetHandle(Out<s64> out_size, OutCopyHandle<Kernel::KTransferMemory> out_handle);
|
||||
|
||||
FunctionInfoBase const* FindRequest(u32 key) override;
|
||||
const std::shared_ptr<LibraryAppletStorage> m_impl;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user