Data Structures | |
struct | PendingUpdate_s |
Structure for queing updates. More... | |
Typedefs | |
typedef PendingUpdate_s | PendingUpdate |
Structure for queing updates. | |
Functions | |
DBusHandlerResult | filter_function (DBusConnection *connection, DBusMessage *message, void *user_data) |
Message handler for method invocations. | |
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. | |
void | property_changed (HalDevice *device, const char *key, dbus_bool_t in_gdl, dbus_bool_t removed, dbus_bool_t added) |
Function in the HAL daemon that is called whenever a property on a device is changed. | |
void | gdl_changed (HalDevice *device, dbus_bool_t is_added) |
Callback for the global device list has changed. | |
void | new_capability (HalDevice *device, const char *capability, dbus_bool_t in_gdl) |
Callback for when a new capability is added to a device. | |
void | usage () |
Print out program usage. | |
int | main (int argc, char *argv[]) |
Entry point for HAL daemon. | |
void * | xmalloc (unsigned int how_much) |
Memory allocation; aborts if no memory. | |
char * | xstrdup (const char *str) |
String duplication; aborts if no memory. | |
Variables | |
int | atomic_count = 0 |
Counter for atomic updating. | |
int | num_pending_updates = 0 |
Number of updates pending. | |
PendingUpdate * | pending_updates_head = NULL |
dbus_bool_t | opt_become_daemon = TRUE |
If #TRUE, we will daemonize. | |
char * | opt_run_as = NULL |
Run as specified username if not #NULL. |
|
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.
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(). |
|
Message handler for method invocations. All invocations on any object or interface is routed through this function.
Definition at line 1524 of file main.c. References agent_device_matches(), agent_manager_commit_to_gdl(), agent_manager_new_device(), agent_manager_remove(), agent_merge_properties(), device_add_capability(), device_get_all_properties(), device_get_property(), device_get_property_type(), device_property_exists(), device_query_capability(), device_remove_property(), device_set_property(), manager_device_exists(), manager_find_device_by_capability(), manager_find_device_string_match(), manager_get_all_devices(), and osspec_filter_function(). Referenced by main(). |
|
Callback for the global device list has changed.
Definition at line 1935 of file main.c. References HalDevice, manager_send_signal_device_added(), manager_send_signal_device_removed(), and HalDevice_s::udi. Referenced by main(). |
|
Entry point for HAL daemon.
Definition at line 1993 of file main.c. References ds_add_cb_gdl_changed(), ds_add_cb_newcap(), ds_add_cb_property_changed(), ds_init(), filter_function(), gdl_changed(), logger_init(), new_capability(), opt_become_daemon, opt_run_as, osspec_init(), osspec_probe(), property_changed(), and usage(). |
|
Callback for when a new capability is added to a device.
Definition at line 1950 of file main.c. References HalDevice, manager_send_signal_new_capability(), and HalDevice_s::udi. Referenced by main(). |
|
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(). |
|
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(). |
|
Function in the HAL daemon that is called whenever a property on a device is changed. Will broadcast the changes using D-BUS signals.
Definition at line 1877 of file main.c. References PendingUpdate_s::added, atomic_count, PendingUpdate_s::device, DIE, HalDevice, PendingUpdate_s::key, PendingUpdate_s::next, num_pending_updates, PendingUpdate, PendingUpdate_s::removed, HalDevice_s::udi, xmalloc(), and xstrdup(). Referenced by main(). |
|
Memory allocation; aborts if no memory.
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(). |
|
String duplication; aborts if no memory.
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(). |