diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2023-05-04 13:16:51 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-04 18:16:51 +0200 |
| commit | 264438ff19898bcb8f8fc16dc9243bf9f4eba072 (patch) | |
| tree | fd069fe4f0dcd2a78fc9c8ccc6d4e93bec2330b5 /src/Ryujinx.Horizon/Bcat/Ipc/ServiceCreator | |
| parent | 3b8ac1641a8a40849915396813e26384b5894911 (diff) | |
Revert "bcat ipc (#4446)" (#4801)
This reverts commit 42507323535443ad79be071367f3d4815afca688.
Diffstat (limited to 'src/Ryujinx.Horizon/Bcat/Ipc/ServiceCreator')
6 files changed, 0 insertions, 277 deletions
diff --git a/src/Ryujinx.Horizon/Bcat/Ipc/ServiceCreator/BcatService.cs b/src/Ryujinx.Horizon/Bcat/Ipc/ServiceCreator/BcatService.cs deleted file mode 100644 index e82f597e..00000000 --- a/src/Ryujinx.Horizon/Bcat/Ipc/ServiceCreator/BcatService.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Ryujinx.Horizon.Bcat.Types; -using Ryujinx.Horizon.Common; -using Ryujinx.Horizon.Sdk.Bcat; -using Ryujinx.Horizon.Sdk.Sf; - -namespace Ryujinx.Horizon.Bcat.Ipc -{ - partial class BcatService : IBcatService - { - private readonly BcatServicePermissionLevel _permissionLevel; - - public BcatService(BcatServicePermissionLevel permissionLevel) - { - _permissionLevel = permissionLevel; - } - - [CmifCommand(10100)] - public Result RequestSyncDeliveryCache(out IDeliveryCacheProgressService deliveryCacheProgressService) - { - deliveryCacheProgressService = new DeliveryCacheProgressService(); - - return Result.Success; - } - } -} diff --git a/src/Ryujinx.Horizon/Bcat/Ipc/ServiceCreator/DeliveryCacheDirectoryService.cs b/src/Ryujinx.Horizon/Bcat/Ipc/ServiceCreator/DeliveryCacheDirectoryService.cs deleted file mode 100644 index dd13eefb..00000000 --- a/src/Ryujinx.Horizon/Bcat/Ipc/ServiceCreator/DeliveryCacheDirectoryService.cs +++ /dev/null @@ -1,48 +0,0 @@ -using LibHac.Bcat; -using LibHac.Common; -using Ryujinx.Horizon.Common; -using Ryujinx.Horizon.Sdk.Bcat; -using Ryujinx.Horizon.Sdk.Sf; -using Ryujinx.Horizon.Sdk.Sf.Hipc; -using System; -using System.Threading; - -namespace Ryujinx.Horizon.Bcat.Ipc -{ - partial class DeliveryCacheDirectoryService : IDeliveryCacheDirectoryService, IDisposable - { - private SharedRef<LibHac.Bcat.Impl.Ipc.IDeliveryCacheDirectoryService> _libHacService; - private int _disposalState; - - public DeliveryCacheDirectoryService(ref SharedRef<LibHac.Bcat.Impl.Ipc.IDeliveryCacheDirectoryService> libHacService) - { - _libHacService = SharedRef<LibHac.Bcat.Impl.Ipc.IDeliveryCacheDirectoryService>.CreateMove(ref libHacService); - } - - [CmifCommand(0)] - public Result Open(DirectoryName directoryName) - { - return _libHacService.Get.Open(ref directoryName).ToHorizonResult(); - } - - [CmifCommand(1)] - public Result Read(out int entriesRead, [Buffer(Sdk.Sf.Hipc.HipcBufferFlags.Out | HipcBufferFlags.MapAlias)] Span<DeliveryCacheDirectoryEntry> entriesBuffer) - { - return _libHacService.Get.Read(out entriesRead, entriesBuffer).ToHorizonResult(); - } - - [CmifCommand(2)] - public Result GetCount(out int count) - { - return _libHacService.Get.GetCount(out count).ToHorizonResult(); - } - - public void Dispose() - { - if (Interlocked.Exchange(ref _disposalState, 1) == 0) - { - _libHacService.Destroy(); - } - } - } -} diff --git a/src/Ryujinx.Horizon/Bcat/Ipc/ServiceCreator/DeliveryCacheFileService.cs b/src/Ryujinx.Horizon/Bcat/Ipc/ServiceCreator/DeliveryCacheFileService.cs deleted file mode 100644 index d23f5f41..00000000 --- a/src/Ryujinx.Horizon/Bcat/Ipc/ServiceCreator/DeliveryCacheFileService.cs +++ /dev/null @@ -1,54 +0,0 @@ -using LibHac.Bcat; -using LibHac.Common; -using Ryujinx.Horizon.Common; -using Ryujinx.Horizon.Sdk.Bcat; -using Ryujinx.Horizon.Sdk.Sf; -using Ryujinx.Horizon.Sdk.Sf.Hipc; -using System; -using System.Threading; - -namespace Ryujinx.Horizon.Bcat.Ipc -{ - partial class DeliveryCacheFileService : IDeliveryCacheFileService, IDisposable - { - private SharedRef<LibHac.Bcat.Impl.Ipc.IDeliveryCacheFileService> _libHacService; - private int _disposalState; - - public DeliveryCacheFileService(ref SharedRef<LibHac.Bcat.Impl.Ipc.IDeliveryCacheFileService> libHacService) - { - _libHacService = SharedRef<LibHac.Bcat.Impl.Ipc.IDeliveryCacheFileService>.CreateMove(ref libHacService); - } - - [CmifCommand(0)] - public Result Open(DirectoryName directoryName, FileName fileName) - { - return _libHacService.Get.Open(ref directoryName, ref fileName).ToHorizonResult(); - } - - [CmifCommand(1)] - public Result Read(long offset, out long bytesRead, [Buffer(HipcBufferFlags.Out | HipcBufferFlags.MapAlias)] Span<byte> data) - { - return _libHacService.Get.Read(out bytesRead, offset, data).ToHorizonResult(); - } - - [CmifCommand(2)] - public Result GetSize(out long size) - { - return _libHacService.Get.GetSize(out size).ToHorizonResult(); - } - - [CmifCommand(3)] - public Result GetDigest(out Digest digest) - { - return _libHacService.Get.GetDigest(out digest).ToHorizonResult(); - } - - public void Dispose() - { - if (Interlocked.Exchange(ref _disposalState, 1) == 0) - { - _libHacService.Destroy(); - } - } - } -} diff --git a/src/Ryujinx.Horizon/Bcat/Ipc/ServiceCreator/DeliveryCacheProgressService.cs b/src/Ryujinx.Horizon/Bcat/Ipc/ServiceCreator/DeliveryCacheProgressService.cs deleted file mode 100644 index 91aa2686..00000000 --- a/src/Ryujinx.Horizon/Bcat/Ipc/ServiceCreator/DeliveryCacheProgressService.cs +++ /dev/null @@ -1,58 +0,0 @@ -using Ryujinx.Common.Logging; -using Ryujinx.Horizon.Bcat.Ipc.Types; -using Ryujinx.Horizon.Common; -using Ryujinx.Horizon.Sdk.Bcat; -using Ryujinx.Horizon.Sdk.OsTypes; -using Ryujinx.Horizon.Sdk.Sf; -using Ryujinx.Horizon.Sdk.Sf.Hipc; -using System; -using System.Threading; - -namespace Ryujinx.Horizon.Bcat.Ipc -{ - partial class DeliveryCacheProgressService : IDeliveryCacheProgressService, IDisposable - { - private int _handle; - private SystemEventType _systemEvent; - private int _disposalState; - - [CmifCommand(0)] - public Result GetEvent([CopyHandle] out int handle) - { - if (_handle == 0) - { - Os.CreateSystemEvent(out _systemEvent, EventClearMode.ManualClear, true).AbortOnFailure(); - - _handle = Os.GetReadableHandleOfSystemEvent(ref _systemEvent); - } - - handle = _handle; - - Logger.Stub?.PrintStub(LogClass.ServiceBcat); - - return Result.Success; - } - - [CmifCommand(1)] - public Result GetImpl([Buffer(HipcBufferFlags.Out | HipcBufferFlags.Pointer, 0x200)] out DeliveryCacheProgressImpl deliveryCacheProgressImpl) - { - deliveryCacheProgressImpl = new DeliveryCacheProgressImpl - { - State = DeliveryCacheProgressImpl.Status.Done, - Result = 0 - }; - - Logger.Stub?.PrintStub(LogClass.ServiceBcat); - - return Result.Success; - } - - public void Dispose() - { - if (_handle != 0 && Interlocked.Exchange(ref _disposalState, 1) == 0) - { - Os.DestroySystemEvent(ref _systemEvent); - } - } - } -} diff --git a/src/Ryujinx.Horizon/Bcat/Ipc/ServiceCreator/DeliveryCacheStorageService.cs b/src/Ryujinx.Horizon/Bcat/Ipc/ServiceCreator/DeliveryCacheStorageService.cs deleted file mode 100644 index 9507a8a0..00000000 --- a/src/Ryujinx.Horizon/Bcat/Ipc/ServiceCreator/DeliveryCacheStorageService.cs +++ /dev/null @@ -1,74 +0,0 @@ -using LibHac.Bcat; -using LibHac.Common; -using Ryujinx.Horizon.Common; -using Ryujinx.Horizon.Sdk.Bcat; -using Ryujinx.Horizon.Sdk.Sf; -using Ryujinx.Horizon.Sdk.Sf.Hipc; -using System; -using System.Threading; - -namespace Ryujinx.Horizon.Bcat.Ipc -{ - partial class DeliveryCacheStorageService : IDeliveryCacheStorageService, IDisposable - { - private SharedRef<LibHac.Bcat.Impl.Ipc.IDeliveryCacheStorageService> _libHacService; - private int _disposalState; - - public DeliveryCacheStorageService(ref SharedRef<LibHac.Bcat.Impl.Ipc.IDeliveryCacheStorageService> libHacService) - { - _libHacService = SharedRef<LibHac.Bcat.Impl.Ipc.IDeliveryCacheStorageService>.CreateMove(ref libHacService); - } - - [CmifCommand(0)] - public Result CreateFileService(out IDeliveryCacheFileService service) - { - using var libHacService = new SharedRef<LibHac.Bcat.Impl.Ipc.IDeliveryCacheFileService>(); - - var resultCode = _libHacService.Get.CreateFileService(ref libHacService.Ref); - - if (resultCode.IsSuccess()) - { - service = new DeliveryCacheFileService(ref libHacService.Ref); - } - else - { - service = null; - } - - return resultCode.ToHorizonResult(); - } - - [CmifCommand(1)] - public Result CreateDirectoryService(out IDeliveryCacheDirectoryService service) - { - using var libHacService = new SharedRef<LibHac.Bcat.Impl.Ipc.IDeliveryCacheDirectoryService>(); - - var resultCode = _libHacService.Get.CreateDirectoryService(ref libHacService.Ref); - - if (resultCode.IsSuccess()) - { - service = new DeliveryCacheDirectoryService(ref libHacService.Ref); - } - else - { - service = null; - } - - return resultCode.ToHorizonResult(); - } - - [CmifCommand(10)] - public Result EnumerateDeliveryCacheDirectory(out int count, [Buffer(HipcBufferFlags.Out | HipcBufferFlags.MapAlias)] Span<DirectoryName> directoryNames) - { - return _libHacService.Get.EnumerateDeliveryCacheDirectory(out count, directoryNames).ToHorizonResult(); - } - - public void Dispose() - { - if (Interlocked.Exchange(ref _disposalState, 1) == 0) - { - _libHacService.Destroy(); - } - } - } -} diff --git a/src/Ryujinx.Horizon/Bcat/Ipc/ServiceCreator/Types/DeliveryCacheProgressImpl.cs b/src/Ryujinx.Horizon/Bcat/Ipc/ServiceCreator/Types/DeliveryCacheProgressImpl.cs deleted file mode 100644 index 10e0b54f..00000000 --- a/src/Ryujinx.Horizon/Bcat/Ipc/ServiceCreator/Types/DeliveryCacheProgressImpl.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Runtime.InteropServices; - -namespace Ryujinx.Horizon.Bcat.Ipc.Types -{ - [StructLayout(LayoutKind.Sequential, Size = 0x200)] - public struct DeliveryCacheProgressImpl - { - public enum Status - { - // TODO: determine other values - Done = 9 - } - - public Status State; - public uint Result; - // TODO: reverse the rest of the structure - } -} |
