summaryrefslogtreecommitdiff
path: root/src/core/hle/service/ncm
diff options
context:
space:
mode:
authorGravatar Zach Hilman2019-04-10 14:40:18 -0400
committerGravatar Zach Hilman2019-05-26 18:24:48 -0400
commite0920ef4ba5dc9ece5a5a56b735a8573a9d8a390 (patch)
treef48a2eaf7f213e089c49ce80a24b6994fc4ee7c8 /src/core/hle/service/ncm
parentncm: Implement LR OpenLocationResolver (0) (diff)
downloadyuzu-e0920ef4ba5dc9ece5a5a56b735a8573a9d8a390.tar.gz
yuzu-e0920ef4ba5dc9ece5a5a56b735a8573a9d8a390.tar.xz
yuzu-e0920ef4ba5dc9ece5a5a56b735a8573a9d8a390.zip
ncm: Implement LR OpenRegisteredLocationResolver (1)
Returns an object of type IRegisteredLocationResolver for the StorageId.
Diffstat (limited to 'src/core/hle/service/ncm')
-rw-r--r--src/core/hle/service/ncm/ncm.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/core/hle/service/ncm/ncm.cpp b/src/core/hle/service/ncm/ncm.cpp
index 7f775900a..c59bcc2a7 100644
--- a/src/core/hle/service/ncm/ncm.cpp
+++ b/src/core/hle/service/ncm/ncm.cpp
@@ -45,6 +45,25 @@ private:
45 FileSys::StorageId storage; 45 FileSys::StorageId storage;
46}; 46};
47 47
48class IRegisteredLocationResolver final : public ServiceFramework<IRegisteredLocationResolver> {
49public:
50 explicit IRegisteredLocationResolver() : ServiceFramework{"IRegisteredLocationResolver"} {
51 static const FunctionInfo functions[] = {
52 {0, nullptr, "ResolveProgramPath"},
53 {1, nullptr, "RegisterProgramPath"},
54 {2, nullptr, "UnregisterProgramPath"},
55 {3, nullptr, "RedirectProgramPath"},
56 {4, nullptr, "ResolveHtmlDocumentPath"},
57 {5, nullptr, "RegisterHtmlDocumentPath"},
58 {6, nullptr, "UnregisterHtmlDocumentPath"},
59 {7, nullptr, "RedirectHtmlDocumentPath"},
60 {8, nullptr, ""},
61 };
62
63 RegisterHandlers(functions);
64 }
65};
66
48public: 67public:
49 explicit LocationResolver() : ServiceFramework{"lr"} { 68 explicit LocationResolver() : ServiceFramework{"lr"} {
50class LR final : public ServiceFramework<LR> { 69class LR final : public ServiceFramework<LR> {
@@ -74,6 +93,14 @@ private:
74 rb.PushIpcInterface(std::make_shared<ILocationResolver>(id)); 93 rb.PushIpcInterface(std::make_shared<ILocationResolver>(id));
75 } 94 }
76 95
96 void OpenRegisteredLocationResolver(Kernel::HLERequestContext& ctx) {
97 LOG_DEBUG(Service_NCM, "called");
98
99 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
100 rb.Push(RESULT_SUCCESS);
101 rb.PushIpcInterface(std::make_shared<IRegisteredLocationResolver>());
102 }
103
77}; 104};
78 105
79class NCM final : public ServiceFramework<NCM> { 106class NCM final : public ServiceFramework<NCM> {