aboutsummaryrefslogtreecommitdiff
path: root/tests/test-glib-proxy-server.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-02-09 15:15:45 -0600
committerTed Gould <ted@gould.cx>2010-02-09 15:15:45 -0600
commitf8f935ea451c7b102a6b83b72c90d73255dac139 (patch)
tree2648937efb86259b4ce8b018478d954c9faf107f /tests/test-glib-proxy-server.c
parent54060d44446cea023842e2a70ea3aec4857272b7 (diff)
downloadlibdbusmenu-f8f935ea451c7b102a6b83b72c90d73255dac139.tar.gz
libdbusmenu-f8f935ea451c7b102a6b83b72c90d73255dac139.tar.bz2
libdbusmenu-f8f935ea451c7b102a6b83b72c90d73255dac139.zip
Setting this stuff up. Woot.
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);