diff options
Diffstat (limited to 'src/core/hle/service/psc/time/time_zone_service.h')
-rw-r--r-- | src/core/hle/service/psc/time/time_zone_service.h | 57 |
1 files changed, 27 insertions, 30 deletions
diff --git a/src/core/hle/service/psc/time/time_zone_service.h b/src/core/hle/service/psc/time/time_zone_service.h index 074c1d4ae..6eb9ddc4b 100644 --- a/src/core/hle/service/psc/time/time_zone_service.h +++ b/src/core/hle/service/psc/time/time_zone_service.h @@ -3,6 +3,7 @@ #pragma once +#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" @@ -20,45 +21,41 @@ struct Rule; namespace Service::PSC::Time { class TimeZoneService final : public ServiceFramework<TimeZoneService> { + using InRule = InLargeData<Tz::Rule, BufferAttr_HipcMapAlias>; + using OutRule = OutLargeData<Tz::Rule, BufferAttr_HipcMapAlias>; + public: explicit TimeZoneService(Core::System& system, StandardSteadyClockCore& clock_core, TimeZone& time_zone, bool can_write_timezone_device_location); ~TimeZoneService() override = default; - Result GetDeviceLocationName(LocationName& out_location_name); - Result GetTotalLocationNameCount(u32& out_count); - Result GetTimeZoneRuleVersion(RuleVersion& out_rule_version); - Result GetDeviceLocationNameAndUpdatedTime(SteadyClockTimePoint& out_time_point, - LocationName& location_name); + Result GetDeviceLocationName(Out<LocationName> out_location_name); + Result SetDeviceLocationName(LocationName& location_name); + Result GetTotalLocationNameCount(Out<u32> out_count); + Result LoadLocationNameList(Out<u32> out_count, + OutArray<LocationName, BufferAttr_HipcMapAlias> out_names, + u32 index); + Result LoadTimeZoneRule(OutRule out_rule, LocationName& location_name); + Result GetTimeZoneRuleVersion(Out<RuleVersion> out_rule_version); + Result GetDeviceLocationNameAndUpdatedTime(Out<LocationName> location_name, + Out<SteadyClockTimePoint> out_time_point); Result SetDeviceLocationNameWithTimeZoneRule(LocationName& location_name, - std::span<const u8> binary); - Result ParseTimeZoneBinary(Tz::Rule& out_rule, std::span<const u8> binary); - Result ToCalendarTime(CalendarTime& out_calendar_time, - CalendarAdditionalInfo& out_additional_info, s64 time, Tz::Rule& rule); - Result ToCalendarTimeWithMyRule(CalendarTime& out_calendar_time, - CalendarAdditionalInfo& out_additional_info, s64 time); - Result ToPosixTime(u32& out_count, std::span<s64, 2> out_times, u32 out_times_count, - CalendarTime& calendar_time, Tz::Rule& rule); - Result ToPosixTimeWithMyRule(u32& out_count, std::span<s64, 2> out_times, u32 out_times_count, - CalendarTime& calendar_time); + InBuffer<BufferAttr_HipcAutoSelect> binary); + Result ParseTimeZoneBinary(OutRule out_rule, InBuffer<BufferAttr_HipcAutoSelect> binary); + Result GetDeviceLocationNameOperationEventReadableHandle( + OutCopyHandle<Kernel::KReadableEvent> out_event); + Result ToCalendarTime(Out<CalendarTime> out_calendar_time, + Out<CalendarAdditionalInfo> out_additional_info, s64 time, InRule rule); + Result ToCalendarTimeWithMyRule(Out<CalendarTime> out_calendar_time, + Out<CalendarAdditionalInfo> out_additional_info, s64 time); + Result ToPosixTime(Out<u32> out_count, OutArray<s64, BufferAttr_HipcPointer> out_times, + const CalendarTime& calendar_time, InRule rule); + Result ToPosixTimeWithMyRule(Out<u32> out_count, + OutArray<s64, BufferAttr_HipcPointer> out_times, + const CalendarTime& calendar_time); private: - void Handle_GetDeviceLocationName(HLERequestContext& ctx); - void Handle_SetDeviceLocationName(HLERequestContext& ctx); - void Handle_GetTotalLocationNameCount(HLERequestContext& ctx); - void Handle_LoadLocationNameList(HLERequestContext& ctx); - void Handle_LoadTimeZoneRule(HLERequestContext& ctx); - void Handle_GetTimeZoneRuleVersion(HLERequestContext& ctx); - void Handle_GetDeviceLocationNameAndUpdatedTime(HLERequestContext& ctx); - void Handle_SetDeviceLocationNameWithTimeZoneRule(HLERequestContext& ctx); - void Handle_ParseTimeZoneBinary(HLERequestContext& ctx); - void Handle_GetDeviceLocationNameOperationEventReadableHandle(HLERequestContext& ctx); - void Handle_ToCalendarTime(HLERequestContext& ctx); - void Handle_ToCalendarTimeWithMyRule(HLERequestContext& ctx); - void Handle_ToPosixTime(HLERequestContext& ctx); - void Handle_ToPosixTimeWithMyRule(HLERequestContext& ctx); - Core::System& m_system; StandardSteadyClockCore& m_clock_core; |