blob: 7c24cdc814712c3064db4ef136f641c380dbc27b [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,
22 const EntryRefPtr &entry,
Chris Masonea82b7112011-05-25 15:16:29 -070023 const std::string& name);
Paul Stewartf1ce5d22011-05-19 13:10:20 -070024 ~EthernetService();
25 void Connect();
26 void Disconnect();
Chris Masone3bd3c8c2011-06-13 08:20:26 -070027
28 protected:
29 virtual std::string CalculateState() { return "idle"; }
30
Paul Stewartf1ce5d22011-05-19 13:10:20 -070031 private:
Chris Masone95207da2011-06-29 16:50:49 -070032 std::string GetDeviceRpcId();
33
Chris Masone2b105542011-06-22 10:58:09 -070034 EthernetRefPtr ethernet_;
Chris Masone3bd3c8c2011-06-13 08:20:26 -070035 const std::string type_;
Paul Stewartf1ce5d22011-05-19 13:10:20 -070036 DISALLOW_COPY_AND_ASSIGN(EthernetService);
37};
38
39} // namespace shill
40
41#endif // SHILL_ETHERNET_SERVICE_