diff options
author | Olivier Andrieu <oliv__a@users.sourceforge.net> | 2004-04-15 22:08:05 +0000 |
---|---|---|
committer | Olivier Andrieu <oliv__a@users.sourceforge.net> | 2004-04-15 22:08:05 +0000 |
commit | a470eaa0789662d3d3e1f0a23e75c7be2ab574cc (patch) | |
tree | e8db28dbafeb1af3d93459bc2fe76f88e940808b /test | |
parent | 61b294f1a9e41c68486bc9340cd42d94224a4080 (diff) |
2004-04-15 Olivier Andrieu <oliv__a@users.sourceforge.net>
* bus/driver.c (bus_driver_handle_get_service_owner):
implement a GetServiceOwner method.
* doc/dbus-specification.xml: document it.
* dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.
* glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
implement, using the bus GetServiceOwner method.
* test/glib/test-dbus-glib.c:
use dbus_gproxy_new_for_service_owner so that we can receive the
signal.
Diffstat (limited to 'test')
-rw-r--r-- | test/glib/test-dbus-glib.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/test/glib/test-dbus-glib.c b/test/glib/test-dbus-glib.c index ed94afae..ad08164a 100644 --- a/test/glib/test-dbus-glib.c +++ b/test/glib/test-dbus-glib.c @@ -172,11 +172,20 @@ main (int argc, char **argv) /* Talk to the new service */ - proxy = dbus_gproxy_new_for_service (connection, - "org.freedesktop.DBus.TestSuiteEchoService", - "/org/freedesktop/TestSuite", - "org.freedesktop.TestSuite"); + proxy = dbus_gproxy_new_for_service_owner (connection, + "org.freedesktop.DBus.TestSuiteEchoService", + "/org/freedesktop/TestSuite", + "org.freedesktop.TestSuite", + &error); + if (proxy == NULL) + { + g_printerr ("Failed to create proxy for service owner: %s\n", + error->message); + g_error_free (error); + exit (1); + } + call = dbus_gproxy_begin_call (proxy, "Echo", DBUS_TYPE_STRING, "my string hello", |