summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Liam2024-02-17 14:08:49 -0500
committerGravatar Liam2024-02-18 10:35:37 -0500
commitcf0de18982da2b83772d64940064b17946dabd21 (patch)
tree7b4d6324bac442205013de85497898a66cd09cad /src
parentns: rewrite ISystemUpdateInterface (diff)
downloadyuzu-cf0de18982da2b83772d64940064b17946dabd21.tar.gz
yuzu-cf0de18982da2b83772d64940064b17946dabd21.tar.xz
yuzu-cf0de18982da2b83772d64940064b17946dabd21.zip
ns: move IDevelopInterface
Diffstat (limited to 'src')
-rw-r--r--src/core/CMakeLists.txt2
-rw-r--r--src/core/hle/service/ns/develop_interface.cpp38
-rw-r--r--src/core/hle/service/ns/develop_interface.h16
-rw-r--r--src/core/hle/service/ns/ns.cpp34
4 files changed, 58 insertions, 32 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 2fb3dafd6..4ec9a1548 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -745,6 +745,8 @@ add_library(core STATIC
745 hle/service/ns/application_version_interface.h 745 hle/service/ns/application_version_interface.h
746 hle/service/ns/content_management_interface.cpp 746 hle/service/ns/content_management_interface.cpp
747 hle/service/ns/content_management_interface.h 747 hle/service/ns/content_management_interface.h
748 hle/service/ns/develop_interface.cpp
749 hle/service/ns/develop_interface.h
748 hle/service/ns/document_interface.cpp 750 hle/service/ns/document_interface.cpp
749 hle/service/ns/document_interface.h 751 hle/service/ns/document_interface.h
750 hle/service/ns/download_task_interface.cpp 752 hle/service/ns/download_task_interface.cpp
diff --git a/src/core/hle/service/ns/develop_interface.cpp b/src/core/hle/service/ns/develop_interface.cpp
new file mode 100644
index 000000000..880bdbebb
--- /dev/null
+++ b/src/core/hle/service/ns/develop_interface.cpp
@@ -0,0 +1,38 @@
1// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#include "core/hle/service/ns/develop_interface.h"
5
6namespace Service::NS {
7
8IDevelopInterface::IDevelopInterface(Core::System& system_) : ServiceFramework{system_, "ns:dev"} {
9 // clang-format off
10 static const FunctionInfo functions[] = {
11 {0, nullptr, "LaunchProgram"},
12 {1, nullptr, "TerminateProcess"},
13 {2, nullptr, "TerminateProgram"},
14 {4, nullptr, "GetShellEvent"},
15 {5, nullptr, "GetShellEventInfo"},
16 {6, nullptr, "TerminateApplication"},
17 {7, nullptr, "PrepareLaunchProgramFromHost"},
18 {8, nullptr, "LaunchApplicationFromHost"},
19 {9, nullptr, "LaunchApplicationWithStorageIdForDevelop"},
20 {10, nullptr, "IsSystemMemoryResourceLimitBoosted"},
21 {11, nullptr, "GetRunningApplicationProcessIdForDevelop"},
22 {12, nullptr, "SetCurrentApplicationRightsEnvironmentCanBeActiveForDevelop"},
23 {13, nullptr, "CreateApplicationResourceForDevelop"},
24 {14, nullptr, "IsPreomiaForDevelop"},
25 {15, nullptr, "GetApplicationProgramIdFromHost"},
26 {16, nullptr, "RefreshCachedDebugValues"},
27 {17, nullptr, "PrepareLaunchApplicationFromHost"},
28 {18, nullptr, "GetLaunchEvent"},
29 {19, nullptr, "GetLaunchResult"},
30 };
31 // clang-format on
32
33 RegisterHandlers(functions);
34}
35
36IDevelopInterface::~IDevelopInterface() = default;
37
38} // namespace Service::NS
diff --git a/src/core/hle/service/ns/develop_interface.h b/src/core/hle/service/ns/develop_interface.h
new file mode 100644
index 000000000..a9f81ccd6
--- /dev/null
+++ b/src/core/hle/service/ns/develop_interface.h
@@ -0,0 +1,16 @@
1// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#pragma once
5
6#include "core/hle/service/service.h"
7
8namespace Service::NS {
9
10class IDevelopInterface final : public ServiceFramework<IDevelopInterface> {
11public:
12 explicit IDevelopInterface(Core::System& system_);
13 ~IDevelopInterface() override;
14};
15
16} // namespace Service::NS
diff --git a/src/core/hle/service/ns/ns.cpp b/src/core/hle/service/ns/ns.cpp
index c4940db26..5b05c40d5 100644
--- a/src/core/hle/service/ns/ns.cpp
+++ b/src/core/hle/service/ns/ns.cpp
@@ -14,6 +14,7 @@
14#include "core/hle/service/ns/account_proxy_interface.h" 14#include "core/hle/service/ns/account_proxy_interface.h"
15#include "core/hle/service/ns/application_version_interface.h" 15#include "core/hle/service/ns/application_version_interface.h"
16#include "core/hle/service/ns/content_management_interface.h" 16#include "core/hle/service/ns/content_management_interface.h"
17#include "core/hle/service/ns/develop_interface.h"
17#include "core/hle/service/ns/document_interface.h" 18#include "core/hle/service/ns/document_interface.h"
18#include "core/hle/service/ns/download_task_interface.h" 19#include "core/hle/service/ns/download_task_interface.h"
19#include "core/hle/service/ns/dynamic_rights_interface.h" 20#include "core/hle/service/ns/dynamic_rights_interface.h"
@@ -499,37 +500,6 @@ std::shared_ptr<IApplicationManagerInterface> NS::GetApplicationManagerInterface
499 return GetInterface<IApplicationManagerInterface>(system); 500 return GetInterface<IApplicationManagerInterface>(system);
500} 501}
501 502
502class NS_DEV final : public ServiceFramework<NS_DEV> {
503public:
504 explicit NS_DEV(Core::System& system_) : ServiceFramework{system_, "ns:dev"} {
505 // clang-format off
506 static const FunctionInfo functions[] = {
507 {0, nullptr, "LaunchProgram"},
508 {1, nullptr, "TerminateProcess"},
509 {2, nullptr, "TerminateProgram"},
510 {4, nullptr, "GetShellEvent"},
511 {5, nullptr, "GetShellEventInfo"},
512 {6, nullptr, "TerminateApplication"},
513 {7, nullptr, "PrepareLaunchProgramFromHost"},
514 {8, nullptr, "LaunchApplicationFromHost"},
515 {9, nullptr, "LaunchApplicationWithStorageIdForDevelop"},
516 {10, nullptr, "IsSystemMemoryResourceLimitBoosted"},
517 {11, nullptr, "GetRunningApplicationProcessIdForDevelop"},
518 {12, nullptr, "SetCurrentApplicationRightsEnvironmentCanBeActiveForDevelop"},
519 {13, nullptr, "CreateApplicationResourceForDevelop"},
520 {14, nullptr, "IsPreomiaForDevelop"},
521 {15, nullptr, "GetApplicationProgramIdFromHost"},
522 {16, nullptr, "RefreshCachedDebugValues"},
523 {17, nullptr, "PrepareLaunchApplicationFromHost"},
524 {18, nullptr, "GetLaunchEvent"},
525 {19, nullptr, "GetLaunchResult"},
526 };
527 // clang-format on
528
529 RegisterHandlers(functions);
530 }
531};
532
533void LoopProcess(Core::System& system) { 503void LoopProcess(Core::System& system) {
534 auto server_manager = std::make_unique<ServerManager>(system); 504 auto server_manager = std::make_unique<ServerManager>(system);
535 505
@@ -540,7 +510,7 @@ void LoopProcess(Core::System& system) {
540 server_manager->RegisterNamedService("ns:web", std::make_shared<NS>("ns:web", system)); 510 server_manager->RegisterNamedService("ns:web", std::make_shared<NS>("ns:web", system));
541 server_manager->RegisterNamedService("ns:ro", std::make_shared<NS>("ns:ro", system)); 511 server_manager->RegisterNamedService("ns:ro", std::make_shared<NS>("ns:ro", system));
542 512
543 server_manager->RegisterNamedService("ns:dev", std::make_shared<NS_DEV>(system)); 513 server_manager->RegisterNamedService("ns:dev", std::make_shared<IDevelopInterface>(system));
544 server_manager->RegisterNamedService("ns:su", std::make_shared<ISystemUpdateInterface>(system)); 514 server_manager->RegisterNamedService("ns:su", std::make_shared<ISystemUpdateInterface>(system));
545 server_manager->RegisterNamedService("ns:vm", 515 server_manager->RegisterNamedService("ns:vm",
546 std::make_shared<IVulnerabilityManagerInterface>(system)); 516 std::make_shared<IVulnerabilityManagerInterface>(system));