blob: 2cf9346d59596c21dc6419281524ca37cf212069 [file] [log] [blame]
Paul Stewart75897df2011-04-27 09:05:53 -07001// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include <time.h>
6
7#include <stdio.h>
8#include <string>
9
Chris Masone7d45a3c2011-05-09 10:31:06 -070010#include <glog/logging.h>
Paul Stewart75897df2011-04-27 09:05:53 -070011#include "shill/control_interface.h"
12#include "shill/manager.h"
13
14using std::string;
15
16namespace shill {
17Manager::Manager(ControlInterface *control_interface,
18 EventDispatcher */* dispatcher */)
Chris Masone413a3192011-05-09 17:10:05 -070019 : adaptor_(control_interface->CreateManagerAdaptor(this)),
Paul Stewart75897df2011-04-27 09:05:53 -070020 running_(false) {
Paul Stewart75897df2011-04-27 09:05:53 -070021}
22
23Manager::~Manager() {
Chris Masone413a3192011-05-09 17:10:05 -070024 delete(adaptor_);
Paul Stewart75897df2011-04-27 09:05:53 -070025}
26
27void Manager::Start() {
28 running_ = true;
Chris Masone413a3192011-05-09 17:10:05 -070029 adaptor_->UpdateRunning();
Paul Stewart75897df2011-04-27 09:05:53 -070030}
31
32void Manager::Stop() {
33 running_ = false;
Chris Masone413a3192011-05-09 17:10:05 -070034 adaptor_->UpdateRunning();
Paul Stewart75897df2011-04-27 09:05:53 -070035}
36
37} // namespace shill