Stub nfp::IUser::ListDevices and nfp::IUser::GetState

This commit is contained in:
lynxnb 2022-03-23 17:12:05 +01:00 committed by PixelyIon
parent 7d518cba2b
commit 873ed641ea
2 changed files with 28 additions and 4 deletions

View File

@ -10,4 +10,14 @@ namespace skyline::service::nfp {
Result IUser::Initialize(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
return {};
}
Result IUser::ListDevices(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
response.Push<u32>(0);
return {};
}
Result IUser::GetState(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
response.Push<u32>(0);
return {};
}
}

View File

@ -3,12 +3,12 @@
#pragma once
#include <services/serviceman.h>
#include <services/base_service.h>
namespace skyline::service::nfp {
/**
* @brief IUser is used by applications to access NFC devices
* @url https://switchbrew.org/wiki/NFC_services#IUser
* @brief IUser is used by applications to access NFP (Near Field Proximity) devices
* @url https://switchbrew.org/wiki/NFC_services#IUser_3
*/
class IUser : public BaseService {
public:
@ -19,8 +19,22 @@ namespace skyline::service::nfp {
*/
Result Initialize(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
/*
* @brief Lists available NFP devices
* @url https://switchbrew.org/wiki/NFC_services#ListDevices
*/
Result ListDevices(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
/*
* @brief Return the state of the NFP service
* @url https://switchbrew.org/wiki/NFC_services#GetState_2
*/
Result GetState(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
SERVICE_DECL(
SFUNC(0x0, IUser, Initialize)
SFUNC(0x0, IUser, Initialize),
SFUNC(0x2, IUser, ListDevices),
SFUNC(0x13, IUser, GetState)
)
};
}