7#include "fstabnetworkshare.h"
8#include "fstabhandling.h"
9#include <solid/devices/backends/fstab/fstabdevice.h>
11using namespace Solid::Backends::Fstab;
13FstabNetworkShare::FstabNetworkShare(Solid::Backends::Fstab::FstabDevice *device)
15 , m_fstabDevice(device)
18 if (m_fstabDevice->device().startsWith(
QLatin1String(
"//"))) {
19 QString fsType = FstabHandling::fstype(m_fstabDevice->device());
21 m_type = Solid::NetworkShare::Cifs;
23 m_type = Solid::NetworkShare::Smb3;
25 url = QStringLiteral(
"smb:%1").
arg(m_fstabDevice->device());
26 }
else if (m_fstabDevice->device().contains(
QLatin1String(
":/"))) {
27 m_type = Solid::NetworkShare::Nfs;
28 url = QStringLiteral(
"nfs://%1/%2").
arg(m_fstabDevice->vendor(), m_fstabDevice->product());
30 m_type = Solid::NetworkShare::Unknown;
35FstabNetworkShare::~FstabNetworkShare()
44QUrl FstabNetworkShare::url()
const
49const Solid::Backends::Fstab::FstabDevice *FstabNetworkShare::fstabDevice()
const
54#include "moc_fstabnetworkshare.cpp"
ShareType
This enum type defines the type of networkShare device can be.
QString arg(Args &&... args) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:47:13 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.