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> |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 6 | #include <stdio.h> |
Chris Masone | ee929b7 | 2011-05-10 10:02:18 -0700 | [diff] [blame] | 7 | |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 8 | #include <string> |
| 9 | |
Chris Masone | ee929b7 | 2011-05-10 10:02:18 -0700 | [diff] [blame] | 10 | #include <base/logging.h> |
| 11 | |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 12 | #include "shill/control_interface.h" |
Chris Masone | c1e5041 | 2011-06-07 13:04:53 -0700 | [diff] [blame] | 13 | #include "shill/device_config_interface.h" |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 14 | #include "shill/service.h" |
Chris Masone | d7732e4 | 2011-05-20 11:08:56 -0700 | [diff] [blame] | 15 | #include "shill/service_dbus_adaptor.h" |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 16 | |
| 17 | using std::string; |
| 18 | |
| 19 | namespace shill { |
| 20 | Service::Service(ControlInterface *control_interface, |
Chris Masone | 9be4a9d | 2011-05-16 15:44:09 -0700 | [diff] [blame] | 21 | EventDispatcher */* dispatcher */, |
Chris Masone | c1e5041 | 2011-06-07 13:04:53 -0700 | [diff] [blame] | 22 | DeviceConfigInterfaceRefPtr config_interface, |
Chris Masone | a82b711 | 2011-05-25 15:16:29 -0700 | [diff] [blame] | 23 | const string& name) |
| 24 | : name_(name), |
| 25 | available_(false), |
| 26 | configured_(false), |
| 27 | auto_connect_(false), |
| 28 | configuration_(NULL), |
| 29 | connection_(NULL), |
Chris Masone | c1e5041 | 2011-06-07 13:04:53 -0700 | [diff] [blame] | 30 | config_interface_(config_interface), |
Chris Masone | a82b711 | 2011-05-25 15:16:29 -0700 | [diff] [blame] | 31 | adaptor_(control_interface->CreateServiceAdaptor(this)) { |
Chris Masone | de21bba | 2011-05-10 09:15:39 -0700 | [diff] [blame] | 32 | // Initialize Interface montior, so we can detect new interfaces |
Chris Masone | b07006b | 2011-05-14 16:10:04 -0700 | [diff] [blame] | 33 | VLOG(2) << "Service initialized."; |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 34 | } |
| 35 | |
Paul Stewart | ba41b99 | 2011-05-26 07:02:46 -0700 | [diff] [blame] | 36 | Service::~Service() {} |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 37 | |
| 38 | } // namespace shill |