From 35850dcd7c95e08b86052d5ac72ca23d00b5180f Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Mon, 3 Feb 2014 00:32:03 -0600 Subject: from alarm dev branch: snap decision handler --- src/main.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 1534777..3c17923 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -21,11 +21,13 @@ #include #include +#include #include #include #include #include #include +#include #include #include @@ -67,6 +69,13 @@ main(int /*argc*/, char** /*argv*/) std::shared_ptr actions(new LiveActions(state)); MenuFactory factory(actions, state); + // snap decisions + ClockWatcherImpl clock_watcher(state); + Snap snap(state->clock); + clock_watcher.alarm_reached().connect([&snap](const Appointment& appt){ + snap(appt); + }); + // create the menus std::vector> menus; for(int i=0, n=Menu::NUM_PROFILES; i