mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-28 13:44:11 -04:00
sm/tipc: minor cleanup
This commit is contained in:
parent
124a1a1ea0
commit
0189c5f1e6
15 changed files with 394 additions and 599 deletions
|
@ -15,17 +15,33 @@
|
|||
*/
|
||||
#pragma once
|
||||
#include <stratosphere.hpp>
|
||||
#include "impl/sm_service_manager.hpp"
|
||||
|
||||
namespace ams::sm {
|
||||
|
||||
/* Service definition. */
|
||||
class ManagerService {
|
||||
public:
|
||||
Result RegisterProcess(os::ProcessId process_id, const tipc::InBuffer acid_sac, const tipc::InBuffer aci_sac);
|
||||
Result UnregisterProcess(os::ProcessId process_id);
|
||||
void AtmosphereEndInitDefers();
|
||||
void AtmosphereHasMitm(tipc::Out<bool> out, ServiceName service);
|
||||
Result AtmosphereRegisterProcess(os::ProcessId process_id, ncm::ProgramId program_id, cfg::OverrideStatus override_status, const tipc::InBuffer acid_sac, const tipc::InBuffer aci_sac);
|
||||
Result RegisterProcess(os::ProcessId process_id, const tipc::InBuffer acid_sac, const tipc::InBuffer aci_sac) {
|
||||
return impl::RegisterProcess(process_id, ncm::InvalidProgramId, cfg::OverrideStatus{}, acid_sac.GetPointer(), acid_sac.GetSize(), aci_sac.GetPointer(), aci_sac.GetSize());
|
||||
}
|
||||
|
||||
Result UnregisterProcess(os::ProcessId process_id) {
|
||||
return impl::UnregisterProcess(process_id);
|
||||
}
|
||||
|
||||
void AtmosphereEndInitDefers() {
|
||||
R_ABORT_UNLESS(impl::EndInitialDefers());
|
||||
}
|
||||
|
||||
void AtmosphereHasMitm(tipc::Out<bool> out, ServiceName service) {
|
||||
R_ABORT_UNLESS(impl::HasMitm(out.GetPointer(), service));
|
||||
}
|
||||
|
||||
Result AtmosphereRegisterProcess(os::ProcessId process_id, ncm::ProgramId program_id, cfg::OverrideStatus override_status, const tipc::InBuffer acid_sac, const tipc::InBuffer aci_sac) {
|
||||
/* This takes in a program id and override status, unlike RegisterProcess. */
|
||||
return impl::RegisterProcess(process_id, program_id, override_status, acid_sac.GetPointer(), acid_sac.GetSize(), aci_sac.GetPointer(), aci_sac.GetSize());
|
||||
}
|
||||
};
|
||||
static_assert(sm::impl::IsIManagerInterface<ManagerService>);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue