summaryrefslogtreecommitdiff
path: root/src/core/hle/service/nim
diff options
context:
space:
mode:
authorGravatar David Marcec2020-04-30 23:10:20 +1000
committerGravatar David Marcec2020-04-30 23:10:20 +1000
commit55e423c8b6b8cd605d1af73e9348c8b54d1d2cde (patch)
tree69e6b3ffc11b123181842cef268d190da9dab3f8 /src/core/hle/service/nim
parentMerge pull request #3826 from MerryMage/update-dynarmic (diff)
downloadyuzu-55e423c8b6b8cd605d1af73e9348c8b54d1d2cde.tar.gz
yuzu-55e423c8b6b8cd605d1af73e9348c8b54d1d2cde.tar.xz
yuzu-55e423c8b6b8cd605d1af73e9348c8b54d1d2cde.zip
nim: CreateServerInterface, CreateAccessorInterface, CreateAsyncInterface
Closes #3026
Diffstat (limited to 'src/core/hle/service/nim')
-rw-r--r--src/core/hle/service/nim/nim.cpp70
1 files changed, 69 insertions, 1 deletions
diff --git a/src/core/hle/service/nim/nim.cpp b/src/core/hle/service/nim/nim.cpp
index e85f123e2..f19affce7 100644
--- a/src/core/hle/service/nim/nim.cpp
+++ b/src/core/hle/service/nim/nim.cpp
@@ -15,6 +15,66 @@
15 15
16namespace Service::NIM { 16namespace Service::NIM {
17 17
18class IShopServiceAsync final : public ServiceFramework<IShopServiceAsync> {
19public:
20 IShopServiceAsync() : ServiceFramework("IShopServiceAsync") {
21 // clang-format off
22 static const FunctionInfo functions[] = {
23 {0, nullptr, "Cancel"},
24 {1, nullptr, "GetSize"},
25 {2, nullptr, "Read"},
26 {3, nullptr, "GetErrorCode"},
27 {4, nullptr, "Request"},
28 {5, nullptr, "Prepare"},
29 };
30 // clang-format on
31
32 RegisterHandlers(functions);
33 }
34};
35
36class IShopServiceAccessor final : public ServiceFramework<IShopServiceAccessor> {
37public:
38 IShopServiceAccessor() : ServiceFramework("IShopServiceAccessor") {
39 // clang-format off
40 static const FunctionInfo functions[] = {
41 {0, &IShopServiceAccessor::CreateAsyncInterface, "CreateAsyncInterface"},
42 };
43 // clang-format on
44
45 RegisterHandlers(functions);
46 }
47
48private:
49 void CreateAsyncInterface(Kernel::HLERequestContext& ctx) {
50 LOG_WARNING(Service_NIM, "(STUBBED) called");
51 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
52 rb.Push(RESULT_SUCCESS);
53 rb.PushIpcInterface<IShopServiceAsync>();
54 }
55};
56
57class IShopServiceAccessServer final : public ServiceFramework<IShopServiceAccessServer> {
58public:
59 IShopServiceAccessServer() : ServiceFramework("IShopServiceAccessServer") {
60 // clang-format off
61 static const FunctionInfo functions[] = {
62 {0, &IShopServiceAccessServer::CreateAccessorInterface, "CreateAccessorInterface"},
63 };
64 // clang-format on
65
66 RegisterHandlers(functions);
67 }
68
69private:
70 void CreateAccessorInterface(Kernel::HLERequestContext& ctx) {
71 LOG_WARNING(Service_NIM, "(STUBBED) called");
72 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
73 rb.Push(RESULT_SUCCESS);
74 rb.PushIpcInterface<IShopServiceAccessor>();
75 }
76};
77
18class NIM final : public ServiceFramework<NIM> { 78class NIM final : public ServiceFramework<NIM> {
19public: 79public:
20 explicit NIM() : ServiceFramework{"nim"} { 80 explicit NIM() : ServiceFramework{"nim"} {
@@ -78,7 +138,7 @@ public:
78 explicit NIM_ECA() : ServiceFramework{"nim:eca"} { 138 explicit NIM_ECA() : ServiceFramework{"nim:eca"} {
79 // clang-format off 139 // clang-format off
80 static const FunctionInfo functions[] = { 140 static const FunctionInfo functions[] = {
81 {0, nullptr, "CreateServerInterface"}, 141 {0, &NIM_ECA::CreateServerInterface, "CreateServerInterface"},
82 {1, nullptr, "RefreshDebugAvailability"}, 142 {1, nullptr, "RefreshDebugAvailability"},
83 {2, nullptr, "ClearDebugResponse"}, 143 {2, nullptr, "ClearDebugResponse"},
84 {3, nullptr, "RegisterDebugResponse"}, 144 {3, nullptr, "RegisterDebugResponse"},
@@ -87,6 +147,14 @@ public:
87 147
88 RegisterHandlers(functions); 148 RegisterHandlers(functions);
89 } 149 }
150
151private:
152 void CreateServerInterface(Kernel::HLERequestContext& ctx) {
153 LOG_WARNING(Service_NIM, "(STUBBED) called");
154 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
155 rb.Push(RESULT_SUCCESS);
156 rb.PushIpcInterface<IShopServiceAccessServer>();
157 }
90}; 158};
91 159
92class NIM_SHP final : public ServiceFramework<NIM_SHP> { 160class NIM_SHP final : public ServiceFramework<NIM_SHP> {