Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 1 | // 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 Masone | 7d45a3c | 2011-05-09 10:31:06 -0700 | [diff] [blame] | 10 | #include <glog/logging.h> |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 11 | #include "shill/control_interface.h" |
| 12 | #include "shill/manager.h" |
| 13 | |
| 14 | using std::string; |
| 15 | |
| 16 | namespace shill { |
| 17 | Manager::Manager(ControlInterface *control_interface, |
| 18 | EventDispatcher */* dispatcher */) |
Chris Masone | 413a319 | 2011-05-09 17:10:05 -0700 | [diff] [blame^] | 19 | : adaptor_(control_interface->CreateManagerAdaptor(this)), |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 20 | running_(false) { |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 21 | } |
| 22 | |
| 23 | Manager::~Manager() { |
Chris Masone | 413a319 | 2011-05-09 17:10:05 -0700 | [diff] [blame^] | 24 | delete(adaptor_); |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 25 | } |
| 26 | |
| 27 | void Manager::Start() { |
| 28 | running_ = true; |
Chris Masone | 413a319 | 2011-05-09 17:10:05 -0700 | [diff] [blame^] | 29 | adaptor_->UpdateRunning(); |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 30 | } |
| 31 | |
| 32 | void Manager::Stop() { |
| 33 | running_ = false; |
Chris Masone | 413a319 | 2011-05-09 17:10:05 -0700 | [diff] [blame^] | 34 | adaptor_->UpdateRunning(); |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 35 | } |
| 36 | |
| 37 | } // namespace shill |