pctl_a.cpp 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. // Copyright 2018 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/hle/ipc_helpers.h"
  6. #include "core/hle/service/pctl/pctl_a.h"
  7. namespace Service::PCTL {
  8. class IParentalControlService final : public ServiceFramework<IParentalControlService> {
  9. public:
  10. IParentalControlService() : ServiceFramework("IParentalControlService") {
  11. static const FunctionInfo functions[] = {
  12. {1, nullptr, "Initialize"},
  13. {1001, nullptr, "CheckFreeCommunicationPermission"},
  14. {1002, nullptr, "ConfirmLaunchApplicationPermission"},
  15. {1003, nullptr, "ConfirmResumeApplicationPermission"},
  16. {1004, nullptr, "ConfirmSnsPostPermission"},
  17. {1005, nullptr, "ConfirmSystemSettingsPermission"},
  18. {1006, nullptr, "IsRestrictionTemporaryUnlocked"},
  19. {1007, nullptr, "RevertRestrictionTemporaryUnlocked"},
  20. {1008, nullptr, "EnterRestrictedSystemSettings"},
  21. {1009, nullptr, "LeaveRestrictedSystemSettings"},
  22. {1010, nullptr, "IsRestrictedSystemSettingsEntered"},
  23. {1011, nullptr, "RevertRestrictedSystemSettingsEntered"},
  24. {1012, nullptr, "GetRestrictedFeatures"},
  25. {1013, nullptr, "ConfirmStereoVisionPermission"},
  26. {1014, nullptr, "ConfirmPlayableApplicationVideoOld"},
  27. {1015, nullptr, "ConfirmPlayableApplicationVideo"},
  28. {1031, nullptr, "IsRestrictionEnabled"},
  29. {1032, nullptr, "GetSafetyLevel"},
  30. {1033, nullptr, "SetSafetyLevel"},
  31. {1034, nullptr, "GetSafetyLevelSettings"},
  32. {1035, nullptr, "GetCurrentSettings"},
  33. {1036, nullptr, "SetCustomSafetyLevelSettings"},
  34. {1037, nullptr, "GetDefaultRatingOrganization"},
  35. {1038, nullptr, "SetDefaultRatingOrganization"},
  36. {1039, nullptr, "GetFreeCommunicationApplicationListCount"},
  37. {1042, nullptr, "AddToFreeCommunicationApplicationList"},
  38. {1043, nullptr, "DeleteSettings"},
  39. {1044, nullptr, "GetFreeCommunicationApplicationList"},
  40. {1045, nullptr, "UpdateFreeCommunicationApplicationList"},
  41. {1046, nullptr, "DisableFeaturesForReset"},
  42. {1047, nullptr, "NotifyApplicationDownloadStarted"},
  43. {1061, nullptr, "ConfirmStereoVisionRestrictionConfigurable"},
  44. {1062, nullptr, "GetStereoVisionRestriction"},
  45. {1063, nullptr, "SetStereoVisionRestriction"},
  46. {1064, nullptr, "ResetConfirmedStereoVisionPermission"},
  47. {1065, nullptr, "IsStereoVisionPermitted"},
  48. {1201, nullptr, "UnlockRestrictionTemporarily"},
  49. {1202, nullptr, "UnlockSystemSettingsRestriction"},
  50. {1203, nullptr, "SetPinCode"},
  51. {1204, nullptr, "GenerateInquiryCode"},
  52. {1205, nullptr, "CheckMasterKey"},
  53. {1206, nullptr, "GetPinCodeLength"},
  54. {1207, nullptr, "GetPinCodeChangedEvent"},
  55. {1208, nullptr, "GetPinCode"},
  56. {1403, nullptr, "IsPairingActive"},
  57. {1406, nullptr, "GetSettingsLastUpdated"},
  58. {1411, nullptr, "GetPairingAccountInfo"},
  59. {1421, nullptr, "GetAccountNickname"},
  60. {1424, nullptr, "GetAccountState"},
  61. {1432, nullptr, "GetSynchronizationEvent"},
  62. {1451, nullptr, "StartPlayTimer"},
  63. {1452, nullptr, "StopPlayTimer"},
  64. {1453, nullptr, "IsPlayTimerEnabled"},
  65. {1454, nullptr, "GetPlayTimerRemainingTime"},
  66. {1455, nullptr, "IsRestrictedByPlayTimer"},
  67. {1456, nullptr, "GetPlayTimerSettings"},
  68. {1457, nullptr, "GetPlayTimerEventToRequestSuspension"},
  69. {1458, nullptr, "IsPlayTimerAlarmDisabled"},
  70. {1471, nullptr, "NotifyWrongPinCodeInputManyTimes"},
  71. {1472, nullptr, "CancelNetworkRequest"},
  72. {1473, nullptr, "GetUnlinkedEvent"},
  73. {1474, nullptr, "ClearUnlinkedEvent"},
  74. {1601, nullptr, "DisableAllFeatures"},
  75. {1602, nullptr, "PostEnableAllFeatures"},
  76. {1603, nullptr, "IsAllFeaturesDisabled"},
  77. {1901, nullptr, "DeleteFromFreeCommunicationApplicationListForDebug"},
  78. {1902, nullptr, "ClearFreeCommunicationApplicationListForDebug"},
  79. {1903, nullptr, "GetExemptApplicationListCountForDebug"},
  80. {1904, nullptr, "GetExemptApplicationListForDebug"},
  81. {1905, nullptr, "UpdateExemptApplicationListForDebug"},
  82. {1906, nullptr, "AddToExemptApplicationListForDebug"},
  83. {1907, nullptr, "DeleteFromExemptApplicationListForDebug"},
  84. {1908, nullptr, "ClearExemptApplicationListForDebug"},
  85. {1941, nullptr, "DeletePairing"},
  86. {1951, nullptr, "SetPlayTimerSettingsForDebug"},
  87. {1952, nullptr, "GetPlayTimerSpentTimeForTest"},
  88. {1953, nullptr, "SetPlayTimerAlarmDisabledForDebug"},
  89. {2001, nullptr, "RequestPairingAsync"},
  90. {2002, nullptr, "FinishRequestPairing"},
  91. {2003, nullptr, "AuthorizePairingAsync"},
  92. {2004, nullptr, "FinishAuthorizePairing"},
  93. {2005, nullptr, "RetrievePairingInfoAsync"},
  94. {2006, nullptr, "FinishRetrievePairingInfo"},
  95. {2007, nullptr, "UnlinkPairingAsync"},
  96. {2008, nullptr, "FinishUnlinkPairing"},
  97. {2009, nullptr, "GetAccountMiiImageAsync"},
  98. {2010, nullptr, "FinishGetAccountMiiImage"},
  99. {2011, nullptr, "GetAccountMiiImageContentTypeAsync"},
  100. {2012, nullptr, "FinishGetAccountMiiImageContentType"},
  101. {2013, nullptr, "SynchronizeParentalControlSettingsAsync"},
  102. {2014, nullptr, "FinishSynchronizeParentalControlSettings"},
  103. {2015, nullptr, "FinishSynchronizeParentalControlSettingsWithLastUpdated"},
  104. {2016, nullptr, "RequestUpdateExemptionListAsync"},
  105. };
  106. RegisterHandlers(functions);
  107. }
  108. };
  109. void PCTL_A::CreateService(Kernel::HLERequestContext& ctx) {
  110. IPC::ResponseBuilder rb{ctx, 2, 0, 1};
  111. rb.Push(RESULT_SUCCESS);
  112. rb.PushIpcInterface<IParentalControlService>();
  113. NGLOG_DEBUG(Service_PCTL, "called");
  114. }
  115. PCTL_A::PCTL_A() : ServiceFramework("pctl:a") {
  116. static const FunctionInfo functions[] = {
  117. {0, &PCTL_A::CreateService, "CreateService"},
  118. {1, nullptr, "CreateServiceWithoutInitialize"},
  119. };
  120. RegisterHandlers(functions);
  121. }
  122. } // namespace Service::PCTL