1 /* 2 SPDX-FileCopyrightText: 2017 René J.V. Bertin <rjvbertin@gmail.com> 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_IOKIT_IOKITSTORAGE_H 8 #define SOLID_BACKENDS_IOKIT_IOKITSTORAGE_H 9 10 #include "dadictionary_p.h" 11 #include "iokitblock.h" 12 13 #include <solid/devices/ifaces/storagedrive.h> 14 15 namespace Solid 16 { 17 namespace Backends 18 { 19 namespace IOKit 20 { 21 class IOKitStorage : public Block, virtual public Solid::Ifaces::StorageDrive 22 { 23 Q_OBJECT 24 Q_INTERFACES(Solid::Ifaces::StorageDrive) 25 26 public: 27 explicit IOKitStorage(IOKitDevice *device); 28 explicit IOKitStorage(const IOKitDevice *device); 29 ~IOKitStorage(); 30 31 QString vendor() const; 32 QString product() const; 33 QString description() const; 34 35 public Q_SLOTS: 36 Solid::StorageDrive::Bus bus() const override; 37 Solid::StorageDrive::DriveType driveType() const override; 38 39 bool isRemovable() const override; 40 bool isHotpluggable() const override; 41 qulonglong size() const override; 42 43 private: 44 DADictionary *daDict; 45 }; 46 } 47 } 48 } 49 50 #endif // SOLID_BACKENDS_IOKIT_IOKITSTORAGE_H 51