IServiceCreator.cs 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using Ryujinx.HLE.HOS.Ipc;
  2. using System.Collections.Generic;
  3. namespace Ryujinx.HLE.HOS.Services.Bcat
  4. {
  5. class IServiceCreator : IpcService
  6. {
  7. private Dictionary<int, ServiceProcessRequest> _commands;
  8. public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => _commands;
  9. public IServiceCreator()
  10. {
  11. _commands = new Dictionary<int, ServiceProcessRequest>
  12. {
  13. { 0, CreateBcatService },
  14. { 1, CreateDeliveryCacheStorageService }
  15. };
  16. }
  17. public long CreateBcatService(ServiceCtx context)
  18. {
  19. long id = context.RequestData.ReadInt64();
  20. MakeObject(context, new IBcatService());
  21. return 0;
  22. }
  23. public long CreateDeliveryCacheStorageService(ServiceCtx context)
  24. {
  25. long id = context.RequestData.ReadInt64();
  26. MakeObject(context, new IDeliveryCacheStorageService());
  27. return 0;
  28. }
  29. }
  30. }