diff options
author | bunnei <bunneidev@gmail.com> | 2022-02-17 02:42:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-17 02:42:49 +0100 |
commit | 027ff7847ca47669561f990cbb2f3c27b1e65be9 (patch) | |
tree | a5c8f68b6c6db306324906f6b8794f01f0eb75b3 /src | |
parent | Merge pull request #7899 from Kelebek1/test (diff) | |
parent | service/mnpp: Stub mnpp_app (diff) | |
download | yuzu-027ff7847ca47669561f990cbb2f3c27b1e65be9.tar yuzu-027ff7847ca47669561f990cbb2f3c27b1e65be9.tar.gz yuzu-027ff7847ca47669561f990cbb2f3c27b1e65be9.tar.bz2 yuzu-027ff7847ca47669561f990cbb2f3c27b1e65be9.tar.lz yuzu-027ff7847ca47669561f990cbb2f3c27b1e65be9.tar.xz yuzu-027ff7847ca47669561f990cbb2f3c27b1e65be9.tar.zst yuzu-027ff7847ca47669561f990cbb2f3c27b1e65be9.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/common/logging/filter.cpp | 1 | ||||
-rw-r--r-- | src/common/logging/types.h | 1 | ||||
-rw-r--r-- | src/core/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/core/hle/service/mnpp/mnpp_app.cpp | 45 | ||||
-rw-r--r-- | src/core/hle/service/mnpp/mnpp_app.h | 20 | ||||
-rw-r--r-- | src/core/hle/service/service.cpp | 2 |
6 files changed, 71 insertions, 0 deletions
diff --git a/src/common/logging/filter.cpp b/src/common/logging/filter.cpp index b898a652c..4afc1369a 100644 --- a/src/common/logging/filter.cpp +++ b/src/common/logging/filter.cpp @@ -108,6 +108,7 @@ bool ParseFilterRule(Filter& instance, Iterator begin, Iterator end) { SUB(Service, Migration) \ SUB(Service, Mii) \ SUB(Service, MM) \ + SUB(Service, MNPP) \ SUB(Service, NCM) \ SUB(Service, NFC) \ SUB(Service, NFP) \ diff --git a/src/common/logging/types.h b/src/common/logging/types.h index 9ed0c7ad6..2b6e4daa7 100644 --- a/src/common/logging/types.h +++ b/src/common/logging/types.h @@ -76,6 +76,7 @@ enum class Class : u8 { Service_Migration, ///< The migration service Service_Mii, ///< The Mii service Service_MM, ///< The MM (Multimedia) service + Service_MNPP, ///< The MNPP service Service_NCM, ///< The NCM service Service_NFC, ///< The NFC (Near-field communication) service Service_NFP, ///< The NFP service diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 6e8d11919..0c10cd019 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -467,6 +467,8 @@ add_library(core STATIC hle/service/mii/types.h hle/service/mm/mm_u.cpp hle/service/mm/mm_u.h + hle/service/mnpp/mnpp_app.cpp + hle/service/mnpp/mnpp_app.h hle/service/ncm/ncm.cpp hle/service/ncm/ncm.h hle/service/nfc/nfc.cpp diff --git a/src/core/hle/service/mnpp/mnpp_app.cpp b/src/core/hle/service/mnpp/mnpp_app.cpp new file mode 100644 index 000000000..53497612f --- /dev/null +++ b/src/core/hle/service/mnpp/mnpp_app.cpp @@ -0,0 +1,45 @@ +// Copyright 2022 yuzu emulator team +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#include "common/logging/log.h" +#include "core/hle/ipc_helpers.h" +#include "core/hle/service/mnpp/mnpp_app.h" +#include "core/hle/service/sm/sm.h" + +namespace Service::MNPP { + +class MNPP_APP final : public ServiceFramework<MNPP_APP> { +public: + explicit MNPP_APP(Core::System& system_) : ServiceFramework{system_, "mnpp:app"} { + // clang-format off + static const FunctionInfo functions[] = { + {0, &MNPP_APP::Unknown0, "unknown0"}, + {1, &MNPP_APP::Unknown1, "unknown1"}, + }; + // clang-format on + + RegisterHandlers(functions); + } + +private: + void Unknown0(Kernel::HLERequestContext& ctx) { + LOG_WARNING(Service_MNPP, "(STUBBED) called"); + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); + } + + void Unknown1(Kernel::HLERequestContext& ctx) { + LOG_WARNING(Service_MNPP, "(STUBBED) called"); + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); + } +}; + +void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system) { + std::make_shared<MNPP_APP>(system)->InstallAsService(service_manager); +} + +} // namespace Service::MNPP diff --git a/src/core/hle/service/mnpp/mnpp_app.h b/src/core/hle/service/mnpp/mnpp_app.h new file mode 100644 index 000000000..6bf20b494 --- /dev/null +++ b/src/core/hle/service/mnpp/mnpp_app.h @@ -0,0 +1,20 @@ +// Copyright 2022 yuzu emulator team +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +namespace Core { +class System; +} + +namespace Service::SM { +class ServiceManager; +} + +namespace Service::MNPP { + +/// Registers all MNPP services with the specified service manager. +void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system); + +} // namespace Service::MNPP diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index f54e6fe56..eb1138313 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp @@ -39,6 +39,7 @@ #include "core/hle/service/mig/mig.h" #include "core/hle/service/mii/mii.h" #include "core/hle/service/mm/mm_u.h" +#include "core/hle/service/mnpp/mnpp_app.h" #include "core/hle/service/ncm/ncm.h" #include "core/hle/service/nfc/nfc.h" #include "core/hle/service/nfp/nfp.h" @@ -265,6 +266,7 @@ Services::Services(std::shared_ptr<SM::ServiceManager>& sm, Core::System& system Migration::InstallInterfaces(*sm, system); Mii::InstallInterfaces(*sm, system); MM::InstallInterfaces(*sm, system); + MNPP::InstallInterfaces(*sm, system); NCM::InstallInterfaces(*sm, system); NFC::InstallInterfaces(*sm, system); NFP::InstallInterfaces(*sm, system); |