dbus/test/glib test-dbus-glib.c,1.6,1.7
Olivier Andrieu
oandrieu at pdx.freedesktop.org
Fri Apr 16 08:08:06 EST 2004
Update of /cvs/dbus/dbus/test/glib
In directory pdx:/tmp/cvs-serv29915/test/glib
Modified Files:
test-dbus-glib.c
Log Message:
2004-04-15 Olivier Andrieu <oliv__a at 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.
Index: test-dbus-glib.c
===================================================================
RCS file: /cvs/dbus/dbus/test/glib/test-dbus-glib.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- a/test-dbus-glib.c 13 Apr 2004 22:29:50 -0000 1.6
+++ b/test-dbus-glib.c 15 Apr 2004 22:08:04 -0000 1.7
@@ -172,11 +172,20 @@
/* 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",
More information about the dbus-commit
mailing list