add aoc list changed event
This commit is contained in:
parent
fdd5767887
commit
1038cd4370
4 changed files with 67 additions and 43 deletions
|
@ -15,6 +15,7 @@ namespace Ryujinx.Common.Logging
|
||||||
Service,
|
Service,
|
||||||
ServiceAcc,
|
ServiceAcc,
|
||||||
ServiceAm,
|
ServiceAm,
|
||||||
|
ServiceAoc,
|
||||||
ServiceApm,
|
ServiceApm,
|
||||||
ServiceAudio,
|
ServiceAudio,
|
||||||
ServiceBsd,
|
ServiceBsd,
|
||||||
|
|
64
Ryujinx.HLE/HOS/Services/Aoc/IAddOnContentManager.cs
Normal file
64
Ryujinx.HLE/HOS/Services/Aoc/IAddOnContentManager.cs
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
using Ryujinx.Common.Logging;
|
||||||
|
using Ryujinx.HLE.HOS.Ipc;
|
||||||
|
using Ryujinx.HLE.HOS.Kernel;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace Ryujinx.HLE.HOS.Services.Aoc
|
||||||
|
{
|
||||||
|
class IAddOnContentManager : IpcService
|
||||||
|
{
|
||||||
|
private KEvent AddOnContentListChangedEvent;
|
||||||
|
|
||||||
|
private Dictionary<int, ServiceProcessRequest> m_Commands;
|
||||||
|
|
||||||
|
public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
|
||||||
|
|
||||||
|
public IAddOnContentManager(Horizon System)
|
||||||
|
{
|
||||||
|
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||||
|
{
|
||||||
|
{ 2, CountAddOnContent },
|
||||||
|
{ 3, ListAddOnContent },
|
||||||
|
{ 8, GetAddOnContentListChangedEvent }
|
||||||
|
};
|
||||||
|
|
||||||
|
AddOnContentListChangedEvent = new KEvent(System);
|
||||||
|
}
|
||||||
|
|
||||||
|
// CountAddOnContent(u64, pid) -> i32
|
||||||
|
public static long CountAddOnContent(ServiceCtx Context)
|
||||||
|
{
|
||||||
|
Context.ResponseData.Write(0);
|
||||||
|
|
||||||
|
Logger.PrintStub(LogClass.ServiceAoc, "Stubbed.");
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ListAddOnContent(i32, i32, u64, pid) -> (i32, array<i32, 6>)
|
||||||
|
public static long ListAddOnContent(ServiceCtx Context)
|
||||||
|
{
|
||||||
|
Logger.PrintStub(LogClass.ServiceAoc, "Stubbed.");
|
||||||
|
|
||||||
|
//TODO: This is supposed to write a u32 array aswell.
|
||||||
|
//It's unknown what it contains.
|
||||||
|
Context.ResponseData.Write(0);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetAddOnContentListChangedEvent()
|
||||||
|
public long GetAddOnContentListChangedEvent(ServiceCtx Context)
|
||||||
|
{
|
||||||
|
if (Context.Process.HandleTable.GenerateHandle(AddOnContentListChangedEvent, out int Handle) != KernelResult.Success)
|
||||||
|
{
|
||||||
|
throw new InvalidOperationException("Out of handles!");
|
||||||
|
}
|
||||||
|
|
||||||
|
Context.Response.HandleDesc = IpcHandleDesc.MakeCopy(Handle);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,42 +0,0 @@
|
||||||
using Ryujinx.Common.Logging;
|
|
||||||
using Ryujinx.HLE.HOS.Ipc;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace Ryujinx.HLE.HOS.Services.Ns
|
|
||||||
{
|
|
||||||
class IAddOnContentManager : IpcService
|
|
||||||
{
|
|
||||||
private Dictionary<int, ServiceProcessRequest> m_Commands;
|
|
||||||
|
|
||||||
public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
|
|
||||||
|
|
||||||
public IAddOnContentManager()
|
|
||||||
{
|
|
||||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
|
||||||
{
|
|
||||||
{ 2, CountAddOnContent },
|
|
||||||
{ 3, ListAddOnContent }
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
public static long CountAddOnContent(ServiceCtx Context)
|
|
||||||
{
|
|
||||||
Context.ResponseData.Write(0);
|
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceNs, "Stubbed.");
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static long ListAddOnContent(ServiceCtx Context)
|
|
||||||
{
|
|
||||||
Logger.PrintStub(LogClass.ServiceNs, "Stubbed.");
|
|
||||||
|
|
||||||
//TODO: This is supposed to write a u32 array aswell.
|
|
||||||
//It's unknown what it contains.
|
|
||||||
Context.ResponseData.Write(0);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,5 +1,6 @@
|
||||||
using Ryujinx.HLE.HOS.Services.Acc;
|
using Ryujinx.HLE.HOS.Services.Acc;
|
||||||
using Ryujinx.HLE.HOS.Services.Am;
|
using Ryujinx.HLE.HOS.Services.Am;
|
||||||
|
using Ryujinx.HLE.HOS.Services.Aoc;
|
||||||
using Ryujinx.HLE.HOS.Services.Apm;
|
using Ryujinx.HLE.HOS.Services.Apm;
|
||||||
using Ryujinx.HLE.HOS.Services.Aud;
|
using Ryujinx.HLE.HOS.Services.Aud;
|
||||||
using Ryujinx.HLE.HOS.Services.Bsd;
|
using Ryujinx.HLE.HOS.Services.Bsd;
|
||||||
|
@ -40,7 +41,7 @@ namespace Ryujinx.HLE.HOS.Services
|
||||||
return new IAccountService();
|
return new IAccountService();
|
||||||
|
|
||||||
case "aoc:u":
|
case "aoc:u":
|
||||||
return new IAddOnContentManager();
|
return new IAddOnContentManager(System);
|
||||||
|
|
||||||
case "apm":
|
case "apm":
|
||||||
return new IManager();
|
return new IManager();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue