blob: 34aa6706db56f256842fc8c51488241e7e868dec [file] [log] [blame]
Gary Morainac1bdb42012-02-16 17:42:29 -08001// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Darin Petkov3ec55342012-09-28 14:04:44 +02005#ifndef SHILL_MOCK_POWER_MANAGER_H_
6#define SHILL_MOCK_POWER_MANAGER_H_
Gary Morainac1bdb42012-02-16 17:42:29 -08007
8#include <base/basictypes.h>
9#include <gmock/gmock.h>
10
11#include "shill/power_manager.h"
12
13namespace shill {
14
15class ProxyFactory;
16
17class MockPowerManager : public PowerManager {
18 public:
Darin Petkov3ec55342012-09-28 14:04:44 +020019 MockPowerManager(EventDispatcher *dispatcher, ProxyFactory *proxy_factory);
Gary Morainac1bdb42012-02-16 17:42:29 -080020 virtual ~MockPowerManager();
Darin Petkov3ec55342012-09-28 14:04:44 +020021
Gary Morainac1bdb42012-02-16 17:42:29 -080022 MOCK_METHOD2(AddStateChangeCallback,
Eric Shienbrood3e20a232012-02-16 11:35:56 -050023 void(const std::string &key,
24 const PowerStateCallback &callback));
Gary Morain52fabab2012-08-22 09:27:31 -070025 MOCK_METHOD2(AddSuspendDelayCallback,
26 void(const std::string &key,
27 const SuspendDelayCallback &callback));
Gary Morainac1bdb42012-02-16 17:42:29 -080028 MOCK_METHOD1(RemoveStateChangeCallback, void(const std::string &key));
Gary Morain52fabab2012-08-22 09:27:31 -070029 MOCK_METHOD1(RemoveSuspendDelayCallback, void(const std::string &key));
Daniel Eratf9753672013-01-24 10:17:02 -080030 MOCK_METHOD3(RegisterSuspendDelay,
31 bool(base::TimeDelta timeout,
32 const std::string &description,
33 int *delay_id_out));
Daniel Erat0818cca2012-12-14 10:16:21 -080034 MOCK_METHOD1(UnregisterSuspendDelay, bool(int delay_id));
35 MOCK_METHOD2(ReportSuspendReadiness, bool(int delay_id, int suspend_id));
Gary Morainac1bdb42012-02-16 17:42:29 -080036
37 private:
38 DISALLOW_COPY_AND_ASSIGN(MockPowerManager);
39};
40
41} // namespace shill
42
Darin Petkov3ec55342012-09-28 14:04:44 +020043#endif // SHILL_MOCK_POWER_MANAGER_H_