aboutsummaryrefslogtreecommitdiff
path: root/tests/test-glib-layout-server.c
diff options
context:
space:
mode:
authorKen VanDine <ken.vandine@canonical.com>2010-01-08 12:47:52 -0500
committerKen VanDine <ken.vandine@canonical.com>2010-01-08 12:47:52 -0500
commitf25b2c9f2fb6448506decd9bd89052d3eb94ab4e (patch)
treedcf63a656d2fb0e26068e800672a00e1c079818d /tests/test-glib-layout-server.c
parent0ab4e0cd4974e8f2a963b16f9abed2bd6c7eac12 (diff)
parent214b29a5e3a400b8180bca7f079fbc89ab683644 (diff)
downloadlibdbusmenu-f25b2c9f2fb6448506decd9bd89052d3eb94ab4e.tar.gz
libdbusmenu-f25b2c9f2fb6448506decd9bd89052d3eb94ab4e.tar.bz2
libdbusmenu-f25b2c9f2fb6448506decd9bd89052d3eb94ab4e.zip
* Upstream release 0.2.0
- Remove unused libdbusmenu-qt - Changing API to be V0.2 for reals - Adding underline support - Test suite fixes and automation support - dbus-dumper tool - Switch to org.ayatana - Fixing the handling of typed properties, especially bools. - Adding GetChildren function for getting a single submenu - Starting to watch DBus if the proxy builds fail. - Test suite fixes - Fixing the consistency between the #defines and what was used in the code. * debian/control, debian/libdbusmenu-tools.install: Setting up a package for the new dbusmenu-dumper tool. * debian/control: Mentioning nicely that this will cause indicator-messages << 0.3 and indicator-session << 0.2 to break.
Diffstat (limited to 'tests/test-glib-layout-server.c')
-rw-r--r--tests/test-glib-layout-server.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/test-glib-layout-server.c b/tests/test-glib-layout-server.c
index cc9b8e7..40dd048 100644
--- a/tests/test-glib-layout-server.c
+++ b/tests/test-glib-layout-server.c
@@ -24,6 +24,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include <dbus/dbus.h>
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
+#include <dbus/dbus-glib-bindings.h>
#include <libdbusmenu-glib/server.h>
#include <libdbusmenu-glib/menuitem.h>
@@ -74,10 +75,26 @@ timer_func (gpointer data)
int
main (int argc, char ** argv)
{
+ GError * error = NULL;
+
g_type_init();
+ DBusGConnection * connection = dbus_g_bus_get(DBUS_BUS_SESSION, NULL);
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, "org.dbusmenu.test", 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);