blob: 8d3ab28b01f82c6a64665677fd1368343893f4eb [file] [log] [blame]
Thieu Le3426c8f2012-01-11 17:35:11 -08001// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
Chris Masone626719f2011-08-18 16:58:48 -07002// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Wade Guthrie60a37062013-04-02 11:39:09 -07005#ifndef SHILL_MOCK_MANAGER_H_
6#define SHILL_MOCK_MANAGER_H_
Chris Masone626719f2011-08-18 16:58:48 -07007
Darin Petkovef34f182011-08-26 14:14:40 -07008#include <base/basictypes.h>
Chris Masone626719f2011-08-18 16:58:48 -07009#include <gmock/gmock.h>
10
11#include "shill/manager.h"
12
13namespace shill {
14
Chris Masone626719f2011-08-18 16:58:48 -070015class MockManager : public Manager {
16 public:
17 MockManager(ControlInterface *control_interface,
18 EventDispatcher *dispatcher,
Thieu Le3426c8f2012-01-11 17:35:11 -080019 Metrics *metrics,
Darin Petkovef34f182011-08-26 14:14:40 -070020 GLib *glib);
21 virtual ~MockManager();
Chris Masone626719f2011-08-18 16:58:48 -070022
Darin Petkovf7ef50a2012-04-16 20:54:31 +020023 MOCK_METHOD0(device_info, DeviceInfo *());
Paul Stewart8c116a92012-05-02 18:30:03 -070024 MOCK_METHOD0(modem_info, ModemInfo *());
Paul Stewart35eff132013-04-12 12:08:40 -070025 MOCK_CONST_METHOD0(ethernet_eap_provider, EthernetEapProvider *());
Darin Petkove4b27022012-05-16 13:28:50 +020026 MOCK_METHOD0(wimax_provider, WiMaxProvider *());
Darin Petkovf7ef50a2012-04-16 20:54:31 +020027 MOCK_METHOD0(mutable_store, PropertyStore *());
28 MOCK_CONST_METHOD0(store, const PropertyStore &());
Albert Chaulk0e1cdea2013-02-27 15:32:55 -080029 MOCK_CONST_METHOD0(run_path, const base::FilePath &());
Thieu Lefb46caf2012-03-08 11:57:15 -080030 MOCK_METHOD0(Start, void());
Thieu Le6c1e3bb2013-02-06 15:20:35 -080031 MOCK_METHOD0(Stop, void());
Paul Stewart8c116a92012-05-02 18:30:03 -070032 MOCK_METHOD1(RegisterDevice, void(const DeviceRefPtr &to_manage));
33 MOCK_METHOD1(DeregisterDevice, void(const DeviceRefPtr &to_forget));
mukesh agrawal4eb4d782011-12-05 17:34:37 +000034 MOCK_METHOD1(HasService, bool(const ServiceRefPtr &to_manage));
mukesh agrawal32399322011-09-01 10:53:43 -070035 MOCK_METHOD1(RegisterService, void(const ServiceRefPtr &to_manage));
mukesh agrawal00917ce2011-11-22 23:56:55 +000036 MOCK_METHOD1(UpdateService, void(const ServiceRefPtr &to_update));
Chris Masone6515aab2011-10-12 16:19:09 -070037 MOCK_METHOD1(DeregisterService, void(const ServiceRefPtr &to_forget));
Darin Petkova5e07ef2012-07-09 14:27:57 +020038 MOCK_METHOD1(RegisterDefaultServiceCallback,
39 int(const ServiceCallback &callback));
40 MOCK_METHOD1(DeregisterDefaultServiceCallback, void(int tag));
Darin Petkove7c6ad32012-06-29 10:22:09 +020041 MOCK_METHOD1(UpdateDevice, void(const DeviceRefPtr &to_update));
Wade Guthrie60a37062013-04-02 11:39:09 -070042 MOCK_METHOD0(UpdateWiFiProvider, void());
Paul Stewartd215af62012-04-24 23:25:50 -070043 MOCK_METHOD1(RecheckPortalOnService, void(const ServiceRefPtr &service));
Paul Stewart75225512012-01-26 22:51:33 -080044 MOCK_METHOD2(HandleProfileEntryDeletion,
Wade Guthrie60a37062013-04-02 11:39:09 -070045 bool(const ProfileRefPtr &profile,
46 const std::string &entry_name));
Paul Stewarte2bad7c2012-03-14 08:55:33 -070047 MOCK_CONST_METHOD0(GetDefaultService, ServiceRefPtr());
Darin Petkov4cbff5b2013-01-29 16:29:05 +010048 MOCK_CONST_METHOD0(IsOnline, bool());
Eric Shienbrood9a245532012-03-07 14:20:39 -050049 MOCK_METHOD0(UpdateEnabledTechnologies, void());
Paul Stewart20088d82012-02-16 06:58:55 -080050 MOCK_METHOD1(IsPortalDetectionEnabled, bool(Technology::Identifier tech));
Paul Stewart10ccbb32012-04-26 15:59:30 -070051 MOCK_CONST_METHOD1(IsServiceEphemeral,
52 bool(const ServiceConstRefPtr &service));
Paul Stewart3c504012013-01-17 17:49:58 -080053 MOCK_CONST_METHOD1(IsTechnologyConnected,
54 bool(Technology::Identifier tech));
Paul Stewart036dba02012-08-07 12:34:41 -070055 MOCK_CONST_METHOD1(IsTechnologyLinkMonitorEnabled,
56 bool(Technology::Identifier tech));
Paul Stewart85aea152013-01-22 09:31:56 -080057 MOCK_CONST_METHOD1(IsDefaultProfile, bool(const StoreInterface *storage));
Wade Guthrie68d41092013-04-02 12:56:02 -070058 MOCK_METHOD3(RequestScan, void(Device::ScanType request_origin,
59 const std::string &technology, Error *error));
Paul Stewart20088d82012-02-16 06:58:55 -080060 MOCK_CONST_METHOD0(GetPortalCheckURL, const std::string &());
Paul Stewartc681fa02012-03-02 19:40:04 -080061 MOCK_CONST_METHOD0(GetPortalCheckInterval, int());
Chris Masone626719f2011-08-18 16:58:48 -070062
63 private:
64 DISALLOW_COPY_AND_ASSIGN(MockManager);
65};
66
67} // namespace shill
68
Wade Guthrie60a37062013-04-02 11:39:09 -070069#endif // SHILL_MOCK_MANAGER_H_