blob: d61c91f5586a7134ca3ca61d25ee0b0230475e42 [file] [log] [blame]
Thieu Le3426c8f2012-01-11 17:35:11 -08001// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
Paul Stewartf1ce5d22011-05-19 13:10:20 -07002// 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
Paul Stewart26b327e2011-10-19 11:38:09 -070010#include "shill/event_dispatcher.h"
Chris Masone2b105542011-06-22 10:58:09 -070011#include "shill/refptr_types.h"
Paul Stewartf1ce5d22011-05-19 13:10:20 -070012#include "shill/service.h"
13
14namespace shill {
15
Chris Masone6791a432011-07-12 13:23:19 -070016class ControlInterface;
17class EventDispatcher;
18class Manager;
Thieu Le3426c8f2012-01-11 17:35:11 -080019class Metrics;
Chris Masone6791a432011-07-12 13:23:19 -070020
Paul Stewartf1ce5d22011-05-19 13:10:20 -070021class EthernetService : public Service {
22 public:
23 EthernetService(ControlInterface *control_interface,
24 EventDispatcher *dispatcher,
Thieu Le3426c8f2012-01-11 17:35:11 -080025 Metrics *metrics,
Chris Masone6791a432011-07-12 13:23:19 -070026 Manager *manager,
mukesh agrawal51a7e932011-07-27 16:18:26 -070027 const EthernetRefPtr &device);
Paul Stewartf1ce5d22011-05-19 13:10:20 -070028 ~EthernetService();
Darin Petkov4d6d9412011-08-24 13:19:54 -070029
30 // Inherited from Service.
Paul Stewart22aa71b2011-09-16 12:15:11 -070031 virtual bool TechnologyIs(const Technology::Identifier type) const;
Chris Masone3bd3c8c2011-06-13 08:20:26 -070032
Chris Masone34af2182011-08-22 11:59:36 -070033 // ethernet_<MAC>
Chris Masone6515aab2011-10-12 16:19:09 -070034 virtual std::string GetStorageIdentifier() const;
Chris Masone34af2182011-08-22 11:59:36 -070035
Paul Stewartf1ce5d22011-05-19 13:10:20 -070036 private:
Chris Masone34af2182011-08-22 11:59:36 -070037 static const char kServiceType[];
38
Gaurav Shah1b7a6162011-11-09 11:41:01 -080039 std::string GetDeviceRpcId(Error *error);
Chris Masone95207da2011-06-29 16:50:49 -070040
Chris Masone2b105542011-06-22 10:58:09 -070041 EthernetRefPtr ethernet_;
Paul Stewartf1ce5d22011-05-19 13:10:20 -070042 DISALLOW_COPY_AND_ASSIGN(EthernetService);
43};
44
45} // namespace shill
46
47#endif // SHILL_ETHERNET_SERVICE_