diff options
Diffstat (limited to 'src/core/hle/service/glue/time/time_zone.h')
-rw-r--r-- | src/core/hle/service/glue/time/time_zone.h | 67 |
1 files changed, 30 insertions, 37 deletions
diff --git a/src/core/hle/service/glue/time/time_zone.h b/src/core/hle/service/glue/time/time_zone.h index 3c8ae4bf8..9c1530966 100644 --- a/src/core/hle/service/glue/time/time_zone.h +++ b/src/core/hle/service/glue/time/time_zone.h @@ -8,6 +8,7 @@ #include <span> #include <vector> +#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/server_manager.h" @@ -33,6 +34,9 @@ namespace Service::Glue::Time { class FileTimestampWorker; 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, FileTimestampWorker& file_timestamp_worker, @@ -41,46 +45,35 @@ public: ~TimeZoneService() override; - Result GetDeviceLocationName(Service::PSC::Time::LocationName& out_location_name); - Result SetDeviceLocation(Service::PSC::Time::LocationName& location_name); - Result GetTotalLocationNameCount(u32& out_count); - Result LoadLocationNameList(u32& out_count, - std::vector<Service::PSC::Time::LocationName>& out_names, - size_t max_names, u32 index); - Result LoadTimeZoneRule(Tz::Rule& out_rule, Service::PSC::Time::LocationName& name); - Result GetTimeZoneRuleVersion(Service::PSC::Time::RuleVersion& out_rule_version); + Result GetDeviceLocationName(Out<Service::PSC::Time::LocationName> out_location_name); + Result SetDeviceLocationName(Service::PSC::Time::LocationName& location_name); + Result GetTotalLocationNameCount(Out<u32> out_count); + Result LoadLocationNameList( + Out<u32> out_count, + OutArray<Service::PSC::Time::LocationName, BufferAttr_HipcMapAlias> out_names, u32 index); + Result LoadTimeZoneRule(OutRule out_rule, Service::PSC::Time::LocationName& location_name); + Result GetTimeZoneRuleVersion(Out<Service::PSC::Time::RuleVersion> out_rule_version); Result GetDeviceLocationNameAndUpdatedTime( - Service::PSC::Time::SteadyClockTimePoint& out_time_point, - Service::PSC::Time::LocationName& location_name); - Result SetDeviceLocationNameWithTimeZoneRule(); - Result GetDeviceLocationNameOperationEventReadableHandle(Kernel::KEvent** out_event); - Result ToCalendarTime(Service::PSC::Time::CalendarTime& out_calendar_time, - Service::PSC::Time::CalendarAdditionalInfo& out_additional_info, s64 time, - Tz::Rule& rule); - Result ToCalendarTimeWithMyRule(Service::PSC::Time::CalendarTime& out_calendar_time, - Service::PSC::Time::CalendarAdditionalInfo& out_additional_info, - s64 time); - Result ToPosixTime(u32& out_count, std::span<s64, 2> out_times, u32 out_times_count, - Service::PSC::Time::CalendarTime& calendar_time, Tz::Rule& rule); - Result ToPosixTimeWithMyRule(u32& out_count, std::span<s64, 2> out_times, u32 out_times_count, - Service::PSC::Time::CalendarTime& calendar_time); + Out<Service::PSC::Time::LocationName> location_name, + Out<Service::PSC::Time::SteadyClockTimePoint> out_time_point); + Result SetDeviceLocationNameWithTimeZoneRule(Service::PSC::Time::LocationName& location_name, + InBuffer<BufferAttr_HipcAutoSelect> binary); + Result ParseTimeZoneBinary(OutRule out_rule, InBuffer<BufferAttr_HipcAutoSelect> binary); + Result GetDeviceLocationNameOperationEventReadableHandle( + OutCopyHandle<Kernel::KReadableEvent> out_event); + Result ToCalendarTime(Out<Service::PSC::Time::CalendarTime> out_calendar_time, + Out<Service::PSC::Time::CalendarAdditionalInfo> out_additional_info, + s64 time, InRule rule); + Result ToCalendarTimeWithMyRule( + Out<Service::PSC::Time::CalendarTime> out_calendar_time, + Out<Service::PSC::Time::CalendarAdditionalInfo> out_additional_info, s64 time); + Result ToPosixTime(Out<u32> out_count, OutArray<s64, BufferAttr_HipcPointer> out_times, + const Service::PSC::Time::CalendarTime& calendar_time, InRule rule); + Result ToPosixTimeWithMyRule(Out<u32> out_count, + OutArray<s64, BufferAttr_HipcPointer> out_times, + const Service::PSC::Time::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; std::shared_ptr<Service::Set::ISystemSettingsServer> m_set_sys; |