diff options
Diffstat (limited to 'include/notifications')
-rw-r--r-- | include/notifications/awake.h | 4 | ||||
-rw-r--r-- | include/notifications/dbus-shared.h | 6 | ||||
-rw-r--r-- | include/notifications/haptic.h | 2 | ||||
-rw-r--r-- | include/notifications/notifications.h | 15 |
4 files changed, 21 insertions, 6 deletions
diff --git a/include/notifications/awake.h b/include/notifications/awake.h index b441692..d0b46eb 100644 --- a/include/notifications/awake.h +++ b/include/notifications/awake.h @@ -22,6 +22,8 @@ #include <memory> +#include <gio/gio.h> + namespace ayatana { namespace indicator { namespace notifications { @@ -36,7 +38,7 @@ namespace notifications { class Awake { public: - explicit Awake(const std::string& app_name); + explicit Awake(GDBusConnection* system_bus, const std::string& app_name); ~Awake(); private: diff --git a/include/notifications/dbus-shared.h b/include/notifications/dbus-shared.h index 523fb2a..31df219 100644 --- a/include/notifications/dbus-shared.h +++ b/include/notifications/dbus-shared.h @@ -25,9 +25,9 @@ #define BUS_SCREEN_PATH "/com/canonical/Unity/Screen" #define BUS_SCREEN_INTERFACE "com.canonical.Unity.Screen" -#define BUS_POWERD_NAME "com.canonical.powerd" -#define BUS_POWERD_PATH "/com/canonical/powerd" -#define BUS_POWERD_INTERFACE "com.canonical.powerd" +#define BUS_POWERD_NAME "com.lomiri.Repowerd" +#define BUS_POWERD_PATH "/com/lomiri/Repowerd" +#define BUS_POWERD_INTERFACE "com.lomiri.Repowerd" #define BUS_HAPTIC_NAME "com.canonical.usensord" #define BUS_HAPTIC_PATH "/com/canonical/usensord/haptic" diff --git a/include/notifications/haptic.h b/include/notifications/haptic.h index 535074d..2f4008a 100644 --- a/include/notifications/haptic.h +++ b/include/notifications/haptic.h @@ -41,7 +41,7 @@ public: MODE_PULSE }; - explicit Haptic(const Mode& mode = MODE_PULSE); + explicit Haptic(const Mode& mode = MODE_PULSE, bool repeat = false); ~Haptic(); private: diff --git a/include/notifications/notifications.h b/include/notifications/notifications.h index 0de1e23..af6d21f 100644 --- a/include/notifications/notifications.h +++ b/include/notifications/notifications.h @@ -50,6 +50,8 @@ public: void set_icon_name (const std::string& icon_name); + void set_start_time(uint64_t time); + /* Set an interval, after which the notification will automatically be closed. If not set, the notification server's default timeout is used. */ @@ -62,15 +64,26 @@ public: static constexpr char const * HINT_NONSHAPED_ICON {"x-canonical-non-shaped-icon"}; static constexpr char const * HINT_AFFIRMATIVE_HINT {"x-canonical-private-affirmative-tint"}; static constexpr char const * HINT_REJECTION_TINT {"x-canonical-private-rejection-tint"}; + static constexpr char const * HINT_INTERACTIVE {"x-canonical-switch-to-application"}; /* Add an action button. This may fail if the Engine doesn't support actions. @see Engine::supports_actions() */ void add_action (const std::string& action, const std::string& label); - /** Sets the closed callback. This will be called exactly once. */ + /** Sets the closed callback. This will be called exactly once. After notification disappears */ void set_closed_callback (std::function<void(const std::string& action)>); + /** Sets the time-out callback. This will be called exactly once. */ + void set_timeout_callback (std::function<void()>); + + /** Sets if a notification bubble should be displayed. */ + void set_show_notification_bubble (bool show); + + /** Sets if notification should be posted to messaging menu after it is closed. */ + void set_post_to_messaging_menu (bool post); + + private: friend class Engine; class Impl; |