diff options
| -rw-r--r-- | src/common/logging/backend.cpp | 1 | ||||
| -rw-r--r-- | src/common/logging/log.h | 1 | ||||
| -rw-r--r-- | src/core/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/core/hle/service/arp/arp.cpp | 75 | ||||
| -rw-r--r-- | src/core/hle/service/arp/arp.h | 16 | ||||
| -rw-r--r-- | src/core/hle/service/service.cpp | 2 |
6 files changed, 97 insertions, 0 deletions
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp index 34dec06fe..816414e8d 100644 --- a/src/common/logging/backend.cpp +++ b/src/common/logging/backend.cpp | |||
| @@ -168,6 +168,7 @@ void FileBackend::Write(const Entry& entry) { | |||
| 168 | SUB(Service, AM) \ | 168 | SUB(Service, AM) \ |
| 169 | SUB(Service, AOC) \ | 169 | SUB(Service, AOC) \ |
| 170 | SUB(Service, APM) \ | 170 | SUB(Service, APM) \ |
| 171 | SUB(Service, ARP) \ | ||
| 171 | SUB(Service, BCAT) \ | 172 | SUB(Service, BCAT) \ |
| 172 | SUB(Service, BPC) \ | 173 | SUB(Service, BPC) \ |
| 173 | SUB(Service, BTM) \ | 174 | SUB(Service, BTM) \ |
diff --git a/src/common/logging/log.h b/src/common/logging/log.h index dd5c9e6be..7ab5277ea 100644 --- a/src/common/logging/log.h +++ b/src/common/logging/log.h | |||
| @@ -54,6 +54,7 @@ enum class Class : ClassType { | |||
| 54 | Service_AM, ///< The AM (Applet manager) service | 54 | Service_AM, ///< The AM (Applet manager) service |
| 55 | Service_AOC, ///< The AOC (AddOn Content) service | 55 | Service_AOC, ///< The AOC (AddOn Content) service |
| 56 | Service_APM, ///< The APM (Performance) service | 56 | Service_APM, ///< The APM (Performance) service |
| 57 | Service_ARP, ///< The ARP service | ||
| 57 | Service_Audio, ///< The Audio (Audio control) service | 58 | Service_Audio, ///< The Audio (Audio control) service |
| 58 | Service_BCAT, ///< The BCAT service | 59 | Service_BCAT, ///< The BCAT service |
| 59 | Service_BPC, ///< The BPC service | 60 | Service_BPC, ///< The BPC service |
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 28de22398..c11f017da 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt | |||
| @@ -134,6 +134,8 @@ add_library(core STATIC | |||
| 134 | hle/service/apm/apm.h | 134 | hle/service/apm/apm.h |
| 135 | hle/service/apm/interface.cpp | 135 | hle/service/apm/interface.cpp |
| 136 | hle/service/apm/interface.h | 136 | hle/service/apm/interface.h |
| 137 | hle/service/arp/arp.cpp | ||
| 138 | hle/service/arp/arp.h | ||
| 137 | hle/service/audio/audctl.cpp | 139 | hle/service/audio/audctl.cpp |
| 138 | hle/service/audio/audctl.h | 140 | hle/service/audio/audctl.h |
| 139 | hle/service/audio/auddbg.cpp | 141 | hle/service/audio/auddbg.cpp |
diff --git a/src/core/hle/service/arp/arp.cpp b/src/core/hle/service/arp/arp.cpp new file mode 100644 index 000000000..358ef2576 --- /dev/null +++ b/src/core/hle/service/arp/arp.cpp | |||
| @@ -0,0 +1,75 @@ | |||
| 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 "common/logging/log.h" | ||
| 8 | #include "core/hle/ipc_helpers.h" | ||
| 9 | #include "core/hle/kernel/hle_ipc.h" | ||
| 10 | #include "core/hle/service/arp/arp.h" | ||
| 11 | #include "core/hle/service/service.h" | ||
| 12 | #include "core/hle/service/sm/sm.h" | ||
| 13 | |||
| 14 | namespace Service::ARP { | ||
| 15 | |||
| 16 | class ARP_R final : public ServiceFramework<ARP_R> { | ||
| 17 | public: | ||
| 18 | explicit ARP_R() : ServiceFramework{"arp:r"} { | ||
| 19 | // clang-format off | ||
| 20 | static const FunctionInfo functions[] = { | ||
| 21 | {0, nullptr, "GetApplicationLaunchProperty"}, | ||
| 22 | {1, nullptr, "GetApplicationLaunchPropertyWithApplicationId"}, | ||
| 23 | {2, nullptr, "GetApplicationControlProperty"}, | ||
| 24 | {3, nullptr, "GetApplicationControlPropertyWithApplicationId"}, | ||
| 25 | }; | ||
| 26 | // clang-format on | ||
| 27 | |||
| 28 | RegisterHandlers(functions); | ||
| 29 | } | ||
| 30 | }; | ||
| 31 | |||
| 32 | class IRegistrar final : public ServiceFramework<IRegistrar> { | ||
| 33 | public: | ||
| 34 | explicit IRegistrar() : ServiceFramework{"IRegistrar"} { | ||
| 35 | // clang-format off | ||
| 36 | static const FunctionInfo functions[] = { | ||
| 37 | {0, nullptr, "Issue"}, | ||
| 38 | {1, nullptr, "SetApplicationLaunchProperty"}, | ||
| 39 | {2, nullptr, "SetApplicationControlProperty"}, | ||
| 40 | }; | ||
| 41 | // clang-format on | ||
| 42 | |||
| 43 | RegisterHandlers(functions); | ||
| 44 | } | ||
| 45 | }; | ||
| 46 | |||
| 47 | class ARP_W final : public ServiceFramework<ARP_W> { | ||
| 48 | public: | ||
| 49 | explicit ARP_W() : ServiceFramework{"arp:w"} { | ||
| 50 | // clang-format off | ||
| 51 | static const FunctionInfo functions[] = { | ||
| 52 | {0, &ARP_W::AcquireRegistrar, "AcquireRegistrar"}, | ||
| 53 | {1, nullptr, "DeleteProperties"}, | ||
| 54 | }; | ||
| 55 | // clang-format on | ||
| 56 | |||
| 57 | RegisterHandlers(functions); | ||
| 58 | } | ||
| 59 | |||
| 60 | private: | ||
| 61 | void AcquireRegistrar(Kernel::HLERequestContext& ctx) { | ||
| 62 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 63 | rb.Push(RESULT_SUCCESS); | ||
| 64 | rb.PushIpcInterface<IRegistrar>(); | ||
| 65 | |||
| 66 | LOG_DEBUG(Service_ARP, "called"); | ||
| 67 | } | ||
| 68 | }; | ||
| 69 | |||
| 70 | void InstallInterfaces(SM::ServiceManager& sm) { | ||
| 71 | std::make_shared<ARP_R>()->InstallAsService(sm); | ||
| 72 | std::make_shared<ARP_W>()->InstallAsService(sm); | ||
| 73 | } | ||
| 74 | |||
| 75 | } // namespace Service::ARP | ||
diff --git a/src/core/hle/service/arp/arp.h b/src/core/hle/service/arp/arp.h new file mode 100644 index 000000000..9d100187c --- /dev/null +++ b/src/core/hle/service/arp/arp.h | |||
| @@ -0,0 +1,16 @@ | |||
| 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::ARP { | ||
| 12 | |||
| 13 | /// Registers all ARP services with the specified service manager. | ||
| 14 | void InstallInterfaces(SM::ServiceManager& sm); | ||
| 15 | |||
| 16 | } // namespace Service::ARP | ||
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index 61e0c34a0..31ea79773 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #include "core/hle/service/am/am.h" | 19 | #include "core/hle/service/am/am.h" |
| 20 | #include "core/hle/service/aoc/aoc_u.h" | 20 | #include "core/hle/service/aoc/aoc_u.h" |
| 21 | #include "core/hle/service/apm/apm.h" | 21 | #include "core/hle/service/apm/apm.h" |
| 22 | #include "core/hle/service/arp/arp.h" | ||
| 22 | #include "core/hle/service/audio/audio.h" | 23 | #include "core/hle/service/audio/audio.h" |
| 23 | #include "core/hle/service/bcat/bcat.h" | 24 | #include "core/hle/service/bcat/bcat.h" |
| 24 | #include "core/hle/service/bpc/bpc.h" | 25 | #include "core/hle/service/bpc/bpc.h" |
| @@ -207,6 +208,7 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm) { | |||
| 207 | AM::InstallInterfaces(*sm, nv_flinger); | 208 | AM::InstallInterfaces(*sm, nv_flinger); |
| 208 | AOC::InstallInterfaces(*sm); | 209 | AOC::InstallInterfaces(*sm); |
| 209 | APM::InstallInterfaces(*sm); | 210 | APM::InstallInterfaces(*sm); |
| 211 | ARP::InstallInterfaces(*sm); | ||
| 210 | Audio::InstallInterfaces(*sm); | 212 | Audio::InstallInterfaces(*sm); |
| 211 | BCAT::InstallInterfaces(*sm); | 213 | BCAT::InstallInterfaces(*sm); |
| 212 | BPC::InstallInterfaces(*sm); | 214 | BPC::InstallInterfaces(*sm); |