blob: a54df260ac8177154353ccb518045a36e8da3841 [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));
Darin Petkov3ec55342012-09-28 14:04:44 +020030 MOCK_METHOD1(RegisterSuspendDelay, void(uint32 delay_ms));
31 MOCK_METHOD0(UnregisterSuspendDelay, void());
32 MOCK_METHOD1(SuspendReady, void(uint32 suspend_ready));
Gary Morainac1bdb42012-02-16 17:42:29 -080033
34 private:
35 DISALLOW_COPY_AND_ASSIGN(MockPowerManager);
36};
37
38} // namespace shill
39
Darin Petkov3ec55342012-09-28 14:04:44 +020040#endif // SHILL_MOCK_POWER_MANAGER_H_