blob: d351301a1065b13fec126cc2b687bd7a7671d506 [file] [log] [blame]
Darin Petkova9b1fed2012-02-29 11:49:05 +01001// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
Chris Masoned7732e42011-05-20 11:08:56 -07002// 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_MOCK_CONTROL_
6#define SHILL_MOCK_CONTROL_
7
Darin Petkove0a312e2011-07-20 13:45:28 -07008#include <base/basictypes.h>
Chris Masone95207da2011-06-29 16:50:49 -07009
Chris Masoned7732e42011-05-20 11:08:56 -070010#include "shill/control_interface.h"
11
12namespace shill {
Chris Masone95207da2011-06-29 16:50:49 -070013// An implementation of the Shill RPC-channel-interface-factory interface that
14// returns mocks.
Chris Masoned7732e42011-05-20 11:08:56 -070015class MockControl : public ControlInterface {
16 public:
Chris Masone95207da2011-06-29 16:50:49 -070017 MockControl();
18 virtual ~MockControl();
19
20 // Each of these can be called once. Ownership of the appropriate
21 // interface pointer is given up upon call.
Chris Masonec6c6c132011-06-30 11:29:52 -070022 virtual DeviceAdaptorInterface *CreateDeviceAdaptor(Device *device);
23 virtual IPConfigAdaptorInterface *CreateIPConfigAdaptor(IPConfig *config);
24 virtual ManagerAdaptorInterface *CreateManagerAdaptor(Manager *manager);
25 virtual ProfileAdaptorInterface *CreateProfileAdaptor(Profile *profile);
Darin Petkova9b1fed2012-02-29 11:49:05 +010026 virtual RPCTaskAdaptorInterface *CreateRPCTaskAdaptor(RPCTask *task);
Chris Masonec6c6c132011-06-30 11:29:52 -070027 virtual ServiceAdaptorInterface *CreateServiceAdaptor(Service *service);
Chris Masone95207da2011-06-29 16:50:49 -070028
29 private:
30 DISALLOW_COPY_AND_ASSIGN(MockControl);
Chris Masoned7732e42011-05-20 11:08:56 -070031};
32
33} // namespace shill
34
35#endif // SHILL_MOCK_CONTROL_