diff options
author | Zach Hilman <zachhilman@gmail.com> | 2019-04-10 20:38:27 +0200 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2019-05-27 00:24:48 +0200 |
commit | 33ac193bf6465e782c030d2bcd22ac3fd3f0b02d (patch) | |
tree | ef5c85d4d4ca45b61f6257fe29033d9fb9d6a9f3 /src/core/hle/service/ncm/ncm.cpp | |
parent | Merge pull request #2516 from lioncash/label (diff) | |
download | yuzu-33ac193bf6465e782c030d2bcd22ac3fd3f0b02d.tar yuzu-33ac193bf6465e782c030d2bcd22ac3fd3f0b02d.tar.gz yuzu-33ac193bf6465e782c030d2bcd22ac3fd3f0b02d.tar.bz2 yuzu-33ac193bf6465e782c030d2bcd22ac3fd3f0b02d.tar.lz yuzu-33ac193bf6465e782c030d2bcd22ac3fd3f0b02d.tar.xz yuzu-33ac193bf6465e782c030d2bcd22ac3fd3f0b02d.tar.zst yuzu-33ac193bf6465e782c030d2bcd22ac3fd3f0b02d.zip |
Diffstat (limited to 'src/core/hle/service/ncm/ncm.cpp')
-rw-r--r-- | src/core/hle/service/ncm/ncm.cpp | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/core/hle/service/ncm/ncm.cpp b/src/core/hle/service/ncm/ncm.cpp index 5d31f638f..7f775900a 100644 --- a/src/core/hle/service/ncm/ncm.cpp +++ b/src/core/hle/service/ncm/ncm.cpp @@ -11,8 +11,45 @@ namespace Service::NCM { class LocationResolver final : public ServiceFramework<LocationResolver> { +class ILocationResolver final : public ServiceFramework<ILocationResolver> { +public: + explicit ILocationResolver(FileSys::StorageId id) + : ServiceFramework{"ILocationResolver"}, storage(id) { + static const FunctionInfo functions[] = { + {0, nullptr, "ResolveProgramPath"}, + {1, nullptr, "RedirectProgramPath"}, + {2, nullptr, "ResolveApplicationControlPath"}, + {3, nullptr, "ResolveApplicationHtmlDocumentPath"}, + {4, nullptr, "ResolveDataPath"}, + {5, nullptr, "RedirectApplicationControlPath"}, + {6, nullptr, "RedirectApplicationHtmlDocumentPath"}, + {7, nullptr, "ResolveApplicationLegalInformationPath"}, + {8, nullptr, "RedirectApplicationLegalInformationPath"}, + {9, nullptr, "Refresh"}, + {10, nullptr, "RedirectProgramPath2"}, + {11, nullptr, "Refresh2"}, + {12, nullptr, "DeleteProgramPath"}, + {13, nullptr, "DeleteApplicationControlPath"}, + {14, nullptr, "DeleteApplicationHtmlDocumentPath"}, + {15, nullptr, "DeleteApplicationLegalInformationPath"}, + {16, nullptr, ""}, + {17, nullptr, ""}, + {18, nullptr, ""}, + {19, nullptr, ""}, + }; + + RegisterHandlers(functions); + } + +private: + FileSys::StorageId storage; +}; + public: explicit LocationResolver() : ServiceFramework{"lr"} { +class LR final : public ServiceFramework<LR> { +public: + explicit LR() : ServiceFramework{"lr"} { // clang-format off static const FunctionInfo functions[] = { {0, nullptr, "OpenLocationResolver"}, @@ -24,6 +61,19 @@ public: RegisterHandlers(functions); } + +private: + void OpenLocationResolver(Kernel::HLERequestContext& ctx) { + IPC::RequestParser rp{ctx}; + const auto id = rp.PopRaw<FileSys::StorageId>(); + + LOG_DEBUG(Service_NCM, "called, id={:02X}", static_cast<u8>(id)); + + IPC::ResponseBuilder rb{ctx, 2, 0, 1}; + rb.Push(RESULT_SUCCESS); + rb.PushIpcInterface(std::make_shared<ILocationResolver>(id)); + } + }; class NCM final : public ServiceFramework<NCM> { |