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 3 // found in the LICENSE file. 4 5 #ifndef CHROMEOS_DBUS_MOCK_SHILL_SERVICE_CLIENT_H_ 6 #define CHROMEOS_DBUS_MOCK_SHILL_SERVICE_CLIENT_H_ 7 8 #include "base/values.h" 9 #include "chromeos/dbus/shill_property_changed_observer.h" 10 #include "chromeos/dbus/shill_service_client.h" 11 #include "dbus/object_path.h" 12 #include "testing/gmock/include/gmock/gmock.h" 13 14 namespace chromeos { 15 16 class MockShillServiceClient : public ShillServiceClient { 17 public: 18 MockShillServiceClient(); 19 virtual ~MockShillServiceClient(); 20 21 MOCK_METHOD2(AddPropertyChangedObserver, 22 void(const dbus::ObjectPath& service_path, 23 ShillPropertyChangedObserver* observer)); 24 MOCK_METHOD2(RemovePropertyChangedObserver, 25 void(const dbus::ObjectPath& service_path, 26 ShillPropertyChangedObserver* observer)); 27 MOCK_METHOD2(GetProperties, void(const dbus::ObjectPath& service_path, 28 const DictionaryValueCallback& callback)); 29 MOCK_METHOD5(SetProperty, void(const dbus::ObjectPath& service_path, 30 const std::string& name, 31 const base::Value& value, 32 const base::Closure& callback, 33 const ErrorCallback& error_callback)); 34 MOCK_METHOD4(SetProperties, void(const dbus::ObjectPath& service_path, 35 const base::DictionaryValue& properties, 36 const base::Closure& callback, 37 const ErrorCallback& error_callback)); 38 MOCK_METHOD4(ClearProperty, void(const dbus::ObjectPath& service_path, 39 const std::string& name, 40 const base::Closure& callback, 41 const ErrorCallback& error_callback)); 42 MOCK_METHOD4(ClearProperties, void(const dbus::ObjectPath& service_path, 43 const std::vector<std::string>& names, 44 const ListValueCallback& callback, 45 const ErrorCallback& error_callback)); 46 MOCK_METHOD3(Connect, void(const dbus::ObjectPath& service_path, 47 const base::Closure& callback, 48 const ErrorCallback& error_callback)); 49 MOCK_METHOD3(Disconnect, void(const dbus::ObjectPath& service_path, 50 const base::Closure& callback, 51 const ErrorCallback& error_callback)); 52 MOCK_METHOD3(Remove, void(const dbus::ObjectPath& service_path, 53 const base::Closure& callback, 54 const ErrorCallback& error_callback)); 55 MOCK_METHOD4(ActivateCellularModem, 56 void(const dbus::ObjectPath& service_path, 57 const std::string& carrier, 58 const base::Closure& callback, 59 const ErrorCallback& error_callback)); 60 MOCK_METHOD3(CompleteCellularActivation, 61 void(const dbus::ObjectPath& service_path, 62 const base::Closure& callback, 63 const ErrorCallback& error_callback)); 64 MOCK_METHOD2(CallActivateCellularModemAndBlock, 65 bool(const dbus::ObjectPath& service_path, 66 const std::string& carrier)); 67 MOCK_METHOD2(GetLoadableProfileEntries, 68 void(const dbus::ObjectPath& service_path, 69 const DictionaryValueCallback& callback)); 70 MOCK_METHOD0(GetTestInterface, TestInterface*()); 71 }; 72 73 } // namespace chromeos 74 75 #endif // CHROMEOS_DBUS_MOCK_SHILL_SERVICE_CLIENT_H_ 76