1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-11-11 05:36:39 +00:00
Ryujinx/Ryujinx.HLE/HOS/Services/Nfc/NfcManager/INfc.cs

37 lines
1,015 B
C#
Raw Normal View History

using Ryujinx.Common.Logging;
namespace Ryujinx.HLE.HOS.Services.Nfc.NfcManager
{
class INfc : IpcService
{
private NfcPermissionLevel _permissionLevel;
public INfc(NfcPermissionLevel permissionLevel)
{
_permissionLevel = permissionLevel;
}
[CommandHipc(0)]
[CommandHipc(400)] // 4.0.0+
// Initialize()
public ResultCode Initialize(ServiceCtx context)
{
Logger.Stub?.PrintStub(LogClass.ServiceNfc, new { _permissionLevel });
return ResultCode.Success;
}
[CommandHipc(3)]
[CommandHipc(403)] // 4.0.0+
// IsNfcEnabled() -> b8
public ResultCode IsNfcEnabled(ServiceCtx context)
{
// NOTE: Write false value here could make nfp service not called.
context.ResponseData.Write(true);
Logger.Stub?.PrintStub(LogClass.ServiceNfc, new { _permissionLevel });
return ResultCode.Success;
}
}
}