blob: c7467cc8e34093c231852ce74e793ee0214619e8 [file] [log] [blame]
Peter Qiuc0beca52015-09-03 11:25:46 -07001//
2// Copyright (C) 2012 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
Paul Stewartf1ce5d22011-05-19 13:10:20 -070016
Ben Chanc45688b2014-07-02 23:50:45 -070017#ifndef SHILL_DEVICE_STUB_H_
18#define SHILL_DEVICE_STUB_H_
Paul Stewartf1ce5d22011-05-19 13:10:20 -070019
20#include <base/memory/ref_counted.h>
Paul Stewartf1ce5d22011-05-19 13:10:20 -070021
Alex Vakulenko8a532292014-06-16 17:18:44 -070022#include <string>
Paul Stewartf1ce5d22011-05-19 13:10:20 -070023#include <vector>
24
25#include "shill/device.h"
Paul Stewart26b327e2011-10-19 11:38:09 -070026#include "shill/event_dispatcher.h"
Paul Stewartf1ce5d22011-05-19 13:10:20 -070027#include "shill/service.h"
Paul Stewartf1ce5d22011-05-19 13:10:20 -070028
29namespace shill {
30
31class ControlInterface;
32class DeviceAdaptorInterface;
33class EventDispatcher;
34class Endpoint;
35class DeviceInfo;
36class Manager;
Thieu Le3426c8f2012-01-11 17:35:11 -080037class Metrics;
Paul Stewartf1ce5d22011-05-19 13:10:20 -070038
39// Non-functional Device subclass used for non-operable or blacklisted devices
40class DeviceStub : public Device {
41 public:
Paul Stewarta794cd62015-06-16 13:13:10 -070042 DeviceStub(ControlInterface* control_interface,
43 EventDispatcher* dispatcher,
44 Metrics* metrics,
45 Manager* manager,
46 const std::string& link_name,
47 const std::string& address,
Paul Stewartf1ce5d22011-05-19 13:10:20 -070048 int interface_index,
Paul Stewartfdd16072011-09-16 12:41:35 -070049 Technology::Identifier technology)
Thieu Le3426c8f2012-01-11 17:35:11 -080050 : Device(control_interface, dispatcher, metrics, manager, link_name,
51 address, interface_index, technology) {}
Paul Stewarta794cd62015-06-16 13:13:10 -070052 void Start(Error* /*error*/,
53 const EnabledStateChangedCallback& /*callback*/) {}
54 void Stop(Error* /*error*/,
55 const EnabledStateChangedCallback& /*callback*/) {}
Paul Stewartf1ce5d22011-05-19 13:10:20 -070056
57 private:
Paul Stewartf1ce5d22011-05-19 13:10:20 -070058 DISALLOW_COPY_AND_ASSIGN(DeviceStub);
59};
60
61} // namespace shill
62
Ben Chanc45688b2014-07-02 23:50:45 -070063#endif // SHILL_DEVICE_STUB_H_