Solid

fstabhandling.h
1/*
2 SPDX-FileCopyrightText: 2006-2010 Kevin Ottens <ervin@kde.org>
3 SPDX-FileCopyrightText: 2010 Mario Bensi <mbensi@ipsquad.net>
4
5 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6*/
7
8#ifndef SOLID_BACKENDS_FSTAB_FSTABHANDLING_H
9#define SOLID_BACKENDS_FSTAB_FSTABHANDLING_H
10
11#include <QMultiHash>
12#include <QString>
13
14#include <functional>
15
16class QProcess;
17class QObject;
18
19namespace Solid
20{
21namespace Backends
22{
23namespace Fstab
24{
25class FstabHandling
26{
27public:
28 FstabHandling();
29
30 static QStringList deviceList();
31 static QStringList currentMountPoints(const QString &device);
32 static QStringList mountPoints(const QString &device);
33 static QHash<QString, QString> options(const QString &device);
34 static QString fstype(const QString &device);
35 static bool callSystemCommand(const QString &commandName, const QStringList &args, const QObject *recvr, std::function<void(QProcess *)> callback);
36 static void flushMtabCache();
37 static void flushFstabCache();
38
39private:
40 static void _k_updateMtabMountPointsCache();
41 static void _k_updateFstabMountPointsCache();
42
43 typedef QMultiHash<QString, QString> QStringMultiHash;
44
45 QStringMultiHash m_mtabCache;
46 QStringMultiHash m_fstabCache;
47 QHash<QString, QHash<QString, QString>> m_fstabOptionsCache;
49 QHash<QString, QString> m_fstabFstypeCache;
50 bool m_fstabCacheValid;
51 bool m_mtabCacheValid;
52};
53
54}
55}
56}
57
58#endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:01:48 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.