aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/alarm-queue.cpp (renamed from src/clock-watcher.cpp)14
-rw-r--r--src/main.cpp6
3 files changed, 11 insertions, 11 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9bc22f2..6b65ebc 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -10,10 +10,10 @@ add_definitions (-DTIMEZONE_FILE="/etc/timezone"
add_library (${SERVICE_LIB} STATIC
actions.cpp
actions-live.cpp
+ alarm-queue.cpp
appointment.cpp
clock.cpp
clock-live.cpp
- clock-watcher.cpp
date-time.cpp
engine-eds.cpp
exporter.cpp
diff --git a/src/clock-watcher.cpp b/src/alarm-queue.cpp
index 5da66c8..9e9da7f 100644
--- a/src/clock-watcher.cpp
+++ b/src/alarm-queue.cpp
@@ -17,7 +17,7 @@
* Charles Kerr <charles.kerr@canonical.com>
*/
-#include <datetime/clock-watcher.h>
+#include <datetime/alarm-queue.h>
namespace unity {
namespace indicator {
@@ -27,36 +27,36 @@ namespace datetime {
****
***/
-ClockWatcherImpl::ClockWatcherImpl(const std::shared_ptr<Clock>& clock,
+AlarmQueueImpl::AlarmQueueImpl(const std::shared_ptr<Clock>& clock,
const std::shared_ptr<UpcomingPlanner>& upcoming_planner):
m_clock(clock),
m_upcoming_planner(upcoming_planner)
{
m_clock->date_changed.connect([this](){
const auto now = m_clock->localtime();
- g_debug("ClockWatcher %p refretching appointments due to date change: %s", this, now.format("%F %T").c_str());
+ g_debug("AlarmQueue %p refretching appointments due to date change: %s", this, now.format("%F %T").c_str());
m_upcoming_planner->date().set(now);
});
m_clock->minute_changed.connect([this](){
- g_debug("ClockWatcher %p calling pulse() due to clock minute_changed", this);
+ g_debug("AlarmQueue %p calling pulse() due to clock minute_changed", this);
pulse();
});
m_upcoming_planner->appointments().changed().connect([this](const std::vector<Appointment>&){
- g_debug("ClockWatcher %p calling pulse() due to appointments changed", this);
+ g_debug("AlarmQueue %p calling pulse() due to appointments changed", this);
pulse();
});
pulse();
}
-core::Signal<const Appointment&>& ClockWatcherImpl::alarm_reached()
+core::Signal<const Appointment&>& AlarmQueueImpl::alarm_reached()
{
return m_alarm_reached;
}
-void ClockWatcherImpl::pulse()
+void AlarmQueueImpl::pulse()
{
const auto now = m_clock->localtime();
diff --git a/src/main.cpp b/src/main.cpp
index c7b35e5..238bd02 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -18,8 +18,8 @@
*/
#include <datetime/actions-live.h>
+#include <datetime/alarm-queue.h>
#include <datetime/clock.h>
-#include <datetime/clock-watcher.h>
#include <datetime/engine-mock.h>
#include <datetime/engine-eds.h>
#include <datetime/exporter.h>
@@ -80,9 +80,9 @@ main(int /*argc*/, char** /*argv*/)
// snap decisions
std::shared_ptr<UpcomingPlanner> upcoming_planner(new UpcomingPlanner(std::shared_ptr<RangePlanner>(new SimpleRangePlanner(engine, file_timezone)), now));
- ClockWatcherImpl clock_watcher(live_clock, upcoming_planner);
+ AlarmQueueImpl alarm_queue(live_clock, upcoming_planner);
Snap snap;
- clock_watcher.alarm_reached().connect([&snap](const Appointment& appt){
+ alarm_queue.alarm_reached().connect([&snap](const Appointment& appt){
auto snap_show = [](const Appointment& a){
const char* url;
if(!a.url.empty())