diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2015-04-03 13:11:39 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2015-04-03 13:11:39 -0500 |
commit | 8c7daeeb87abd0be1b96169da18baf018c4859c9 (patch) | |
tree | dbcceb67a1cda0ef293394948f358f2b06063dd4 /src/main.cpp | |
parent | 6e4367c088eb9026f29295c650f8639e09423212 (diff) | |
download | ayatana-indicator-datetime-8c7daeeb87abd0be1b96169da18baf018c4859c9.tar.gz ayatana-indicator-datetime-8c7daeeb87abd0be1b96169da18baf018c4859c9.tar.bz2 ayatana-indicator-datetime-8c7daeeb87abd0be1b96169da18baf018c4859c9.zip |
add the new Alarm class as an argument to the alarm queue class
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp index 38e5caa..907d49f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -138,11 +138,11 @@ 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& appointment, const Alarm&) {snooze_planner->add(appointment);}; + auto on_snooze = [snooze_planner](const Appointment& appointment, const Alarm& alarm) { + snooze_planner->add(appointment, alarm); + }; 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; + auto on_alarm_reached = [&engine, &snap, &on_snooze, &on_ok](const Appointment& appointment, const Alarm& alarm) { (*snap)(appointment, alarm, on_snooze, on_ok); engine->disable_ubuntu_alarm(appointment); }; |