blob: 4d9a3cb4fd39e9ca298345f0d5ca3fcd464cf9f8 [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
Chris Masone2b105542011-06-22 10:58:09 -070010#include "shill/refptr_types.h"
Paul Stewartf1ce5d22011-05-19 13:10:20 -070011#include "shill/shill_event.h"
12#include "shill/service.h"
13
14namespace shill {
15
Paul Stewartf1ce5d22011-05-19 13:10:20 -070016class EthernetService : public Service {
17 public:
18 EthernetService(ControlInterface *control_interface,
19 EventDispatcher *dispatcher,
Chris Masone2b105542011-06-22 10:58:09 -070020 const EthernetRefPtr &device,
Chris Masone7aa5f902011-07-11 11:13:35 -070021 const ProfileRefPtr &profile,
Chris Masonea82b7112011-05-25 15:16:29 -070022 const std::string& name);
Paul Stewartf1ce5d22011-05-19 13:10:20 -070023 ~EthernetService();
24 void Connect();
25 void Disconnect();
Chris Masone3bd3c8c2011-06-13 08:20:26 -070026
27 protected:
28 virtual std::string CalculateState() { return "idle"; }
29
Paul Stewartf1ce5d22011-05-19 13:10:20 -070030 private:
Chris Masone95207da2011-06-29 16:50:49 -070031 std::string GetDeviceRpcId();
32
Chris Masone2b105542011-06-22 10:58:09 -070033 EthernetRefPtr ethernet_;
Chris Masone3bd3c8c2011-06-13 08:20:26 -070034 const std::string type_;
Paul Stewartf1ce5d22011-05-19 13:10:20 -070035 DISALLOW_COPY_AND_ASSIGN(EthernetService);
36};
37
38} // namespace shill
39
40#endif // SHILL_ETHERNET_SERVICE_