GUdev.Enumerator¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
The client to enumerate devices from |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class GUdev.Enumerator(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
GUdev.Enumerator
is used to lookup and sort devices.New in version 165.
- classmethod new(client)¶
- Parameters:
client (
GUdev.Client
) – AGUdev.Client
to enumerate devices from.- Returns:
A new
GUdev.Enumerator
object. Free withGObject.Object.unref
().- Return type:
Constructs a
GUdev.Enumerator
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 withGUdev.Enumerator.execute
().New in version 165.
- add_match_is_initialized()¶
- Returns:
The passed in self.
- Return type:
All returned devices will be initialized.
New in version 165.
- add_match_name(name)¶
- Parameters:
name (
str
) – Wildcard filter for kernel name e.g. “sda*”.- Returns:
The passed in self.
- Return type:
All returned devices will match the given name.
New in version 165.
- add_match_property(name, value)¶
- Parameters:
- Returns:
The passed in self.
- Return type:
All returned devices will have a property matching the given name and value.
New in version 165.
- add_match_subsystem(subsystem)¶
- Parameters:
subsystem (
str
) – Wildcard for subsystem name e.g. ‘scsi’ or ‘a*’.- Returns:
The passed in self.
- Return type:
All returned devices will match the given subsystem.
New in version 165.
- add_match_sysfs_attr(name, value)¶
- Parameters:
- Returns:
The passed in self.
- Return type:
All returned devices will have a sysfs attribute matching the given name and value.
New in version 165.
- add_match_tag(tag)¶
- Parameters:
tag (
str
) – A udev tag e.g. “udev-acl”.- Returns:
The passed in self.
- Return type:
All returned devices will match the given tag.
New in version 165.
- add_nomatch_subsystem(subsystem)¶
- Parameters:
subsystem (
str
) – Wildcard for subsystem name e.g. ‘scsi’ or ‘a*’.- Returns:
The passed in self.
- Return type:
All returned devices will not match the given subsystem.
New in version 165.
- add_nomatch_sysfs_attr(name, value)¶
- Parameters:
- Returns:
The passed in self.
- Return type:
All returned devices will not have a sysfs attribute matching the given name and value.
New in version 165.
- add_sysfs_path(sysfs_path)¶
- Parameters:
sysfs_path (
str
) – A sysfs path, e.g. “/sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda”- Returns:
The passed in self.
- Return type:
Add a device to the list of devices, to retrieve it back sorted in dependency order.
New in version 165.
- execute()¶
- Returns:
A list of
GUdev.Device
objects. The caller should free the result by usingGObject.Object.unref
() on each element in the list and then g_list_free() on the list.- Return type:
Executes the query in self.
New in version 165.
Property Details¶
- GUdev.Enumerator.props.client¶
- Name:
client
- Type:
- Default Value:
- Flags:
The
GUdev.Client
to enumerate devices from.New in version 165.