Darin Petkov | a9b1fed | 2012-02-29 11:49:05 +0100 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium OS Authors. All rights reserved. |
mukesh agrawal | dc42bb3 | 2011-07-28 10:40:26 -0700 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
Ben Chan | c45688b | 2014-07-02 23:50:45 -0700 | [diff] [blame] | 5 | #ifndef SHILL_NICE_MOCK_CONTROL_H_ |
| 6 | #define SHILL_NICE_MOCK_CONTROL_H_ |
mukesh agrawal | dc42bb3 | 2011-07-28 10:40:26 -0700 | [diff] [blame] | 7 | |
Ben Chan | cc67c52 | 2014-09-03 07:19:18 -0700 | [diff] [blame] | 8 | #include <base/macros.h> |
mukesh agrawal | dc42bb3 | 2011-07-28 10:40:26 -0700 | [diff] [blame] | 9 | |
| 10 | #include "shill/control_interface.h" |
| 11 | |
| 12 | namespace shill { |
| 13 | // An implementation of the Shill RPC-channel-interface-factory interface that |
| 14 | // returns nice mocks. |
| 15 | class NiceMockControl : public ControlInterface { |
| 16 | public: |
| 17 | NiceMockControl(); |
Ben Chan | 5ea763b | 2014-08-13 11:07:54 -0700 | [diff] [blame] | 18 | ~NiceMockControl() override; |
mukesh agrawal | dc42bb3 | 2011-07-28 10:40:26 -0700 | [diff] [blame] | 19 | |
| 20 | // Each of these can be called once. Ownership of the appropriate |
| 21 | // interface pointer is given up upon call. |
Yunlian Jiang | 6acd966 | 2015-01-30 08:36:10 -0800 | [diff] [blame] | 22 | DeviceAdaptorInterface *CreateDeviceAdaptor(Device *device) override; |
| 23 | IPConfigAdaptorInterface *CreateIPConfigAdaptor(IPConfig *config) override; |
| 24 | ManagerAdaptorInterface *CreateManagerAdaptor(Manager *manager) override; |
| 25 | ProfileAdaptorInterface *CreateProfileAdaptor(Profile *profile) override; |
| 26 | RPCTaskAdaptorInterface *CreateRPCTaskAdaptor(RPCTask *task) override; |
| 27 | ServiceAdaptorInterface *CreateServiceAdaptor(Service *service) override; |
Prabhu Kaliamoorthi | 127b341 | 2014-10-16 13:00:25 +0200 | [diff] [blame] | 28 | #ifndef DISABLE_VPN |
Yunlian Jiang | 6acd966 | 2015-01-30 08:36:10 -0800 | [diff] [blame] | 29 | ThirdPartyVpnAdaptorInterface *CreateThirdPartyVpnAdaptor( |
| 30 | ThirdPartyVpnDriver *driver) override; |
Prabhu Kaliamoorthi | 127b341 | 2014-10-16 13:00:25 +0200 | [diff] [blame] | 31 | #endif |
mukesh agrawal | dc42bb3 | 2011-07-28 10:40:26 -0700 | [diff] [blame] | 32 | |
| 33 | private: |
| 34 | DISALLOW_COPY_AND_ASSIGN(NiceMockControl); |
| 35 | }; |
| 36 | |
| 37 | } // namespace shill |
| 38 | |
Ben Chan | c45688b | 2014-07-02 23:50:45 -0700 | [diff] [blame] | 39 | #endif // SHILL_NICE_MOCK_CONTROL_H_ |