Update package version to 0.1.80
[platform/core/uifw/capi-ui-sticker.git] / tests / mock / mock.cc
1 // Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
2 // Use of this source code is governed by a apache 2.0 license that can be
3 // found in the LICENSE file.
4
5 #include "app_common_mock.h"
6 #include "cynara_mock.h"
7 #include "gio_mock.h"
8
9 DEFINE_FFF_GLOBALS;
10
11 /* app_common */
12 DEFINE_FAKE_VALUE_FUNC(int, app_get_id, char **);
13
14 /* cynara */
15 DEFINE_FAKE_VALUE_FUNC(int, cynara_initialize, cynara**,
16     const cynara_configuration*);
17 DEFINE_FAKE_VALUE_FUNC(int, cynara_finish, cynara*);
18 DEFINE_FAKE_VALUE_FUNC(int, cynara_check, cynara*,
19     const char*, const char*, const char*, const char*);
20
21 /* gio */
22 DEFINE_FAKE_VALUE_FUNC(GDBusConnection*, g_bus_get_sync, GBusType,
23     GCancellable*, GError**);
24 DEFINE_FAKE_VALUE_FUNC(guint, g_bus_watch_name_on_connection,
25     GDBusConnection*, const gchar*, GBusNameWatcherFlags,
26     GBusNameAppearedCallback, GBusNameVanishedCallback, gpointer,
27     GDestroyNotify);
28 DEFINE_FAKE_VALUE_FUNC(guint, g_bus_watch_name,
29     GBusType, const gchar*, GBusNameWatcherFlags,
30     GBusNameAppearedCallback, GBusNameVanishedCallback, gpointer,
31     GDestroyNotify);
32 DEFINE_FAKE_VALUE_FUNC(GDBusMessage*, g_dbus_message_new_method_call,
33     const gchar*, const gchar*, const gchar*, const gchar*);
34 DEFINE_FAKE_VOID_FUNC(g_bus_unwatch_name, guint);
35 DEFINE_FAKE_VOID_FUNC(g_dbus_message_set_body, GDBusMessage *,
36     GVariant*);
37 DEFINE_FAKE_VALUE_FUNC(GDBusMessage*, g_dbus_connection_send_message_with_reply_sync,
38     GDBusConnection*, GDBusMessage*, GDBusSendMessageFlags, gint,
39     volatile guint32*, GCancellable*, GError**);
40 DEFINE_FAKE_VOID_FUNC(g_object_unref, gpointer);
41 DEFINE_FAKE_VALUE_FUNC(GVariant*, g_dbus_message_get_body, GDBusMessage*);
42 DEFINE_FAKE_VOID_FUNC(g_dbus_connection_signal_unsubscribe, GDBusConnection*,
43     guint);
44 DEFINE_FAKE_VALUE_FUNC(guint, g_dbus_connection_signal_subscribe,
45     GDBusConnection*, const gchar*, const gchar*,
46     const gchar*, const gchar*, const gchar*,
47     GDBusSignalFlags, GDBusSignalCallback,
48     gpointer, GDestroyNotify);
49 DEFINE_FAKE_VALUE_FUNC(const gchar *, g_dbus_connection_get_unique_name,
50     GDBusConnection*);