diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-07-01 09:36:57 +0000 |
---|---|---|
committer | CI bot <ps-jenkins@lists.canonical.com> | 2014-07-01 09:36:57 +0000 |
commit | 6ad9b8d2449c745953a1692b27e8d2b993a722d6 (patch) | |
tree | d0ce34b82460f52322d3bc9215fc7d989e642731 /include/datetime/exporter.h | |
parent | 6880613bbc6535242e95e7f5c65d9a9140eaa28b (diff) | |
parent | 194e79302027047ae36146f6ec4e7c0e9c1d2fc2 (diff) | |
download | ayatana-indicator-datetime-6ad9b8d2449c745953a1692b27e8d2b993a722d6.tar.gz ayatana-indicator-datetime-6ad9b8d2449c745953a1692b27e8d2b993a722d6.tar.bz2 ayatana-indicator-datetime-6ad9b8d2449c745953a1692b27e8d2b993a722d6.zip |
Expose the new alarm settings as DBus properties. Fixes: 1318997
Diffstat (limited to 'include/datetime/exporter.h')
-rw-r--r-- | include/datetime/exporter.h | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/include/datetime/exporter.h b/include/datetime/exporter.h index c228cc1..dd57263 100644 --- a/include/datetime/exporter.h +++ b/include/datetime/exporter.h @@ -22,11 +22,10 @@ #include <datetime/actions.h> #include <datetime/menu.h> +#include <datetime/settings.h> #include <core/signal.h> -#include <gio/gio.h> // GActionGroup - #include <memory> // std::shared_ptr #include <vector> @@ -40,31 +39,21 @@ namespace datetime { class Exporter { public: - Exporter() =default; + Exporter(const std::shared_ptr<Settings>&); ~Exporter(); - core::Signal<> name_lost; + core::Signal<>& name_lost(); void publish(const std::shared_ptr<Actions>& actions, const std::vector<std::shared_ptr<Menu>>& menus); private: - static void on_bus_acquired(GDBusConnection*, const gchar *name, gpointer gthis); - void on_bus_acquired(GDBusConnection*, const gchar *name); - - static void on_name_lost(GDBusConnection*, const gchar *name, gpointer gthis); - void on_name_lost(GDBusConnection*, const gchar *name); - - std::set<guint> m_exported_menu_ids; - guint m_own_id = 0; - guint m_exported_actions_id = 0; - GDBusConnection * m_dbus_connection = nullptr; - std::shared_ptr<Actions> m_actions; - std::vector<std::shared_ptr<Menu>> m_menus; + class Impl; + std::unique_ptr<Impl> p; - // we've got raw pointers and gsignal tags in here, so disable copying - Exporter(const Exporter&) =delete; - Exporter& operator=(const Exporter&) =delete; + // disable copying + Exporter(const Exporter&) =delete; + Exporter& operator=(const Exporter&) =delete; }; } // namespace datetime |