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" |
Chris Masone | 7aa5f90 | 2011-07-11 11:13:35 -0700 | [diff] [blame] | 22 | #include "shill/profile.h" |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 23 | #include "shill/shill_event.h" |
| 24 | |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 25 | using std::string; |
| 26 | |
| 27 | namespace shill { |
Darin Petkov | afa6fc4 | 2011-06-21 16:21:08 -0700 | [diff] [blame] | 28 | |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 29 | EthernetService::EthernetService(ControlInterface *control_interface, |
| 30 | EventDispatcher *dispatcher, |
Chris Masone | 6791a43 | 2011-07-12 13:23:19 -0700 | [diff] [blame] | 31 | Manager *manager, |
mukesh agrawal | 51a7e93 | 2011-07-27 16:18:26 -0700 | [diff] [blame] | 32 | const EthernetRefPtr &device) |
| 33 | : Service(control_interface, dispatcher, manager), |
Chris Masone | 3bd3c8c | 2011-06-13 08:20:26 -0700 | [diff] [blame] | 34 | ethernet_(device), |
| 35 | type_(flimflam::kTypeEthernet) { |
Darin Petkov | afa6fc4 | 2011-06-21 16:21:08 -0700 | [diff] [blame] | 36 | set_auto_connect(true); |
Chris Masone | 3bd3c8c | 2011-06-13 08:20:26 -0700 | [diff] [blame] | 37 | |
Chris Masone | 27c4aa5 | 2011-07-02 13:10:14 -0700 | [diff] [blame] | 38 | store_.RegisterConstString(flimflam::kTypeProperty, &type_); |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 39 | } |
| 40 | |
| 41 | EthernetService::~EthernetService() { } |
| 42 | |
| 43 | void EthernetService::Connect() { } |
| 44 | |
| 45 | void EthernetService::Disconnect() { } |
| 46 | |
Chris Masone | 95207da | 2011-06-29 16:50:49 -0700 | [diff] [blame] | 47 | std::string EthernetService::GetDeviceRpcId() { |
| 48 | return ethernet_->GetRpcIdentifier(); |
| 49 | } |
| 50 | |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 51 | } // namespace shill |