backup: Wire up qemu full pull backup commands over QMP
[libvirt/ericb.git] / tests / virdbusmock.c
blob0673f7292a42721025bd2fd0a3ef5714d5ae0b44
1 /*
2 * virdbusmock.c: mocking of dbus message send/reply
4 * Copyright (C) 2013-2014 Red Hat, Inc.
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library. If not, see
18 * <http://www.gnu.org/licenses/>.
21 #include <config.h>
23 #if defined(WITH_DBUS) && !defined(WIN32)
24 # include "virmock.h"
25 # include <dbus/dbus.h>
27 VIR_MOCK_STUB_VOID_ARGS(dbus_connection_set_change_sigpipe,
28 dbus_bool_t, will_modify_sigpipe)
31 VIR_MOCK_STUB_RET_ARGS(dbus_bus_get,
32 DBusConnection *, (DBusConnection *)0x1,
33 DBusBusType, type,
34 DBusError *, error)
36 VIR_MOCK_STUB_VOID_ARGS(dbus_connection_set_exit_on_disconnect,
37 DBusConnection *, connection,
38 dbus_bool_t, exit_on_disconnect)
40 VIR_MOCK_STUB_RET_ARGS(dbus_connection_set_watch_functions,
41 dbus_bool_t, 1,
42 DBusConnection *, connection,
43 DBusAddWatchFunction, add_function,
44 DBusRemoveWatchFunction, remove_function,
45 DBusWatchToggledFunction, toggled_function,
46 void *, data,
47 DBusFreeFunction, free_data_function)
49 VIR_MOCK_STUB_RET_ARGS(dbus_message_set_reply_serial,
50 dbus_bool_t, 1,
51 DBusMessage *, message,
52 dbus_uint32_t, serial)
55 VIR_MOCK_LINK_RET_ARGS(dbus_connection_send_with_reply_and_block,
56 DBusMessage *,
57 DBusConnection *, connection,
58 DBusMessage *, message,
59 int, timeout_milliseconds,
60 DBusError *, error)
62 #endif /* WITH_DBUS && !WIN32 */