blob: 3be0a18ac28f873250206d8360c2963a829a9f6a [file] [log] [blame]
Paul Stewartf1ce5d22011-05-19 13:10:20 -07001// 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
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;
19
Paul Stewartf1ce5d22011-05-19 13:10:20 -070020class EthernetService : public Service {
21 public:
22 EthernetService(ControlInterface *control_interface,
23 EventDispatcher *dispatcher,
Chris Masone6791a432011-07-12 13:23:19 -070024 Manager *manager,
mukesh agrawal51a7e932011-07-27 16:18:26 -070025 const EthernetRefPtr &device);
Paul Stewartf1ce5d22011-05-19 13:10:20 -070026 ~EthernetService();
Darin Petkov4d6d9412011-08-24 13:19:54 -070027
28 // Inherited from Service.
29 virtual void Connect(Error *error);
30 virtual void Disconnect();
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 Masone9d779932011-08-25 16:33:41 -070034 virtual std::string GetStorageIdentifier();
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
Chris Masone95207da2011-06-29 16:50:49 -070039 std::string GetDeviceRpcId();
40
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_