File indexing completed on 2024-06-09 04:00:39
0001 /* 0002 SPDX-FileCopyrightText: 2017 René J.V. Bertin <rjvbertin@gmail.com> 0003 0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #ifndef SOLID_BACKENDS_IOKIT_IOKITSTORAGE_H 0008 #define SOLID_BACKENDS_IOKIT_IOKITSTORAGE_H 0009 0010 #include "dadictionary_p.h" 0011 #include "iokitblock.h" 0012 0013 #include <solid/devices/ifaces/storagedrive.h> 0014 0015 namespace Solid 0016 { 0017 namespace Backends 0018 { 0019 namespace IOKit 0020 { 0021 class IOKitStorage : public Block, virtual public Solid::Ifaces::StorageDrive 0022 { 0023 Q_OBJECT 0024 Q_INTERFACES(Solid::Ifaces::StorageDrive) 0025 0026 public: 0027 explicit IOKitStorage(IOKitDevice *device); 0028 explicit IOKitStorage(const IOKitDevice *device); 0029 ~IOKitStorage(); 0030 0031 QString vendor() const; 0032 QString product() const; 0033 QString description() const; 0034 0035 public Q_SLOTS: 0036 Solid::StorageDrive::Bus bus() const override; 0037 Solid::StorageDrive::DriveType driveType() const override; 0038 0039 bool isRemovable() const override; 0040 bool isHotpluggable() const override; 0041 qulonglong size() const override; 0042 0043 private: 0044 DADictionary *daDict; 0045 }; 0046 } 0047 } 0048 } 0049 0050 #endif // SOLID_BACKENDS_IOKIT_IOKITSTORAGE_H