From da410506a401abc853ee23e56ca1e25eb47cd6e6 Mon Sep 17 00:00:00 2001 From: Kelebek1 Date: Fri, 26 Jan 2024 15:29:04 +0000 Subject: Move time services to new IPC. Add some fixes/improvements to usage with the new IPC --- src/core/hle/service/psc/time/service_manager.h | 60 +++++++++---------------- 1 file changed, 22 insertions(+), 38 deletions(-) (limited to 'src/core/hle/service/psc/time/service_manager.h') diff --git a/src/core/hle/service/psc/time/service_manager.h b/src/core/hle/service/psc/time/service_manager.h index 1d9952317..25d361d4f 100644 --- a/src/core/hle/service/psc/time/service_manager.h +++ b/src/core/hle/service/psc/time/service_manager.h @@ -6,6 +6,7 @@ #include #include +#include "core/hle/service/cmif_types.h" #include "core/hle/service/ipc_helpers.h" #include "core/hle/service/psc/time/common.h" #include "core/hle/service/psc/time/manager.h" @@ -29,55 +30,38 @@ public: ServerManager* server_manager); ~ServiceManager() override = default; - Result GetStaticServiceAsUser(std::shared_ptr& out_service); - Result GetStaticServiceAsAdmin(std::shared_ptr& out_service); - Result GetStaticServiceAsRepair(std::shared_ptr& out_service); - Result GetStaticServiceAsServiceManager(std::shared_ptr& out_service); - Result SetupStandardSteadyClockCore(Common::UUID& clock_source_id, s64 rtc_offset, - s64 internal_offset, s64 test_offset, - bool is_rtc_reset_detected); + Result GetStaticServiceAsUser(OutInterface out_service); + Result GetStaticServiceAsAdmin(OutInterface out_service); + Result GetStaticServiceAsRepair(OutInterface out_service); + Result GetStaticServiceAsServiceManager(OutInterface out_service); + Result SetupStandardSteadyClockCore(bool is_rtc_reset_detected, Common::UUID& clock_source_id, + s64 rtc_offset, s64 internal_offset, s64 test_offset); Result SetupStandardLocalSystemClockCore(SystemClockContext& context, s64 time); Result SetupStandardNetworkSystemClockCore(SystemClockContext& context, s64 accuracy); - Result SetupStandardUserSystemClockCore(SteadyClockTimePoint& time_point, - bool automatic_correction); - Result SetupTimeZoneServiceCore(LocationName& name, SteadyClockTimePoint& time_point, - RuleVersion& rule_version, u32 location_count, - std::span rule_buffer); + Result SetupStandardUserSystemClockCore(bool automatic_correction, + SteadyClockTimePoint& time_point); + Result SetupTimeZoneServiceCore(LocationName& name, RuleVersion& rule_version, + u32 location_count, SteadyClockTimePoint& time_point, + InBuffer rule_buffer); Result SetupEphemeralNetworkSystemClockCore(); - Result GetStandardLocalClockOperationEvent(Kernel::KEvent** out_event); - Result GetStandardNetworkClockOperationEventForServiceManager(Kernel::KEvent** out_event); - Result GetEphemeralNetworkClockOperationEventForServiceManager(Kernel::KEvent** out_event); - Result GetStandardUserSystemClockAutomaticCorrectionUpdatedEvent(Kernel::KEvent** out_event); + Result GetStandardLocalClockOperationEvent(OutCopyHandle out_event); + Result GetStandardNetworkClockOperationEventForServiceManager( + OutCopyHandle out_event); + Result GetEphemeralNetworkClockOperationEventForServiceManager( + OutCopyHandle out_event); + Result GetStandardUserSystemClockAutomaticCorrectionUpdatedEvent( + OutCopyHandle out_event); Result SetStandardSteadyClockBaseTime(s64 base_time); - Result GetClosestAlarmUpdatedEvent(Kernel::KEvent** out_event); + Result GetClosestAlarmUpdatedEvent(OutCopyHandle out_event); Result CheckAndSignalAlarms(); - Result GetClosestAlarmInfo(bool& out_is_valid, AlarmInfo& out_info, s64& out_time); + Result GetClosestAlarmInfo(Out out_is_valid, Out out_info, Out out_time); private: void CheckAndSetupServicesSAndP(); void SetupSAndP(); - Result GetStaticService(std::shared_ptr& out_service, + Result GetStaticService(OutInterface out_service, StaticServiceSetupInfo setup_info, const char* name); - void Handle_GetStaticServiceAsUser(HLERequestContext& ctx); - void Handle_GetStaticServiceAsAdmin(HLERequestContext& ctx); - void Handle_GetStaticServiceAsRepair(HLERequestContext& ctx); - void Handle_GetStaticServiceAsServiceManager(HLERequestContext& ctx); - void Handle_SetupStandardSteadyClockCore(HLERequestContext& ctx); - void Handle_SetupStandardLocalSystemClockCore(HLERequestContext& ctx); - void Handle_SetupStandardNetworkSystemClockCore(HLERequestContext& ctx); - void Handle_SetupStandardUserSystemClockCore(HLERequestContext& ctx); - void Handle_SetupTimeZoneServiceCore(HLERequestContext& ctx); - void Handle_SetupEphemeralNetworkSystemClockCore(HLERequestContext& ctx); - void Handle_GetStandardLocalClockOperationEvent(HLERequestContext& ctx); - void Handle_GetStandardNetworkClockOperationEventForServiceManager(HLERequestContext& ctx); - void Handle_GetEphemeralNetworkClockOperationEventForServiceManager(HLERequestContext& ctx); - void Handle_GetStandardUserSystemClockAutomaticCorrectionUpdatedEvent(HLERequestContext& ctx); - void Handle_SetStandardSteadyClockBaseTime(HLERequestContext& ctx); - void Handle_GetClosestAlarmUpdatedEvent(HLERequestContext& ctx); - void Handle_CheckAndSignalAlarms(HLERequestContext& ctx); - void Handle_GetClosestAlarmInfo(HLERequestContext& ctx); - Core::System& m_system; std::shared_ptr m_time; ServerManager& m_server_manager; -- cgit v1.2.3