Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -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 | |
Darin Petkov | afa6fc4 | 2011-06-21 16:21:08 -0700 | [diff] [blame] | 5 | #include "shill/ethernet_service.h" |
| 6 | |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 7 | #include <time.h> |
| 8 | #include <stdio.h> |
| 9 | #include <netinet/ether.h> |
| 10 | #include <linux/if.h> |
| 11 | |
| 12 | #include <string> |
| 13 | |
| 14 | #include <base/logging.h> |
Chris Masone | 3bd3c8c | 2011-06-13 08:20:26 -0700 | [diff] [blame] | 15 | #include <chromeos/dbus/service_constants.h> |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 16 | |
| 17 | #include "shill/control_interface.h" |
| 18 | #include "shill/device.h" |
| 19 | #include "shill/device_info.h" |
Darin Petkov | afa6fc4 | 2011-06-21 16:21:08 -0700 | [diff] [blame] | 20 | #include "shill/ethernet.h" |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 21 | #include "shill/manager.h" |
| 22 | #include "shill/shill_event.h" |
| 23 | |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 24 | using std::string; |
| 25 | |
| 26 | namespace shill { |
Darin Petkov | afa6fc4 | 2011-06-21 16:21:08 -0700 | [diff] [blame] | 27 | |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 28 | EthernetService::EthernetService(ControlInterface *control_interface, |
| 29 | EventDispatcher *dispatcher, |
Chris Masone | 2b10554 | 2011-06-22 10:58:09 -0700 | [diff] [blame] | 30 | const EthernetRefPtr &device, |
Darin Petkov | afa6fc4 | 2011-06-21 16:21:08 -0700 | [diff] [blame] | 31 | const string &name) |
Chris Masone | 2b10554 | 2011-06-22 10:58:09 -0700 | [diff] [blame] | 32 | : Service(control_interface, dispatcher, name), |
Chris Masone | 3bd3c8c | 2011-06-13 08:20:26 -0700 | [diff] [blame] | 33 | ethernet_(device), |
| 34 | type_(flimflam::kTypeEthernet) { |
Darin Petkov | afa6fc4 | 2011-06-21 16:21:08 -0700 | [diff] [blame] | 35 | set_auto_connect(true); |
Chris Masone | 3bd3c8c | 2011-06-13 08:20:26 -0700 | [diff] [blame] | 36 | |
| 37 | RegisterConstString(flimflam::kTypeProperty, &type_); |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 38 | } |
| 39 | |
| 40 | EthernetService::~EthernetService() { } |
| 41 | |
| 42 | void EthernetService::Connect() { } |
| 43 | |
| 44 | void EthernetService::Disconnect() { } |
| 45 | |
Chris Masone | 95207da | 2011-06-29 16:50:49 -0700 | [diff] [blame^] | 46 | std::string EthernetService::GetDeviceRpcId() { |
| 47 | return ethernet_->GetRpcIdentifier(); |
| 48 | } |
| 49 | |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 50 | } // namespace shill |