2
#include "test-song-bindings.h"
3
#include "test-hello-bindings.h"
4
#include "test-goodbye-bindings.h"
6
#define TEST_NAMESPACE "org.freedesktop.DBus.GLib.Test.Interfaces"
7
#define TEST_OBJECT_PATH "/org/freedesktop/DBus/GLib/Test/Interfaces"
13
DBusGConnection *connection;
21
connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
22
if (connection == NULL)
24
g_error ("Failed to make connection to session bus: %s", error->message);
29
proxy = dbus_g_proxy_new_for_name (connection, TEST_NAMESPACE, TEST_OBJECT_PATH,
30
"org.freedesktop.DBus.GLib.Test.Interfaces.Song");
31
success = org_freedesktop_DBus_GLib_Test_Interfaces_Song_get_title (proxy, &str, &error);
32
g_object_unref (proxy);
36
g_print ("Error while calling Parent object method: %s\n", error->message);
43
g_print ("Called Parent object method with success\n");
46
proxy = dbus_g_proxy_new_for_name (connection, TEST_NAMESPACE, TEST_OBJECT_PATH,
47
"org.freedesktop.DBus.GLib.Test.Interfaces.Hello");
48
g_assert (proxy != NULL);
49
success = org_freedesktop_DBus_GLib_Test_Interfaces_Hello_say_hello (proxy, &str, &error);
50
g_object_unref (proxy);
54
g_print ("Error while calling Parent Interface object method: %s\n", error->message);
61
g_print ("Called Parent Interface object method with success\n");
64
proxy = dbus_g_proxy_new_for_name (connection, TEST_NAMESPACE, TEST_OBJECT_PATH,
65
"org.freedesktop.DBus.GLib.Test.Interfaces.Goodbye");
66
success = org_freedesktop_DBus_GLib_Test_Interfaces_Goodbye_say_goodbye (proxy, &str, &error);
67
g_object_unref (proxy);
71
g_print ("Error while calling Object Interface object method: %s\n", error->message);
78
g_print ("Called Object Interface object method with success\n");