diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/core/hle/service/npns/npns.cpp | 88 | ||||
| -rw-r--r-- | src/core/hle/service/npns/npns.h | 15 | ||||
| -rw-r--r-- | src/core/hle/service/service.cpp | 6 |
4 files changed, 109 insertions, 2 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 040b18088..9b1cfae42 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt | |||
| @@ -282,6 +282,8 @@ add_library(core STATIC | |||
| 282 | hle/service/nifm/nifm.h | 282 | hle/service/nifm/nifm.h |
| 283 | hle/service/nim/nim.cpp | 283 | hle/service/nim/nim.cpp |
| 284 | hle/service/nim/nim.h | 284 | hle/service/nim/nim.h |
| 285 | hle/service/npns/npns.cpp | ||
| 286 | hle/service/npns/npns.h | ||
| 285 | hle/service/ns/ns.cpp | 287 | hle/service/ns/ns.cpp |
| 286 | hle/service/ns/ns.h | 288 | hle/service/ns/ns.h |
| 287 | hle/service/ns/pl_u.cpp | 289 | hle/service/ns/pl_u.cpp |
diff --git a/src/core/hle/service/npns/npns.cpp b/src/core/hle/service/npns/npns.cpp new file mode 100644 index 000000000..ccb6f9da9 --- /dev/null +++ b/src/core/hle/service/npns/npns.cpp | |||
| @@ -0,0 +1,88 @@ | |||
| 1 | // Copyright 2018 yuzu emulator team | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include <memory> | ||
| 6 | |||
| 7 | #include "core/hle/service/npns/npns.h" | ||
| 8 | #include "core/hle/service/service.h" | ||
| 9 | #include "core/hle/service/sm/sm.h" | ||
| 10 | |||
| 11 | namespace Service::NPNS { | ||
| 12 | |||
| 13 | class NPNS_S final : public ServiceFramework<NPNS_S> { | ||
| 14 | public: | ||
| 15 | explicit NPNS_S() : ServiceFramework{"npns:s"} { | ||
| 16 | // clang-format off | ||
| 17 | static const FunctionInfo functions[] = { | ||
| 18 | {1, nullptr, "ListenAll"}, | ||
| 19 | {2, nullptr, "ListenTo"}, | ||
| 20 | {3, nullptr, "Receive"}, | ||
| 21 | {4, nullptr, "ReceiveRaw"}, | ||
| 22 | {5, nullptr, "GetReceiveEvent"}, | ||
| 23 | {6, nullptr, "ListenUndelivered"}, | ||
| 24 | {7, nullptr, "GetStateChangeEVent"}, | ||
| 25 | {11, nullptr, "SubscribeTopic"}, | ||
| 26 | {12, nullptr, "UnsubscribeTopic"}, | ||
| 27 | {13, nullptr, "QueryIsTopicExist"}, | ||
| 28 | {21, nullptr, "CreateToken"}, | ||
| 29 | {22, nullptr, "CreateTokenWithApplicationId"}, | ||
| 30 | {23, nullptr, "DestroyToken"}, | ||
| 31 | {24, nullptr, "DestroyTokenWithApplicationId"}, | ||
| 32 | {25, nullptr, "QueryIsTokenValid"}, | ||
| 33 | {31, nullptr, "UploadTokenToBaaS"}, | ||
| 34 | {32, nullptr, "DestroyTokenForBaaS"}, | ||
| 35 | {33, nullptr, "CreateTokenForBaaS"}, | ||
| 36 | {34, nullptr, "SetBaaSDeviceAccountIdList"}, | ||
| 37 | {101, nullptr, "Suspend"}, | ||
| 38 | {102, nullptr, "Resume"}, | ||
| 39 | {103, nullptr, "GetState"}, | ||
| 40 | {104, nullptr, "GetStatistics"}, | ||
| 41 | {105, nullptr, "GetPlayReportRequestEvent"}, | ||
| 42 | {111, nullptr, "GetJid"}, | ||
| 43 | {112, nullptr, "CreateJid"}, | ||
| 44 | {113, nullptr, "DestroyJid"}, | ||
| 45 | {114, nullptr, "AttachJid"}, | ||
| 46 | {115, nullptr, "DetachJid"}, | ||
| 47 | {201, nullptr, "RequestChangeStateForceTimed"}, | ||
| 48 | {102, nullptr, "RequestChangeStateForceAsync"}, | ||
| 49 | }; | ||
| 50 | // clang-format on | ||
| 51 | |||
| 52 | RegisterHandlers(functions); | ||
| 53 | } | ||
| 54 | }; | ||
| 55 | |||
| 56 | class NPNS_U final : public ServiceFramework<NPNS_U> { | ||
| 57 | public: | ||
| 58 | explicit NPNS_U() : ServiceFramework{"npns:u"} { | ||
| 59 | // clang-format off | ||
| 60 | static const FunctionInfo functions[] = { | ||
| 61 | {1, nullptr, "ListenAll"}, | ||
| 62 | {2, nullptr, "ListenTo"}, | ||
| 63 | {3, nullptr, "Receive"}, | ||
| 64 | {4, nullptr, "ReceiveRaw"}, | ||
| 65 | {5, nullptr, "GetReceiveEvent"}, | ||
| 66 | {7, nullptr, "GetStateChangeEVent"}, | ||
| 67 | {21, nullptr, "CreateToken"}, | ||
| 68 | {23, nullptr, "DestroyToken"}, | ||
| 69 | {25, nullptr, "QueryIsTokenValid"}, | ||
| 70 | {26, nullptr, "ListenToMyApplicationId"}, | ||
| 71 | {101, nullptr, "Suspend"}, | ||
| 72 | {102, nullptr, "Resume"}, | ||
| 73 | {103, nullptr, "GetState"}, | ||
| 74 | {104, nullptr, "GetStatistics"}, | ||
| 75 | {111, nullptr, "GetJid"}, | ||
| 76 | }; | ||
| 77 | // clang-format on | ||
| 78 | |||
| 79 | RegisterHandlers(functions); | ||
| 80 | } | ||
| 81 | }; | ||
| 82 | |||
| 83 | void InstallInterfaces(SM::ServiceManager& sm) { | ||
| 84 | std::make_shared<NPNS_S>()->InstallAsService(sm); | ||
| 85 | std::make_shared<NPNS_U>()->InstallAsService(sm); | ||
| 86 | } | ||
| 87 | |||
| 88 | } // namespace Service::NPNS | ||
diff --git a/src/core/hle/service/npns/npns.h b/src/core/hle/service/npns/npns.h new file mode 100644 index 000000000..861cd3e48 --- /dev/null +++ b/src/core/hle/service/npns/npns.h | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | // Copyright 2018 yuzu emulator team | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | namespace Service::SM { | ||
| 8 | class ServiceManager; | ||
| 9 | } | ||
| 10 | |||
| 11 | namespace Service::NPNS { | ||
| 12 | |||
| 13 | void InstallInterfaces(SM::ServiceManager& sm); | ||
| 14 | |||
| 15 | } // namespace Service::NPNS | ||
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index a225cb4cb..dd6c6d3b3 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | #include "core/hle/service/apm/apm.h" | 22 | #include "core/hle/service/apm/apm.h" |
| 23 | #include "core/hle/service/arp/arp.h" | 23 | #include "core/hle/service/arp/arp.h" |
| 24 | #include "core/hle/service/audio/audio.h" | 24 | #include "core/hle/service/audio/audio.h" |
| 25 | #include "core/hle/service/bcat/bcat.h" | 25 | #include "core/hle/service/bcat/module.h" |
| 26 | #include "core/hle/service/bpc/bpc.h" | 26 | #include "core/hle/service/bpc/bpc.h" |
| 27 | #include "core/hle/service/btdrv/btdrv.h" | 27 | #include "core/hle/service/btdrv/btdrv.h" |
| 28 | #include "core/hle/service/btm/btm.h" | 28 | #include "core/hle/service/btm/btm.h" |
| @@ -48,11 +48,12 @@ | |||
| 48 | #include "core/hle/service/nfp/nfp.h" | 48 | #include "core/hle/service/nfp/nfp.h" |
| 49 | #include "core/hle/service/nifm/nifm.h" | 49 | #include "core/hle/service/nifm/nifm.h" |
| 50 | #include "core/hle/service/nim/nim.h" | 50 | #include "core/hle/service/nim/nim.h" |
| 51 | #include "core/hle/service/npns/npns.h" | ||
| 51 | #include "core/hle/service/ns/ns.h" | 52 | #include "core/hle/service/ns/ns.h" |
| 52 | #include "core/hle/service/nvdrv/nvdrv.h" | 53 | #include "core/hle/service/nvdrv/nvdrv.h" |
| 53 | #include "core/hle/service/nvflinger/nvflinger.h" | 54 | #include "core/hle/service/nvflinger/nvflinger.h" |
| 54 | #include "core/hle/service/pcie/pcie.h" | 55 | #include "core/hle/service/pcie/pcie.h" |
| 55 | #include "core/hle/service/pctl/pctl.h" | 56 | #include "core/hle/service/pctl/module.h" |
| 56 | #include "core/hle/service/pcv/pcv.h" | 57 | #include "core/hle/service/pcv/pcv.h" |
| 57 | #include "core/hle/service/pm/pm.h" | 58 | #include "core/hle/service/pm/pm.h" |
| 58 | #include "core/hle/service/prepo/prepo.h" | 59 | #include "core/hle/service/prepo/prepo.h" |
| @@ -236,6 +237,7 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm, FileSys::VfsFilesystem& vfs) | |||
| 236 | NFP::InstallInterfaces(*sm); | 237 | NFP::InstallInterfaces(*sm); |
| 237 | NIFM::InstallInterfaces(*sm); | 238 | NIFM::InstallInterfaces(*sm); |
| 238 | NIM::InstallInterfaces(*sm); | 239 | NIM::InstallInterfaces(*sm); |
| 240 | NPNS::InstallInterfaces(*sm); | ||
| 239 | NS::InstallInterfaces(*sm); | 241 | NS::InstallInterfaces(*sm); |
| 240 | Nvidia::InstallInterfaces(*sm, *nv_flinger); | 242 | Nvidia::InstallInterfaces(*sm, *nv_flinger); |
| 241 | PCIe::InstallInterfaces(*sm); | 243 | PCIe::InstallInterfaces(*sm); |