Ryujinx/Ryujinx.HLE/HOS/Services/Acc/IManagerForApplication.cs

47 lines
1.3 KiB
C#
Raw Normal View History

using Ryujinx.Common.Logging;
using Ryujinx.HLE.HOS.Ipc;
using Ryujinx.HLE.Utilities;
using System.Collections.Generic;
namespace Ryujinx.HLE.HOS.Services.Acc
{
class IManagerForApplication : IpcService
{
2018-12-01 20:01:59 +00:00
private UInt128 _uuid;
2018-12-01 20:01:59 +00:00
private Dictionary<int, ServiceProcessRequest> _commands;
2018-12-01 20:01:59 +00:00
public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => _commands;
2018-12-01 20:01:59 +00:00
public IManagerForApplication(UInt128 uuid)
{
2018-12-01 20:01:59 +00:00
_commands = new Dictionary<int, ServiceProcessRequest>()
{
{ 0, CheckAvailability },
{ 1, GetAccountId }
};
2018-12-01 20:01:59 +00:00
this._uuid = uuid;
}
// CheckAvailability()
2018-12-01 20:01:59 +00:00
public long CheckAvailability(ServiceCtx context)
{
Logger.PrintStub(LogClass.ServiceAcc, "Stubbed.");
return 0;
}
// GetAccountId() -> nn::account::NetworkServiceAccountId
2018-12-01 20:01:59 +00:00
public long GetAccountId(ServiceCtx context)
{
2018-12-01 20:01:59 +00:00
long networkServiceAccountId = 0xcafe;
2018-12-01 20:01:59 +00:00
Logger.PrintStub(LogClass.ServiceAcc, $"Stubbed. NetworkServiceAccountId: {networkServiceAccountId}");
2018-12-01 20:01:59 +00:00
context.ResponseData.Write(networkServiceAccountId);
return 0;
}
}
}