summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/CMakeLists.txt2
-rw-r--r--src/core/hle/service/ns/ns.cpp37
-rw-r--r--src/core/hle/service/ns/system_update_control.cpp44
-rw-r--r--src/core/hle/service/ns/system_update_control.h16
4 files changed, 63 insertions, 36 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 12a6fe273..fdd1c54ac 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -769,6 +769,8 @@ add_library(core STATIC
769 hle/service/ns/read_only_application_control_data_interface.h 769 hle/service/ns/read_only_application_control_data_interface.h
770 hle/service/ns/read_only_application_record_interface.cpp 770 hle/service/ns/read_only_application_record_interface.cpp
771 hle/service/ns/read_only_application_record_interface.h 771 hle/service/ns/read_only_application_record_interface.h
772 hle/service/ns/system_update_control.cpp
773 hle/service/ns/system_update_control.h
772 hle/service/ns/vulnerability_manager_interface.cpp 774 hle/service/ns/vulnerability_manager_interface.cpp
773 hle/service/ns/vulnerability_manager_interface.h 775 hle/service/ns/vulnerability_manager_interface.h
774 hle/service/nvdrv/core/container.cpp 776 hle/service/nvdrv/core/container.cpp
diff --git a/src/core/hle/service/ns/ns.cpp b/src/core/hle/service/ns/ns.cpp
index 39d3c67c0..89700ae01 100644
--- a/src/core/hle/service/ns/ns.cpp
+++ b/src/core/hle/service/ns/ns.cpp
@@ -26,6 +26,7 @@
26#include "core/hle/service/ns/platform_service_manager.h" 26#include "core/hle/service/ns/platform_service_manager.h"
27#include "core/hle/service/ns/read_only_application_control_data_interface.h" 27#include "core/hle/service/ns/read_only_application_control_data_interface.h"
28#include "core/hle/service/ns/read_only_application_record_interface.h" 28#include "core/hle/service/ns/read_only_application_record_interface.h"
29#include "core/hle/service/ns/system_update_control.h"
29#include "core/hle/service/ns/vulnerability_manager_interface.h" 30#include "core/hle/service/ns/vulnerability_manager_interface.h"
30#include "core/hle/service/server_manager.h" 31#include "core/hle/service/server_manager.h"
31#include "core/hle/service/set/settings_server.h" 32#include "core/hle/service/set/settings_server.h"
@@ -528,42 +529,6 @@ public:
528 } 529 }
529}; 530};
530 531
531class ISystemUpdateControl final : public ServiceFramework<ISystemUpdateControl> {
532public:
533 explicit ISystemUpdateControl(Core::System& system_)
534 : ServiceFramework{system_, "ISystemUpdateControl"} {
535 // clang-format off
536 static const FunctionInfo functions[] = {
537 {0, nullptr, "HasDownloaded"},
538 {1, nullptr, "RequestCheckLatestUpdate"},
539 {2, nullptr, "RequestDownloadLatestUpdate"},
540 {3, nullptr, "GetDownloadProgress"},
541 {4, nullptr, "ApplyDownloadedUpdate"},
542 {5, nullptr, "RequestPrepareCardUpdate"},
543 {6, nullptr, "GetPrepareCardUpdateProgress"},
544 {7, nullptr, "HasPreparedCardUpdate"},
545 {8, nullptr, "ApplyCardUpdate"},
546 {9, nullptr, "GetDownloadedEulaDataSize"},
547 {10, nullptr, "GetDownloadedEulaData"},
548 {11, nullptr, "SetupCardUpdate"},
549 {12, nullptr, "GetPreparedCardUpdateEulaDataSize"},
550 {13, nullptr, "GetPreparedCardUpdateEulaData"},
551 {14, nullptr, "SetupCardUpdateViaSystemUpdater"},
552 {15, nullptr, "HasReceived"},
553 {16, nullptr, "RequestReceiveSystemUpdate"},
554 {17, nullptr, "GetReceiveProgress"},
555 {18, nullptr, "ApplyReceivedUpdate"},
556 {19, nullptr, "GetReceivedEulaDataSize"},
557 {20, nullptr, "GetReceivedEulaData"},
558 {21, nullptr, "SetupToReceiveSystemUpdate"},
559 {22, nullptr, "RequestCheckLatestUpdateIncludesRebootlessUpdate"},
560 };
561 // clang-format on
562
563 RegisterHandlers(functions);
564 }
565};
566
567class NS_SU final : public ServiceFramework<NS_SU> { 532class NS_SU final : public ServiceFramework<NS_SU> {
568public: 533public:
569 explicit NS_SU(Core::System& system_) : ServiceFramework{system_, "ns:su"} { 534 explicit NS_SU(Core::System& system_) : ServiceFramework{system_, "ns:su"} {
diff --git a/src/core/hle/service/ns/system_update_control.cpp b/src/core/hle/service/ns/system_update_control.cpp
new file mode 100644
index 000000000..f5f5cfd90
--- /dev/null
+++ b/src/core/hle/service/ns/system_update_control.cpp
@@ -0,0 +1,44 @@
1// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#include "core/hle/service/cmif_serialization.h"
5#include "core/hle/service/ns/system_update_control.h"
6
7namespace Service::NS {
8
9ISystemUpdateControl::ISystemUpdateControl(Core::System& system_)
10 : ServiceFramework{system_, "ISystemUpdateControl"} {
11 // clang-format off
12 static const FunctionInfo functions[] = {
13 {0, nullptr, "HasDownloaded"},
14 {1, nullptr, "RequestCheckLatestUpdate"},
15 {2, nullptr, "RequestDownloadLatestUpdate"},
16 {3, nullptr, "GetDownloadProgress"},
17 {4, nullptr, "ApplyDownloadedUpdate"},
18 {5, nullptr, "RequestPrepareCardUpdate"},
19 {6, nullptr, "GetPrepareCardUpdateProgress"},
20 {7, nullptr, "HasPreparedCardUpdate"},
21 {8, nullptr, "ApplyCardUpdate"},
22 {9, nullptr, "GetDownloadedEulaDataSize"},
23 {10, nullptr, "GetDownloadedEulaData"},
24 {11, nullptr, "SetupCardUpdate"},
25 {12, nullptr, "GetPreparedCardUpdateEulaDataSize"},
26 {13, nullptr, "GetPreparedCardUpdateEulaData"},
27 {14, nullptr, "SetupCardUpdateViaSystemUpdater"},
28 {15, nullptr, "HasReceived"},
29 {16, nullptr, "RequestReceiveSystemUpdate"},
30 {17, nullptr, "GetReceiveProgress"},
31 {18, nullptr, "ApplyReceivedUpdate"},
32 {19, nullptr, "GetReceivedEulaDataSize"},
33 {20, nullptr, "GetReceivedEulaData"},
34 {21, nullptr, "SetupToReceiveSystemUpdate"},
35 {22, nullptr, "RequestCheckLatestUpdateIncludesRebootlessUpdate"},
36 };
37 // clang-format on
38
39 RegisterHandlers(functions);
40}
41
42ISystemUpdateControl::~ISystemUpdateControl() = default;
43
44} // namespace Service::NS
diff --git a/src/core/hle/service/ns/system_update_control.h b/src/core/hle/service/ns/system_update_control.h
new file mode 100644
index 000000000..a30a09000
--- /dev/null
+++ b/src/core/hle/service/ns/system_update_control.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 ISystemUpdateControl final : public ServiceFramework<ISystemUpdateControl> {
11public:
12 explicit ISystemUpdateControl(Core::System& system_);
13 ~ISystemUpdateControl() override;
14};
15
16} // namespace Service::NS