2 * Copyright (c) 2020 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include "mock_hook.h"
20 #include "test_fixture.h"
22 extern "C" GDBusConnection* g_bus_get_sync(GBusType type,
23 GCancellable* cancellable, GError** error) {
24 return MOCK_HOOK_P3(GioMock, g_bus_get_sync, type, cancellable, error);
27 extern "C" GDBusMessage* g_dbus_connection_send_message_with_reply_sync(
28 GDBusConnection* conn, GDBusMessage* msg, GDBusSendMessageFlags flags,
29 gint timeout, volatile guint32* out_serial, GCancellable* cancellable,
31 return MOCK_HOOK_P7(GioMock, g_dbus_connection_send_message_with_reply_sync,
32 conn, msg, flags, timeout, out_serial, cancellable, error);
35 extern "C" GDBusMessage* g_dbus_message_new_method_call(const gchar* arg0,
36 const gchar* arg1, const gchar* arg2, const gchar* arg3) {
37 return MOCK_HOOK_P4(GioMock, g_dbus_message_new_method_call, arg0, arg1, arg2,
41 extern "C" void g_dbus_message_set_body(GDBusMessage* arg0, GVariant* arg1) {
42 return MOCK_HOOK_P2(GioMock, g_dbus_message_set_body, arg0, arg1);
45 extern "C" GVariant* g_dbus_message_get_body(GDBusMessage* arg0) {
46 return MOCK_HOOK_P1(GioMock, g_dbus_message_get_body, arg0);
49 extern "C" gboolean g_dbus_connection_emit_signal(GDBusConnection* arg0,
50 const gchar* arg1, const gchar* arg2, const gchar* arg3, const gchar* arg4,
51 GVariant* arg5, GError** arg6) {
52 return MOCK_HOOK_P7(GioMock, g_dbus_connection_emit_signal,
53 arg0, arg1, arg2, arg3, arg4, arg5, arg6);
56 extern "C" GDBusNodeInfo* g_dbus_node_info_new_for_xml(
57 const gchar* arg0, GError** arg1) {
58 return MOCK_HOOK_P2(GioMock, g_dbus_node_info_new_for_xml, arg0, arg1);
61 extern "C" guint g_dbus_connection_register_object(GDBusConnection* arg0,
62 const gchar* arg1, GDBusInterfaceInfo* arg2,
63 const GDBusInterfaceVTable* arg3, gpointer arg4,
64 GDestroyNotify arg5, GError** arg6) {
65 return MOCK_HOOK_P7(GioMock, g_dbus_connection_register_object,
66 arg0, arg1, arg2, arg3, arg4, arg5, arg6);
69 extern "C" gboolean g_dbus_connection_unregister_object (GDBusConnection *connection,
70 guint registration_id) {
71 return MOCK_HOOK_P2(GioMock, g_dbus_connection_unregister_object,
72 connection, registration_id);
75 extern "C" guint g_bus_own_name_on_connection(GDBusConnection* arg0,
76 const gchar* arg1, GBusNameOwnerFlags arg2,
77 GBusNameAcquiredCallback arg3, GBusNameLostCallback arg4,
78 gpointer arg5, GDestroyNotify arg6) {
79 return MOCK_HOOK_P7(GioMock, g_bus_own_name_on_connection,
80 arg0, arg1, arg2, arg3, arg4, arg5, arg6);
83 extern "C" guint g_dbus_connection_signal_subscribe(GDBusConnection* arg0,
84 const gchar* arg1, const gchar* arg2, const gchar* arg3, const gchar* arg4,
85 const gchar* arg5, GDBusSignalFlags arg6, GDBusSignalCallback arg7,
86 gpointer arg8, GDestroyNotify arg9) {
87 return MOCK_HOOK_P10(GioMock, g_dbus_connection_signal_subscribe,
88 arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
91 extern "C" void g_dbus_connection_send_message_with_reply(GDBusConnection* arg0,
92 GDBusMessage* arg1, GDBusSendMessageFlags arg2, gint arg3,
93 volatile guint32* arg4, GCancellable* arg5, GAsyncReadyCallback arg6,
95 return MOCK_HOOK_P8(GioMock, g_dbus_connection_send_message_with_reply,
96 arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
99 extern "C" GDBusMessage* g_dbus_connection_send_message_with_reply_finish(
100 GDBusConnection* arg0, GAsyncResult* arg1, GError** arg2) {
101 return MOCK_HOOK_P3(GioMock, g_dbus_connection_send_message_with_reply_finish,