GUdev.Enumerator¶
| Subclasses: | None |
|---|
Methods¶
| Inherited: | GObject.Object (37) |
|---|---|
| Structs: | GObject.ObjectClass (5) |
| class | new (client) |
add_match_is_initialized () |
|
add_match_name (name) |
|
add_match_property (name, value) |
|
add_match_subsystem (subsystem) |
|
add_match_sysfs_attr (name, value) |
|
add_match_tag (tag) |
|
add_nomatch_subsystem (subsystem) |
|
add_nomatch_sysfs_attr (name, value) |
|
add_sysfs_path (sysfs_path) |
|
execute () |
Virtual Methods¶
| Inherited: | GObject.Object (7) |
|---|
Properties¶
| Name | Type | Flags | Short Description |
|---|---|---|---|
client |
GUdev.Client |
r/w/co | The client to enumerate devices from |
Signals¶
| Inherited: | GObject.Object (1) |
|---|
Class Details¶
-
class
GUdev.Enumerator(**kwargs)¶ Bases: GObject.ObjectAbstract: No Structure: GUdev.EnumeratorClassGUdev.Enumeratoris used to lookup and sort devices.New in version 165.
-
classmethod
new(client)¶ Parameters: client ( GUdev.Client) – AGUdev.Clientto enumerate devices from.Returns: A new GUdev.Enumeratorobject. Free withGObject.Object.unref().Return type: GUdev.EnumeratorConstructs a
GUdev.Enumeratorobject 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: GUdev.EnumeratorAll 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: GUdev.EnumeratorAll 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: GUdev.EnumeratorAll 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: GUdev.EnumeratorAll 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: GUdev.EnumeratorAll 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: GUdev.EnumeratorAdd 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.Deviceobjects. 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: [ GUdev.Device]Executes the query in self.
New in version 165.
-
classmethod
Property Details¶
-
GUdev.Enumerator.props.client¶ Name: clientType: GUdev.ClientDefault Value: NoneFlags: READABLE,WRITABLE,CONSTRUCT_ONLYThe
GUdev.Clientto enumerate devices from.New in version 165.