diff options
| author | Ac_K <Acoustik666@gmail.com> | 2019-07-12 03:13:43 +0200 |
|---|---|---|
| committer | gdkchan <gab.dark.100@gmail.com> | 2019-07-11 22:13:43 -0300 |
| commit | 560ccbeb2d55a4426ad2827bf7534d4a695431c2 (patch) | |
| tree | 7e224acbd6c023ea56ff80c6207aa0966aa06ee5 /Ryujinx.HLE/HOS/Services/Bcat | |
| parent | f723f6f39aaf7b1cebc0224a055058d62e3b689c (diff) | |
Refactoring commands handling (#728)
* Refactoring commands handling
- Use Reflection to handle commands ID.
- Add all symbols (from SwIPC so not all time accurate).
- Re-sort some services commands methods.
- Some cleanup.
- Keep some empty constructor for consistency.
* Fix order in IProfile
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Bcat')
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Bcat/IBcatService.cs | 18 | ||||
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Bcat/IDeliveryCacheStorageService.cs | 18 | ||||
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Bcat/IServiceCreator.cs | 20 |
3 files changed, 9 insertions, 47 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Bcat/IBcatService.cs b/Ryujinx.HLE/HOS/Services/Bcat/IBcatService.cs index dfd67304..6fdcba46 100644 --- a/Ryujinx.HLE/HOS/Services/Bcat/IBcatService.cs +++ b/Ryujinx.HLE/HOS/Services/Bcat/IBcatService.cs @@ -1,21 +1,7 @@ -using Ryujinx.HLE.HOS.Ipc; -using System.Collections.Generic; - namespace Ryujinx.HLE.HOS.Services.Bcat { class IBcatService : IpcService { - private Dictionary<int, ServiceProcessRequest> _commands; - - public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => _commands; - - public IBcatService() - { - _commands = new Dictionary<int, ServiceProcessRequest> - { - // ... - }; - } - + public IBcatService() { } } -} +}
\ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Bcat/IDeliveryCacheStorageService.cs b/Ryujinx.HLE/HOS/Services/Bcat/IDeliveryCacheStorageService.cs index fcf81c7e..5e3db998 100644 --- a/Ryujinx.HLE/HOS/Services/Bcat/IDeliveryCacheStorageService.cs +++ b/Ryujinx.HLE/HOS/Services/Bcat/IDeliveryCacheStorageService.cs @@ -1,21 +1,7 @@ -using Ryujinx.HLE.HOS.Ipc; -using System.Collections.Generic; - namespace Ryujinx.HLE.HOS.Services.Bcat { class IDeliveryCacheStorageService : IpcService { - private Dictionary<int, ServiceProcessRequest> _commands; - - public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => _commands; - - public IDeliveryCacheStorageService() - { - _commands = new Dictionary<int, ServiceProcessRequest> - { - // ... - }; - } - + public IDeliveryCacheStorageService() { } } -} +}
\ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Bcat/IServiceCreator.cs b/Ryujinx.HLE/HOS/Services/Bcat/IServiceCreator.cs index 6ed7ec3f..0d1e1411 100644 --- a/Ryujinx.HLE/HOS/Services/Bcat/IServiceCreator.cs +++ b/Ryujinx.HLE/HOS/Services/Bcat/IServiceCreator.cs @@ -1,6 +1,3 @@ -using Ryujinx.HLE.HOS.Ipc; -using System.Collections.Generic; - namespace Ryujinx.HLE.HOS.Services.Bcat { [Service("bcat:a")] @@ -9,19 +6,10 @@ namespace Ryujinx.HLE.HOS.Services.Bcat [Service("bcat:s")] class IServiceCreator : IpcService { - private Dictionary<int, ServiceProcessRequest> _commands; - - public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => _commands; - - public IServiceCreator(ServiceCtx context) - { - _commands = new Dictionary<int, ServiceProcessRequest> - { - { 0, CreateBcatService }, - { 1, CreateDeliveryCacheStorageService } - }; - } + public IServiceCreator(ServiceCtx context) { } + [Command(0)] + // CreateBcatService(u64, pid) -> object<nn::bcat::detail::ipc::IBcatService> public long CreateBcatService(ServiceCtx context) { long id = context.RequestData.ReadInt64(); @@ -31,6 +19,8 @@ namespace Ryujinx.HLE.HOS.Services.Bcat return 0; } + [Command(1)] + // CreateDeliveryCacheStorageService(u64, pid) -> object<nn::bcat::detail::ipc::IDeliveryCacheStorageService> public long CreateDeliveryCacheStorageService(ServiceCtx context) { long id = context.RequestData.ReadInt64(); |
