class Solid.Device |
|
|
This class allows applications to deal with devices available in the underlying system. Device stores a reference to device data provided by the backend. Device objects are designed to be used by value. Copying these objects is quite cheap, so using pointers to the me is generally not needed.
Author Kevin Ottens |
|
Constructs a device for a given Universal Device Identifier (UDI).
udi - the udi of the device to create |
|
Constructs a copy of a device.
device - the device to copy |
|
Retrieves all the devices available in the underlying system. Returns the list of the devices available |
|
Retrieves a specialized interface to interact with the device corresponding to a particular device interface.
type - the device interface type Returns a pointer to the device interface interface if it exists, 0 otherwise |
|
Retrieves the name of the icon representing this device. The naming follows the freedesktop.org specification. Returns the icon name |
|
Tests if a device interface is available from the device.
type - the device interface type to query Returns true if the device interface is available, false otherwise |
|
Assigns a device to this device and returns a reference to it.
device - the device to assign Returns a reference to the device Indicates if this device is valid. A device is considered valid if it's available in the system. Returns true if this device is available, false otherwise |
|
Retrieves a list of devices of the system given matching the given constraints (parent and predicate)
predicate - Predicate that the devices we're searching for must verify parentUdi - UDI of the parent of the devices we're searching for, or QString() if there's no constraint on the parent Returns the list of devices corresponding to the given constraints See also Solid.Predicate |
|
Convenience function see above.
predicate - parentUdi - Returns the list of devices |
|
Retrieves a list of devices of the system given matching the given constraints (parent and device interface type)
type - device interface type available on the devices we're looking for, or DeviceInterface.Unknown if there's no constraint on the device interfaces parentUdi - UDI of the parent of the devices we're searching for, or QString() if there's no constraint on the parent Returns the list of devices corresponding to the given constraints See also Solid.Predicate |
|
Retrieves the parent of the Device. Returns the device's parent See also parentUdi() See also DeviceManager.findDevice() |
|
Retrieves the Universal Device Identifier (UDI) of the Device's parent. Returns the udi of the device's parent |
|
Retrieves the name of the product corresponding to this device. Returns the product name |
|
Retrieves the Universal Device Identifier (UDI). Returns the udi of the device |
|
Retrieves the name of the device vendor. Returns the vendor name |