hal/libhal libhal.c,1.34,1.35 libhal.h,1.19,1.20

David Zeuthen david at freedesktop.org
Wed Feb 2 12:44:28 PST 2005


Update of /cvs/hal/hal/libhal
In directory gabe:/tmp/cvs-serv29310/libhal

Modified Files:
	libhal.c libhal.h 
Log Message:
2005-02-02  David Zeuthen  <david at fubar.dk>

	* hald/linux2/osspec.c: Adjust for changes in hotplug.h.
	(osspec_device_rescan): New function
	(osspec_device_reprobe): New function

	* hald/linux2/hotplug.h: Extend HotplugEvent struct to also be used
	for coldplugging/fake hotplugging (via Reprobe()) of ACPI devices.
	Add prototypes for hotplug_reprobe_tree() and hotplug_rescan_device().

	* hald/linux2/hotplug.c: Adjust to changes in hotplug.h
	(hotplug_event_begin_sysfs): New function; what used to be the
	function hotplug_event_begin().
	(hotplug_event_begin_acpi): New function
	(hotplug_event_begin): Now a simple dispatcher according to hotplug
	type; e.g. sysfs or acpi
	(hotplug_rescan_device): New function
	(hotplug_reprobe_generate_remove_events): New function
	(hotplug_reprobe_generate_add_events): New function
	(hotplug_reprobe_tree): New function

	* hald/linux2/coldplug.c: Adjust to changes in hotplug.h

	* hald/linux2/classdev.h: Add prototypes for classdev_generate_
	[add|remove]_hotplug_event() and classdev_rescan_device().

	* hald/linux2/classdev.c (hotplug_event_begin_add_classdev): Add
	some properties so we can reconstruct the hotplug event
	(classdev_rescan_device): New function
	(classdev_generate_add_hotplug_event): New function
	(classdev_generate_remove_hotplug_event): New function

	* hald/linux2/acpi.[ch]: Yikes, rewrite must of this to conform to
	the hotplug model so we can do Rescan() and Reprobe()

	* hald/osspec.h: Add prototypes for osspec_device_[rescan|reprobe]

	* hald/hald_test_libhal.c (send_tests_done): New function
	(check_libhal): Add some more tests and report back

	* hald/hald_test.c (check_properties): Fixup wrong failure reports
	(server_message_handler): Add new methods on the org.freedesktop.Hal.
	Tests interfaces to signal that a test is done
	(wait_for_external_test): New function; pretty ugly but it works
	for now. As noted: Patches are Welcome(tm)
	(main): Enable libhal tests

	* hald/hald_dbus.c (device_rescan): New function
	(device_reprobe): New function
	(hald_dbus_filter_function): Add checks for Rescan() and Reprobe()
	methods on the org.freedesktop.Hal.Device interface



Index: libhal.c
===================================================================
RCS file: /cvs/hal/hal/libhal/libhal.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- libhal.c	31 Jan 2005 20:06:41 -0000	1.34
+++ libhal.c	2 Feb 2005 20:44:25 -0000	1.35
@@ -2769,4 +2769,18 @@
 	return TRUE;
 }
 
+unsigned int libhal_string_array_length (char **str_array)
+{
+	unsigned int i;
+
+	if (str_array == NULL)
+		return 0;
+
+	for (i = 0; str_array[i] != NULL; i++)
+		;
+
+	return i;
+}
+
+
 /** @} */

Index: libhal.h
===================================================================
RCS file: /cvs/hal/hal/libhal/libhal.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- libhal.h	31 Jan 2005 20:06:41 -0000	1.19
+++ libhal.h	2 Feb 2005 20:44:25 -0000	1.20
@@ -309,6 +309,8 @@
 dbus_bool_t libhal_psi_get_bool (LibHalPropertySetIterator *iter);
 char **libhal_psi_get_strlist (LibHalPropertySetIterator *iter);
 
+unsigned int libhal_string_array_length (char **str_array);
+
 void libhal_free_string_array (char **str_array);
 void libhal_free_string (char *str);
 




More information about the hal-commit mailing list