pgl: clean up and add new 23.0.0 command
This commit is contained in:
@@ -30,28 +30,28 @@ namespace ams::pgl {
|
||||
::pglEventObserverClose(std::addressof(m_observer));
|
||||
}
|
||||
|
||||
Result GetProcessEventHandle(ams::sf::OutCopyHandle out) {
|
||||
Result GetShellEvent(ams::sf::OutCopyHandle out) {
|
||||
::Event ev;
|
||||
ON_RESULT_SUCCESS { out.SetValue(ev.revent, true); };
|
||||
|
||||
R_RETURN(::pglEventObserverGetProcessEvent(std::addressof(m_observer), std::addressof(ev)));
|
||||
R_RETURN(::pglEventObserverGetShellEvent(std::addressof(m_observer), std::addressof(ev)));
|
||||
}
|
||||
|
||||
Result GetProcessEventInfo(ams::sf::Out<pm::ProcessEventInfo> out) {
|
||||
Result GetShellEventInfo(ams::sf::Out<pm::ProcessEventInfo> out) {
|
||||
static_assert(sizeof(*out.GetPointer()) == sizeof(::PmProcessEventInfo));
|
||||
R_RETURN(::pglEventObserverGetProcessEventInfo(std::addressof(m_observer), reinterpret_cast<::PmProcessEventInfo *>(out.GetPointer())));
|
||||
R_RETURN(::pglEventObserverGetShellEventInfo(std::addressof(m_observer), reinterpret_cast<::PmProcessEventInfo *>(out.GetPointer())));
|
||||
}
|
||||
|
||||
Result GetProcessEventHandle(ams::tipc::OutCopyHandle out) {
|
||||
Result GetShellEvent(ams::tipc::OutCopyHandle out) {
|
||||
::Event ev;
|
||||
ON_RESULT_SUCCESS { out.SetValue(ev.revent); };
|
||||
|
||||
R_RETURN(::pglEventObserverGetProcessEvent(std::addressof(m_observer), std::addressof(ev)));
|
||||
R_RETURN(::pglEventObserverGetShellEvent(std::addressof(m_observer), std::addressof(ev)));
|
||||
}
|
||||
|
||||
Result GetProcessEventInfo(ams::tipc::Out<pm::ProcessEventInfo> out) {
|
||||
Result GetShellEventInfo(ams::tipc::Out<pm::ProcessEventInfo> out) {
|
||||
static_assert(sizeof(*out.GetPointer()) == sizeof(::PmProcessEventInfo));
|
||||
R_RETURN(::pglEventObserverGetProcessEventInfo(std::addressof(m_observer), reinterpret_cast<::PmProcessEventInfo *>(out.GetPointer())));
|
||||
R_RETURN(::pglEventObserverGetShellEventInfo(std::addressof(m_observer), reinterpret_cast<::PmProcessEventInfo *>(out.GetPointer())));
|
||||
}
|
||||
};
|
||||
static_assert(pgl::sf::IsIEventObserver<RemoteEventObserver>);
|
||||
|
||||
@@ -80,22 +80,22 @@ namespace ams::pgl {
|
||||
R_RETURN(::pglLaunchProgramFromHost(reinterpret_cast<u64 *>(out), content_path, process_flags));
|
||||
}
|
||||
|
||||
Result GetHostContentMetaInfo(pgl::ContentMetaInfo *out, const char *content_path) {
|
||||
static_assert(sizeof(*out) == sizeof(::PglContentMetaInfo));
|
||||
R_RETURN(::pglGetHostContentMetaInfo(reinterpret_cast<::PglContentMetaInfo *>(out), content_path));
|
||||
Result GetHostProgramLaunchProperty(pgl::ProgramLaunchProperty *out, const char *content_path) {
|
||||
static_assert(sizeof(*out) == sizeof(::PglProgramLaunchProperty));
|
||||
R_RETURN(::pglGetHostProgramLaunchProperty(reinterpret_cast<::PglProgramLaunchProperty *>(out), content_path));
|
||||
}
|
||||
|
||||
Result GetApplicationProcessId(os::ProcessId *out) {
|
||||
Result GetRunningApplicationProcessId(os::ProcessId *out) {
|
||||
static_assert(sizeof(*out) == sizeof(u64));
|
||||
R_RETURN(::pglGetApplicationProcessId(reinterpret_cast<u64 *>(out)));
|
||||
R_RETURN(::pglGetRunningApplicationProcessId(reinterpret_cast<u64 *>(out)));
|
||||
}
|
||||
|
||||
Result BoostSystemMemoryResourceLimit(u64 size) {
|
||||
R_RETURN(::pglBoostSystemMemoryResourceLimit(size));
|
||||
}
|
||||
|
||||
Result IsProcessTracked(bool *out, os::ProcessId process_id) {
|
||||
R_RETURN(::pglIsProcessTracked(out, static_cast<u64>(process_id)));
|
||||
Result IsRunningProcess(bool *out, os::ProcessId process_id) {
|
||||
R_RETURN(::pglIsRunningProcess(out, static_cast<u64>(process_id)));
|
||||
}
|
||||
|
||||
Result EnableApplicationCrashReport(bool enabled) {
|
||||
@@ -110,13 +110,13 @@ namespace ams::pgl {
|
||||
R_RETURN(::pglEnableApplicationAllThreadDumpOnCrash(enabled));
|
||||
}
|
||||
|
||||
Result TriggerApplicationSnapShotDumper(const char *arg, SnapShotDumpType dump_type) {
|
||||
R_RETURN(::pglTriggerApplicationSnapShotDumper(static_cast<::PglSnapShotDumpType>(dump_type), arg));
|
||||
Result TriggerSnapShotDumper(const char *arg, SnapShotDumpType dump_type) {
|
||||
R_RETURN(::pglTriggerSnapShotDumper(static_cast<::PglSnapShotDumpType>(dump_type), arg));
|
||||
}
|
||||
|
||||
Result GetEventObserver(pgl::EventObserver *out) {
|
||||
Result CreateShellEvent(pgl::EventObserver *out) {
|
||||
::PglEventObserver obs;
|
||||
R_TRY(::pglGetEventObserver(std::addressof(obs)));
|
||||
R_TRY(::pglCreateShellEvent(std::addressof(obs)));
|
||||
|
||||
if (hos::GetVersion() >= hos::Version_12_0_0) {
|
||||
auto observer_holder = MakeUniqueFromStaticExpHeap<impl::EventObserverByTipc<RemoteEventObserver>>(obs);
|
||||
@@ -135,6 +135,10 @@ namespace ams::pgl {
|
||||
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result EnableApplicationCrashReport2(os::ProcessId process_id, bool enabled) {
|
||||
R_RETURN(::pglEnableApplicationCrashReport2(process_id, enabled));
|
||||
}
|
||||
#else
|
||||
Result Initialize() {
|
||||
AMS_ABORT("TODO");
|
||||
@@ -159,12 +163,12 @@ namespace ams::pgl {
|
||||
AMS_ABORT("TODO");
|
||||
}
|
||||
|
||||
Result GetHostContentMetaInfo(pgl::ContentMetaInfo *out, const char *content_path) {
|
||||
Result GetHostProgramLaunchProperty(pgl::ProgramLaunchProperty *out, const char *content_path) {
|
||||
AMS_UNUSED(out, content_path);
|
||||
AMS_ABORT("TODO");
|
||||
}
|
||||
|
||||
Result GetApplicationProcessId(os::ProcessId *out) {
|
||||
Result GetRunningApplicationProcessId(os::ProcessId *out) {
|
||||
AMS_UNUSED(out);
|
||||
AMS_ABORT("TODO");
|
||||
}
|
||||
@@ -174,7 +178,7 @@ namespace ams::pgl {
|
||||
AMS_ABORT("TODO");
|
||||
}
|
||||
|
||||
Result IsProcessTracked(bool *out, os::ProcessId process_id) {
|
||||
Result IsRunningProcess(bool *out, os::ProcessId process_id) {
|
||||
AMS_UNUSED(out, process_id);
|
||||
AMS_ABORT("TODO");
|
||||
}
|
||||
@@ -194,15 +198,20 @@ namespace ams::pgl {
|
||||
AMS_ABORT("TODO");
|
||||
}
|
||||
|
||||
Result TriggerApplicationSnapShotDumper(const char *arg, SnapShotDumpType dump_type) {
|
||||
Result TriggerSnapShotDumper(const char *arg, SnapShotDumpType dump_type) {
|
||||
AMS_UNUSED(arg, dump_type);
|
||||
AMS_ABORT("TODO");
|
||||
}
|
||||
|
||||
Result GetEventObserver(pgl::EventObserver *out) {
|
||||
Result CreateShellEvent(pgl::EventObserver *out) {
|
||||
AMS_UNUSED(out);
|
||||
AMS_ABORT("TODO");
|
||||
}
|
||||
|
||||
Result EnableApplicationCrashReport2(os::ProcessId process_id, bool enabled) {
|
||||
AMS_UNUSED(process_id, enabled);
|
||||
AMS_ABORT("TODO");
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
@@ -85,7 +85,7 @@ namespace ams::pgl::srv {
|
||||
}
|
||||
}
|
||||
|
||||
util::optional<os::ProcessId> GetRunningApplicationProcessId() {
|
||||
util::optional<os::ProcessId> GetRunningApplicationProcessIdInternal() {
|
||||
os::ProcessId process_id;
|
||||
if (R_SUCCEEDED(pm::shell::GetApplicationProcessIdForShell(std::addressof(process_id)))) {
|
||||
return process_id;
|
||||
@@ -403,9 +403,9 @@ namespace ams::pgl::srv {
|
||||
R_RETURN(pm::shell::TerminateProcess(process_id));
|
||||
}
|
||||
|
||||
Result GetApplicationProcessId(os::ProcessId *out) {
|
||||
/* Get the application process id. */
|
||||
auto application_process_id = GetRunningApplicationProcessId();
|
||||
Result GetRunningApplicationProcessId(os::ProcessId *out) {
|
||||
/* Get the running application process id. */
|
||||
auto application_process_id = GetRunningApplicationProcessIdInternal();
|
||||
R_UNLESS(application_process_id, pgl::ResultApplicationNotRunning());
|
||||
|
||||
/* Return the id. */
|
||||
@@ -418,7 +418,7 @@ namespace ams::pgl::srv {
|
||||
R_RETURN(pm::shell::BoostSystemMemoryResourceLimit(size));
|
||||
}
|
||||
|
||||
bool IsProcessTracked(os::ProcessId process_id) {
|
||||
bool IsRunningProcess(os::ProcessId process_id) {
|
||||
/* Check whether a ProcessData exists for the process. */
|
||||
std::scoped_lock lk(g_process_data_mutex);
|
||||
return FindProcessData(process_id) != nullptr;
|
||||
@@ -426,7 +426,7 @@ namespace ams::pgl::srv {
|
||||
|
||||
void EnableApplicationCrashReport(bool enabled) {
|
||||
/* Get the application process id. */
|
||||
auto application_process_id = GetRunningApplicationProcessId();
|
||||
auto application_process_id = GetRunningApplicationProcessIdInternal();
|
||||
if (application_process_id) {
|
||||
/* Find the data for the application process. */
|
||||
std::scoped_lock lk(g_process_data_mutex);
|
||||
@@ -446,7 +446,7 @@ namespace ams::pgl::srv {
|
||||
|
||||
bool IsApplicationCrashReportEnabled() {
|
||||
/* Get the application process id. */
|
||||
auto application_process_id = GetRunningApplicationProcessId();
|
||||
auto application_process_id = GetRunningApplicationProcessIdInternal();
|
||||
if (!application_process_id) {
|
||||
return false;
|
||||
}
|
||||
@@ -462,7 +462,7 @@ namespace ams::pgl::srv {
|
||||
|
||||
void EnableApplicationAllThreadDumpOnCrash(bool enabled) {
|
||||
/* Get the application process id. */
|
||||
auto application_process_id = GetRunningApplicationProcessId();
|
||||
auto application_process_id = GetRunningApplicationProcessIdInternal();
|
||||
if (application_process_id) {
|
||||
/* Find the data for the application process. */
|
||||
std::scoped_lock lk(g_process_data_mutex);
|
||||
@@ -486,7 +486,7 @@ namespace ams::pgl::srv {
|
||||
}
|
||||
}
|
||||
|
||||
Result TriggerApplicationSnapShotDumper(SnapShotDumpType dump_type, const char *arg) {
|
||||
Result TriggerSnapShotDumper(SnapShotDumpType dump_type, const char *arg) {
|
||||
/* Try to get the application process id. */
|
||||
os::ProcessId process_id;
|
||||
R_TRY(pm::shell::GetApplicationProcessIdForShell(std::addressof(process_id)));
|
||||
@@ -495,5 +495,21 @@ namespace ams::pgl::srv {
|
||||
ON_SCOPE_EXIT { g_ssd_process_id = os::InvalidProcessId; };
|
||||
R_RETURN(TriggerSnapShotDumper(process_id, dump_type, arg));
|
||||
}
|
||||
|
||||
void EnableApplicationCrashReport2(os::ProcessId process_id, bool enabled) {
|
||||
/* Find the data for the process. */
|
||||
std::scoped_lock lk(g_process_data_mutex);
|
||||
ProcessData *data = FindProcessData(*process_id);
|
||||
|
||||
/* It's okay if we aren't tracking the process. */
|
||||
if (data != nullptr) {
|
||||
/* Set or clear the flag. */
|
||||
if (enabled) {
|
||||
data->flags |= ProcessDataFlag_DetailedCrashReportEnabled;
|
||||
} else {
|
||||
data->flags &= ~ProcessDataFlag_DetailedCrashReportEnabled;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -27,12 +27,13 @@ namespace ams::pgl::srv {
|
||||
|
||||
Result LaunchProgram(os::ProcessId *out, const ncm::ProgramLocation &loc, u32 pm_flags, u8 pgl_flags);
|
||||
Result TerminateProcess(os::ProcessId process_id);
|
||||
Result GetApplicationProcessId(os::ProcessId *out);
|
||||
Result GetRunningApplicationProcessId(os::ProcessId *out);
|
||||
Result BoostSystemMemoryResourceLimit(u64 size);
|
||||
bool IsProcessTracked(os::ProcessId process_id);
|
||||
bool IsRunningProcess(os::ProcessId process_id);
|
||||
void EnableApplicationCrashReport(bool enabled);
|
||||
bool IsApplicationCrashReportEnabled();
|
||||
void EnableApplicationAllThreadDumpOnCrash(bool enabled);
|
||||
Result TriggerApplicationSnapShotDumper(SnapShotDumpType dump_type, const char *arg);
|
||||
Result TriggerSnapShotDumper(SnapShotDumpType dump_type, const char *arg);
|
||||
void EnableApplicationCrashReport2(os::ProcessId process_id, bool enabled);
|
||||
|
||||
}
|
||||
|
||||
@@ -65,21 +65,21 @@ namespace ams::pgl::srv {
|
||||
m_event.Signal();
|
||||
}
|
||||
|
||||
Result ShellEventObserverCmif::GetProcessEventHandle(ams::sf::OutCopyHandle out) {
|
||||
Result ShellEventObserverCmif::GetShellEvent(ams::sf::OutCopyHandle out) {
|
||||
out.SetValue(this->GetEvent().GetReadableHandle(), false);
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result ShellEventObserverCmif::GetProcessEventInfo(ams::sf::Out<pm::ProcessEventInfo> out) {
|
||||
Result ShellEventObserverCmif::GetShellEventInfo(ams::sf::Out<pm::ProcessEventInfo> out) {
|
||||
R_RETURN(this->PopEventInfo(out.GetPointer()));
|
||||
}
|
||||
|
||||
Result ShellEventObserverTipc::GetProcessEventHandle(ams::tipc::OutCopyHandle out) {
|
||||
Result ShellEventObserverTipc::GetShellEvent(ams::tipc::OutCopyHandle out) {
|
||||
out.SetValue(this->GetEvent().GetReadableHandle());
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result ShellEventObserverTipc::GetProcessEventInfo(ams::tipc::Out<pm::ProcessEventInfo> out) {
|
||||
Result ShellEventObserverTipc::GetShellEventInfo(ams::tipc::Out<pm::ProcessEventInfo> out) {
|
||||
R_RETURN(this->PopEventInfo(out.GetPointer()));
|
||||
}
|
||||
|
||||
|
||||
@@ -60,15 +60,15 @@ namespace ams::pgl::srv {
|
||||
|
||||
class ShellEventObserverCmif : public ShellEventObserverImpl {
|
||||
public:
|
||||
Result GetProcessEventHandle(ams::sf::OutCopyHandle out);
|
||||
Result GetProcessEventInfo(ams::sf::Out<pm::ProcessEventInfo> out);
|
||||
Result GetShellEvent(ams::sf::OutCopyHandle out);
|
||||
Result GetShellEventInfo(ams::sf::Out<pm::ProcessEventInfo> out);
|
||||
};
|
||||
static_assert(pgl::sf::IsIEventObserver<ShellEventObserverCmif>);
|
||||
|
||||
class ShellEventObserverTipc : public ShellEventObserverImpl {
|
||||
public:
|
||||
Result GetProcessEventHandle(ams::tipc::OutCopyHandle out);
|
||||
Result GetProcessEventInfo(ams::tipc::Out<pm::ProcessEventInfo> out);
|
||||
Result GetShellEvent(ams::tipc::OutCopyHandle out);
|
||||
Result GetShellEventInfo(ams::tipc::Out<pm::ProcessEventInfo> out);
|
||||
};
|
||||
static_assert(pgl::tipc::IsIEventObserver<ShellEventObserverTipc>);
|
||||
|
||||
|
||||
@@ -335,7 +335,7 @@ namespace ams::pgl::srv {
|
||||
R_RETURN(pgl::srv::LaunchProgram(out, ncm::ProgramLocation::Make(reader.GetProgramId(), ncm::StorageId::Host), pm_flags, pgl::LaunchFlags_None));
|
||||
}
|
||||
|
||||
Result GetHostContentMetaInfo(pgl::ContentMetaInfo *out, const char *package_path) {
|
||||
Result GetProgramLaunchPropertyFromHost(pgl::ProgramLaunchProperty *out, const char *package_path) {
|
||||
/* Read the package. */
|
||||
HostPackageReader reader;
|
||||
R_TRY(reader.Initialize(package_path, HostPackageMountName));
|
||||
@@ -343,7 +343,7 @@ namespace ams::pgl::srv {
|
||||
/* Read the program info. */
|
||||
R_TRY(reader.ReadProgramInfo());
|
||||
|
||||
/* Get the content meta info. */
|
||||
/* Get the program launch property. */
|
||||
*out = {
|
||||
.id = reader.GetProgramId().value,
|
||||
.version = reader.GetProgramVersion(),
|
||||
|
||||
@@ -19,6 +19,6 @@
|
||||
namespace ams::pgl::srv {
|
||||
|
||||
Result LaunchProgramFromHost(os::ProcessId *out, const char *content_path, u32 pm_flags);
|
||||
Result GetHostContentMetaInfo(pgl::ContentMetaInfo *out, const char *content_path);
|
||||
Result GetProgramLaunchPropertyFromHost(pgl::ProgramLaunchProperty *out, const char *content_path);
|
||||
|
||||
}
|
||||
|
||||
@@ -34,21 +34,21 @@ namespace ams::pgl::srv {
|
||||
R_RETURN(pgl::srv::LaunchProgramFromHost(out, static_cast<const char *>(content_path), pm_flags));
|
||||
}
|
||||
|
||||
Result ShellInterfaceCommon::GetHostContentMetaInfoImpl(pgl::ContentMetaInfo *out, const void *content_path, size_t content_path_size) {
|
||||
Result ShellInterfaceCommon::GetProgramLaunchPropertyFromHostImpl(pgl::ProgramLaunchProperty *out, const void *content_path, size_t content_path_size) {
|
||||
AMS_UNUSED(content_path_size);
|
||||
R_RETURN(pgl::srv::GetHostContentMetaInfo(out, static_cast<const char *>(content_path)));
|
||||
R_RETURN(pgl::srv::GetProgramLaunchPropertyFromHost(out, static_cast<const char *>(content_path)));
|
||||
}
|
||||
|
||||
Result ShellInterfaceCommon::GetApplicationProcessIdImpl(os::ProcessId *out) {
|
||||
R_RETURN(pgl::srv::GetApplicationProcessId(out));
|
||||
Result ShellInterfaceCommon::GetRunningApplicationProcessIdImpl(os::ProcessId *out) {
|
||||
R_RETURN(pgl::srv::GetRunningApplicationProcessId(out));
|
||||
}
|
||||
|
||||
Result ShellInterfaceCommon::BoostSystemMemoryResourceLimitImpl(u64 size) {
|
||||
R_RETURN(pgl::srv::BoostSystemMemoryResourceLimit(size));
|
||||
}
|
||||
|
||||
Result ShellInterfaceCommon::IsProcessTrackedImpl(bool *out, os::ProcessId process_id) {
|
||||
*out = pgl::srv::IsProcessTracked(process_id);
|
||||
Result ShellInterfaceCommon::IsRunningProcessImpl(bool *out, os::ProcessId process_id) {
|
||||
*out = pgl::srv::IsRunningProcess(process_id);
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
@@ -67,13 +67,18 @@ namespace ams::pgl::srv {
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result ShellInterfaceCommon::GetProcessId(os::ProcessId *out, ncm::ProgramId program_id) {
|
||||
Result ShellInterfaceCommon::GetProcessIdImpl(os::ProcessId *out, ncm::ProgramId program_id) {
|
||||
R_RETURN(pm::shell::GetProcessId(out, program_id));
|
||||
}
|
||||
|
||||
Result ShellInterfaceCommon::TriggerApplicationSnapShotDumperImpl(SnapShotDumpType dump_type, const void *arg, size_t arg_size) {
|
||||
Result ShellInterfaceCommon::TriggerSnapShotDumperImpl(SnapShotDumpType dump_type, const void *arg, size_t arg_size) {
|
||||
AMS_UNUSED(arg_size);
|
||||
R_RETURN(pgl::srv::TriggerApplicationSnapShotDumper(dump_type, static_cast<const char *>(arg)));
|
||||
R_RETURN(pgl::srv::TriggerSnapShotDumper(dump_type, static_cast<const char *>(arg)));
|
||||
}
|
||||
|
||||
Result ShellInterfaceCommon::EnableApplicationCrashReport2Impl(os::ProcessId process_id, bool enabled) {
|
||||
pgl::srv::EnableApplicationCrashReport2(process_id, enabled);
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result ShellInterfaceCmif::LaunchProgram(ams::sf::Out<os::ProcessId> out, const ncm::ProgramLocation &loc, u32 pm_flags, u8 pgl_flags) {
|
||||
@@ -88,20 +93,20 @@ namespace ams::pgl::srv {
|
||||
R_RETURN(this->LaunchProgramFromHostImpl(out.GetPointer(), content_path.GetPointer(), content_path.GetSize(), pm_flags));
|
||||
}
|
||||
|
||||
Result ShellInterfaceCmif::GetHostContentMetaInfo(ams::sf::Out<pgl::ContentMetaInfo> out, const ams::sf::InBuffer &content_path) {
|
||||
R_RETURN(this->GetHostContentMetaInfoImpl(out.GetPointer(), content_path.GetPointer(), content_path.GetSize()));
|
||||
Result ShellInterfaceCmif::GetProgramLaunchPropertyFromHost(ams::sf::Out<pgl::ProgramLaunchProperty> out, const ams::sf::InBuffer &content_path) {
|
||||
R_RETURN(this->GetProgramLaunchPropertyFromHostImpl(out.GetPointer(), content_path.GetPointer(), content_path.GetSize()));
|
||||
}
|
||||
|
||||
Result ShellInterfaceCmif::GetApplicationProcessId(ams::sf::Out<os::ProcessId> out) {
|
||||
R_RETURN(this->GetApplicationProcessIdImpl(out.GetPointer()));
|
||||
Result ShellInterfaceCmif::GetRunningApplicationProcessId(ams::sf::Out<os::ProcessId> out) {
|
||||
R_RETURN(this->GetRunningApplicationProcessIdImpl(out.GetPointer()));
|
||||
}
|
||||
|
||||
Result ShellInterfaceCmif::BoostSystemMemoryResourceLimit(u64 size) {
|
||||
R_RETURN(this->BoostSystemMemoryResourceLimitImpl(size));
|
||||
}
|
||||
|
||||
Result ShellInterfaceCmif::IsProcessTracked(ams::sf::Out<bool> out, os::ProcessId process_id) {
|
||||
R_RETURN(this->IsProcessTrackedImpl(out.GetPointer(), process_id));
|
||||
Result ShellInterfaceCmif::IsRunningProcess(ams::sf::Out<bool> out, os::ProcessId process_id) {
|
||||
R_RETURN(this->IsRunningProcessImpl(out.GetPointer(), process_id));
|
||||
}
|
||||
|
||||
Result ShellInterfaceCmif::EnableApplicationCrashReport(bool enabled) {
|
||||
@@ -116,15 +121,11 @@ namespace ams::pgl::srv {
|
||||
R_RETURN(this->EnableApplicationAllThreadDumpOnCrashImpl(enabled));
|
||||
}
|
||||
|
||||
Result ShellInterfaceCmif::TriggerApplicationSnapShotDumper(SnapShotDumpType dump_type, const ams::sf::InBuffer &arg) {
|
||||
R_RETURN(this->TriggerApplicationSnapShotDumperImpl(dump_type, arg.GetPointer(), arg.GetSize()));
|
||||
Result ShellInterfaceCmif::TriggerSnapShotDumper(SnapShotDumpType dump_type, const ams::sf::InBuffer &arg) {
|
||||
R_RETURN(this->TriggerSnapShotDumperImpl(dump_type, arg.GetPointer(), arg.GetSize()));
|
||||
}
|
||||
|
||||
Result ShellInterfaceCmif::GetProcessId(ams::sf::Out<os::ProcessId> out, ncm::ProgramId program_id) {
|
||||
R_RETURN(ShellInterfaceCommon::GetProcessId(out.GetPointer(), program_id));
|
||||
}
|
||||
|
||||
Result ShellInterfaceCmif::GetShellEventObserver(ams::sf::Out<ams::sf::SharedPointer<pgl::sf::IEventObserver>> out) {
|
||||
Result ShellInterfaceCmif::CreateShellEvent(ams::sf::Out<ams::sf::SharedPointer<pgl::sf::IEventObserver>> out) {
|
||||
/* Allocate a new interface. */
|
||||
auto session = ObjectFactory::CreateSharedEmplaced<pgl::sf::IEventObserver, ShellEventObserverCmif>(m_allocator);
|
||||
R_UNLESS(session != nullptr, pgl::ResultOutOfMemory());
|
||||
@@ -150,20 +151,20 @@ namespace ams::pgl::srv {
|
||||
R_RETURN(this->LaunchProgramFromHostImpl(out.GetPointer(), content_path.GetPointer(), content_path.GetSize(), pm_flags));
|
||||
}
|
||||
|
||||
Result ShellInterfaceTipc::GetHostContentMetaInfo(ams::tipc::Out<pgl::ContentMetaInfo> out, const ams::tipc::InBuffer content_path) {
|
||||
R_RETURN(this->GetHostContentMetaInfoImpl(out.GetPointer(), content_path.GetPointer(), content_path.GetSize()));
|
||||
Result ShellInterfaceTipc::GetProgramLaunchPropertyFromHost(ams::tipc::Out<pgl::ProgramLaunchProperty> out, const ams::tipc::InBuffer content_path) {
|
||||
R_RETURN(this->GetProgramLaunchPropertyFromHostImpl(out.GetPointer(), content_path.GetPointer(), content_path.GetSize()));
|
||||
}
|
||||
|
||||
Result ShellInterfaceTipc::GetApplicationProcessId(ams::tipc::Out<os::ProcessId> out) {
|
||||
R_RETURN(this->GetApplicationProcessIdImpl(out.GetPointer()));
|
||||
Result ShellInterfaceTipc::GetRunningApplicationProcessId(ams::tipc::Out<os::ProcessId> out) {
|
||||
R_RETURN(this->GetRunningApplicationProcessIdImpl(out.GetPointer()));
|
||||
}
|
||||
|
||||
Result ShellInterfaceTipc::BoostSystemMemoryResourceLimit(u64 size) {
|
||||
R_RETURN(this->BoostSystemMemoryResourceLimitImpl(size));
|
||||
}
|
||||
|
||||
Result ShellInterfaceTipc::IsProcessTracked(ams::tipc::Out<bool> out, os::ProcessId process_id) {
|
||||
R_RETURN(this->IsProcessTrackedImpl(out.GetPointer(), process_id));
|
||||
Result ShellInterfaceTipc::IsRunningProcess(ams::tipc::Out<bool> out, os::ProcessId process_id) {
|
||||
R_RETURN(this->IsRunningProcessImpl(out.GetPointer(), process_id));
|
||||
}
|
||||
|
||||
Result ShellInterfaceTipc::EnableApplicationCrashReport(bool enabled) {
|
||||
@@ -179,11 +180,14 @@ namespace ams::pgl::srv {
|
||||
}
|
||||
|
||||
Result ShellInterfaceTipc::GetProcessId(ams::tipc::Out<os::ProcessId> out, ncm::ProgramId program_id) {
|
||||
R_RETURN(ShellInterfaceCommon::GetProcessId(out.GetPointer(), program_id));
|
||||
R_RETURN(this->GetProcessIdImpl(out.GetPointer(), program_id));
|
||||
}
|
||||
|
||||
Result ShellInterfaceTipc::GetShellEventObserver(ams::tipc::OutMoveHandle out) {
|
||||
Result ShellInterfaceTipc::CreateShellEvent(ams::tipc::OutMoveHandle out) {
|
||||
R_RETURN(pgl::srv::AllocateShellEventObserverForTipc(out.GetPointer()));
|
||||
}
|
||||
|
||||
|
||||
Result ShellInterfaceTipc::EnableApplicationCrashReport2(os::ProcessId process_id, bool enabled) {
|
||||
R_RETURN(this->EnableApplicationCrashReport2Impl(process_id, enabled));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user