mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-28 21:54:10 -04:00
sf: Change interface definition methodology (#1074)
* sf: Begin experimenting with new interface declaration format * sf: convert fs interfaces to new format * sf: finish conversion of libstrat to new definitions * sf: convert loader to new format * sf: convert spl to new format * sf: update ncm for new format * sf: convert pm to new format * sf: convert ro/sm to new format * sf: update fatal for new format * sf: support building dmnt under new scheme * sf: update ams.mitm for new format * sf: correct invocation def for pointer holder * fs: correct 10.x+ user bindings for Get*SpaceSize
This commit is contained in:
parent
94eb2195d3
commit
9fde97cfdd
190 changed files with 3220 additions and 3172 deletions
|
@ -18,101 +18,27 @@
|
|||
|
||||
namespace ams::ldr {
|
||||
|
||||
class LoaderService : public sf::IServiceObject {
|
||||
protected:
|
||||
class LoaderService final {
|
||||
public:
|
||||
/* Official commands. */
|
||||
virtual Result CreateProcess(sf::OutMoveHandle proc_h, PinId id, u32 flags, sf::CopyHandle reslimit_h);
|
||||
virtual Result GetProgramInfo(sf::Out<ProgramInfo> out_program_info, const ncm::ProgramLocation &loc);
|
||||
virtual Result PinProgram(sf::Out<PinId> out_id, const ncm::ProgramLocation &loc);
|
||||
virtual Result UnpinProgram(PinId id);
|
||||
virtual Result SetProgramArguments(ncm::ProgramId program_id, const sf::InPointerBuffer &args, u32 args_size);
|
||||
virtual Result FlushArguments();
|
||||
virtual Result GetProcessModuleInfo(sf::Out<u32> count, const sf::OutPointerArray<ModuleInfo> &out, os::ProcessId process_id);
|
||||
virtual Result SetEnabledProgramVerification(bool enabled);
|
||||
Result CreateProcess(sf::OutMoveHandle proc_h, PinId id, u32 flags, sf::CopyHandle reslimit_h);
|
||||
Result GetProgramInfo(sf::Out<ProgramInfo> out_program_info, const ncm::ProgramLocation &loc);
|
||||
Result PinProgram(sf::Out<PinId> out_id, const ncm::ProgramLocation &loc);
|
||||
Result UnpinProgram(PinId id);
|
||||
Result SetProgramArguments(ncm::ProgramId program_id, const sf::InPointerBuffer &args, u32 args_size);
|
||||
Result FlushArguments();
|
||||
Result GetProcessModuleInfo(sf::Out<u32> count, const sf::OutPointerArray<ModuleInfo> &out, os::ProcessId process_id);
|
||||
Result SetEnabledProgramVerification(bool enabled);
|
||||
|
||||
/* Atmosphere commands. */
|
||||
virtual Result AtmosphereRegisterExternalCode(sf::OutMoveHandle out, ncm::ProgramId program_id);
|
||||
virtual void AtmosphereUnregisterExternalCode(ncm::ProgramId program_id);
|
||||
virtual void AtmosphereHasLaunchedProgram(sf::Out<bool> out, ncm::ProgramId program_id);
|
||||
virtual Result AtmosphereGetProgramInfo(sf::Out<ProgramInfo> out_program_info, sf::Out<cfg::OverrideStatus> out_status, const ncm::ProgramLocation &loc);
|
||||
virtual Result AtmospherePinProgram(sf::Out<PinId> out_id, const ncm::ProgramLocation &loc, const cfg::OverrideStatus &override_status);
|
||||
Result AtmosphereRegisterExternalCode(sf::OutMoveHandle out, ncm::ProgramId program_id);
|
||||
void AtmosphereUnregisterExternalCode(ncm::ProgramId program_id);
|
||||
void AtmosphereHasLaunchedProgram(sf::Out<bool> out, ncm::ProgramId program_id);
|
||||
Result AtmosphereGetProgramInfo(sf::Out<ProgramInfo> out_program_info, sf::Out<cfg::OverrideStatus> out_status, const ncm::ProgramLocation &loc);
|
||||
Result AtmospherePinProgram(sf::Out<PinId> out_id, const ncm::ProgramLocation &loc, const cfg::OverrideStatus &override_status);
|
||||
};
|
||||
|
||||
namespace pm {
|
||||
|
||||
class ProcessManagerInterface final : public LoaderService {
|
||||
protected:
|
||||
enum class CommandId {
|
||||
CreateProcess = 0,
|
||||
GetProgramInfo = 1,
|
||||
PinProgram = 2,
|
||||
UnpinProgram = 3,
|
||||
SetEnabledProgramVerification = 4,
|
||||
|
||||
AtmosphereHasLaunchedProgram = 65000,
|
||||
AtmosphereGetProgramInfo = 65001,
|
||||
AtmospherePinProgram = 65002,
|
||||
};
|
||||
public:
|
||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||
MAKE_SERVICE_COMMAND_META(CreateProcess),
|
||||
MAKE_SERVICE_COMMAND_META(GetProgramInfo),
|
||||
MAKE_SERVICE_COMMAND_META(PinProgram),
|
||||
MAKE_SERVICE_COMMAND_META(UnpinProgram),
|
||||
MAKE_SERVICE_COMMAND_META(SetEnabledProgramVerification, hos::Version_10_0_0),
|
||||
|
||||
MAKE_SERVICE_COMMAND_META(AtmosphereHasLaunchedProgram),
|
||||
MAKE_SERVICE_COMMAND_META(AtmosphereGetProgramInfo),
|
||||
MAKE_SERVICE_COMMAND_META(AtmospherePinProgram),
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace dmnt {
|
||||
|
||||
class DebugMonitorInterface final : public LoaderService {
|
||||
protected:
|
||||
enum class CommandId {
|
||||
SetProgramArguments = 0,
|
||||
FlushArguments = 1,
|
||||
GetProcessModuleInfo = 2,
|
||||
|
||||
AtmosphereHasLaunchedProgram = 65000,
|
||||
};
|
||||
public:
|
||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||
MAKE_SERVICE_COMMAND_META(SetProgramArguments),
|
||||
MAKE_SERVICE_COMMAND_META(FlushArguments),
|
||||
MAKE_SERVICE_COMMAND_META(GetProcessModuleInfo),
|
||||
|
||||
MAKE_SERVICE_COMMAND_META(AtmosphereHasLaunchedProgram),
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace shell {
|
||||
|
||||
class ShellInterface final : public LoaderService {
|
||||
protected:
|
||||
enum class CommandId {
|
||||
SetProgramArguments = 0,
|
||||
FlushArguments = 1,
|
||||
|
||||
AtmosphereRegisterExternalCode = 65000,
|
||||
AtmosphereUnregisterExternalCode = 65001,
|
||||
};
|
||||
public:
|
||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||
MAKE_SERVICE_COMMAND_META(SetProgramArguments),
|
||||
MAKE_SERVICE_COMMAND_META(FlushArguments),
|
||||
|
||||
MAKE_SERVICE_COMMAND_META(AtmosphereRegisterExternalCode),
|
||||
MAKE_SERVICE_COMMAND_META(AtmosphereUnregisterExternalCode),
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
static_assert(ams::ldr::impl::IsIProcessManagerInterface<LoaderService>);
|
||||
static_assert(ams::ldr::impl::IsIDebugMonitorInterface<LoaderService>);
|
||||
static_assert(ams::ldr::impl::IsIShellInterface<LoaderService>);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue