diff options
Diffstat (limited to 'src/slack-timedate.h')
| -rw-r--r-- | src/slack-timedate.h | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/slack-timedate.h b/src/slack-timedate.h index 1c24aa1..babc62f 100644 --- a/src/slack-timedate.h +++ b/src/slack-timedate.h @@ -64,20 +64,26 @@ 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(); + + // Sets the system time zone to the one passed by the argument + // Returns true on success, false otherwise + bool set_timezone(gchar *, std::error_code& ec); + class timedate1 { - void list_timezones(const std::string& prefix, std::vector<Glib::ustring>& accumulator); + const Gio::DBus::InterfaceVTable interface_vtable; public: - // Returns the timezones available on the system. - Glib::Variant<std::vector<Glib::ustring>> list_timezones(); - - // Returns the system time zone. - Glib::ustring timezone(); + timedate1(); - // Sets the system time zone to the one passed by the argument - // Returns true on success, false otherwise - bool set_timezone(gchar *, std::error_code& ec); + void on_bus_acquired(const Glib::RefPtr<Gio::DBus::Connection>& connection, const Glib::ustring& name); + void on_name_lost(const Glib::RefPtr<Gio::DBus::Connection>& connection, const Glib::ustring& name); }; } |
