Top |
GUdevEnumerator *
g_udev_enumerator_new (GUdevClient *client
);
Constructs a GUdevEnumerator object that can be used to enumerate
and sort devices. Use the add_match_*() and add_nomatch_*() methods
and execute the query to get a list of devices with
g_udev_enumerator_execute()
.
Since: 165
GUdevEnumerator * g_udev_enumerator_add_match_subsystem (GUdevEnumerator *enumerator
,const gchar *subsystem
);
All returned devices will match the given subsystem
.
Since: 165
GUdevEnumerator * g_udev_enumerator_add_nomatch_subsystem (GUdevEnumerator *enumerator
,const gchar *subsystem
);
All returned devices will not match the given subsystem
.
Since: 165
GUdevEnumerator * g_udev_enumerator_add_match_sysfs_attr (GUdevEnumerator *enumerator
,const gchar *name
,const gchar *value
);
All returned devices will have a sysfs attribute matching the given name
and value
.
enumerator |
||
name |
Wildcard filter for sysfs attribute key. |
|
value |
Wildcard filter for sysfs attribute value. |
Since: 165
GUdevEnumerator * g_udev_enumerator_add_nomatch_sysfs_attr (GUdevEnumerator *enumerator
,const gchar *name
,const gchar *value
);
All returned devices will not have a sysfs attribute matching the given name
and value
.
enumerator |
||
name |
Wildcard filter for sysfs attribute key. |
|
value |
Wildcard filter for sysfs attribute value. |
Since: 165
GUdevEnumerator * g_udev_enumerator_add_match_property (GUdevEnumerator *enumerator
,const gchar *name
,const gchar *value
);
All returned devices will have a property matching the given name
and value
.
enumerator |
||
name |
Wildcard filter for property name. |
|
value |
Wildcard filter for property value. |
Since: 165
GUdevEnumerator * g_udev_enumerator_add_match_name (GUdevEnumerator *enumerator
,const gchar *name
);
All returned devices will match the given name
.
Since: 165
GUdevEnumerator * g_udev_enumerator_add_match_tag (GUdevEnumerator *enumerator
,const gchar *tag
);
All returned devices will match the given tag
.
Since: 165
GUdevEnumerator *
g_udev_enumerator_add_match_is_initialized
(GUdevEnumerator *enumerator
);
All returned devices will be initialized.
Since: 165
GUdevEnumerator * g_udev_enumerator_add_sysfs_path (GUdevEnumerator *enumerator
,const gchar *sysfs_path
);
Add a device to the list of devices, to retrieve it back sorted in dependency order.
enumerator |
||
sysfs_path |
A sysfs path, e.g. "/sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda" |
Since: 165
GList *
g_udev_enumerator_execute (GUdevEnumerator *enumerator
);
Executes the query in enumerator
.
A list of GUdevDevice objects. The caller should free the result by using g_object_unref()
on each element in the list and then g_list_free()
on the list.
[element-type GUdevDevice][transfer full]
Since: 165
typedef struct _GUdevEnumerator GUdevEnumerator;
The GUdevEnumerator struct is opaque and should not be accessed directly.
Since: 165
struct GUdevEnumeratorClass { GObjectClass parent_class; };
Class structure for GUdevEnumerator.
Since: 165
“client”
property“client” GUdevClient *
The GUdevClient to enumerate devices from.
Owner: GUdevEnumerator
Flags: Read / Write / Construct Only
Since: 165