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
57private Q_SLOTS:
58 void onMtabChanged(const QString &device);
59 void connectDBusSignals();
60
61 void slotSetupRequested();
62 void slotSetupDone(int error, const QString &errorString);
63 void slotTeardownRequested();
64 void slotTeardownDone(int error, const QString &errorString);
65
66private:
67 Solid::Backends::Fstab::FstabDevice *m_fstabDevice;
68 QString m_filePath;
69 bool m_isAccessible;
70 bool m_isIgnored;
71};
72
73}
74}
75}
76
77#endif // SOLID_BACKENDS_FSTAB_DEVICE_INTERFACE_H
This device interface is available on volume devices.
The single responsibility of this class is to create arguments valid for logind Inhibit call.
Definition fakebattery.h:16
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 Fri May 24 2024 11:56:28 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.