From f8f935ea451c7b102a6b83b72c90d73255dac139 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 9 Feb 2010 15:15:45 -0600 Subject: Setting this stuff up. Woot. --- tests/test-glib-proxy-server.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests/test-glib-proxy-server.c') 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); -- cgit v1.2.3