mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2025-09-20 22:12:02 -05:00
Refactor IPC services to have commands into separate classes, fix readme url
This commit is contained in:
33
Ryujinx.Core/OsHle/IpcServices/Acc/IManagerForApplication.cs
Normal file
33
Ryujinx.Core/OsHle/IpcServices/Acc/IManagerForApplication.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using Ryujinx.Core.OsHle.Ipc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ryujinx.Core.OsHle.IpcServices.Acc
|
||||
{
|
||||
class IManagerForApplication : IIpcService
|
||||
{
|
||||
private Dictionary<int, ServiceProcessRequest> m_Commands;
|
||||
|
||||
public IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
|
||||
|
||||
public IManagerForApplication()
|
||||
{
|
||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||
{
|
||||
{ 0, CheckAvailability },
|
||||
{ 1, GetAccountId }
|
||||
};
|
||||
}
|
||||
|
||||
public long CheckAvailability(ServiceCtx Context)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long GetAccountId(ServiceCtx Context)
|
||||
{
|
||||
Context.ResponseData.Write(0xcafeL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
33
Ryujinx.Core/OsHle/IpcServices/Acc/IProfile.cs
Normal file
33
Ryujinx.Core/OsHle/IpcServices/Acc/IProfile.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using Ryujinx.Core.OsHle.Ipc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ryujinx.Core.OsHle.IpcServices.Acc
|
||||
{
|
||||
class IProfile : IIpcService
|
||||
{
|
||||
private Dictionary<int, ServiceProcessRequest> m_Commands;
|
||||
|
||||
public IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
|
||||
|
||||
public IProfile()
|
||||
{
|
||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||
{
|
||||
{ 1, GetBase }
|
||||
};
|
||||
}
|
||||
|
||||
public long GetBase(ServiceCtx Context)
|
||||
{
|
||||
Context.ResponseData.Write(0L);
|
||||
Context.ResponseData.Write(0L);
|
||||
Context.ResponseData.Write(0L);
|
||||
Context.ResponseData.Write(0L);
|
||||
Context.ResponseData.Write(0L);
|
||||
Context.ResponseData.Write(0L);
|
||||
Context.ResponseData.Write(0L);
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
49
Ryujinx.Core/OsHle/IpcServices/Acc/ServiceAcc.cs
Normal file
49
Ryujinx.Core/OsHle/IpcServices/Acc/ServiceAcc.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
using Ryujinx.Core.OsHle.Ipc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using static Ryujinx.Core.OsHle.IpcServices.ObjHelper;
|
||||
|
||||
namespace Ryujinx.Core.OsHle.IpcServices.Acc
|
||||
{
|
||||
class ServiceAcc : IIpcService
|
||||
{
|
||||
private Dictionary<int, ServiceProcessRequest> m_Commands;
|
||||
|
||||
public IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
|
||||
|
||||
public ServiceAcc()
|
||||
{
|
||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||
{
|
||||
{ 3, ListOpenUsers },
|
||||
{ 5, GetProfile },
|
||||
{ 100, InitializeApplicationInfo },
|
||||
{ 101, GetBaasAccountManagerForApplication }
|
||||
};
|
||||
}
|
||||
|
||||
public long ListOpenUsers(ServiceCtx Context)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long GetProfile(ServiceCtx Context)
|
||||
{
|
||||
MakeObject(Context, new IProfile());
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long InitializeApplicationInfo(ServiceCtx Context)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long GetBaasAccountManagerForApplication(ServiceCtx Context)
|
||||
{
|
||||
MakeObject(Context, new IManagerForApplication());
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user