ACPI and PMU nearly finished, but I want pretty HAL Icons...

Richard Hughes ee21rh at surrey.ac.uk
Wed Jan 19 11:00:07 PST 2005


Before I go too mad, is this how you initialise a typical HAL object?

//Create AC Adaptor
HalDevice *d;
d = hal_device_new(); 
hal_device_add_capability (d, "linux.acpi system.ac_adaptor");
hal_device_property_set_string (d, "info.product", "AC Adaptor");
hal_device_property_set_int (d, "ac_adaptor.number", 0);
hal_device_property_set_string (d, "info.category", "ac_adaptor");
hal_device_property_set_string (d, "info.bus", "unknown");
hal_device_property_set_string (d, "info.udi", 
"/org/freedesktop/Hal/devices/system_ac_adaptor");
hal_device_property_set_string (d, "linux.acpi.procfs_path", 
"/proc/acpi/ac_adapter/ADP1/state");
hal_device_property_set_bool (d, "ac_adaptor.enabled", TRUE);
hal_device_set_udi (d, "/org/freedesktop/Hal/devices/ac_adaptor");
hal_device_store_add (hald_get_gdl(), d);
hal_callout_device (d, TRUE);

Thanks,

Richard.

_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list