1 | /* |
2 | SPDX-FileCopyrightText: 2010 Michael Zanetti <mzanetti@kde.org> |
3 | SPDX-FileCopyrightText: 2010-2012 Lukáš Tinkl <ltinkl@redhat.com> |
4 | |
5 | SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
6 | */ |
7 | |
8 | #ifndef UDISKSSTORAGEDRIVE_H |
9 | #define UDISKSSTORAGEDRIVE_H |
10 | |
11 | #include <QDateTime> |
12 | #include <ifaces/storagedrive.h> |
13 | |
14 | #include "../shared/udevqt.h" |
15 | #include <config-solid.h> |
16 | |
17 | #include "udisksblock.h" |
18 | |
19 | namespace Solid |
20 | { |
21 | namespace Backends |
22 | { |
23 | namespace UDisks2 |
24 | { |
25 | class StorageDrive : public Block, virtual public Solid::Ifaces::StorageDrive |
26 | { |
27 | Q_OBJECT |
28 | Q_INTERFACES(Solid::Ifaces::StorageDrive) |
29 | |
30 | public: |
31 | StorageDrive(Device *dev); |
32 | ~StorageDrive() override; |
33 | |
34 | qulonglong size() const override; |
35 | bool isHotpluggable() const override; |
36 | bool isRemovable() const override; |
37 | Solid::StorageDrive::DriveType driveType() const override; |
38 | Solid::StorageDrive::Bus bus() const override; |
39 | QDateTime timeDetected() const override; |
40 | QDateTime timeMediaDetected() const override; |
41 | |
42 | private: |
43 | #if UDEV_FOUND |
44 | UdevQt::Device m_udevDevice; |
45 | #endif |
46 | }; |
47 | |
48 | } |
49 | } |
50 | } |
51 | |
52 | #endif // UDISKSSTORAGEDRIVE_H |
53 | |