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> m_Commands;
  8. public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
  9. public IServiceCreator()
  10. {
  11. m_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. }