#include <class_device.h>
Data Fields | |
void(* | init )(ClassDeviceHandler *self) |
Called when the HAL daemon is starting up. | |
void(* | detection_done )(ClassDeviceHandler *self) |
Called when all device detection (on bootstrap) is done. | |
void(* | shutdown )(ClassDeviceHandler *self) |
Called just before the HAL daemon is shutting down. | |
void(* | tick )(ClassDeviceHandler *self) |
Called regulary (every two seconds) for polling etc. | |
dbus_bool_t(* | accept )(ClassDeviceHandler *self, const char *sysfs_path, struct sysfs_class_device *class_device, dbus_bool_t is_probing) |
Called when processing a new device instance to determine whether this class accepts this kind of device. | |
void(* | visit )(ClassDeviceHandler *self, const char *sysfs_path, struct sysfs_class_device *class_device, dbus_bool_t is_probing) |
Called when a new instance of a class device is detected either through hotplug or through initial detection. | |
void(* | removed )(ClassDeviceHandler *self, const char *sysfs_path, HalDevice *d) |
Called when the class device instance have been removed. | |
void(* | udev_event )(ClassDeviceHandler *self, HalDevice *d, char *dev_file) |
Called when the device file (e.g. | |
void(* | get_device_file_target )(ClassDeviceHandler *self, HalDevice *d, const char *sysfs_path, struct sysfs_class_device *class_device, char *dev_file_prop, int dev_file_prop_len) |
Get the name of that the property that the device file should be put in. | |
void(* | pre_process )(ClassDeviceHandler *self, HalDevice *d, const char *sysfs_path, struct sysfs_class_device *class_device) |
This method is called just before the device is either merged onto the sysdevice or added to the GDL (cf. | |
void(* | post_merge )(ClassDeviceHandler *self, HalDevice *d) |
Called when an inferior HalDevice is merged. | |
void(* | got_udi )(ClassDeviceHandler *self, HalDevice *d, const char *udi) |
Called when the UDI has been determined, but before the device is added to the GDL. | |
char *(* | compute_udi )(HalDevice *d, int append_num) |
This function will compute the device udi based on other properties of the device. | |
const char * | sysfs_class_name |
name of device class the instance handles (name mentioned in /sys/class | |
const char * | hal_class_name |
hal class name - if merge_or_add==FALSE then info.bus will have this name | |
dbus_bool_t | require_device_file |
TRUE if the class device should get the device file from udev (using udevinfo on probing / waiting for dbus signal on hotplug). | |
dbus_bool_t | merge_or_add |
TRUE if the class device should be merged onto the sysdevice; if FALSE the class device will be added as a child to the parent of the sysdevice. |
Definition at line 36 of file class_device.h.
|
Called when processing a new device instance to determine whether this class accepts this kind of device.
Referenced by visit_class_device(). |
|
This function will compute the device udi based on other properties of the device. It only makes sense to implement this method if, and only if, merge_or_add==FALSE Requirements for udi:
|
|
Called when all device detection (on bootstrap) is done.
Referenced by osspec_probe(). |
|
Get the name of that the property that the device file should be put in.
Referenced by class_device_visit(). |
|
Called when the UDI has been determined, but before the device is added to the GDL. Note that this is only invoked if merge_or_add is FALSE.
|
|
Called when the HAL daemon is starting up.
Referenced by osspec_init(). |
|
Called when an inferior HalDevice is merged. This is the last step when merging in devices. This is only invoked if merge_or_add is TRUE.
|
|
This method is called just before the device is either merged onto the sysdevice or added to the GDL (cf. merge_or_add). This is useful for extracting more information about the device through e.g. ioctl's using the device file property and also for setting info.category|capability. Note that the UDI is not yet valid, use function got_udi to
|
|
Called when the class device instance have been removed.
|
|
TRUE if the class device should get the device file from udev (using udevinfo on probing / waiting for dbus signal on hotplug). FALSE if there is no special device file for the device class (such as net devices). If set to TRUE then class_device_target_property must be implemented. Definition at line 231 of file class_device.h. Referenced by class_device_got_parent_device(), class_device_got_sysdevice(), and class_device_visit(). |
|
Called just before the HAL daemon is shutting down.
|
|
Called regulary (every two seconds) for polling etc.
Referenced by osspec_timer_handler(). |
|
Called when the device file (e.g. a file in /dev) have been created for a particual instance of this class device
Referenced by class_device_visit(), and handle_udev_node_created_found_device(). |
|
Called when a new instance of a class device is detected either through hotplug or through initial detection. This function should create a HalDevice object if we are interested in the class device (e.g. if it maps to a particular hardware device). If a HalDevice object is created and we need to wait for an udev event, then the string property .udev.sysfs_path must be set to the sysfs_path given and the string property .udev.class_name need to carry the appropriate class device name (e.g. from /sys/class such as input, net).
Referenced by visit_class_device(). |