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 | |
| 5 | #ifndef SHILL_ETHERNET_SERVICE_ |
| 6 | #define SHILL_ETHERNET_SERVICE_ |
| 7 | |
| 8 | #include <base/basictypes.h> |
| 9 | |
Chris Masone | 2b10554 | 2011-06-22 10:58:09 -0700 | [diff] [blame] | 10 | #include "shill/refptr_types.h" |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 11 | #include "shill/shill_event.h" |
| 12 | #include "shill/service.h" |
| 13 | |
| 14 | namespace shill { |
| 15 | |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 16 | class EthernetService : public Service { |
| 17 | public: |
| 18 | EthernetService(ControlInterface *control_interface, |
| 19 | EventDispatcher *dispatcher, |
Chris Masone | 2b10554 | 2011-06-22 10:58:09 -0700 | [diff] [blame] | 20 | const EthernetRefPtr &device, |
Chris Masone | 7aa5f90 | 2011-07-11 11:13:35 -0700 | [diff] [blame^] | 21 | const ProfileRefPtr &profile, |
| 22 | const EntryRefPtr &entry, |
Chris Masone | a82b711 | 2011-05-25 15:16:29 -0700 | [diff] [blame] | 23 | const std::string& name); |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 24 | ~EthernetService(); |
| 25 | void Connect(); |
| 26 | void Disconnect(); |
Chris Masone | 3bd3c8c | 2011-06-13 08:20:26 -0700 | [diff] [blame] | 27 | |
| 28 | protected: |
| 29 | virtual std::string CalculateState() { return "idle"; } |
| 30 | |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 31 | private: |
Chris Masone | 95207da | 2011-06-29 16:50:49 -0700 | [diff] [blame] | 32 | std::string GetDeviceRpcId(); |
| 33 | |
Chris Masone | 2b10554 | 2011-06-22 10:58:09 -0700 | [diff] [blame] | 34 | EthernetRefPtr ethernet_; |
Chris Masone | 3bd3c8c | 2011-06-13 08:20:26 -0700 | [diff] [blame] | 35 | const std::string type_; |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 36 | DISALLOW_COPY_AND_ASSIGN(EthernetService); |
| 37 | }; |
| 38 | |
| 39 | } // namespace shill |
| 40 | |
| 41 | #endif // SHILL_ETHERNET_SERVICE_ |