mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-22 23:02:47 +01:00
service: Add NFP module interface.
service: Initialize NFP service. Log: Add NFP service as a log subtype.
This commit is contained in:
parent
cf643df792
commit
deaf6f9e35
8 changed files with 101 additions and 0 deletions
|
@ -42,6 +42,7 @@ namespace Log {
|
||||||
SUB(Service, FS) \
|
SUB(Service, FS) \
|
||||||
SUB(Service, HID) \
|
SUB(Service, HID) \
|
||||||
SUB(Service, LM) \
|
SUB(Service, LM) \
|
||||||
|
SUB(Service, NFP) \
|
||||||
SUB(Service, NIFM) \
|
SUB(Service, NIFM) \
|
||||||
SUB(Service, NS) \
|
SUB(Service, NS) \
|
||||||
SUB(Service, NVDRV) \
|
SUB(Service, NVDRV) \
|
||||||
|
|
|
@ -59,6 +59,7 @@ enum class Class : ClassType {
|
||||||
Service_FS, ///< The FS (Filesystem) service
|
Service_FS, ///< The FS (Filesystem) service
|
||||||
Service_HID, ///< The HID (Human interface device) service
|
Service_HID, ///< The HID (Human interface device) service
|
||||||
Service_LM, ///< The LM (Logger) service
|
Service_LM, ///< The LM (Logger) service
|
||||||
|
Service_NFP, ///< The NFP service
|
||||||
Service_NIFM, ///< The NIFM (Network interface) service
|
Service_NIFM, ///< The NIFM (Network interface) service
|
||||||
Service_NS, ///< The NS services
|
Service_NS, ///< The NS services
|
||||||
Service_NVDRV, ///< The NVDRV (Nvidia driver) service
|
Service_NVDRV, ///< The NVDRV (Nvidia driver) service
|
||||||
|
|
|
@ -142,6 +142,10 @@ add_library(core STATIC
|
||||||
hle/service/nifm/nifm_s.h
|
hle/service/nifm/nifm_s.h
|
||||||
hle/service/nifm/nifm_u.cpp
|
hle/service/nifm/nifm_u.cpp
|
||||||
hle/service/nifm/nifm_u.h
|
hle/service/nifm/nifm_u.h
|
||||||
|
hle/service/nfp/nfp.cpp
|
||||||
|
hle/service/nfp/nfp.h
|
||||||
|
hle/service/nfp/nfp_user.cpp
|
||||||
|
hle/service/nfp/nfp_user.h
|
||||||
hle/service/ns/ns.cpp
|
hle/service/ns/ns.cpp
|
||||||
hle/service/ns/ns.h
|
hle/service/ns/ns.h
|
||||||
hle/service/ns/pl_u.cpp
|
hle/service/ns/pl_u.cpp
|
||||||
|
|
28
src/core/hle/service/nfp/nfp.cpp
Normal file
28
src/core/hle/service/nfp/nfp.cpp
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
// Copyright 2018 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/nfp/nfp.h"
|
||||||
|
#include "core/hle/service/nfp/nfp_user.h"
|
||||||
|
|
||||||
|
namespace Service {
|
||||||
|
namespace NFP {
|
||||||
|
|
||||||
|
Module::Interface::Interface(std::shared_ptr<Module> module, const char* name)
|
||||||
|
: ServiceFramework(name), module(std::move(module)) {}
|
||||||
|
|
||||||
|
void Module::Interface::Unknown(Kernel::HLERequestContext& ctx) {
|
||||||
|
LOG_WARNING(Service_NFP, "(STUBBED) called");
|
||||||
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
}
|
||||||
|
|
||||||
|
void InstallInterfaces(SM::ServiceManager& service_manager) {
|
||||||
|
auto module = std::make_shared<Module>();
|
||||||
|
std::make_shared<NFP_User>(module)->InstallAsService(service_manager);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace NFP
|
||||||
|
} // namespace Service
|
28
src/core/hle/service/nfp/nfp.h
Normal file
28
src/core/hle/service/nfp/nfp.h
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
// Copyright 2018 yuzu emulator team
|
||||||
|
// Licensed under GPLv2 or any later version
|
||||||
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "core/hle/service/service.h"
|
||||||
|
|
||||||
|
namespace Service {
|
||||||
|
namespace NFP {
|
||||||
|
|
||||||
|
class Module final {
|
||||||
|
public:
|
||||||
|
class Interface : public ServiceFramework<Interface> {
|
||||||
|
public:
|
||||||
|
Interface(std::shared_ptr<Module> module, const char* name);
|
||||||
|
|
||||||
|
void Unknown(Kernel::HLERequestContext& ctx);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
std::shared_ptr<Module> module;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
void InstallInterfaces(SM::ServiceManager& service_manager);
|
||||||
|
|
||||||
|
} // namespace NFP
|
||||||
|
} // namespace Service
|
19
src/core/hle/service/nfp/nfp_user.cpp
Normal file
19
src/core/hle/service/nfp/nfp_user.cpp
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
// Copyright 2018 yuzu emulator team
|
||||||
|
// Licensed under GPLv2 or any later version
|
||||||
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#include "core/hle/service/nfp/nfp_user.h"
|
||||||
|
|
||||||
|
namespace Service {
|
||||||
|
namespace NFP {
|
||||||
|
|
||||||
|
NFP_User::NFP_User(std::shared_ptr<Module> module)
|
||||||
|
: Module::Interface(std::move(module), "nfp:user") {
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{0, &NFP_User::Unknown, "Unknown"},
|
||||||
|
};
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace NFP
|
||||||
|
} // namespace Service
|
18
src/core/hle/service/nfp/nfp_user.h
Normal file
18
src/core/hle/service/nfp/nfp_user.h
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
// Copyright 2018 yuzu emulator team
|
||||||
|
// Licensed under GPLv2 or any later version
|
||||||
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "core/hle/service/nfp/nfp.h"
|
||||||
|
|
||||||
|
namespace Service {
|
||||||
|
namespace NFP {
|
||||||
|
|
||||||
|
class NFP_User final : public Module::Interface {
|
||||||
|
public:
|
||||||
|
explicit NFP_User(std::shared_ptr<Module> module);
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace NFP
|
||||||
|
} // namespace Service
|
|
@ -25,6 +25,7 @@
|
||||||
#include "core/hle/service/friend/friend.h"
|
#include "core/hle/service/friend/friend.h"
|
||||||
#include "core/hle/service/hid/hid.h"
|
#include "core/hle/service/hid/hid.h"
|
||||||
#include "core/hle/service/lm/lm.h"
|
#include "core/hle/service/lm/lm.h"
|
||||||
|
#include "core/hle/service/nfp/nfp.h"
|
||||||
#include "core/hle/service/nifm/nifm.h"
|
#include "core/hle/service/nifm/nifm.h"
|
||||||
#include "core/hle/service/ns/ns.h"
|
#include "core/hle/service/ns/ns.h"
|
||||||
#include "core/hle/service/nvdrv/nvdrv.h"
|
#include "core/hle/service/nvdrv/nvdrv.h"
|
||||||
|
@ -187,6 +188,7 @@ void Init() {
|
||||||
Friend::InstallInterfaces(*SM::g_service_manager);
|
Friend::InstallInterfaces(*SM::g_service_manager);
|
||||||
HID::InstallInterfaces(*SM::g_service_manager);
|
HID::InstallInterfaces(*SM::g_service_manager);
|
||||||
LM::InstallInterfaces(*SM::g_service_manager);
|
LM::InstallInterfaces(*SM::g_service_manager);
|
||||||
|
NFP::InstallInterfaces(*SM::g_service_manager);
|
||||||
NIFM::InstallInterfaces(*SM::g_service_manager);
|
NIFM::InstallInterfaces(*SM::g_service_manager);
|
||||||
NS::InstallInterfaces(*SM::g_service_manager);
|
NS::InstallInterfaces(*SM::g_service_manager);
|
||||||
Nvidia::InstallInterfaces(*SM::g_service_manager);
|
Nvidia::InstallInterfaces(*SM::g_service_manager);
|
||||||
|
|
Loading…
Reference in a new issue