Main Page | Modules | Data Structures | File List | Data Fields | Related Pages

BusDeviceHandler_s Struct Reference

Method and property table for BusDeviceHandler. More...

#include <bus_device.h>


Data Fields

void(* init )(BusDeviceHandler *self)
 Called when the HAL daemon is starting up.

void(* detection_done )(BusDeviceHandler *self)
 Called when all device detection (on bootstrap) is done.

void(* shutdown )(BusDeviceHandler *self)
 Called just before the HAL daemon is shutting down.

void(* tick )(BusDeviceHandler *self)
 Called regulary (every two seconds) for polling etc.

dbus_bool_t(* accept )(BusDeviceHandler *self, const char *sysfs_path, struct sysfs_device *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 )(BusDeviceHandler *self, const char *sysfs_path, struct sysfs_device *device, dbus_bool_t is_probing)
 Called to process the new device instance has passed accept().

void(* removed )(BusDeviceHandler *self, const char *sysfs_path, HalDevice *d)
 Called when the class device instance have been removed.

char *(* compute_udi )(HalDevice *d, int append_num)
 This function will compute the device udi based on other properties of the device.

void(* pre_process )(BusDeviceHandler *self, HalDevice *d, const char *sysfs_path, struct sysfs_device *device)
 This method is called just before the device is added to the GDL.

void(* got_udi )(BusDeviceHandler *self, HalDevice *d, const char *udi)
 Called when the UDI has been determined, but before the device is added to the GDL.

const char * sysfs_bus_name
 name of bus the instance handles (name mentioned in /sys/bus)

const char * hal_bus_name
 hal bus name - property info.bus will be set to this name


Detailed Description

Method and property table for BusDeviceHandler.

Definition at line 36 of file bus_device.h.


Field Documentation

dbus_bool_t(* BusDeviceHandler_s::accept)(BusDeviceHandler *self, const char *sysfs_path, struct sysfs_device *device, dbus_bool_t is_probing)
 

Called when processing a new device instance to determine whether this class accepts this kind of device.

Parameters:
self Pointer to class members
sysfs_path The path in sysfs (including mount point) of the device in sysfs
device Libsysfs object representing new device instance
is_probing Set to TRUE only on initial detection
Returns:
Must return TRUE if this class should process this device

Referenced by visit_device().

char*(* BusDeviceHandler_s::compute_udi)(HalDevice *d, int append_num)
 

This function will compute the device udi based on other properties of the device.

Requirements for udi:

  • do not rely on bus, port etc.; we want this id to be as unique for the device as we can
  • make sure it doesn't rely on properties that cannot be obtained from the minimal information we can obtain on an unplug event

Parameters:
d HalDevice object
append_num Number to append to name if not -1
Returns:
New unique device id; only good until the next invocation of this function

Referenced by bus_device_got_parent().

void(* BusDeviceHandler_s::detection_done)(BusDeviceHandler *self)
 

Called when all device detection (on bootstrap) is done.

Parameters:
self Pointer to class members

Referenced by osspec_probe().

void(* BusDeviceHandler_s::got_udi)(BusDeviceHandler *self, HalDevice *d, const char *udi)
 

Called when the UDI has been determined, but before the device is added to the GDL.

Parameters:
self Pointer to class members
d The HalDevice object
udi UDI of device

Referenced by bus_device_got_parent().

void(* BusDeviceHandler_s::init)(BusDeviceHandler *self)
 

Called when the HAL daemon is starting up.

Parameters:
self Pointer to class members

Referenced by osspec_init().

void(* BusDeviceHandler_s::pre_process)(BusDeviceHandler *self, HalDevice *d, const char *sysfs_path, struct sysfs_device *device)
 

This method is called just before the device is added to the GDL.

This is useful for adding more information about the device.

Parameters:
self Pointer to class members
d The HalDevice object of the instance of this device class
sysfs_path The path in sysfs (including mount point) of the class device in sysfs
device Libsysfs object representing device instance

Referenced by bus_device_got_parent().

void(* BusDeviceHandler_s::removed)(BusDeviceHandler *self, const char *sysfs_path, HalDevice *d)
 

Called when the class device instance have been removed.

Parameters:
self Pointer to class members
sysfs_path The path in sysfs (including mount point) of the class device in sysfs
d The HalDevice object of the instance of this device class

void(* BusDeviceHandler_s::shutdown)(BusDeviceHandler *self)
 

Called just before the HAL daemon is shutting down.

Parameters:
self Pointer to class members

void(* BusDeviceHandler_s::tick)(BusDeviceHandler *self)
 

Called regulary (every two seconds) for polling etc.

Parameters:
self Pointer to class members

Referenced by osspec_timer_handler().

void(* BusDeviceHandler_s::visit)(BusDeviceHandler *self, const char *sysfs_path, struct sysfs_device *device, dbus_bool_t is_probing)
 

Called to process the new device instance has passed accept().

This function should create a HalDevice object - the following properties need to be set

linux.sysfs_path - must be set to the fully qualified path to the sysfs object (e.g. /sys/devices/..)

Parameters:
self Pointer to class members
sysfs_path The path in sysfs (including mount point) of the device in sysfs
device Libsysfs object representing new device instance
is_probing Set to TRUE only on initial detection

Referenced by visit_device().


The documentation for this struct was generated from the following file:
Generated on Sat Apr 24 19:57:46 2004 for HAL by doxygen 1.3.6-20040222