hal/examples locking.py,1.1,1.2

David Zeuthen david at freedesktop.org
Tue Mar 1 12:38:44 PST 2005


Update of /cvs/hal/hal/examples
In directory gabe:/tmp/cvs-serv16738/examples

Modified Files:
	locking.py 
Log Message:
2005-03-01  David Zeuthen  <david at fubar.dk>

	* hald/hald_dbus.c (foreach_device_by_capability): Fixup this
	function to work with the new D-BUS API
	(device_lock): Be consistent with new D-BUS naming, e.g. use
	info.locked.dbus_name instead of info.lock.dbus_service
	(device_unlock): -do-
	(service_deleted): Use NameOwnerChanged instead of NameLost as
	the latter only goes to the service who's lost the name
	(hald_dbus_filter_function): -do-
	(hald_dbus_init): Subscribe to NameOwnerChanged rather than
	NameLost

	* examples/locking.py: Fixup to use get_unique_name() instead of
	get_base_service()



Index: locking.py
===================================================================
RCS file: /cvs/hal/hal/examples/locking.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- locking.py	19 Sep 2004 16:32:15 -0000	1.1
+++ locking.py	1 Mar 2005 20:38:42 -0000	1.2
@@ -18,7 +18,7 @@
 bus = dbus.Bus(dbus.Bus.TYPE_SYSTEM)
 hal_service = bus.get_service("org.freedesktop.Hal")
 
-print "I am %s with pid %d"%(bus.get_connection().get_base_service(), pid)
+print "I am %s with pid %d"%(bus.get_connection().get_unique_name(), pid)
 print
 
 dev = hal_service.get_object (dev_udi, "org.freedesktop.Hal.Device")




More information about the hal-commit mailing list