hal/tools hal-system-power-set-power-save,1.7,1.8

David Zeuthen david at kemper.freedesktop.org
Thu Jun 8 19:19:34 PDT 2006


Update of /cvs/hal/hal/tools
In directory kemper:/tmp/cvs-serv22208/tools

Modified Files:
	hal-system-power-set-power-save 
Log Message:
2006-06-08  David Zeuthen  <davidz at redhat.com>

	Adds code so addons can claim interfaces and handle the methods on
	them in the addon daemon code. The example here is setting the LCD
	backlight on a Macbook Pro. Actual code for setting the backlight
	is based on code from Nicolas Boichat found on the mactel-linux
	mailing list.

	* hald/linux2/addons/addon-macbookpro-backlight.c: New file.

	* tools/hal-system-power-set-power-save: Bugfix so the right
	backend script is invoked.

	* libhal/libhal.h: Add prototype for libhal_device_claim_interface().

	* libhal/libhal.c (libhal_device_claim_interface): New function.

	* hald/linux2/addons/Makefile.am: Add rules for
	hald-addon-macbookpro-backlight. 

	* hald/hald_dbus.c (device_emit_condition): Only allow helpers,
	e.g.  only messages from direct connections.
	(device_claim_interface): New function to handle the
	ClaimInterface() method
	(do_introspect): Include introspection XML for ClaimInterface()
	and the introspection XML returned by ClaimInterface()
	invocations.
	(reply_from_fwd_message): New function
	(hald_dbus_filter_handle_methods): Handle ClaimInterface() and
	forward messages to the claimed interfaces on the appropriate
	objects.
	(local_server_message_handler): Forward signals from helpers onto
	the system message bus and DTRT when a helper disconnects.

	* hald/device_info.c (handle_spawn): New function. One can now do
	a <spawn udi="foo"> to spawn a child device. See the fdi file below
	for usage.
	(start, spawned_device_callouts_add_done, end):  Handle spawning
	device objects in response to <spawn>.

	* fdi/policy/10osvendor/10-laptop-panel-mgmt-policy.fdi: Add rules
	for matching the Macbook Pro in order to spawn a new device object
	with an addon for handing methods on the org.fd.H.D.LaptopPanel
	interface.

	* hal.conf.in: Allow some interfaces to also emit signals.

	* configure.in: Check for libpci so we can use it as an optional
	dependency. 



Index: hal-system-power-set-power-save
===================================================================
RCS file: /cvs/hal/hal/tools/hal-system-power-set-power-save,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- hal-system-power-set-power-save	17 May 2006 20:12:17 -0000	1.7
+++ hal-system-power-set-power-save	9 Jun 2006 02:19:32 -0000	1.8
@@ -1,7 +1,7 @@
 #!/bin/sh
 
-if [ -n "$HALD_UNAME_S" -a -x $0-$HALD_UNAME_S ]; then
-    exec $0-$HALD_UNAME_S $@
+if [ -n "$HALD_UNAME_S" -a -x ./$HALD_UNAME_S/hal-system-power-set-power-save-$HALD_UNAME_S ]; then
+    exec ./$HALD_UNAME_S/hal-system-power-set-power-save-$HALD_UNAME_S $@
 else
     echo "org.freedesktop.Hal.Device.UnknownError" >&2
     echo "No back-end for your operating system" >&2




More information about the hal-commit mailing list