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(); |
Darin Petkov | 4d6d941 | 2011-08-24 13:19:54 -0700 | [diff] [blame] | 27 | |
| 28 | // Inherited from Service. |
| 29 | virtual void Connect(Error *error); |
| 30 | virtual void Disconnect(); |
Chris Masone | 3bd3c8c | 2011-06-13 08:20:26 -0700 | [diff] [blame] | 31 | |
Chris Masone | 34af218 | 2011-08-22 11:59:36 -0700 | [diff] [blame] | 32 | // ethernet_<MAC> |
Chris Masone | 9d77993 | 2011-08-25 16:33:41 -0700 | [diff] [blame] | 33 | virtual std::string GetStorageIdentifier(); |
Chris Masone | 34af218 | 2011-08-22 11:59:36 -0700 | [diff] [blame] | 34 | |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 35 | private: |
Chris Masone | 34af218 | 2011-08-22 11:59:36 -0700 | [diff] [blame] | 36 | static const char kServiceType[]; |
| 37 | |
Chris Masone | 95207da | 2011-06-29 16:50:49 -0700 | [diff] [blame] | 38 | std::string GetDeviceRpcId(); |
| 39 | |
Chris Masone | 2b10554 | 2011-06-22 10:58:09 -0700 | [diff] [blame] | 40 | EthernetRefPtr ethernet_; |
Paul Stewart | f1ce5d2 | 2011-05-19 13:10:20 -0700 | [diff] [blame] | 41 | DISALLOW_COPY_AND_ASSIGN(EthernetService); |
| 42 | }; |
| 43 | |
| 44 | } // namespace shill |
| 45 | |
| 46 | #endif // SHILL_ETHERNET_SERVICE_ |