diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-09-01 07:33:29 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-09-01 07:33:29 +0200 |
commit | f7c5127a29e29b79e5e90b548bde383f6d703bbc (patch) | |
tree | 7642705dff20a66913e2ff972fd1de8ff94783eb | |
parent | 9d95a062904cf8f421680d844ea656316c3c9a74 (diff) | |
parent | 87e47ca0ae6b0ec8281937cd62381e01cb8a2384 (diff) | |
download | ayatana-indicator-datetime-f7c5127a29e29b79e5e90b548bde383f6d703bbc.tar.gz ayatana-indicator-datetime-f7c5127a29e29b79e5e90b548bde383f6d703bbc.tar.bz2 ayatana-indicator-datetime-f7c5127a29e29b79e5e90b548bde383f6d703bbc.zip |
Merge branch 'tari01-pr/fix-build-error'
Attributes GH PR #52: https://github.com/AyatanaIndicators/ayatana-indicator-datetime/pull/52
-rw-r--r-- | CMakeLists.txt | 3 | ||||
-rw-r--r-- | debian/control | 1 | ||||
-rw-r--r-- | include/notifications/sound.h | 22 | ||||
-rw-r--r-- | src/main.cpp | 2 | ||||
-rw-r--r-- | src/snap.cpp | 1 |
5 files changed, 27 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 8e682ea..a4920c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,7 +67,8 @@ pkg_check_modules (SERVICE_DEPS REQUIRED libnotify>=0.7.6 properties-cpp>=0.0.1 libaccounts-glib>=1.18 - messaging-menu>=0.8.2) + messaging-menu>=0.8.2 + uuid>=2.25) include_directories (SYSTEM ${SERVICE_DEPS_INCLUDE_DIRS}) # lomiri-url-dispatcher diff --git a/debian/control b/debian/control index 3869040..4d2e066 100644 --- a/debian/control +++ b/debian/control @@ -20,6 +20,7 @@ Build-Depends: cmake, libproperties-cpp-dev, liblomiri-url-dispatcher-dev | hello, libmessaging-menu-dev, + uuid-dev, # for the test harness: libgtest-dev <!nocheck>, libdbustest1-dev <!nocheck>, diff --git a/include/notifications/sound.h b/include/notifications/sound.h index 8bd3e33..1bff0b0 100644 --- a/include/notifications/sound.h +++ b/include/notifications/sound.h @@ -53,6 +53,28 @@ private: **** ***/ +class SoundBuilder +{ +public: + SoundBuilder() =default; + virtual ~SoundBuilder() =default; + virtual std::shared_ptr<Sound> create(const std::string& role, const std::string& uri, unsigned int volume, bool loop) =0; +}; + +class DefaultSoundBuilder: public SoundBuilder +{ +public: + DefaultSoundBuilder() =default; + ~DefaultSoundBuilder() =default; + virtual std::shared_ptr<Sound> create(const std::string& role, const std::string& uri, unsigned int volume, bool loop) override { + return std::make_shared<Sound>(role, uri, volume, loop); + } +}; + +/*** +**** +***/ + } // namespace notifications } // namespace indicator } // namespace ayatana diff --git a/src/main.cpp b/src/main.cpp index 6cad190..255b62c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -151,7 +151,7 @@ main(int /*argc*/, char** /*argv*/) // set up the snap decisions auto snooze_planner = std::make_shared<SnoozePlanner>(state->settings, state->clock); auto notification_engine = std::make_shared<ain::Engine>("ayatana-indicator-datetime-service"); - auto sound_builder = std::make_shared<uin::DefaultSoundBuilder>(); + auto sound_builder = std::make_shared<ain::DefaultSoundBuilder>(); std::unique_ptr<Snap> snap (new Snap(notification_engine, sound_builder, state->settings, system_bus)); auto alarm_queue = create_simple_alarm_queue(state->clock, snooze_planner, engine, timezone_); auto on_response = [snooze_planner, actions](const Appointment& appointment, const Alarm& alarm, const Snap::Response& response) { diff --git a/src/snap.cpp b/src/snap.cpp index 00c4743..0ef6a94 100644 --- a/src/snap.cpp +++ b/src/snap.cpp @@ -300,6 +300,7 @@ private: } const std::shared_ptr<ayatana::indicator::notifications::Engine> m_engine; + const std::shared_ptr<ayatana::indicator::notifications::SoundBuilder> m_sound_builder; const std::shared_ptr<const Settings> m_settings; std::set<int> m_notifications; GCancellable * m_cancellable {nullptr}; |