diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-01-30 13:06:33 -0600 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2014-01-30 13:06:33 -0600 |
commit | fee34f529e85e97cb439ea9fbbb210cffd51a6cf (patch) | |
tree | 7b0d070d1a7ebcdb1ab20d8f3c717e3d317bae69 /src/state-live.cpp | |
parent | cc2ad2ad457313cb87e4483bf0278f670a5a5cea (diff) | |
download | ayatana-indicator-datetime-fee34f529e85e97cb439ea9fbbb210cffd51a6cf.tar.gz ayatana-indicator-datetime-fee34f529e85e97cb439ea9fbbb210cffd51a6cf.tar.bz2 ayatana-indicator-datetime-fee34f529e85e97cb439ea9fbbb210cffd51a6cf.zip |
as per review, make explicit the dependency injection that was implicit in main()
Diffstat (limited to 'src/state-live.cpp')
-rw-r--r-- | src/state-live.cpp | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/src/state-live.cpp b/src/state-live.cpp deleted file mode 100644 index fe1e6cd..0000000 --- a/src/state-live.cpp +++ /dev/null @@ -1,56 +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 <http://www.gnu.org/licenses/>. - * - * Authors: - * Charles Kerr <charles.kerr@canonical.com> - */ - -#include <datetime/state-live.h> - -#include <datetime/clock.h> -#include <datetime/locations-settings.h> -#include <datetime/planner-eds.h> -#include <datetime/settings-live.h> -#include <datetime/state.h> -#include <datetime/timezones-live.h> - -namespace unity { -namespace indicator { -namespace datetime { - -/*** -**** -***/ - -LiveState::LiveState() -{ - std::shared_ptr<Settings> live_settings(new LiveSettings); - std::shared_ptr<Timezones> live_timezones(new LiveTimezones(live_settings, TIMEZONE_FILE)); - std::shared_ptr<Clock> live_clock(new LiveClock(live_timezones)); - - settings = live_settings; - clock = live_clock; - locations.reset(new SettingsLocations(live_settings, live_timezones)); - planner.reset(new PlannerEds); - planner->time = clock->localtime(); -} - -/*** -**** -***/ - -} // namespace datetime -} // namespace indicator -} // namespace unity |