From f84d3bdb7006eee351942a31d033ca0d62f3292a Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sun, 7 Dec 2014 20:52:50 -0600 Subject: disable one-time alarms after their notifications are shown. --- include/datetime/engine-eds.h | 5 +++-- include/datetime/engine-mock.h | 7 +++++-- include/datetime/engine.h | 1 + 3 files changed, 9 insertions(+), 4 deletions(-) (limited to 'include/datetime') diff --git a/include/datetime/engine-eds.h b/include/datetime/engine-eds.h index ebee838..7372f71 100644 --- a/include/datetime/engine-eds.h +++ b/include/datetime/engine-eds.h @@ -51,9 +51,10 @@ public: void get_appointments(const DateTime& begin, const DateTime& end, const Timezone& default_timezone, - std::function&)> appointment_func); + std::function&)> appointment_func) override; + void disable_ubuntu_alarm(const Appointment&) override; - core::Signal<>& changed(); + core::Signal<>& changed() override; private: class Impl; diff --git a/include/datetime/engine-mock.h b/include/datetime/engine-mock.h index 4b25120..9fb0442 100644 --- a/include/datetime/engine-mock.h +++ b/include/datetime/engine-mock.h @@ -44,14 +44,17 @@ public: void get_appointments(const DateTime& /*begin*/, const DateTime& /*end*/, const Timezone& /*default_timezone*/, - std::function&)> appointment_func) { + std::function&)> appointment_func) override { appointment_func(m_appointments); } - core::Signal<>& changed() { + core::Signal<>& changed() override { return m_changed; } + void disable_ubuntu_alarm(const Appointment&) override { + } + private: core::Signal<> m_changed; std::vector m_appointments; diff --git a/include/datetime/engine.h b/include/datetime/engine.h index 56e9343..59468d1 100644 --- a/include/datetime/engine.h +++ b/include/datetime/engine.h @@ -50,6 +50,7 @@ public: const DateTime& end, const Timezone& default_timezone, std::function&)> appointment_func) =0; + virtual void disable_ubuntu_alarm(const Appointment&) =0; virtual core::Signal<>& changed() =0; -- cgit v1.2.3