blob: 477509791a4cb2b7e102085f1c83528e758e7b67 [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_STUB_DEVICE_
6#define SHILL_STUB_DEVICE_
7
8#include <base/memory/ref_counted.h>
9#include <base/memory/scoped_ptr.h>
10
11#include <vector>
12
13#include "shill/device.h"
14#include "shill/service.h"
15#include "shill/shill_event.h"
16
17namespace shill {
18
19class ControlInterface;
20class DeviceAdaptorInterface;
21class EventDispatcher;
22class Endpoint;
23class DeviceInfo;
24class Manager;
25
26// Non-functional Device subclass used for non-operable or blacklisted devices
27class DeviceStub : public Device {
28 public:
29 DeviceStub(ControlInterface *control_interface,
30 EventDispatcher *dispatcher,
31 Manager *manager,
Chris Masone626719f2011-08-18 16:58:48 -070032 const std::string &link_name,
33 const std::string &address,
Paul Stewartf1ce5d22011-05-19 13:10:20 -070034 int interface_index,
35 Technology technology)
Chris Masone626719f2011-08-18 16:58:48 -070036 : Device(control_interface, dispatcher, manager, link_name, address,
Paul Stewartf1ce5d22011-05-19 13:10:20 -070037 interface_index),
38 technology_(technology) {}
39 void Start() {}
40 void Stop() {}
Darin Petkov6f9eaa32011-08-09 15:26:44 -070041 bool TechnologyIs(const Technology type) const { return type == technology_; }
Paul Stewartf1ce5d22011-05-19 13:10:20 -070042
43 private:
44 Technology technology_;
Darin Petkov6f9eaa32011-08-09 15:26:44 -070045
Paul Stewartf1ce5d22011-05-19 13:10:20 -070046 DISALLOW_COPY_AND_ASSIGN(DeviceStub);
47};
48
49} // namespace shill
50
51#endif // SHILL_STUB_DEVICE_