OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROMEOS_DBUS_MOCK_SHILL_SERVICE_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_MOCK_SHILL_SERVICE_CLIENT_H_ |
6 #define CHROMEOS_DBUS_MOCK_SHILL_SERVICE_CLIENT_H_ | 6 #define CHROMEOS_DBUS_MOCK_SHILL_SERVICE_CLIENT_H_ |
7 | 7 |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chromeos/dbus/shill_service_client.h" | 9 #include "chromeos/dbus/shill_service_client.h" |
10 #include "dbus/object_path.h" | 10 #include "dbus/object_path.h" |
11 #include "testing/gmock/include/gmock/gmock.h" | 11 #include "testing/gmock/include/gmock/gmock.h" |
12 | 12 |
13 namespace chromeos { | 13 namespace chromeos { |
14 | 14 |
15 class MockShillServiceClient : public ShillServiceClient { | 15 class MockShillServiceClient : public ShillServiceClient { |
16 public: | 16 public: |
17 MockShillServiceClient(); | 17 MockShillServiceClient(); |
18 virtual ~MockShillServiceClient(); | 18 virtual ~MockShillServiceClient(); |
19 | 19 |
20 MOCK_METHOD2(SetPropertyChangedHandler, | 20 MOCK_METHOD2(AddPropertyChangedObserver, |
21 void(const dbus::ObjectPath& service_path, | 21 void(const dbus::ObjectPath& service_path, |
22 const PropertyChangedHandler& handler)); | 22 PropertyChangedObserver* observer)); |
23 MOCK_METHOD1(ResetPropertyChangedHandler, | 23 MOCK_METHOD2(RemovePropertyChangedObserver, |
24 void(const dbus::ObjectPath& service_path)); | 24 void(const dbus::ObjectPath& service_path, |
| 25 PropertyChangedObserver* observer)); |
25 MOCK_METHOD2(GetProperties, void(const dbus::ObjectPath& service_path, | 26 MOCK_METHOD2(GetProperties, void(const dbus::ObjectPath& service_path, |
26 const DictionaryValueCallback& callback)); | 27 const DictionaryValueCallback& callback)); |
27 MOCK_METHOD4(SetProperty, void(const dbus::ObjectPath& service_path, | 28 MOCK_METHOD5(SetProperty, void(const dbus::ObjectPath& service_path, |
28 const std::string& name, | 29 const std::string& name, |
29 const base::Value& value, | 30 const base::Value& value, |
30 const VoidDBusMethodCallback& callback)); | 31 const base::Closure& callback, |
31 MOCK_METHOD3(ClearProperty, void(const dbus::ObjectPath& service_path, | 32 const ErrorCallback& error_callback)); |
| 33 MOCK_METHOD4(ClearProperty, void(const dbus::ObjectPath& service_path, |
32 const std::string& name, | 34 const std::string& name, |
33 const VoidDBusMethodCallback& callback)); | 35 const base::Closure& callback, |
| 36 const ErrorCallback& error_callback)); |
34 MOCK_METHOD3(Connect, void(const dbus::ObjectPath& service_path, | 37 MOCK_METHOD3(Connect, void(const dbus::ObjectPath& service_path, |
35 const base::Closure& callback, | 38 const base::Closure& callback, |
36 const ErrorCallback& error_callback)); | 39 const ErrorCallback& error_callback)); |
37 MOCK_METHOD2(Disconnect, void(const dbus::ObjectPath& service_path, | 40 MOCK_METHOD3(Disconnect, void(const dbus::ObjectPath& service_path, |
38 const VoidDBusMethodCallback& callback)); | 41 const base::Closure& callback, |
39 MOCK_METHOD2(Remove, void(const dbus::ObjectPath& service_path, | 42 const ErrorCallback& error_callback)); |
40 const VoidDBusMethodCallback& callback)); | 43 MOCK_METHOD3(Remove, void(const dbus::ObjectPath& service_path, |
41 MOCK_METHOD3(ActivateCellularModem, | 44 const base::Closure& callback, |
| 45 const ErrorCallback& error_callback)); |
| 46 MOCK_METHOD4(ActivateCellularModem, |
42 void(const dbus::ObjectPath& service_path, | 47 void(const dbus::ObjectPath& service_path, |
43 const std::string& carrier, | 48 const std::string& carrier, |
44 const VoidDBusMethodCallback& callback)); | 49 const base::Closure& callback, |
| 50 const ErrorCallback& error_callback)); |
45 MOCK_METHOD2(CallActivateCellularModemAndBlock, | 51 MOCK_METHOD2(CallActivateCellularModemAndBlock, |
46 bool(const dbus::ObjectPath& service_path, | 52 bool(const dbus::ObjectPath& service_path, |
47 const std::string& carrier)); | 53 const std::string& carrier)); |
48 }; | 54 }; |
49 | 55 |
50 } // namespace chromeos | 56 } // namespace chromeos |
51 | 57 |
52 #endif // CHROMEOS_DBUS_MOCK_SHILL_SERVICE_CLIENT_H_ | 58 #endif // CHROMEOS_DBUS_MOCK_SHILL_SERVICE_CLIENT_H_ |
OLD | NEW |