summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Liam2024-02-17 11:38:07 -0500
committerGravatar Liam2024-02-18 10:32:21 -0500
commitae114d2fa1d381603b6908b8dfb7e4878ad44ea4 (patch)
treea8194d05d1cc17bf41eabaf66ec0bb41ca4f5de4 /src
parentns: rewrite IPlatformServiceManager (diff)
downloadyuzu-ae114d2fa1d381603b6908b8dfb7e4878ad44ea4.tar.gz
yuzu-ae114d2fa1d381603b6908b8dfb7e4878ad44ea4.tar.xz
yuzu-ae114d2fa1d381603b6908b8dfb7e4878ad44ea4.zip
ns: move IAccountProxyInterface
Diffstat (limited to 'src')
-rw-r--r--src/core/CMakeLists.txt3
-rw-r--r--src/core/hle/service/ns/account_proxy_interface.cpp21
-rw-r--r--src/core/hle/service/ns/account_proxy_interface.h16
-rw-r--r--src/core/hle/service/ns/ns.cpp14
-rw-r--r--src/core/hle/service/ns/ns.h6
-rw-r--r--src/core/hle/service/ns/ns_types.h62
6 files changed, 103 insertions, 19 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 5eedaaf35..351446eb0 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -739,9 +739,12 @@ add_library(core STATIC
739 hle/service/nim/nim.h 739 hle/service/nim/nim.h
740 hle/service/npns/npns.cpp 740 hle/service/npns/npns.cpp
741 hle/service/npns/npns.h 741 hle/service/npns/npns.h
742 hle/service/ns/account_proxy_interface.cpp
743 hle/service/ns/account_proxy_interface.h
742 hle/service/ns/language.cpp 744 hle/service/ns/language.cpp
743 hle/service/ns/language.h 745 hle/service/ns/language.h
744 hle/service/ns/ns_results.h 746 hle/service/ns/ns_results.h
747 hle/service/ns/ns_types.h
745 hle/service/ns/ns.cpp 748 hle/service/ns/ns.cpp
746 hle/service/ns/ns.h 749 hle/service/ns/ns.h
747 hle/service/ns/pdm_qry.cpp 750 hle/service/ns/pdm_qry.cpp
diff --git a/src/core/hle/service/ns/account_proxy_interface.cpp b/src/core/hle/service/ns/account_proxy_interface.cpp
new file mode 100644
index 000000000..e5041af66
--- /dev/null
+++ b/src/core/hle/service/ns/account_proxy_interface.cpp
@@ -0,0 +1,21 @@
1// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#include "core/hle/service/ns/account_proxy_interface.h"
5
6namespace Service::NS {
7
8IAccountProxyInterface::IAccountProxyInterface(Core::System& system_)
9 : ServiceFramework{system_, "IAccountProxyInterface"} {
10 // clang-format off
11 static const FunctionInfo functions[] = {
12 {0, nullptr, "CreateUserAccount"},
13 };
14 // clang-format on
15
16 RegisterHandlers(functions);
17}
18
19IAccountProxyInterface::~IAccountProxyInterface() = default;
20
21} // namespace Service::NS
diff --git a/src/core/hle/service/ns/account_proxy_interface.h b/src/core/hle/service/ns/account_proxy_interface.h
new file mode 100644
index 000000000..e944d2a75
--- /dev/null
+++ b/src/core/hle/service/ns/account_proxy_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 IAccountProxyInterface final : public ServiceFramework<IAccountProxyInterface> {
11public:
12 explicit IAccountProxyInterface(Core::System& system_);
13 ~IAccountProxyInterface() 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 84961fc0c..b586fbcf0 100644
--- a/src/core/hle/service/ns/ns.cpp
+++ b/src/core/hle/service/ns/ns.cpp
@@ -11,6 +11,7 @@
11#include "core/hle/service/filesystem/filesystem.h" 11#include "core/hle/service/filesystem/filesystem.h"
12#include "core/hle/service/glue/glue_manager.h" 12#include "core/hle/service/glue/glue_manager.h"
13#include "core/hle/service/ipc_helpers.h" 13#include "core/hle/service/ipc_helpers.h"
14#include "core/hle/service/ns/account_proxy_interface.h"
14#include "core/hle/service/ns/language.h" 15#include "core/hle/service/ns/language.h"
15#include "core/hle/service/ns/ns.h" 16#include "core/hle/service/ns/ns.h"
16#include "core/hle/service/ns/ns_results.h" 17#include "core/hle/service/ns/ns_results.h"
@@ -21,19 +22,6 @@
21 22
22namespace Service::NS { 23namespace Service::NS {
23 24
24IAccountProxyInterface::IAccountProxyInterface(Core::System& system_)
25 : ServiceFramework{system_, "IAccountProxyInterface"} {
26 // clang-format off
27 static const FunctionInfo functions[] = {
28 {0, nullptr, "CreateUserAccount"},
29 };
30 // clang-format on
31
32 RegisterHandlers(functions);
33}
34
35IAccountProxyInterface::~IAccountProxyInterface() = default;
36
37IApplicationManagerInterface::IApplicationManagerInterface(Core::System& system_) 25IApplicationManagerInterface::IApplicationManagerInterface(Core::System& system_)
38 : ServiceFramework{system_, "IApplicationManagerInterface"} { 26 : ServiceFramework{system_, "IApplicationManagerInterface"} {
39 // clang-format off 27 // clang-format off
diff --git a/src/core/hle/service/ns/ns.h b/src/core/hle/service/ns/ns.h
index 9ee306ef9..cd2fbc8f4 100644
--- a/src/core/hle/service/ns/ns.h
+++ b/src/core/hle/service/ns/ns.h
@@ -17,12 +17,6 @@ class FileSystemController;
17 17
18namespace NS { 18namespace NS {
19 19
20class IAccountProxyInterface final : public ServiceFramework<IAccountProxyInterface> {
21public:
22 explicit IAccountProxyInterface(Core::System& system_);
23 ~IAccountProxyInterface() override;
24};
25
26class IApplicationManagerInterface final : public ServiceFramework<IApplicationManagerInterface> { 20class IApplicationManagerInterface final : public ServiceFramework<IApplicationManagerInterface> {
27public: 21public:
28 explicit IApplicationManagerInterface(Core::System& system_); 22 explicit IApplicationManagerInterface(Core::System& system_);
diff --git a/src/core/hle/service/ns/ns_types.h b/src/core/hle/service/ns/ns_types.h
new file mode 100644
index 000000000..1b97ac816
--- /dev/null
+++ b/src/core/hle/service/ns/ns_types.h
@@ -0,0 +1,62 @@
1// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#pragma once
5
6#include "common/common_funcs.h"
7
8namespace Service::NS {
9
10enum class ApplicationRecordType : u8 {
11 Installing = 2,
12 Installed = 3,
13 GameCardNotInserted = 5,
14 Archived = 0xB,
15 GameCard = 0x10,
16};
17
18struct ApplicationRecord {
19 u64 application_id;
20 ApplicationRecordType type;
21 u8 unknown;
22 INSERT_PADDING_BYTES_NOINIT(0x6);
23 u8 unknown2;
24 INSERT_PADDING_BYTES_NOINIT(0x7);
25};
26static_assert(sizeof(ApplicationRecord) == 0x18, "ApplicationRecord is an invalid size");
27
28/// ApplicationView
29struct ApplicationView {
30 u64 application_id; ///< ApplicationId.
31 u32 unk; ///< Unknown.
32 u32 flags; ///< Flags.
33 u8 unk_x10[0x10]; ///< Unknown.
34 u32 unk_x20; ///< Unknown.
35 u16 unk_x24; ///< Unknown.
36 u8 unk_x26[0x2]; ///< Unknown.
37 u8 unk_x28[0x8]; ///< Unknown.
38 u8 unk_x30[0x10]; ///< Unknown.
39 u32 unk_x40; ///< Unknown.
40 u8 unk_x44; ///< Unknown.
41 u8 unk_x45[0xb]; ///< Unknown.
42};
43
44/// NsPromotionInfo
45struct PromotionInfo {
46 u64 start_timestamp; ///< POSIX timestamp for the promotion start.
47 u64 end_timestamp; ///< POSIX timestamp for the promotion end.
48 s64 remaining_time; ///< Remaining time until the promotion ends, in nanoseconds
49 ///< ({end_timestamp - current_time} converted to nanoseconds).
50 INSERT_PADDING_BYTES_NOINIT(0x4);
51 u8 flags; ///< Flags. Bit0: whether the PromotionInfo is valid (including bit1). Bit1 clear:
52 ///< remaining_time is set.
53 INSERT_PADDING_BYTES_NOINIT(0x3);
54};
55
56/// NsApplicationViewWithPromotionInfo
57struct ApplicationViewWithPromotionInfo {
58 ApplicationView view; ///< \ref NsApplicationView
59 PromotionInfo promotion; ///< \ref NsPromotionInfo
60};
61
62} // namespace Service::NS