mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-07-23 15:07:11 +02:00
bcat ipc (#4446)
This commit is contained in:
parent
4d1579acbf
commit
4250732353
31 changed files with 592 additions and 418 deletions
28
src/Ryujinx.Horizon/Bcat/BcatServerManager.cs
Normal file
28
src/Ryujinx.Horizon/Bcat/BcatServerManager.cs
Normal file
|
@ -0,0 +1,28 @@
|
|||
using Ryujinx.Horizon.Bcat.Ipc;
|
||||
using Ryujinx.Horizon.Bcat.Types;
|
||||
using Ryujinx.Horizon.Common;
|
||||
using Ryujinx.Horizon.Sdk.Sf.Hipc;
|
||||
using Ryujinx.Horizon.Sdk.Sm;
|
||||
using System;
|
||||
|
||||
namespace Ryujinx.Horizon.Bcat
|
||||
{
|
||||
class BcatServerManager : ServerManager
|
||||
{
|
||||
public BcatServerManager(HeapAllocator allocator, SmApi sm, int maxPorts, ManagerOptions options, int maxSessions) : base(allocator, sm, maxPorts, options, maxSessions)
|
||||
{
|
||||
}
|
||||
|
||||
protected override Result OnNeedsToAccept(int portIndex, Server server)
|
||||
{
|
||||
return (BcatPortIndex)portIndex switch
|
||||
{
|
||||
BcatPortIndex.Admin => AcceptImpl(server, new BcatService(BcatServicePermissionLevel.Admin)),
|
||||
BcatPortIndex.Manager => AcceptImpl(server, new BcatService(BcatServicePermissionLevel.Manager)),
|
||||
BcatPortIndex.User => AcceptImpl(server, new BcatService(BcatServicePermissionLevel.User)),
|
||||
BcatPortIndex.System => AcceptImpl(server, new BcatService(BcatServicePermissionLevel.System)),
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(portIndex)),
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue