Added IAsyncContext.cs and EnsureIdTokenSync
This commit is contained in:
parent
06bf25521f
commit
4264ac8f33
2 changed files with 73 additions and 0 deletions
61
Ryujinx.HLE/HOS/Services/Account/Acc/IAsyncContext.cs
Normal file
61
Ryujinx.HLE/HOS/Services/Account/Acc/IAsyncContext.cs
Normal file
|
@ -0,0 +1,61 @@
|
|||
using LibHac;
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.HLE.HOS.Ipc;
|
||||
using Ryujinx.HLE.HOS.Kernel.Common;
|
||||
using Ryujinx.HLE.HOS.Kernel.Threading;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Services.Account.Acc
|
||||
{
|
||||
class IAsyncContext : IpcService
|
||||
{
|
||||
private KEvent _event;
|
||||
public IAsyncContext(ServiceCtx context)
|
||||
{
|
||||
_event = new KEvent(context.Device.System);
|
||||
}
|
||||
|
||||
[Command(0)]
|
||||
//GetSystemEvent() -> handle<copy>
|
||||
public ResultCode GetSystemEvent(ServiceCtx context)
|
||||
{
|
||||
if (context.Process.HandleTable.GenerateHandle(_event.ReadableEvent, out int _handle) != KernelResult.Success)
|
||||
{
|
||||
throw new InvalidOperationException("Out of Handles!");
|
||||
}
|
||||
|
||||
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(_handle);
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
[Command(1)]
|
||||
//Cancel()
|
||||
public ResultCode Cancel(ServiceCtx context)
|
||||
{
|
||||
Logger.PrintStub(LogClass.ServiceAcc);
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
[Command(2)]
|
||||
//HasDone() -> b8
|
||||
public ResultCode HasDone(ServiceCtx context)
|
||||
{
|
||||
context.ResponseData.Write(1);
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
[Command(3)]
|
||||
//GetResult()
|
||||
public ResultCode GetResult(ServiceCtx context)
|
||||
{
|
||||
Logger.PrintStub(LogClass.ServiceAcc);
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,3 +1,4 @@
|
|||
using GLib;
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.HLE.HOS.Services.Arp;
|
||||
|
||||
|
@ -36,6 +37,17 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc
|
|||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
[Command(2)]
|
||||
//EnsureIdTokenCacheAsync() -> object<nn::account::detail::IAsyncContext>
|
||||
public ResultCode EnsureIdTokenCacheAsync(ServiceCtx context)
|
||||
{
|
||||
MakeObject(context, new IAsyncContext(context));
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
[Command(3)]
|
||||
public ResultCode
|
||||
[Command(130)]
|
||||
// GetNintendoAccountUserResourceCacheForApplication() -> (nn::account::NintendoAccountId, buffer<nn::account::nas::NasUserBaseForApplication, 0x1a>, buffer<bytes, 6>)
|
||||
public ResultCode GetNintendoAccountUserResourceCacheForApplication(ServiceCtx context)
|
||||
|
|
Loading…
Add table
Reference in a new issue