diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-08-08 20:52:31 +0000 |
---|---|---|
committer | CI bot <ps-jenkins@lists.canonical.com> | 2014-08-08 20:52:31 +0000 |
commit | 0777142ba348c212f57af039c6f7b2ae15d5058f (patch) | |
tree | c4998c28ec72c215ccb8bff40ef5851e826358ac /include/datetime | |
parent | 23b0a5d6d97b8e36443a2a719b879f99975ef972 (diff) | |
parent | 9cc6380c1cb0c4e96a893a1b9d2720d2ed3181bd (diff) | |
download | ayatana-indicator-datetime-0777142ba348c212f57af039c6f7b2ae15d5058f.tar.gz ayatana-indicator-datetime-0777142ba348c212f57af039c6f7b2ae15d5058f.tar.bz2 ayatana-indicator-datetime-0777142ba348c212f57af039c6f7b2ae15d5058f.zip |
Add haptic feedback support for alarms. Fixes: 1350017
Approved by: Antti Kaijanmäki, PS Jenkins bot, Nekhelesh Ramananthan
Diffstat (limited to 'include/datetime')
-rw-r--r-- | include/datetime/dbus-shared.h | 14 | ||||
-rw-r--r-- | include/datetime/settings-live.h | 1 | ||||
-rw-r--r-- | include/datetime/settings-shared.h | 1 | ||||
-rw-r--r-- | include/datetime/settings.h | 1 | ||||
-rw-r--r-- | include/datetime/snap.h | 14 |
5 files changed, 11 insertions, 20 deletions
diff --git a/include/datetime/dbus-shared.h b/include/datetime/dbus-shared.h index 4b71ce5..db10c1d 100644 --- a/include/datetime/dbus-shared.h +++ b/include/datetime/dbus-shared.h @@ -18,18 +18,10 @@ * Charles Kerr <charles.kerr@canonical.com> */ -#ifndef _DBUS_SHARED_H_ -#define _DBUS_SHARED_H_ +#ifndef _INDICATOR_DATETIME_DBUS_SHARED_H_ +#define _INDICATOR_DATETIME_DBUS_SHARED_H_ #define BUS_DATETIME_NAME "com.canonical.indicator.datetime" #define BUS_DATETIME_PATH "/com/canonical/indicator/datetime" -#define BUS_SCREEN_NAME "com.canonical.Unity.Screen" -#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" - -#endif /* _DBUS_SHARED_H_ */ +#endif /* _INDICATOR_DATETIME_DBUS_SHARED_H_ */ diff --git a/include/datetime/settings-live.h b/include/datetime/settings-live.h index 4db2d40..4850e69 100644 --- a/include/datetime/settings-live.h +++ b/include/datetime/settings-live.h @@ -58,6 +58,7 @@ private: void update_alarm_sound(); void update_alarm_volume(); void update_alarm_duration(); + void update_alarm_haptic(); GSettings* m_settings; diff --git a/include/datetime/settings-shared.h b/include/datetime/settings-shared.h index 23d2e1c..a211821 100644 --- a/include/datetime/settings-shared.h +++ b/include/datetime/settings-shared.h @@ -48,5 +48,6 @@ TimeFormatMode; #define SETTINGS_ALARM_SOUND_S "alarm-default-sound" #define SETTINGS_ALARM_VOLUME_S "alarm-default-volume" #define SETTINGS_ALARM_DURATION_S "alarm-duration-minutes" +#define SETTINGS_ALARM_HAPTIC_S "alarm-haptic-feedback" #endif // INDICATOR_DATETIME_SETTINGS_SHARED diff --git a/include/datetime/settings.h b/include/datetime/settings.h index e5f885e..c6fe13b 100644 --- a/include/datetime/settings.h +++ b/include/datetime/settings.h @@ -57,6 +57,7 @@ public: core::Property<TimeFormatMode> time_format_mode; core::Property<std::string> timezone_name; core::Property<std::string> alarm_sound; + core::Property<std::string> alarm_haptic; core::Property<unsigned int> alarm_volume; core::Property<unsigned int> alarm_duration; }; diff --git a/include/datetime/snap.h b/include/datetime/snap.h index 1c90496..ef5c868 100644 --- a/include/datetime/snap.h +++ b/include/datetime/snap.h @@ -21,12 +21,12 @@ #define INDICATOR_DATETIME_SNAP_H #include <datetime/appointment.h> -#include <datetime/clock.h> #include <datetime/settings.h> +#include <notifications/notifications.h> + #include <functional> #include <memory> -#include <set> namespace unity { namespace indicator { @@ -38,7 +38,7 @@ namespace datetime { class Snap { public: - Snap(const std::shared_ptr<Clock>& clock, + Snap(const std::shared_ptr<unity::indicator::notifications::Engine>& engine, const std::shared_ptr<const Settings>& settings); virtual ~Snap(); @@ -48,12 +48,8 @@ public: appointment_func dismiss); private: - const std::shared_ptr<Clock> m_clock; - const std::shared_ptr<const Settings> m_settings; - - class Popup; - friend class Popup; - std::set<Popup*> m_pending; + class Impl; + std::unique_ptr<Impl> impl; }; } // namespace datetime |