blob: 114ea820c3f2a4bc0de6dcb74a262d4256fbdd09 [file] [log] [blame]
Darin Petkova9b1fed2012-02-29 11:49:05 +01001// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
mukesh agrawaldc42bb32011-07-28 10:40:26 -07002// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Ben Chanc45688b2014-07-02 23:50:45 -07005#ifndef SHILL_NICE_MOCK_CONTROL_H_
6#define SHILL_NICE_MOCK_CONTROL_H_
mukesh agrawaldc42bb32011-07-28 10:40:26 -07007
Ben Chancc67c522014-09-03 07:19:18 -07008#include <base/macros.h>
mukesh agrawaldc42bb32011-07-28 10:40:26 -07009
10#include "shill/control_interface.h"
11
12namespace shill {
13// An implementation of the Shill RPC-channel-interface-factory interface that
14// returns nice mocks.
15class NiceMockControl : public ControlInterface {
16 public:
17 NiceMockControl();
Ben Chan5ea763b2014-08-13 11:07:54 -070018 ~NiceMockControl() override;
mukesh agrawaldc42bb32011-07-28 10:40:26 -070019
20 // Each of these can be called once. Ownership of the appropriate
21 // interface pointer is given up upon call.
Paul Stewart1a212a62015-06-16 13:13:10 -070022 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 Kaliamoorthi127b3412014-10-16 13:00:25 +020028#ifndef DISABLE_VPN
Paul Stewart1a212a62015-06-16 13:13:10 -070029 ThirdPartyVpnAdaptorInterface* CreateThirdPartyVpnAdaptor(
30 ThirdPartyVpnDriver* driver) override;
Prabhu Kaliamoorthi127b3412014-10-16 13:00:25 +020031#endif
mukesh agrawaldc42bb32011-07-28 10:40:26 -070032
33 private:
34 DISALLOW_COPY_AND_ASSIGN(NiceMockControl);
35};
36
37} // namespace shill
38
Ben Chanc45688b2014-07-02 23:50:45 -070039#endif // SHILL_NICE_MOCK_CONTROL_H_