File indexing completed on 2024-05-26 04:05:37
0001 /* 0002 SPDX-FileCopyrightText: 2010 Michael Zanetti <mzanetti@kde.org> 0003 SPDX-FileCopyrightText: 2010-2012 Lukáš Tinkl <ltinkl@redhat.com> 0004 0005 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0006 */ 0007 0008 #ifndef UDISKSSTORAGEDRIVE_H 0009 #define UDISKSSTORAGEDRIVE_H 0010 0011 #include <QDateTime> 0012 #include <ifaces/storagedrive.h> 0013 0014 #include "../shared/udevqt.h" 0015 #include <config-solid.h> 0016 0017 #include "udisksblock.h" 0018 0019 namespace Solid 0020 { 0021 namespace Backends 0022 { 0023 namespace UDisks2 0024 { 0025 class StorageDrive : public Block, virtual public Solid::Ifaces::StorageDrive 0026 { 0027 Q_OBJECT 0028 Q_INTERFACES(Solid::Ifaces::StorageDrive) 0029 0030 public: 0031 StorageDrive(Device *dev); 0032 ~StorageDrive() override; 0033 0034 qulonglong size() const override; 0035 bool isHotpluggable() const override; 0036 bool isRemovable() const override; 0037 Solid::StorageDrive::DriveType driveType() const override; 0038 Solid::StorageDrive::Bus bus() const override; 0039 QDateTime timeDetected() const override; 0040 QDateTime timeMediaDetected() const override; 0041 0042 private: 0043 #if UDEV_FOUND 0044 UdevQt::Device m_udevDevice; 0045 #endif 0046 }; 0047 0048 } 0049 } 0050 } 0051 0052 #endif // UDISKSSTORAGEDRIVE_H