File indexing completed on 2024-06-09 04:00:40

0001 /*
0002     SPDX-FileCopyrightText: 2012 Lukáš Tinkl <ltinkl@redhat.com>
0003 
0004     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005 */
0006 
0007 #ifndef UDISKSBLOCK_H
0008 #define UDISKSBLOCK_H
0009 
0010 #include "udisksdeviceinterface.h"
0011 #include <solid/devices/ifaces/block.h>
0012 
0013 #include <sys/types.h> // dev_t
0014 
0015 namespace Solid
0016 {
0017 namespace Backends
0018 {
0019 namespace UDisks2
0020 {
0021 class Block : public DeviceInterface, virtual public Solid::Ifaces::Block
0022 {
0023     Q_OBJECT
0024     Q_INTERFACES(Solid::Ifaces::Block)
0025 
0026 public:
0027     Block(Device *dev);
0028     ~Block() override;
0029 
0030     QString device() const override;
0031     int deviceMinor() const override;
0032     int deviceMajor() const override;
0033 
0034 private:
0035     dev_t m_devNum;
0036     QString m_devFile;
0037 };
0038 
0039 }
0040 }
0041 }
0042 
0043 #endif // UDISKSBLOCK_H