aboutsummaryrefslogtreecommitdiff
path: root/tests/test-glib-proxy-server.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-glib-proxy-server.c')
-rw-r--r--tests/test-glib-proxy-server.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test-glib-proxy-server.c b/tests/test-glib-proxy-server.c
index 091e550..2869bfe 100644
--- a/tests/test-glib-proxy-server.c
+++ b/tests/test-glib-proxy-server.c
@@ -93,6 +93,19 @@ main (int argc, char ** argv)
g_debug("DBus ID: %s", dbus_connection_get_server_id(dbus_g_connection_get_connection(dbus_g_bus_get(DBUS_BUS_SESSION, NULL))));
+ DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(connection, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS);
+ guint nameret = 0;
+
+ if (!org_freedesktop_DBus_request_name(bus_proxy, "test.proxy.server", 0, &nameret, &error)) {
+ g_error("Unable to call to request name");
+ return 1;
+ }
+
+ if (nameret != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) {
+ g_error("Unable to get name");
+ return 1;
+ }
+
server = dbusmenu_server_new("/org/test");
timer_func(NULL);