summaryrefslogtreecommitdiff
path: root/src/slack-timedate.h
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2024-06-15 11:34:37 +0200
committerEugen Wissner <belka@caraus.de>2024-06-15 11:34:37 +0200
commitbbb4efde187ec2a9546f2b9ff54e0db7d275fc5d (patch)
treea9666c815d6e27aba1ae49f5848888678d9fd04c /src/slack-timedate.h
parentad19cb19d1c8b47ba244c02623a6797d7d8c84bc (diff)
downloadslack-timedate-bbb4efde187ec2a9546f2b9ff54e0db7d275fc5d.tar.gz
Report errors from clock_gettime and clock_settime
Diffstat (limited to 'src/slack-timedate.h')
-rw-r--r--src/slack-timedate.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/slack-timedate.h b/src/slack-timedate.h
index 41eb0e7..2dd4223 100644
--- a/src/slack-timedate.h
+++ b/src/slack-timedate.h
@@ -47,12 +47,18 @@ namespace dlackware::timedate
std::vector<Glib::ustring> list_timezones();
// Sets the system time zone to the one passed by the argument
- // Returns true on success, false otherwise
+ // Throws std::filesystem::filesystem_error.
void set_timezone(const Glib::ustring& zone, bool user_interaction);
// Sets NTP
+ // Throws std::filesystem::filesystem_error.
void set_ntp(bool use_ntp, bool user_interaction);
+ // Changes the date/time
+ // Takes the amount of seconds since UNIX epoche and
+ // Throws std::system_error.
+ void set_time(gint64 seconds_since_epoch, bool relative, bool user_interaction);
+
class timedate1
{
const Gio::DBus::InterfaceVTable interface_vtable;
@@ -64,8 +70,3 @@ namespace dlackware::timedate
void on_name_lost(const Glib::RefPtr<Gio::DBus::Connection>& connection, const Glib::ustring& name);
};
}
-
-// Changes the date/time
-// 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);