Solid

fstabstorageaccess.h
1/*
2 SPDX-FileCopyrightText: 2010 Mario Bensi <mbensi@ipsquad.net>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6
7#ifndef SOLID_BACKENDS_FSTAB_STORAGEACCESS_H
8#define SOLID_BACKENDS_FSTAB_STORAGEACCESS_H
9
10#include <solid/devices/ifaces/storageaccess.h>
11
12#include <QObject>
13
14namespace Solid
15{
16namespace Backends
17{
18namespace Fstab
19{
20class FstabDevice;
21class FstabStorageAccess : public QObject, public Solid::Ifaces::StorageAccess
22{
25
26public:
27 explicit FstabStorageAccess(Solid::Backends::Fstab::FstabDevice *device);
28
29 ~FstabStorageAccess() override;
30
31 bool isAccessible() const override;
32
33 QString filePath() const override;
34
35 bool isIgnored() const override;
36
37 bool isEncrypted() const override;
38
39 bool setup() override;
40
41 bool teardown() override;
42
43public:
44 const Solid::Backends::Fstab::FstabDevice *fstabDevice() const;
45
47 void accessibilityChanged(bool accessible, const QString &udi) override;
48
49 void setupDone(Solid::ErrorType error, QVariant data, const QString &udi) override;
50
51 void teardownDone(Solid::ErrorType error, QVariant data, const QString &udi) override;
52
53 void setupRequested(const QString &udi) override;
54
55 void teardownRequested(const QString &udi) override;
56
57 void repairRequested(const QString &udi) override;
58
59 void repairDone(Solid::ErrorType error, QVariant resultData, const QString &udi) override;
60
61private Q_SLOTS:
62 void onMtabChanged(const QString &device);
63 void connectDBusSignals();
64
65 void slotSetupRequested();
66 void slotSetupDone(int error, const QString &errorString);
67 void slotTeardownRequested();
68 void slotTeardownDone(int error, const QString &errorString);
69
70private:
71 Solid::Backends::Fstab::FstabDevice *m_fstabDevice;
72 QString m_filePath;
73 bool m_isAccessible;
74 bool m_isIgnored;
75};
76
77}
78}
79}
80
81#endif // SOLID_BACKENDS_FSTAB_DEVICE_INTERFACE_H
This device interface is available on volume devices.
Q_INTERFACES(...)
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:03:23 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.