From e72976840cf9c182bc37f6a6746ca9761be0e3f7 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Thu, 13 Jun 2024 13:09:52 +0200 Subject: Report back SetNTP errors --- src/slack-timedate.h | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'src/slack-timedate.h') diff --git a/src/slack-timedate.h b/src/slack-timedate.h index 2d4ffd3..a687ab0 100644 --- a/src/slack-timedate.h +++ b/src/slack-timedate.h @@ -64,16 +64,24 @@ namespace dlackware::timedate { constexpr const char *zoneinfo_database = "/usr/share/zoneinfo"; - // Returns the timezones available on the system. - Glib::Variant> list_timezones(); - void list_timezones(const std::string& prefix, std::vector& accumulator); - // Returns the system time zone. Glib::ustring timezone(); + // Returns if the hardware clock is set to local time or not + bool local_rtc(); + + // Returns if NTP is enabled + bool ntp(); + + // Returns the timezones available on the system. + std::vector list_timezones(); + // Sets the system time zone to the one passed by the argument // Returns true on success, false otherwise - bool set_timezone(const Glib::ustring& zone, std::error_code& ec); + void set_timezone(const Glib::ustring& zone, bool user_interaction); + + // Sets NTP + void set_ntp(bool use_ntp, bool user_interaction); class timedate1 { @@ -91,12 +99,3 @@ namespace dlackware::timedate // Takes the amount of seconds since UNIX epoche and // Returns true on success, false otherwise gboolean slack_set_time(gint64 seconds_since_epoch, gboolean relative); - -// Returns if the hardware clock is set to local time or not -gboolean slack_get_is_localtime (); - -// Returns if NTP is enabled -gboolean slack_get_ntp (); - -// Sets NTP -gboolean slack_set_ntp (gboolean); -- cgit v1.2.3