blob: 2cecf1ad3666535b490a6094c337cd0073cd9dc6 [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 Erat0818cca2012-12-14 10:16:21 -080030 MOCK_METHOD2(RegisterSuspendDelay,
31 bool(base::TimeDelta timeout, int *delay_id_out));
32 MOCK_METHOD1(UnregisterSuspendDelay, bool(int delay_id));
33 MOCK_METHOD2(ReportSuspendReadiness, bool(int delay_id, int suspend_id));
Gary Morainac1bdb42012-02-16 17:42:29 -080034
35 private:
36 DISALLOW_COPY_AND_ASSIGN(MockPowerManager);
37};
38
39} // namespace shill
40
Darin Petkov3ec55342012-09-28 14:04:44 +020041#endif // SHILL_MOCK_POWER_MANAGER_H_