Defines | |
#define | MAX_CAP_SIZE 2048 |
Maximum string length for capabilities; quite a hack :-/. | |
Functions | |
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. |
|
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 919 of file main.c. References DIE, ds_device_find(), ds_property_get_string(), ds_property_set_string(), HalDevice, HalDevice_s::in_gdl, 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 552 of file main.c. References DIE, ds_device_find(), ds_property_iter_begin(), ds_property_iter_get(), ds_property_iter_get_bool(), ds_property_iter_get_double(), ds_property_iter_get_int(), ds_property_iter_get_key(), ds_property_iter_get_string(), ds_property_iter_get_type(), ds_property_iter_has_more(), ds_property_iter_next(), HalDevice, HalProperty, HalPropertyIterator, and raise_no_such_device(). Referenced by filter_function(). |
|
Get a property on a device.
Definition at line 645 of file main.c. References DIE, ds_device_find(), ds_property_find(), ds_property_iter_get_bool(), ds_property_iter_get_double(), ds_property_iter_get_int(), ds_property_iter_get_string(), ds_property_iter_get_type(), HalDevice, HalProperty, 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 737 of file main.c. References DIE, ds_device_find(), ds_property_find(), ds_property_iter_get_type(), HalDevice, HalProperty, raise_no_such_device(), raise_no_such_property(), and raise_syntax(). Referenced by filter_function(). |
|
Determine if a property exists.
Definition at line 1057 of file main.c. References DIE, ds_device_find(), ds_property_exists(), HalDevice, raise_no_such_device(), and raise_syntax(). Referenced by filter_function(). |
|
Determine if a device got a capability.
Definition at line 1114 of file main.c. References DIE, ds_device_find(), ds_property_get_string(), HalDevice, raise_no_such_device(), and raise_syntax(). Referenced by filter_function(). |
|
Remove a property on a device.
Definition at line 997 of file main.c. References DIE, ds_device_find(), ds_property_remove(), HalDevice, raise_no_such_device(), raise_no_such_property(), and raise_syntax(). Referenced by filter_function(). |
|
Set a property on a device.
Definition at line 810 of file main.c. References DIE, ds_device_find(), ds_property_set_bool(), ds_property_set_double(), ds_property_set_int(), ds_property_set_string(), HalDevice, raise_no_such_device(), raise_property_type_error(), and raise_syntax(). Referenced by filter_function(). |