Thieu Le | 3426c8f | 2012-01-11 17:35:11 -0800 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium OS Authors. All rights reserved. |
Chris Masone | 626719f | 2011-08-18 16:58:48 -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 | |
Wade Guthrie | 60a3706 | 2013-04-02 11:39:09 -0700 | [diff] [blame] | 5 | #ifndef SHILL_MOCK_MANAGER_H_ |
| 6 | #define SHILL_MOCK_MANAGER_H_ |
Chris Masone | 626719f | 2011-08-18 16:58:48 -0700 | [diff] [blame] | 7 | |
Darin Petkov | ef34f18 | 2011-08-26 14:14:40 -0700 | [diff] [blame] | 8 | #include <base/basictypes.h> |
Chris Masone | 626719f | 2011-08-18 16:58:48 -0700 | [diff] [blame] | 9 | #include <gmock/gmock.h> |
| 10 | |
| 11 | #include "shill/manager.h" |
| 12 | |
| 13 | namespace shill { |
| 14 | |
Chris Masone | 626719f | 2011-08-18 16:58:48 -0700 | [diff] [blame] | 15 | class MockManager : public Manager { |
| 16 | public: |
| 17 | MockManager(ControlInterface *control_interface, |
| 18 | EventDispatcher *dispatcher, |
Thieu Le | 3426c8f | 2012-01-11 17:35:11 -0800 | [diff] [blame] | 19 | Metrics *metrics, |
Darin Petkov | ef34f18 | 2011-08-26 14:14:40 -0700 | [diff] [blame] | 20 | GLib *glib); |
| 21 | virtual ~MockManager(); |
Chris Masone | 626719f | 2011-08-18 16:58:48 -0700 | [diff] [blame] | 22 | |
Darin Petkov | f7ef50a | 2012-04-16 20:54:31 +0200 | [diff] [blame] | 23 | MOCK_METHOD0(device_info, DeviceInfo *()); |
Paul Stewart | 8c116a9 | 2012-05-02 18:30:03 -0700 | [diff] [blame] | 24 | MOCK_METHOD0(modem_info, ModemInfo *()); |
Paul Stewart | 35eff13 | 2013-04-12 12:08:40 -0700 | [diff] [blame] | 25 | MOCK_CONST_METHOD0(ethernet_eap_provider, EthernetEapProvider *()); |
Darin Petkov | e4b2702 | 2012-05-16 13:28:50 +0200 | [diff] [blame] | 26 | MOCK_METHOD0(wimax_provider, WiMaxProvider *()); |
Darin Petkov | f7ef50a | 2012-04-16 20:54:31 +0200 | [diff] [blame] | 27 | MOCK_METHOD0(mutable_store, PropertyStore *()); |
| 28 | MOCK_CONST_METHOD0(store, const PropertyStore &()); |
Albert Chaulk | 0e1cdea | 2013-02-27 15:32:55 -0800 | [diff] [blame] | 29 | MOCK_CONST_METHOD0(run_path, const base::FilePath &()); |
Thieu Le | fb46caf | 2012-03-08 11:57:15 -0800 | [diff] [blame] | 30 | MOCK_METHOD0(Start, void()); |
Thieu Le | 6c1e3bb | 2013-02-06 15:20:35 -0800 | [diff] [blame] | 31 | MOCK_METHOD0(Stop, void()); |
Paul Stewart | ad0e598 | 2013-07-02 08:47:47 -0700 | [diff] [blame] | 32 | MOCK_METHOD3(SetProfileForService, void(const ServiceRefPtr &to_set, |
| 33 | const std::string &profile, |
| 34 | Error *error)); |
Paul Stewart | 8c116a9 | 2012-05-02 18:30:03 -0700 | [diff] [blame] | 35 | MOCK_METHOD1(RegisterDevice, void(const DeviceRefPtr &to_manage)); |
| 36 | MOCK_METHOD1(DeregisterDevice, void(const DeviceRefPtr &to_forget)); |
mukesh agrawal | 4eb4d78 | 2011-12-05 17:34:37 +0000 | [diff] [blame] | 37 | MOCK_METHOD1(HasService, bool(const ServiceRefPtr &to_manage)); |
mukesh agrawal | 3239932 | 2011-09-01 10:53:43 -0700 | [diff] [blame] | 38 | MOCK_METHOD1(RegisterService, void(const ServiceRefPtr &to_manage)); |
mukesh agrawal | 00917ce | 2011-11-22 23:56:55 +0000 | [diff] [blame] | 39 | MOCK_METHOD1(UpdateService, void(const ServiceRefPtr &to_update)); |
Chris Masone | 6515aab | 2011-10-12 16:19:09 -0700 | [diff] [blame] | 40 | MOCK_METHOD1(DeregisterService, void(const ServiceRefPtr &to_forget)); |
Darin Petkov | a5e07ef | 2012-07-09 14:27:57 +0200 | [diff] [blame] | 41 | MOCK_METHOD1(RegisterDefaultServiceCallback, |
| 42 | int(const ServiceCallback &callback)); |
| 43 | MOCK_METHOD1(DeregisterDefaultServiceCallback, void(int tag)); |
Darin Petkov | e7c6ad3 | 2012-06-29 10:22:09 +0200 | [diff] [blame] | 44 | MOCK_METHOD1(UpdateDevice, void(const DeviceRefPtr &to_update)); |
Wade Guthrie | 60a3706 | 2013-04-02 11:39:09 -0700 | [diff] [blame] | 45 | MOCK_METHOD0(UpdateWiFiProvider, void()); |
Paul Stewart | d215af6 | 2012-04-24 23:25:50 -0700 | [diff] [blame] | 46 | MOCK_METHOD1(RecheckPortalOnService, void(const ServiceRefPtr &service)); |
Paul Stewart | 7522551 | 2012-01-26 22:51:33 -0800 | [diff] [blame] | 47 | MOCK_METHOD2(HandleProfileEntryDeletion, |
Wade Guthrie | 60a3706 | 2013-04-02 11:39:09 -0700 | [diff] [blame] | 48 | bool(const ProfileRefPtr &profile, |
| 49 | const std::string &entry_name)); |
Paul Stewart | e2bad7c | 2012-03-14 08:55:33 -0700 | [diff] [blame] | 50 | MOCK_CONST_METHOD0(GetDefaultService, ServiceRefPtr()); |
Darin Petkov | 4cbff5b | 2013-01-29 16:29:05 +0100 | [diff] [blame] | 51 | MOCK_CONST_METHOD0(IsOnline, bool()); |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 52 | MOCK_METHOD0(UpdateEnabledTechnologies, void()); |
Paul Stewart | 20088d8 | 2012-02-16 06:58:55 -0800 | [diff] [blame] | 53 | MOCK_METHOD1(IsPortalDetectionEnabled, bool(Technology::Identifier tech)); |
Paul Stewart | 10ccbb3 | 2012-04-26 15:59:30 -0700 | [diff] [blame] | 54 | MOCK_CONST_METHOD1(IsServiceEphemeral, |
| 55 | bool(const ServiceConstRefPtr &service)); |
Paul Stewart | 3c50401 | 2013-01-17 17:49:58 -0800 | [diff] [blame] | 56 | MOCK_CONST_METHOD1(IsTechnologyConnected, |
| 57 | bool(Technology::Identifier tech)); |
Paul Stewart | 036dba0 | 2012-08-07 12:34:41 -0700 | [diff] [blame] | 58 | MOCK_CONST_METHOD1(IsTechnologyLinkMonitorEnabled, |
| 59 | bool(Technology::Identifier tech)); |
Paul Stewart | 85aea15 | 2013-01-22 09:31:56 -0800 | [diff] [blame] | 60 | MOCK_CONST_METHOD1(IsDefaultProfile, bool(const StoreInterface *storage)); |
Wade Guthrie | 68d4109 | 2013-04-02 12:56:02 -0700 | [diff] [blame] | 61 | MOCK_METHOD3(RequestScan, void(Device::ScanType request_origin, |
| 62 | const std::string &technology, Error *error)); |
Paul Stewart | 20088d8 | 2012-02-16 06:58:55 -0800 | [diff] [blame] | 63 | MOCK_CONST_METHOD0(GetPortalCheckURL, const std::string &()); |
Paul Stewart | c681fa0 | 2012-03-02 19:40:04 -0800 | [diff] [blame] | 64 | MOCK_CONST_METHOD0(GetPortalCheckInterval, int()); |
Chris Masone | 626719f | 2011-08-18 16:58:48 -0700 | [diff] [blame] | 65 | |
| 66 | private: |
| 67 | DISALLOW_COPY_AND_ASSIGN(MockManager); |
| 68 | }; |
| 69 | |
| 70 | } // namespace shill |
| 71 | |
Wade Guthrie | 60a3706 | 2013-04-02 11:39:09 -0700 | [diff] [blame] | 72 | #endif // SHILL_MOCK_MANAGER_H_ |