From 462e8e6d8e46475ea3222056f65ff40823e9e0bf Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sun, 9 Mar 2014 22:26:26 -0500 Subject: don't connect to EDS when running in the greeter. --- src/planner-eds.cpp | 67 ----------------------------------------------------- 1 file changed, 67 deletions(-) delete mode 100644 src/planner-eds.cpp (limited to 'src/planner-eds.cpp') diff --git a/src/planner-eds.cpp b/src/planner-eds.cpp deleted file mode 100644 index f3f28ee..0000000 --- a/src/planner-eds.cpp +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2013 Canonical Ltd. - * - * This program is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 3, as published - * by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranties of - * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - * - * Authors: - * Charles Kerr - */ - -#include -#include - -namespace unity { -namespace indicator { -namespace datetime { - -/*** -**** -***/ - -EdsPlanner::EdsPlanner(const std::shared_ptr& engine, - const std::shared_ptr& timezone): - m_engine(engine), - m_timezone(timezone) -{ - m_engine->changed().connect([this](){ - g_debug("EdsPlanner %p rebuilding soon because EdsEngine %p emitted 'changed' signal%p", this, m_engine.get()); - rebuild_soon(); - }); -} - -EdsPlanner::~EdsPlanner() =default; - -void EdsPlanner::rebuild_now() -{ - const auto& r = range().get(); - - auto on_appointments_fetched = [this](const std::vector& a){ - g_debug("EdsPlanner %p got %zu appointments", this, a.size()); - m_appointments.set(a); - }; - - m_engine->get_appointments(r.first, r.second, *m_timezone.get(), on_appointments_fetched); -} - -core::Property>& EdsPlanner::appointments() -{ - return m_appointments; -} - -/*** -**** -***/ - -} // namespace datetime -} // namespace indicator -} // namespace unity -- cgit v1.2.3