blob: 0424e289670255d61aaf2b9ff408f2bb685bf8f3 [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
10#include "shill/shill_logging.h"
11#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 */)
19 : proxy_(control_interface->CreateManagerProxy(this)),
20 running_(false) {
21 // Initialize Interface montior, so we can detect new interfaces
22 SHILL_LOG(INFO, SHILL_LOG_MANAGER) << "Manager initialized.";
23}
24
25Manager::~Manager() {
26 delete(proxy_);
27}
28
29void Manager::Start() {
30 running_ = true;
31 proxy_->UpdateRunning();
32}
33
34void Manager::Stop() {
35 running_ = false;
36 proxy_->UpdateRunning();
37}
38
39} // namespace shill