blob: 4929486396bee3608a81b018279b49d5ac01eeb5 [file] [log] [blame]
adamk@chromium.org35c0eef2012-02-11 06:45:23 +09001// Copyright (c) 2012 The Chromium Authors. All rights reserved.
satorux@chromium.orgf77861f2011-08-25 14:18:29 +09002// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "dbus/mock_object_proxy.h"
6
7namespace dbus {
8
9MockObjectProxy::MockObjectProxy(Bus* bus,
10 const std::string& service_name,
keybuk@google.combf4649a2012-02-15 06:29:06 +090011 const ObjectPath& object_path)
adamk@chromium.org35c0eef2012-02-11 06:45:23 +090012 : ObjectProxy(bus, service_name, object_path, DEFAULT_OPTIONS) {
satorux@chromium.orgf77861f2011-08-25 14:18:29 +090013}
14
Chris Watkins635e8902017-11-29 16:44:11 +090015MockObjectProxy::~MockObjectProxy() = default;
satorux@chromium.orgf77861f2011-08-25 14:18:29 +090016
Ryo Hashimoto0102c162017-07-21 17:11:14 +090017void MockObjectProxy::CallMethod(MethodCall* method_call,
18 int timeout_ms,
19 ResponseCallback callback) {
20 DoCallMethod(method_call, timeout_ms, &callback);
21}
22
Hidehiko Abefb4fdb42017-10-20 04:54:56 +090023void MockObjectProxy::CallMethodWithErrorResponse(
24 MethodCall* method_call,
25 int timeout_ms,
26 ResponseOrErrorCallback callback) {
27 DoCallMethodWithErrorResponse(method_call, timeout_ms, &callback);
28}
29
Ryo Hashimoto0102c162017-07-21 17:11:14 +090030void MockObjectProxy::CallMethodWithErrorCallback(
31 MethodCall* method_call,
32 int timeout_ms,
33 ResponseCallback callback,
34 ErrorCallback error_callback) {
35 DoCallMethodWithErrorCallback(method_call, timeout_ms, &callback,
36 &error_callback);
37}
38
Ryo Hashimotobaabdc72017-09-12 13:53:50 +090039void MockObjectProxy::ConnectToSignal(
40 const std::string& interface_name,
41 const std::string& signal_name,
42 SignalCallback signal_callback,
43 OnConnectedCallback on_connected_callback) {
44 DoConnectToSignal(interface_name, signal_name, signal_callback,
45 &on_connected_callback);
46}
47
satorux@chromium.orgf77861f2011-08-25 14:18:29 +090048} // namespace dbus