Logo Search packages:      
Sourcecode: udev-extras version File versions

_GUdevDevicePrivate Struct Reference

List of all members.


Detailed Description

SECTION:gudevdevice : Get information about a device

The GUdevDevice class is used to get information about a specific device. Note that you cannot instantiate a GUdevDevice object yourself. Instead you must use GUdevClient to obtain GUdevDevice objects.

To get basic information about a device, use g_udev_device_get_subsystem(), g_udev_device_get_devtype(), g_udev_device_get_name(), g_udev_device_get_number(), g_udev_device_get_sysfs_path(), g_udev_device_get_driver(), g_udev_device_get_action(), g_udev_device_get_seqnum(), g_udev_device_get_device_type(), g_udev_device_get_device_number(), g_udev_device_get_device_file(), g_udev_device_get_device_file_symlinks().

To navigate the device tree, use g_udev_device_get_parent() and g_udev_device_get_parent_with_subsystem().

To access udev properties for the device, use g_udev_device_get_property_keys(), g_udev_device_has_property(), g_udev_device_get_property(), g_udev_device_get_property_as_int(), g_udev_device_get_property_as_uint64(), g_udev_device_get_property_as_double(), g_udev_device_get_property_as_boolean() and g_udev_device_get_property_as_strv().

To access sysfs attributes for the device, use g_udev_device_get_sysfs_attr(), g_udev_device_get_sysfs_attr_as_int(), g_udev_device_get_sysfs_attr_as_uint64(), g_udev_device_get_sysfs_attr_as_double(), g_udev_device_get_sysfs_attr_as_boolean() and g_udev_device_get_sysfs_attr_as_strv().

Note that all getters on GUdevDevice are non-reffing – returned values are owned by the object, should not be freed and are only valid as long as the object is alive.

By design, GUdevDevice will not react to changes for a device – it only contains a snapshot of information when the GUdevDevice object was created. To work with changes, you typically connect to the GUdevClient::uevent signal on a GUdevClient and get a new GUdevDevice whenever an event happens.

Definition at line 82 of file gudevdevice.c.


Public Attributes

gchar ** device_file_symlinks
GHashTable * prop_strvs
gchar ** property_keys
GHashTable * sysfs_attr_strvs
struct udev_device * udevice

The documentation for this struct was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index