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) {      SUB(Service, AM)                                                                               \      SUB(Service, AOC)                                                                              \      SUB(Service, APM)                                                                              \ +    SUB(Service, ARP)                                                                              \      SUB(Service, BCAT)                                                                             \      SUB(Service, BPC)                                                                              \      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 {      Service_AM,        ///< The AM (Applet manager) service      Service_AOC,       ///< The AOC (AddOn Content) service      Service_APM,       ///< The APM (Performance) service +    Service_ARP,       ///< The ARP service      Service_Audio,     ///< The Audio (Audio control) service      Service_BCAT,      ///< The BCAT service      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      hle/service/apm/apm.h      hle/service/apm/interface.cpp      hle/service/apm/interface.h +    hle/service/arp/arp.cpp +    hle/service/arp/arp.h      hle/service/audio/audctl.cpp      hle/service/audio/audctl.h      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 @@ +// Copyright 2018 yuzu emulator team +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#include <memory> + +#include "common/logging/log.h" +#include "core/hle/ipc_helpers.h" +#include "core/hle/kernel/hle_ipc.h" +#include "core/hle/service/arp/arp.h" +#include "core/hle/service/service.h" +#include "core/hle/service/sm/sm.h" + +namespace Service::ARP { + +class ARP_R final : public ServiceFramework<ARP_R> { +public: +    explicit ARP_R() : ServiceFramework{"arp:r"} { +        // clang-format off +        static const FunctionInfo functions[] = { +            {0, nullptr, "GetApplicationLaunchProperty"}, +            {1, nullptr, "GetApplicationLaunchPropertyWithApplicationId"}, +            {2, nullptr, "GetApplicationControlProperty"}, +            {3, nullptr, "GetApplicationControlPropertyWithApplicationId"}, +        }; +        // clang-format on + +        RegisterHandlers(functions); +    } +}; + +class IRegistrar final : public ServiceFramework<IRegistrar> { +public: +    explicit IRegistrar() : ServiceFramework{"IRegistrar"} { +        // clang-format off +        static const FunctionInfo functions[] = { +            {0, nullptr, "Issue"}, +            {1, nullptr, "SetApplicationLaunchProperty"}, +            {2, nullptr, "SetApplicationControlProperty"}, +        }; +        // clang-format on + +        RegisterHandlers(functions); +    } +}; + +class ARP_W final : public ServiceFramework<ARP_W> { +public: +    explicit ARP_W() : ServiceFramework{"arp:w"} { +        // clang-format off +        static const FunctionInfo functions[] = { +            {0, &ARP_W::AcquireRegistrar, "AcquireRegistrar"}, +            {1, nullptr, "DeleteProperties"}, +        }; +        // clang-format on + +        RegisterHandlers(functions); +    } + +private: +    void AcquireRegistrar(Kernel::HLERequestContext& ctx) { +        IPC::ResponseBuilder rb{ctx, 2, 0, 1}; +        rb.Push(RESULT_SUCCESS); +        rb.PushIpcInterface<IRegistrar>(); + +        LOG_DEBUG(Service_ARP, "called"); +    } +}; + +void InstallInterfaces(SM::ServiceManager& sm) { +    std::make_shared<ARP_R>()->InstallAsService(sm); +    std::make_shared<ARP_W>()->InstallAsService(sm); +} + +} // 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 @@ +// Copyright 2018 yuzu emulator team +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +namespace Service::SM { +class ServiceManager; +} + +namespace Service::ARP { + +/// Registers all ARP services with the specified service manager. +void InstallInterfaces(SM::ServiceManager& sm); + +} // 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 @@  #include "core/hle/service/am/am.h"  #include "core/hle/service/aoc/aoc_u.h"  #include "core/hle/service/apm/apm.h" +#include "core/hle/service/arp/arp.h"  #include "core/hle/service/audio/audio.h"  #include "core/hle/service/bcat/bcat.h"  #include "core/hle/service/bpc/bpc.h" @@ -207,6 +208,7 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm) {      AM::InstallInterfaces(*sm, nv_flinger);      AOC::InstallInterfaces(*sm);      APM::InstallInterfaces(*sm); +    ARP::InstallInterfaces(*sm);      Audio::InstallInterfaces(*sm);      BCAT::InstallInterfaces(*sm);      BPC::InstallInterfaces(*sm);  | 
