1*635a8641SAndroid Build Coastguard Worker // Copyright (c) 2013 The Chromium Authors. All rights reserved. 2*635a8641SAndroid Build Coastguard Worker // Use of this source code is governed by a BSD-style license that can be 3*635a8641SAndroid Build Coastguard Worker // found in the LICENSE file. 4*635a8641SAndroid Build Coastguard Worker 5*635a8641SAndroid Build Coastguard Worker #ifndef DBUS_MOCK_OBJECT_MANAGER_H_ 6*635a8641SAndroid Build Coastguard Worker #define DBUS_MOCK_OBJECT_MANAGER_H_ 7*635a8641SAndroid Build Coastguard Worker 8*635a8641SAndroid Build Coastguard Worker #include <string> 9*635a8641SAndroid Build Coastguard Worker 10*635a8641SAndroid Build Coastguard Worker #include "dbus/message.h" 11*635a8641SAndroid Build Coastguard Worker #include "dbus/object_manager.h" 12*635a8641SAndroid Build Coastguard Worker #include "dbus/object_path.h" 13*635a8641SAndroid Build Coastguard Worker #include "dbus/object_proxy.h" 14*635a8641SAndroid Build Coastguard Worker #include "testing/gmock/include/gmock/gmock.h" 15*635a8641SAndroid Build Coastguard Worker 16*635a8641SAndroid Build Coastguard Worker namespace dbus { 17*635a8641SAndroid Build Coastguard Worker 18*635a8641SAndroid Build Coastguard Worker // Mock for ObjectManager. 19*635a8641SAndroid Build Coastguard Worker class MockObjectManager : public ObjectManager { 20*635a8641SAndroid Build Coastguard Worker public: 21*635a8641SAndroid Build Coastguard Worker MockObjectManager(Bus* bus, 22*635a8641SAndroid Build Coastguard Worker const std::string& service_name, 23*635a8641SAndroid Build Coastguard Worker const ObjectPath& object_path); 24*635a8641SAndroid Build Coastguard Worker 25*635a8641SAndroid Build Coastguard Worker MOCK_METHOD2(RegisterInterface, void(const std::string&, 26*635a8641SAndroid Build Coastguard Worker Interface*)); 27*635a8641SAndroid Build Coastguard Worker MOCK_METHOD1(UnregisterInterface, void(const std::string&)); 28*635a8641SAndroid Build Coastguard Worker MOCK_METHOD0(GetObjects, std::vector<ObjectPath>()); 29*635a8641SAndroid Build Coastguard Worker MOCK_METHOD1(GetObjectsWithInterface, 30*635a8641SAndroid Build Coastguard Worker std::vector<ObjectPath>(const std::string&)); 31*635a8641SAndroid Build Coastguard Worker MOCK_METHOD1(GetObjectProxy, ObjectProxy*(const ObjectPath&)); 32*635a8641SAndroid Build Coastguard Worker MOCK_METHOD2(GetProperties, PropertySet*(const ObjectPath&, 33*635a8641SAndroid Build Coastguard Worker const std::string&)); 34*635a8641SAndroid Build Coastguard Worker 35*635a8641SAndroid Build Coastguard Worker protected: 36*635a8641SAndroid Build Coastguard Worker ~MockObjectManager() override; 37*635a8641SAndroid Build Coastguard Worker }; 38*635a8641SAndroid Build Coastguard Worker 39*635a8641SAndroid Build Coastguard Worker } // namespace dbus 40*635a8641SAndroid Build Coastguard Worker 41*635a8641SAndroid Build Coastguard Worker #endif // DBUS_MOCK_OBJECT_MANAGER_H_ 42