blob: b7f6f107b683d96443b95817cd8309d66aac3d6b [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,
Paul Stewartfdd16072011-09-16 12:41:35 -070035 Technology::Identifier 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() {}
Paul Stewartfdd16072011-09-16 12:41:35 -070041 bool TechnologyIs(const Technology::Identifier type) const {
42 return type == technology_;
43 }
Paul Stewartf1ce5d22011-05-19 13:10:20 -070044
45 private:
Paul Stewartfdd16072011-09-16 12:41:35 -070046 Technology::Identifier technology_;
Darin Petkov6f9eaa32011-08-09 15:26:44 -070047
Paul Stewartf1ce5d22011-05-19 13:10:20 -070048 DISALLOW_COPY_AND_ASSIGN(DeviceStub);
49};
50
51} // namespace shill
52
53#endif // SHILL_STUB_DEVICE_