Peter Qiu | c0beca5 | 2015-09-03 11:25:46 -0700 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2012 The Android Open Source Project |
| 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | // you may not use this file except in compliance with the License. |
| 6 | // You may obtain a copy of the License at |
| 7 | // |
| 8 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | // |
| 10 | // Unless required by applicable law or agreed to in writing, software |
| 11 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | // See the License for the specific language governing permissions and |
| 14 | // limitations under the License. |
| 15 | // |
Gary Morain | ac1bdb4 | 2012-02-16 17:42:29 -0800 | [diff] [blame] | 16 | |
Darin Petkov | 3ec5534 | 2012-09-28 14:04:44 +0200 | [diff] [blame] | 17 | #ifndef SHILL_MOCK_POWER_MANAGER_H_ |
| 18 | #define SHILL_MOCK_POWER_MANAGER_H_ |
Gary Morain | ac1bdb4 | 2012-02-16 17:42:29 -0800 | [diff] [blame] | 19 | |
Alex Vakulenko | 8a53229 | 2014-06-16 17:18:44 -0700 | [diff] [blame] | 20 | #include <string> |
| 21 | |
Ben Chan | cc67c52 | 2014-09-03 07:19:18 -0700 | [diff] [blame] | 22 | #include <base/macros.h> |
Gary Morain | ac1bdb4 | 2012-02-16 17:42:29 -0800 | [diff] [blame] | 23 | #include <gmock/gmock.h> |
| 24 | |
| 25 | #include "shill/power_manager.h" |
| 26 | |
| 27 | namespace shill { |
| 28 | |
Peter Qiu | 608ec29 | 2015-07-30 15:46:16 -0700 | [diff] [blame] | 29 | class ControlInterface; |
Gary Morain | ac1bdb4 | 2012-02-16 17:42:29 -0800 | [diff] [blame] | 30 | |
| 31 | class MockPowerManager : public PowerManager { |
| 32 | public: |
Peter Qiu | 608ec29 | 2015-07-30 15:46:16 -0700 | [diff] [blame] | 33 | MockPowerManager(EventDispatcher* dispatcher, |
| 34 | ControlInterface* control_interface); |
Ben Chan | 5ea763b | 2014-08-13 11:07:54 -0700 | [diff] [blame] | 35 | ~MockPowerManager() override; |
Darin Petkov | 3ec5534 | 2012-09-28 14:04:44 +0200 | [diff] [blame] | 36 | |
Prathmesh Prabhu | 9fdb84b | 2014-08-21 18:41:58 -0700 | [diff] [blame] | 37 | MOCK_METHOD0(ReportSuspendReadiness, bool()); |
Samuel Tan | 68b73d2 | 2014-10-28 17:00:56 -0700 | [diff] [blame] | 38 | MOCK_METHOD0(ReportDarkSuspendReadiness, bool()); |
Peter Qiu | 7723677 | 2015-08-13 13:03:43 -0700 | [diff] [blame] | 39 | MOCK_METHOD4( |
Prathmesh Prabhu | 9fdb84b | 2014-08-21 18:41:58 -0700 | [diff] [blame] | 40 | Start, |
Peter Qiu | 7723677 | 2015-08-13 13:03:43 -0700 | [diff] [blame] | 41 | void(base::TimeDelta suspend_delay, |
Paul Stewart | 1e006c6 | 2015-06-16 12:29:06 -0700 | [diff] [blame] | 42 | const PowerManager::SuspendImminentCallback& imminent_callback, |
| 43 | const PowerManager::SuspendDoneCallback& done_callback, |
| 44 | const PowerManager::DarkSuspendImminentCallback& dark_imminent)); |
Prathmesh Prabhu | 9fdb84b | 2014-08-21 18:41:58 -0700 | [diff] [blame] | 45 | MOCK_METHOD0(Stop, void()); |
Gary Morain | ac1bdb4 | 2012-02-16 17:42:29 -0800 | [diff] [blame] | 46 | |
| 47 | private: |
| 48 | DISALLOW_COPY_AND_ASSIGN(MockPowerManager); |
| 49 | }; |
| 50 | |
| 51 | } // namespace shill |
| 52 | |
Darin Petkov | 3ec5534 | 2012-09-28 14:04:44 +0200 | [diff] [blame] | 53 | #endif // SHILL_MOCK_POWER_MANAGER_H_ |