hal ChangeLog, 1.919, 1.920 configure.in, 1.132, 1.133 hal.conf.in, 1.10, 1.11

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


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

Modified Files:
	ChangeLog configure.in hal.conf.in 
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: ChangeLog
===================================================================
RCS file: /cvs/hal/hal/ChangeLog,v
retrieving revision 1.919
retrieving revision 1.920
diff -u -d -r1.919 -r1.920
--- ChangeLog	6 Jun 2006 23:56:09 -0000	1.919
+++ ChangeLog	9 Jun 2006 02:19:31 -0000	1.920
@@ -1,3 +1,53 @@
+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. 
+
 2006-06-06  David Zeuthen  <davidz at redhat.com>
 
 	Add introspection support to hald.

Index: configure.in
===================================================================
RCS file: /cvs/hal/hal/configure.in,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -d -r1.132 -r1.133
--- configure.in	6 Jun 2006 03:17:27 -0000	1.132
+++ configure.in	9 Jun 2006 02:19:31 -0000	1.133
@@ -205,6 +205,9 @@
 	AM_CONDITIONAL(HAVE_LIBUSB,false)
 fi
 
+dnl Check for libpci
+AC_CHECK_HEADERS(pci/pci.h)
+AC_CHECK_LIB(pci, pci_init, [USE_LIBPCI=yes AM_CONDITIONAL(HAVE_LIBPCI,true)], [USE_LIBPCI=no AM_CONDITIONAL(HAVE_LIBPCI,false)])
 
 
 AC_ARG_WITH(backend, [  --with-backend=<name>   backend to use (linux2/solaris/dummy)],
@@ -475,6 +478,7 @@
         use acpi kernel interface:  ${acpi_proc}
         use acpid interface:        ${acpi_acpid}
         use libusb:                 ${USE_LIBUSB}
+        use libpci:                 ${USE_LIBPCI}
 
         Maintainer mode:            ${USE_MAINTAINER_MODE}
         Building verbose mode:      ${enable_verbose_mode}

Index: hal.conf.in
===================================================================
RCS file: /cvs/hal/hal/hal.conf.in,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- hal.conf.in	31 May 2006 17:56:49 -0000	1.10
+++ hal.conf.in	9 Jun 2006 02:19:31 -0000	1.11
@@ -18,11 +18,23 @@
   <policy context="default">
     <allow send_interface="org.freedesktop.Hal.Manager"/>
     <allow send_interface="org.freedesktop.Hal.Device"/>
-
     <allow receive_interface="org.freedesktop.Hal.Manager"
            receive_sender="org.freedesktop.Hal"/>
     <allow receive_interface="org.freedesktop.Hal.Device"
            receive_sender="org.freedesktop.Hal"/>
+
+    <allow send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
+    <allow send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
+    <allow send_interface="org.freedesktop.Hal.Device.Volume"/>
+    <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
+    <allow receive_interface="org.freedesktop.Hal.Device.SystemPowerManagement"
+	   receive_sender="org.freedesktop.Hal"/>
+    <allow receive_interface="org.freedesktop.Hal.Device.LaptopPanel"
+	   receive_sender="org.freedesktop.Hal"/>
+    <allow receive_interface="org.freedesktop.Hal.Device.Volume"
+	   receive_sender="org.freedesktop.Hal"/>
+    <allow receive_interface="org.freedesktop.Hal.Device.Volume.Crypto"
+	   receive_sender="org.freedesktop.Hal"/>
   </policy>
 
   <!-- Default policy for the exported interfaces -->




More information about the hal-commit mailing list