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 | |
Chris Masone | 6791a43 | 2011-07-12 13:23:19 -0700 | [diff] [blame] | 16 | class ControlInterface; |
| 17 | class EventDispatcher; |
| 18 | class Manager; |
| 19 | |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 20 | class EthernetService : public Service { |
| 21 | public: |
| 22 | EthernetService(ControlInterface *control_interface, |
| 23 | EventDispatcher *dispatcher, |
Chris Masone | 6791a43 | 2011-07-12 13:23:19 -0700 | [diff] [blame] | 24 | Manager *manager, |
mukesh agrawal | 51a7e93 | 2011-07-27 16:18:26 -0700 | [diff] [blame] | 25 | const EthernetRefPtr &device); |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 26 | ~EthernetService(); |
| 27 | void Connect(); |
| 28 | void Disconnect(); |
Chris Masone | 3bd3c8c | 2011-06-13 08:20:26 -0700 | [diff] [blame] | 29 | |
| 30 | protected: |
| 31 | virtual std::string CalculateState() { return "idle"; } |
| 32 | |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 33 | private: |
Chris Masone | 95207da | 2011-06-29 16:50:49 -0700 | [diff] [blame] | 34 | std::string GetDeviceRpcId(); |
| 35 | |
Chris Masone | 2b10554 | 2011-06-22 10:58:09 -0700 | [diff] [blame] | 36 | EthernetRefPtr ethernet_; |
Chris Masone | 3bd3c8c | 2011-06-13 08:20:26 -0700 | [diff] [blame] | 37 | const std::string type_; |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 38 | DISALLOW_COPY_AND_ASSIGN(EthernetService); |
| 39 | }; |
| 40 | |
| 41 | } // namespace shill |
| 42 | |
| 43 | #endif // SHILL_ETHERNET_SERVICE_ |