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

HAL daemon

The HAL daemon manages persistent device objects available through a D-BUS network API. More...


Modules

Device Info File Parsing
 Parsing of device info files.

HAL device store
 The device store is where the device objects are stored.

Logging system
 Logging system for the HAL daemon.

Error conditions
 Various error messages the HAL daemon can raise.

D-BUS interface org.freedesktop.Hal.Manager
 D-BUS interface for querying device objects.

D-BUS interface org.freedesktop.Hal.Device
 D-BUS interface for generic device operations.

D-BUS interface org.freedesktop.Hal.AgentManager
 D-BUS interface for creating/destroying device objects.

Basic functions
 Basic functions in the HAL daemon.

Linux 2.6 support
 Device detection and monitoring code for version 2.6 of Linux.


Functions

char * xstrdup (const char *str)
 String duplication; aborts if no memory.

void * xmalloc (unsigned int how_much)
 Memory allocation; aborts if no memory.

void property_atomic_update_begin ()
 Begin an atomic update - this is useful for updating several properties in one go.

void property_atomic_update_end ()
 End an atomic update.

void emit_condition (HalDevice *device, const char *condition_name, int first_arg_type,...)
 Emits a condition on a device; the device has to be in the GDL for this function to have effect.


Detailed Description

The HAL daemon manages persistent device objects available through a D-BUS network API.


Function Documentation

void emit_condition HalDevice device,
const char *  condition_name,
int  first_arg_type,
... 
 

Emits a condition on a device; the device has to be in the GDL for this function to have effect.

Is intended for non-continuous events on the device like ProcesserOverheating, BlockDeviceGotDevice, e.g. conditions that are exceptional and may not be inferred by looking at properties (though some may).

This function accepts a number of parameters that are passed along in the D-BUS message. The recipient is supposed to extract the parameters himself, by looking at the HAL specification.

Parameters:
device The device
condition_name Name of condition
first_arg_type Type of the first argument
... value of first argument, list of additional type-value pairs. Must be terminated with DBUS_TYPE_INVALID

Definition at line 1841 of file main.c.

References DIE, HalDevice, HalDevice_s::in_gdl, and HalDevice_s::udi.

Referenced by etc_mtab_process_all_block_devices(), force_unmount(), force_unmount_of_all_childs(), and link_detection_process().

void property_atomic_update_begin  ) 
 

Begin an atomic update - this is useful for updating several properties in one go.

Note that an atomic update is recursive - use with caution!

Definition at line 1720 of file main.c.

References atomic_count.

Referenced by ds_device_merge(), etc_mtab_process_all_block_devices(), force_unmount(), and link_detection_process().

void property_atomic_update_end  ) 
 

End an atomic update.

Note that an atomic update is recursive - use with caution!

Definition at line 1744 of file main.c.

References PendingUpdate_s::added, atomic_count, PendingUpdate_s::device, DIE, PendingUpdate_s::key, PendingUpdate_s::next, num_pending_updates, PendingUpdate, and PendingUpdate_s::removed.

Referenced by ds_device_merge(), etc_mtab_process_all_block_devices(), force_unmount(), and link_detection_process().

void* xmalloc unsigned int  how_much  ) 
 

Memory allocation; aborts if no memory.

Parameters:
how_much Number of bytes to allocated
Returns:
Pointer to allocated storage

Definition at line 2184 of file main.c.

References DIE.

Referenced by ds_device_async_find_by_key_value_string(), ds_device_find_multiple_by_key_value_string(), ds_device_new(), and property_changed().

char* xstrdup const char *  str  ) 
 

String duplication; aborts if no memory.

Parameters:
how_much Number of bytes to allocated
Returns:
Pointer to allocated storage

Definition at line 2197 of file main.c.

References DIE.

Referenced by ds_device_async_find_by_key_value_string(), ds_device_new(), ds_device_set_udi(), ds_property_set_bool(), ds_property_set_double(), ds_property_set_int(), ds_property_set_string(), ds_query_capability(), and property_changed().


Generated on Sat Feb 7 22:11:50 2004 for HAL by doxygen 1.3.5