summaryrefslogtreecommitdiff
path: root/src/slack-timedate.h
diff options
context:
space:
mode:
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);