Solid::NetworkShare Class
This device interface is available for network share volumes. More...
- Header:
#include <Solid/NetworkShare> - CMake:
find_package(KF6 REQUIRED COMPONENTS Solid)
target_link_libraries(mytarget PRIVATE KF6::Solid) - Inherits: Solid::DeviceInterface
List of all members, including inherited members
Public Types
Properties
Public Functions
Static Public Members
Detailed Description
Used to acquire a list of network device types.
const auto devices = Solid::Device::listFromType(Solid::DeviceInterface::NetworkShare);
for (const auto &device : devices) {
switch (device.as<Solid::NetworkShare>()->type()) {
case Solid::NetworkShare::Cifs:
hasCifsShare = true;
continue;
case Solid::NetworkShare::Smb3:
hasSmb3Share = true;
continue;
case Solid::NetworkShare::Nfs:
hasNfsShare = true;
continue;
default:
continue;
}
}
Member Type Documentation
enum NetworkShare::ShareType
This enum type defines the type of networkShare device can be.
| Constant | Value | Description |
|---|---|---|
Solid::NetworkShare::Unknown |
0 |
An unsupported network protocol |
Solid::NetworkShare::Nfs |
1 |
NFS protocol |
Solid::NetworkShare::Cifs |
2 |
Samba protocol |
Solid::NetworkShare::Smb3 |
3 |
Samba protocol (version 3) |
Property Documentation
[read-only] type : ShareType
Access functions:
Solid::NetworkShare::ShareTypetype() const
[read-only] url : QUrl
Access functions:
QUrlurl() const
Member Function Documentation
[static] Solid::DeviceInterface::Type NetworkShare::deviceInterfaceType()
Returns the Solid::DeviceInterface::Type of the NetworkShare device interface.
See also Solid::DeviceInterface::Type
Solid::NetworkShare::ShareType NetworkShare::type() const
Returns the type of network share.
Note: Getter function for property type.
QUrl NetworkShare::url() const
Returns the url of network share.
Note: Getter function for property url.