diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2015-03-31 18:54:04 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2015-03-31 18:54:04 -0500 |
commit | fff19d70649589b81a896e4deb032a7bd4bdca1e (patch) | |
tree | 3b1db77981d5561aaec31c308c69c6dbbf9ded68 /src/main.cpp | |
parent | 3c5eda144d9d83be1aef24afaa307999975ec617 (diff) | |
download | ayatana-indicator-datetime-fff19d70649589b81a896e4deb032a7bd4bdca1e.tar.gz ayatana-indicator-datetime-fff19d70649589b81a896e4deb032a7bd4bdca1e.tar.bz2 ayatana-indicator-datetime-fff19d70649589b81a896e4deb032a7bd4bdca1e.zip |
add an Alarm class to represent ical valarm components; change the Appointment class to hold an arbitrary number of Alarms.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp index 9aa502c..38e5caa 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -138,11 +138,13 @@ main(int /*argc*/, char** /*argv*/) auto notification_engine = std::make_shared<uin::Engine>("indicator-datetime-service"); std::unique_ptr<Snap> snap (new Snap(notification_engine, state->settings)); auto alarm_queue = create_simple_alarm_queue(state->clock, snooze_planner, engine, timezone_); - auto on_snooze = [snooze_planner](const Appointment& a) {snooze_planner->add(a);}; - auto on_ok = [](const Appointment&){}; - auto on_alarm_reached = [&engine, &snap, &on_snooze, &on_ok](const Appointment& a) { - (*snap)(a, on_snooze, on_ok); - engine->disable_ubuntu_alarm(a); + auto on_snooze = [snooze_planner](const Appointment& appointment, const Alarm&) {snooze_planner->add(appointment);}; + auto on_ok = [](const Appointment&, const Alarm&){}; + auto on_alarm_reached = [&engine, &snap, &on_snooze, &on_ok](const Appointment& appointment) { +#warning placeholder; next step is to have AlarmQueue pass an appointment and alarm + Alarm alarm; + (*snap)(appointment, alarm, on_snooze, on_ok); + engine->disable_ubuntu_alarm(appointment); }; alarm_queue->alarm_reached().connect(on_alarm_reached); |