1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53

dbus / mock_object_proxy.cc [blame]

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "dbus/mock_object_proxy.h"

namespace dbus {

MockObjectProxy::MockObjectProxy(Bus* bus,
                                 const std::string& service_name,
                                 const ObjectPath& object_path)
    : ObjectProxy(bus, service_name, object_path, DEFAULT_OPTIONS) {
}

MockObjectProxy::~MockObjectProxy() = default;

void MockObjectProxy::CallMethod(MethodCall* method_call,
                                 int timeout_ms,
                                 ResponseCallback callback) {
  DoCallMethod(method_call, timeout_ms, &callback);
}

void MockObjectProxy::CallMethodWithErrorResponse(
    MethodCall* method_call,
    int timeout_ms,
    ResponseOrErrorCallback callback) {
  DoCallMethodWithErrorResponse(method_call, timeout_ms, &callback);
}

void MockObjectProxy::CallMethodWithErrorCallback(
    MethodCall* method_call,
    int timeout_ms,
    ResponseCallback callback,
    ErrorCallback error_callback) {
  DoCallMethodWithErrorCallback(method_call, timeout_ms, &callback,
                                &error_callback);
}

void MockObjectProxy::WaitForServiceToBeAvailable(
    WaitForServiceToBeAvailableCallback callback) {
  DoWaitForServiceToBeAvailable(&callback);
}

void MockObjectProxy::ConnectToSignal(
    const std::string& interface_name,
    const std::string& signal_name,
    SignalCallback signal_callback,
    OnConnectedCallback on_connected_callback) {
  DoConnectToSignal(interface_name, signal_name, signal_callback,
                    &on_connected_callback);
}

}  // namespace dbus