keybuk@google.com | bf4649a | 2012-02-15 06:29:06 +0900 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
satorux@chromium.org | f77861f | 2011-08-25 14:18:29 +0900 | [diff] [blame] | 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 DBUS_MOCK_EXPORTED_OBJECT_H_ |
| 6 | #define DBUS_MOCK_EXPORTED_OBJECT_H_ |
satorux@chromium.org | f77861f | 2011-08-25 14:18:29 +0900 | [diff] [blame] | 7 | |
| 8 | #include <string> |
| 9 | |
| 10 | #include "dbus/exported_object.h" |
keybuk@google.com | bf4649a | 2012-02-15 06:29:06 +0900 | [diff] [blame] | 11 | #include "dbus/object_path.h" |
satorux@chromium.org | f77861f | 2011-08-25 14:18:29 +0900 | [diff] [blame] | 12 | #include "testing/gmock/include/gmock/gmock.h" |
| 13 | |
| 14 | namespace dbus { |
| 15 | |
| 16 | // Mock for ExportedObject. |
| 17 | class MockExportedObject : public ExportedObject { |
| 18 | public: |
| 19 | MockExportedObject(Bus* bus, |
keybuk@google.com | bf4649a | 2012-02-15 06:29:06 +0900 | [diff] [blame] | 20 | const ObjectPath& object_path); |
satorux@chromium.org | f77861f | 2011-08-25 14:18:29 +0900 | [diff] [blame] | 21 | |
| 22 | MOCK_METHOD3(ExportMethodAndBlock, |
| 23 | bool(const std::string& interface_name, |
| 24 | const std::string& method_name, |
| 25 | MethodCallCallback method_call_callback)); |
| 26 | MOCK_METHOD4(ExportMethod, |
| 27 | void(const std::string& interface_name, |
| 28 | const std::string& method_name, |
| 29 | MethodCallCallback method_call_callback, |
| 30 | OnExportedCallback on_exported_callback)); |
| 31 | MOCK_METHOD1(SendSignal, void(Signal* signal)); |
| 32 | MOCK_METHOD0(Unregister, void()); |
rsleevi@chromium.org | d216399 | 2012-05-19 03:00:22 +0900 | [diff] [blame] | 33 | |
| 34 | protected: |
| 35 | virtual ~MockExportedObject(); |
satorux@chromium.org | f77861f | 2011-08-25 14:18:29 +0900 | [diff] [blame] | 36 | }; |
| 37 | |
| 38 | } // namespace dbus |
| 39 | |
| 40 | #endif // DBUS_MOCK_EXPORTED_OBJECT_H_ |