blob: 9d5b3a89417908188ed7e9ffe9e4ce264a00fbcc [file] [log] [blame]
[email protected]216ed0b2012-02-14 21:29:061// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]b8ae0512011-08-25 05:18:292// 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_
[email protected]b8ae0512011-08-25 05:18:297
8#include <string>
9
10#include "dbus/exported_object.h"
[email protected]216ed0b2012-02-14 21:29:0611#include "dbus/object_path.h"
[email protected]b8ae0512011-08-25 05:18:2912#include "testing/gmock/include/gmock/gmock.h"
13
14namespace dbus {
15
16// Mock for ExportedObject.
17class MockExportedObject : public ExportedObject {
18 public:
19 MockExportedObject(Bus* bus,
[email protected]216ed0b2012-02-14 21:29:0620 const ObjectPath& object_path);
[email protected]b8ae0512011-08-25 05:18:2921
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));
Sonny Sasakae4634072018-12-12 20:29:3331 MOCK_METHOD2(UnexportMethodAndBlock,
32 bool(const std::string& interface_name,
33 const std::string& method_name));
34 MOCK_METHOD3(UnexportMethod,
35 void(const std::string& interface_name,
36 const std::string& method_name,
37 OnUnexportedCallback on_unexported_callback));
[email protected]b8ae0512011-08-25 05:18:2938 MOCK_METHOD1(SendSignal, void(Signal* signal));
39 MOCK_METHOD0(Unregister, void());
[email protected]4e0f45f52012-05-18 18:00:2240
41 protected:
Daniel Cheng3ea6cb72018-04-27 01:59:3442 ~MockExportedObject() override;
[email protected]b8ae0512011-08-25 05:18:2943};
44
45} // namespace dbus
46
47#endif // DBUS_MOCK_EXPORTED_OBJECT_H_