bgtc.cpp 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. // Copyright 2019 yuzu emulator team
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #include "common/logging/log.h"
  5. #include "core/core.h"
  6. #include "core/hle/ipc_helpers.h"
  7. #include "core/hle/service/glue/bgtc.h"
  8. namespace Service::Glue {
  9. BGTC_T::BGTC_T(Core::System& system_) : ServiceFramework{system_, "bgtc:t"} {
  10. // clang-format off
  11. static const FunctionInfo functions[] = {
  12. {100, &BGTC_T::OpenTaskService, "OpenTaskService"},
  13. };
  14. // clang-format on
  15. RegisterHandlers(functions);
  16. }
  17. BGTC_T::~BGTC_T() = default;
  18. void BGTC_T::OpenTaskService(Kernel::HLERequestContext& ctx) {
  19. LOG_DEBUG(Service_BGTC, "called");
  20. IPC::ResponseBuilder rb{ctx, 2, 0, 1};
  21. rb.Push(ResultSuccess);
  22. rb.PushIpcInterface<ITaskService>(system);
  23. }
  24. ITaskService::ITaskService(Core::System& system_) : ServiceFramework{system_, "ITaskService"} {
  25. // clang-format off
  26. static const FunctionInfo functions[] = {
  27. {1, nullptr, "NotifyTaskStarting"},
  28. {2, nullptr, "NotifyTaskFinished"},
  29. {3, nullptr, "GetTriggerEvent"},
  30. {4, nullptr, "IsInHalfAwake"},
  31. {5, nullptr, "NotifyClientName"},
  32. {6, nullptr, "IsInFullAwake"},
  33. {11, nullptr, "ScheduleTask"},
  34. {12, nullptr, "GetScheduledTaskInterval"},
  35. {13, nullptr, "UnscheduleTask"},
  36. {14, nullptr, "GetScheduleEvent"},
  37. {15, nullptr, "SchedulePeriodicTask"},
  38. {16, nullptr, "Unknown16"},
  39. {101, nullptr, "GetOperationMode"},
  40. {102, nullptr, "WillDisconnectNetworkWhenEnteringSleep"},
  41. {103, nullptr, "WillStayHalfAwakeInsteadSleep"},
  42. {200, nullptr, "Unknown200"},
  43. };
  44. // clang-format on
  45. RegisterHandlers(functions);
  46. }
  47. ITaskService::~ITaskService() = default;
  48. BGTC_SC::BGTC_SC(Core::System& system_) : ServiceFramework{system_, "bgtc:sc"} {
  49. // clang-format off
  50. static const FunctionInfo functions[] = {
  51. {1, nullptr, "GetState"},
  52. {2, nullptr, "GetStateChangedEvent"},
  53. {3, nullptr, "NotifyEnteringHalfAwake"},
  54. {4, nullptr, "NotifyLeavingHalfAwake"},
  55. {5, nullptr, "SetIsUsingSleepUnsupportedDevices"},
  56. };
  57. // clang-format on
  58. RegisterHandlers(functions);
  59. }
  60. BGTC_SC::~BGTC_SC() = default;
  61. } // namespace Service::Glue