blob: bbfbded4dfcba43a54b7a5f1d3f2867ed68a466b [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
5#ifndef SHILL_NICE_MOCK_CONTROL_
6#define SHILL_NICE_MOCK_CONTROL_
7
8#include <base/basictypes.h>
9
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();
18 virtual ~NiceMockControl();
19
20 // Each of these can be called once. Ownership of the appropriate
21 // interface pointer is given up upon call.
22 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);
mukesh agrawaldc42bb32011-07-28 10:40:26 -070027 virtual ServiceAdaptorInterface *CreateServiceAdaptor(Service *service);
28
29 private:
30 DISALLOW_COPY_AND_ASSIGN(NiceMockControl);
31};
32
33} // namespace shill
34
35#endif // SHILL_NICE_MOCK_CONTROL_