summaryrefslogtreecommitdiff
path: root/src/slack-timedate.h
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2024-06-13 13:09:52 +0200
committerEugen Wissner <belka@caraus.de>2024-06-13 13:09:52 +0200
commite72976840cf9c182bc37f6a6746ca9761be0e3f7 (patch)
treee62086fca1577e4ac54d3bee346783b0ecf1f330 /src/slack-timedate.h
parent8d43caadcc0c659f15feadfb5c7575c08eb4c1b6 (diff)
downloadslack-timedate-e72976840cf9c182bc37f6a6746ca9761be0e3f7.tar.gz
Report back SetNTP errors
Diffstat (limited to 'src/slack-timedate.h')
-rw-r--r--src/slack-timedate.h27
1 files changed, 13 insertions, 14 deletions
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<std::vector<Glib::ustring>> list_timezones();
- void list_timezones(const std::string& prefix, std::vector<Glib::ustring>& 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<Glib::ustring> 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);