Data Structures | |
struct | PendingUpdate_s |
Structure for queing updates. More... | |
Defines | |
#define | MAX_CAP_SIZE 2048 |
Maximum string length for capabilities; quite a hack :-/. | |
Typedefs | |
typedef PendingUpdate_s | PendingUpdate |
Structure for queing updates. | |
Functions | |
gboolean | foreach_property_append (HalDevice *device, HalProperty *p, gpointer user_data) |
DBusHandlerResult | device_get_all_properties (DBusConnection *connection, DBusMessage *message) |
Get all properties on a device. | |
DBusHandlerResult | device_get_property (DBusConnection *connection, DBusMessage *message) |
Get a property on a device. | |
DBusHandlerResult | device_get_property_type (DBusConnection *connection, DBusMessage *message) |
Get the type of a property on a device. | |
DBusHandlerResult | device_set_property (DBusConnection *connection, DBusMessage *message) |
Set a property on a device. | |
DBusHandlerResult | device_add_capability (DBusConnection *connection, DBusMessage *message) |
This function is used to modify the Capabilities property. | |
DBusHandlerResult | device_remove_property (DBusConnection *connection, DBusMessage *message) |
Remove a property on a device. | |
DBusHandlerResult | device_property_exists (DBusConnection *connection, DBusMessage *message) |
Determine if a property exists. | |
DBusHandlerResult | device_query_capability (DBusConnection *connection, DBusMessage *message) |
Determine if a device got a capability. | |
void | device_property_atomic_update_begin (void) |
Begin an atomic update - this is useful for updating several properties in one go. | |
void | device_property_atomic_update_end (void) |
End an atomic update. | |
void | device_send_signal_property_modified (HalDevice *device, const char *key, dbus_bool_t added, dbus_bool_t removed) |
void | device_send_signal_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. | |
Variables | |
int | atomic_count = 0 |
Counter for atomic updating. | |
int | num_pending_updates = 0 |
Number of updates pending. | |
PendingUpdate * | pending_updates_head = NULL |
|
This function is used to modify the Capabilities property. The reason for having a dedicated function is that the HAL daemon will broadcast a signal on the Manager interface to tell applications that the device have got a new capability. This is useful as capabilities can be merged after the device is created. One example of this is networking cards under Linux 2.6; the net.ethernet capability is not merged when the device is initially found by looking in /sys/devices; it is merged when the /sys/classes tree is searched. Note that the signal is emitted every time this method is invoked even though the capability already existed. This is useful in the above scenario when the PCI class says ethernet networking card but we yet don't have enough information to fill in the net.* and net.ethernet.* fields since this only happens when we visit the /sys/classes tree.
Definition at line 933 of file hald_dbus.c. References DIE, manager_send_signal_new_capability(), MAX_CAP_SIZE, raise_no_such_device(), and raise_syntax(). Referenced by filter_function(). |
|
Get all properties on a device.
Definition at line 607 of file hald_dbus.c. References DIE, and raise_no_such_device(). Referenced by filter_function(). |
|
Get a property on a device.
Definition at line 664 of file hald_dbus.c. References DIE, raise_no_such_device(), raise_no_such_property(), and raise_syntax(). Referenced by filter_function(). |
|
Get the type of a property on a device.
Definition at line 752 of file hald_dbus.c. References DIE, raise_no_such_device(), raise_no_such_property(), and raise_syntax(). Referenced by filter_function(). |
|
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 1191 of file hald_dbus.c. References atomic_count. Referenced by force_unmount(). |
|
End an atomic update. Note that an atomic update is recursive - use with caution! Definition at line 1201 of file hald_dbus.c. References PendingUpdate_s::added, atomic_count, DIE, PendingUpdate_s::key, PendingUpdate_s::next, num_pending_updates, PendingUpdate, PendingUpdate_s::removed, and PendingUpdate_s::udi. Referenced by force_unmount(). |
|
Determine if a property exists.
Definition at line 1061 of file hald_dbus.c. References DIE, raise_no_such_device(), and raise_syntax(). Referenced by filter_function(). |
|
Determine if a device got a capability.
Definition at line 1117 of file hald_dbus.c. References DIE, raise_no_such_device(), and raise_syntax(). Referenced by filter_function(). |
|
Remove a property on a device.
Definition at line 1004 of file hald_dbus.c. References DIE, raise_no_such_device(), raise_no_such_property(), and raise_syntax(). Referenced by filter_function(). |
|
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 1347 of file hald_dbus.c. References DIE. Referenced by force_unmount(), and force_unmount_of_all_childs(). |
|
Set a property on a device.
Definition at line 824 of file hald_dbus.c. References DIE, raise_no_such_device(), raise_property_type_error(), and raise_syntax(). Referenced by filter_function(). |