+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "gio_mock.h"
+
+#include "mock_hook.h"
+#include "test_fixture.h"
+
+extern "C" GDBusConnection* g_bus_get_sync(GBusType type,
+ GCancellable* cancellable, GError** error) {
+ return MOCK_HOOK_P3(GioMock, g_bus_get_sync, type, cancellable, error);
+}
+
+extern "C" GDBusMessage* g_dbus_connection_send_message_with_reply_sync(
+ GDBusConnection* conn, GDBusMessage* msg, GDBusSendMessageFlags flags,
+ gint timeout, volatile guint32* out_serial, GCancellable* cancellable,
+ GError** error) {
+ return MOCK_HOOK_P7(GioMock, g_dbus_connection_send_message_with_reply_sync,
+ conn, msg, flags, timeout, out_serial, cancellable, error);
+}
+
+extern "C" GDBusMessage* g_dbus_message_new_method_call(const gchar* arg0,
+ const gchar* arg1, const gchar* arg2, const gchar* arg3) {
+ return MOCK_HOOK_P4(GioMock, g_dbus_message_new_method_call, arg0, arg1, arg2,
+ arg3);
+}
+
+extern "C" void g_dbus_message_set_body(GDBusMessage* arg0, GVariant* arg1) {
+ return MOCK_HOOK_P2(GioMock, g_dbus_message_set_body, arg0, arg1);
+}
+
+extern "C" GVariant* g_dbus_message_get_body(GDBusMessage* arg0) {
+ return MOCK_HOOK_P1(GioMock, g_dbus_message_get_body, arg0);
+}
+
+extern "C" gboolean g_dbus_connection_emit_signal(GDBusConnection* arg0,
+ const gchar* arg1, const gchar* arg2, const gchar* arg3, const gchar* arg4,
+ GVariant* arg5, GError** arg6) {
+ return MOCK_HOOK_P7(GioMock, g_dbus_connection_emit_signal,
+ arg0, arg1, arg2, arg3, arg4, arg5, arg6);
+}
+
+extern "C" GDBusNodeInfo* g_dbus_node_info_new_for_xml(
+ const gchar* arg0, GError** arg1) {
+ return MOCK_HOOK_P2(GioMock, g_dbus_node_info_new_for_xml, arg0, arg1);
+}
+
+extern "C" guint g_dbus_connection_register_object(GDBusConnection* arg0,
+ const gchar* arg1, GDBusInterfaceInfo* arg2,
+ const GDBusInterfaceVTable* arg3, gpointer arg4,
+ GDestroyNotify arg5, GError** arg6) {
+ return MOCK_HOOK_P7(GioMock, g_dbus_connection_register_object,
+ arg0, arg1, arg2, arg3, arg4, arg5, arg6);
+}
+
+extern "C" gboolean g_dbus_connection_unregister_object (GDBusConnection *connection,
+ guint registration_id) {
+ return MOCK_HOOK_P2(GioMock, g_dbus_connection_unregister_object,
+ connection, registration_id);
+}
+
+extern "C" guint g_bus_own_name_on_connection(GDBusConnection* arg0,
+ const gchar* arg1, GBusNameOwnerFlags arg2,
+ GBusNameAcquiredCallback arg3, GBusNameLostCallback arg4,
+ gpointer arg5, GDestroyNotify arg6) {
+ return MOCK_HOOK_P7(GioMock, g_bus_own_name_on_connection,
+ arg0, arg1, arg2, arg3, arg4, arg5, arg6);
+}
+
+extern "C" guint g_dbus_connection_signal_subscribe(GDBusConnection* arg0,
+ const gchar* arg1, const gchar* arg2, const gchar* arg3, const gchar* arg4,
+ const gchar* arg5, GDBusSignalFlags arg6, GDBusSignalCallback arg7,
+ gpointer arg8, GDestroyNotify arg9) {
+ return MOCK_HOOK_P10(GioMock, g_dbus_connection_signal_subscribe,
+ arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
+}
+
+extern "C" void g_dbus_connection_send_message_with_reply(GDBusConnection* arg0,
+ GDBusMessage* arg1, GDBusSendMessageFlags arg2, gint arg3,
+ volatile guint32* arg4, GCancellable* arg5, GAsyncReadyCallback arg6,
+ gpointer arg7) {
+ return MOCK_HOOK_P8(GioMock, g_dbus_connection_send_message_with_reply,
+ arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
+}
+
+extern "C" GDBusMessage* g_dbus_connection_send_message_with_reply_finish(
+ GDBusConnection* arg0, GAsyncResult* arg1, GError** arg2) {
+ return MOCK_HOOK_P3(GioMock, g_dbus_connection_send_message_with_reply_finish,
+ arg0, arg1, arg2);
+}